Soil-Fluxes
- SoilFluxes
model
land_surface
clm
CTSM/CLM ground energy and moisture flux update SoilFluxes, transcribed from src/biogeophys/SoilFluxesMod.F90 of CTSM ctsm5.4.063 (cesm3.0-alphabranch; line numbers refer to that tag): the previous-time-step ground temperature and T^4 blend t_grnd0/lw_grnd (SoilFluxesMod.F90:175-183, :344-346), the sensible/latent flux corrections to the present soil temperature (:192-204), the liquid/solid partition of the ground evaporation into liquid evaporation, sublimation, liquid dew and solid dew (:208-274), the snow-evaporation moisture limit of the top layer (:276-297), the ground heat flux from absorbed shortwave, canopy longwave and black-body emission (:341-371), the total vegetation+ground fluxes and the history-tape latent heat breakdown (:373-394), the outgoing/net longwave radiation with the temperature-increment term and the bare-ground skin temperature (:451-495). The equations are written as math over the patch index set (the traced reference-dump rows carry p == c, so the column-level quantities of the Fortran are replicated patch-wise); the shared laws are imported by reference from ./clm_templates.esm (ground_temperature_blend, stefan_boltzmann_emission, flux_temperature_correction, stefan_boltzmann_emission_dT). All fluxes are mass fluxes in kg/m^2/s (= mm/s of water): the esm unit system requires the mass-flux form for dimensional consistency with the latent-heat multiplications (qflx*htvp [J/kg] = W/m^2), see README.md. The tests pin the reference dumps: a CESM3 / CTSM ctsm5.4.063 I2000Clm60Sp land-only run (GSWP3 forcing, dtime = 1800 s) instrumented with write statements at the SoilFluxes, BareGroundFluxes, SoilTemperature, ComputeGroundHeatFluxAndDeriv, SurfaceRadiation and BiogeophysPreFluxCalcs exits, recording the first 16 bare, deep-snowpack columns over the first 12 steps in full double precision; forc_lwrad is the downscaled column longwave recorded at ComputeGroundHeatFluxAndDeriv. Tested regime: all 192 dumped rows are dew rows (qflx_ev_snow < 0) below freezing (t_grnd < tfrz, so the dew is solid) with an all-snow blend (snl = -9, frac_sno_fluxes = 1, frac_h2osfc = 0, frac_veg_nosno = 0); the evaporation branch of the partition, the firing snow-evaporation limit, liquid dew, mixed snow/soil blends and snow-free columns are transcribed but not exercised, because the reference run has no such rows. The assertions on quantities that are not dump columns (lw_grnd, qflx_ev_snow, qflx_ev_soil, evaporation_limit, qflx_soliddew_to_top_layer, lwrad_emission, lwrad_increment, eflx_lwrad_out, qflx_evap_tot) are labelled derived (not a dump column) and computed offline (double-precision evaluation of the transcribed equations at the pinned dump inputs), cross-checked against every dump column they touch on all 192 rows (max rel err 7.9e-15).