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§
- GeoTransform
- The georeferencing parsed from a GeoTIFF’s model tags.
- Height
Grid - Terrain heights on an axis-aligned, uniform grid in metres. Row-major,
south-to-north:
heights[i * ncols + j]is columnj(east) of rowi, where row 0 is the southernmost row andiincreases northward, matching the frame’s+z = northconvention shared by monitors andlocal_en_m.origin_yis the south edge; samplingheight_atmoves north aszincreases. Positionyis up; the grid lies in thex–zplane. - Monitor
- One surface wind observation, in the terrain grid’s frame (metres).
- Terrain
Flow Field - A diagnostic terrain-adjusted wind field.
Enums§
- Srtm
Resolution - A 1°×1° SRTM tile: 1201² samples for SRTM-3 (3 arc-sec ≈ 90 m), 3601²
for SRTM-1 (1 arc-sec ≈ 30 m).
.hgtfiles are 16-bit big-endian signed metres, recorded north→south (top row is the northern edge), west→east, sample values at the tile’s corners (not centres).
Functions§
- from_
flt - Load an ESRI binary floating-point raster (
.fltraw float32 +.hdrsidecar header). Both the row order (north-first, “English reading order”) and the lower-left-corner origin are handled the same way asHeightGrid::from_ascii. - hgt_
grid - Load an SRTM
.hgttile into aHeightGridon a local equirectangular projection (metres), with(north_lat, west_lon)as the tile’s corner and the given point mapping to the frame origin. - 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 vialocal_en_mand directions rotated into the frame.