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 13061 for NEMO/releases/r4.0/r4.0-HEAD/src/OCE/LBC/lib_mpp.F90 – NEMO

Ignore:
Timestamp:
2020-06-08T15:20:11+02:00 (4 years ago)
Author:
smasson
Message:

r4.0-HEAD: fix max number of digits for the cpu number in filename, see #2424

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/releases/r4.0/r4.0-HEAD/src/OCE/LBC/lib_mpp.F90

    r13013 r13061  
    11901190      ! 
    11911191      CHARACTER(len=80) ::   clfile 
     1192      CHARACTER(LEN=10) ::   clfmt            ! writing format 
    11921193      INTEGER           ::   iost 
     1194      INTEGER           ::   idg              ! number of digits 
    11931195      !!---------------------------------------------------------------------- 
    11941196      ! 
     
    11971199      clfile = TRIM(cdfile) 
    11981200      IF( PRESENT( karea ) ) THEN 
    1199          IF( karea > 1 )   WRITE(clfile, "(a,'_',i4.4)") TRIM(clfile), karea-1 
     1201         IF( karea > 1 ) THEN 
     1202            ! Warning: jpnij is maybe not already defined when calling ctl_opn -> use mppsize instead of jpnij 
     1203            idg = MAX( INT(LOG10(REAL(MAX(1,mppsize-1),wp))) + 1, 4 )      ! how many digits to we need to write? min=4, max=9 
     1204            WRITE(clfmt, "('(a,a,i', i1, '.', i1, ')')") idg, idg          ! '(a,a,ix.x)' 
     1205            WRITE(clfile, clfmt) TRIM(clfile), '_', karea-1 
     1206         ENDIF 
    12001207      ENDIF 
    12011208#if defined key_agrif 
Note: See TracChangeset for help on using the changeset viewer.