Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
fe8aa45
Add NVP control switches
huitang-earth Apr 9, 2026
b635d4e
Add control switches in namelist definition.
huitang-earth Apr 9, 2026
f53ed36
Initialize a module for NVP layer dynamics and water balance.
huitang-earth Apr 10, 2026
8f5d482
Define NVP layer controllers and variables.
huitang-earth Apr 10, 2026
6f677b7
Pass NVP namelist control to FATES.
huitang-earth Apr 10, 2026
2043eaa
Add centralized parameter module for NVP (temporal solution).
huitang-earth Apr 10, 2026
3711441
Add NVP radiation related variables and parameters.
huitang-earth Apr 10, 2026
a1955f9
Add NVP radiation related variables into history output field.
huitang-earth Apr 10, 2026
e259d4b
Add NVP-enabled SNICAR_RT call.
huitang-earth Apr 10, 2026
80ca26e
Add NVP colum filter which can be used for NVP column loops.
huitang-earth Apr 10, 2026
78ef7a0
Add NVP namelist settings (temporary)
huitang-earth Apr 10, 2026
79cbded
Allow NVP optical properties to be ported into bottom snow layer (lay…
huitang-earth Apr 10, 2026
64bf7b1
Add NVP light absorption for both snow and no-snow case
huitang-earth Apr 10, 2026
2990172
Add NVP radiation wapper for FATES
huitang-earth Apr 10, 2026
a2cf476
Add FATES wrapper for dynamic NVP layer
huitang-earth Apr 10, 2026
84e0ed8
Add NVP temperature state variable t_nvp_col.
huitang-earth Apr 10, 2026
0481b00
Accomdate NVP as layer 0 (snow layer) in soil-snow temperature integ…
huitang-earth Apr 10, 2026
ceedb0f
Add NVP sensible heat flux.
huitang-earth Apr 10, 2026
85fb103
Add NVP sensible and latent heat flux .
huitang-earth Apr 11, 2026
5b1eaf4
Add surface humidity calculation for NVP (similar to soil).
huitang-earth Apr 11, 2026
522d8f5
Add influence of ice content on NVP water retention.
huitang-earth Apr 11, 2026
fea0c85
Add NVP water state variable.
huitang-earth Apr 12, 2026
6caec1b
Add NVP water flux variables.
huitang-earth Apr 12, 2026
56a9757
Add diagnostic NVP water variables.
huitang-earth Apr 12, 2026
5d4c676
Add NVP surface specific humidity.
huitang-earth Apr 12, 2026
b8109a6
Modify soil surface water flux due to NVP presence.
huitang-earth Apr 12, 2026
85d56f9
Add NVP layer water balance calculation.
huitang-earth Apr 12, 2026
50c6bf8
Add NVP photosynthesis wrapper.
huitang-earth Apr 12, 2026
922ab69
Add separate photosynthesis call for NVP.
huitang-earth Apr 12, 2026
6b68bdc
Add call for building NVP filter.
huitang-earth Apr 12, 2026
09c5ad0
Add patch to column integration for NVP evaporation flux.
huitang-earth Apr 12, 2026
d05b7e3
Add restart option for NVP layer.
huitang-earth Apr 12, 2026
ec18da5
Remove redundant update of flx _absdv and flx_absiv for NVP layer whe…
huitang-earth Apr 21, 2026
2bfdf63
Fixing bugs during compiling phase, no scientific changes.
huitang-earth Apr 26, 2026
bc302be
Improve treatment when water in NVP becomes ice.
huitang-earth Apr 28, 2026
6f1096a
Separate 'use_nvp' and 'col%nvp_layer'-related variables in the if st…
huitang-earth Apr 28, 2026
16945c6
Add NVP resitance to evaporation into Canopy and bareground flux calc…
huitang-earth Apr 28, 2026
c051fb8
Revert "Add NVP resitance to evaporation into Canopy and bareground f…
huitang-earth Apr 28, 2026
01641f4
NVP bug fix: always set a valid value for t_nvp_col.
huitang-earth Apr 30, 2026
5f4fd3b
Add debugging output to log files.
huitang-earth Apr 30, 2026
683a86a
Point FATES at Hui Tang's branch, commit 49c247b39.
samsrabin May 1, 2026
cda744e
NVP bug fix: add 'use_nvp' guard for calculating top soil layer infil…
huitang-earth May 3, 2026
6ed45f0
Merge remote-tracking branch 'tang_ssh/ctsm5.4.028_nvp'
huitang-earth May 4, 2026
2513aaf
bug fix: avoid too large hs values for h2osfc, when it is absent.
huitang-earth May 6, 2026
4156a30
Fix git-fleximod FATES
samsrabin May 10, 2026
f183b46
use_nvp now actually default false.
samsrabin May 11, 2026
dae7fe4
NVP namelist vars now handled in CLMBuildNamelist.pm.
samsrabin May 11, 2026
d39516d
Disable the use of canopy_fraction_pa for calculating frac_nvp(c) for…
huitang-earth May 12, 2026
c33254d
Use jbot_sno(c)==-1 directly (not filter_nvpc) so this can run on the…
huitang-earth May 12, 2026
d61e55f
Set qflx_ev_nvp(p) = 0._r8 when NVP is buried under snow
huitang-earth May 12, 2026
4423d8e
Exclude the NVP slot from snow hydrological calculations.
huitang-earth May 12, 2026
a142abc
Set nvp evaporation to 0 for its water balance calculation when it is…
huitang-earth May 12, 2026
4ec436d
Avoid NVP evap flux calculation when buried undersnow.
huitang-earth May 12, 2026
9670a66
Avoid NVP evap and heat flux calculation when buried undersnow (bareg…
huitang-earth May 12, 2026
5c42e3e
Key NVP bug fix: Set NVP area fraction — zero when NVP buried under s…
huitang-earth May 12, 2026
ad9c5fd
Write NVP debugging output to log files.
huitang-earth May 12, 2026
b1ac7a4
Merge remote-tracking branch 'tang_ssh/ctsm5.4.028_nvp'
huitang-earth May 12, 2026
c3a977a
Update FATES: Avoid unconditional minimum elai and esai for NVP.
samsrabin May 13, 2026
1c72fe7
BareGroundFluxesMod: Try wrapping patch%is_veg indexing in "if (use_f…
samsrabin May 22, 2026
10d3502
Bug fixes: avoid floating-point exception in SNICAR module
huitang-earth May 25, 2026
6ba9a9d
Key bug fix: solving soil balance error for both NVP and non-NVP run.
huitang-earth May 25, 2026
03989b1
Add debug output for soil balance error.
huitang-earth May 25, 2026
63b9cf4
Merge remote-tracking branch 'Try wrapping patch%is_veg indexing in "…
huitang-earth May 25, 2026
25340f6
Update FATES: Add initialization of optical parameter nvp_omega-pa fo…
samsrabin May 26, 2026
bba2f74
Replace a flush() with shr_sys_flush().
samsrabin May 26, 2026
0061373
Exclude NVP layer for snow aerosol calculation.
huitang-earth Jun 1, 2026
0bd6bdc
Add debugging output for NVP layer dynamics.
huitang-earth Jun 1, 2026
a93dadf
Initialize volumetric water content of new NVP layer to 0.6 (similar …
huitang-earth Jun 1, 2026
5ac004e
Calculate infiltration flux of NVP only when snow is absent.
huitang-earth Jun 1, 2026
adcdd9d
Add calculation of day length factor specifically for NVP.
huitang-earth Jun 1, 2026
2a59b2b
Add debugging output for nvp filter, energy and water balances.
huitang-earth Jun 1, 2026
99fd16a
Exclude NVP layer from snow water diagnostics.
huitang-earth Jun 1, 2026
99b3c80
Initialize fwet_nvp_col and vwc_nvp_col to 0.6 (WaterDiagnosticBulkTy…
huitang-earth Jun 1, 2026
6167e8f
Include NVP layer for water mass diagnostics when snow layer is absent.
huitang-earth Jun 1, 2026
7cc0a28
Improve the accounting of qflx_in_soil and qflx_evap when NVP is pres…
huitang-earth Jun 1, 2026
bc251e3
Improve the accounting of NVP in lw_grnd, eflx_soil_grnd, and heat_st…
huitang-earth Jun 1, 2026
7bc3126
Exclude NVP layer for assigning snow aerosol value.
huitang-earth Jun 1, 2026
d83482f
Zero NVP sh/ev flux when buried under snow (Need improvements)
huitang-earth Jun 1, 2026
9b1d0c9
Add separated treatment for the water phase changes of NVP layer (key…
huitang-earth Jun 1, 2026
9ce6316
Add specific treatment in ComputeGroundHeatFluxAndDeriv to deal with …
huitang-earth Jun 1, 2026
b59064e
Place first snow layer at index -1, when NVP occupies layer 0. Apply …
huitang-earth Jun 1, 2026
226a5c4
Re-wire snow percolation fluxes when NVP layer is present.
huitang-earth Jun 1, 2026
9d40fc3
Add more debugging output in BalanceCheckMod.F90.
huitang-earth Jun 1, 2026
ebd27d4
Avoid endrun when balance errors occur (Only for debugging).
huitang-earth Jun 1, 2026
3951725
Merge remote-tracking branch 'tang_ssh/ctsm5.4.028_nvp'
huitang-earth Jun 1, 2026
02b611b
Update FATES to 54cd2c37: Set btran_eff for NVP to 1.0, no soil water…
samsrabin Jun 2, 2026
31f0212
Add a target to fix compile.
samsrabin Jun 2, 2026
7f29058
CDEPS changes to get ALP2 working.
samsrabin Jun 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
#
[submodule "fates"]
path = src/fates
url = https://github.com/NGEET/fates
fxtag = sci.1.91.1_api.43.1.0
url = https://github.com/huitang-earth/fates
fxtag = 54cd2c375976cbea96e1637222c624f664e0870b
fxrequired = AlwaysRequired
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
fxDONOTUSEurl = https://github.com/NGEET/fates
Expand Down Expand Up @@ -92,10 +92,10 @@ fxDONOTUSEurl = https://github.com/ESCOMP/CMEPS.git
[submodule "cdeps"]
path = components/cdeps
url = https://github.com/ESCOMP/CDEPS.git
fxtag = cdeps1.0.93
fxtag = 42f9a6b064ca8d1843a7849c58cc733b3994f94e
fxrequired = ToplevelRequired
# Standard Fork to compare to with "git fleximod test" to ensure personal forks aren't committed
fxDONOTUSEurl = https://github.com/ESCOMP/CDEPS.git
fxDONOTUSEurl = https://github.com/samsrabin/CDEPS.git

[submodule "share"]
path = share
Expand Down
7 changes: 5 additions & 2 deletions bld/CLMBuildNamelist.pm
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,8 @@ sub setup_cmdl_fates_mode {
"use_fates_daylength_factor", "fates_photosynth_acclimation", "fates_stomatal_model",
"fates_stomatal_assimilation", "fates_leafresp_model", "fates_cstarvation_model",
"fates_regeneration_model", "fates_hydro_solver", "fates_radiation_model", "fates_electron_transport_model",
"use_fates_managed_fire"
"use_fates_managed_fire",
"use_nvp", "use_nvp_undersnow", "nvp_rad_model_ground"
);

# dis-allow fates specific namelist items with non-fates runs
Expand Down Expand Up @@ -4887,7 +4888,8 @@ sub setup_logic_fates {
"use_fates_daylength_factor", "fates_photosynth_acclimation", "fates_stomatal_model",
"fates_stomatal_assimilation", "fates_leafresp_model", "fates_cstarvation_model",
"fates_regeneration_model", "fates_hydro_solver", "fates_radiation_model", "fates_electron_transport_model",
"use_fates_managed_fire"
"use_fates_managed_fire",
"use_nvp", "use_nvp_undersnow", "nvp_rad_model_ground"
);

foreach my $var ( @list ) {
Expand All @@ -4910,6 +4912,7 @@ sub setup_logic_fates {
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'fates_spitfire_mode', 'use_fates'=>$nl_flags->{'use_fates'},
'use_fates_managed_fire'=>$nl->get_value('use_fates_managed_fire'),
'use_fates_sp'=>$nl_flags->{'use_fates_sp'} );
add_default($opts, $nl_flags->{'inputdata_rootdir'}, $definition, $defaults, $nl, 'use_nvp');

my $suplnitro = $nl->get_value('suplnitro');
my $parteh_mode = $nl->get_value('fates_parteh_mode');
Expand Down
6 changes: 6 additions & 0 deletions bld/namelist_files/namelist_defaults_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,12 @@ attributes from the config_cache.xml file (with keys converted to upper-case).
<use_luna use_fates=".true." >.false.</use_luna>
<use_luna phys="clm4_5" use_fates=".false.">.false.</use_luna>

<!-- NVP (non-vascular plant: moss/lichen) ground layer -->
<!-- [PORTED by Hui Tang: NVP control flag defaults] -->
<use_nvp >.false.</use_nvp>
<use_nvp_undersnow >.false.</use_nvp_undersnow>
<nvp_rad_model_ground >.false.</nvp_rad_model_ground>

<!-- Flexible CN options -->
<MM_Nuptake_opt use_flexibleCN=".true." >.true.</MM_Nuptake_opt>
<CNratio_floating use_flexibleCN=".true." >.true.</CNratio_floating>
Expand Down
21 changes: 21 additions & 0 deletions bld/namelist_files/namelist_definition_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,27 @@ LUNA operates on C3 and non-crop vegetation (see vcmax_opt for how other veg is
LUNA: Leaf Utilization of Nitrogen for Assimilation
</entry>

<!-- NVP (non-vascular plant: moss/lichen) ground layer -->
<!-- [PORTED by Hui Tang: NVP control flags] -->
<entry id="use_nvp" type="logical" category="physics"
group="clm_inparm" valid_values="" value=".false.">
Toggle to activate the NVP (non-vascular plant: moss/lichen) ground layer.
Requires use_fates=".true.".
</entry>

<entry id="use_nvp_undersnow" type="logical" category="physics"
group="clm_inparm" valid_values="" value=".false.">
Allow the NVP layer to remain active and exchange fluxes when covered by snow.
Only relevant when use_nvp=".true.".
</entry>

<entry id="nvp_rad_model_ground" type="logical" category="physics"
group="clm_inparm" valid_values="" value=".false.">
Use FATES Beer's law radiation model for the NVP ground layer instead of
the CLM bare-ground scheme.
Only relevant when use_nvp=".true.".
</entry>

<entry id="use_hillslope" type="logical" category="physics"
group="clm_inparm" valid_values="" value=".false.">
Toggle to turn on the hillslope model
Expand Down
6 changes: 5 additions & 1 deletion src/biogeophys/AerosolMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,11 @@ subroutine AerosolMasses(bounds, num_on, filter_on, num_off, filter_off, &
! layer mass of snow:
snowmass = h2osoi_ice(c,j) + h2osoi_liq(c,j)

if (j >= snl(c)+1) then
! [PORTED by Hui Tang: exclude NVP layer j=0 from aerosol snow calculation.
! When NVP is active jbot_sno=-1 (bottom snow = j=-1); j=0 is NVP not snow.
! Without this guard, j=0 satisfies j>=snl+1 and snowmass(j=0)≈0 → SIGFPE
! divide-by-zero at the concentration lines below.]
if (j >= snl(c)+1 .and. j <= col%jbot_sno(c)) then

mss_bctot(c,j) = mss_bcpho(c,j) + mss_bcphi(c,j)
mss_bc_col(c) = mss_bc_col(c) + mss_bctot(c,j)
Expand Down
54 changes: 46 additions & 8 deletions src/biogeophys/BalanceCheckMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module BalanceCheckMod
use Waterlnd2atmType , only : waterlnd2atm_type
use WaterBalanceType , only : waterbalance_type
use WaterFluxType , only : waterflux_type
use WaterFluxBulkType , only : waterfluxbulk_type ! [PORTED by Hui Tang: needed to access qflx_nvp_drain_col]
use WaterType , only : water_type
use TotalWaterAndHeatMod, only : ComputeWaterMassNonLake, ComputeWaterMassLake
use GridcellType , only : grc
Expand Down Expand Up @@ -461,7 +462,7 @@ subroutine BalanceCheck( bounds, &
!
! !USES:
use clm_varcon , only : spval
use clm_varctl , only : use_soil_moisture_streams
use clm_varctl , only : use_soil_moisture_streams, use_nvp ! [PORTED by Hui Tang: use_nvp for NVP debug print]
use clm_time_manager , only : get_step_size_real, get_nstep
use clm_time_manager , only : get_nstep_since_startup_or_lastDA_restart_or_pause
use CanopyStateType , only : canopystate_type
Expand All @@ -475,7 +476,7 @@ subroutine BalanceCheck( bounds, &
integer , intent(in) :: filter_allc(:) ! filter for all columns
type(atm2lnd_type) , intent(in) :: atm2lnd_inst
type(solarabs_type) , intent(in) :: solarabs_inst
class(waterflux_type) , intent(in) :: waterflux_inst
class(waterflux_type) , intent(in), target :: waterflux_inst
class(waterstate_type), intent(in) :: waterstate_inst
type(waterdiagnosticbulk_type), intent(in) :: waterdiagnosticbulk_inst
class(waterbalance_type), intent(inout) :: waterbalance_inst
Expand All @@ -502,6 +503,8 @@ subroutine BalanceCheck( bounds, &

real(r8) :: errh2o_max_val ! Maximum value of error in water conservation error over all columns [mm H2O]
real(r8) :: errh2osno_max_val ! Maximum value of error in h2osno conservation error over all columns [kg m-2]
! [PORTED by Hui Tang: typed pointer to access qflx_nvp_drain_col for NVP snow balance correction]
type(waterfluxbulk_type), pointer :: waterfluxbulk_ptr

real(r8), parameter :: h2o_warning_thresh = 1.e-9_r8 ! Warning threshhold for error in errh2o and errh2osnow

Expand Down Expand Up @@ -561,6 +564,15 @@ subroutine BalanceCheck( bounds, &
qflx_glcice_dyn_water_flux_col => waterflux_inst%qflx_glcice_dyn_water_flux_col & ! Input: [real(r8) (:)] column level water flux needed for balance check due to glc_dyn_runoff_routing (mm H2O/s) (positive means addition of water to the system)
)

! [PORTED by Hui Tang: resolve the polymorphic waterflux_inst to its bulk concrete type so
! that qflx_nvp_drain_col can be read for the NVP snow-balance correction below.
! waterfluxbulk_ptr is null() if waterflux_inst is not a waterfluxbulk_type (safe fallback).]
waterfluxbulk_ptr => null()
select type(waterflux_inst)
type is (waterfluxbulk_type)
waterfluxbulk_ptr => waterflux_inst
end select

! Get step size and time step
dtime = get_step_size_real()
nstep = get_nstep()
Expand Down Expand Up @@ -589,6 +601,15 @@ subroutine BalanceCheck( bounds, &
! add qflx_drain_perched and qflx_flood
if (col%active(c)) then

! [PORTED by Hui Tang: NVP debug — print j=0 water and all wb flux terms for c==1]
if (use_nvp .and. col%jbot_sno(c) == -1 .and. c == 1) then
write(iulog,*) '[NVP DBG] WBal c=',c,' snl=',col%snl(c), &
' ice0=',waterstate_inst%h2osoi_ice_col(c,0), &
' liq0=',waterstate_inst%h2osoi_liq_col(c,0), &
' snwcp_liq=', qflx_snwcp_liq(c)*dtime, &
' snwcp_ice=', qflx_snwcp_ice(c)*dtime
end if

errh2o_col(c) = endwb_col(c) - begwb_col(c) &
- (forc_rain_col(c) &
+ forc_snow_col(c) &
Expand Down Expand Up @@ -655,7 +676,7 @@ subroutine BalanceCheck( bounds, &
end if

write(iulog,*)'CTSM is stopping'
call endrun(subgrid_index=indexc, subgrid_level=subgrid_level_column, msg=errmsg(sourcefile, __LINE__))
!call endrun(subgrid_index=indexc, subgrid_level=subgrid_level_column, msg=errmsg(sourcefile, __LINE__))
end if

end if
Expand Down Expand Up @@ -740,7 +761,7 @@ subroutine BalanceCheck( bounds, &
write(iulog,*)'qflx_glcice_dyn_water_flux = ',qflx_glcice_dyn_water_flux_grc(indexg)*dtime

write(iulog,*)'CTSM is stopping'
call endrun(subgrid_index=indexg, subgrid_level=subgrid_level_gridcell, msg=errmsg(sourcefile, __LINE__))
!call endrun(subgrid_index=indexg, subgrid_level=subgrid_level_gridcell, msg=errmsg(sourcefile, __LINE__))
end if

end if
Expand Down Expand Up @@ -792,7 +813,24 @@ subroutine BalanceCheck( bounds, &
+ qflx_snow_drain(c) + qflx_sl_top_soil(c)
endif

! [PORTED by Hui Tang: when NVP is active, h2osno includes h2osoi_liq(c,0) (NVP),
! but qflx_nvp_drain_col (NVP→soil drainage) is not a registered snow sink.
! Add it here so the balance closes. Signed: positive=NVP drains to soil (sink),
! negative=soil absorbs into NVP (source, reduces snow_sinks). Both cases correct.]
!if (associated(waterfluxbulk_ptr) .and. col%nvp_layer_active(c)) then
! snow_sinks(c) = snow_sinks(c) + waterfluxbulk_ptr%qflx_nvp_drain_col(c)
!end if

errh2osno(c) = (h2osno_total(c) - h2osno_old(c)) - (snow_sources(c) - snow_sinks(c)) * dtime

! [PORTED by Hui Tang: CalculateTotalH2osno excludes j=0 (NVP) from h2osno_total,
! so liquid that percolated from the bottom snow layer into the NVP layer this
! timestep is absent from both h2osno_total and snow_sinks. Add h2osoi_liq(c,0)
! directly to close the balance.]
!if (col%nvp_layer_active(c)) then
! errh2osno(c) = errh2osno(c) + waterstate_inst%h2osoi_liq_col(c,0) # Not working, as old and new status of NVP liq water is needed.
!end if

else
snow_sources(c) = 0._r8
snow_sinks(c) = 0._r8
Expand Down Expand Up @@ -842,7 +880,7 @@ subroutine BalanceCheck( bounds, &
write(iulog,*)'qflx_snwcp_discarded_liq = ',qflx_snwcp_discarded_liq_col(indexc)*dtime
write(iulog,*)'qflx_sl_top_soil = ',qflx_sl_top_soil(indexc)*dtime
write(iulog,*)'CTSM is stopping'
call endrun(subgrid_index=indexc, subgrid_level=subgrid_level_column, msg=errmsg(sourcefile, __LINE__))
!call endrun(subgrid_index=indexc, subgrid_level=subgrid_level_column, msg=errmsg(sourcefile, __LINE__))
end if

end if
Expand Down Expand Up @@ -1039,7 +1077,7 @@ subroutine EnergyBalanceCheck( bounds, &


write(iulog,*)'CTSM is stopping'
call endrun(subgrid_index=indexp, subgrid_level=subgrid_level_patch, msg=errmsg(sourcefile, __LINE__))
!call endrun(subgrid_index=indexp, subgrid_level=subgrid_level_patch, msg=errmsg(sourcefile, __LINE__))
end if

end if
Expand Down Expand Up @@ -1093,7 +1131,7 @@ subroutine EnergyBalanceCheck( bounds, &
write(iulog,*)'ftii ftdd ftid = ' ,ftii(indexp,:), ftdd(indexp,:),ftid(indexp,:)
write(iulog,*)'elai esai = ' ,elai(indexp), esai(indexp)
write(iulog,*)'CTSM is stopping'
call endrun(subgrid_index=indexp, subgrid_level=subgrid_level_patch, msg=errmsg(sourcefile, __LINE__))
!call endrun(subgrid_index=indexp, subgrid_level=subgrid_level_patch, msg=errmsg(sourcefile, __LINE__))
end if

end if
Expand All @@ -1110,7 +1148,7 @@ subroutine EnergyBalanceCheck( bounds, &

if ((errsoi_col_max_val > 1.e-4_r8) .and. (DAnstep > skip_steps)) then
write(iulog,*)'CTSM is stopping'
call endrun(subgrid_index=indexc, subgrid_level=subgrid_level_column, msg=errmsg(sourcefile, __LINE__))
!call endrun(subgrid_index=indexc, subgrid_level=subgrid_level_column, msg=errmsg(sourcefile, __LINE__))
end if
end if

Expand Down
Loading