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 5746 for branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90 – NEMO

Ignore:
Timestamp:
2015-09-15T18:06:54+02:00 (9 years ago)
Author:
rfurner
Message:

changes to name restart files with date instead of time stamp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/2014_Surge_Modelling/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90

    r4334 r5746  
    2525   USE divcur          ! hor. divergence and curl      (div & cur routines) 
    2626   USE sbc_ice, ONLY : lk_lim3 
     27! for ln_rstdate.... 
     28   USE ioipsl, ONLY : ju2ymds    ! for calendar 
    2729 
    2830   IMPLICIT NONE 
     
    5860      CHARACTER(LEN=20)   ::   clkt     ! ocean time-step deine as a character 
    5961      CHARACTER(LEN=50)   ::   clname   ! ice output restart file name 
     62! Included for ln_rstdate 
     63      INTEGER             ::   iyear, imonth, iday 
     64      REAL (wp)           ::   zsec 
     65 
    6066      !!---------------------------------------------------------------------- 
    6167      ! 
     
    7379      ! except if we write ocean restart files every time step or if an ocean restart file was writen at nitend - 1 
    7480      IF( kt == nitrst - 1 .OR. nstock == 1 .OR. ( kt == nitend .AND. .NOT. lrst_oce ) ) THEN 
    75          ! beware of the format used to write kt (default is i8.8, that should be large enough...) 
    76          IF( nitrst > 999999999 ) THEN   ;   WRITE(clkt, *       ) nitrst 
    77          ELSE                            ;   WRITE(clkt, '(i8.8)') nitrst 
     81! changes for ln_rstdate.... 
     82!         ! beware of the format used to write kt (default is i8.8, that should be large enough...) 
     83!         IF( nitrst > 999999999 ) THEN   ;   WRITE(clkt, *       ) nitrst 
     84!         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 > 999999999 ) THEN   ;   WRITE(clkt, *       ) nitrst 
     91              ELSE                            ;   WRITE(clkt, '(i8.8)') nitrst 
     92              ENDIF 
     93! end 
    7894         ENDIF 
    7995         ! create the file 
Note: See TracChangeset for help on using the changeset viewer.