Version: dev

NoahCanopyResistance

Canopy (bulk stomatal) resistance of WRF's unified Noah land-surface model, SUBROUTINE CANRES of phys/module_sf_noahlsm.F (WRF 4.8, sf_surface_physics = 2), and the plant coefficient pc it is converted into. Jarvis (1976) multiplicative stress form as implemented by Chen et al. (1996): rc = rsmin / (xlai rcs rct rcq rcsoil), with four independent stress factors, each floored -- rcs from incoming solar radiation, rct from air temperature about the optimum topt, rcq from the vapour-pressure deficit at the lowest model level, and rcsoil from root-zone soil moisture. The soil-moisture factor is written here as what the Fortran loop computes: rcsoil = (1/z_root) integral of the layer stress gx over the root zone, gx = clamp((sh2o - smcwlt)/(smcref - smcwlt), 0, 1), i.e. a THICKNESS-WEIGHTED MEAN of the layer stress over the root depth (the Fortran's PART(k) = (zsoil(k)-zsoil(k-1))/zsoil(nroot) gx(k) is dz[k]/z_root gx[k] because WRF's zsoil is negative downward). The integral runs over the whole soil column with the sub-root layers masked out by zc < z_root; a layer centre never coincides with z_root, which is by construction a layer interface, so the mask selects exactly the Fortran's layers 1..nroot. The plant coefficient pc converts rc into the factor that multiplies the LINEARISED Penman potential evaporation to give Penman-Monteith actual transpiration: pc = (rr + delta)/(rr (1 + rc ch) + delta), where rr is the radiative-plus-aerodynamic resistance ratio and delta = (slv/cp) dqsdt2 the saturation-humidity slope in the same units. Frozen-ground extension: WRF passes UNFROZEN soil water sh2o, not total smc, into this routine -- the `SMC` dummy argument of CANRES is bound to SH2O at the call site -- so the component's column input is named sh2o. GATING. SFLX calls CANRES only 'IF ((SHDFAC > 0.) .AND. (XLAI > 0.))' (module_sf_noahlsm.F:749) and otherwise sets rc = 0; this component reproduces that through `canres_called` and its new `shdfac` input, so a bare cell (shdfac = 0, e.g. the BARE category REDPRM zeroes) gives rc = 0 and finite zeros elsewhere instead of the NaN that xlai = 0 or z_root = 0 would put into rcs, rcsoil and rc. The denominators inside the active branch are guarded as well (xlai, and z_root for a vegetation type with no root layers), because an ifelse evaluates both branches. The `rr` here is CANRES's own, built from cp = 1004.5 (module_model_constants) and Noah's rd = 287.04 and sigma = 5.67e-8; it is NOT the `rr` of SUBROUTINE PENMAN, which is a different expression built from PENMAN's own cp = 1004.6 (FORTRAN_BUGS N88). Consumer-supplied column fields (ze, sh2o) are rewrite-target ops `input_<name>` lowered by the consumer, in the inline tests through per-test expression_template_imports libraries generated by tools/fill_tests.py.

Domain
land_surface
Subdomain
noah
Type
model
.esm schema
1.2.0
Source
components/land_surface/noah/canopy_resistance.esm
Tags
#land_surface #noah #model #wrf #land-surface #canopy-resistance #transpiration #column

Description

Canopy (bulk stomatal) resistance of WRF’s unified Noah land-surface model, SUBROUTINE CANRES of phys/module_sf_noahlsm.F (WRF 4.8, sf_surface_physics = 2), and the plant coefficient pc it is converted into. Jarvis (1976) multiplicative stress form as implemented by Chen et al. (1996): rc = rsmin / (xlai rcs rct rcq rcsoil), with four independent stress factors, each floored – rcs from incoming solar radiation, rct from air temperature about the optimum topt, rcq from the vapour-pressure deficit at the lowest model level, and rcsoil from root-zone soil moisture. The soil-moisture factor is written here as what the Fortran loop computes: rcsoil = (1/z_root) integral of the layer stress gx over the root zone, gx = clamp((sh2o - smcwlt)/(smcref - smcwlt), 0, 1), i.e. a THICKNESS-WEIGHTED MEAN of the layer stress over the root depth (the Fortran’s PART(k) = (zsoil(k)-zsoil(k-1))/zsoil(nroot) gx(k) is dz[k]/z_root gx[k] because WRF’s zsoil is negative downward). The integral runs over the whole soil column with the sub-root layers masked out by zc < z_root; a layer centre never coincides with z_root, which is by construction a layer interface, so the mask selects exactly the Fortran’s layers 1..nroot. The plant coefficient pc converts rc into the factor that multiplies the LINEARISED Penman potential evaporation to give Penman-Monteith actual transpiration: pc = (rr + delta)/(rr (1 + rc ch) + delta), where rr is the radiative-plus-aerodynamic resistance ratio and delta = (slv/cp) dqsdt2 the saturation-humidity slope in the same units. Frozen-ground extension: WRF passes UNFROZEN soil water sh2o, not total smc, into this routine – the SMC dummy argument of CANRES is bound to SH2O at the call site – so the component’s column input is named sh2o. GATING. SFLX calls CANRES only ‘IF ((SHDFAC > 0.) .AND. (XLAI > 0.))’ (module_sf_noahlsm.F:749) and otherwise sets rc = 0; this component reproduces that through canres_called and its new shdfac input, so a bare cell (shdfac = 0, e.g. the BARE category REDPRM zeroes) gives rc = 0 and finite zeros elsewhere instead of the NaN that xlai = 0 or z_root = 0 would put into rcs, rcsoil and rc. The denominators inside the active branch are guarded as well (xlai, and z_root for a vegetation type with no root layers), because an ifelse evaluates both branches. The rr here is CANRES’s own, built from cp = 1004.5 (module_model_constants) and Noah’s rd = 287.04 and sigma = 5.67e-8; it is NOT the rr of SUBROUTINE PENMAN, which is a different expression built from PENMAN’s own cp = 1004.6 (FORTRAN_BUGS N88). Consumer-supplied column fields (ze, sh2o) are rewrite-target ops input_<name> lowered by the consumer, in the inline tests through per-test expression_template_imports libraries generated by tools/fill_tests.py.

Reference

  • Jarvis, P. G. (1976). The interpretation of the variations in leaf water potential and stomatal conductance found in canopies in the field. Phil. Trans. R. Soc. Lond. B, 273, 593-610.
  • Noilhan, J., and S. Planton (1989). A simple parameterization of land surface processes for meteorological models. Mon. Wea. Rev., 117, 536-549.
  • Chen, F., et al. (1996). Modeling of land surface evaporation by four schemes and comparison with FIFE observations. J. Geophys. Res., 101(D3), 7251-7268, eqns 12-14 and Table 2.
  • wrf-model/WRF v4.8.0 phys/module_sf_noahlsm.F SUBROUTINE CANRES lines 1009-1145 (instrumented in ctessum-claude/WRF branch earthsciml-instrumented-chem170, commit ac6d4cc).

Parameters

NameUnitsDefaultDescription
sh2o_inm^3/m^30.0Coupling target (assembly input path): a shaped parameter that receives the unfrozen soil water from an assembly’s ODE state through a document-level variable_map (param_to_var), when that document’s mount-edge library lowers input_sh2o to it (esm-spec 9.7.10, 10.4; couplings/noah_column.esm). Unused by this component’s own inline tests, which lower input_sh2o to dumped constants.
z_rootm1.0Depth of the bottom of the root zone below the surface, |ZSOIL(NROOT)| in WRF: the cumulative thickness of the first NROOT layers, with NROOT the vegetation type’s root-layer count from VEGPARM.TBL. A layer belongs to the root zone iff its centre lies above this depth.
solarW/m^2500.0Incoming (downward) shortwave radiation at the surface, WRF’s SOLDN. Note the call site passes SOLDN, the DOWNWARD flux, not the net SOLNET that drives the energy balance.
chm/s0.01Surface exchange coefficient for heat and moisture from the surface-layer scheme, WRF’s CH (a velocity scale, not a dimensionless coefficient).
sfctmpK300.0Air temperature at the lowest model level, WRF’s SFCTMP.
sfcprsPa100000.0Air pressure at the lowest model level, WRF’s SFCPRS.
q2kg/kg0.01Specific humidity at the lowest model level, WRF’s Q2.
q2satkg/kg0.02Saturation specific humidity at the lowest model level, WRF’s Q2SAT, supplied by the driver.
dqsdt2kg/(kg*K)0.001Slope of the saturation specific humidity with temperature at the lowest model level, WRF’s DQSDT2, supplied by the driver.
emissi10.985Surface emissivity, WRF’s EMISSI, entering the radiative term of rr.
rsmins/m40.0Minimum (unstressed) stomatal resistance of the vegetation type, VEGPARM.TBL RSTBL.
rglW/m^2100.0Solar radiation threshold of the vegetation type in the rcs stress function, VEGPARM.TBL RGLTBL.
hskg/kg36.25Vapour-pressure-deficit coefficient of the vegetation type in the rcq stress function, VEGPARM.TBL HSTBL. It multiplies a specific-humidity difference, so it carries the reciprocal of that unit.
xlai15.68Leaf area index, WRF’s XLAI, interpolated in REDPRM between the vegetation type’s LAIMIN and LAIMAX by the greenness fraction.
shdfac10.5Green vegetation fraction as REDPRM leaves it, WRF’s SHDFAC (soil_veg_parameters’ shdfac_eff). Read only by the gate: SFLX calls CANRES only where shdfac > 0 and xlai > 0.
slvJ/kg2501000.0Latent heat of vaporisation as CANRES defines it locally (its PARAMETER SLV = 2.501e6), used only in delta = (slv/cp) dqsdt2. Numerically equal to par.lvh2o but written separately because the Fortran declares it separately.
smcwltm^3/m^30.084Soil wilting point of the soil type, SOILPARM.TBL WLTSMC.
smcrefm^3/m^30.36Soil reference moisture (field capacity) of the soil type, SOILPARM.TBL REFSMC, at and above which transpiration is unstressed.

Observed

