#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: release-4.0
Severity: minor Keywords: ice, FPE
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 15 months ago.

Download all attachments as: .zip

Change History (8)

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

comment:2 Changed 15 months 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 15 months ago by skeeley

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

comment:4 Changed 15 months ago by clevy

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

comment:5 Changed 15 months ago by clem

In 10785:

fix tickets #2256 and #2257

comment:6 Changed 15 months ago by clem

In 10786:

fix tickets #2256 and #2257

comment:7 Changed 11 months ago by clem

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.