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 10897 for NEMO/branches/UKMO/NEMO_4.0_GO8_package/src/OCE/IOM/restart.F90 – NEMO

Ignore:
Timestamp:
2019-04-26T12:17:40+02:00 (5 years ago)
Author:
davestorkey
Message:

UKMO/NEMO_4.0_GO8_package branch: Copy over changes from previous version of the branch.

  1. Implement datestamping of restarts.
  2. Local diagnostics, particularly vertically-interpolated MLD diagnostics.
  3. Restrict write-out in tra_bbl_init with IF(lwp).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0_GO8_package/src/OCE/IOM/restart.F90

    r10888 r10897  
    2727   USE in_out_manager  ! I/O manager 
    2828   USE iom             ! I/O module 
     29   USE ioipsl, ONLY : ju2ymds    ! for calendar 
    2930   USE diurnal_bulk 
    3031   USE lib_mpp         ! distribued memory computing library 
     
    5960      INTEGER, INTENT(in) ::   kt     ! ocean time-step 
    6061      !! 
     62      INTEGER             ::   iyear, imonth, iday 
     63      REAL (wp)           ::   zsec 
     64      REAL (wp)           ::   zfjulday 
    6165      CHARACTER(LEN=20)   ::   clkt     ! ocean time-step deine as a character 
    6266      CHARACTER(LEN=50)   ::   clname   ! ocean output restart file name 
     
    8892         IF( nitrst <= nitend .AND. nitrst > 0 ) THEN  
    8993            ! 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 
     94            IF ( ln_rstdate ) THEN 
     95               zfjulday = fjulday + rdt / rday 
     96               IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday )   zfjulday = REAL(NINT(zfjulday),wp)   ! avoid truncation error 
     97               CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec )            
     98               WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 
     99            ELSE 
     100               IF( nitrst > 999999999 ) THEN   ;   WRITE(clkt, *       ) nitrst 
     101               ELSE                            ;   WRITE(clkt, '(i8.8)') nitrst 
     102               ENDIF 
    92103            ENDIF 
    93104            ! create the file 
Note: See TracChangeset for help on using the changeset viewer.