From fef58b6d383fd750233ab4fe64086a738a41f2e2 Mon Sep 17 00:00:00 2001 From: Bill Sacks Date: Thu, 4 Apr 2024 20:23:43 -0600 Subject: [PATCH] Relax tolerance for truncating small snocan values in CanopyFluxes The default of 1e-13 was letting through some state updates that look like they should have been truncated to 0: each time step, snocan was decreasing by about 12 orders of magnitude. Addresses ESCOMP/CTSM#2444 --- src/biogeophys/CanopyFluxesMod.F90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/biogeophys/CanopyFluxesMod.F90 b/src/biogeophys/CanopyFluxesMod.F90 index 58334a70c0..a969dc0583 100644 --- a/src/biogeophys/CanopyFluxesMod.F90 +++ b/src/biogeophys/CanopyFluxesMod.F90 @@ -1624,7 +1624,8 @@ subroutine CanopyFluxes(bounds, num_exposedvegp, filter_exposedvegp, ! snocan < rel_epsilon * snocan_baseline will be set to zero ! See NumericsMod for rel_epsilon value call truncate_small_values(fn, filterp, begp, endp, & - snocan_baseline(begp:endp), snocan(begp:endp)) + snocan_baseline(begp:endp), snocan(begp:endp), & + custom_rel_epsilon=1.e-10_r8) if ( use_fates ) then