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.
#2257 (Floating point overflow linked to snow thickness in SI3) – NEMO

Opened 5 years ago

Closed 5 years ago

Last modified 2 years ago

#2257 closed Defect (fixed)

Floating point overflow linked to snow thickness in SI3

Reported by: skeeley Owned by: clem
Priority: low Milestone:
Component: SI3 Version: v4.0
Severity: minor Keywords: FPE ice v4.0
Cc:

Description

Context

We are having floating point exceptions in rare occasions in icethd.F90.

Analysis

The floating point exceptions happens in the following:

     WHERE( h_s_1d(1:npti)>0._wp ) e_s_1d(1:npti,jk) = e_s_1d(1:npti,jk) / (h_s_1d(1:npti) * a_i_1d(1:npti)) * nlay_s

where h_s_1d was extremely small (~1e-300 but >0.0) but a_i_1d identical to 0.0 causing a FPE.

Recommendation

While we can add a hack to check for very small values here to get the code running (and a similar hack in icedyn_adv_umx.F90) to make the code run then we suspect that this may be fixed more elegantly elsewhere by someone who knows the code better...
Happy to test potential fixes!

Commit History (2)

ChangesetAuthorTimeChangeLog
10786clem2019-03-20T19:59:24+01:00

fix tickets #2256 and #2257

10785clem2019-03-20T19:58:40+01:00

fix tickets #2256 and #2257

Attachments (1)

icethd_dh.F90 (35.8 KB) - added by clem 5 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 5 years ago by skeeley

  • Summary changed from Floating point overflow linked snow thickness in SI3 to Floating point overflow linked to snow thickness in SI3

Changed 5 years ago by clem

comment:2 Changed 5 years ago by clem

I have modified one thermodynamic routine(attached here), so that snow thickness becomes 0 when ice completely disappears (I also made sure that we still conserve mass and heat). I do not think other routines should be changed.
However I cannot reproduce your FPE error. Could you try the routine before I commit it?
Thanks

comment:3 Changed 5 years ago by skeeley

Thanks Clem!
We have the code in for testing now - will let you know.

comment:4 Changed 5 years ago by clevy

  • Owner changed from systeam to clem
  • Status changed from new to assigned

comment:5 Changed 5 years ago by clem

In 10785:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:6 Changed 5 years ago by clem

In 10786:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:7 Changed 5 years ago by clem

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

comment:8 Changed 2 years ago by nemo

  • Keywords v4.0 added
Note: See TracTickets for help on using tickets.