From 208ab2a85253687cf91f201186527a2aea206876 Mon Sep 17 00:00:00 2001 From: Michael Schulz Date: Tue, 27 Apr 2021 20:55:24 +0200 Subject: [PATCH] Update ch4Mod.F90 as in CESM2.2 Update according to issue #11 , non answer changing, split 'and' statement, so that code is not crashing. --- src/biogeochem/ch4Mod.F90 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/biogeochem/ch4Mod.F90 b/src/biogeochem/ch4Mod.F90 index 26dc791f72..a387e8566c 100644 --- a/src/biogeochem/ch4Mod.F90 +++ b/src/biogeochem/ch4Mod.F90 @@ -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)