Version: dev

WSM6MeltingFreezing

Melting and freezing block of the WRF single-moment 6-class microphysics scheme (WSM6; Hong and Lim 2006), transcribed from the first part of the minor loop of mp_wsm6_run in phys/physics_mmm/mp_wsm6.F90 (WRF 4.8, NCAR/MMM-physics), which the kernel applies IN PLACE, layer by layer and in a fixed order, between the sedimentation of the precipitation and the evaluation of the process rates: (1) melting of snow above 0 C by heat conduction and ventilation (psmlt, HL A33, RH83 A25), (2) melting of graupel (pgmlt, HL A23, LFO 47) evaluated at the temperature already lowered by the snow melting, (3) instantaneous melting of all cloud ice above 0 C (pimlt, HL A47), (4) homogeneous freezing of all cloud water colder than -40 C (pihmf, HL A45), (5) heterogeneous Bigg freezing of cloud water (pihtf, HL A44) and (6) probabilistic Bigg freezing of rain to graupel (pgfrz, HL A20, LFO 45), the last four sharing one supercooling and one latent heat of fusion evaluated after the melting. The physics are the melting RATES psmlt_rate, pgmlt_rate (kg/kg/s) and the freezing RATES pihtf_rate, pgfrz_rate; pimlt and pihmf are total conversions with no rate. Because the block is an in-place step, the quantities the kernel actually applies are INCREMENTS (kg/kg) over the sub-step dtcld with per-process limiters (a melting increment may not exceed the frozen mass, a freezing increment the liquid mass) -- exposed as <process>_inc with dtcld as a parameter, time-step artefacts kept apart from the rates (EqWeFiC FORTRAN_BUGS.md N3) -- and the component also returns the state after the block (T_out, qc_out, qi_out, qr_out, qs_out, qg_out) so that a consumer can chain it into the rate components and the tests can close the water and energy budgets against the kernel. Inputs are the state at the START of the block: the sub-step's initial temperature T (the kernel's t is untouched before this block), cloud water qc (unchanged by sedimentation), the post-sedimentation rain, snow, graupel and cloud-ice mixing ratios, density rho, pressure p (both read by `sd`), and the start-of-step cpm and xl (saturation.esm); the size distributions of the post-sedimentation state come from hydrometeor_slopes.esm mounted as subsystem `sd` (the kernel calls slope_wsm6 right after the sedimentation and reuses those slopes here; mstep, the sedimentation sub-step count of older WSM6 versions, is identically 1 in this version). The transport properties and the ventilation factor come from `sd`, evaluated once at the initial temperature, exactly as the kernel does (work2), while the conductivity entering the graupel melting is re-evaluated at the temperature after the snow melting. Constants: wsm6_parameters.esm (`par`), lib/wrf_constants.esm (`wrf`); templates from microphysics_templates.esm and lib/wrf_air_properties.esm. Consumer-supplied inputs are the rewrite-target ops `input_<name>` lowered in the inline tests through a per-test template library extracted from kernel dumps of the instrumented WRF fork ctessum-claude/WRF, commit e42a269 (v4.8.0-2-ge42a269e). EqWeFiC, cited here for FORTRAN_BUGS.md and couplings/, is https://github.com/EarthSciML/EqWeFiC, where these components were developed and are coupled into a WRF column.

.esm schema
1.2.0
Source
components/atmospheric_dynamics/wsm6/melting_freezing.esm

Description

Melting and freezing block of the WRF single-moment 6-class microphysics scheme (WSM6; Hong and Lim 2006), transcribed from the first part of the minor loop of mp_wsm6_run in phys/physics_mmm/mp_wsm6.F90 (WRF 4.8, NCAR/MMM-physics), which the kernel applies IN PLACE, layer by layer and in a fixed order, between the sedimentation of the precipitation and the evaluation of the process rates: (1) melting of snow above 0 C by heat conduction and ventilation (psmlt, HL A33, RH83 A25), (2) melting of graupel (pgmlt, HL A23, LFO 47) evaluated at the temperature already lowered by the snow melting, (3) instantaneous melting of all cloud ice above 0 C (pimlt, HL A47), (4) homogeneous freezing of all cloud water colder than -40 C (pihmf, HL A45), (5) heterogeneous Bigg freezing of cloud water (pihtf, HL A44) and (6) probabilistic Bigg freezing of rain to graupel (pgfrz, HL A20, LFO 45), the last four sharing one supercooling and one latent heat of fusion evaluated after the melting. The physics are the melting RATES psmlt_rate, pgmlt_rate (kg/kg/s) and the freezing RATES pihtf_rate, pgfrz_rate; pimlt and pihmf are total conversions with no rate. Because the block is an in-place step, the quantities the kernel actually applies are INCREMENTS (kg/kg) over the sub-step dtcld with per-process limiters (a melting increment may not exceed the frozen mass, a freezing increment the liquid mass) – exposed as _inc with dtcld as a parameter, time-step artefacts kept apart from the rates (EqWeFiC FORTRAN_BUGS.md N3) – and the component also returns the state after the block (T_out, qc_out, qi_out, qr_out, qs_out, qg_out) so that a consumer can chain it into the rate components and the tests can close the water and energy budgets against the kernel. Inputs are the state at the START of the block: the sub-step’s initial temperature T (the kernel’s t is untouched before this block), cloud water qc (unchanged by sedimentation), the post-sedimentation rain, snow, graupel and cloud-ice mixing ratios, density rho, pressure p (both read by sd), and the start-of-step cpm and xl (saturation.esm); the size distributions of the post-sedimentation state come from hydrometeor_slopes.esm mounted as subsystem sd (the kernel calls slope_wsm6 right after the sedimentation and reuses those slopes here; mstep, the sedimentation sub-step count of older WSM6 versions, is identically 1 in this version). The transport properties and the ventilation factor come from sd, evaluated once at the initial temperature, exactly as the kernel does (work2), while the conductivity entering the graupel melting is re-evaluated at the temperature after the snow melting. Constants: wsm6_parameters.esm (par), lib/wrf_constants.esm (wrf); templates from microphysics_templates.esm and lib/wrf_air_properties.esm. Consumer-supplied inputs are the rewrite-target ops input_<name> lowered in the inline tests through a per-test template library extracted from kernel dumps of the instrumented WRF fork ctessum-claude/WRF, commit e42a269 (v4.8.0-2-ge42a269e). EqWeFiC, cited here for FORTRAN_BUGS.md and couplings/, is https://github.com/EarthSciML/EqWeFiC , where these components were developed and are coupled into a WRF column.

Reference

  • Hong, S.-Y., and J.-O. J. Lim (2006). The WRF single-moment 6-class microphysics scheme (WSM6). J. Korean Meteor. Soc. 42, 129-151 (appendix A eqs. A20, A23, A33, A44, A45, A47).
  • Lin, Y.-L., R. D. Farley, and H. D. Orville (1983). Bulk parameterization of the snow field in a cloud model. J. Climate Appl. Meteor. 22, 1065-1092 (eqs. 45, 47).
  • Rutledge, S. A., and P. V. Hobbs (1983). The mesoscale and microscale structure and organization of clouds and precipitation in midlatitude cyclones. VIII. J. Atmos. Sci. 40, 1185-1206 (eqs. A25, A28).
  • Bigg, E. K. (1953). The supercooling of water. Proc. Phys. Soc. B 66, 688-694.
  • NCAR/MMM-physics mp_wsm6.F90 at commit 550b5b4 (WRF 4.8 phys/physics_mmm submodule), lines 667-705 (melting) and 777-830 (freezing).

Parameters

NameUnitsDefaultDescription
qc_inkg/kg0.0Coupling-target parameter (additive): receives the cloud-water mixing ratio from the upstream stage through a document coupling (EqWeFiC couplings/microphysics_column*.esm), where the mount-edge template library lowers input_qc to this name. Unused by the standalone inline tests, which lower input_qc to a dumped column profile instead.
cpm_inJ/(kg*K)0.0Coupling-target parameter (additive): receives the start-of-sub-step moist heat capacity from the upstream stage through a document coupling (EqWeFiC couplings/microphysics_column*.esm), where the mount-edge template library lowers input_cpm to this name. Unused by the standalone inline tests, which lower input_cpm to a dumped column profile instead.
xl_inJ/kg0.0Coupling-target parameter (additive): receives the start-of-sub-step latent heat of vaporization from the upstream stage through a document coupling (EqWeFiC couplings/microphysics_column*.esm), where the mount-edge template library lowers input_xl to this name. Unused by the standalone inline tests, which lower input_xl to a dumped column profile instead.
dtclds60.0Length of the WSM6 sub-time step over which the increments are applied.

Observed

