curriculum · deep dive into wrf · course 6 of 6 · ~14 min

Run, Crash, Verify

Adaptive timesteps, CFL blowups, rsl logs, and how a configuration earns the live map.

The hour the money is spent

Everything so far was preparation; now wrf.exe runs for the better part of an hour, and operating it is its own craft. The model runs under MPI: the domains are sliced into rectangular patches, one per processor, each rank simulating its patch and trading edge columns with its neighbors every step. Two consequences follow. First, more cores only help until patches get so small that trading edges outweighs computing interiors (frothy’s runner literally checks decomposition limits before launch). Second, every rank writes its own diary — rsl.out.0000, rsl.error.0003, and so on — and those files are where a run tells you, sometimes politely, what is going wrong.

How runs die

The classic death is the one the intro arc demonstrated with a slider: a CFL violation. Somewhere — almost always over the steepest terrain, almost always in strong flow — a vertical velocity spikes, one column’s numbers overshoot, the overshoot feeds back, and within a few steps the fields are NaN and the run is over. The rsl files narrate the illness before the death: warnings naming the exact grid point and level where the Courant number exceeded its limit. A healthy run has none; a run with a scattered handful over Mount Baker in a windstorm is on notice; a run printing them in bursts is about to teach you about restart files.

The remedies are all trades. A smaller timestep costs wallclock. w_damping clips the updrafts that trip the limit — cheap, but it clips real ones too (frothy leaves it off, as course 4 noted). More damping smooths the crash away and smooths the forecast with it. The elegant fix is to stop guessing the timestep at all:

0255075+0 h+3 h+6 h+9 h+12 h+15 htimestep (s)max_time_step = 75 s (d01)front crosses the domain
One outer-domain run with use_adaptive_time_step: WRF grows the step ~5% at a time while the fastest wind anywhere in the domain leaves CFL headroom, and slashes it the moment a front’s jet threatens the limit. You pay for the weather you actually get, instead of running every calm morning at the timestep your worst storm needs.
namelist.input — &domains, the adaptive stepper (frothy)
 use_adaptive_time_step              = .true. adaptation_domain                   = 1
The stepper’s thermostat: hold the domain’s worst Courant number near 1.2 — comfortably inside RK3’s ~1.4 stability ceiling from course 4, far above the timid fixed timestep you’d pick by hand to survive the worst hour of the worst day.
tap a highlighted lineExcerpt from the file as it runs today; lines with a marker have a story.

Choosing what to keep

A full wrfout history frame — every variable, every level, every domain — is hundreds of megabytes, and writing it hourly would spend more time on disk than dynamics. The namelist’s answer is ruthless curation, and frothy’s &time_control section is a working example: full history only every 3 hours (history_interval = 180) for debugging and archives, with an iofields_filename trim list cutting unneeded fields; the product the map actually consumes rides a small auxiliary stream — auxhist23_outname = "wrfwind_d<domain>_<date>" — just the wind-relevant surface fields, every hour on the outer domains and every 5 minutes on d03 (auxhist23_interval = 60, 60, 5). That five-minute cadence is why the frothy map can animate a sea breeze front instead of flip-carding through hourly snapshots. One more C-grid footnote from course 4 applies on the way out: u and v leave the model on staggered faces and must be de-staggered to cell centers before they can be a map.

Verify: how a configuration earns the map

This arc has changed namelist lines in nearly every course — a PBL scheme here, a lake nest there. The final discipline is refusing to believe any of it on vibes. A candidate configuration auditions: re-run a library of past days (hindcasting, from the intro arc), score 2 m winds against the buoys and stations that measured those days, and compare, station by station, lead by lead, against the incumbent. Only a change that wins on the scoreboard is promoted to the live map — and bench keeps scoring it in public afterward, embarrassing days included. The intro arc called tuning without scoring astrology with a supercomputer; this arc’s version is shorter: the namelist proposes, the buoys dispose.

And that is the deep dive. You have now read frothy’s real configuration end-to-end: the toolchain that stages a run, the world geogrid built, the borrowed atmosphere and its walls, the core that moves time, the physics menu, and the operations that keep it honest. WRF is public domain and runs on hardware you own. The only remaining ingredient is a stretch of water you care about enough.

What to keep

  • wrf.exe runs as MPI patches; the per-rank rsl files are the run’s diary — read them before believing anything else.
  • CFL violations over steep terrain are the classic crash; every remedy trades wallclock, honesty, or sharpness.
  • The adaptive stepper holds measured CFL near a target — grows the step 5% at a time, cuts it instantly — so you pay for the weather you get.
  • Output is curated, not dumped: trim fields, and put the product on a fast auxiliary stream (frothy: 5-minute wind on d03).
  • Configurations audition via hindcast and stay accountable on bench. The namelist proposes, the buoys dispose.