Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#1819 closed Bug (fixed)

Wrong names in LIM3 restarts with number of ice categories > 9

Reported by: jchanut Owned by: jchanut
Priority: low Milestone:
Component: LIM3 Version: release-3.6
Severity: Keywords: LIM* categories ice restartability



If the number of ice categories jpl ≥ 10, restarts are not properly written or read. Model does not stop but inevitably blows up.


Problem comes from the systematic write in limrst.F90 of a I1 integer (ice category number) in a temporary character variable like this:

DO jl = 1, jpl

  WRITE(zchar,'(I1)') jl
  znam = 'v_i'//'_htc'//zchar
  z2d(:,:) = v_i(:,:,jl)
  CALL iom_rstput( iter, nitrst, numriw, znam , z2d )


something like this:

IF ( jl<10 ) THEN ; WRITE(zchar,'(I1)') jl ; ELSE ; WRITE(zchar,'(I2)') jl ; ENDIF

Commit History (1)


fix ice restart for categories>9, see ticket #1819

Change History (8)

comment:1 Changed 4 years ago by clem

A simpler solution is to declare zchar as length 2, then do the following

  CHARACTER(len=2)  ::   zchar, zchar1}}}

  WRITE(zchar,'(I2.2)') jl

  znam = 'v_i'//'_htc'//zchar

This is done in the "merge" version of NEMO but not in 3.6 stable since it has implications for experiments starting from an already existing restart. Not sure we can change the restarts in 3.6

comment:2 Changed 4 years ago by jchanut

ahem, not sure i got it. I just suggest to stick to the current definition, but simply allow having more than 10 categories :)

comment:3 Changed 4 years ago by clem

It is corrected at r7772 as follows:

CHARACTER(len=2)  ::   zchar, zchar1
WRITE(zchar,'(I2)') jl
znam = 'v_i'//'_htc'//TRIM(ADJUSTL(zchar))

comment:4 Changed 4 years ago by clem

  • Resolution set to fixed
  • Status changed from new to closed

comment:5 Changed 3 years ago by nemo

  • Keywords restartability added; restart removed

comment:6 Changed 3 years ago by nemo

  • Keywords LIM* added

comment:7 Changed 3 years ago by nemo

  • Keywords release-3.6* added

comment:8 Changed 3 years ago by nemo

  • Keywords release-3.6* removed
Note: See TracTickets for help on using tickets.