NameUnitsDefaultDescription
qckg/kgCloud-water mixing ratio at the start of the sub-step.
cpmJ/(kg*K)Moist heat capacity at the start of the sub-step (saturation.esm cpm).
xlJ/kgLatent heat of vaporization at the start-of-step temperature (saturation.esm xl).
psmlt_ratekg/kg/sMelting rate of snow above 0 C (negative), k_a (T0 - T)/(L_f rho) (pi/2) n0s(T)/n0s (precs1 lambda_s^-2 + precs2 f_v coeres_s) (HL A33); zero below 0 C or without snow.
psmlt_inckg/kgSnow melted over the sub-step, min(max(psmlt_rate dtcld, -qs), 0) (WSM6 psmlt as applied and dumped).
T_sKTemperature after the snow melting, T + L_f/cpm psmlt_inc.
nu_sm^2/sKinematic viscosity at T_s.
ka_sW/(m*K)Thermal conductivity at T_s (WSM6 xka(t, den) in pgmlt, with t already updated by psmlt).
pgmlt_ratekg/kg/sMelting rate of graupel (negative), k_a(T_s) (T0 - T_s)/(L_f rho) (precg1 lambda_g^-2 + precg2 f_v coeres_g) (HL A23, LFO 47), gated on the INITIAL temperature being above 0 C as in the kernel; zero without graupel.
pgmlt_inckg/kgGraupel melted over the sub-step, min(max(pgmlt_rate dtcld, -qg), 0) (WSM6 pgmlt as applied and dumped).
T_mKTemperature after both melting terms, T_s + L_f/cpm pgmlt_inc; the temperature at which the freezing block evaluates its supercooling.
supcol_fKSupercooling T0 - T_m of the freezing block (WSM6 supcol, evaluated once per layer).
xlf_fJ/kgLatent heat of fusion of the freezing block: L_s - L_v(T) below 0 C, the constant xlf0 above (WSM6 xlf).
pimlt_inckg/kgCloud ice melted instantaneously above 0 C: all of it (HL A47; WSM6 pimlt).
qr_mkg/kgRain after the snow and graupel melting, qr - psmlt_inc - pgmlt_inc (the melting increments are negative, so melted mass is added). The rain freezing is gated on and limited by this value, as the kernel’s pgfrz block reads qr after psmlt and pgmlt have updated it in place (mp_wsm6.F90 lines 685, 701 and 817-826).
qc_akg/kgCloud water after the ice melting, qc + pimlt_inc.
T_aKTemperature after the ice melting, T_m - xlf_f/cpm pimlt_inc.
pihmf_inckg/kgCloud water frozen homogeneously below -40 C: all of it (HL A45; WSM6 pihmf).
qc_bkg/kgCloud water after the homogeneous freezing, qc_a - pihmf_inc.
pihtf_ratekg/kg/sHeterogeneous (Bigg) freezing rate of cloud water, B’ (exp(B min(T0 - T_m, 50 K)) - 1) rho qc_b^2/(rho_w N_c) (HL A44); the physics of pihtf.
pihtf_inckg/kgCloud water frozen heterogeneously over the sub-step below 0 C, min(pihtf_rate dtcld, qc_b) (WSM6 pfrzdtc).
pgfrz_ratekg/kg/sProbabilistic (Bigg) freezing rate of rain to graupel, 20 pi^2 B’ n0r rho_w/rho (exp(B min(T0 - T_m, 50 K)) - 1) lambda_r^-7 (HL A20, LFO 45); the physics of pgfrz.
pgfrz_inckg/kgRain frozen to graupel over the sub-step below 0 C, min(pgfrz_rate dtcld, qr_m), gated on qr_m > 0 (WSM6 pfrzdtr).
T_outKTemperature after the block, T_a + xlf_f/cpm (pihmf_inc + pihtf_inc + pgfrz_inc) (the kernel’s t at which the process rates are evaluated).
qc_outkg/kgCloud water after the block, qc_b - pihtf_inc.
qi_outkg/kgCloud ice after the block, qi - pimlt_inc + pihmf_inc + pihtf_inc.
qr_outkg/kgRain after the block, qr - psmlt_inc - pgmlt_inc - pgfrz_inc (the melting increments are negative).
qs_outkg/kgSnow after the block, qs + psmlt_inc.
qg_outkg/kgGraupel after the block, qg + pgmlt_inc + pgfrz_inc.
dqc_dtkg/kg/sCloud-water tendency of the block, (qc_out - qc)/dtcld. The melting/freezing block is an in-place increment, not a rate: this is the increment it applies divided by the sub-step it applies it over, which is the tendency a consumer integrating the column must add. It converges to the unlimited process rates as dtcld -> 0; at a finite dtcld it carries the block’s own limiters (a species can never melt or freeze past zero).
dqi_dtkg/kg/sCloud-ice tendency of the block, (qi_out - qi)/dtcld. See dqc_dt.
dqr_dtkg/kg/sRain tendency of the block, (qr_out - qr)/dtcld. See dqc_dt.
dqs_dtkg/kg/sSnow tendency of the block, (qs_out - qs)/dtcld. See dqc_dt.
dqg_dtkg/kg/sGraupel tendency of the block, (qg_out - qg)/dtcld. See dqc_dt.
dT_dtK/sLatent-heating tendency of the block, (T_out - T)/dtcld: the fusion heating of the four melting and freezing increments. See dqc_dt.

Observed expressions

$$ qc = \mathrm{input_qc}\left(\right) $$

Cloud-water mixing ratio at the start of the sub-step.

$$ cpm = \mathrm{input_cpm}\left(\right) $$

Moist heat capacity at the start of the sub-step (saturation.esm cpm).

$$ xl = \mathrm{input_xl}\left(\right) $$

Latent heat of vaporization at the start-of-step temperature (saturation.esm xl).

$$ psmlt_{rate} = \mathrm{ifelse}\left(\mathrm{and}\left(\mathrm{>}\left(sd.T, wrf.svpt0\right), \mathrm{>}\left(sd.qs, 0\right)\right), \mathrm{melting_by_conduction}\left(ka=sd.ka, T=sd.T, t0=wrf.svpt0, xlf=wrf.xlf, rho=sd.rho, geom=\frac{wrf.piconst}{\mathrm{const}\left(\right)} \cdot sd.n0sfac, rslope2=sd.rslope2_{s}, coeres=sd.coeres_{s}, f_{vent}=sd.f_{vent}, c1=sd.precs1, c2=sd.precs2\right), 0\right) $$

Melting rate of snow above 0 C (negative), k_a (T0 - T)/(L_f rho) (pi/2) n0s(T)/n0s (precs1 lambda_s^-2 + precs2 f_v coeres_s) (HL A33); zero below 0 C or without snow.

$$ psmlt_{inc} = \mathrm{melting_increment_limiter}\left(rate=psmlt_{rate}, q=sd.qs, dt=dtcld\right) $$

Snow melted over the sub-step, min(max(psmlt_rate dtcld, -qs), 0) (WSM6 psmlt as applied and dumped).

$$ T_{s} = sd.T + \frac{wrf.xlf}{cpm} \cdot psmlt_{inc} $$

Temperature after the snow melting, T + L_f/cpm psmlt_inc.

$$ nu_{s} = \mathrm{kinematic_viscosity_of_air}\left(T=T_{s}, rho=sd.rho, coef=par.viscos_{coef}, T_{sutherland}=par.sutherland_{T}\right) $$

Kinematic viscosity at T_s.

$$ ka_{s} = \mathrm{thermal_conductivity_of_air}\left(nu=nu_{s}, rho=sd.rho, coef=par.xka_{coef}\right) $$

Thermal conductivity at T_s (WSM6 xka(t, den) in pgmlt, with t already updated by psmlt).

$$ pgmlt_{rate} = \mathrm{ifelse}\left(\mathrm{and}\left(\mathrm{>}\left(sd.T, wrf.svpt0\right), \mathrm{>}\left(sd.qg, 0\right)\right), \mathrm{melting_by_conduction}\left(ka=ka_{s}, T=T_{s}, t0=wrf.svpt0, xlf=wrf.xlf, rho=sd.rho, geom=\mathrm{const}\left(\right), rslope2=sd.rslope2_{g}, coeres=sd.coeres_{g}, f_{vent}=sd.f_{vent}, c1=sd.precg1, c2=sd.precg2\right), 0\right) $$

Melting rate of graupel (negative), k_a(T_s) (T0 - T_s)/(L_f rho) (precg1 lambda_g^-2 + precg2 f_v coeres_g) (HL A23, LFO 47), gated on the INITIAL temperature being above 0 C as in the kernel; zero without graupel.

$$ pgmlt_{inc} = \mathrm{melting_increment_limiter}\left(rate=pgmlt_{rate}, q=sd.qg, dt=dtcld\right) $$

Graupel melted over the sub-step, min(max(pgmlt_rate dtcld, -qg), 0) (WSM6 pgmlt as applied and dumped).

$$ T_{m} = T_{s} + \frac{wrf.xlf}{cpm} \cdot pgmlt_{inc} $$

Temperature after both melting terms, T_s + L_f/cpm pgmlt_inc; the temperature at which the freezing block evaluates its supercooling.

$$ supcol_{f} = wrf.svpt0 - T_{m} $$

Supercooling T0 - T_m of the freezing block (WSM6 supcol, evaluated once per layer).

$$ xlf_{f} = \mathrm{ifelse}\left(\mathrm{<}\left(supcol_{f}, 0\right), wrf.xlf, wrf.xls - xl\right) $$

Latent heat of fusion of the freezing block: L_s - L_v(T) below 0 C, the constant xlf0 above (WSM6 xlf).

$$ pimlt_{inc} = \mathrm{ifelse}\left(\mathrm{and}\left(\mathrm{<}\left(supcol_{f}, 0\right), \mathrm{>}\left(sd.qi, 0\right)\right), sd.qi, 0\right) $$

Cloud ice melted instantaneously above 0 C: all of it (HL A47; WSM6 pimlt).

$$ qr_{m} = sd.qr - \left(psmlt_{inc} + pgmlt_{inc}\right) $$

Rain after the snow and graupel melting, qr - psmlt_inc - pgmlt_inc (the melting increments are negative, so melted mass is added). The rain freezing is gated on and limited by this value, as the kernel’s pgfrz block reads qr after psmlt and pgmlt have updated it in place (mp_wsm6.F90 lines 685, 701 and 817-826).

$$ qc_{a} = qc + pimlt_{inc} $$

Cloud water after the ice melting, qc + pimlt_inc.

$$ T_{a} = T_{m} - \frac{xlf_{f}}{cpm} \cdot pimlt_{inc} $$

Temperature after the ice melting, T_m - xlf_f/cpm pimlt_inc.

$$ pihmf_{inc} = \mathrm{ifelse}\left(\mathrm{and}\left(\mathrm{>}\left(supcol_{f}, par.supcol_{homog}\right), \mathrm{>}\left(qc_{a}, 0\right)\right), qc_{a}, 0\right) $$

Cloud water frozen homogeneously below -40 C: all of it (HL A45; WSM6 pihmf).

$$ qc_{b} = qc_{a} - pihmf_{inc} $$

Cloud water after the homogeneous freezing, qc_a - pihmf_inc.

$$ pihtf_{rate} = \mathrm{biggs_freezing_of_cloud_water}\left(qc=qc_{b}, rho=sd.rho, T=T_{m}, t0=wrf.svpt0, rho_{w}=wrf.rhowater, N_{c}=par.xncr, pfrz1=par.pfrz1, pfrz2=par.pfrz2, supcol_{max}=par.supcol_{max}\right) $$

Heterogeneous (Bigg) freezing rate of cloud water, B’ (exp(B min(T0 - T_m, 50 K)) - 1) rho qc_b^2/(rho_w N_c) (HL A44); the physics of pihtf.

$$ pihtf_{inc} = \mathrm{ifelse}\left(\mathrm{and}\left(\mathrm{>}\left(supcol_{f}, 0\right), \mathrm{>}\left(qc_{b}, par.qmin\right)\right), \mathrm{freezing_increment_limiter}\left(rate=pihtf_{rate}, q=qc_{b}, dt=dtcld\right), 0\right) $$

Cloud water frozen heterogeneously over the sub-step below 0 C, min(pihtf_rate dtcld, qc_b) (WSM6 pfrzdtc).

