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 6741 – NEMO

Changeset 6741


Ignore:
Timestamp:
2016-06-24T15:51:52+02:00 (8 years ago)
Author:
malcolmroberts
Message:

Fix the date stamp for the age tracer restart file (use UKMO/restart_datestamp code)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_GO6_package_MEDUSA_extra_CMIP6_diags/NEMOGCM/NEMO/TOP_SRC/trcrst.F90

    r6737 r6741  
    5151      INTEGER             ::   iyear, imonth, iday 
    5252      REAL (wp)           ::   zsec 
     53      REAL (wp)           ::   zfjulday 
    5354      ! 
    5455      CHARACTER(LEN=20)   ::   clkt     ! ocean time-step define as a character 
     
    8283      IF( kt == nitrst - 2*nn_dttrc .OR. nstock == nn_dttrc .OR. ( kt == nitend - nn_dttrc .AND. .NOT. lrst_trc ) ) THEN 
    8384         IF ( ln_rstdate ) THEN 
    84             CALL ju2ymds( fjulday + rdttra(1) / rday, iyear, imonth, iday, zsec )            
     85!            CALL ju2ymds( fjulday + rdttra(1) / rday, iyear, imonth, iday, zsec )            
     86            zfjulday = fjulday + rdttra(1) / rday 
     87            IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday )   zfjulday = REAL(NINT(zfjulday),wp)   ! avoid truncation error 
     88            CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec )           
     89 
    8590            WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 
    8691         ELSE 
Note: See TracChangeset for help on using the changeset viewer.