Eddy-Diffusivity
- 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).
- 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.
- 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.