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

Changeset 6151


Ignore:
Timestamp:
2015-12-21T16:08:15+01:00 (8 years ago)
Author:
jpalmier
Message:

JPALM --21-12-2015 -- add print statement on restarts writing and avoid new branch conflict...

File:
1 edited

Legend:

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

    r6149 r6151  
    5454      !!---------------------------------------------------------------------- 
    5555      INTEGER, INTENT(in) ::   kt     ! ocean time-step 
    56       INTEGER             ::   iyear, imonth, iday 
    57       REAL (wp)           ::   zsec 
    5856      !! 
    5957      CHARACTER(LEN=20)   ::   clkt     ! ocean time-step deine as a character 
    6058      CHARACTER(LEN=50)   ::   clname   ! ocean output restart file name 
    61       CHARACTER(LEN=150)  ::   clpath   ! full path to ocean output restart file 
     59      CHARACTER(lc)       ::   clpath   ! full path to ocean output restart file 
    6260      !!---------------------------------------------------------------------- 
    6361      ! 
    6462      IF( kt == nit000 ) THEN   ! default definitions 
    65          lrst_oce = .FALSE. 
     63         lrst_oce = .FALSE.    
    6664         IF( ln_rst_list ) THEN 
    6765            nrst_lst = 1 
     
    7371 
    7472      ! frequency-based restart dumping (nn_stock) 
    75       IF( .NOT. ln_rst_list .AND. MOD( kt - 1, nstock ) == 0 ) THEN 
     73      IF( .NOT. ln_rst_list .AND. MOD( kt - 1, nstock ) == 0 ) THEN    
    7674         ! we use kt - 1 and not kt - nit000 to keep the same periodicity from the beginning of the experiment 
    7775         nitrst = kt + nstock - 1                  ! define the next value of nitrst for restart writing 
    7876         IF( nitrst > nitend )   nitrst = nitend   ! make sure we write a restart at the end of the run 
    7977      ENDIF 
    80       !! 
    8178      !! JPALM test -  
    8279      IF( kt == nitrst - 1 .OR. nstock == 1 .OR. ( kt == nitend .AND. .NOT. lrst_oce ) ) THEN 
     
    9693      ! except if we write ocean restart files every time step or if an ocean restart file was writen at nitend - 1 
    9794      IF( kt == nitrst - 1 .OR. nstock == 1 .OR. ( kt == nitend .AND. .NOT. lrst_oce ) ) THEN 
    98          IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 
    99             IF ( ln_rstdate ) THEN 
    100                CALL ju2ymds( fjulday + rdttra(1) / rday, iyear, imonth, iday, zsec ) 
    101                WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 
    102             ELSE 
    103                ! beware of the format used to write kt (default is i8.8, that should be large enough...) 
    104                IF( nitrst > 999999999 ) THEN   ;   WRITE(clkt, *       ) nitrst 
    105                ELSE                            ;   WRITE(clkt, '(i8.8)') nitrst 
    106                ENDIF 
     95         IF( nitrst <= nitend .AND. nitrst > 0 ) THEN  
     96            ! beware of the format used to write kt (default is i8.8, that should be large enough...) 
     97            IF( nitrst > 999999999 ) THEN   ;   WRITE(clkt, *       ) nitrst 
     98            ELSE                            ;   WRITE(clkt, '(i8.8)') nitrst 
    10799            ENDIF 
    108100            ! create the file 
Note: See TracChangeset for help on using the changeset viewer.