curriculum · deep dive into wrf · course 2 of 6 · ~15 min

Building the World

Map projections, terrain datasets, and why the ground under the model deserves paranoia.

Before any weather: a map

Everything geogrid does happens before the first forecast and shapes every forecast after. Its job sounds clerical — rasterize terrain, land use, and soil onto each domain — but the intro arc’s warning bears repeating with feeling: the model will faithfully forecast whatever geography you hand it, real or not. This course is about handing it the right one, and it is told through frothy’s actual namelist.wps.

namelist.wps — &geogrid (frothy, PNW region)
 parent_id            = 1,      1,      2, j_parent_start       = 1,      37,     63, e_sn                 = 104,    151,    91,                         +modis_fpar+modis_lai+2m+2.5m',                        'SRTM+usgs_lakes+bnu_soil_30s+…', dx                   = 10000, dy                   = 10000, ref_lat              = 48.752, truelat2             = 50.00,
Each nest’s cells are this many times smaller than its parent’s: 10 km → 2 km (5:1) → 667 m (3:1). Odd ratios like 3:1 keep child cells centered neatly inside parent cells; 5:1 is about as aggressive a jump as the community recommends before the hand-off gets rough.
tap a highlighted lineExcerpt from the file as it runs today; lines with a marker have a story.

The resolution of the world must match the resolution of the grid

Terrain data comes in tiers, and the namelist above buys a different tier per domain. That’s not thrift, it’s correctness in both directions. Too coarse, and the inner nest’s mountains are melted candles: gaps too wide, ridges too low, and every wind that accelerates through a real gap comes out lazy. Too fine isn’t free either: geogrid averages the source data into each cell, and sharper source under a coarse grid mostly buys aliasing artifacts and slow preprocessing. The craft is matching them — and then looking. geogrid’s geo_em files are ordinary NetCDF; plotting HGT_M before ever running a forecast is the cheapest quality control in the entire system. Is Mount Baker about 3,286 m? Is Bellingham Bay at zero? Do the San Juans exist as islands, not a smear?

Water is a decision, not a fact

The most consequential field geogrid writes isn’t elevation — it’s the land–water mask. Whether a cell is water decides its roughness (glassy vs. forested), its heat capacity (the sea breeze engine from the intro arc), and which surface physics runs there. Coastlines in global land-use data are blurry at exactly the scale a 667 m nest cares about, so every shoreline cell is a judgment call the dataset already made for you, correctly or not.

Lakes are worse, and frothy carries a worked example. Default land-use data happily loses small lakes entirely, which is why usgs_lakes sits in the dataset list: without it, Lake Whatcom — a primary frothy zone — risks being rasterized as forest. And existing isn’t enough. At 667 m the lake is about two cells wide, and the intro arc’s rule (features need ~4–7 cells to behave) says exactly what happens: the along-lake jet and thermal onset come out smoothed and biased weak. The fix is more world-building — an experimental frothy variant nests a 222 m domain over the lake corridor, putting ~7 cells across the water and resolving the ridges that flank it, at a bruising +130% compute. One lake, one mask, one more nest: measurably different wind.

Beyond terrain: the slow fields

geogrid also lays down the fields that change slowly or never: soil texture (sandy soil heats faster than clay — thermals care), vegetation density by month (the modis_fpar and modis_lai entries), and the land-use category that parameterizations key their roughness and albedo tables off. None of it is glamorous, and all of it feeds course 5’s physics directly. When two configurations disagree about an afternoon sea breeze, the difference is as often in these tables as in the atmosphere.

What to keep

  • geogrid runs once per region; its mistakes run forever. Plot geo_em before trusting anything downstream.
  • Projection choice and true latitudes tailor the flat grid to your patch of the round earth; center them on what you care about.
  • Terrain dataset resolution should match grid resolution — SRTM under the fine nests, coarser is fine for d01.
  • The land–water mask is the highest-stakes field in the file: roughness, heating, and physics selection all key off it.
  • Small lakes need explicit help (usgs_lakes, correct surface elevation) or they vanish — ask Lake Whatcom.