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 6160 – NEMO

Changeset 6160


Ignore:
Timestamp:
2015-12-22T15:32:58+01:00 (8 years ago)
Author:
jpalmier
Message:

JPALM -- 22-12-2015 -- adapt trc restart name with the good date

Location:
branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90

    r6154 r6160  
    7676         IF( nitrst > nitend )   nitrst = nitend   ! make sure we write a restart at the end of the run 
    7777      ENDIF 
    78       !! JPALM test -  
    79       IF( kt == nitrst - 1 .OR. nstock == 1 .OR. ( kt == nitend .AND. .NOT. lrst_oce ) ) THEN 
    80          IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 
    81             IF ( ln_rstdate ) THEN 
    82             WRITE(numout,*) 'JPALM - we want all informations for restart file name -- ' 
    83             WRITE(numout,*) 'JPALM - 1 - conditions for openning rst file :' 
    84             WRITE(numout,*) 'JPALM - oce restart kt = ',kt,'==', nitrst - 1 
    85             WRITE(numout,*) 'JPALM - oce restart nstock = ',nstock,'== 1 ' 
    86             WRITE(numout,*) 'JPALM - oce restart kt = ',kt,'==',nitend 
    87             WRITE(numout,*) 'JPALM - oce restart nitrst = ',nitrst,'<=',nitend,' and > 0' 
    88             WRITE(numout,*) '-----------------------------' 
    89             CALL ju2ymds( fjulday + rdttra(1) / rday, iyear, imonth, iday, zsec ) 
    90             WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 
    91             WRITE(numout,*) 'JPALM - 2 - date calculated by ju2ymds: ' 
    92             WRITE(numout,*) 'JPALM - oce restart fjulday = ',fjulday 
    93             WRITE(numout,*) 'JPALM - oce restart rdttra/rday  = ',rdttra(1)/rday 
    94             WRITE(numout,*) 'JPALM - oce restart rdttra  = ',rdttra(1) 
    95             WRITE(numout,*) 'JPALM - oce restart rday = ',rday 
    96             WRITE(numout,*) 'JPALM - oce restart iyear = ',iyear 
    97             WRITE(numout,*) 'JPALM - oce restart imonth = ',imonth 
    98             WRITE(numout,*) 'JPALM - oce restart iday = ',iday 
    99  
    100             ENDIF 
    101          ENDIF 
    102       ENDIF 
    103       !! 
    10478      ! to get better performances with NetCDF format: 
    10579      ! we open and define the ocean restart file one time step before writing the data (-> at nitrst - 1) 
  • branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trcrst.F90

    r6155 r6160  
    8686      IF( kt == nitrst - 2*nn_dttrc .OR. nstock == nn_dttrc .OR. ( kt == nitend - nn_dttrc .AND. .NOT. lrst_trc ) ) THEN 
    8787         IF ( ln_rstdate ) THEN 
    88             WRITE(numout,*) '-----------------------------' 
    89             WRITE(numout,*) 'JPALM - we want all informations for restart file name -- '  
    90             WRITE(numout,*) 'JPALM - 1 - conditions for openning rst file :' 
    91             WRITE(numout,*) 'JPALM - trc restart kt = ',kt,'==', nitrst - 2*nn_dttrc 
    92             WRITE(numout,*) 'JPALM - trc restart nstock = ',nstock,'==',nn_dttrc 
    93             WRITE(numout,*) 'JPALM - trc restart kt = ',kt,'==',nitend - nn_dttrc 
    94             WRITE(numout,*) '-----------------------------' 
     88            !! JPALM -- 22-12-2015 -- modif to get the good date on restart trc file name 
     89            !!                     -- the condition to open the rst file is not the same than for the dynamic rst. 
     90            !!                     -- here it - for an obscure reason - is open 2 time-step before the restart writing process 
     91            !!                     instead of 1. 
     92            !!                     -- i am not sure if someone forgot +1 in the if loop condition as 
     93            !!                     it is writen in all comments nitrst - 2*nn_dttrc + 1 and the condition is nitrst - 2*nn_dttrc 
     94            !!                     -- nevertheless we didn't wanted to broke something already working  
     95            !!                     and just adapted the part we added. 
     96            !!                     -- So instead of calling ju2ymds( fjulday + (rdttra(1)) .... 
     97            !!                     we call ju2ymds( fjulday + (2*rdttra(1)) ..... 
     98            !!--------------------------------------------------------------------       
    9599            CALL ju2ymds( fjulday + (2*rdttra(1)) / rday, iyear, imonth, iday, zsec ) 
    96100            WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 
    97             WRITE(numout,*) 'JPALM - 2 - date calculated by ju2ymds: ' 
    98             WRITE(numout,*) 'JPALM - trc restart fjulday = ',fjulday 
    99             WRITE(numout,*) 'JPALM - trc restart rdttra/rday  = ',rdttra(1)/rday 
    100             WRITE(numout,*) 'JPALM - trc restart rdttra  = ',rdttra(1) 
    101             WRITE(numout,*) 'JPALM - trc restart rday = ',rday 
    102             WRITE(numout,*) 'JPALM - trc restart iyear = ',iyear 
    103             WRITE(numout,*) 'JPALM - trc restart imonth = ',imonth 
    104             WRITE(numout,*) 'JPALM - trc restart iday = ',iday 
    105101         ELSE 
    106102            ! beware of the format used to write kt (default is i8.8, that should be large enough) 
Note: See TracChangeset for help on using the changeset viewer.