Changeset 6028


Ignore:
Timestamp:
2015-12-09T19:02:26+01:00 (5 years ago)
Author:
jpalmier
Message:

JPALM — 09-12-2015 — modify trcrst.F90 so MEDUSA restart file name include date instead of time-step

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trcrst.F90

    r5726 r6028  
    2727   USE trcnam_trp 
    2828   USE iom 
     29   USE ioipsl, ONLY : ju2ymds    ! for calendar 
    2930   USE daymod 
    3031   !! AXY (05/11/13): need these for MEDUSA to input/output benthic reservoirs 
     
    8283      ! except if we write tracer restart files every tracer time step or if a tracer restart file was writen at nitend - 2*nn_dttrc + 1 
    8384      IF( kt == nitrst - 2*nn_dttrc .OR. nstock == nn_dttrc .OR. ( kt == nitend - nn_dttrc .AND. .NOT. lrst_trc ) ) THEN 
    84          ! beware of the format used to write kt (default is i8.8, that should be large enough) 
    85          IF( nitrst > 1.0e9 ) THEN   ;   WRITE(clkt,*       ) nitrst 
    86          ELSE                        ;   WRITE(clkt,'(i8.8)') nitrst 
     85         IF ( ln_rstdate ) THEN 
     86            CALL ju2ymds( fjulday + rdttra(1) / rday, iyear, imonth, iday, zsec ) 
     87            WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 
     88         ELSE 
     89            ! beware of the format used to write kt (default is i8.8, that should be large enough) 
     90            IF( nitrst > 1.0e9 ) THEN   ;   WRITE(clkt,*       ) nitrst 
     91            ELSE                        ;   WRITE(clkt,'(i8.8)') nitrst 
     92            ENDIF 
    8793         ENDIF 
    8894         ! create the file 
Note: See TracChangeset for help on using the changeset viewer.