Freezing
- WSM6MeltingFreezing
model
atmospheric_dynamics
wsm6
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.