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 10843 for NEMO/branches/UKMO/dev_r10037_GPU/src/ICE/icerst.F90 – NEMO

Ignore:
Timestamp:
2019-04-05T16:01:32+02:00 (5 years ago)
Author:
andmirek
Message:

ticket #2197 merge with dev_r9950_GO8_package at 10320

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/dev_r10037_GPU/src/ICE/icerst.F90

    r9950 r10843  
    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) 
     
    3435   !! NEMO/ICE 4.0 , NEMO Consortium (2018) 
    3536   !! $Id$ 
    36    !! Software governed by the CeCILL licence     (./LICENSE) 
     37   !! Software governed by the CeCILL license (see ./LICENSE) 
    3738   !!---------------------------------------------------------------------- 
    3839CONTAINS 
     
    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.