Cloud-Fraction
- CalCldfra
model
atmospheric_radiation
cloud_fraction
WRF's grid-scale cloud-fraction diagnostic for icloud = 1, SUBROUTINE cal_cldfra1 of phys/module_radiation_driver.F (WRF 4.8), as a single-column component on the EarthSciDiscretizations grids/column_nonuniform_1d grid (layer index `lev`, layer 1 at the surface). The scheme is pointwise in the vertical -- no operator couples one layer to another -- and purely diagnostic: it answers the cloud fraction a radiation scheme should see, given the temperature, the pressure and the hydrometeor mixing ratios of the same layer. Three branches, which the observed `branch` reports as 1, 2 and 3 exactly as the Fortran's cldfra1_flag does: a layer whose total cloud condensate q_cld = qi + qc + qs falls below QCLDMIN is cloud-free (branch 1); a layer that holds condensate and is at or above the critical relative humidity RHGRID is fully cloudy (branch 2); otherwise the Randall (1994) / Zhao (1995) fit, modified for grid-scale saturation at RHGRID, gives the fraction (RHUM/RHGRID)^PEXP (1 - exp(-ALPHA0 q_cld / (RHGRID qvs - qv)^GAMMA)), snapped to zero below 0.01 (branch 3). The saturation mixing ratio is weighted between the over-water and over-ice Murray (1966) fits by the ice fraction (qi + qs)/q_cld of the condensate, so a glaciated layer is judged against the lower ice saturation and turns cloudy sooner. This component transcribes the mp_physics branch for schemes that carry cloud water, cloud ice and snow as separate species (F_QC .and. F_QI .and. F_QS: WSM6 and the other options 2, 4, 6, 7, 8), which is what the em_scm_xy reference run uses; the P3 (no snow), Kessler/WSM3 (cloud water only), option 5 (F_ICE_PHY-weighted) and Ferrier high-resolution branches are not transcribed, and neither is the mp-independent ELSE arm, which is dead code (EqWeFiC FORTRAN_BUGS.md B13). Consumer-supplied column fields (T, p, qv, qc, qi, qs) are rewrite-target ops `input_<name>` lowered by the consumer, in the inline tests through per-test expression_template_imports libraries generated by EqWeFiC tools/fill_tests.py (esm-spec 6.6 parameter_overrides admit scalars only). This is the component the EqWeather-SCM state document needs so that cloud fraction in a running column is diagnosed rather than prescribed from a dump: its `cldfra` feeds the coupling-target parameter `cldfra_in` of the RRTM longwave column stage (components/atmospheric_radiation/rrtm_lw/rrtm_column.esm, which reads it through `input_cldfra`), via EqWeFiC couplings/tests/scmstate_couple_rrtmcol_inputs.esm. Dudhia shortwave takes no cloud fraction (WRF's SWRAD has no CLDFRA argument). EqWeFiC, cited here for FORTRAN_BUGS.md, tools/ and couplings/, is https://github.com/EarthSciML/EqWeFiC, where this component was developed and is coupled into a WRF column.
- CalCldfraParameters
model
atmospheric_radiation
cloud_fraction
Scheme constants of WRF's icloud = 1 grid-scale cloud-fraction diagnostic, transcribed from the local PARAMETER declarations and in-line literals of SUBROUTINE cal_cldfra1 in phys/module_radiation_driver.F (WRF 4.8). Mounted by the CalCldfra component as subsystem `par` so that no tuning constant is written inline in the physics. cal_cldfra1 REDEFINES the Bolton saturation coefficients locally rather than taking the share/module_model_constants.F values: its SVP1 = 0.61078 kPa, SVP2 = 17.2693882 and SVP3 = 35.86 K are the Murray (1966) over-water fit, not the model's svp1 = 0.6112, svp2 = 17.67, svp3 = 29.65, so they belong here and not in lib/wrf_constants.esm. SVPT0 = 273.15 K and EP_2 = r_d/r_v do agree with the model constants and are taken from there (wrf.svpt0, wrf.ep_2); the routine's local r_d = 287. and r_v = 461.6 are the same numbers as the model's. Values are the nominal decimal values of the Fortran source; the real64 kernel build used for the reference tests promotes these default-real literals to binary64 (-fdefault-real-8), so no single-precision rounding note applies here.