Orography
- GWDOColumnState
model
atmospheric_dynamics
gwdo
The column state GWDO builds before it knows anything about the orography: the thermodynamic profile, the earth-relative wind, the three orography-referenced level indices, the pressure-weighted low-level means, the projected wind speed along the low-level flow, and the layer Richardson number and squared Brunt-Vaisala frequency -- together with the six-way gate `ldrag` that switches the whole scheme off in a column. This is lines 249-459 of `phys/physics_mmm/bl_gwdo.F90` (WRF 4.8, NCAR/MMM-physics CCPP kernel `bl_gwdo_run`, the Hong et al. 2025 revision), which every later stage reads and none of which mentions the sub-grid orography statistics beyond the standard deviation `var` and the maximum height `omax` = ELVMAX.
- GWDOOrographicStatistics
model
atmospheric_dynamics
gwdo
What the sub-grid orography looks like TO THE LOW-LEVEL WIND, and the wave stress it launches. Lines 343-377 and 461-494 of `phys/physics_mmm/bl_gwdo.F90` (WRF 4.8, NCAR/MMM-physics CCPP kernel `bl_gwdo_run`).
- GWDOParameters
model
atmospheric_dynamics
gwdo
Scheme constants of WRF's orographic gravity-wave drag and low-level flow-blocking scheme (GWDO, `gwd_opt = 1`), transcribed one-for-one from the `real(kind=kind_phys), parameter` and `integer, parameter` declarations of `phys/physics_mmm/bl_gwdo.F90` (WRF 4.8, NCAR/MMM-physics CCPP kernel `bl_gwdo_run`; the Hong et al. 2025 revision of Choi and Hong 2015). Mounted by every GWDO component as subsystem `par` so that no tuning constant is written inline in the physics. Every constant is declared `real(kind=kind_phys), parameter` but INITIALISED FROM A DEFAULT-REAL LITERAL. The tests reference the real64 standalone kernel driver (`kernels/gwdo_driver` / `gwdo_diag_driver` of WRF fork branch earthsciml-instrumented-gwdo: `kind_phys = real64` via -DDOUBLE_PRECISION, bl_gwdo.F90 compiled WITHOUT -fdefault-real-8), in which a default-real literal is rounded to binary32 and then widened, so the scheme runs the binary64 widening of the literal's binary32 value -- the same defect N2 records for YSU and WSM6 and N45/N101 for the KPP mechanisms. A real WRF `configure -r8` build is NOT this: it promotes default-real literals, so there every constant below is its exact decimal (ce = 0.8). The two builds differ by about 1e-9 relative in efac and the launch stress. YSU and WSM6 reference the same kind of real64 kernel driver, but carry the decimals and absorb the resulting O(1e-7) mismatch in their tolerances; GWDO carries the roundings because its contract is rel 1e-9, which that mismatch would exceed. Fifteen of the twenty-one literals are exactly representable in binary32 and are unaffected (0.25, 1., -100., 0., 10., 1., 10., 1., 10., 50., 1., 10., 10., 0., 750.). SIX ARE NOT, and the values below are their widened binary32 roundings, not their decimals: `ce` = 0.800000011920929, `bnv2min` and `olmin` = 9.999999747378752e-06, `odmin` = 0.10000000149011612, `pcutoff_den` = 0.009999999776482582, `qmin` = 1.0000000031710769e-30 (FORTRAN_BUGS N103). Only `ce` reaches an answer on the reference set -- it is the exponent of the asymmetry enhancement (oa + 2)^(ce Fr), where its 1.5e-8 relative offset becomes 1.5e-9 to 4.6e-9 in efac and in the launch stress. Carrying the roundings makes the agreement EXACT; carrying the decimals misses the real64 kernel by that amount, which is above the rel 1e-9 contract. The SIX constants GWDO does NOT declare -- g, cp, R_d, R_v, eps_1 and pi -- arrive as subroutine arguments. The first five come from WRF's `module_model_constants` and are read here from `lib/wrf_constants.esm`. pi does NOT: the driver passes the truncated inline literal `PI=3.141592653` (`module_pbl_driver.F:2192`) rather than `piconst` (FORTRAN_BUGS N102), and `lib/wrf_constants.esm` carries only the full `piconst`, so the value WRF actually passes is declared below as `pi`. It reaches only the wind-rose sector of the low-level wind (`fdir = mdir/(2 pi)` and `wdir = atan2(ubar, vbar) + pi`, bl_gwdo.F90:212 and :352). Replaying all 140 dumped rows through the real64 driver with pi = 3.141592653 instead of math.pi (gwdo_real/run_diag64p.py) reproduces every output and diagnostic field bit for bit.