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 10280 for NEMO/branches/UKMO/2018_NEMO4_beta_mirror_10037_Benchmark/src/OCE/ICB/icbrst.F90 – NEMO

Ignore:
Timestamp:
2018-11-07T12:06:07+01:00 (5 years ago)
Author:
andmirek
Message:

GMED 425 merge dev_r9950_GO8_package

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/2018_NEMO4_beta_mirror_10037_Benchmark/src/OCE/ICB/icbrst.F90

    r9950 r10280  
    2525   USE netcdf         ! netcdf routines for IO 
    2626   USE iom 
     27   USE ioipsl, ONLY : ju2ymds    ! for calendar 
    2728   USE icb_oce        ! define iceberg arrays 
    2829   USE icbutl         ! iceberg utility routines 
     
    159160      INTEGER ::   jn   ! dummy loop index 
    160161      INTEGER ::   ix_dim, iy_dim, ik_dim, in_dim 
    161       CHARACTER(len=256)     :: cl_path 
    162       CHARACTER(len=256)     :: cl_filename 
     162      INTEGER             ::   iyear, imonth, iday 
     163      REAL (wp)           ::   zsec 
     164      REAL (wp)           ::   zfjulday 
     165      CHARACTER(len=256)  :: cl_path 
     166      CHARACTER(len=256)  :: cl_filename 
     167      CHARACTER(LEN=20)   ::   clkt     ! ocean time-step deine as a character 
    163168      TYPE(iceberg), POINTER :: this 
    164169      TYPE(point)  , POINTER :: pt 
     
    175180         cl_path = TRIM(cn_ocerst_outdir) 
    176181         IF( cl_path(LEN_TRIM(cl_path):) /= '/' ) cl_path = TRIM(cl_path) // '/' 
     182         IF ( ln_rstdate ) THEN 
     183            zfjulday = fjulday + rdt / rday 
     184            IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday )   zfjulday = REAL(NINT(zfjulday),wp)   ! avoid truncation error 
     185            CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec )            
     186            WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 
     187         ELSE 
     188            IF( kt > 999999999 ) THEN   ;   WRITE(clkt, *       ) kt 
     189            ELSE                        ;   WRITE(clkt, '(i8.8)') kt 
     190            ENDIF 
     191         ENDIF 
    177192         IF( lk_mpp ) THEN 
    178             WRITE(cl_filename,'(A,"_icebergs_",I8.8,"_restart_",I4.4,".nc")') TRIM(cexper), kt, narea-1 
     193            WRITE(cl_filename,'(A,"_icebergs_",A,"_restart_",I4.4,".nc")') TRIM(cexper), TRIM(ADJUSTL(clkt)), narea-1 
    179194         ELSE 
    180             WRITE(cl_filename,'(A,"_icebergs_",I8.8,"_restart.nc")') TRIM(cexper), kt 
     195            WRITE(cl_filename,'(A,"_icebergs_",A,"_restart.nc")') TRIM(cexper), TRIM(ADJUSTL(clkt)) 
    181196         ENDIF 
    182197         IF ( lwp .AND. nn_verbose_level >= 0) WRITE(numout,'(2a)') 'icebergs, write_restart: creating ',  & 
Note: See TracChangeset for help on using the changeset viewer.