Skip to main content

Module terrain

Module terrain 

Source
Expand description

Diagnostic mass-consistent terrain wind (NOABL/CONMESS-style).

A terrain height grid (in metres) plus a background WindField and optional surface wind monitors become a terrain-adjusted field: each fixed above-ground level is adjusted independently to satisfy 2-D horizontal mass conservation (div(u) = 0 with u = u0 − ∇φ), so flow is deflected over and around terrain. This is the cheap diagnostic tier of terrain flow, not a full CFD solve. Entirely offline and deterministic.

Structs§

HeightGrid
Terrain heights on an axis-aligned, uniform grid in metres. Row-major: heights[i * ncols + j] is column j (east), row i (north). Position y is up; the grid lies in the x–z plane.
Monitor
One surface wind observation, in the terrain grid’s frame (metres).
TerrainFlowField
A diagnostic terrain-adjusted wind field.

Functions§

local_en_m
Local equirectangular projection: (east, north) metres from the reference point, for the small domains a wind network covers. Not for continental scales.
monitors_from_geo_csv
Parse a monitor file of one reading per line: latitude,longitude,speed_ms,direction_compass_from_deg, # comments and a header line are skipped. Coordinates are projected via local_en_m and directions rotated into the frame.