From a9eef2ce57970d86f51f08cf7ea5eee1c4c56793 Mon Sep 17 00:00:00 2001 From: Erik Kluzek Date: Sat, 28 Aug 2021 23:57:14 -0600 Subject: [PATCH] Skip the methane balance check if dynamics lakes are on and it's the beginning of the year see #1356 --- src/biogeochem/ch4Mod.F90 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/biogeochem/ch4Mod.F90 b/src/biogeochem/ch4Mod.F90 index f69722139f..d9fbe1ae68 100644 --- a/src/biogeochem/ch4Mod.F90 +++ b/src/biogeochem/ch4Mod.F90 @@ -1684,6 +1684,8 @@ subroutine ch4 (bounds, num_soilc, filter_soilc, num_lakec, filter_lakec, & use ch4varcon , only : replenishlakec, allowlakeprod, ch4offline use clm_varcon , only : secspday use ch4varcon , only : finundation_mtd, finundation_mtd_h2osfc + use clm_time_manager, only : is_beg_curr_year + use dynSubgridControlMod, only : get_do_transient_lakes ! ! !ARGUMENTS: type(bounds_type) , intent(in) :: bounds @@ -2318,7 +2320,16 @@ subroutine ch4 (bounds, num_soilc, filter_soilc, num_lakec, filter_lakec, & ch4_inst%totcolch4_grc(begg:endg), & c2l_scale_type= 'unity', l2g_scale_type='unity' ) + ! ! Gricell level balance + ! + + ! Skip the check if it's the beginning of a new year and dynamic lakes are on + ! See (https://github.com/ESCOMP/CTSM/issues/1356#issuecomment-905963583) + ! + if ( is_beg_curr_year() .and. get_do_transient_lakes() )then + ch4_first_time_grc(begg:endg) = .true. + end if do g = begg, endg if (.not. ch4_first_time_grc(g)) then