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

Ignore:
Timestamp:
2015-06-26T12:30:56+02:00 (9 years ago)
Author:
dancopsey
Message:

Upgraded NEMO3,5 branch dev/hadco/vn3.5_beta_restart_date to this revision.

File:
1 edited

Legend:

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

    r5493 r5494  
    2121   USE in_out_manager  ! I/O manager 
    2222   USE iom             ! I/O module 
     23   USE ioipsl, ONLY : ju2ymds    ! for calendar 
    2324   USE eosbn2          ! equation of state            (eos bn2 routine) 
    2425   USE trdmxl_oce      ! ocean active mixed layer tracers trends variables 
     
    5556      !!---------------------------------------------------------------------- 
    5657      INTEGER, INTENT(in) ::   kt     ! ocean time-step 
     58      INTEGER             ::   iyear, imonth, iday 
     59      REAL (wp)           ::   zsec 
    5760      !! 
    5861      CHARACTER(LEN=20)   ::   clkt     ! ocean time-step deine as a character 
     
    7477      IF( kt == nitrst - 1 .OR. nstock == 1 .OR. ( kt == nitend .AND. .NOT. lrst_oce ) ) THEN 
    7578         ! 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 
     79         IF ( ln_rstdate ) THEN 
     80            CALL ju2ymds( fjulday + rdttra(1) / rday, iyear, imonth, iday, zsec )            
     81            WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 
     82         ELSE 
     83            IF( nitrst > 999999999 ) THEN   ;   WRITE(clkt, *       ) nitrst 
     84            ELSE                            ;   WRITE(clkt, '(i8.8)') nitrst 
     85            ENDIF 
    7886         ENDIF 
    7987         ! create the file 
Note: See TracChangeset for help on using the changeset viewer.