NameUnitsDefaultDescription
zemSoil layer interface DEPTHS below the ground surface, positive downward, ze[1] = 0 and increasing with the lev index (the grid’s required orientation). The cumulative sum of WRF’s SLDPTH; the negative of WRF’s ZSOIL, prefixed by zero.
zcmSoil layer centre depths, derived from ze by the grid’s column_cell_center template.
dzmSoil layer thicknesses, derived from ze by the grid’s column_cell_thickness template. Equals WRF’s SLDPTH.
sh2om^3/m^3Volumetric UNFROZEN soil water content of each layer, WRF’s SH2O. This is what the call site binds to CANRES’s SMC argument (the frozen-ground extension), so the total soil moisture SMC is deliberately not used here.
rcs1Solar-radiation stress factor, (ff + rsmin/rsmax)/(1 + ff) with ff = 1.1 solar/(rgl xlai), floored at 1e-4. Tends to rsmin/rsmax in the dark and to 1 in bright light. Reported as 0 where CANRES is not called: WRF leaves it unassigned there (the reference driver’s zero-initialised local reads back 0) and nothing downstream reads it, because TRANSP is skipped too.
rct1Air-temperature stress factor, 1 - 0.0016 (topt - sfctmp)^2, floored at 1e-4 (Noilhan and Planton 1989). Reported as 0 where CANRES is not called: WRF leaves it unassigned there (the reference driver’s zero-initialised local reads back 0) and nothing downstream reads it, because TRANSP is skipped too.
rcq1Vapour-pressure-deficit stress factor, 1/(1 + hs (q2sat - q2)), floored at 0.01 (SSiB form). Reported as 0 where CANRES is not called: WRF leaves it unassigned there (the reference driver’s zero-initialised local reads back 0) and nothing downstream reads it, because TRANSP is skipped too.
rcsoil1Root-zone soil-moisture stress factor: the thickness-weighted mean over the root zone of the layer stress gx, floored at 1e-4. Reported as 0 where CANRES is not called: WRF leaves it unassigned there (the reference driver’s zero-initialised local reads back 0) and nothing downstream reads it, because TRANSP is skipped too. With no root layers (nroot = 0, z_root = 0) CANRES’s sum over K = 1..NROOT is empty and the floor 1e-4 is what it returns; the z_root > 0 guard reproduces that instead of forming 0/0.
canres_called11 where SFLX calls CANRES, ‘IF ((SHDFAC > 0.) .AND. (XLAI > 0.))’ (module_sf_noahlsm.F:749), else 0.
gx1Per-layer soil-moisture stress, (sh2o - smcwlt)/(smcref - smcwlt) clamped to [0, 1]: 0 at or below the wilting point, 1 at or above the field-capacity reference.
gx_root1gx masked to the root zone (zero in layers whose centre lies below z_root), the integrand of rcsoil.
rcs/mBulk canopy resistance, rsmin/(xlai rcs rct rcq rcsoil). ZERO where CANRES is not called (shdfac <= 0 or xlai <= 0), SFLX’s ‘ELSE RC = 0.0’ (module_sf_noahlsm.F:754).
rr1CANRES’s radiative-to-aerodynamic resistance ratio, 4 emissi sigma rd sfctmp^4/(cp sfcprs ch) + 1. A different quantity from SUBROUTINE PENMAN’s rr of the same name.
delta1Saturation-humidity slope expressed as the Penman psychrometric ratio, (slv/cp) dqsdt2.
pc1Plant coefficient: the factor by which the linearised Penman potential evaporation must be multiplied to give the Penman-Monteith transpiration that carries the canopy resistance rc. Reported as 0 where CANRES is not called: WRF leaves it unassigned there (the reference driver’s zero-initialised local reads back 0) and nothing downstream reads it, because TRANSP is skipped too.
z_sfcmLower boundary of the column, ze[1]: the free name the EarthSciDiscretizations column_nonuniform_1d integral rules match as the lower bound of a bottom-anchored integral (ESD #39).
z_topmUpper boundary of the column, ze[NLEV+1]: the free name the EarthSciDiscretizations column_nonuniform_1d integral rules match as the upper bound of a top-anchored integral (ESD #39).

Observed expressions

$$ ze = \mathrm{input_ze}\left(\right) $$

Soil layer interface DEPTHS below the ground surface, positive downward, ze[1] = 0 and increasing with the lev index (the grid’s required orientation). The cumulative sum of WRF’s SLDPTH; the negative of WRF’s ZSOIL, prefixed by zero.

$$ zc = \mathrm{column_cell_center}\left(ze=ze\right) $$

Soil layer centre depths, derived from ze by the grid’s column_cell_center template.

$$ dz = \mathrm{column_cell_thickness}\left(ze=ze\right) $$

Soil layer thicknesses, derived from ze by the grid’s column_cell_thickness template. Equals WRF’s SLDPTH.

$$ sh2o = \mathrm{input_sh2o}\left(\right) $$

Volumetric UNFROZEN soil water content of each layer, WRF’s SH2O. This is what the call site binds to CANRES’s SMC argument (the frozen-ground extension), so the total soil moisture SMC is deliberately not used here.

$$ rcs = \mathrm{ifelse}\left(canres_{called} = 1.0, \mathrm{max}\left(\frac{\frac{1.1 \cdot solar}{rgl \cdot \mathrm{ifelse}\left(\mathrm{>}\left(xlai, 0.0\right), xlai, 1.0\right)} + \frac{rsmin}{par.rsmax}}{1.0 + \frac{1.1 \cdot solar}{rgl \cdot \mathrm{ifelse}\left(\mathrm{>}\left(xlai, 0.0\right), xlai, 1.0\right)}}, 0.0001\right), 0.0\right) $$

Solar-radiation stress factor, (ff + rsmin/rsmax)/(1 + ff) with ff = 1.1 solar/(rgl xlai), floored at 1e-4. Tends to rsmin/rsmax in the dark and to 1 in bright light. Reported as 0 where CANRES is not called: WRF leaves it unassigned there (the reference driver’s zero-initialised local reads back 0) and nothing downstream reads it, because TRANSP is skipped too.

$$ rct = \mathrm{ifelse}\left(canres_{called} = 1.0, \mathrm{max}\left(1.0 - 0.0016 \cdot \left(par.topt - sfctmp\right)^{2.0}, 0.0001\right), 0.0\right) $$

Air-temperature stress factor, 1 - 0.0016 (topt - sfctmp)^2, floored at 1e-4 (Noilhan and Planton 1989). Reported as 0 where CANRES is not called: WRF leaves it unassigned there (the reference driver’s zero-initialised local reads back 0) and nothing downstream reads it, because TRANSP is skipped too.

$$ rcq = \mathrm{ifelse}\left(canres_{called} = 1.0, \mathrm{max}\left(\frac{1.0}{1.0 + hs \cdot \left(q2sat - q2\right)}, 0.01\right), 0.0\right) $$

Vapour-pressure-deficit stress factor, 1/(1 + hs (q2sat - q2)), floored at 0.01 (SSiB form). Reported as 0 where CANRES is not called: WRF leaves it unassigned there (the reference driver’s zero-initialised local reads back 0) and nothing downstream reads it, because TRANSP is skipped too.

$$ rcsoil = \mathrm{ifelse}\left(canres_{called} = 1.0, \mathrm{max}\left(\mathrm{ifelse}\left(\mathrm{>}\left(z_{root}, 0.0\right), \frac{\mathrm{integral}\left(gx_{root}\right)}{z_{root}}, 0.0\right), 0.0001\right), 0.0\right) $$

Root-zone soil-moisture stress factor: the thickness-weighted mean over the root zone of the layer stress gx, floored at 1e-4. Reported as 0 where CANRES is not called: WRF leaves it unassigned there (the reference driver’s zero-initialised local reads back 0) and nothing downstream reads it, because TRANSP is skipped too. With no root layers (nroot = 0, z_root = 0) CANRES’s sum over K = 1..NROOT is empty and the floor 1e-4 is what it returns; the z_root > 0 guard reproduces that instead of forming 0/0.

$$ canres_{called} = \mathrm{ifelse}\left(\mathrm{and}\left(\mathrm{>}\left(shdfac, 0.0\right), \mathrm{>}\left(xlai, 0.0\right)\right), 1.0, 0.0\right) $$

1 where SFLX calls CANRES, ‘IF ((SHDFAC > 0.) .AND. (XLAI > 0.))’ (module_sf_noahlsm.F:749), else 0.

$$ gx = \mathrm{max}\left(\mathrm{min}\left(\frac{sh2o - smcwlt}{smcref - smcwlt}, 1.0\right), 0.0\right) $$

Per-layer soil-moisture stress, (sh2o - smcwlt)/(smcref - smcwlt) clamped to [0, 1]: 0 at or below the wilting point, 1 at or above the field-capacity reference.

$$ gx_{root} = \mathrm{ifelse}\left(\mathrm{<}\left(zc, z_{root}\right), gx, 0.0\right) $$

gx masked to the root zone (zero in layers whose centre lies below z_root), the integrand of rcsoil.

$$ rc = \mathrm{ifelse}\left(canres_{called} = 1.0, \frac{rsmin}{\mathrm{ifelse}\left(\mathrm{>}\left(xlai, 0.0\right), xlai, 1.0\right) \cdot \mathrm{max}\left(rcs, 0.0001\right) \cdot \mathrm{max}\left(rct, 0.0001\right) \cdot \mathrm{max}\left(rcq, 0.01\right) \cdot \mathrm{max}\left(rcsoil, 0.0001\right)}, 0.0\right) $$

Bulk canopy resistance, rsmin/(xlai rcs rct rcq rcsoil). ZERO where CANRES is not called (shdfac <= 0 or xlai <= 0), SFLX’s ‘ELSE RC = 0.0’ (module_sf_noahlsm.F:754).

$$ rr = \frac{4.0 \cdot emissi \cdot par.sigma \cdot par.rd \cdot sfctmp^{4.0}}{wrf.cp \cdot sfcprs \cdot ch} + 1.0 $$

CANRES’s radiative-to-aerodynamic resistance ratio, 4 emissi sigma rd sfctmp^4/(cp sfcprs ch) + 1. A different quantity from SUBROUTINE PENMAN’s rr of the same name.

$$ delta = \frac{slv}{wrf.cp} \cdot dqsdt2 $$

Saturation-humidity slope expressed as the Penman psychrometric ratio, (slv/cp) dqsdt2.

$$ pc = \mathrm{ifelse}\left(canres_{called} = 1.0, \frac{rr + delta}{rr \cdot \left(1.0 + rc \cdot ch\right) + delta}, 0.0\right) $$

Plant coefficient: the factor by which the linearised Penman potential evaporation must be multiplied to give the Penman-Monteith transpiration that carries the canopy resistance rc. Reported as 0 where CANRES is not called: WRF leaves it unassigned there (the reference driver’s zero-initialised local reads back 0) and nothing downstream reads it, because TRANSP is skipped too.

$$ z_{sfc} = \mathrm{index}\left(ze, 1\right) $$

Lower boundary of the column, ze[1]: the free name the EarthSciDiscretizations column_nonuniform_1d integral rules match as the lower bound of a bottom-anchored integral (ESD #39).

$$ z_{top} = \mathrm{index}\left(ze, NLEV + 1\right) $$

Upper boundary of the column, ze[NLEV+1]: the free name the EarthSciDiscretizations column_nonuniform_1d integral rules match as the upper bound of a top-anchored integral (ESD #39).

Raw .esm

Raw .esm JSON (this component)
{
  "expression_template_imports": [
    {
      "ref": "${ESD_ROOT}/grids/column_nonuniform_1d/grid.esm",
      "bindings": {
        "NLEV": "NLEV"
      }
    },
    {
      "ref": "${ESD_ROOT}/grids/column_nonuniform_1d/rules/integral_lev_whole.esm",
      "bindings": {
        "NLEV": "NLEV"
      }
    }
  ],
  "subsystems": {
    "wrf": {
      "ref": "../../../lib/wrf_constants.esm"
    },
    "par": {
      "ref": "./noah_parameters.esm"
    }
  },
  "variables": {
    "ze": {
      "type": "unknown",
      "units": "m",
      "shape": [
        "lev_nodes"
      ],
      "description": "Soil layer interface DEPTHS below the ground surface, positive downward, ze[1] = 0 and increasing with the lev index (the grid's required orientation). The cumulative sum of WRF's SLDPTH; the negative of WRF's ZSOIL, prefixed by zero."
    },
    "zc": {
      "type": "unknown",
      "units": "m",
      "shape": [
        "lev"
      ],
      "description": "Soil layer centre depths, derived from ze by the grid's column_cell_center template."
    },
    "dz": {
      "type": "unknown",
      "units": "m",
      "shape": [
        "lev"
      ],
      "description": "Soil layer thicknesses, derived from ze by the grid's column_cell_thickness template. Equals WRF's SLDPTH."
    },
    "sh2o": {
      "type": "unknown",
      "units": "m^3/m^3",
      "shape": [
        "lev"
      ],
      "description": "Volumetric UNFROZEN soil water content of each layer, WRF's SH2O. This is what the call site binds to CANRES's SMC argument (the frozen-ground extension), so the total soil moisture SMC is deliberately not used here."
    },
    "sh2o_in": {
      "type": "parameter",
      "units": "m^3/m^3",
      "shape": [
        "lev"
      ],
      "default": 0.0,
      "description": "Coupling target (assembly input path): a shaped parameter that receives the unfrozen soil water from an assembly's ODE state through a document-level variable_map (param_to_var), when that document's mount-edge library lowers `input_sh2o` to it (esm-spec 9.7.10, 10.4; couplings/noah_column.esm). Unused by this component's own inline tests, which lower `input_sh2o` to dumped constants."
    },
    "z_root": {
      "type": "parameter",
      "units": "m",
      "default": 1.0,
      "description": "Depth of the bottom of the root zone below the surface, |ZSOIL(NROOT)| in WRF: the cumulative thickness of the first NROOT layers, with NROOT the vegetation type's root-layer count from VEGPARM.TBL. A layer belongs to the root zone iff its centre lies above this depth."
    },
    "solar": {
      "type": "parameter",
      "units": "W/m^2",
      "default": 500.0,
      "description": "Incoming (downward) shortwave radiation at the surface, WRF's SOLDN. Note the call site passes SOLDN, the DOWNWARD flux, not the net SOLNET that drives the energy balance."
    },
    "ch": {
      "type": "parameter",
      "units": "m/s",
      "default": 0.01,
      "description": "Surface exchange coefficient for heat and moisture from the surface-layer scheme, WRF's CH (a velocity scale, not a dimensionless coefficient)."
    },
    "sfctmp": {
      "type": "parameter",
      "units": "K",
      "default": 300.0,
      "description": "Air temperature at the lowest model level, WRF's SFCTMP."
    },
    "sfcprs": {
      "type": "parameter",
      "units": "Pa",
      "default": 100000.0,
      "description": "Air pressure at the lowest model level, WRF's SFCPRS."
    },
    "q2": {
      "type": "parameter",
      "units": "kg/kg",
      "default": 0.01,
      "description": "Specific humidity at the lowest model level, WRF's Q2."
    },
    "q2sat": {
      "type": "parameter",
      "units": "kg/kg",
      "default": 0.02,
      "description": "Saturation specific humidity at the lowest model level, WRF's Q2SAT, supplied by the driver."
    },
    "dqsdt2": {
      "type": "parameter",
      "units": "kg/(kg*K)",
      "default": 0.001,
      "description": "Slope of the saturation specific humidity with temperature at the lowest model level, WRF's DQSDT2, supplied by the driver."
    },
    "emissi": {
      "type": "parameter",
      "units": "1",
      "default": 0.985,
      "description": "Surface emissivity, WRF's EMISSI, entering the radiative term of rr."
    },
    "rsmin": {
      "type": "parameter",
      "units": "s/m",
      "default": 40.0,
      "description": "Minimum (unstressed) stomatal resistance of the vegetation type, VEGPARM.TBL RSTBL."
    },
    "rgl": {
      "type": "parameter",
      "units": "W/m^2",
      "default": 100.0,
      "description": "Solar radiation threshold of the vegetation type in the rcs stress function, VEGPARM.TBL RGLTBL."
    },
    "hs": {
      "type": "parameter",
      "units": "kg/kg",
      "default": 36.25,
      "description": "Vapour-pressure-deficit coefficient of the vegetation type in the rcq stress function, VEGPARM.TBL HSTBL. It multiplies a specific-humidity difference, so it carries the reciprocal of that unit."
    },
    "xlai": {
      "type": "parameter",
      "units": "1",
      "default": 5.68,
      "description": "Leaf area index, WRF's XLAI, interpolated in REDPRM between the vegetation type's LAIMIN and LAIMAX by the greenness fraction."
    },
    "shdfac": {
      "type": "parameter",
      "units": "1",
      "default": 0.5,
      "description": "Green vegetation fraction as REDPRM leaves it, WRF's SHDFAC (soil_veg_parameters' shdfac_eff). Read only by the gate: SFLX calls CANRES only where shdfac > 0 and xlai > 0."
    },
    "slv": {
      "type": "parameter",
      "units": "J/kg",
      "default": 2501000.0,
      "description": "Latent heat of vaporisation as CANRES defines it locally (its PARAMETER SLV = 2.501e6), used only in delta = (slv/cp) dqsdt2. Numerically equal to par.lvh2o but written separately because the Fortran declares it separately."
    },
    "rcs": {
      "type": "unknown",
      "units": "1",
      "description": "Solar-radiation stress factor, (ff + rsmin/rsmax)/(1 + ff) with ff = 1.1 solar/(rgl xlai), floored at 1e-4. Tends to rsmin/rsmax in the dark and to 1 in bright light. Reported as 0 where CANRES is not called: WRF leaves it unassigned there (the reference driver's zero-initialised local reads back 0) and nothing downstream reads it, because TRANSP is skipped too."
    },
    "rct": {
      "type": "unknown",
      "units": "1",
      "description": "Air-temperature stress factor, 1 - 0.0016 (topt - sfctmp)^2, floored at 1e-4 (Noilhan and Planton 1989). Reported as 0 where CANRES is not called: WRF leaves it unassigned there (the reference driver's zero-initialised local reads back 0) and nothing downstream reads it, because TRANSP is skipped too."
    },
    "rcq": {
      "type": "unknown",
      "units": "1",
      "description": "Vapour-pressure-deficit stress factor, 1/(1 + hs (q2sat - q2)), floored at 0.01 (SSiB form). Reported as 0 where CANRES is not called: WRF leaves it unassigned there (the reference driver's zero-initialised local reads back 0) and nothing downstream reads it, because TRANSP is skipped too."
    },
    "rcsoil": {
      "type": "unknown",
      "units": "1",
      "description": "Root-zone soil-moisture stress factor: the thickness-weighted mean over the root zone of the layer stress gx, floored at 1e-4. Reported as 0 where CANRES is not called: WRF leaves it unassigned there (the reference driver's zero-initialised local reads back 0) and nothing downstream reads it, because TRANSP is skipped too. With no root layers (nroot = 0, z_root = 0) CANRES's sum over K = 1..NROOT is empty and the floor 1e-4 is what it returns; the z_root > 0 guard reproduces that instead of forming 0/0."
    },
    "canres_called": {
      "type": "unknown",
      "units": "1",
      "description": "1 where SFLX calls CANRES, 'IF ((SHDFAC > 0.) .AND. (XLAI > 0.))' (module_sf_noahlsm.F:749), else 0."
    },
    "gx": {
      "type": "unknown",
      "units": "1",
      "shape": [
        "lev"
      ],
      "description": "Per-layer soil-moisture stress, (sh2o - smcwlt)/(smcref - smcwlt) clamped to [0, 1]: 0 at or below the wilting point, 1 at or above the field-capacity reference."
    },
    "gx_root": {
      "type": "unknown",
      "units": "1",
      "shape": [
        "lev"
      ],
      "description": "gx masked to the root zone (zero in layers whose centre lies below z_root), the integrand of rcsoil."
    },
    "smcwlt": {
      "type": "parameter",
      "units": "m^3/m^3",
      "default": 0.084,
      "description": "Soil wilting point of the soil type, SOILPARM.TBL WLTSMC."
    },
    "smcref": {
      "type": "parameter",
      "units": "m^3/m^3",
      "default": 0.36,
      "description": "Soil reference moisture (field capacity) of the soil type, SOILPARM.TBL REFSMC, at and above which transpiration is unstressed."
    },
    "rc": {
      "type": "unknown",
      "units": "s/m",
      "description": "Bulk canopy resistance, rsmin/(xlai rcs rct rcq rcsoil). ZERO where CANRES is not called (shdfac <= 0 or xlai <= 0), SFLX's 'ELSE RC = 0.0' (module_sf_noahlsm.F:754)."
    },
    "rr": {
      "type": "unknown",
      "units": "1",
      "description": "CANRES's radiative-to-aerodynamic resistance ratio, 4 emissi sigma rd sfctmp^4/(cp sfcprs ch) + 1. A different quantity from SUBROUTINE PENMAN's rr of the same name."
    },
    "delta": {
      "type": "unknown",
      "units": "1",
      "description": "Saturation-humidity slope expressed as the Penman psychrometric ratio, (slv/cp) dqsdt2."
    },
    "pc": {
      "type": "unknown",
      "units": "1",
      "description": "Plant coefficient: the factor by which the linearised Penman potential evaporation must be multiplied to give the Penman-Monteith transpiration that carries the canopy resistance rc. Reported as 0 where CANRES is not called: WRF leaves it unassigned there (the reference driver's zero-initialised local reads back 0) and nothing downstream reads it, because TRANSP is skipped too."
    },
    "z_sfc": {
      "type": "unknown",
      "units": "m",
      "description": "Lower boundary of the column, ze[1]: the free name the EarthSciDiscretizations column_nonuniform_1d integral rules match as the lower bound of a bottom-anchored integral (ESD #39)."
    },
    "z_top": {
      "type": "unknown",
      "units": "m",
      "description": "Upper boundary of the column, ze[NLEV+1]: the free name the EarthSciDiscretizations column_nonuniform_1d integral rules match as the upper bound of a top-anchored integral (ESD #39)."
    }
  },
  "equations": [
    {
      "lhs": "ze",
      "rhs": {
        "op": "input_ze",
        "args": []
      }
    },
    {
      "lhs": "zc",
      "rhs": {
        "op": "apply_expression_template",
        "name": "column_cell_center",
        "args": [],
        "bindings": {
          "ze": "ze"
        }
      }
    },
    {
      "lhs": "dz",
      "rhs": {
        "op": "apply_expression_template",
        "name": "column_cell_thickness",
        "args": [],
        "bindings": {
          "ze": "ze"
        }
      }
    },
    {
      "lhs": "sh2o",
      "rhs": {
        "op": "input_sh2o",
        "args": []
      }
    },
    {
      "lhs": "canres_called",
      "rhs": {
        "op": "ifelse",
        "args": [
          {
            "op": "and",
            "args": [
              {
                "op": ">",
                "args": [
                  "shdfac",
                  0.0
                ]
              },
              {
                "op": ">",
                "args": [
                  "xlai",
                  0.0
                ]
              }
            ]
          },
          1.0,
          0.0
        ]
      }
    },
    {
      "lhs": "rcs",
      "rhs": {
        "op": "ifelse",
        "args": [
          {
            "op": "==",
            "args": [
              "canres_called",
              1.0
            ]
          },
          {
            "op": "max",
            "args": [
              {
                "op": "/",
                "args": [
                  {
                    "op": "+",
                    "args": [
                      {
                        "op": "/",
                        "args": [
                          {
                            "op": "*",
                            "args": [
                              1.1,
                              "solar"
                            ]
                          },
                          {
                            "op": "*",
                            "args": [
                              "rgl",
                              {
                                "op": "ifelse",
                                "args": [
                                  {
                                    "op": ">",
                                    "args": [
                                      "xlai",
                                      0.0
                                    ]
                                  },
                                  "xlai",
                                  1.0
                                ]
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "op": "/",
                        "args": [
                          "rsmin",
                          "par.rsmax"
                        ]
                      }
                    ]
                  },
                  {
                    "op": "+",
                    "args": [
                      1.0,
                      {
                        "op": "/",
                        "args": [
                          {
                            "op": "*",
                            "args": [
                              1.1,
                              "solar"
                            ]
                          },
                          {
                            "op": "*",
                            "args": [
                              "rgl",
                              {
                                "op": "ifelse",
                                "args": [
                                  {
                                    "op": ">",
                                    "args": [
                                      "xlai",
                                      0.0
                                    ]
                                  },
                                  "xlai",
                                  1.0
                                ]
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                ]
              },
              0.0001
            ]
          },
          0.0
        ]
      }
    },
    {
      "lhs": "rct",
      "rhs": {
        "op": "ifelse",
        "args": [
          {
            "op": "==",
            "args": [
              "canres_called",
              1.0
            ]
          },
          {
            "op": "max",
            "args": [
              {
                "op": "-",
                "args": [
                  1.0,
                  {
                    "op": "*",
                    "args": [
                      0.0016,
                      {
                        "op": "^",
                        "args": [
                          {
                            "op": "-",
                            "args": [
                              "par.topt",
                              "sfctmp"
                            ]
                          },
                          2.0
                        ]
                      }
                    ]
                  }
                ]
              },
              0.0001
            ]
          },
          0.0
        ]
      }
    },
    {
      "lhs": "rcq",
      "rhs": {
        "op": "ifelse",
        "args": [
          {
            "op": "==",
            "args": [
              "canres_called",
              1.0
            ]
          },
          {
            "op": "max",
            "args": [
              {
                "op": "/",
                "args": [
                  1.0,
                  {
                    "op": "+",
                    "args": [
                      1.0,
                      {
                        "op": "*",
                        "args": [
                          "hs",
                          {
                            "op": "-",
                            "args": [
                              "q2sat",
                              "q2"
                            ]
                          }
                        ]
                      }
                    ]
                  }
                ]
              },
              0.01
            ]
          },
          0.0
        ]
      }
    },
    {
      "lhs": "gx",
      "rhs": {
        "op": "max",
        "args": [
          {
            "op": "min",
            "args": [
              {
                "op": "/",
                "args": [
                  {
                    "op": "-",
                    "args": [
                      "sh2o",
                      "smcwlt"
                    ]
                  },
                  {
                    "op": "-",
                    "args": [
                      "smcref",
                      "smcwlt"
                    ]
                  }
                ]
              },
              1.0
            ]
          },
          0.0
        ]
      }
    },
    {
      "lhs": "gx_root",
      "rhs": {
        "op": "ifelse",
        "args": [
          {
            "op": "<",
            "args": [
              "zc",
              "z_root"
            ]
          },
          "gx",
          0.0
        ]
      }
    },
    {
      "lhs": "rcsoil",
      "rhs": {
        "op": "ifelse",
        "args": [
          {
            "op": "==",
            "args": [
              "canres_called",
              1.0
            ]
          },
          {
            "op": "max",
            "args": [
              {
                "op": "ifelse",
                "args": [
                  {
                    "op": ">",
                    "args": [
                      "z_root",
                      0.0
                    ]
                  },
                  {
                    "op": "/",
                    "args": [
                      {
                        "op": "integral",
                        "args": [
                          "gx_root"
                        ],
                        "var": "lev",
                        "lower": "z_sfc",
                        "upper": "z_top"
                      },
                      "z_root"
                    ]
                  },
                  0.0
                ]
              },
              0.0001
            ]
          },
          0.0
        ]
      }
    },
    {
      "lhs": "rc",
      "rhs": {
        "op": "ifelse",
        "args": [
          {
            "op": "==",
            "args": [
              "canres_called",
              1.0
            ]
          },
          {
            "op": "/",
            "args": [
              "rsmin",
              {
                "op": "*",
                "args": [
                  {
                    "op": "*",
                    "args": [
                      {
                        "op": "*",
                        "args": [
                          {
                            "op": "*",
                            "args": [
                              {
                                "op": "ifelse",
                                "args": [
                                  {
                                    "op": ">",
                                    "args": [
                                      "xlai",
                                      0.0
                                    ]
                                  },
                                  "xlai",
                                  1.0
                                ]
                              },
                              {
                                "op": "max",
                                "args": [
                                  "rcs",
                                  0.0001
                                ]
                              }
                            ]
                          },
                          {
                            "op": "max",
                            "args": [
                              "rct",
                              0.0001
                            ]
                          }
                        ]
                      },
                      {
                        "op": "max",
                        "args": [
                          "rcq",
                          0.01
                        ]
                      }
                    ]
                  },
                  {
                    "op": "max",
                    "args": [
                      "rcsoil",
                      0.0001
                    ]
                  }
                ]
              }
            ]
          },
          0.0
        ]
      }
    },
    {
      "lhs": "rr",
      "rhs": {
        "op": "+",
        "args": [
          {
            "op": "/",
            "args": [
              {
                "op": "*",
                "args": [
                  {
                    "op": "*",
                    "args": [
                      {
                        "op": "*",
                        "args": [
                          4.0,
                          "emissi"
                        ]
                      },
                      {
                        "op": "*",
                        "args": [
                          "par.sigma",
                          "par.rd"
                        ]
                      }
                    ]
                  },
                  {
                    "op": "^",
                    "args": [
                      "sfctmp",
                      4.0
                    ]
                  }
                ]
              },
              {
                "op": "*",
                "args": [
                  {
                    "op": "*",
                    "args": [
                      "wrf.cp",
                      "sfcprs"
                    ]
                  },
                  "ch"
                ]
              }
            ]
          },
          1.0
        ]
      }
    },
    {
      "lhs": "delta",
      "rhs": {
        "op": "*",
        "args": [
          {
            "op": "/",
            "args": [
              "slv",
              "wrf.cp"
            ]
          },
          "dqsdt2"
        ]
      }
    },
    {
      "lhs": "pc",
      "rhs": {
        "op": "ifelse",
        "args": [
          {
            "op": "==",
            "args": [
              "canres_called",
              1.0
            ]
          },
          {
            "op": "/",
            "args": [
              {
                "op": "+",
                "args": [
                  "rr",
                  "delta"
                ]
              },
              {
                "op": "+",
                "args": [
                  {
                    "op": "*",
                    "args": [
                      "rr",
                      {
                        "op": "+",
                        "args": [
                          1.0,
                          {
                            "op": "*",
                            "args": [
                              "rc",
                              "ch"
                            ]
                          }
                        ]
                      }
                    ]
                  },
                  "delta"
                ]
              }
            ]
          },
          0.0
        ]
      }
    },
    {
      "lhs": "z_sfc",
      "rhs": {
        "op": "index",
        "args": [
          "ze",
          1
        ]
      }
    },
    {
      "lhs": "z_top",
      "rhs": {
        "op": "index",
        "args": [
          "ze",
          {
            "op": "+",
            "args": [
              "NLEV",
              1
            ]
          }
        ]
      }
    }
  ],
  "tests": [
    {
      "id": "chem170_scm_step1",
      "description": "Reference: WRF 4.8 em_scm_xy single-column run at chem_opt = 170 with Noah (sf_surface_physics = 2, num_soil_layers = 4, USGS land use, silt loam, dryland cropland, shdfac = 0.5) -- data/eqwefic/chem170_scm, dumped by the instrumented ctessum-claude/WRF fork (branch earthsciml-instrumented-chem170, commit ac6d4cc, module_esm_dump hooks around SFLX in phys/module_sf_noahdrv.F) and replayed through the real64 (-fdefault-real-8) standalone kernels/noah_driver at ESM_DT = 0.01 s. Inputs are the dumped SFLX arguments (real32 values widened); every expected value is the real64 replay. CANRES is evaluated at the INPUT state (WRF calls it before NOPAC advances anything), so none of these six outputs depends on dt and the replay value equals the dumped WRF value to real32 round-off. step 1, 06 LST, pre-dawn: solar radiation essentially absent, so rcs sits at its dark floor rsmin/rsmax and rc is large.",
      "parameter_overrides": {
        "z_root": 1.000000037252903,
        "solar": 83.75596618652344,
        "ch": 2.107988257193938e-05,
        "sfctmp": 299.7296142578125,
        "sfcprs": 99642.484375,
        "q2": 0.013806705363094807,
        "q2sat": 0.021996596828103065,
        "dqsdt2": 0.0012975001009181142,
        "emissi": 0.9850000143051147,
        "rsmin": 40.0,
        "rgl": 100.0,
        "hs": 36.25,
        "xlai": 5.679999828338623,
        "smcwlt": 0.08399999886751175,
        "smcref": 0.36000001430511475
      },
      "expression_template_imports": [
        {
          "ref": "./tests/chem170_scm_step1_inputs.esm"
        }
      ],
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "rcs",
          "time": 0.0,
          "expected": 0.14644893628626737,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rct",
          "time": 0.0,
          "expected": 0.9952134952306747,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcq",
          "time": 0.0,
          "expected": 0.7710792445213094,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcsoil",
          "time": 0.0,
          "expected": 0.7826086991732422,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rc",
          "time": 0.0,
          "expected": 80.06920315530635,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "pc",
          "time": 0.0,
          "expected": 0.9983367740100969,
          "tolerance": {
            "rel": 1e-09
          }
        }
      ]
    },
    {
      "id": "chem170_scm_step60",
      "description": "Reference: WRF 4.8 em_scm_xy single-column run at chem_opt = 170 with Noah (sf_surface_physics = 2, num_soil_layers = 4, USGS land use, silt loam, dryland cropland, shdfac = 0.5) -- data/eqwefic/chem170_scm, dumped by the instrumented ctessum-claude/WRF fork (branch earthsciml-instrumented-chem170, commit ac6d4cc, module_esm_dump hooks around SFLX in phys/module_sf_noahdrv.F) and replayed through the real64 (-fdefault-real-8) standalone kernels/noah_driver at ESM_DT = 0.01 s. Inputs are the dumped SFLX arguments (real32 values widened); every expected value is the real64 replay. CANRES is evaluated at the INPUT state (WRF calls it before NOPAC advances anything), so none of these six outputs depends on dt and the replay value equals the dumped WRF value to real32 round-off. step 60, 07 LST, just after sunrise: rcs is climbing out of the dark floor.",
      "parameter_overrides": {
        "z_root": 1.000000037252903,
        "solar": 64.72686004638672,
        "ch": 0.00029818981420248747,
        "sfctmp": 297.8214111328125,
        "sfcprs": 99616.421875,
        "q2": 0.014198900200426579,
        "q2sat": 0.01961629092693329,
        "dqsdt2": 0.0011736198794096708,
        "emissi": 0.9850000143051147,
        "rsmin": 40.0,
        "rgl": 100.0,
        "hs": 36.25,
        "xlai": 5.679999828338623,
        "smcwlt": 0.08399999886751175,
        "smcref": 0.36000001430511475
      },
      "expression_template_imports": [
        {
          "ref": "./tests/chem170_scm_step60_inputs.esm"
        }
      ],
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "rcs",
          "time": 0.0,
          "expected": 0.11849749959270825,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rct",
          "time": 0.0,
          "expected": 0.9999489696264267,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcq",
          "time": 0.0,
          "expected": 0.8358545396056528,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcsoil",
          "time": 0.0,
          "expected": 0.7887696809931758,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rc",
          "time": 0.0,
          "expected": 90.1454333666533,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "pc",
          "time": 0.0,
          "expected": 0.9774125096355708,
          "tolerance": {
            "rel": 1e-09
          }
        }
      ]
    },
    {
      "id": "chem170_scm_step230",
      "description": "Reference: WRF 4.8 em_scm_xy single-column run at chem_opt = 170 with Noah (sf_surface_physics = 2, num_soil_layers = 4, USGS land use, silt loam, dryland cropland, shdfac = 0.5) -- data/eqwefic/chem170_scm, dumped by the instrumented ctessum-claude/WRF fork (branch earthsciml-instrumented-chem170, commit ac6d4cc, module_esm_dump hooks around SFLX in phys/module_sf_noahdrv.F) and replayed through the real64 (-fdefault-real-8) standalone kernels/noah_driver at ESM_DT = 0.01 s. Inputs are the dumped SFLX arguments (real32 values widened); every expected value is the real64 replay. CANRES is evaluated at the INPUT state (WRF calls it before NOPAC advances anything), so none of these six outputs depends on dt and the replay value equals the dumped WRF value to real32 round-off. step 230, 09 LST, strong mid-morning insolation: rcs near its bright-light limit and rc at its smallest.",
      "parameter_overrides": {
        "z_root": 1.000000037252903,
        "solar": 689.7186279296875,
        "ch": 0.012768357992172241,
        "sfctmp": 300.14801025390625,
        "sfcprs": 99621.1796875,
        "q2": 0.01483145821839571,
        "q2sat": 0.022557785734534264,
        "dqsdt2": 0.0013264893786981702,
        "emissi": 0.9850000143051147,
        "rsmin": 40.0,
        "rgl": 100.0,
        "hs": 36.25,
        "xlai": 5.679999828338623,
        "smcwlt": 0.08399999886751175,
        "smcref": 0.36000001430511475
      },
      "expression_template_imports": [
        {
          "ref": "./tests/chem170_scm_step230_inputs.esm"
        }
      ],
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "rcs",
          "time": 0.0,
          "expected": 0.5752920562844552,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rct",
          "time": 0.0,
          "expected": 0.9926176831185818,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcq",
          "time": 0.0,
          "expected": 0.7812015578988876,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcsoil",
          "time": 0.0,
          "expected": 0.787854382676924,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rc",
          "time": 0.0,
          "expected": 20.03697829778567,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "pc",
          "time": 0.0,
          "expected": 0.9289857097824757,
          "tolerance": {
            "rel": 1e-09
          }
        }
      ]
    },
    {
      "id": "chem170_scm_step364",
      "description": "Reference: WRF 4.8 em_scm_xy single-column run at chem_opt = 170 with Noah (sf_surface_physics = 2, num_soil_layers = 4, USGS land use, silt loam, dryland cropland, shdfac = 0.5) -- data/eqwefic/chem170_scm, dumped by the instrumented ctessum-claude/WRF fork (branch earthsciml-instrumented-chem170, commit ac6d4cc, module_esm_dump hooks around SFLX in phys/module_sf_noahdrv.F) and replayed through the real64 (-fdefault-real-8) standalone kernels/noah_driver at ESM_DT = 0.01 s. Inputs are the dumped SFLX arguments (real32 values widened); every expected value is the real64 replay. CANRES is evaluated at the INPUT state (WRF calls it before NOPAC advances anything), so none of these six outputs depends on dt and the replay value equals the dumped WRF value to real32 round-off. step 364, 12 LST, local noon with light convective rain.",
      "parameter_overrides": {
        "z_root": 1.000000037252903,
        "solar": 495.4375305175781,
        "ch": 0.01244852039963007,
        "sfctmp": 301.68988037109375,
        "sfcprs": 99629.5,
        "q2": 0.015065288171172142,
        "q2sat": 0.024715861305594444,
        "dqsdt2": 0.0014369646087288857,
        "emissi": 0.9850000143051147,
        "rsmin": 40.0,
        "rgl": 100.0,
        "hs": 36.25,
        "xlai": 5.679999828338623,
        "smcwlt": 0.08399999886751175,
        "smcref": 0.36000001430511475
      },
      "expression_template_imports": [
        {
          "ref": "./tests/chem170_scm_step364_inputs.esm"
        }
      ],
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "rcs",
          "time": 0.0,
          "expected": 0.4937417187693536,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rct",
          "time": 0.0,
          "expected": 0.9782156525552272,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcq",
          "time": 0.0,
          "expected": 0.7408322329053469,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcsoil",
          "time": 0.0,
          "expected": 0.785226649461995,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rc",
          "time": 0.0,
          "expected": 25.064689913431657,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "pc",
          "time": 0.0,
          "expected": 0.9183255653926149,
          "tolerance": {
            "rel": 1e-09
          }
        }
      ]
    },
    {
      "id": "chem170_scm_step601",
      "description": "Reference: WRF 4.8 em_scm_xy single-column run at chem_opt = 170 with Noah (sf_surface_physics = 2, num_soil_layers = 4, USGS land use, silt loam, dryland cropland, shdfac = 0.5) -- data/eqwefic/chem170_scm, dumped by the instrumented ctessum-claude/WRF fork (branch earthsciml-instrumented-chem170, commit ac6d4cc, module_esm_dump hooks around SFLX in phys/module_sf_noahdrv.F) and replayed through the real64 (-fdefault-real-8) standalone kernels/noah_driver at ESM_DT = 0.01 s. Inputs are the dumped SFLX arguments (real32 values widened); every expected value is the real64 replay. CANRES is evaluated at the INPUT state (WRF calls it before NOPAC advances anything), so none of these six outputs depends on dt and the replay value equals the dumped WRF value to real32 round-off. step 601, 16 LST, afternoon with the heaviest dumped precipitation rate.",
      "parameter_overrides": {
        "z_root": 1.000000037252903,
        "solar": 248.477294921875,
        "ch": 0.009639615193009377,
        "sfctmp": 299.3103332519531,
        "sfcprs": 99612.390625,
        "q2": 0.015172002837061882,
        "q2sat": 0.02145797200500965,
        "dqsdt2": 0.0012696676421910524,
        "emissi": 0.9850000143051147,
        "rsmin": 40.0,
        "rgl": 100.0,
        "hs": 36.25,
        "xlai": 5.679999828338623,
        "smcwlt": 0.08399999886751175,
        "smcref": 0.36000001430511475
      },
      "expression_template_imports": [
        {
          "ref": "./tests/chem170_scm_step601_inputs.esm"
        }
      ],
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "rcs",
          "time": 0.0,
          "expected": 0.33027548436445076,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rct",
          "time": 0.0,
          "expected": 0.9972528428301215,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcq",
          "time": 0.0,
          "expected": 0.8144208640159992,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcsoil",
          "time": 0.0,
          "expected": 0.787696970197188,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rc",
          "time": 0.0,
          "expected": 33.328976844375454,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "pc",
          "time": 0.0,
          "expected": 0.9050211141383581,
          "tolerance": {
            "rel": 1e-09
          }
        }
      ]
    },
    {
      "id": "chem170_scm_step639",
      "description": "Reference: WRF 4.8 em_scm_xy single-column run at chem_opt = 170 with Noah (sf_surface_physics = 2, num_soil_layers = 4, USGS land use, silt loam, dryland cropland, shdfac = 0.5) -- data/eqwefic/chem170_scm, dumped by the instrumented ctessum-claude/WRF fork (branch earthsciml-instrumented-chem170, commit ac6d4cc, module_esm_dump hooks around SFLX in phys/module_sf_noahdrv.F) and replayed through the real64 (-fdefault-real-8) standalone kernels/noah_driver at ESM_DT = 0.01 s. Inputs are the dumped SFLX arguments (real32 values widened); every expected value is the real64 replay. CANRES is evaluated at the INPUT state (WRF calls it before NOPAC advances anything), so none of these six outputs depends on dt and the replay value equals the dumped WRF value to real32 round-off. step 639, 16 LST, shallow convection.",
      "parameter_overrides": {
        "z_root": 1.000000037252903,
        "solar": 214.84182739257812,
        "ch": 0.009273719042539597,
        "sfctmp": 299.25006103515625,
        "sfcprs": 99611.859375,
        "q2": 0.014930164441466331,
        "q2sat": 0.02138068713247776,
        "dqsdt2": 0.0012656603939831257,
        "emissi": 0.9850000143051147,
        "rsmin": 40.0,
        "rgl": 100.0,
        "hs": 36.25,
        "xlai": 5.679999828338623,
        "smcwlt": 0.08399999886751175,
        "smcref": 0.36000001430511475
      },
      "expression_template_imports": [
        {
          "ref": "./tests/chem170_scm_step639_inputs.esm"
        }
      ],
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "rcs",
          "time": 0.0,
          "expected": 0.2994681411530351,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rct",
          "time": 0.0,
          "expected": 0.9974997558534145,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcq",
          "time": 0.0,
          "expected": 0.8104834756695186,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcsoil",
          "time": 0.0,
          "expected": 0.7888273203873735,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rc",
          "time": 0.0,
          "expected": 36.874159967607056,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "pc",
          "time": 0.0,
          "expected": 0.8985147606190831,
          "tolerance": {
            "rel": 1e-09
          }
        }
      ]
    },
    {
      "id": "chem170_scm_step689",
      "description": "Reference: WRF 4.8 em_scm_xy single-column run at chem_opt = 170 with Noah (sf_surface_physics = 2, num_soil_layers = 4, USGS land use, silt loam, dryland cropland, shdfac = 0.5) -- data/eqwefic/chem170_scm, dumped by the instrumented ctessum-claude/WRF fork (branch earthsciml-instrumented-chem170, commit ac6d4cc, module_esm_dump hooks around SFLX in phys/module_sf_noahdrv.F) and replayed through the real64 (-fdefault-real-8) standalone kernels/noah_driver at ESM_DT = 0.01 s. Inputs are the dumped SFLX arguments (real32 values widened); every expected value is the real64 replay. CANRES is evaluated at the INPUT state (WRF calls it before NOPAC advances anything), so none of these six outputs depends on dt and the replay value equals the dumped WRF value to real32 round-off. step 689, 17 LST, late afternoon with the sun dropping.",
      "parameter_overrides": {
        "z_root": 1.000000037252903,
        "solar": 190.13648986816406,
        "ch": 0.008500252850353718,
        "sfctmp": 299.45379638671875,
        "sfcprs": 99608.4140625,
        "q2": 0.015095737762749195,
        "q2sat": 0.02164408378303051,
        "dqsdt2": 0.0012793182395398617,
        "emissi": 0.9850000143051147,
        "rsmin": 40.0,
        "rgl": 100.0,
        "hs": 36.25,
        "xlai": 5.679999828338623,
        "smcwlt": 0.08399999886751175,
        "smcref": 0.36000001430511475
      },
      "expression_template_imports": [
        {
          "ref": "./tests/chem170_scm_step689_inputs.esm"
        }
      ],
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "rcs",
          "time": 0.0,
          "expected": 0.274971505187785,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rct",
          "time": 0.0,
          "expected": 0.9966183617055416,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcq",
          "time": 0.0,
          "expected": 0.808160779599604,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcsoil",
          "time": 0.0,
          "expected": 0.7887554169130607,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rc",
          "time": 0.0,
          "expected": 40.3139143171538,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "pc",
          "time": 0.0,
          "expected": 0.8969601398024848,
          "tolerance": {
            "rel": 1e-09
          }
        }
      ]
    },
    {
      "id": "chem170_scm_step918",
      "description": "Reference: WRF 4.8 em_scm_xy single-column run at chem_opt = 170 with Noah (sf_surface_physics = 2, num_soil_layers = 4, USGS land use, silt loam, dryland cropland, shdfac = 0.5) -- data/eqwefic/chem170_scm, dumped by the instrumented ctessum-claude/WRF fork (branch earthsciml-instrumented-chem170, commit ac6d4cc, module_esm_dump hooks around SFLX in phys/module_sf_noahdrv.F) and replayed through the real64 (-fdefault-real-8) standalone kernels/noah_driver at ESM_DT = 0.01 s. Inputs are the dumped SFLX arguments (real32 values widened); every expected value is the real64 replay. CANRES is evaluated at the INPUT state (WRF calls it before NOPAC advances anything), so none of these six outputs depends on dt and the replay value equals the dumped WRF value to real32 round-off. step 918, 21 LST, night: solar zero, rcs on the dark floor, rc over 1300 s/m.",
      "parameter_overrides": {
        "z_root": 1.000000037252903,
        "solar": 0.0,
        "ch": 0.00012309601879678667,
        "sfctmp": 298.3406066894531,
        "sfcprs": 99612.109375,
        "q2": 0.015314576216042042,
        "q2sat": 0.0202424768358469,
        "dqsdt2": 0.0012064079055562615,
        "emissi": 0.9850000143051147,
        "rsmin": 40.0,
        "rgl": 100.0,
        "hs": 36.25,
        "xlai": 5.679999828338623,
        "smcwlt": 0.08399999886751175,
        "smcref": 0.36000001430511475
      },
      "expression_template_imports": [
        {
          "ref": "./tests/chem170_scm_step918_inputs.esm"
        }
      ],
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "rcs",
          "time": 0.0,
          "expected": 0.008,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rct",
          "time": 0.0,
          "expected": 0.9998143793329597,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcq",
          "time": 0.0,
          "expected": 0.8484380782303244,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcsoil",
          "time": 0.0,
          "expected": 0.7884803717818945,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rc",
          "time": 0.0,
          "expected": 1316.1072002157673,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "pc",
          "time": 0.0,
          "expected": 0.8686188033405229,
          "tolerance": {
            "rel": 1e-09
          }
        }
      ]
    },
    {
      "id": "chem170_scm_step1080",
      "description": "Reference: WRF 4.8 em_scm_xy single-column run at chem_opt = 170 with Noah (sf_surface_physics = 2, num_soil_layers = 4, USGS land use, silt loam, dryland cropland, shdfac = 0.5) -- data/eqwefic/chem170_scm, dumped by the instrumented ctessum-claude/WRF fork (branch earthsciml-instrumented-chem170, commit ac6d4cc, module_esm_dump hooks around SFLX in phys/module_sf_noahdrv.F) and replayed through the real64 (-fdefault-real-8) standalone kernels/noah_driver at ESM_DT = 0.01 s. Inputs are the dumped SFLX arguments (real32 values widened); every expected value is the real64 replay. CANRES is evaluated at the INPUT state (WRF calls it before NOPAC advances anything), so none of these six outputs depends on dt and the replay value equals the dumped WRF value to real32 round-off. step 1080, 00 LST, deep night.",
      "parameter_overrides": {
        "z_root": 1.000000037252903,
        "solar": 0.0,
        "ch": 0.00010150901653105393,
        "sfctmp": 297.35552978515625,
        "sfcprs": 99613.140625,
        "q2": 0.015274709090590477,
        "q2sat": 0.019070520997047424,
        "dqsdt2": 0.0011449416633695364,
        "emissi": 0.9850000143051147,
        "rsmin": 40.0,
        "rgl": 100.0,
        "hs": 36.25,
        "xlai": 5.679999828338623,
        "smcwlt": 0.08399999886751175,
        "smcref": 0.36000001430511475
      },
      "expression_template_imports": [
        {
          "ref": "./tests/chem170_scm_step1080_inputs.esm"
        }
      ],
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "rcs",
          "time": 0.0,
          "expected": 0.008,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rct",
          "time": 0.0,
          "expected": 0.9993354530274868,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcq",
          "time": 0.0,
          "expected": 0.8790450056676076,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcsoil",
          "time": 0.0,
          "expected": 0.7883308310958826,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rc",
          "time": 0.0,
          "expected": 1271.1323281980165,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "pc",
          "time": 0.0,
          "expected": 0.8911715143401143,
          "tolerance": {
            "rel": 1e-09
          }
        }
      ]
    },
    {
      "id": "chem170_scm_step1621",
      "description": "Reference: WRF 4.8 em_scm_xy single-column run at chem_opt = 170 with Noah (sf_surface_physics = 2, num_soil_layers = 4, USGS land use, silt loam, dryland cropland, shdfac = 0.5) -- data/eqwefic/chem170_scm, dumped by the instrumented ctessum-claude/WRF fork (branch earthsciml-instrumented-chem170, commit ac6d4cc, module_esm_dump hooks around SFLX in phys/module_sf_noahdrv.F) and replayed through the real64 (-fdefault-real-8) standalone kernels/noah_driver at ESM_DT = 0.01 s. Inputs are the dumped SFLX arguments (real32 values widened); every expected value is the real64 replay. CANRES is evaluated at the INPUT state (WRF calls it before NOPAC advances anything), so none of these six outputs depends on dt and the replay value equals the dumped WRF value to real32 round-off. step 1621, 09 LST of the second day, strongest insolation of the set.",
      "parameter_overrides": {
        "z_root": 1.000000037252903,
        "solar": 609.1930541992188,
        "ch": 0.012447330169379711,
        "sfctmp": 299.1268310546875,
        "sfcprs": 99615.1875,
        "q2": 0.015753425657749176,
        "q2sat": 0.021222492679953575,
        "dqsdt2": 0.0012574450811371207,
        "emissi": 0.9850000143051147,
        "rsmin": 40.0,
        "rgl": 100.0,
        "hs": 36.25,
        "xlai": 5.679999828338623,
        "smcwlt": 0.08399999886751175,
        "smcref": 0.36000001430511475
      },
      "expression_template_imports": [
        {
          "ref": "./tests/chem170_scm_step1621_inputs.esm"
        }
      ],
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "rcs",
          "time": 0.0,
          "expected": 0.5449072239641457,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rct",
          "time": 0.0,
          "expected": 0.997968402838707,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcq",
          "time": 0.0,
          "expected": 0.8345478232718212,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcsoil",
          "time": 0.0,
          "expected": 0.7871569868187218,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rc",
          "time": 0.0,
          "expected": 19.7133180527707,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "pc",
          "time": 0.0,
          "expected": 0.9291297127240808,
          "tolerance": {
            "rel": 1e-09
          }
        }
      ]
    },
    {
      "id": "chem170_scm_step1730",
      "description": "Reference: WRF 4.8 em_scm_xy single-column run at chem_opt = 170 with Noah (sf_surface_physics = 2, num_soil_layers = 4, USGS land use, silt loam, dryland cropland, shdfac = 0.5) -- data/eqwefic/chem170_scm, dumped by the instrumented ctessum-claude/WRF fork (branch earthsciml-instrumented-chem170, commit ac6d4cc, module_esm_dump hooks around SFLX in phys/module_sf_noahdrv.F) and replayed through the real64 (-fdefault-real-8) standalone kernels/noah_driver at ESM_DT = 0.01 s. Inputs are the dumped SFLX arguments (real32 values widened); every expected value is the real64 replay. CANRES is evaluated at the INPUT state (WRF calls it before NOPAC advances anything), so none of these six outputs depends on dt and the replay value equals the dumped WRF value to real32 round-off. step 1730, 10 LST second day, deep convection.",
      "parameter_overrides": {
        "z_root": 1.000000037252903,
        "solar": 416.8190612792969,
        "ch": 0.011664578691124916,
        "sfctmp": 300.72509765625,
        "sfcprs": 99620.203125,
        "q2": 0.01549688819795847,
        "q2sat": 0.02334599755704403,
        "dqsdt2": 0.0013670005137100816,
        "emissi": 0.9850000143051147,
        "rsmin": 40.0,
        "rgl": 100.0,
        "hs": 36.25,
        "xlai": 5.679999828338623,
        "smcwlt": 0.08399999886751175,
        "smcref": 0.36000001430511475
      },
      "expression_template_imports": [
        {
          "ref": "./tests/chem170_scm_step1730_inputs.esm"
        }
      ],
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "rcs",
          "time": 0.0,
          "expected": 0.45109063675113453,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rct",
          "time": 0.0,
          "expected": 0.9881181484222412,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcq",
          "time": 0.0,
          "expected": 0.7784947281841496,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcsoil",
          "time": 0.0,
          "expected": 0.7855575956154772,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rc",
          "time": 0.0,
          "expected": 25.83481001133803,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "pc",
          "time": 0.0,
          "expected": 0.9174324991337119,
          "tolerance": {
            "rel": 1e-09
          }
        }
      ]
    },
    {
      "id": "chem170_scm_step1801",
      "description": "Reference: WRF 4.8 em_scm_xy single-column run at chem_opt = 170 with Noah (sf_surface_physics = 2, num_soil_layers = 4, USGS land use, silt loam, dryland cropland, shdfac = 0.5) -- data/eqwefic/chem170_scm, dumped by the instrumented ctessum-claude/WRF fork (branch earthsciml-instrumented-chem170, commit ac6d4cc, module_esm_dump hooks around SFLX in phys/module_sf_noahdrv.F) and replayed through the real64 (-fdefault-real-8) standalone kernels/noah_driver at ESM_DT = 0.01 s. Inputs are the dumped SFLX arguments (real32 values widened); every expected value is the real64 replay. CANRES is evaluated at the INPUT state (WRF calls it before NOPAC advances anything), so none of these six outputs depends on dt and the replay value equals the dumped WRF value to real32 round-off. step 1801, 12 LST second day.",
      "parameter_overrides": {
        "z_root": 1.000000037252903,
        "solar": 399.1402893066406,
        "ch": 0.011747344397008419,
        "sfctmp": 301.22955322265625,
        "sfcprs": 99622.421875,
        "q2": 0.015355565585196018,
        "q2sat": 0.024054231122136116,
        "dqsdt2": 0.001403242815285921,
        "emissi": 0.9850000143051147,
        "rsmin": 40.0,
        "rgl": 100.0,
        "hs": 36.25,
        "xlai": 5.679999828338623,
        "smcwlt": 0.08399999886751175,
        "smcref": 0.36000001430511475
      },
      "expression_template_imports": [
        {
          "ref": "./tests/chem170_scm_step1801_inputs.esm"
        }
      ],
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "rcs",
          "time": 0.0,
          "expected": 0.4404909622332542,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rct",
          "time": 0.0,
          "expected": 0.983311977571249,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcq",
          "time": 0.0,
          "expected": 0.7602674350616976,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcsoil",
          "time": 0.0,
          "expected": 0.7845175162219603,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rc",
          "time": 0.0,
          "expected": 27.25927519432603,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "pc",
          "time": 0.0,
          "expected": 0.9141764509664252,
          "tolerance": {
            "rel": 1e-09
          }
        }
      ]
    },
    {
      "id": "chem170_scm_step2101",
      "description": "Reference: WRF 4.8 em_scm_xy single-column run at chem_opt = 170 with Noah (sf_surface_physics = 2, num_soil_layers = 4, USGS land use, silt loam, dryland cropland, shdfac = 0.5) -- data/eqwefic/chem170_scm, dumped by the instrumented ctessum-claude/WRF fork (branch earthsciml-instrumented-chem170, commit ac6d4cc, module_esm_dump hooks around SFLX in phys/module_sf_noahdrv.F) and replayed through the real64 (-fdefault-real-8) standalone kernels/noah_driver at ESM_DT = 0.01 s. Inputs are the dumped SFLX arguments (real32 values widened); every expected value is the real64 replay. CANRES is evaluated at the INPUT state (WRF calls it before NOPAC advances anything), so none of these six outputs depends on dt and the replay value equals the dumped WRF value to real32 round-off. step 2101, 17 LST second day, deep convection.",
      "parameter_overrides": {
        "z_root": 1.000000037252903,
        "solar": 239.7152862548828,
        "ch": 0.009156059473752975,
        "sfctmp": 299.83258056640625,
        "sfcprs": 99627.78125,
        "q2": 0.015452257357537746,
        "q2sat": 0.022135667502880096,
        "dqsdt2": 0.0013047083048149943,
        "emissi": 0.9850000143051147,
        "rsmin": 40.0,
        "rgl": 100.0,
        "hs": 36.25,
        "xlai": 5.679999828338623,
        "smcwlt": 0.08399999886751175,
        "smcref": 0.36000001430511475
      },
      "expression_template_imports": [
        {
          "ref": "./tests/chem170_scm_step2101_inputs.esm"
        }
      ],
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "rcs",
          "time": 0.0,
          "expected": 0.3225142150629711,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rct",
          "time": 0.0,
          "expected": 0.9946266375482082,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcq",
          "time": 0.0,
          "expected": 0.8049756395826664,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcsoil",
          "time": 0.0,
          "expected": 0.7852299859797943,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rc",
          "time": 0.0,
          "expected": 34.73146541068366,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "pc",
          "time": 0.0,
          "expected": 0.9062744073339184,
          "tolerance": {
            "rel": 1e-09
          }
        }
      ]
    },
    {
      "id": "chem170_scm_step2134",
      "description": "Reference: WRF 4.8 em_scm_xy single-column run at chem_opt = 170 with Noah (sf_surface_physics = 2, num_soil_layers = 4, USGS land use, silt loam, dryland cropland, shdfac = 0.5) -- data/eqwefic/chem170_scm, dumped by the instrumented ctessum-claude/WRF fork (branch earthsciml-instrumented-chem170, commit ac6d4cc, module_esm_dump hooks around SFLX in phys/module_sf_noahdrv.F) and replayed through the real64 (-fdefault-real-8) standalone kernels/noah_driver at ESM_DT = 0.01 s. Inputs are the dumped SFLX arguments (real32 values widened); every expected value is the real64 replay. CANRES is evaluated at the INPUT state (WRF calls it before NOPAC advances anything), so none of these six outputs depends on dt and the replay value equals the dumped WRF value to real32 round-off. step 2134, 17 LST second day, shallow convection.",
      "parameter_overrides": {
        "z_root": 1.000000037252903,
        "solar": 182.5268096923828,
        "ch": 0.008039824664592743,
        "sfctmp": 299.842041015625,
        "sfcprs": 99618.640625,
        "q2": 0.015339565463364124,
        "q2sat": 0.02215023897588253,
        "dqsdt2": 0.0013054758310317993,
        "emissi": 0.9850000143051147,
        "rsmin": 40.0,
        "rgl": 100.0,
        "hs": 36.25,
        "xlai": 5.679999828338623,
        "smcwlt": 0.08399999886751175,
        "smcref": 0.36000001430511475
      },
      "expression_template_imports": [
        {
          "ref": "./tests/chem170_scm_step2134_inputs.esm"
        }
      ],
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "rcs",
          "time": 0.0,
          "expected": 0.26707722773961173,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rct",
          "time": 0.0,
          "expected": 0.9945710158348083,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcq",
          "time": 0.0,
          "expected": 0.8019973488432255,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcsoil",
          "time": 0.0,
          "expected": 0.7853525642242707,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rc",
          "time": 0.0,
          "expected": 42.09217930149412,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "pc",
          "time": 0.0,
          "expected": 0.8979212555029941,
          "tolerance": {
            "rel": 1e-09
          }
        }
      ]
    },
    {
      "id": "chem170_scm_step2400",
      "description": "Reference: WRF 4.8 em_scm_xy single-column run at chem_opt = 170 with Noah (sf_surface_physics = 2, num_soil_layers = 4, USGS land use, silt loam, dryland cropland, shdfac = 0.5) -- data/eqwefic/chem170_scm, dumped by the instrumented ctessum-claude/WRF fork (branch earthsciml-instrumented-chem170, commit ac6d4cc, module_esm_dump hooks around SFLX in phys/module_sf_noahdrv.F) and replayed through the real64 (-fdefault-real-8) standalone kernels/noah_driver at ESM_DT = 0.01 s. Inputs are the dumped SFLX arguments (real32 values widened); every expected value is the real64 replay. CANRES is evaluated at the INPUT state (WRF calls it before NOPAC advances anything), so none of these six outputs depends on dt and the replay value equals the dumped WRF value to real32 round-off. step 2400, 22 LST second day, night.",
      "parameter_overrides": {
        "z_root": 1.000000037252903,
        "solar": 0.0,
        "ch": 0.00010980122169712558,
        "sfctmp": 298.59136962890625,
        "sfcprs": 99621.1875,
        "q2": 0.015424687415361404,
        "q2sat": 0.02054889127612114,
        "dqsdt2": 0.001222386839799583,
        "emissi": 0.9850000143051147,
        "rsmin": 40.0,
        "rgl": 100.0,
        "hs": 36.25,
        "xlai": 5.679999828338623,
        "smcwlt": 0.08399999886751175,
        "smcref": 0.36000001430511475
      },
      "expression_template_imports": [
        {
          "ref": "./tests/chem170_scm_step2400_inputs.esm"
        }
      ],
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "rcs",
          "time": 0.0,
          "expected": 0.008,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rct",
          "time": 0.0,
          "expected": 0.9994404511392116,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcq",
          "time": 0.0,
          "expected": 0.8433463921080732,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcsoil",
          "time": 0.0,
          "expected": 0.7850641512201746,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rc",
          "time": 0.0,
          "expected": 1330.3123442523931,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "pc",
          "time": 0.0,
          "expected": 0.8793102382173744,
          "tolerance": {
            "rel": 1e-09
          }
        }
      ]
    },
    {
      "id": "chem170_scm_step2521",
      "description": "Reference: WRF 4.8 em_scm_xy single-column run at chem_opt = 170 with Noah (sf_surface_physics = 2, num_soil_layers = 4, USGS land use, silt loam, dryland cropland, shdfac = 0.5) -- data/eqwefic/chem170_scm, dumped by the instrumented ctessum-claude/WRF fork (branch earthsciml-instrumented-chem170, commit ac6d4cc, module_esm_dump hooks around SFLX in phys/module_sf_noahdrv.F) and replayed through the real64 (-fdefault-real-8) standalone kernels/noah_driver at ESM_DT = 0.01 s. Inputs are the dumped SFLX arguments (real32 values widened); every expected value is the real64 replay. CANRES is evaluated at the INPUT state (WRF calls it before NOPAC advances anything), so none of these six outputs depends on dt and the replay value equals the dumped WRF value to real32 round-off. step 2521, 00 LST third day, night with DEW (the reference run's only etp < 0 step).",
      "parameter_overrides": {
        "z_root": 1.000000037252903,
        "solar": 0.0,
        "ch": 9.970904648071155e-05,
        "sfctmp": 297.6307373046875,
        "sfcprs": 99621.1953125,
        "q2": 0.015445591881871223,
        "q2sat": 0.019390061497688293,
        "dqsdt2": 0.0011617362033575773,
        "emissi": 0.9850000143051147,
        "rsmin": 40.0,
        "rgl": 100.0,
        "hs": 36.25,
        "xlai": 5.679999828338623,
        "smcwlt": 0.08399999886751175,
        "smcref": 0.36000001430511475
      },
      "expression_template_imports": [
        {
          "ref": "./tests/chem170_scm_step2521_inputs.esm"
        }
      ],
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "rcs",
          "time": 0.0,
          "expected": 0.008,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rct",
          "time": 0.0,
          "expected": 0.9997818320989609,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcq",
          "time": 0.0,
          "expected": 0.8749005713762678,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rcsoil",
          "time": 0.0,
          "expected": 0.7849624346113061,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "rc",
          "time": 0.0,
          "expected": 1282.0615262779554,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "pc",
          "time": 0.0,
          "expected": 0.8920395191964817,
          "tolerance": {
            "rel": 1e-09
          }
        }
      ]
    },
    {
      "id": "usgs19_bare_override",
      "description": "Reference: the dumped SFLX arguments of chem170 step 601 (data/eqwefic/dumps/chem170_wrf_pre_coag/esm_dump_noah_601.json, the state of test chem170_scm_step601) with vegtyp = 19 (USGS BARE) and an input greenness of 0.3: REDPRM zeroes shdfac, so SFLX does not call CANRES and sets rc = 0. Replayed through the real64 kernels/noah_driver at ESM_DT = 0.01 s (data/eqwefic/noah_pr58_fixes/r64_veg19.json); emissi, xlai, rsmin, rgl and hs are that category's (the replay's emissi_out and xlai_out, and the VEGPARM rows the dump carries). Where CANRES is not called only rc = 0 is assigned by WRF; rcs, rct, rcq, rcsoil and pc are left unassigned, and the replay's zero-initialised locals report 0, which is what this component reports too. Before the gate this state gave NaN in rcs, rcsoil and rc.",
      "parameter_overrides": {
        "z_root": 0.1000000014901161,
        "solar": 248.477294921875,
        "ch": 0.009639615193009377,
        "sfctmp": 299.3103332519531,
        "sfcprs": 99612.390625,
        "q2": 0.015172002837061882,
        "q2sat": 0.02145797200500965,
        "dqsdt2": 0.0012696676421910524,
        "emissi": 0.8999999761581421,
        "rsmin": 999.0,
        "rgl": 999.0,
        "hs": 999.0,
        "xlai": 0.10000000149011612,
        "smcwlt": 0.08399999886751175,
        "smcref": 0.36000001430511475,
        "shdfac": 0.0
      },
      "expression_template_imports": [
        {
          "ref": "./tests/chem170_scm_step601_inputs.esm"
        }
      ],
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "rcs",
          "time": 0.0,
          "expected": 0.0,
          "tolerance": {
            "rel": 1e-09,
            "abs": 1e-12
          }
        },
        {
          "variable": "rct",
          "time": 0.0,
          "expected": 0.0,
          "tolerance": {
            "rel": 1e-09,
            "abs": 1e-12
          }
        },
        {
          "variable": "rcq",
          "time": 0.0,
          "expected": 0.0,
          "tolerance": {
            "rel": 1e-09,
            "abs": 1e-12
          }
        },
        {
          "variable": "rcsoil",
          "time": 0.0,
          "expected": 0.0,
          "tolerance": {
            "rel": 1e-09,
            "abs": 1e-12
          }
        },
        {
          "variable": "rc",
          "time": 0.0,
          "expected": 0.0,
          "tolerance": {
            "rel": 1e-09,
            "abs": 1e-12
          }
        },
        {
          "variable": "pc",
          "time": 0.0,
          "expected": 0.0,
          "tolerance": {
            "rel": 1e-09,
            "abs": 1e-12
          }
        }
      ]
    },
    {
      "id": "usgs27_noroots_bare",
      "description": "Reference: the dumped SFLX arguments of chem170 step 601 (data/eqwefic/dumps/chem170_wrf_pre_coag/esm_dump_noah_601.json, the state of test chem170_scm_step601) with vegtyp = 27 and shdfac = 0 (no root layers, no greenness): CANRES is not called and rc = 0. Replayed through the real64 kernels/noah_driver at ESM_DT = 0.01 s (data/eqwefic/noah_pr58_fixes/r64_veg27.json); emissi, xlai, rsmin, rgl and hs are that category's (the replay's emissi_out and xlai_out, and the VEGPARM rows the dump carries). Where CANRES is not called only rc = 0 is assigned by WRF; rcs, rct, rcq, rcsoil and pc are left unassigned, and the replay's zero-initialised locals report 0, which is what this component reports too. Before the gate this state gave NaN in rcs, rcsoil and rc.",
      "parameter_overrides": {
        "z_root": 0.0,
        "solar": 248.477294921875,
        "ch": 0.009639615193009377,
        "sfctmp": 299.3103332519531,
        "sfcprs": 99612.390625,
        "q2": 0.015172002837061882,
        "q2sat": 0.02145797200500965,
        "dqsdt2": 0.0012696676421910524,
        "emissi": 0.8299999833106995,
        "rsmin": 999.0,
        "rgl": 999.0,
        "hs": 999.0,
        "xlai": 0.009999999776482582,
        "smcwlt": 0.08399999886751175,
        "smcref": 0.36000001430511475,
        "shdfac": 0.0
      },
      "expression_template_imports": [
        {
          "ref": "./tests/chem170_scm_step601_inputs.esm"
        }
      ],
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "rcs",
          "time": 0.0,
          "expected": 0.0,
          "tolerance": {
            "rel": 1e-09,
            "abs": 1e-12
          }
        },
        {
          "variable": "rct",
          "time": 0.0,
          "expected": 0.0,
          "tolerance": {
            "rel": 1e-09,
            "abs": 1e-12
          }
        },
        {
          "variable": "rcq",
          "time": 0.0,
          "expected": 0.0,
          "tolerance": {
            "rel": 1e-09,
            "abs": 1e-12
          }
        },
        {
          "variable": "rcsoil",
          "time": 0.0,
          "expected": 0.0,
          "tolerance": {
            "rel": 1e-09,
            "abs": 1e-12
          }
        },
        {
          "variable": "rc",
          "time": 0.0,
          "expected": 0.0,
          "tolerance": {
            "rel": 1e-09,
            "abs": 1e-12
          }
        },
        {
          "variable": "pc",
          "time": 0.0,
          "expected": 0.0,
          "tolerance": {
            "rel": 1e-09,
            "abs": 1e-12
          }
        }
      ]
    },
    {
      "id": "usgs27_noroots_green",
      "description": "Reference: the dumped SFLX arguments of chem170 step 601 (data/eqwefic/dumps/chem170_wrf_pre_coag/esm_dump_noah_601.json, the state of test chem170_scm_step601) with vegtyp = 27 with shdfac = 0.3: CANRES IS called on a category with no root layers. Its 'DO K = 1,NROOT' sum is then empty and RCSOIL takes its 1e-4 floor (PART(1) reads ZSOIL(0), outside the array, but is never summed), so rc is very large and pc tiny -- but finite and defined. Replayed through the real64 kernels/noah_driver at ESM_DT = 0.01 s (data/eqwefic/noah_pr58_fixes/r64_veg27_green.json); emissi, xlai, rsmin, rgl and hs are that category's (the replay's emissi_out and xlai_out, and the VEGPARM rows the dump carries). Before the z_root guard this state gave rcsoil = NaN.",
      "parameter_overrides": {
        "z_root": 0.0,
        "solar": 248.477294921875,
        "ch": 0.009639615193009377,
        "sfctmp": 299.3103332519531,
        "sfcprs": 99612.390625,
        "q2": 0.015172002837061882,
        "q2sat": 0.02145797200500965,
        "dqsdt2": 0.0012696676421910524,
        "emissi": 0.8299999833106995,
        "rsmin": 999.0,
        "rgl": 999.0,
        "hs": 999.0,
        "xlai": 0.009999999776482582,
        "smcwlt": 0.08399999886751175,
        "smcref": 0.36000001430511475,
        "shdfac": 0.3
      },
      "expression_template_imports": [
        {
          "ref": "./tests/chem170_scm_step601_inputs.esm"
        }
      ],
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "rcs",
          "time": 0.0,
          "expected": 0.9717840667145929,
          "tolerance": {
            "rel": 1e-09,
            "abs": 1e-12
          }
        },
        {
          "variable": "rct",
          "time": 0.0,
          "expected": 0.9972528428301215,
          "tolerance": {
            "rel": 1e-09,
            "abs": 1e-12
          }
        },
        {
          "variable": "rcq",
          "time": 0.0,
          "expected": 0.13736861518473967,
          "tolerance": {
            "rel": 1e-09,
            "abs": 1e-12
          }
        },
        {
          "variable": "rcsoil",
          "time": 0.0,
          "expected": 0.0001,
          "tolerance": {
            "rel": 1e-09,
            "abs": 1e-12
          }
        },
        {
          "variable": "rc",
          "time": 0.0,
          "expected": 7504174434.333261,
          "tolerance": {
            "rel": 1e-09
          }
        },
        {
          "variable": "pc",
          "time": 0.0,
          "expected": 4.3971014770321946e-08,
          "tolerance": {
            "rel": 1e-09,
            "abs": 1e-12
          }
        }
      ]
    }
  ]
}