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.
#1546 (Floating point overflow in ice_lim_flx) – NEMO

Opened 9 years ago

Closed 9 years ago

#1546 closed Bug (fixed)

Floating point overflow in ice_lim_flx

Reported by: ufla Owned by: nemo
Priority: low Milestone:
Component: OCE Version: trunk
Severity: Keywords:
Cc:

Description

I got occasional floating point overflows in the second line (setting pevap_ice) of this loop in sbcice_lim.F90:

DO jl = 1, jpl
  pqns_ice (:,:,jl) = pqns_ice (:,:,jl) + pdqn_ice  (:,:,jl) * ( ptn_ice(:,:,jl) - ztem_m(:,:) )
  pevap_ice(:,:,jl) = pevap_ice(:,:,jl) + pdevap_ice(:,:,jl) * ( ptn_ice(:,:,jl) - ztem_m(:,:) )
  pqsr_ice (:,:,jl) = pqsr_ice (:,:,jl) * ( 1._wp - palb_ice(:,:,jl) ) / ( 1._wp - zalb_m(:,:) ) 
END DO

Testing further, it turns out that I can make this crash reproducible by initialising all allocatable fields in sbc_ice.F90 (function sbc_ice_alloc) to HUGE. Just setting evap_ice didn't reproduce the crash reliably.

I expect that some of the arrays from sbc_ice_alloc are used before initialisation, at least for k_limflx==2. I'm using revision 5456 of the trunk.

I'll do some further test to find out which array is causing the problem.

Commit History (0)

(No commits)

Change History (5)

comment:1 Changed 9 years ago by ufla

This is just to confirm: If I initialise all arrays in sbc_ice_alloc to HUGE, it crashes reliably. If I initialise them to ZERO, it runs reliably fine. Now we just need to find out which of the 21 arrays...

comment:2 Changed 9 years ago by ufla

It's pdevap_ice that is not initialised (confirmed with TotalView? debugger).

Version 0, edited 9 years ago by ufla (next)

comment:3 Changed 9 years ago by clem

Thanks Uwe,
it should be fixed at revision 5471. I am waiting for your approval to close this ticket, and I'll have a look at your other ticket #1547 on the same topic.

comment:4 Changed 9 years ago by ufla

Thanks for your response! The fix seems to do the trick, so you may close the ticket.

comment:5 Changed 9 years ago by clem

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