New URL for NEMO forge!

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.
#1497 (Only part of the array e_i (and others) stored in restart file) – NEMO

Opened 9 years ago

Closed 9 years ago

Last modified 7 years ago

#1497 closed Bug (fixed)

Only part of the array e_i (and others) stored in restart file

Reported by: anders Owned by: nemo
Priority: high Milestone:
Component: LIM3 Version: trunk
Severity: Keywords: LIM* restartability


The array e_i is allocated with third dimension as 1:nlay_i+1 (NEMO/LIM_SRC_3/ice.F90) but only 1:nlay_i is stored in the restart file (NEMO/LIM_SRC_3/limrst.F90). This leads to uninitialised memory will be used in LIM3 after a restart (e,g, in NEMO/LIM_SRC_3/limtrp.F90 where third dimensions is left unspecified in summations: zei = SUM( e_i(ji,jj,:,jl) )), potentially leading to strange results or numerical exceptions. In my case there are values in the range 1E280, which soon gives NaN.

The mismatch between allocated size and stored size in restart files applies to the arrays s_i, sxe, sye, sxxe, syye, sxye as well, but I have not confirmed that these ones are actually causing problems.

This bug has been investigated with a slightly modified version of revision 4908 of trunk but relevant parts of the code seem unchanged in current trunk (r5160).

Commit History (1)


LIM3 bug fix. see ticket #1492 (forthcoming update) which also solve ticket #1497

Change History (7)

comment:1 Changed 9 years ago by clem

Concerning e_i, we only use e_i(1:nlay_i) in limtrp and (I think) in the other routines. The bug you are mentioning was corrected some time ago (especially in the trunk). However, I'll investigate the other arrays sxe, sxxe etc to check if there is an issue here.

comment:2 Changed 9 years ago by clem

Ok, a number of variables are allocated with a dimension 1:nlay_i+1 (found in both ice.F90 and thd_ice.F90), namely t_i, s_i, e_i, sxe, sye, sxxe, syye, sxye, t_i_1d, s_i_1d, q_i_1d. This is only useful for q_i_1d ( i.e. e_i used in the thermodynamics ). Nevertheless, it should not impact your simulation since the value at nlay_i+1 is never used/recorded (in the LIM3 version of the trunk).

For more clarity, one can remove useless nlay+1 dimension.

comment:3 Changed 9 years ago by clem

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

not a bug but fixed anyway in ticket #1492

comment:4 Changed 8 years ago by nicolasmartin

  • Keywords lim3 removed

comment:5 Changed 8 years ago by nicolasmartin

  • Keywords crash removed

comment:6 Changed 7 years ago by nemo

  • Keywords restartability added; restart removed

comment:7 Changed 7 years ago by nemo

  • Keywords LIM* added
Note: See TracTickets for help on using tickets.