wrf_gpu

Output Files

wrf_gpu writes a WRF-compatible wrfout history file: standard NetCDF, WRF variable names, dimensions, and staggering, one frame per output time. If you already post-process WRF wrfout, your tools read wrf_gpu output the same way.

Full WRF history is the default

The operational writer defaults to full WRF history. Names, dimensions and staggering follow the WRF stream; actual field counts and active producers depend on the selected case and physics. Inspect the file inventory and its source-specific integrity evidence.

Set GPUWRF_FULL_WRFOUT_VARIABLES=0 for the reduced stream. That canonical control takes precedence over its GPUWRF_FULL_WRFOUT alias. The optional training subset is described below. Neither 104 nor 375 is a universal count of active physical fields.

Inspect a history file with the standard NetCDF tools, exactly as for WRF:

ncdump -h runs/<case>/wrfout_d01_*        # header: dims, variables, attrs
ncdump -v T2 runs/<case>/wrfout_d01_*      # dump a single variable

History filenames and per-domain cadence

History files follow WRF naming: wrfout_<domain>_<YYYY-MM-DD_HH:MM:SS> (for example wrfout_d02_2023-01-15_06:00:00). In a nested run each domain writes its own stream (wrfout_d01_…, wrfout_d02_…, …).

history_interval is honored per domain

The namelist history_interval sets the output cadence, and each domain honors its own value — including leaf children of a nest, on both the eager and the default fused integration paths. (A fused flat-leaf subtree falls back to the eager split when a child cadence is not parent-ratio aligned, so the intended training-frame yield is preserved.) Earlier versions hard-coded hourly nested output; that is fixed.

Colon-free filenames

Some object stores and network drains dislike the : in the WRF timestamp. Set GPUWRF_COLONFREE_OUTPUT=1 to write HH-MM-SS instead of HH:MM:SS (for example wrfout_d02_2023-01-15_06-00-00). The default is the WRF-standard HH:MM:SS; only the filename changes, never the file contents. See Environment Variables.

Opt-in training subset

For building downstream training datasets, set GPUWRF_TRAINING_OUTPUT_SUBSET=1 to write a compact 39-variable training subset (the model fields a learner needs — 3-D prognostics, 2-D surface and cloud-validation diagnostics, static geography, and wind-rotation / map-factor fields) instead of the full operational output. The writer also force-emits the mandatory time/coordinate variables (Times, XTIME, eta levels, and staggered lat/lon coordinates) so each frame is self-describing.

Kept variables are bit-identical

The subset is opt-in and lossless for the fields it keeps: every retained variable is byte-for-byte identical to the default full output. A name whose source is absent from a given run is silently skipped, never fabricated. The default output (flag unset) is unchanged and byte-identical.

FULL_WRFOUT controls

GPUWRF_FULL_WRFOUT_VARIABLES defaults ON; its shorter GPUWRF_FULL_WRFOUT alias is used only when the canonical value is unset. Use =0 explicitly for reduced history. A matching schema is compatibility evidence; original-CPU numerical and all-frame integrity checks remain separate.

Asynchronous and pipelined output

Writing a frame is host work that would otherwise idle the GPU. wrf_gpu overlaps it:

Env varDefaultEffect
GPUWRF_NESTED_ASYNC_OUTPUTONHands the host payload to a single bounded-queue background writer thread; the step loop resumes GPU compute immediately while the write overlaps. Set =0 (also false/off/no) to force the legacy synchronous write for A/B measurement or byte-identity proofs.
GPUWRF_NEST_OUTPUT_PIPELINEOFFWhen truthy, moves the finite guard, the M9 surface re-solve, and the device→host pull off the step thread onto a background materialize thread, so host materialization overlaps the next compute burst instead of idling the GPU at every output boundary.
Overlap changes timing, not bytes

Both levers move which thread and when the same pure operations run — the written NetCDF bytes, the finite-guard verdict, and the per-domain write order are byte-for-byte identical to the synchronous path. A finite error or a failed background write is surfaced fail-closed (re-raised at the next output boundary and again at run end), so a NaN can never escape into a "green" run or land a corrupt frame on disk.

Restart files (wrfrst)

No WRF wrfrst files are written. Native single-domain d01 and nested runs instead write their own verified checkpoint generations (--checkpoint-dir) and resume from them (--resume-checkpoint); CPU-WRF replay runs have no restart. See Running → Restart.

See also

Run commands and the cold-compile / warm-cache behavior are on Running the Model; all output-related environment variables are collected on Environment Variables.