Skip to content

Commit

Permalink
work around overflow in ice_fem_fct as discussed with Sergey
Browse files Browse the repository at this point in the history
  • Loading branch information
trackow committed Jan 25, 2024
1 parent 2fc601a commit 8a2bfd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ice_fct.F90
Original file line number Diff line number Diff line change
Expand Up @@ -817,14 +817,14 @@ subroutine ice_fem_fct(tr_array_id, ice, partit, mesh)

flux=icepplus(n)
if (abs(flux)>0) then
icepplus(n)=min(1.0_WP,tmax(n)/flux)
icepplus(n)=min(1.0_WP,tmax(n)/max(flux,1.e-12))
else
icepplus(n)=0._WP
end if

flux=icepminus(n)
if (abs(flux)>0) then
icepminus(n)=min(1.0_WP,tmin(n)/flux)
icepminus(n)=min(1.0_WP,tmin(n)/min(flux,-1.e-12))
else
icepminus(n)=0._WP
end if
Expand Down

0 comments on commit 8a2bfd3

Please sign in to comment.