Dynamical Core
wrf_gpu integrates a nonhydrostatic, split-explicit ARW dynamical core on
the GPU: the same equations and numerical methods as WRF's Advanced Research WRF core, rewritten in JAX.
Each release is compared hour by hour with the original CPU-WRF from the same inputs; results are close
to WRF but not bit-identical (see validation). The result path has no
hidden clamping or nan_to_num repairs.
Time integration: RK3 + acoustic sub-stepping¶
The core uses WRF's split-explicit time scheme. A third-order Runge-Kutta (RK3) large
step advances the slow (meteorologically significant) modes, while the fast acoustic and
gravity-wave modes are integrated with smaller acoustic sub-steps inside each RK3
stage. Only rk_order=3 is supported.
Native single-root and live-nested runs honor time_step_sound. Zero or omission derives WRF automatic sound steps from dt/grid spacing (4 on the tracked grid). The legacy CPU-history replay driver has a separate historical default of 10; it is not the native default.
Per-domain advection controls¶
The requested moist_adv_opt and scalar_adv_opt are used for each domain,
in native runs and in replay runs. The values of the default suite are validated; other values run as
requested but are not separately validated (namelist page).
Precision: WRF's single precision by default¶
Since v0.3.0 the dynamical core runs WRF's own single precision (fp32) by default, with double
precision only where WRF itself uses it — as in WRF's standard single-precision build. The fp32 path
is checked against original CPU-WRF on the 24 h release gate. GPUWRF_FAST_DEFAULTS=0 selects the earlier fp64 path.
The default path runs the validated fp32 kernels (WRF's own single precision; double precision
only where WRF uses it), checked against CPU-WRF on the 24 h release gate.
GPUWRF_FAST_DEFAULTS=0 turns the fast paths off. The older opt-in mixed-precision
acoustic mode is described under Performance.
Horizontal diffusion¶
The diffusion settings are used exactly as requested. gpuwrf run refuses a
diff_opt/km_opt pair it cannot run, instead of running without diffusion.
| Closure | Setting | Status |
|---|---|---|
| 2-D Smagorinsky (horizontal) | diff_opt=1, km_opt=4 | Default — WRF's recommended real-data setting, including the terrain-slope and map-factor deformation terms |
| No explicit horizontal diffusion | diff_opt=0 | Runs as requested; not separately validated |
| 3-D TKE | diff_opt=2, km_opt=2 | Experimental — passed a 24-hour comparison; not with every microphysics scheme or inside nests |
| SMS-3DTKE | diff_opt=2, km_opt=5 | Experimental — passed a 24-hour comparison; needs bl_pbl_physics=0 and no or Noah-MP land |
| Constant K | diff_opt=2, km_opt=1 | Python API only |
| 3-D Smagorinsky | diff_opt=2, km_opt=3 | Not supported on the GPU |
Other numerics settings: diff_6th_opt 0/2 (2 = WRF's monotonic sixth-order filter),
damp_opt 0/3 (3 = upper-level Rayleigh damping of w) and w_damping 0/1.
Gravity-wave drag¶
Orographic gravity-wave drag with flow blocking (gwd_opt=1) is wired and
default-ON on the nested 1 km path. It requires the sub-grid orography statics in
wrfinput. Set GPUWRF_GWD_NESTED=0 to force it off for a memory-tighter
config. The GSL drag suite (gwd_opt=3) is not wired.
Lateral boundaries and free-running stability¶
Limited-area runs are forced through lateral-boundary relaxation from the boundary
tendencies (wrfbdy for the root; the parent supplies each nested child's boundary live —
see Nesting). This is the validated operational path.
Running free (no lateral-boundary relaxation) on wide domains (nx ≈ 160+) can go non-finite beyond approximately forecast hour 14. The validated operational path uses boundary forcing; keep boundary relaxation on for wide-domain runs.
Nesting for live nested boundaries and sub-cycling, Physics Options for the scheme menu that couples into the core, and Performance for the fp64/fp32 throughput and VRAM story.