Skip to content

Commit

Permalink
Update ch4Mod.F90 as in CESM2.2
Browse files Browse the repository at this point in the history
Update according to issue NorESMhub#11 , non answer changing, split 'and' statement, so that code is not crashing.
  • Loading branch information
MichaelSchulzMETNO authored Apr 27, 2021
1 parent 3595dcf commit 208ab2a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/biogeochem/ch4Mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3602,10 +3602,11 @@ subroutine ch4_tran (bounds, &
pondz = h2osfc(c) / 1000._r8 / frac_h2osfc(c) ! Assume all h2osfc corresponds to sat area
! mm / mm/m
pondres = pondres + pondz / ponddiff
else if (.not. lake .and. sat == 1 .and. frac_h2osfc(c) > 0._r8 .and. &
h2osfc(c)/frac_h2osfc(c) > capthick) then ! Assuming short-circuit logic will avoid FPE here.
! assume surface ice is impermeable
pondres = 1/smallnumber
else if (.not. lake .and. sat == 1 .and. frac_h2osfc(c) > 0._r8) then
if (h2osfc(c)/frac_h2osfc(c) > capthick) then ! Since short-circuit logic will NOT avoid FPE here.
! assume surface ice is impermeable
pondres = 1/smallnumber
end if
end if

spec_grnd_cond(c,s) = 1._r8/(1._r8/grnd_ch4_cond(c) + snowres(c) + pondres)
Expand Down

0 comments on commit 208ab2a

Please sign in to comment.