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 13010 for NEMO/releases/r4.0/r4.0-HEAD/src – NEMO

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

r4.0-HEAD: bugfix, introduced in [12859], when jpnij = 1, see #2478

File:
1 edited

Legend:

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

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