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 6244 for branches/NERC/dev_r5518_NOC_unchanged – NEMO

Ignore:
Timestamp:
2016-01-13T17:31:02+01:00 (8 years ago)
Author:
jpalmier
Message:

JPALM -- 13-01-2016 -- MEDUSA debugg

File:
1 edited

Legend:

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

    r6240 r6244  
    2727   USE trcnam_trp 
    2828   USE iom 
     29   USE ioipsl, ONLY : ju2ymds    ! for calendar 
    2930   USE daymod 
    3031   IMPLICIT NONE 
     
    7879      ! 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 
    7980      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 
     81         IF ( ln_rstdate ) THEN 
     82            !! JPALM -- 22-12-2015 -- modif to get the good date on restart trc file name 
     83            !!                     -- the condition to open the rst file is not the same than for the dynamic rst. 
     84            !!                     -- here it - for an obscure reason - is open 2 time-step before the restart writing process 
     85            !!                     instead of 1. 
     86            !!                     -- i am not sure if someone forgot +1 in the if loop condition as 
     87            !!                     it is writen in all comments nitrst -2*nn_dttrc + 1 and the condition is  
     88            !!                     nitrst - 2*nn_dttrc 
     89            !!                     -- nevertheless we didn't wanted to broke something already working  
     90            !!                     and just adapted the part we added. 
     91            !!                     -- So instead of calling ju2ymds( fjulday + (rdttra(1))  
     92            !!                     we call ju2ymds( fjulday + (2*rdttra(1))  
     93            !!--------------------------------------------------------------------       
     94            CALL ju2ymds( fjulday + (2*rdttra(1)) / rday, iyear, imonth, iday, zsec ) 
     95            WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 
     96         ELSE 
     97            ! beware of the format used to write kt (default is i8.8, that should be large enough) 
     98            IF( nitrst > 1.0e9 ) THEN   ;   WRITE(clkt,*       ) nitrst 
     99            ELSE                        ;   WRITE(clkt,'(i8.8)') nitrst 
     100            ENDIF 
    83101         ENDIF 
    84102         ! create the file 
Note: See TracChangeset for help on using the changeset viewer.