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 13009 for NEMO/trunk/src/OCE/IOM/iom_nf90.F90 – NEMO

Ignore:
Timestamp:
2020-06-03T08:35:19+02:00 (4 years ago)
Author:
smasson
Message:

trunk: bugfix, introduced in [12933], when jpnij = 1, see 2477

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/src/OCE/IOM/iom_nf90.F90

    r12933 r13009  
    111111         IF( ldwrt ) THEN              !* the file should be open in write mode so we create it... 
    112112            IF( jpnij > 1 ) THEN 
    113                idg = MAX( INT(LOG10(REAL(jpnij-1,wp))) + 1, 4 )          ! how many digits to we need to write? min=4, max=9 
    114                WRITE(clfmt, "('(a,a,i', i1, '.', i1, ',a)')") idg, idg   ! '(a,a,ix.x,a)' 
     113               idg = MAX( INT(LOG10(REAL(MAX(1,jpnij-1),wp))) + 1, 4 )          ! how many digits to we need to write? min=4, max=9 
     114               WRITE(clfmt, "('(a,a,i', i1, '.', i1, ',a)')") idg, idg          ! '(a,a,ix.x,a)' 
    115115               WRITE(cltmp,clfmt) cdname(1:iln-1), '_', narea-1, '.nc' 
    116116               cdname = TRIM(cltmp) 
Note: See TracChangeset for help on using the changeset viewer.