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 12660 for NEMO/branches/UKMO/NEMO_4.0.2_GO8_package/src/OCE/ICB/icbrst.F90 – NEMO

Ignore:
Timestamp:
2020-04-03T13:09:33+02:00 (4 years ago)
Author:
cguiavarch
Message:

UKMO/NEMO_4.0.2_GO8_package: copy over changes from NEMO_4.0.1_GO8_package branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.2_GO8_package/src/OCE/ICB/icbrst.F90

    r12658 r12660  
    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 
     
    190191      INTEGER ::   jn   ! dummy loop index 
    191192      INTEGER ::   ix_dim, iy_dim, ik_dim, in_dim 
    192       CHARACTER(len=256)     :: cl_path 
    193       CHARACTER(len=256)     :: cl_filename 
     193      INTEGER             ::   iyear, imonth, iday 
     194      REAL (wp)           ::   zsec 
     195      REAL (wp)           ::   zfjulday 
     196      CHARACTER(len=256)  :: cl_path 
     197      CHARACTER(len=256)  :: cl_filename 
     198      CHARACTER(LEN=20)   ::   clkt     ! ocean time-step deine as a character 
    194199      TYPE(iceberg), POINTER :: this 
    195200      TYPE(point)  , POINTER :: pt 
     
    206211         cl_path = TRIM(cn_ocerst_outdir) 
    207212         IF( cl_path(LEN_TRIM(cl_path):) /= '/' ) cl_path = TRIM(cl_path) // '/' 
     213         IF ( ln_rstdate ) THEN 
     214            zfjulday = fjulday + rdt / rday 
     215            IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday )   zfjulday = REAL(NINT(zfjulday),wp)   ! avoid truncation error 
     216            CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec )            
     217            WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 
     218         ELSE 
     219            IF( kt > 999999999 ) THEN   ;   WRITE(clkt, *       ) kt 
     220            ELSE                        ;   WRITE(clkt, '(i8.8)') kt 
     221            ENDIF 
     222         ENDIF 
    208223         IF( lk_mpp ) THEN 
    209             WRITE(cl_filename,'(A,"_icebergs_",I8.8,"_restart_",I4.4,".nc")') TRIM(cexper), kt, narea-1 
     224            WRITE(cl_filename,'(A,"_icebergs_",A,"_restart_",I4.4,".nc")') TRIM(cexper), TRIM(ADJUSTL(clkt)), narea-1 
    210225         ELSE 
    211             WRITE(cl_filename,'(A,"_icebergs_",I8.8,"_restart.nc")') TRIM(cexper), kt 
     226            WRITE(cl_filename,'(A,"_icebergs_",A,"_restart.nc")') TRIM(cexper), TRIM(ADJUSTL(clkt)) 
    212227         ENDIF 
    213228         IF ( lwp .AND. nn_verbose_level >= 0) WRITE(numout,'(2a)') 'icebergs, write_restart: creating ',  & 
Note: See TracChangeset for help on using the changeset viewer.