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 10765 for NEMO/branches/UKMO/r8395_restart_datestamp/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90 – NEMO

Ignore:
Timestamp:
2019-03-15T13:14:30+01:00 (5 years ago)
Author:
jcastill
Message:

First set of changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/r8395_restart_datestamp/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90

    r10758 r10765  
    2222   USE sbc_ice        ! Surface boundary condition: ice fields 
    2323   USE in_out_manager ! I/O manager 
     24   USE ioipsl  , ONLY : ju2ymds    ! for calendar 
    2425   USE iom            ! I/O library 
    2526   USE lib_mpp        ! MPP library 
     
    5152      !! ** purpose  :   output of sea-ice variable in a netcdf file 
    5253      !!---------------------------------------------------------------------- 
     54      INTEGER             ::   iyear, imonth, iday  
     55      REAL (wp)           ::   zsec  
     56      REAL (wp)           ::   zfjulday      !! 
    5357      INTEGER, INTENT(in) ::   kt       ! number of iteration 
    5458      ! 
     
    6771         IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 
    6872            ! beware of the format used to write kt (default is i8.8, that should be large enough...) 
    69             IF( nitrst > 99999999 ) THEN   ;   WRITE(clkt, *       ) nitrst 
    70             ELSE                           ;   WRITE(clkt, '(i8.8)') nitrst 
     73            IF ( ln_rstdate ) THEN  
     74               zfjulday = fjulday + rdt / rday  
     75               IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday )   zfjulday = REAL(NINT(zfjulday),wp)   ! avoid truncation error  
     76               CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec )             
     77               WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday   
     78            ELSE  
     79              IF( nitrst > 999999999 ) THEN     
     80                WRITE(clkt, *       ) nitrst  
     81              ELSE                
     82                WRITE(clkt, '(i8.8)') nitrst  
     83              ENDIF 
    7184            ENDIF 
    7285            ! create the file 
Note: See TracChangeset for help on using the changeset viewer.