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 7179 for branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/trcrst.F90 – NEMO

Ignore:
Timestamp:
2016-11-03T16:39:56+01:00 (7 years ago)
Author:
timgraham
Message:

Manually merge in changes from v3.6_extra_CMIP6_diagnostics branch.
This change also includes a change of the domain_def.xml file so XIOS2 must be used from this revision onwards

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_GO6_package/NEMOGCM/NEMO/TOP_SRC/trcrst.F90

    r6486 r7179  
    2727   USE trcnam_trp 
    2828   USE iom 
     29   USE in_out_manager , ONLY : ln_rstdate 
    2930   USE daymod 
    3031   IMPLICIT NONE 
     
    4849      !!---------------------------------------------------------------------- 
    4950      INTEGER, INTENT(in) ::   kt       ! number of iteration 
     51      INTEGER             ::   iyear, imonth, iday 
     52      REAL (wp)           ::   zsec 
    5053      ! 
    5154      CHARACTER(LEN=20)   ::   clkt     ! ocean time-step define as a character 
     
    7881      ! 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 
    7982      IF( kt == nitrst - 2*nn_dttrc .OR. nstock == nn_dttrc .OR. ( kt == nitend - nn_dttrc .AND. .NOT. lrst_trc ) ) THEN 
    80          ! beware of the format used to write kt (default is i8.8, that should be large enough) 
    81          IF( nitrst > 1.0e9 ) THEN   ;   WRITE(clkt,*       ) nitrst 
    82          ELSE                        ;   WRITE(clkt,'(i8.8)') nitrst 
     83         IF ( ln_rstdate ) THEN 
     84            CALL ju2ymds( fjulday + rdttra(1) / rday, iyear, imonth, iday, zsec )            
     85            WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 
     86         ELSE 
     87            ! beware of the format used to write kt (default is i8.8, that should be large enough...) 
     88            IF( nitrst > 999999999 ) THEN   ;   WRITE(clkt, *       ) nitrst 
     89            ELSE                            ;   WRITE(clkt, '(i8.8)') nitrst 
     90            ENDIF 
    8391         ENDIF 
    8492         ! create the file 
Note: See TracChangeset for help on using the changeset viewer.