$$ pgfrz_{rate} = \mathrm{biggs_freezing_of_rain}\left(rslope=sd.rslope_{r}, rslope3=sd.rslope3_{r}, rho=sd.rho, T=T_{m}, t0=wrf.svpt0, rho_{w}=wrf.rhowater, n0r=par.n0r, pfrz1=par.pfrz1, pfrz2=par.pfrz2, supcol_{max}=par.supcol_{max}, coef=par.pgfrz_{coef}, pi=wrf.piconst\right) $$

Probabilistic (Bigg) freezing rate of rain to graupel, 20 pi^2 B’ n0r rho_w/rho (exp(B min(T0 - T_m, 50 K)) - 1) lambda_r^-7 (HL A20, LFO 45); the physics of pgfrz.

$$ pgfrz_{inc} = \mathrm{ifelse}\left(\mathrm{and}\left(\mathrm{>}\left(supcol_{f}, 0\right), \mathrm{>}\left(qr_{m}, 0\right)\right), \mathrm{freezing_increment_limiter}\left(rate=pgfrz_{rate}, q=qr_{m}, dt=dtcld\right), 0\right) $$

Rain frozen to graupel over the sub-step below 0 C, min(pgfrz_rate dtcld, qr_m), gated on qr_m > 0 (WSM6 pfrzdtr).

$$ T_{out} = T_{a} + \frac{xlf_{f}}{cpm} \cdot \left(pihmf_{inc} + pihtf_{inc} + pgfrz_{inc}\right) $$

Temperature after the block, T_a + xlf_f/cpm (pihmf_inc + pihtf_inc + pgfrz_inc) (the kernel’s t at which the process rates are evaluated).

$$ qc_{out} = qc_{b} - pihtf_{inc} $$

Cloud water after the block, qc_b - pihtf_inc.

$$ qi_{out} = sd.qi - pimlt_{inc} + pihmf_{inc} + pihtf_{inc} $$

Cloud ice after the block, qi - pimlt_inc + pihmf_inc + pihtf_inc.

$$ qr_{out} = sd.qr - \left(psmlt_{inc} + pgmlt_{inc} + pgfrz_{inc}\right) $$

Rain after the block, qr - psmlt_inc - pgmlt_inc - pgfrz_inc (the melting increments are negative).

$$ qs_{out} = sd.qs + psmlt_{inc} $$

Snow after the block, qs + psmlt_inc.

$$ qg_{out} = sd.qg + pgmlt_{inc} + pgfrz_{inc} $$

Graupel after the block, qg + pgmlt_inc + pgfrz_inc.

$$ dqc_{dt} = \frac{qc_{out} - qc}{dtcld} $$

Cloud-water tendency of the block, (qc_out - qc)/dtcld. The melting/freezing block is an in-place increment, not a rate: this is the increment it applies divided by the sub-step it applies it over, which is the tendency a consumer integrating the column must add. It converges to the unlimited process rates as dtcld -> 0; at a finite dtcld it carries the block’s own limiters (a species can never melt or freeze past zero).

$$ dqi_{dt} = \frac{qi_{out} - sd.qi}{dtcld} $$

Cloud-ice tendency of the block, (qi_out - qi)/dtcld. See dqc_dt.

$$ dqr_{dt} = \frac{qr_{out} - sd.qr}{dtcld} $$

Rain tendency of the block, (qr_out - qr)/dtcld. See dqc_dt.

$$ dqs_{dt} = \frac{qs_{out} - sd.qs}{dtcld} $$

Snow tendency of the block, (qs_out - qs)/dtcld. See dqc_dt.

$$ dqg_{dt} = \frac{qg_{out} - sd.qg}{dtcld} $$

Graupel tendency of the block, (qg_out - qg)/dtcld. See dqc_dt.

$$ dT_{dt} = \frac{T_{out} - sd.T}{dtcld} $$

Latent-heating tendency of the block, (T_out - T)/dtcld: the fusion heating of the four melting and freezing increments. See dqc_dt.

Raw .esm

