From 918af16f008c30614637d2c53ee8537fe527f24e Mon Sep 17 00:00:00 2001 From: Keith Oleson Date: Tue, 2 Dec 2025 15:49:37 -0700 Subject: [PATCH 1/5] Fix for RRTMGP errors caused by high surface temperatures. --- src/biogeophys/CanopyFluxesMod.F90 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/biogeophys/CanopyFluxesMod.F90 b/src/biogeophys/CanopyFluxesMod.F90 index 3b0d990b21..f22c7e5ce3 100644 --- a/src/biogeophys/CanopyFluxesMod.F90 +++ b/src/biogeophys/CanopyFluxesMod.F90 @@ -754,6 +754,19 @@ subroutine CanopyFluxes(bounds, num_exposedvegp, filter_exposedvegp, frac_rad_abs_by_stem(p) = 0.0_r8 sa_stem(p) = 0.0_r8 sa_leaf(p) = sa_leaf(p) + esai(p) + else + ! Add esai to sa_leaf if elai is less than threshold. + ! Intended to avoid small sa_leaf which leads to small leaf conductance + ! and high leaf temperature. This in turn can lead to unrealistically + ! high surface temperatures passed to the atmospheric model (The RRTMGP + ! component in particular, which returns an error and stops the model + ! if the surface temperature is greater than 355K). + ! See https://github.com/ESCOMP/CTSM/issues/3589 for more info. + ! The 0.1_r8 value is fairly arbitrary but has been effective in + ! avoiding RRTMGP errors in CESM3 development simulations. + if(elai(p) .lt. 0.1_r8) then + sa_leaf(p) = sa_leaf(p) + esai(p) + endif endif ! if using Satellite Phenology mode, calculate leaf and stem biomass From bb866403c89f1b7456a652895089a2cbc026a318 Mon Sep 17 00:00:00 2001 From: Keith Oleson Date: Wed, 3 Dec 2025 13:35:34 -0700 Subject: [PATCH 2/5] Human readability. --- src/biogeophys/CanopyFluxesMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/biogeophys/CanopyFluxesMod.F90 b/src/biogeophys/CanopyFluxesMod.F90 index f22c7e5ce3..2194769e64 100644 --- a/src/biogeophys/CanopyFluxesMod.F90 +++ b/src/biogeophys/CanopyFluxesMod.F90 @@ -764,7 +764,7 @@ subroutine CanopyFluxes(bounds, num_exposedvegp, filter_exposedvegp, ! See https://github.com/ESCOMP/CTSM/issues/3589 for more info. ! The 0.1_r8 value is fairly arbitrary but has been effective in ! avoiding RRTMGP errors in CESM3 development simulations. - if(elai(p) .lt. 0.1_r8) then + if(elai(p) < 0.1_r8) then sa_leaf(p) = sa_leaf(p) + esai(p) endif endif From a33f75fa4499c1c6d09f721f63de065d8d823e6e Mon Sep 17 00:00:00 2001 From: Keith Oleson Date: Wed, 3 Dec 2025 13:43:57 -0700 Subject: [PATCH 3/5] Add min_lai parameter --- src/biogeophys/CanopyFluxesMod.F90 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/biogeophys/CanopyFluxesMod.F90 b/src/biogeophys/CanopyFluxesMod.F90 index 2194769e64..dac6b1dbd9 100644 --- a/src/biogeophys/CanopyFluxesMod.F90 +++ b/src/biogeophys/CanopyFluxesMod.F90 @@ -437,6 +437,8 @@ subroutine CanopyFluxes(bounds, num_exposedvegp, filter_exposedvegp, real(r8), parameter :: k_cyl_area = 1.0_r8 !departure from cylindrical area real(r8), parameter :: k_internal = 0.0_r8 !self-absorbtion of leaf/stem longwave real(r8), parameter :: min_stem_diameter = 0.05_r8 !minimum stem diameter for which to calculate stem interactions + real(r8), parameter :: min_lai = 0.1_r8 !minimum elai threshold to add esai to sa_leaf calculation + !value is arbitrary but has been effective in avoiding RRTMGP errors in CESM3 development simulations integer :: dummy_to_make_pgi_happy !------------------------------------------------------------------------------ @@ -762,9 +764,9 @@ subroutine CanopyFluxes(bounds, num_exposedvegp, filter_exposedvegp, ! component in particular, which returns an error and stops the model ! if the surface temperature is greater than 355K). ! See https://github.com/ESCOMP/CTSM/issues/3589 for more info. - ! The 0.1_r8 value is fairly arbitrary but has been effective in + ! The 0.1_r8 value is arbitrary but has been effective in ! avoiding RRTMGP errors in CESM3 development simulations. - if(elai(p) < 0.1_r8) then + if(elai(p) < min_lai) then sa_leaf(p) = sa_leaf(p) + esai(p) endif endif From e944928f28e1ef6f4f85873ac60901d0422fdc8a Mon Sep 17 00:00:00 2001 From: Keith Oleson Date: Wed, 3 Dec 2025 14:24:32 -0700 Subject: [PATCH 4/5] Clarify comment --- src/biogeophys/CanopyFluxesMod.F90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/biogeophys/CanopyFluxesMod.F90 b/src/biogeophys/CanopyFluxesMod.F90 index dac6b1dbd9..1804c8d181 100644 --- a/src/biogeophys/CanopyFluxesMod.F90 +++ b/src/biogeophys/CanopyFluxesMod.F90 @@ -747,10 +747,10 @@ subroutine CanopyFluxes(bounds, num_exposedvegp, filter_exposedvegp, ! adjust for departure of cylindrical stem model sa_stem(p) = k_cyl_area * sa_stem(p) - ! ! only calculate separate leaf/stem heat capacity for trees - ! and shrubs if dbh is greater than some minimum value - ! (set surface area for stem, and fraction absorbed by stem to zero) + ! and shrubs if dbh is greater than some minimum value. + ! otherwise, set surface area for stem and fraction absorbed by stem to zero, + ! and add esai to sa_leaf. if(.not.(is_tree(patch%itype(p)) .or. is_shrub(patch%itype(p))) & .or. dbh(p) < min_stem_diameter) then frac_rad_abs_by_stem(p) = 0.0_r8 From e02b9a5d47c0e5dde0a6bf26fc9120cbd041e033 Mon Sep 17 00:00:00 2001 From: Keith Oleson Date: Wed, 3 Dec 2025 14:45:01 -0700 Subject: [PATCH 5/5] Remove duplicate comment --- src/biogeophys/CanopyFluxesMod.F90 | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/biogeophys/CanopyFluxesMod.F90 b/src/biogeophys/CanopyFluxesMod.F90 index 1804c8d181..8b26100284 100644 --- a/src/biogeophys/CanopyFluxesMod.F90 +++ b/src/biogeophys/CanopyFluxesMod.F90 @@ -764,8 +764,6 @@ subroutine CanopyFluxes(bounds, num_exposedvegp, filter_exposedvegp, ! component in particular, which returns an error and stops the model ! if the surface temperature is greater than 355K). ! See https://github.com/ESCOMP/CTSM/issues/3589 for more info. - ! The 0.1_r8 value is arbitrary but has been effective in - ! avoiding RRTMGP errors in CESM3 development simulations. if(elai(p) < min_lai) then sa_leaf(p) = sa_leaf(p) + esai(p) endif