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 15080 for NEMO/branches/UKMO/NEMO_r4.2RC_GO8_package/src/ICE/icerst.F90 – NEMO

Ignore:
Timestamp:
2021-07-05T16:19:12+02:00 (3 years ago)
Author:
ayoung
Message:

GO8 package merge, essential changes only. Ticket #2648.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_r4.2RC_GO8_package/src/ICE/icerst.F90

    r14239 r15080  
    2727   USE in_out_manager ! I/O manager 
    2828   USE iom            ! I/O manager library 
     29   USE ioipsl  , ONLY : ju2ymds                     ! for calendar 
    2930   USE lib_mpp        ! MPP library 
    3031   USE lib_fortran    ! fortran utilities (glob_sum + no signed zero) 
     
    5253      INTEGER, INTENT(in) ::   kt       ! number of iteration 
    5354      ! 
     55      INTEGER             ::   iyear, imonth, iday 
     56      REAL (wp)           ::   zsec 
     57      REAL (wp)           ::   zfjulday 
    5458      CHARACTER(len=20)   ::   clkt     ! ocean time-step define as a character 
    5559      CHARACTER(len=50)   ::   clname   ! ice output restart file name 
     
    6872         IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 
    6973            ! beware of the format used to write kt (default is i8.8, that should be large enough...) 
    70             IF( nitrst > 99999999 ) THEN   ;   WRITE(clkt, *       ) nitrst 
    71             ELSE                           ;   WRITE(clkt, '(i8.8)') nitrst 
     74            IF ( ln_rstdate ) THEN 
     75               zfjulday = fjulday + (2*nn_fsbc+1)*rdt / rday 
     76               IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday )   zfjulday = REAL(NINT(zfjulday),wp)   ! avoid truncation error 
     77               CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec )            
     78               WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 
     79            ELSE 
     80               IF( nitrst > 99999999 ) THEN   ;   WRITE(clkt, *       ) nitrst 
     81               ELSE                           ;   WRITE(clkt, '(i8.8)') nitrst 
     82               ENDIF 
    7283            ENDIF 
    7384            ! create the file 
Note: See TracChangeset for help on using the changeset viewer.