Raw .esm JSON (this component)
{
  "expression_template_imports": [
    {
      "ref": "../../../lib/wrf_air_properties.esm"
    },
    {
      "ref": "./microphysics_templates.esm"
    }
  ],
  "subsystems": {
    "wrf": {
      "ref": "../../../lib/wrf_constants.esm"
    },
    "par": {
      "ref": "./wsm6_parameters.esm"
    },
    "sd": {
      "ref": "./hydrometeor_slopes.esm",
      "bindings": {
        "NLEV": "NLEV"
      }
    }
  },
  "variables": {
    "qc_in": {
      "type": "parameter",
      "units": "kg/kg",
      "shape": [
        "lev"
      ],
      "default": 0.0,
      "description": "Coupling-target parameter (additive): receives the cloud-water mixing ratio from the upstream stage through a document coupling (EqWeFiC couplings/microphysics_column*.esm), where the mount-edge template library lowers `input_qc` to this name. Unused by the standalone inline tests, which lower `input_qc` to a dumped column profile instead."
    },
    "cpm_in": {
      "type": "parameter",
      "units": "J/(kg*K)",
      "shape": [
        "lev"
      ],
      "default": 0.0,
      "description": "Coupling-target parameter (additive): receives the start-of-sub-step moist heat capacity from the upstream stage through a document coupling (EqWeFiC couplings/microphysics_column*.esm), where the mount-edge template library lowers `input_cpm` to this name. Unused by the standalone inline tests, which lower `input_cpm` to a dumped column profile instead."
    },
    "xl_in": {
      "type": "parameter",
      "units": "J/kg",
      "shape": [
        "lev"
      ],
      "default": 0.0,
      "description": "Coupling-target parameter (additive): receives the start-of-sub-step latent heat of vaporization from the upstream stage through a document coupling (EqWeFiC couplings/microphysics_column*.esm), where the mount-edge template library lowers `input_xl` to this name. Unused by the standalone inline tests, which lower `input_xl` to a dumped column profile instead."
    },
    "qc": {
      "type": "unknown",
      "units": "kg/kg",
      "shape": [
        "lev"
      ],
      "description": "Cloud-water mixing ratio at the start of the sub-step."
    },
    "cpm": {
      "type": "unknown",
      "units": "J/(kg*K)",
      "shape": [
        "lev"
      ],
      "description": "Moist heat capacity at the start of the sub-step (saturation.esm cpm)."
    },
    "xl": {
      "type": "unknown",
      "units": "J/kg",
      "shape": [
        "lev"
      ],
      "description": "Latent heat of vaporization at the start-of-step temperature (saturation.esm xl)."
    },
    "dtcld": {
      "type": "parameter",
      "units": "s",
      "default": 60.0,
      "description": "Length of the WSM6 sub-time step over which the increments are applied."
    },
    "psmlt_rate": {
      "type": "unknown",
      "units": "kg/kg/s",
      "shape": [
        "lev"
      ],
      "description": "Melting rate of snow above 0 C (negative), k_a (T0 - T)/(L_f rho) (pi/2) n0s(T)/n0s (precs1 lambda_s^-2 + precs2 f_v coeres_s) (HL A33); zero below 0 C or without snow."
    },
    "psmlt_inc": {
      "type": "unknown",
      "units": "kg/kg",
      "shape": [
        "lev"
      ],
      "description": "Snow melted over the sub-step, min(max(psmlt_rate dtcld, -qs), 0) (WSM6 psmlt as applied and dumped)."
    },
    "T_s": {
      "type": "unknown",
      "units": "K",
      "shape": [
        "lev"
      ],
      "description": "Temperature after the snow melting, T + L_f/cpm psmlt_inc."
    },
    "nu_s": {
      "type": "unknown",
      "units": "m^2/s",
      "shape": [
        "lev"
      ],
      "description": "Kinematic viscosity at T_s."
    },
    "ka_s": {
      "type": "unknown",
      "units": "W/(m*K)",
      "shape": [
        "lev"
      ],
      "description": "Thermal conductivity at T_s (WSM6 xka(t, den) in pgmlt, with t already updated by psmlt)."
    },
    "pgmlt_rate": {
      "type": "unknown",
      "units": "kg/kg/s",
      "shape": [
        "lev"
      ],
      "description": "Melting rate of graupel (negative), k_a(T_s) (T0 - T_s)/(L_f rho) (precg1 lambda_g^-2 + precg2 f_v coeres_g) (HL A23, LFO 47), gated on the INITIAL temperature being above 0 C as in the kernel; zero without graupel."
    },
    "pgmlt_inc": {
      "type": "unknown",
      "units": "kg/kg",
      "shape": [
        "lev"
      ],
      "description": "Graupel melted over the sub-step, min(max(pgmlt_rate dtcld, -qg), 0) (WSM6 pgmlt as applied and dumped)."
    },
    "T_m": {
      "type": "unknown",
      "units": "K",
      "shape": [
        "lev"
      ],
      "description": "Temperature after both melting terms, T_s + L_f/cpm pgmlt_inc; the temperature at which the freezing block evaluates its supercooling."
    },
    "supcol_f": {
      "type": "unknown",
      "units": "K",
      "shape": [
        "lev"
      ],
      "description": "Supercooling T0 - T_m of the freezing block (WSM6 supcol, evaluated once per layer)."
    },
    "xlf_f": {
      "type": "unknown",
      "units": "J/kg",
      "shape": [
        "lev"
      ],
      "description": "Latent heat of fusion of the freezing block: L_s - L_v(T) below 0 C, the constant xlf0 above (WSM6 xlf)."
    },
    "pimlt_inc": {
      "type": "unknown",
      "units": "kg/kg",
      "shape": [
        "lev"
      ],
      "description": "Cloud ice melted instantaneously above 0 C: all of it (HL A47; WSM6 pimlt)."
    },
    "qr_m": {
      "type": "unknown",
      "units": "kg/kg",
      "shape": [
        "lev"
      ],
      "description": "Rain after the snow and graupel melting, qr - psmlt_inc - pgmlt_inc (the melting increments are negative, so melted mass is added). The rain freezing is gated on and limited by this value, as the kernel's pgfrz block reads qr after psmlt and pgmlt have updated it in place (mp_wsm6.F90 lines 685, 701 and 817-826)."
    },
    "qc_a": {
      "type": "unknown",
      "units": "kg/kg",
      "shape": [
        "lev"
      ],
      "description": "Cloud water after the ice melting, qc + pimlt_inc."
    },
    "T_a": {
      "type": "unknown",
      "units": "K",
      "shape": [
        "lev"
      ],
      "description": "Temperature after the ice melting, T_m - xlf_f/cpm pimlt_inc."
    },
    "pihmf_inc": {
      "type": "unknown",
      "units": "kg/kg",
      "shape": [
        "lev"
      ],
      "description": "Cloud water frozen homogeneously below -40 C: all of it (HL A45; WSM6 pihmf)."
    },
    "qc_b": {
      "type": "unknown",
      "units": "kg/kg",
      "shape": [
        "lev"
      ],
      "description": "Cloud water after the homogeneous freezing, qc_a - pihmf_inc."
    },
    "pihtf_rate": {
      "type": "unknown",
      "units": "kg/kg/s",
      "shape": [
        "lev"
      ],
      "description": "Heterogeneous (Bigg) freezing rate of cloud water, B' (exp(B min(T0 - T_m, 50 K)) - 1) rho qc_b^2/(rho_w N_c) (HL A44); the physics of pihtf."
    },
    "pihtf_inc": {
      "type": "unknown",
      "units": "kg/kg",
      "shape": [
        "lev"
      ],
      "description": "Cloud water frozen heterogeneously over the sub-step below 0 C, min(pihtf_rate dtcld, qc_b) (WSM6 pfrzdtc)."
    },
    "pgfrz_rate": {
      "type": "unknown",
      "units": "kg/kg/s",
      "shape": [
        "lev"
      ],
      "description": "Probabilistic (Bigg) freezing rate of rain to graupel, 20 pi^2 B' n0r rho_w/rho (exp(B min(T0 - T_m, 50 K)) - 1) lambda_r^-7 (HL A20, LFO 45); the physics of pgfrz."
    },
    "pgfrz_inc": {
      "type": "unknown",
      "units": "kg/kg",
      "shape": [
        "lev"
      ],
      "description": "Rain frozen to graupel over the sub-step below 0 C, min(pgfrz_rate dtcld, qr_m), gated on qr_m > 0 (WSM6 pfrzdtr)."
    },
    "T_out": {
      "type": "unknown",
      "units": "K",
      "shape": [
        "lev"
      ],
      "description": "Temperature after the block, T_a + xlf_f/cpm (pihmf_inc + pihtf_inc + pgfrz_inc) (the kernel's t at which the process rates are evaluated)."
    },
    "qc_out": {
      "type": "unknown",
      "units": "kg/kg",
      "shape": [
        "lev"
      ],
      "description": "Cloud water after the block, qc_b - pihtf_inc."
    },
    "qi_out": {
      "type": "unknown",
      "units": "kg/kg",
      "shape": [
        "lev"
      ],
      "description": "Cloud ice after the block, qi - pimlt_inc + pihmf_inc + pihtf_inc."
    },
    "qr_out": {
      "type": "unknown",
      "units": "kg/kg",
      "shape": [
        "lev"
      ],
      "description": "Rain after the block, qr - psmlt_inc - pgmlt_inc - pgfrz_inc (the melting increments are negative)."
    },
    "qs_out": {
      "type": "unknown",
      "units": "kg/kg",
      "shape": [
        "lev"
      ],
      "description": "Snow after the block, qs + psmlt_inc."
    },
    "qg_out": {
      "type": "unknown",
      "units": "kg/kg",
      "shape": [
        "lev"
      ],
      "description": "Graupel after the block, qg + pgmlt_inc + pgfrz_inc."
    },
    "dqc_dt": {
      "type": "unknown",
      "units": "kg/kg/s",
      "shape": [
        "lev"
      ],
      "description": "Cloud-water tendency of the block, (qc_out - qc)/dtcld. The melting/freezing block is an in-place increment, not a rate: this is the increment it applies divided by the sub-step it applies it over, which is the tendency a consumer integrating the column must add. It converges to the unlimited process rates as dtcld -> 0; at a finite dtcld it carries the block's own limiters (a species can never melt or freeze past zero)."
    },
    "dqi_dt": {
      "type": "unknown",
      "units": "kg/kg/s",
      "shape": [
        "lev"
      ],
      "description": "Cloud-ice tendency of the block, (qi_out - qi)/dtcld. See dqc_dt."
    },
    "dqr_dt": {
      "type": "unknown",
      "units": "kg/kg/s",
      "shape": [
        "lev"
      ],
      "description": "Rain tendency of the block, (qr_out - qr)/dtcld. See dqc_dt."
    },
    "dqs_dt": {
      "type": "unknown",
      "units": "kg/kg/s",
      "shape": [
        "lev"
      ],
      "description": "Snow tendency of the block, (qs_out - qs)/dtcld. See dqc_dt."
    },
    "dqg_dt": {
      "type": "unknown",
      "units": "kg/kg/s",
      "shape": [
        "lev"
      ],
      "description": "Graupel tendency of the block, (qg_out - qg)/dtcld. See dqc_dt."
    },
    "dT_dt": {
      "type": "unknown",
      "units": "K/s",
      "shape": [
        "lev"
      ],
      "description": "Latent-heating tendency of the block, (T_out - T)/dtcld: the fusion heating of the four melting and freezing increments. See dqc_dt."
    }
  },
  "equations": [
    {
      "lhs": "qc",
      "rhs": {
        "op": "input_qc",
        "args": []
      }
    },
    {
      "lhs": "cpm",
      "rhs": {
        "op": "input_cpm",
        "args": []
      }
    },
    {
      "lhs": "xl",
      "rhs": {
        "op": "input_xl",
        "args": []
      }
    },
    {
      "lhs": "psmlt_rate",
      "rhs": {
        "op": "ifelse",
        "args": [
          {
            "op": "and",
            "args": [
              {
                "op": ">",
                "args": [
                  "sd.T",
                  "wrf.svpt0"
                ]
              },
              {
                "op": ">",
                "args": [
                  "sd.qs",
                  0
                ]
              }
            ]
          },
          {
            "op": "apply_expression_template",
            "args": [],
            "name": "melting_by_conduction",
            "bindings": {
              "ka": "sd.ka",
              "T": "sd.T",
              "t0": "wrf.svpt0",
              "xlf": "wrf.xlf",
              "rho": "sd.rho",
              "geom": {
                "op": "*",
                "args": [
                  {
                    "op": "/",
                    "args": [
                      "wrf.piconst",
                      {
                        "op": "const",
                        "args": [],
                        "value": 2,
                        "units": "1"
                      }
                    ]
                  },
                  "sd.n0sfac"
                ]
              },
              "rslope2": "sd.rslope2_s",
              "coeres": "sd.coeres_s",
              "f_vent": "sd.f_vent",
              "c1": "sd.precs1",
              "c2": "sd.precs2"
            }
          },
          0
        ]
      }
    },
    {
      "lhs": "psmlt_inc",
      "rhs": {
        "op": "apply_expression_template",
        "args": [],
        "name": "melting_increment_limiter",
        "bindings": {
          "rate": "psmlt_rate",
          "q": "sd.qs",
          "dt": "dtcld"
        }
      }
    },
    {
      "lhs": "T_s",
      "rhs": {
        "op": "+",
        "args": [
          "sd.T",
          {
            "op": "*",
            "args": [
              {
                "op": "/",
                "args": [
                  "wrf.xlf",
                  "cpm"
                ]
              },
              "psmlt_inc"
            ]
          }
        ]
      }
    },
    {
      "lhs": "nu_s",
      "rhs": {
        "op": "apply_expression_template",
        "args": [],
        "name": "kinematic_viscosity_of_air",
        "bindings": {
          "T": "T_s",
          "rho": "sd.rho",
          "coef": "par.viscos_coef",
          "T_sutherland": "par.sutherland_T"
        }
      }
    },
    {
      "lhs": "ka_s",
      "rhs": {
        "op": "apply_expression_template",
        "args": [],
        "name": "thermal_conductivity_of_air",
        "bindings": {
          "nu": "nu_s",
          "rho": "sd.rho",
          "coef": "par.xka_coef"
        }
      }
    },
    {
      "lhs": "pgmlt_rate",
      "rhs": {
        "op": "ifelse",
        "args": [
          {
            "op": "and",
            "args": [
              {
                "op": ">",
                "args": [
                  "sd.T",
                  "wrf.svpt0"
                ]
              },
              {
                "op": ">",
                "args": [
                  "sd.qg",
                  0
                ]
              }
            ]
          },
          {
            "op": "apply_expression_template",
            "args": [],
            "name": "melting_by_conduction",
            "bindings": {
              "ka": "ka_s",
              "T": "T_s",
              "t0": "wrf.svpt0",
              "xlf": "wrf.xlf",
              "rho": "sd.rho",
              "geom": {
                "op": "const",
                "args": [],
                "value": 1,
                "units": "1"
              },
              "rslope2": "sd.rslope2_g",
              "coeres": "sd.coeres_g",
              "f_vent": "sd.f_vent",
              "c1": "sd.precg1",
              "c2": "sd.precg2"
            }
          },
          0
        ]
      }
    },
    {
      "lhs": "pgmlt_inc",
      "rhs": {
        "op": "apply_expression_template",
        "args": [],
        "name": "melting_increment_limiter",
        "bindings": {
          "rate": "pgmlt_rate",
          "q": "sd.qg",
          "dt": "dtcld"
        }
      }
    },
    {
      "lhs": "T_m",
      "rhs": {
        "op": "+",
        "args": [
          "T_s",
          {
            "op": "*",
            "args": [
              {
                "op": "/",
                "args": [
                  "wrf.xlf",
                  "cpm"
                ]
              },
              "pgmlt_inc"
            ]
          }
        ]
      }
    },
    {
      "lhs": "supcol_f",
      "rhs": {
        "op": "-",
        "args": [
          "wrf.svpt0",
          "T_m"
        ]
      }
    },
    {
      "lhs": "xlf_f",
      "rhs": {
        "op": "ifelse",
        "args": [
          {
            "op": "<",
            "args": [
              "supcol_f",
              0
            ]
          },
          "wrf.xlf",
          {
            "op": "-",
            "args": [
              "wrf.xls",
              "xl"
            ]
          }
        ]
      }
    },
    {
      "lhs": "pimlt_inc",
      "rhs": {
        "op": "ifelse",
        "args": [
          {
            "op": "and",
            "args": [
              {
                "op": "<",
                "args": [
                  "supcol_f",
                  0
                ]
              },
              {
                "op": ">",
                "args": [
                  "sd.qi",
                  0
                ]
              }
            ]
          },
          "sd.qi",
          0
        ]
      }
    },
    {
      "lhs": "qc_a",
      "rhs": {
        "op": "+",
        "args": [
          "qc",
          "pimlt_inc"
        ]
      }
    },
    {
      "lhs": "T_a",
      "rhs": {
        "op": "-",
        "args": [
          "T_m",
          {
            "op": "*",
            "args": [
              {
                "op": "/",
                "args": [
                  "xlf_f",
                  "cpm"
                ]
              },
              "pimlt_inc"
            ]
          }
        ]
      }
    },
    {
      "lhs": "pihmf_inc",
      "rhs": {
        "op": "ifelse",
        "args": [
          {
            "op": "and",
            "args": [
              {
                "op": ">",
                "args": [
                  "supcol_f",
                  "par.supcol_homog"
                ]
              },
              {
                "op": ">",
                "args": [
                  "qc_a",
                  0
                ]
              }
            ]
          },
          "qc_a",
          0
        ]
      }
    },
    {
      "lhs": "qc_b",
      "rhs": {
        "op": "-",
        "args": [
          "qc_a",
          "pihmf_inc"
        ]
      }
    },
    {
      "lhs": "pihtf_rate",
      "rhs": {
        "op": "apply_expression_template",
        "args": [],
        "name": "biggs_freezing_of_cloud_water",
        "bindings": {
          "qc": "qc_b",
          "rho": "sd.rho",
          "T": "T_m",
          "t0": "wrf.svpt0",
          "rho_w": "wrf.rhowater",
          "N_c": "par.xncr",
          "pfrz1": "par.pfrz1",
          "pfrz2": "par.pfrz2",
          "supcol_max": "par.supcol_max"
        }
      }
    },
    {
      "lhs": "pihtf_inc",
      "rhs": {
        "op": "ifelse",
        "args": [
          {
            "op": "and",
            "args": [
              {
                "op": ">",
                "args": [
                  "supcol_f",
                  0
                ]
              },
              {
                "op": ">",
                "args": [
                  "qc_b",
                  "par.qmin"
                ]
              }
            ]
          },
          {
            "op": "apply_expression_template",
            "args": [],
            "name": "freezing_increment_limiter",
            "bindings": {
              "rate": "pihtf_rate",
              "q": "qc_b",
              "dt": "dtcld"
            }
          },
          0
        ]
      }
    },
    {
      "lhs": "pgfrz_rate",
      "rhs": {
        "op": "apply_expression_template",
        "args": [],
        "name": "biggs_freezing_of_rain",
        "bindings": {
          "rslope": "sd.rslope_r",
          "rslope3": "sd.rslope3_r",
          "rho": "sd.rho",
          "T": "T_m",
          "t0": "wrf.svpt0",
          "rho_w": "wrf.rhowater",
          "n0r": "par.n0r",
          "pfrz1": "par.pfrz1",
          "pfrz2": "par.pfrz2",
          "supcol_max": "par.supcol_max",
          "coef": "par.pgfrz_coef",
          "pi": "wrf.piconst"
        }
      }
    },
    {
      "lhs": "qr_m",
      "rhs": {
        "op": "-",
        "args": [
          "sd.qr",
          {
            "op": "+",
            "args": [
              "psmlt_inc",
              "pgmlt_inc"
            ]
          }
        ]
      }
    },
    {
      "lhs": "pgfrz_inc",
      "rhs": {
        "op": "ifelse",
        "args": [
          {
            "op": "and",
            "args": [
              {
                "op": ">",
                "args": [
                  "supcol_f",
                  0
                ]
              },
              {
                "op": ">",
                "args": [
                  "qr_m",
                  0
                ]
              }
            ]
          },
          {
            "op": "apply_expression_template",
            "args": [],
            "name": "freezing_increment_limiter",
            "bindings": {
              "rate": "pgfrz_rate",
              "q": "qr_m",
              "dt": "dtcld"
            }
          },
          0
        ]
      }
    },
    {
      "lhs": "T_out",
      "rhs": {
        "op": "+",
        "args": [
          "T_a",
          {
            "op": "*",
            "args": [
              {
                "op": "/",
                "args": [
                  "xlf_f",
                  "cpm"
                ]
              },
              {
                "op": "+",
                "args": [
                  "pihmf_inc",
                  "pihtf_inc",
                  "pgfrz_inc"
                ]
              }
            ]
          }
        ]
      }
    },
    {
      "lhs": "qc_out",
      "rhs": {
        "op": "-",
        "args": [
          "qc_b",
          "pihtf_inc"
        ]
      }
    },
    {
      "lhs": "qi_out",
      "rhs": {
        "op": "+",
        "args": [
          {
            "op": "-",
            "args": [
              "sd.qi",
              "pimlt_inc"
            ]
          },
          "pihmf_inc",
          "pihtf_inc"
        ]
      }
    },
    {
      "lhs": "qr_out",
      "rhs": {
        "op": "-",
        "args": [
          "sd.qr",
          {
            "op": "+",
            "args": [
              "psmlt_inc",
              "pgmlt_inc",
              "pgfrz_inc"
            ]
          }
        ]
      }
    },
    {
      "lhs": "qs_out",
      "rhs": {
        "op": "+",
        "args": [
          "sd.qs",
          "psmlt_inc"
        ]
      }
    },
    {
      "lhs": "qg_out",
      "rhs": {
        "op": "+",
        "args": [
          "sd.qg",
          "pgmlt_inc",
          "pgfrz_inc"
        ]
      }
    },
    {
      "lhs": "dqc_dt",
      "rhs": {
        "op": "/",
        "args": [
          {
            "op": "-",
            "args": [
              "qc_out",
              "qc"
            ]
          },
          "dtcld"
        ]
      }
    },
    {
      "lhs": "dqi_dt",
      "rhs": {
        "op": "/",
        "args": [
          {
            "op": "-",
            "args": [
              "qi_out",
              "sd.qi"
            ]
          },
          "dtcld"
        ]
      }
    },
    {
      "lhs": "dqr_dt",
      "rhs": {
        "op": "/",
        "args": [
          {
            "op": "-",
            "args": [
              "qr_out",
              "sd.qr"
            ]
          },
          "dtcld"
        ]
      }
    },
    {
      "lhs": "dqs_dt",
      "rhs": {
        "op": "/",
        "args": [
          {
            "op": "-",
            "args": [
              "qs_out",
              "sd.qs"
            ]
          },
          "dtcld"
        ]
      }
    },
    {
      "lhs": "dqg_dt",
      "rhs": {
        "op": "/",
        "args": [
          {
            "op": "-",
            "args": [
              "qg_out",
              "sd.qg"
            ]
          },
          "dtcld"
        ]
      }
    },
    {
      "lhs": "dT_dt",
      "rhs": {
        "op": "/",
        "args": [
          {
            "op": "-",
            "args": [
              "T_out",
              "sd.T"
            ]
          },
          "dtcld"
        ]
      }
    }
  ],
  "tests": [
    {
      "id": "qss_step250_row23_col25_melting_and_freezing",
      "description": "Reference: WRF 4.8 em_quarter_ss idealized supercell (GNU real32 build, dx = 2 km, dt = 12 s, 40 layers, WSM6 only) dumped by the instrumented ctessum-claude/WRF fork (module_esm_dump with esm_dump_inner hooks inside mp_wsm6_run of the ctessum-claude/MMM-physics fork, commit 52cfbd7) and replayed through the real64 (kind_phys = real64) standalone kernels/wsm6_driver at the WRF step. The block is an in-place step, so the test is an INCREMENT test over the kernel's sub-step dtcld = 12 s (no small-dt replay; the increments are the quantities the kernel applies): the inputs are the state at the start of the block -- the kernel's input temperature t and cloud water qc (untouched before the block), den, p, the start-of-step cpm and xl, and the post-sedimentation rain, snow, graupel and cloud ice, which the kernel does not dump and are reconstructed exactly from what it does dump: qs = qs_rates - psmlt, qg = qg_rates - pgmlt - pgfrz, qr = qr_rates + psmlt + pgmlt + pgfrz, qi = qi_rates + pimlt - pihmf - pihtf, where psmlt and pgmlt are the dumped increments, pimlt = qc_rates - qc (warm layers), pihmf = qc (layers colder than -40 C), pihtf = qc - qc_rates - pihmf (other cold layers) follow from the cloud-water budget and pgfrz from the energy budget (t_rates - T_after_melting_and_cloud_freezing) cpm/(xls - xl) of the real64 replay. The expected values are the dumped psmlt/pgmlt increments, the budget-derived pimlt/pihmf/pihtf/pgfrz increments, and the state after the block (t_rates, qc/qi/qr/qs/qg_rates). Residual esm-vs-real64 mismatch: the kernel's real32 constants and literals (EqWeFiC FORTRAN_BUGS.md N2), in particular pfrz2 = 0.6600000262 whose rounding is amplified by the 50 K supercooling cap to 1.3e-6 relative in exp(pfrz2 supcol) and hence in pihtf_rate and pgfrz_rate; and t0c = 273.1499939 K, whose 6e-6 K offset is amplified by the melting rates being proportional to T - T0 = 0.15 K in the only unlimited melting layer (1.6e-5 relative). Measured with zero tolerances: the melting increments agree to 1.6e-5 relative where unlimited (exactly where limited, since then they equal the frozen mass), pihtf to 2.7e-6 relative, pgfrz to 1e-9 absolute (1.4e-6 of column maximum), and the final temperature to 8e-7 K (the pgfrz rounding times L_f/cpm). Tolerances: melting increments Linf 1e-4 of column maximum and rel 5e-5 spot checks at the one layer (8) where the increment is unlimited (rate x dtcld is below the snow/graupel mass), which also pins psmlt_rate and pgmlt_rate = increment/dtcld there; freezing increments Linf 1e-5 of column maximum and rel 1e-5 spot checks at unlimited layers; pimlt/pihmf exact (abs 0); final state Linf 2e-6 K (rel 1e-8 spot checks) and 1e-6 of the column maximum of each species (1e-4 for snow, which inherits the melting tolerance). Regime: supercell step 250 (t = 50 min), row j = 23, column i = 25: layers 1-8 above 0 C with all snow melting out in 2-7 and the snow and graupel melting unlimited in layer 8 (T = 273.3 K); cloud ice melts in the same layers; heterogeneous freezing of cloud water in layers 12-19 (unlimited) and homogeneous freezing above layer 20 (T < -40 C); rain freezes in layers 9-15 (unlimited, up to 1.4e-4 kg/kg) and completely from layer 16 up.",
      "parameter_overrides": {
        "dtcld": 12.0
      },
      "expression_template_imports": [
        {
          "ref": "./tests/qss_step250_row23_col25_melting_and_freezing_inputs.esm"
        }
      ],
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "psmlt_inc",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    0.0,
                    -3.769210715761049e-18,
                    -9.425914063567555e-15,
                    -1.4223083232475452e-11,
                    -2.215414506083182e-09,
                    -8.102843566117096e-08,
                    -2.0791466270345068e-07,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 2e-11,
            "rel": 0.0
          }
        },
        {
          "variable": "pgmlt_inc",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    -6.172579792750676e-17,
                    -6.992991807793032e-14,
                    -5.935055763053508e-11,
                    -1.3170414743147213e-08,
                    -2.683243341064049e-07,
                    -2.1751845755808422e-07,
                    -1.5355808146427174e-07,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 2e-11,
            "rel": 0.0
          }
        },
        {
          "variable": "psmlt_inc",
          "time": 0.0,
          "coords": {
            "lev": 8
          },
          "expected": -2.0791466270345068e-07,
          "tolerance": {
            "rel": 5e-05
          }
        },
        {
          "variable": "pgmlt_inc",
          "time": 0.0,
          "coords": {
            "lev": 8
          },
          "expected": -1.5355808146427174e-07,
          "tolerance": {
            "rel": 5e-05
          }
        },
        {
          "variable": "psmlt_rate",
          "time": 0.0,
          "coords": {
            "lev": 8
          },
          "expected": -1.7326221891954225e-08,
          "tolerance": {
            "rel": 5e-05
          }
        },
        {
          "variable": "pgmlt_rate",
          "time": 0.0,
          "coords": {
            "lev": 8
          },
          "expected": -1.2796506788689311e-08,
          "tolerance": {
            "rel": 5e-05
          }
        },
        {
          "variable": "pimlt_inc",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    2.2551405187698492e-17,
                    1.1715541731183166e-13,
                    1.3009542033058652e-09,
                    9.141571375749502e-10,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 0,
            "rel": 0.0
          }
        },
        {
          "variable": "pihmf_inc",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.000174987711943686,
                    5.6502598454244435e-05,
                    2.793251724142465e-06,
                    5.743962194770802e-09,
                    5.49060363531314e-18,
                    2.6597562693964072e-11,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 0,
            "rel": 0.0
          }
        },
        {
          "variable": "pihtf_inc",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    8.249477490007706e-14,
                    4.867018246756949e-13,
                    3.90795750794537e-12,
                    1.9465581056754555e-11,
                    6.497262461119951e-11,
                    4.648884650718457e-10,
                    3.5914174550955025e-09,
                    2.7019974937927786e-08,
                    1.9395354381931962e-07,
                    1.2541008968594558e-06,
                    7.408019174449986e-06,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 2e-10,
            "rel": 0.0
          }
        },
        {
          "variable": "pihtf_inc",
          "time": 0.0,
          "coords": {
            "lev": 13
          },
          "expected": 6.497262461119951e-11,
          "tolerance": {
            "rel": 1e-05
          }
        },
        {
          "variable": "pihtf_inc",
          "time": 0.0,
          "coords": {
            "lev": 16
          },
          "expected": 2.7019974937927786e-08,
          "tolerance": {
            "rel": 1e-05
          }
        },
        {
          "variable": "pihtf_inc",
          "time": 0.0,
          "coords": {
            "lev": 19
          },
          "expected": 7.408019174449986e-06,
          "tolerance": {
            "rel": 1e-05
          }
        },
        {
          "variable": "pgfrz_inc",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    5.301441159779572e-07,
                    1.007095994397312e-05,
                    0.0001281207158028312,
                    0.00014265069128682655,
                    5.251971875442965e-05,
                    3.797265036895545e-07,
                    5.289602065046917e-09,
                    6.965384779573298e-06,
                    1.1474122570852721e-07,
                    1.4215579896015016e-06,
                    4.0094380326818746e-08,
                    1.3505646160468884e-09,
                    3.9499298590697194e-13,
                    2.4988912201461962e-11,
                    -4.9544473028313407e-17,
                    -5.49060363531314e-18,
                    5.592845873299927e-17,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 2e-09,
            "rel": 0.0
          }
        },
        {
          "variable": "pgfrz_inc",
          "time": 0.0,
          "coords": {
            "lev": 9
          },
          "expected": 5.301441159779572e-07,
          "tolerance": {
            "rel": 1e-05
          }
        },
        {
          "variable": "pgfrz_inc",
          "time": 0.0,
          "coords": {
            "lev": 11
          },
          "expected": 0.0001281207158028312,
          "tolerance": {
            "rel": 1e-05
          }
        },
        {
          "variable": "pgfrz_inc",
          "time": 0.0,
          "coords": {
            "lev": 13
          },
          "expected": 5.251971875442965e-05,
          "tolerance": {
            "rel": 1e-05
          }
        },
        {
          "variable": "pgfrz_inc",
          "time": 0.0,
          "coords": {
            "lev": 15
          },
          "expected": 5.289602065046917e-09,
          "tolerance": {
            "rel": 1e-05
          }
        },
        {
          "variable": "T_out",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    297.3313903808594,
                    292.3320007324219,
                    288.8170471191165,
                    286.0953063760143,
                    283.1683914442936,
                    280.05114550889135,
                    276.82966920340994,
                    273.52862204862106,
                    270.1332672272455,
                    266.8206676150764,
                    263.10633022003645,
                    259.96456837537386,
                    257.35366154672164,
                    253.89292215268887,
                    250.41597246754776,
                    246.89867286099602,
                    243.3145238469983,
                    239.68482007815726,
                    236.03510633604037,
                    232.3058238545931,
                    228.67376091429387,
                    225.29565945445833,
                    221.64097726310837,
                    217.91253662109375,
                    214.2364654597129,
                    210.40228271484375,
                    206.23475646972656,
                    202.61253356933594,
                    198.83523559570312,
                    206.5060272216797,
                    216.55055236816406,
                    220.37196350097656,
                    222.5511016845703,
                    223.22120666503906,
                    222.77182006835938,
                    221.7825164794922,
                    220.73544311523438,
                    219.92294311523438,
                    219.42999267578125,
                    219.14308166503906
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 2e-06,
            "rel": 0.0
          }
        },
        {
          "variable": "qc_out",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    7.980775762472803e-11,
                    1.6747939701744485e-09,
                    0.00046639214269816875,
                    0.0012345998547971249,
                    0.0017746092053130495,
                    0.0021369156894514288,
                    0.002375260365092139,
                    0.00237458942604135,
                    0.002114886185071824,
                    0.001653649494496554,
                    0.0013839818963816972,
                    0.0011248463802961553,
                    0.0009003271048294153,
                    0.0007935909096429232,
                    0.0007190957141526705,
                    0.0006340087740894647,
                    0.0005346078485884594,
                    0.0004201279784697351,
                    0.00030778174985144203,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 2e-10,
            "rel": 0.0
          }
        },
        {
          "variable": "qi_out",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    5.531485106176191e-07,
                    1.0732339185161895e-06,
                    1.6913230404208186e-06,
                    3.275554105732432e-06,
                    5.2711917071481225e-06,
                    8.782636002313435e-06,
                    1.4416905653421037e-05,
                    2.3299440518424183e-05,
                    3.804219170649553e-05,
                    6.248866508231207e-05,
                    0.0001180699831021706,
                    0.00031200330323281146,
                    0.00027757787691427697,
                    0.0002552130096626379,
                    0.0002382764436857371,
                    0.00022442410712526662,
                    0.00019550091470040793,
                    0.00017564762957050035,
                    0.00014799549935917675,
                    0.0001156181989002365,
                    7.87213960375858e-05,
                    2.167846611164076e-05,
                    5.336429974422732e-09,
                    1.1202762439160477e-09,
                    4.495528312522256e-15,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 2e-10,
            "rel": 0.0
          }
        },
        {
          "variable": "qr_out",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    9.008616941632232e-06,
                    4.5430461096602364e-05,
                    0.00016148766065843278,
                    0.00046812932473229505,
                    0.0008490956665152578,
                    0.0012541514291493838,
                    0.0018529245835335118,
                    0.0030029675171295376,
                    0.004843551562474838,
                    0.007069729754148738,
                    0.007330661354760955,
                    0.0023372465757768323,
                    0.0004888608409167411,
                    8.654104512914855e-06,
                    2.1131901660936389e-07,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 2e-09,
            "rel": 0.0
          }
        },
        {
          "variable": "qs_out",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    2.878087270027336e-07,
                    6.298832051631572e-07,
                    5.770077372789672e-07,
                    3.130470892531513e-06,
                    6.172887961991185e-05,
                    0.00029613872216844726,
                    0.0006029189885016059,
                    0.0009233932022614882,
                    0.0012167176333047272,
                    0.0014810702810252128,
                    0.0017044390426085294,
                    0.0018692328438536475,
                    0.0020982494567954894,
                    0.0023192638331117695,
                    0.002468252118145466,
                    0.002558113621696234,
                    0.002600553542398903,
                    0.002611539016695822,
                    0.002544500296712916,
                    0.0023838751741635847,
                    0.0019374027700863297,
                    0.0009256041275628777,
                    0.00011404543350320383,
                    5.3293863006929e-08,
                    2.5159469459892213e-09,
                    5.405291804396966e-16,
                    4.821722714977284e-30,
                    4.2294937226316425e-29,
                    7.371455025354102e-37,
                    3.0714477198956165e-32,
                    0.0,
                    7.006492321624085e-45,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 2e-11,
            "rel": 0.0
          }
        },
        {
          "variable": "qg_out",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    8.670458265643954e-07,
                    1.0055835338558608e-06,
                    2.2448832802737907e-05,
                    0.0002325594780003544,
                    0.0032749095341898615,
                    0.005887658916767809,
                    0.006512597844954096,
                    0.006895538631201692,
                    0.00717454455391016,
                    0.0075128913306353375,
                    0.007863521926458755,
                    0.00821261327837484,
                    0.008498407584748362,
                    0.008756025060635534,
                    0.0090039645298448,
                    0.009226209329992602,
                    0.009416953628333814,
                    0.009448123419747646,
                    0.009044918728529704,
                    0.008144347854158135,
                    0.006316462587014989,
                    0.0028709739620714292,
                    0.0003415835603082636,
                    8.554800255971919e-07,
                    2.663878327834779e-08,
                    2.33621047378953e-10,
                    8.281586406704198e-11,
                    2.018681741617176e-11,
                    1.3006750320326222e-25,
                    6.853101972638555e-30,
                    2.014475702055016e-31,
                    1.642176065148396e-39,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 2e-09,
            "rel": 0.0
          }
        },
        {
          "variable": "T_out",
          "time": 0.0,
          "coords": {
            "lev": 1
          },
          "expected": 297.3313903808594,
          "tolerance": {
            "rel": 1e-08
          }
        },
        {
          "variable": "T_out",
          "time": 0.0,
          "coords": {
            "lev": 8
          },
          "expected": 273.52862204862106,
          "tolerance": {
            "rel": 1e-08
          }
        },
        {
          "variable": "T_out",
          "time": 0.0,
          "coords": {
            "lev": 9
          },
          "expected": 270.1332672272455,
          "tolerance": {
            "rel": 1e-08
          }
        },
        {
          "variable": "T_out",
          "time": 0.0,
          "coords": {
            "lev": 15
          },
          "expected": 250.41597246754776,
          "tolerance": {
            "rel": 1e-08
          }
        },
        {
          "variable": "T_out",
          "time": 0.0,
          "coords": {
            "lev": 25
          },
          "expected": 214.2364654597129,
          "tolerance": {
            "rel": 1e-08
          }
        },
        {
          "variable": "T_out",
          "time": 0.0,
          "coords": {
            "lev": 40
          },
          "expected": 219.14308166503906,
          "tolerance": {
            "rel": 1e-08
          }
        }
      ]
    },
    {
      "id": "qss_step250_row23_col24_melting_limited",
      "description": "Same reference chain, reconstruction and tolerance reasoning as qss_step250_row23_col25_melting_and_freezing, column i = 24: every melting increment is LIMITED (all snow and graupel entering the warm layers 2-8 melt within the sub-step, so psmlt = -qs and pgmlt = -qg there), heterogeneous freezing of cloud water in layers 12-20 (up to 1.6e-5 kg/kg, unlimited) with homogeneous freezing above, and rain freezing unlimited in layers 9-16 (up to 7e-4 kg/kg) and complete above.",
      "parameter_overrides": {
        "dtcld": 12.0
      },
      "expression_template_imports": [
        {
          "ref": "./tests/qss_step250_row23_col24_melting_limited_inputs.esm"
        }
      ],
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "psmlt_inc",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    -7.25303816012736e-13,
                    -1.538842276589358e-10,
                    -7.90501830386647e-09,
                    -1.7950552856417739e-07,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 2e-11,
            "rel": 0.0
          }
        },
        {
          "variable": "pgmlt_inc",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    -6.023096736445973e-18,
                    -7.324972526457996e-14,
                    -2.7969037569341938e-11,
                    -2.9302396894266655e-09,
                    -8.765916281089224e-08,
                    -7.872037755342189e-08,
                    -3.2552028568191964e-07,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 2e-11,
            "rel": 0.0
          }
        },
        {
          "variable": "pihtf_inc",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    1.4231888237348223e-14,
                    1.0315576517982983e-13,
                    4.560360335886804e-13,
                    3.7325179839259315e-12,
                    1.3644688677538763e-11,
                    2.2918382252754e-11,
                    2.1011259886908468e-10,
                    2.2090828396149204e-09,
                    2.1881240706823034e-08,
                    2.0718355929700075e-07,
                    1.8221257276662445e-06,
                    1.5518721044332703e-05,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 2e-10,
            "rel": 0.0
          }
        },
        {
          "variable": "pihtf_inc",
          "time": 0.0,
          "coords": {
            "lev": 12
          },
          "expected": 3.7325179839259315e-12,
          "tolerance": {
            "rel": 1e-05
          }
        },
        {
          "variable": "pihtf_inc",
          "time": 0.0,
          "coords": {
            "lev": 15
          },
          "expected": 2.1011259886908468e-10,
          "tolerance": {
            "rel": 1e-05
          }
        },
        {
          "variable": "pihtf_inc",
          "time": 0.0,
          "coords": {
            "lev": 18
          },
          "expected": 2.0718355929700075e-07,
          "tolerance": {
            "rel": 1e-05
          }
        },
        {
          "variable": "pihtf_inc",
          "time": 0.0,
          "coords": {
            "lev": 20
          },
          "expected": 1.5518721044332703e-05,
          "tolerance": {
            "rel": 1e-05
          }
        },
        {
          "variable": "pgfrz_inc",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    2.6656569810226467e-07,
                    4.7792900290820685e-06,
                    5.395743157738793e-05,
                    0.0006027269995611298,
                    0.0006983898089944233,
                    0.00018373382641486257,
                    1.538914827639175e-07,
                    1.2804329652059051e-08,
                    4.854610903250784e-06,
                    7.372683181265461e-08,
                    1.323919932328808e-06,
                    5.036084429924135e-11,
                    5.169092580193171e-10,
                    -2.3421071017881594e-17,
                    6.035186957302633e-17,
                    1.3732416043028217e-17,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 5e-09,
            "rel": 0.0
          }
        },
        {
          "variable": "pgfrz_inc",
          "time": 0.0,
          "coords": {
            "lev": 9
          },
          "expected": 2.6656569810226467e-07,
          "tolerance": {
            "rel": 1e-05
          }
        },
        {
          "variable": "pgfrz_inc",
          "time": 0.0,
          "coords": {
            "lev": 10
          },
          "expected": 4.7792900290820685e-06,
          "tolerance": {
            "rel": 1e-05
          }
        },
        {
          "variable": "pgfrz_inc",
          "time": 0.0,
          "coords": {
            "lev": 12
          },
          "expected": 0.0006027269995611298,
          "tolerance": {
            "rel": 1e-05
          }
        },
        {
          "variable": "pgfrz_inc",
          "time": 0.0,
          "coords": {
            "lev": 14
          },
          "expected": 0.00018373382641486257,
          "tolerance": {
            "rel": 1e-05
          }
        },
        {
          "variable": "pgfrz_inc",
          "time": 0.0,
          "coords": {
            "lev": 16
          },
          "expected": 1.2804329652059051e-08,
          "tolerance": {
            "rel": 1e-05
          }
        },
        {
          "variable": "T_out",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    297.64703369140625,
                    291.8091125488281,
                    288.5563354491935,
                    286.03436278332435,
                    283.325224818412,
                    280.4615785468794,
                    277.58544976355546,
                    274.69049891118476,
                    271.7529906427518,
                    268.7038474397177,
                    265.6683516879798,
                    262.1534922047347,
                    259.2897023578119,
                    257.42891901944654,
                    253.93429655039142,
                    250.44034256168098,
                    246.90865543501246,
                    243.20535464631482,
                    239.37271941019083,
                    235.45569968706948,
                    231.40159572278193,
                    227.29008276817726,
                    223.43049716547588,
                    219.21426392825526,
                    214.87814331054688,
                    210.54525756835938,
                    206.4624481201172,
                    202.93716430664062,
                    202.85484313964844,
                    211.37586975097656,
                    214.59034729003906,
                    216.94227600097656,
                    219.01785278320312,
                    220.3812713623047,
                    221.00733947753906,
                    221.05303955078125,
                    220.74871826171875,
                    220.28884887695312,
                    219.79849243164062,
                    219.2654571533203
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 2e-06,
            "rel": 0.0
          }
        },
        {
          "variable": "qc_out",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    5.17699993984877e-10,
                    9.130457812034365e-08,
                    0.0005846098065376282,
                    0.0014365921961143613,
                    0.001981614390388131,
                    0.0022646926809146953,
                    0.0023095394012690325,
                    0.0021232623799231666,
                    0.001799519406617357,
                    0.001450503943384846,
                    0.0011178386625930062,
                    0.0009683668576108658,
                    0.0007349649540606207,
                    0.000558981066934368,
                    0.0005591934541178074,
                    0.0005879945848280214,
                    0.0005922475878118464,
                    0.0005513109274647549,
                    0.0004720198990754954,
                    0.00037369934740449397,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 2e-10,
            "rel": 0.0
          }
        },
        {
          "variable": "qi_out",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    3.569682414231346e-07,
                    7.780791114462685e-07,
                    1.0632777166754922e-06,
                    1.6460125575094822e-06,
                    3.3164217564819154e-06,
                    4.97124779778029e-06,
                    8.299009315623017e-06,
                    1.4082382973727307e-05,
                    2.310497506521837e-05,
                    3.853911760532305e-05,
                    6.360281939947041e-05,
                    0.0001371898229958145,
                    0.00039540065346485223,
                    0.0003268640242375685,
                    0.00028072927302074904,
                    0.00025629913398954736,
                    0.0002351989559745503,
                    0.00018983344024399185,
                    0.00015165053372229309,
                    0.00010666509183512285,
                    5.3337902004450394e-05,
                    6.257408767578141e-06,
                    2.774519153136557e-09,
                    1.0076532262736847e-10,
                    0.0,
                    1.7788568703789613e-18,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 2e-10,
            "rel": 0.0
          }
        },
        {
          "variable": "qr_out",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    9.238698355237132e-07,
                    2.714888832203372e-06,
                    5.16776821740763e-05,
                    0.0006397468251959799,
                    0.0014194970093438812,
                    0.0023637057667324174,
                    0.003680282622041694,
                    0.0054324943453860864,
                    0.007416603673926213,
                    0.009647340001880358,
                    0.012097642508531879,
                    0.011623246269756624,
                    0.003888740457311211,
                    0.0009702850020826061,
                    5.481445553263391e-06,
                    3.6009343731875244e-07,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 5e-09,
            "rel": 0.0
          }
        },
        {
          "variable": "qs_out",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    8.203875230810432e-08,
                    1.5755340763236955e-07,
                    2.81580354250216e-07,
                    1.1159513728804107e-06,
                    6.84323411849585e-05,
                    0.00021989682700190814,
                    0.0004341044813486776,
                    0.0006841999726841561,
                    0.0009277938531389098,
                    0.0011580115637299863,
                    0.0013503716944626757,
                    0.00148680825658049,
                    0.0017082663790235428,
                    0.0019216563360522105,
                    0.002039974504382915,
                    0.0020864102614631943,
                    0.0020522979444682456,
                    0.0019873256067299205,
                    0.0018126793343165837,
                    0.001302005662237947,
                    0.00043578426339397475,
                    4.1823648035533474e-05,
                    8.003901711395705e-09,
                    1.4440015440668757e-09,
                    4.5163943007858456e-21,
                    1.2608769007108353e-20,
                    2.2974362963072455e-24,
                    3.7341130647726884e-36,
                    2.40891613808222e-40,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 2e-11,
            "rel": 0.0
          }
        },
        {
          "variable": "qg_out",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    7.973985488877759e-09,
                    3.0024268861100158e-06,
                    1.183011669924886e-05,
                    6.554477050448219e-05,
                    0.0007916469414048769,
                    0.005733465230191949,
                    0.009508845460111631,
                    0.010260769794360032,
                    0.01063538725687733,
                    0.010414479653101274,
                    0.010398971011664798,
                    0.010244765853281053,
                    0.009987983898818218,
                    0.009643332481200834,
                    0.009189679887898707,
                    0.008687998285415633,
                    0.008134248307741548,
                    0.007538741226440653,
                    0.006884285225289495,
                    0.0059792842854045425,
                    0.004130319214745196,
                    0.0013393301320079657,
                    0.00012727035653499916,
                    5.7978000087357285e-08,
                    5.098127614773576e-09,
                    0.0,
                    3.669391395258707e-18,
                    4.5323273033796455e-18,
                    5.1907755050099046e-33,
                    7.028207372718966e-30,
                    8.35869209035589e-39,
                    3.80551744995462e-39,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 5e-09,
            "rel": 0.0
          }
        }
      ]
    },
    {
      "id": "qss_step200_row20_col20_weak_melting",
      "description": "Same reference chain, reconstruction and tolerance reasoning, early storm: step 200 (t = 40 min), row j = 20 (call 7980), column i = 20: little precipitation has reached the warm layers, so the snow (1.2e-10 kg/kg) and graupel (1.4e-8) melting in layer 8 are unlimited and small; freezing is weak. Layer 8 is only 0.11 K above freezing, so the kernel's real32 T0 offset (6e-6 K) is 5.6e-5 of the melting rates there: rel 2e-4 on the rate spot checks, melting Linf tolerances at 1e-4 of the tiny column maxima.",
      "parameter_overrides": {
        "dtcld": 12.0
      },
      "expression_template_imports": [
        {
          "ref": "./tests/qss_step200_row20_col20_weak_melting_inputs.esm"
        }
      ],
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "psmlt_inc",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    -2.1580720393960379e-19,
                    -2.977359957289212e-14,
                    -1.1776652881426031e-11,
                    -1.1584362744952561e-10,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 1e-14,
            "rel": 0.0
          }
        },
        {
          "variable": "pgmlt_inc",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    0.0,
                    0.0,
                    -3.676982612685865e-20,
                    -3.2969446988911344e-16,
                    -2.4826391410827663e-12,
                    -7.363494325348608e-10,
                    -1.393277634030796e-08,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 1e-12,
            "rel": 0.0
          }
        },
        {
          "variable": "psmlt_rate",
          "time": 0.0,
          "coords": {
            "lev": 8
          },
          "expected": -9.6536356207938e-12,
          "tolerance": {
            "rel": 0.0002
          }
        },
        {
          "variable": "pgmlt_rate",
          "time": 0.0,
          "coords": {
            "lev": 8
          },
          "expected": -1.1610646950256633e-09,
          "tolerance": {
            "rel": 0.0002
          }
        },
        {
          "variable": "T_out",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    297.57135009765625,
                    293.08843994140625,
                    288.7033996582031,
                    285.1383361816406,
                    281.825469970703,
                    279.34609985264467,
                    276.5744623637532,
                    273.2586176178139,
                    269.65597534204807,
                    265.7362365743751,
                    261.8953857457433,
                    258.3270874259885,
                    254.9307110366444,
                    251.51055908210637,
                    248.03706359939585,
                    244.42288208855368,
                    240.86241149903674,
                    237.4772491455078,
                    234.1900634765625,
                    230.9632568359375,
                    227.72315979003906,
                    224.4792022705078,
                    221.2476806640625,
                    217.89675903320312,
                    215.62567138671875,
                    215.15530395507812,
                    215.44692993164062,
                    215.85821533203125,
                    216.31690979003906,
                    216.8319549560547,
                    217.35919189453125,
                    217.89071655273438,
                    218.3719024658203,
                    218.71929931640625,
                    218.9059295654297,
                    218.9639434814453,
                    218.95350646972656,
                    218.93016052246094,
                    218.92230224609375,
                    218.91497802734375
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 2e-06,
            "rel": 0.0
          }
        },
        {
          "variable": "qc_out",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    3.7694541932253856e-11,
                    2.5111357899731956e-05,
                    0.0001789779489627108,
                    2.399425738985883e-06,
                    4.363805055618286e-05,
                    3.5883740420844375e-05,
                    4.0222254778109614e-08,
                    1.2814894034818235e-07,
                    5.3868969729363756e-08,
                    2.8215333713852197e-07,
                    5.260866941956094e-07,
                    2.3426852633361668e-07,
                    1.0236329469129118e-07,
                    2.2050838144511696e-07,
                    1.3301406285143785e-07,
                    4.645688586884797e-08,
                    9.215365983962006e-10,
                    3.0028088964850967e-26,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 1e-10,
            "rel": 0.0
          }
        },
        {
          "variable": "qr_out",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    7.10849717049706e-11,
                    2.4745171728933982e-09,
                    1.5953044874474414e-08,
                    3.485594813415802e-07,
                    1.2453769273459633e-05,
                    1.8422396645312123e-06,
                    4.6644891408344124e-07,
                    1.1347463130460914e-06,
                    1.7718946466337958e-06,
                    1.3373897174517254e-06,
                    4.376741838339793e-07,
                    3.48850586571093e-07,
                    9.434689788558026e-07,
                    4.0622868287600433e-10,
                    6.4848492332453494e-12,
                    8.403166780411705e-11,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 1e-09,
            "rel": 0.0
          }
        },
        {
          "variable": "qs_out",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    6.826618519248776e-10,
                    7.478273020478633e-09,
                    2.4541037112925595e-07,
                    1.0193919849005994e-06,
                    1.0459129875547297e-06,
                    9.111034476647079e-07,
                    9.126219943751737e-07,
                    4.98679109255076e-07,
                    1.7965911717709122e-07,
                    3.164494038813098e-10,
                    1.714811290394232e-10,
                    7.897388420221207e-11,
                    3.159987817201571e-12,
                    1.3861850075940864e-12,
                    2.517808546250883e-12,
                    7.475573222828933e-11,
                    1.0362790252253571e-08,
                    5.973822416485381e-09,
                    2.373824060115312e-09,
                    2.4420570802222703e-11,
                    3.116344671707237e-23,
                    4.2147892043587925e-21,
                    1.0533331533277005e-19,
                    4.11677740714148e-27,
                    2.283555977463722e-41,
                    5.605193857299268e-45,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 1e-14,
            "rel": 0.0
          }
        },
        {
          "variable": "qg_out",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    1.2829527009902704e-07,
                    7.2234194802608045e-06,
                    3.36521392941699e-05,
                    5.673841613606078e-05,
                    4.61858272465072e-05,
                    2.4162942387989466e-05,
                    1.883312177053169e-05,
                    1.141521154457337e-05,
                    3.0429331227242794e-06,
                    4.008169850339771e-09,
                    1.548226653066125e-09,
                    2.3175372929779947e-10,
                    1.0576571583070344e-11,
                    1.0723442370753932e-11,
                    2.8758090317290494e-11,
                    3.392419555980728e-11,
                    2.7830783979795437e-09,
                    9.84076944875969e-08,
                    5.172872290773642e-08,
                    1.9643427501746044e-08,
                    2.282650158216985e-14,
                    1.5445715630986997e-14,
                    3.347117227531348e-15,
                    6.003804665387232e-19,
                    1.5152503376357612e-24,
                    4.8932641296305224e-32,
                    3.29089339152826e-39,
                    3.5508903085990865e-42,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 1e-09,
            "rel": 0.0
          }
        }
      ]
    },
    {
      "id": "scm_call120_no_phase_change_lowest_40_layers",
      "description": "Reference: WRF 4.8 em_scm_xy single-column run (GNU real32 build, dt = 60 s, 59 layers, mp = 6, sfclay = 1, slab, YSU) at call 120 (step 60, 20:00 UTC), lowest 40 of the 59 layers (esm-spec 6.6 tests cannot rebind NLEV), replayed through the real64 kernels/wsm6_driver. Zero check: no rain, snow, graupel or cloud water anywhere and cloud ice only above layer 40, so every melting and freezing increment is exactly zero and the block returns its inputs unchanged (T_out = t_rates = t to the last bit).",
      "parameter_overrides": {
        "dtcld": 60.0
      },
      "expression_template_imports": [
        {
          "ref": "./tests/scm_call120_no_phase_change_lowest_40_layers_inputs.esm"
        }
      ],
      "time_span": {
        "start": 0.0,
        "end": 1.0
      },
      "assertions": [
        {
          "variable": "psmlt_inc",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 0,
            "rel": 0.0
          }
        },
        {
          "variable": "pgmlt_inc",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 0,
            "rel": 0.0
          }
        },
        {
          "variable": "pimlt_inc",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 0,
            "rel": 0.0
          }
        },
        {
          "variable": "pihmf_inc",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 0,
            "rel": 0.0
          }
        },
        {
          "variable": "pihtf_inc",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 0,
            "rel": 0.0
          }
        },
        {
          "variable": "pgfrz_inc",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 0,
            "rel": 0.0
          }
        },
        {
          "variable": "T_out",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    283.9342956542969,
                    283.3187255859375,
                    282.76336669921875,
                    282.2115173339844,
                    281.65167236328125,
                    281.07928466796875,
                    280.4919738769531,
                    279.8880310058594,
                    279.2660827636719,
                    278.6249084472656,
                    277.96307373046875,
                    277.27874755859375,
                    276.5679016113281,
                    275.8076171875,
                    276.82666015625,
                    279.6024169921875,
                    279.5128479003906,
                    279.3697814941406,
                    279.20404052734375,
                    279.0183410644531,
                    278.81353759765625,
                    278.5884704589844,
                    278.342529296875,
                    278.0738220214844,
                    277.77960205078125,
                    277.45892333984375,
                    277.07861328125,
                    276.6678161621094,
                    276.22442626953125,
                    275.74554443359375,
                    275.22998046875,
                    274.6733093261719,
                    274.072509765625,
                    273.4240417480469,
                    272.7232360839844,
                    271.9638366699219,
                    270.9003601074219,
                    269.6949157714844,
                    268.2908935546875,
                    266.2558898925781
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 0,
            "rel": 0.0
          }
        },
        {
          "variable": "qc_out",
          "time": 0.0,
          "reduce": "Linf_error",
          "expected": 0.0,
          "reference": {
            "op": "faq",
            "output_idx": [
              "k"
            ],
            "args": [],
            "ranges": {
              "k": {
                "from": "lev"
              }
            },
            "expr": {
              "op": "index",
              "args": [
                {
                  "op": "const",
                  "args": [],
                  "value": [
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0,
                    0.0
                  ]
                },
                "k"
              ]
            }
          },
          "tolerance": {
            "abs": 0,
            "rel": 0.0
          }
        }
      ]
    }
  ]
}