Changeset 13010


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

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

Location:
NEMO/releases/r4.0/r4.0-HEAD
Files:
2 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 
  • NEMO/releases/r4.0/r4.0-HEAD/tests/CANAL/MY_SRC/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.