Boundary-Layer
- AtmosphericDiffusion
model
atmospheric_dynamics
Atmospheric eddy-diffusivity and wind-profile parameterizations from Seinfeld & Pandis (2006) Ch. 18, Sec. 18.12. Given a height z above ground, the component computes the mean wind speed u_wind from a power-law profile (Eq. 18.118) and the vertical and horizontal eddy diffusivities K_zz, K_yy that govern turbulent transport of trace species in the planetary boundary layer. K_zz is selected by atmospheric stability from the Monin-Obukhov length L_MO: an unstable four-piece convective profile (Eq. 18.121, Lamb & Duran 1977), a neutral profile (Eq. 18.122, Myrup & Ranzieri 1976), or a stable profile (Eq. 18.125, Businger & Arya 1974). K_yy is 0.1*w_star*z_i under unstable conditions (Eq. 18.128) and equals K_zz otherwise. Three purely-algebraic equations, no time integration. Migrated from AtmosphericDynamics.jl@816cc391 src/atmospheric_diffusion.jl:30 (`AtmosphericDiffusion` @component).
- AtmosphericStability
model
atmospheric_dynamics
local_scale
Atmospheric static-stability diagnostics from Seinfeld & Pandis (2006) Ch. 16 (Meteorology of the Local Scale). Given the air temperature T and pressure p at a height z, the air temperature T_below one layer below, and the layer spacing delta_z, the component computes the potential temperature theta = T*(p_0/p)^(R_air/c_p) (Eq. 16.14), the actual temperature lapse rate dT_dz = (T - T_below)/delta_z, the potential-temperature gradient dtheta_dz = dT_dz + Gamma_d (Eqs. 16.16-16.18), and the static-stability parameter S = dtheta_dz: S > 0 stable, S = 0 neutral, S < 0 unstable. Four purely-algebraic equations, no time integration. Migrated from AtmosphericDynamics.jl@816cc391 src/local_scale_meteorology.jl:32 (`AtmosphericStability` @component).
- HoltslagBovilleLocalDiffusion
model
atmospheric_dynamics
holtslag_boville
Local boundary-layer diffusion scheme of Holtslag & Boville (1993) — eddy diffusivity from local gradients of wind and virtual potential temperature, via a height-dependent mixing length and a Richardson-number stability function. Migrated from AtmosphericDynamics.jl@816cc391 src/holtslag_boville_1993.jl:184 (`HoltslagBovilleLocalDiffusion` @component).
- HoltslagBovilleNonlocalABL
model
atmospheric_dynamics
holtslag_boville
Nonlocal atmospheric boundary-layer diffusion scheme of Holtslag & Boville (1993). Given the height z, boundary-layer depth h, friction velocity u_star, surface virtual heat flux wθ_v0, surface scalar flux wC_0, surface virtual potential temperature θ_v0 and Obukhov length L, it computes the convective velocity scale w_star, the φ_m/φ_h Monin-Obukhov similarity profiles, the momentum and scalar velocity scales w_m/w_t, the turbulent Prandtl number Pr, the eddy-diffusivity profile Kc = κ·w_t·z·(1−z/h)² and the countergradient nonlocal transport term γc. The nonlocal scheme represents transport by large convective eddies that the local scheme cannot. Migrated from AtmosphericDynamics.jl@816cc391 src/holtslag_boville_1993.jl:290 (`HoltslagBovilleNonlocalABL` @component); algebraic (observed-only) — the 7 inputs are parameters, the 14 turbulence quantities are algebraic state variables, no ODE integration.
- HoltslagBovilleSurfaceFlux
model
atmospheric_dynamics
holtslag_boville
Parameterized atmospheric-boundary-layer surface fluxes following Holtslag & Boville (1993), 'Local Versus Nonlocal Boundary-Layer Diffusion in a Global Climate Model', J. Climate 6, 1825-1842. A diagnostic (purely algebraic) bulk-aerodynamic scheme: from the lowest-model-level wind (u₁, v₁), the surface and lowest-level potential and virtual potential temperatures (θ₀/θ₁, θᵥ₀/θᵥ₁), and specific humidities (q₀, q₁), it computes the kinematic surface fluxes of momentum (wu₀, wv₀; Eqs. 2.1-2.2), heat (wθ₀; Eq. 2.3) and moisture (wq₀; Eq. 2.4). The stability-dependent exchange coefficients Cₘ and Cₕ (Eqs. 2.5-2.6) are the neutral coefficient Cₙ (Eq. 2.7, a logarithmic function of the roughness ratio) modulated by the stability functions fₘ and fₕ, which switch on the sign of the surface bulk Richardson number Ri₀ (Eq. 2.8): the unstable branch uses the Louis et al. (1982) forms (Eqs. 2.9-2.10) and the stable branch the Holtslag & Beljaars (1989) form (Eq. 2.11). The model has 11 algebraic variables (no time integration), 11 equations, and 15 parameters (4 physical constants + 11 inputs). All quantities are SI. Migrated from AtmosphericDynamics.jl@816cc391 src/holtslag_boville_1993.jl:35 (`HoltslagBovilleSurfaceFlux` @component).
- LocalScaleMeteorology
model
atmospheric_dynamics
local_scale
Local-scale boundary-layer meteorology from Seinfeld & Pandis (2006) "Atmospheric Chemistry and Physics", 2nd ed., Chapter 16 "Meteorology of the Local Scale". A flat observed-only algebraic component that combines atmospheric static-stability analysis, Monin-Obukhov surface-layer similarity theory and Pasquill stability-class estimation: from the air temperature and pressure, the surface-layer geometry, the friction velocity u_star and the surface sensible heat flux q_z it computes the potential temperature θ (Eq. 16.14), the actual and potential-temperature lapse rates dT_dz and dθ_dz (Eqs. 16.16-16.18), the Monin-Obukhov length L and its inverse L_inv (Eq. 16.70), the stability parameter ζ = z/L, the Businger-Dyer stability functions φ_m, φ_h and their integrated forms ψ_m, ψ_h (Eqs. 16.75, 16.78-16.79), the stability-corrected mean wind speed ū (Eq. 16.66) and the Pasquill stability class (1=A to 6=F) via the Golder (1972) correlation (Eq. 16.83). Twelve purely-algebraic equations, no time integration. Migrated from AtmosphericDynamics.jl@816cc391 src/local_scale_meteorology.jl:234 (`LocalScaleMeteorology` @component).
- SurfaceLayerProfile
model
atmospheric_dynamics
local_scale
Monin-Obukhov surface-layer similarity theory for the atmospheric surface layer, from Seinfeld & Pandis (2006) "Atmospheric Chemistry and Physics", 2nd ed., Chapter 16 "Meteorology of the Local Scale". Observed-only algebraic component: from the friction velocity u_star, surface sensible heat flux q_z, and surface-layer geometry it computes the Monin-Obukhov length L (Eq. 16.70), the dimensionless stability parameter ζ = z/L, the Businger-Dyer stability functions φ_m and φ_h (Eq. 16.75), their integrated forms ψ_m and ψ_h (Eq. 16.78-16.79), and the stability-corrected mean wind speed ū (Eq. 16.66 with the Eq. 16.77 correction). Migrated from AtmosphericDynamics.jl@816cc391 src/local_scale_meteorology.jl:107 (`SurfaceLayerProfile` @component); the 4 upstream @constants (g, κ, ĉ_p, ε_q) are declared as fixed-default parameters.
- YSU
model
atmospheric_dynamics
ysu
The YSU (Yonsei University) nonlocal boundary-layer scheme of Hong, Noh and Dudhia (2006), with the stable-regime (Hong 2010) and top-down (theta_li) boundary-layer-top diagnostics of WRF 4.8, written as a single-column PDE component on the EarthSciDiscretizations grids/column_nonuniform_1d grid (layer index `lev`, layer 1 at the surface; interface index `lev_nodes`, interface 1 the surface). The physics is transcribed from the CCPP kernel bl_ysu_run in phys/physics_mmm/bl_ysu.F90 (NCAR/MMM-physics, the WRF 4.8 submodule). Prognostic column fields theta (potential temperature), u, v, qv, qc and qi obey the density-weighted flux-form vertical diffusion d(c)/dt = (1/rho) d/dz[ rho K_c dc/dz - Phi_c ], where K_c is the interface eddy diffusivity of the field (K_h for theta, K_m for u and v, K_q for water) and Phi_c is the prescribed (non-gradient) part of the turbulent flux: the surface flux on interface 1 (-hfx/cp for theta, -qfx for qv, rho_s u_*^2 u_1/|U| for momentum -- the sign convention of the ESD flux rule, Phi = rho K dc/dz on the face) and, inside the boundary layer, the YSU nonlocal (counter-gradient) flux rho K_c gamma_c plus the entrainment flux (w'c')_h ((z - z_1)/(h - z_1))^3, zero on the top interface. The gradient term is lowered by the ESD rule varcoeff_face_laplacian_lev_flux_bc applied to (rho K) on the interfaces (its own prescribed face fluxes kdudz_bot/kdudz_top are zero here because every prescribed flux is carried by Phi so that the six prognostic fields can share one rule instance), the prescribed-flux term by face_flux_D_lev_supplied_faces. The density weighting is exactly the hydrostatic sigma-coordinate form of the Fortran: rho on an interface is (p[k] - p[k+1])/(g (zc[k+1] - zc[k])) and in a layer (p_int[k] - p_int[k+1])/(g dz[k]), so with WRF's pressures and heights the lowered operator reproduces bl_ysu_run's tridiagonal coefficients term by term (dsig xkzh rdz / del). Boundary-layer height: the bulk-Richardson search of components/atmospheric_dynamics/ysu/bulk_richardson.esm is applied (1) with the lowest-level theta_v, (2) with the thermal excess of the surface heat and moisture fluxes when the surface layer is unstable and the buoyancy flux positive, (3) the top-down theta_li scan that raises the top to just above the highest theta_li-unstable level (ysu_topdown_pblmix; it starts at the previous kpbl and evaluates the bulk Richardson number from theta_li at every level it visits, level 1 included -- brli1 -- rather than seeding level 1 with the surface-layer br), and (4) the stable-regime search with the Hong (2010) critical value (0.25 over land, Rossby-number dependent over water) when the surface layer is stable and no boundary layer was found; each search is an aggregate over the level index and never a recurrence (see bulk_richardson.esm). Diffusivities: inside the boundary layer the K-profile K_m = k w_s z (1 - z/h)^p with the surface-layer velocity scale w_s = (u_*^3 + phifac k w_*^3 (1 - z/h))^(1/3) (or u_*/phi_m(z) when stable), K_h = K_m / Pr with the height-tapered Prandtl number of Hong et al. (2006, their eq. A10), K_q likewise; above the boundary layer the local Ri-dependent mixing-length diffusivity of Louis type with the in-cloud moist Richardson number; in the entrainment zone ((z - h)/delta)^2 < 4.6 the geometric mean of the local value and the entrainment-flux value -w_e dz_h exp(-((z - h)/delta)^2). Every diffusivity is floored by the background values and capped by xkzmax. Consumer-supplied inputs: the column fields (p, p_int, exner, ze and the initial theta, u, v, qv, qc, qi) are REWRITE-TARGET ops `input_<name>` (esm-spec 4.2 open tier) that the consumer lowers -- in the inline tests through a per-test `expression_template_imports` library (tests/<test id>_inputs.esm) because esm-spec 6.6 `parameter_overrides` admit scalars only; surface-layer scalars (hfx, qfx, u_*, psi_m, psi_h, br, |U|, U10, land mask, z0, psfc) are ordinary parameters. NOT transcribed (inactive in every test regime): the BEP/BEP+BEM urban forcing terms, the optional ocean-current (uox/vox) surface drag, the topo_wind corrections (ctopo = ctopo2 = 1), the extra passive-tracer mixing (nmix = 0), and the WRF diagnostic outputs u10/v10 (pass-through), dusfc/dvsfc/dtsfc/dqsfc (column sums) and the TKE/hybrid-PBLH diagnostics. The cloud-top radiative-entrainment branch (ysu_topdown_pblmix, WRF cloudflg: a cloud layer at kpbl-1 whose integrated radiative cooling radsum drives top-down thermals wstar3_2, extra entrainment we_rad, a counter-gradient term hgamt2 and a second K-profile term wscalek2) is transcribed (exercised by synthetic_cloudtop_call120, and switched off by topdown = 0 in synthetic_notopdown_cloudtop_call120); radsum is the cumulative column integral of the radiative cooling. Fractional powers of quantities that vanish identically outside their regime (w_*^3 in a stable column, wstar3_2 below a cloud-free top) are gated with ifelse, so that a Jacobian of the right-hand side never evaluates the derivative of a root at zero. Tendencies are observed variables (`dthdt`, `dudt`, `dvdt`, `dqvdt`, `dqcdt`, `dqidt`) so that the inline tests assert the instantaneous right-hand side at time 0 against the real64 kernel's tendency extrapolated to dt -> 0 (Richardson extrapolation of the implicit step over dt = 0.04, 0.02, 0.01 s; the Fortran solves the diffusion implicitly, so its finite-step tendency differs from the derivative by O(dt K / dz^2)). Test provenance: the inputs and expected values come from a WRF v4.8.0 em_scm_xy single-column run of the instrumented fork ctessum-claude/WRF (branch earthsciml-instrumented, module_esm_dump; physics_mmm at ctessum-claude/MMM-physics 52cfbd7) and from replays of the dumped kernel calls through that fork's real64 kernels/ysu_driver; the synthetic_* tests replay a dumped column after the modification their description states. The numbers were transcribed by tools/fill_tests.py of EarthSciML/EqWeFiC. The dumps, the driver and the generator are not part of this repository, so the values are recorded data rather than regenerable output.
- YSUParameters
model
atmospheric_dynamics
ysu
Scheme constants of the YSU (Yonsei University) nonlocal boundary-layer scheme, transcribed from the `parameter` declarations and in-line literals of phys/physics_mmm/bl_ysu.F90 (WRF 4.8, NCAR/MMM-physics CCPP kernel `bl_ysu_run`). Mounted by the YSU component as subsystem `par` so that no tuning constant is written inline in the physics. Values are the nominal (decimal) values written in the Fortran source. NOTE (recorded in FORTRAN_BUGS.md of EarthSciML/EqWeFiC): the kernel declares these as real(kind_phys) but initialises them from default-real literals, so a real64 build actually runs with the single-precision roundings (e.g. h1 = 0.33333335 -> 0.3333333432674408, not 1/3; afac = 6.800000190734863); the YSU tests document the resulting O(1e-7) relative mismatch in their tolerances rather than reproducing the rounding here.