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/ICE – 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/ICE/icerst.F90

    r10888 r10897  
    2121   USE in_out_manager ! I/O manager 
    2222   USE iom            ! I/O manager library 
     23   USE ioipsl, ONLY : ju2ymds    ! for calendar 
    2324   USE lib_mpp        ! MPP library 
    2425   USE lib_fortran    ! fortran utilities (glob_sum + no signed zero) 
     
    4647      INTEGER, INTENT(in) ::   kt       ! number of iteration 
    4748      ! 
     49      INTEGER             ::   iyear, imonth, iday 
     50      REAL (wp)           ::   zsec 
     51      REAL (wp)           ::   zfjulday 
    4852      CHARACTER(len=20)   ::   clkt     ! ocean time-step define as a character 
    4953      CHARACTER(len=50)   ::   clname   ! ice output restart file name 
     
    6064         IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 
    6165            ! beware of the format used to write kt (default is i8.8, that should be large enough...) 
    62             IF( nitrst > 99999999 ) THEN   ;   WRITE(clkt, *       ) nitrst 
    63             ELSE                           ;   WRITE(clkt, '(i8.8)') nitrst 
     66            IF ( ln_rstdate ) THEN 
     67               zfjulday = fjulday + (2*nn_fsbc+1)*rdt / rday 
     68               IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday )   zfjulday = REAL(NINT(zfjulday),wp)   ! avoid truncation error 
     69               CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec )            
     70               WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 
     71            ELSE 
     72               IF( nitrst > 99999999 ) THEN   ;   WRITE(clkt, *       ) nitrst 
     73               ELSE                           ;   WRITE(clkt, '(i8.8)') nitrst 
     74               ENDIF 
    6475            ENDIF 
    6576            ! create the file 
Note: See TracChangeset for help on using the changeset viewer.