New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 5538 – NEMO

Changeset 5538


Ignore:
Timestamp:
2015-07-02T16:06:34+02:00 (9 years ago)
Author:
davestorkey
Message:

This the functional change for this branch!

Location:
branches/UKMO/restart_datestamp/NEMOGCM/NEMO/OPA_SRC
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/restart_datestamp/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90

    r5462 r5538  
    136136      USE ioipsl 
    137137      NAMELIST/namrun/ cn_ocerst_indir, cn_ocerst_outdir, nn_stocklist, ln_rst_list,               & 
    138          &             nn_no   , cn_exp    , cn_ocerst_in, cn_ocerst_out, ln_rstart , nn_rstctl,   & 
     138         &             nn_no   , cn_exp    , cn_ocerst_in, cn_ocerst_out, ln_rstart , ln_rstdate, nn_rstctl,   & 
    139139         &             nn_it000, nn_itend  , nn_date0    , nn_leapy     , nn_istate , nn_stock ,   & 
    140140         &             nn_write, ln_dimgnnn, ln_mskland  , ln_cfmeta    , ln_clobber, nn_chunksz, nn_euler 
     
    173173         WRITE(numout,*) '      file prefix restart output      cn_ocerst_out= ', cn_ocerst_out 
    174174         WRITE(numout,*) '      restart output directory        cn_ocerst_outdir= ', cn_ocerst_outdir 
    175          WRITE(numout,*) '      restart logical                 ln_rstart  = ', ln_rstart 
     175         WRITE(numout,*) '      restart logical                 ln_rstart  = ' , ln_rstart 
     176         WRITE(numout,*) '      datestamping of restarts        ln_rstdate  = ', ln_rstdate 
    176177         WRITE(numout,*) '      start with forward time step    nn_euler   = ', nn_euler 
    177178         WRITE(numout,*) '      control of time step            nn_rstctl  = ', nn_rstctl 
  • branches/UKMO/restart_datestamp/NEMOGCM/NEMO/OPA_SRC/ICB/icbrst.F90

    r5462 r5538  
    1818   !!---------------------------------------------------------------------- 
    1919   USE par_oce        ! NEMO parameters 
     20   USE phycst         ! for rday 
    2021   USE dom_oce        ! NEMO domain 
    2122   USE in_out_manager ! NEMO IO routines 
     23   USE ioipsl, ONLY : ju2ymds    ! for calendar 
    2224   USE lib_mpp        ! NEMO MPI library, lk_mpp in particular 
    2325   USE netcdf         ! netcdf routines for IO 
     
    231233      INTEGER ::   jn   ! dummy loop index 
    232234      INTEGER ::   ix_dim, iy_dim, ik_dim, in_dim 
    233       CHARACTER(len=256)     :: cl_path 
    234       CHARACTER(len=256)     :: cl_filename 
     235      INTEGER             ::   iyear, imonth, iday 
     236      REAL (wp)           ::   zsec 
     237      CHARACTER(len=256)  :: cl_path 
     238      CHARACTER(len=256)  :: cl_filename 
     239      CHARACTER(LEN=20)   ::   clkt     ! ocean time-step deine as a character 
    235240      TYPE(iceberg), POINTER :: this 
    236241      TYPE(point)  , POINTER :: pt 
     
    240245      cl_path = TRIM(cn_ocerst_outdir) 
    241246      IF( cl_path(LEN_TRIM(cl_path):) /= '/' ) cl_path = TRIM(cl_path) // '/' 
     247      IF ( ln_rstdate ) THEN 
     248         CALL ju2ymds( fjulday + rdttra(1) / rday, iyear, imonth, iday, zsec )            
     249         WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 
     250      ELSE 
     251         IF( kt > 999999999 ) THEN   ;   WRITE(clkt, *       ) kt 
     252         ELSE                        ;   WRITE(clkt, '(i8.8)') kt 
     253         ENDIF 
     254      ENDIF 
    242255      IF( lk_mpp ) THEN 
    243          WRITE(cl_filename,'(A,"_icebergs_",I8.8,"_restart_",I4.4,".nc")') TRIM(cexper), kt, narea-1 
     256         WRITE(cl_filename,'(A,"_icebergs_",A,"_restart_",I4.4,".nc")') TRIM(cexper), TRIM(ADJUSTL(clkt)), narea-1 
    244257      ELSE 
    245          WRITE(cl_filename,'(A,"_icebergs_",I8.8,"_restart.nc")') TRIM(cexper), kt 
     258         WRITE(cl_filename,'(A,"_icebergs_",A,"_restart.nc")') TRIM(cexper), TRIM(ADJUSTL(clkt)) 
    246259      ENDIF 
    247260      IF (nn_verbose_level >= 0) WRITE(numout,'(2a)') 'icebergs, write_restart: creating ',TRIM(cl_path)//TRIM(cl_filename) 
  • branches/UKMO/restart_datestamp/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90

    r5462 r5538  
    3030   CHARACTER(lc) ::   cn_ocerst_outdir !: restart output directory 
    3131   LOGICAL       ::   ln_rstart        !: start from (F) rest or (T) a restart file 
     32   LOGICAL       ::   ln_rstdate       !: datestamping of restarts 
    3233   LOGICAL       ::   ln_rst_list      !: output restarts at list of times (T) or by frequency (F) 
    3334   INTEGER       ::   nn_no            !: job number 
  • branches/UKMO/restart_datestamp/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90

    r5462 r5538  
    2121   USE in_out_manager  ! I/O manager 
    2222   USE iom             ! I/O module 
     23   USE ioipsl, ONLY : ju2ymds    ! for calendar 
    2324   USE eosbn2          ! equation of state            (eos bn2 routine) 
    2425   USE trdmxl_oce      ! ocean active mixed layer tracers trends variables 
     
    5455      !!---------------------------------------------------------------------- 
    5556      INTEGER, INTENT(in) ::   kt     ! ocean time-step 
     57      INTEGER             ::   iyear, imonth, iday 
     58      REAL (wp)           ::   zsec 
    5659      !! 
    5760      CHARACTER(LEN=20)   ::   clkt     ! ocean time-step deine as a character 
    5861      CHARACTER(LEN=50)   ::   clname   ! ocean output restart file name 
    59       CHARACTER(lc)       ::   clpath   ! full path to ocean output restart file 
     62      CHARACTER(LEN=150)  ::   clpath   ! full path to ocean output restart file 
    6063      !!---------------------------------------------------------------------- 
    6164      ! 
     
    8184      IF( kt == nitrst - 1 .OR. nstock == 1 .OR. ( kt == nitend .AND. .NOT. lrst_oce ) ) THEN 
    8285         IF( nitrst <= nitend .AND. nitrst > 0 ) THEN  
    83             ! beware of the format used to write kt (default is i8.8, that should be large enough...) 
    84             IF( nitrst > 999999999 ) THEN   ;   WRITE(clkt, *       ) nitrst 
    85             ELSE                            ;   WRITE(clkt, '(i8.8)') nitrst 
     86            IF ( ln_rstdate ) THEN 
     87               CALL ju2ymds( fjulday + rdttra(1) / rday, iyear, imonth, iday, zsec )            
     88               WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 
     89            ELSE 
     90               ! beware of the format used to write kt (default is i8.8, that should be large enough...) 
     91               IF( nitrst > 999999999 ) THEN   ;   WRITE(clkt, *       ) nitrst 
     92               ELSE                            ;   WRITE(clkt, '(i8.8)') nitrst 
     93               ENDIF 
    8694            ENDIF 
    8795            ! create the file 
Note: See TracChangeset for help on using the changeset viewer.