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 9953 for NEMO/branches/UKMO/dev_r9950_GO8_package/src/OCE/IOM – NEMO

Ignore:
Timestamp:
2018-07-16T15:06:16+02:00 (6 years ago)
Author:
davestorkey
Message:

UKMO GO8 package branch:

  1. Datestamping of restart files.
  2. Vertically-interpolated mixed layer depth diagnostic.
  3. Thickness weighted squared velocity components in diagnostics.
Location:
NEMO/branches/UKMO/dev_r9950_GO8_package/src/OCE/IOM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/dev_r9950_GO8_package/src/OCE/IOM/in_out_manager.F90

    r9950 r9953  
    4040   INTEGER, DIMENSION(10) :: nn_stocklist  !: restart dump times 
    4141   LOGICAL       ::   ln_mskland       !: mask land points in NetCDF outputs (costly: + ~15%) 
     42   LOGICAL       ::   ln_rstdate       !: T=> stamp output restart files with date instead of timestep 
    4243   LOGICAL       ::   ln_cfmeta        !: output additional data to netCDF files required for compliance with the CF metadata standard 
    4344   LOGICAL       ::   ln_clobber       !: clobber (overwrite) an existing file 
  • NEMO/branches/UKMO/dev_r9950_GO8_package/src/OCE/IOM/restart.F90

    r9950 r9953  
    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 
     
    5859      INTEGER, INTENT(in) ::   kt     ! ocean time-step 
    5960      !! 
     61      INTEGER             ::   iyear, imonth, iday 
     62      REAL (wp)           ::   zsec 
     63      REAL (wp)           ::   zfjulday 
    6064      CHARACTER(LEN=20)   ::   clkt     ! ocean time-step deine as a character 
    6165      CHARACTER(LEN=50)   ::   clname   ! ocean output restart file name 
     
    8791         IF( nitrst <= nitend .AND. nitrst > 0 ) THEN  
    8892            ! beware of the format used to write kt (default is i8.8, that should be large enough...) 
    89             IF( nitrst > 999999999 ) THEN   ;   WRITE(clkt, *       ) nitrst 
    90             ELSE                            ;   WRITE(clkt, '(i8.8)') nitrst 
     93            IF ( ln_rstdate ) THEN 
     94               zfjulday = fjulday + rdt / rday 
     95               IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday )   zfjulday = REAL(NINT(zfjulday),wp)   ! avoid truncation error 
     96               CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec )            
     97               WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 
     98            ELSE 
     99               IF( nitrst > 999999999 ) THEN   ;   WRITE(clkt, *       ) nitrst 
     100               ELSE                            ;   WRITE(clkt, '(i8.8)') nitrst 
     101               ENDIF 
    91102            ENDIF 
    92103            ! create the file 
Note: See TracChangeset for help on using the changeset viewer.