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/SAS – NEMO

Changeset 13009 for NEMO/trunk/src/SAS


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/SAS/stpctl.F90

    r12933 r13009  
    220220      !!! WRITE(clsum, '(i'//clfmt//')') ksum                   ! this is creating a compilation error with AGRIF 
    221221      cl4 = '(i'//clfmt//')'   ;   WRITE(clsum, cl4) ksum 
    222       WRITE(clfmt, '(i1)') INT(LOG10(REAL(jpnij-1,wp))) + 1     ! how many digits to we need to write ? (we decide max = 9) 
     222      WRITE(clfmt, '(i1)') INT(LOG10(REAL(MAX(1,jpnij-1),wp))) + 1    ! how many digits to we need to write ? (we decide max = 9) 
    223223      cl4 = '(i'//clfmt//')'   ;   WRITE(clmin, cl4) kmin-1 
    224224                                   WRITE(clmax, cl4) kmax-1 
Note: See TracChangeset for help on using the changeset viewer.