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.
#1819 (Wrong names in LIM3 restarts with number of ice categories > 9) – NEMO

Opened 7 years ago

Closed 7 years ago

Last modified 2 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: v3.6
Severity: Keywords: LIM* categories ice restartability v3.6
Cc:

Description

Context

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

Analysis

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 )
...

Fix

something like this:

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

Commit History (1)

ChangesetAuthorTimeChangeLog
7772clem2017-03-09T11:50:21+01:00

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

Change History (9)

comment:1 Changed 7 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 7 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 7 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 7 years ago by clem

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

comment:5 Changed 6 years ago by nemo

  • Keywords restartability added; restart removed

comment:6 Changed 6 years ago by nemo

  • Keywords LIM* added

comment:7 Changed 6 years ago by nemo

  • Keywords release-3.6* added

comment:8 Changed 6 years ago by nemo

  • Keywords release-3.6* removed

comment:9 Changed 2 years ago by nemo

  • Keywords v3.6 added
Note: See TracTickets for help on using tickets.