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 13250 for NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/src/OCE/ICB/icbrst.F90 – NEMO

Ignore:
Timestamp:
2020-07-04T12:40:46+02:00 (4 years ago)
Author:
clem
Message:

merge with r4.0-HEAD at r13249

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/r4.0-HEAD_r12713_clem_dan_fixcpl/src/OCE/ICB/icbrst.F90

    r11536 r13250  
    189189      ! 
    190190      INTEGER ::   jn   ! dummy loop index 
     191      INTEGER ::   idg  ! number of digits 
    191192      INTEGER ::   ix_dim, iy_dim, ik_dim, in_dim 
    192193      CHARACTER(len=256)     :: cl_path 
    193194      CHARACTER(len=256)     :: cl_filename 
     195      CHARACTER(len=8  )     :: cl_kt 
     196      CHARACTER(LEN=12 )     :: clfmt            ! writing format 
    194197      TYPE(iceberg), POINTER :: this 
    195198      TYPE(point)  , POINTER :: pt 
     
    206209         cl_path = TRIM(cn_ocerst_outdir) 
    207210         IF( cl_path(LEN_TRIM(cl_path):) /= '/' ) cl_path = TRIM(cl_path) // '/' 
     211         WRITE(cl_kt, '(i8.8)') kt 
     212         cl_filename = TRIM(cexper)//"_icebergs_"//cl_kt//"_restart" 
    208213         IF( lk_mpp ) THEN 
    209             WRITE(cl_filename,'(A,"_icebergs_",I8.8,"_restart_",I4.4,".nc")') TRIM(cexper), kt, narea-1 
     214            idg = MAX( INT(LOG10(REAL(MAX(1,jpnij-1),wp))) + 1, 4 )          ! how many digits to we need to write? min=4, max=9 
     215            WRITE(clfmt, "('(a,a,i', i1, '.', i1, ',a)')") idg, idg          ! '(a,a,ix.x,a)' 
     216            WRITE(cl_filename,  clfmt) TRIM(cl_filename), '_', narea-1, '.nc' 
    210217         ELSE 
    211             WRITE(cl_filename,'(A,"_icebergs_",I8.8,"_restart.nc")') TRIM(cexper), kt 
     218            WRITE(cl_filename,'(a,a)') TRIM(cl_filename),               '.nc' 
    212219         ENDIF 
    213220         IF ( lwp .AND. nn_verbose_level >= 0) WRITE(numout,'(2a)') 'icebergs, write_restart: creating ',  & 
Note: See TracChangeset for help on using the changeset viewer.