Skip to content

Commit 23ace69

Browse files
committed
Merge branch 'wlin/lnd/more_nbalance_err_tol' (PR #7425)
PR #6651 increased the tolerance for column and grid balance check for C, N, and P. However, subroutine GridCBalanceCheck uses a separate error_tol that was not similarly increased. The lower tolerance is exceeded in an SSP370 simulation (#7423), causing the simulation to be aborted. This PR replaces the local error_tol with the common balance_check_tolerance for EcosystemBalanceCheckMod.F90. Fixes #7423 [BFB] If a simulation were to be impacted, it would have failed when exceeding the lower tolerance.
2 parents 5cb56bb + 4a8c5b4 commit 23ace69

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

components/elm/src/biogeochem/EcosystemBalanceCheckMod.F90

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,6 @@ subroutine GridCBalanceCheck(bounds, col_cs, col_cf, grc_cs, grc_cf)
860860
!
861861
integer :: g, nstep
862862
real(r8) :: dt
863-
real(r8), parameter :: error_tol = 1.e-8_r8
864863
!-----------------------------------------------------------------------
865864

866865
associate( &
@@ -978,7 +977,7 @@ subroutine GridCBalanceCheck(bounds, col_cs, col_cf, grc_cs, grc_cf)
978977

979978
grc_errcb(g) = (grc_cinputs(g) - grc_coutputs(g))*dt - (end_totc(g) - beg_totc(g))
980979

981-
if (abs(grc_errcb(g)) > error_tol .and. nstep > 1) then
980+
if (abs(grc_errcb(g)) > balance_check_tolerance .and. nstep > 1) then
982981
write(iulog,*)'grid cbalance error = ', grc_errcb(g), g
983982
write(iulog,*)'Latdeg,Londeg = ', grc_pp%latdeg(g), grc_pp%londeg(g)
984983
write(iulog,*)'input = ', grc_cinputs(g)*dt

0 commit comments

Comments
 (0)