Case set-up from a YAML file
tools/make_steer_case.py writes a STEER case folder from a short YAML case description: the deck (or decks), the
terrain and roughness files STEER reads, a run script and a summary. It then checks every deck it wrote with the deck
checker, tools/check_steer_inputs.py, which can also be run on any deck by hand. The workflow follows the YAML
case set-up of amrTerrain (a private case set-up tool written for AMR-Wind), with STEER’s own
inputs, cleaner key names and the capabilities STEER has that amrTerrain does not set up (named drives, a column
first guess, nested patches, canopy and buildings).
Requirements
Python 3.8 or later with PyYAML and numpy. rasterio is optional: without it, GeoTIFF files go through a built-in
reader (little-endian, one band, strips with no compression or LZW, integer or float samples, GDAL_NODATA and
pixel-is-point); with it, any GeoTIFF that rasterio reads. Latitude and longitude go to UTM through a built-in
conversion (Karney’s series, below 1 mm within a zone); pyproj is not needed. The deck checker needs only the
standard library.
The terrain download (tools/fetch_terrain.py) needs PyYAML, numpy and an internet connection. The case set-up window
(tools/steer_gui.py) also needs PySide6 and pyqtgraph (pip install PySide6 pyqtgraph numpy pyyaml).
A first case
python3 tools/make_steer_case.py --example > case.yaml
python3 tools/make_steer_case.py case.yaml
cd flat_west && STEER=../build-rel/steer ./run.sh
--example prints a starter case: wind from the west, 8 m/s at 10 m, over 4 km of flat ground. Add a
terrain.file and a domain.center to move it onto real terrain:
case:
name: butte_222
domain:
center: [9345., 10080.] # in the terrain file's frame (m)
half_width: 4000. # m from the centre to each face
top: 2800. # m above the lowest point kept
terrain:
file: dem.tif
mesh:
cell_size: 50.
layers: 40
first_layer: 4.
wind:
speed: 8.
height: 10.
direction: 222. # the direction the wind comes from, clockwise from north
surface:
roughness: 0.01
The folder Tests/Infrastructure/Case_Setup holds six more examples, each run and checked by CTest: a sweep of
directions, a nested patch, a geostrophic wind from the column (along a diagonal, and along x and y), a hill from
an ESRI ASCII grid and an upstream roughness from a regional map.
What the tool does
Domain and mesh. The domain is a box around
domain.center. The cell counts are the nearest multiples of 8 to the asked cell size (so the hierarchy coarsens), andmesh.hierarchy_levels = autotakes up to three levels as the counts allow. Withmesh.first_layerthe layers stretch geometrically to reachdomain.top.Terrain. The elevation data are cut to the domain plus a margin, thinned to no finer than half a cell, shifted so that the lowest point kept is z = 0 (
terrain.zero_level) and written asterrain.xyz. A geographic file is projected to UTM.terrain.borderblends the ground to a flat band inside the lateral faces.Wind. The meteorological direction becomes
bc.inflow_direction(towards, counter-clockwise from x: \(270^\circ - \text{from}\)). The faces the wind enters through areinflow, those it leaves through areoutflow; a face parallel to the wind iswind.side_faces. With a geostrophic drive the wind turns with height, so the faces are chosen from the middle of the turn: the wind asked for, turned by half the drag law’s angle \(\alpha = \operatorname{atan2}(B,\ \ln(u_*/(|f| z_0)) - A)\) towards the geostrophic wind (clockwise in the northern hemisphere; \(A\), \(B\) and \(f\) below). Withatmosphere.geostrophic_windgiven, the middle is that wind’s direction turned back by \(\alpha/2\), \(u_*\) from the drag law, andwind.directiondoes not set the faces. No face is then a slip wall: a face parallel to the wind near the ground takes the flow that crosses it aloft. The faces also differ from those of the wind asked for when it is within \(\alpha/2\) of an axis (11.8 degrees for 8 m/s at 10 m over \(z_0 = 0.03\) m at 45 degrees north), where the wind crosses a face one way near the ground and the other way aloft.wind.side_faceshas no effect and is refused. \(\alpha/2\) is a rule of thumb, not the direction of the mass flux: over a 1.5 to 3 km top at 45 degrees north the height-integrated flux turns 0.8 to 0.9 \(\alpha\), and at 10 degrees north, where the boundary layer is deeper than the domain, 6.8 degrees against \(\alpha/2 = 11\). A face nearly parallel to the wind carries little of the flow either way: from 265 degrees the 3-D run is 2.03 % off the column with the turned faces and 1.93 % with those of the wind asked for. Below about 15 degrees of latitude, check the faces against the column’s table. From 270 degrees in that case, slip walls left the 3-D run up to 72 % of the top wind off the column’s; the turned faces leave 2.0 % (rt_case_setup_column_axis). The log law gives \(u_* = \kappa U_\mathrm{ref} / \ln((z_\mathrm{ref} + z_0)/z_0)\), \(\kappa = 0.41\).Drive (
abl.drive, How-to guides).inflow_onlyandcouette(a moving lid at the log law’s speed at the top) need no rotation.geostrophic_columnwrites a 1-D column run first: withatmosphere.geostrophic_windnot given, the column turns and scales the geostrophic wind until the wind atwind.heightiswind.speedfromwind.direction. It starts from the neutral drag law,\[G = \frac{u_*}{\kappa}\sqrt{\left(\ln\frac{u_*}{|f|\,z_0} - A\right)^2 + B^2}, \qquad A = 1.8,\quad B = 4.5,\]with \(f = 2\Omega\sin\phi\) the Coriolis parameter at latitude \(\phi\).
run.shreads the adjustedforcing.ugandforcing.vgfrom the column’s log and gives them to the 3-D run, which starts from the column (init.first_guess = column).geostrophic_inflowuses the same column for the inflow faces.Potential temperature (
abl.theta):neutral,capped(an inversion and lapse rate, solved),frozen(a sounding held fixed) orsurface_flux.Roughness. One
surface.roughness, or a map:x y z0points or a land-cover raster with a class table (ESA CCI by default, or your own mapping). The ESA CCI table is amrTerrain’s with five classes moved to the updated Davenport classes of Wieringa (1992, J. Wind Eng. Ind. Aerodyn. 41, 357–368): no data (0) is refused or takessurface.roughness_map.default; tree or shrub cover in cropland (12) is 0.25 m; flooded tree cover (160, 170) is 1.0 m, as the other trees; bare areas (200–202) are 0.005 m. The class codes are those of the ESA Climate Change Initiative Land Cover maps; thanks to ESA and the Land Cover CCI team for making them public. The inflow profile takeswind.upstream_roughness(defaultsurface.roughness), or withautoa value per direction from a regional map (Upstream roughness of each direction).Closure.
model.lee_setting = recommendedwrites the recommended lee setting of Turbulence model (section Recommended setting):turb.realizability = 0.309,turb.nut_relax = 0.5and the convection blend belowmodel.blend_height.Nests. Each
nestsentry becomes a foldernest_<name>with a patch deck at half the parent’s cell size (refinement 2 2 1), its faces moved to the parent’s nearest cell faces and at least two parent cells inside the parent’s faces.run.shruns the parent, then each patch withbc.nest_parentset to the parent’s last checkpoint.Sweeps.
wind.directions(a list, orstart,stop,step) writes one folderdir_<deg>per direction with its own deck;run.shruns them in turn and skips those that already hold their answer (Stopping and going on).Anything else.
steer_inputswrites STEER inputs as they are, after everything else: a key the tool also writes is replaced, andnullremoves it. They go to the 3-D decks (the run folder’s and each patch’s), not tocolumn/inputs, the 1-D column run, which has its own mesh and keys.
Every key is checked before anything is written: an unknown key, a value out of range or a combination STEER would refuse stops the tool with a message that names the key. Nothing is written then (exit status 2).
The case folder
File |
Content |
|---|---|
|
The deck ( |
|
The column run of a geostrophic drive. |
|
The deck of a nested patch. |
|
The ground and the roughness map, in the case frame. |
|
Runs everything in order. |
|
Domain, mesh, wind, notes and the deck checker’s findings. With a geostrophic drive, |
|
Written by |
|
Written by |
|
The case description with every default filled in. |
Stopping and going on
A sweep of many directions can be stopped (a laptop closed, a job out of time) and started again: run.sh and
the window’s Run skip each direction that already holds its answer (run.resume = true, the default), and
print a line for each. A direction holds its answer when
its record
.steer_ran(indir_<deg>/, or in the case folder for one direction) equals its decks now (the run’s,column/inputsand eachnest_<name>/inputs, byte for byte), the case’s data list.steer_case_data(the SHA-256 of each data file the tool wrote:terrain.xyz,roughness.xyz, the patch terrains and the copied files) and thekey=valuearguments given torun.shnow (the window gives none); andthe run’s
log.txtand each patch’s end in STEER’s steady verdict (steer: steady after N iterations) followed by a plotfile<io.plot_file><step>that is still there with itsHeader.
Everything else runs again: a run that stopped at steady.max_iterations (not steady), diverged, was stopped
or crashed; a direction whose plotfile was removed; a case written again with other settings or other terrain,
roughness or canopy files; other arguments. A case written again with the same settings and files keeps its decks
and data list byte for byte, so its finished directions stay skipped.
The whole direction runs again, its column run and patches included. When a direction starts, its old logs are
removed and then its record is written, so a direction stopped part-way never counts as finished.
run.resume = false keeps the earlier behaviour, every direction run each time; RESUME=0 ./run.sh does the
same for one call (and RESUME=1 skips with run.resume = false); another value of RESUME stops
run.sh. The skip line reads run.sh: wind from 260 degrees: finished earlier with these decks, data files and
arguments, skipped.
The test does not see:
another STEER executable (
STEER=,run.executableor a rebuild) or a data file edited by hand after the case was written: useRESUME=0(orrun.resume = false) to run again;an
io.plot_filegiven as arun.shargument, a run that writes no plotfile (io.write_plotfile = 0) and an unsteady run (steer: unsteady run ended): these always run again.
A case folder written while the solver was called GUST (until December 2026) holds .gust_ran records and logs
with the gust: prefix, which the test does not read: its directions run again. --overwrite on such a folder
removes the files its .gust_case_files manifest lists and its .gust_ran and .gust_case_data records, as
for a folder written under the new name. A case file that names the gust_inputs section (--set gust_inputs.*
too) is read as steer_inputs; the default case name is now steer_case. Downloaded terrain tiles are kept in
STEER_DEM_CACHE (else GUST_DEM_CACHE), else ~/.cache/steer/terrain_tiles, or
~/.cache/gust/terrain_tiles when only that folder exists.
A joint run’s verdict (steer: joint run: <name> steady after N joint iterations) counts like the run’s own. The
check is per direction: a patch that stopped part-way runs the direction’s column and terrain runs again too.
A steady verdict is what STEER itself accepts: every residual below steady.residual_tol and four orders below
its reference, and the monitors settled, or the confidence stop when steady.confidence is set.
Starting a direction from the converged neighbouring direction was measured and is not offered. On the hill of
Tests/Infrastructure/Library_Hill (2 ranks, no convection blend), 260 degrees started with io.restart from
the 265 degree checkpoint (the same inflow and outflow faces) took 128 level-0 iterations; from the usual first
guess it took 45 iterations on the coarse level and 148 on level 0, about 160 level-0 iterations of work. The
restart saved about 20 % of the work and reached the same answer: the two differ by at most
\(4\times10^{-5}\) m/s, which is the iteration error at \(r = 10^{-4}\) (both are within
\(4\times10^{-5}\) m/s of the same run taken to \(r < 10^{-6}\)). STEER refuses io.restart with the
convection blend of the recommended lee setting (convection.hybrid_sigma_max), and the blend moves the wind by
about 0.8 % of the reference speed at 10 m (1 % in the first cell), so the restart cannot give the recommended
setting’s answer. Where the faces differ (for example 265 to 270 degrees, where the y faces change from inflow and
outflow to slip walls), the flow would first have to turn to the new faces; that case was not measured.
The geostrophic wind of each direction
A geostrophic drive runs a 1-D column for every direction before its 3-D run; each column finds the geostrophic
wind \(G\) that gives wind.speed at wind.height from that direction. The last step of run.sh reads
what the columns left and writes library.json and a table at the end of case_summary.txt
(tools/make_steer_case.py --collect <case folder> does the same by hand; a second collect replaces the table).
The window (steer_gui.py) does the same after its last run.
run.shremoveslibrary.jsonbefore its first run, and--overwriteremoves it too, so a file left from earlier runs never stays beside new ones.A failed collect does not fail
run.sh: the runs are done, andrun.shprints whylibrary.jsonwas not written and how to collect again.The collect step needs the case tool’s Python packages (PyYAML and numpy).
STEER_CASE_TOOLnames anothermake_steer_case.py(the path written intorun.shis that of the tool that wrote it) andPYTHONanother interpreter.--collectreads a written case folder only; it is refused with a case file or any other option but--quiet. Exit status: 0 written, 2 refused (nothing written).
library.json holds format_version (1), case, drive, reference_wind (speed, height:
the wind asked for, null when atmosphere.geostrophic_wind is given), conventions and one entry per
direction:
Field |
Meaning |
|---|---|
|
The direction asked for (degrees, from; with |
|
\(G\): |
|
|
|
The angle from |
|
The angle from the wind at the first cell centre (the direction of the surface stress) to \(G\). |
|
The table’s top level: |
|
From the table’s header: \(u_*\) (m/s), \(1/L\) (1/m) and the kinematic heat flux (K m/s). |
|
The column deck’s |
|
For a neutral column (\(1/L = 0\) and no heat flux), the neutral drag law’s
\[G = \frac{u_*}{\kappa}\sqrt{\left(\ln\frac{u_*}{|f| z_0} - A\right)^2 + B^2}, \qquad
\alpha = \mathrm{atan2}\left(B,\ \ln\frac{u_*}{|f| z_0} - A\right),\]
\(\kappa = 0.41\), \(f = 2\Omega \sin\varphi\) (\(\Omega = 2\pi/86400\) s-1,
\(\varphi\) the latitude), |
A column and the drag law need not agree: the drag law’s constants are empirical, and the column’s turning depends
on its turbulence model, its length-scale cap (turb.max_geom_lscale) and its top. For 8 m/s at 10 m over
\(z_0 = 0.03\) m at 45 degrees north (rt_case_setup_column_axis) the column gives \(|G| = 15.909\) m/s
and turns 18.36 degrees from the stress; the drag law gives 15.944 m/s and 23.51 degrees.
Directions follow the case description: the direction the wind comes from, clockwise from north. The neutral
column is rotation-invariant (it is solved for \(u + iv\)), so \(|G|\) and the turning angle are the same
in every direction to round-off; rt_case_setup_column_axis checks this from 0, 270 and 240 degrees.
Upstream roughness of each direction
The inflow profile of a direction (the log law’s \(u_*\), bc.inflow_z0, and the column’s
bc.surface_z0 with a geostrophic drive) needs the roughness of the ground the wind crossed before it reached
the domain. wind.upstream_roughness = auto takes it from a regional roughness map,
surface.regional_roughness_map (the same formats as surface.roughness_map: x y z0 points or a land-cover
raster), which reaches beyond the domain on the sides the wind comes from. surface.roughness or
surface.roughness_map still sets the ground inside the domain.
The method is empirical: a weighted mean of the upwind roughness, not a model of the flow over the regional map. For a wind from a direction, transects start on the faces it enters through and run upwind (towards the side the wind comes from). Along each, \(\ln z_0\) is averaged with the weight \(e^{-x/L}\):
with \(x\) the distance upwind of the face, \(L\) wind.fetch_length, segments
\([x_k, x_{k+1}]\) out to \(5L\) (the weight beyond is \(e^{-5}\), 0.7 %) and \(\ln z_0\) taken at
each segment’s middle. The transects are spread along the inflow faces and weighted by the flow through them (face
length times the wind’s component normal to the face), so the direction’s value is the flux-weighted mean over its
inflow faces. The faces are those the deck uses: with a geostrophic drive the deck turns the wind and may add
side faces, so the transects then start on those faces, run along the wind near the ground, and are weighted by the
turned wind. The turning depends on \(z_0\), so the faces and \(z_{0,\mathrm{up}}\) are found together
(at most five passes; the summary gives the turning).
Default
wind.fetch_length= 100wind.height(1 km for a 10 m wind), an empirical choice. \(L\) is an e-folding length: a wind at the reference height feels a change of surface from about 10-20 heights upwind and is fully adjusted only after a few hundred, so 100 heights lies in that range. Givewind.fetch_lengthto change it; it is required whenwind.heightis not given (for example withatmosphere.geostrophic_wind).Geometric mean. The average is of \(\ln z_0\). An average matched to the surface drag would lean towards the rough value: half 0.3 m and half 0.03 m gives about 0.13 m against the geometric 0.095 m.
Coverage. A segment outside the map is left out of both sums. Below 95 % of the weight covered, the summary says so; below \(1 - e^{-1}\) (63 %, the map reaches less than one \(L\) on average) the case is refused. The map is binned on a square grid of its point spacing (exact for a regular raster), and two passes fill an empty bin from its neighbours.
Mismatch.
case_summary.txtlists each direction’s \(z_0\), the covered share and \(u_*\), and for each inflow face the upwind \(z_0\), the ground’s \(z_0\) along the face and \(\ln(z_{0,\mathrm{up}}/z_{0,\mathrm{ground}})\). A large mismatch starts an internal boundary layer at the face; put the face where the two agree, or far enough upwind of the area of interest.Refused:
autowithoutsurface.regional_roughness_map.file, withwind.drive = couette(one lid speed for all directions), withwind.profile = tableorpower_law(the profile’s wind is the same for every direction), and the regional map orwind.fetch_lengthwithoutauto.A geostrophic drive runs each direction’s column with that direction’s \(z_0\). With
surface.roughness_map,geostrophic_columnwritesinit.column_z0(that \(z_0\)) into the 3-D deck: the column first guess runs on it and the 3-D run keeps the map.
rt_case_setup_upstream checks the set-up on 2 ranks: a half-plane map (0.03 m west of the domain, 1 m east)
also sets the ground; from 270 degrees both decks take 0.03 m and the 10 m wind more than 4 cells from the x faces
varies by 0.62 % along x. Reading the direction as the one the wind blows towards gives 0.715 m and 11.8 %.
Sensitivity to \(L\). The same domain (2 km wide, geostrophic_inflow at 45 degrees north, 8 m/s at
10 m, ground 0.1 m) with 0.3 m for 450 m upwind of the inflow face and 0.03 m beyond (a map bin edge at the step),
on 2 ranks. These runs are not in CTest:
|
\(z_{0,\mathrm{up}}\) (m) |
10 m wind at the centre (m/s) |
10 m wind, max - min along x |
|---|---|---|---|
500 |
0.1187 |
8.106 |
1.2 % |
1000 (default) |
0.0695 |
7.834 |
3.7 % |
2000 |
0.0479 |
7.665 |
6.2 % |
\(z_{0,\mathrm{up}}\) is the closed form of the step to the four digits shown. Halving or doubling \(L\) moves the 10 m wind at the centre by +3.5 % and -2.2 %; the wind then adjusts to the 0.1 m ground across the domain.
A wind library from a sweep
A sweep (wind.directions) runs one direction per folder. tools/make_steer_library.py turns the finished
runs into a wind library: each direction’s wind at fixed heights above the ground, and the wind for any direction
in between, blended from the two directions either side. It needs PyYAML and numpy.
tools/make_steer_library.py build CASE_DIR --heights 10 50 [--reference-point X Y] [--directions D ...]
tools/make_steer_library.py query CASE_DIR --direction 272 --speed 6 --height 10 [--point X Y] [--out wind.npz]
build reads each dir_<deg>/ run of the case folder and writes CASE_DIR/wind_library/. It is not the
library.json of a geostrophic drive (above), which holds the columns’ geostrophic winds. Every run is read
before anything is written; the new library is written beside the old one and replaces it whole, so a refused
build leaves the previous library as it was and a build of fewer directions leaves no stale sector files.
Positions (--reference-point, --point, and x, y in the files) are in the case frame, STEER’s mesh
coordinates: \(x\) and \(y\) measured from domain.center, heights shifted by terrain.zero_level.
Option |
Default |
Effect |
|---|---|---|
|
10 |
Heights above the ground (m). Each must be at or above the first cell centre and at or below the last in every column, and given once; otherwise refused. |
|
domain centre |
Where the reference speed is taken, at the first height (m, case frame). Refused outside the outermost column centres. |
|
all |
A subset of the sweep’s directions; a direction not in the sweep, or one given twice, is refused. |
|
off |
Print nothing when the build succeeds. |
For each run the tool reads log.txt (STEER’s verdict, the iterations, the last relative residual \(r\))
and the last plotfile <io.plot_file><step> written after the verdict (cell fields u, v, w,
tke, z and the node heights Level_0/z_phys_nd; the prefix is the deck’s, so an io.plot_file given on
the command line is not seen). Refused, with the run folder named: a run with no inputs, no verdict, or no
plotfile after the verdict (io.write_plotfile = 1 writes one); an unsteady run; a two-way joint run
(nest.names); a mesh with fewer than 2 cells in a direction; a sampled field that is not finite; no wind at
the reference point. A run that ended “not steady” or “diverged” is kept, marked "converged": false, and the
query refuses it. All runs must share one mesh.
Heights above the ground. The ground under a column is the mean of its four bottom node heights, and a cell centre’s height above the ground is \(h = z_c - z_g\). Between two cell centres a field is linear in \(h\). Below the first centre the profile depends on the wall law, so the library does not extrapolate there. Over the log layer, linear sampling between centres reads low: 0.5 to 0.7 % at 10 m on the test hill below.
What is stored. Let \(S_i\) be the horizontal wind speed of run \(i\) at the reference point and the first height (bilinear between column centres). The library stores
at each height, in the case frame (\(u\) towards \(+x\), east; \(v\) towards \(+y\), north).
wind_library/ holds index.json, grid.npz (the column centres x, y and the ground) and one
sector_<deg>.npz per direction (u, v, w, k, each of shape (heights, nx, ny)).
index.json holds format_version (1), case, heights, reference_point, reference_height (the
first height), grid, frame, stored and one entry per direction, sorted by direction:
Field |
Meaning |
|---|---|
|
The sweep’s direction (degrees the wind comes from, clockwise from north), its run folder and its |
|
STEER’s verdict ( |
|
The plotfile read, relative to the case folder. |
|
\(S_i\) (m/s) and the direction of the wind at the reference point (degrees, from). Over terrain this
differs from |
|
The deck’s |
The blend. For a direction \(\theta\) between the stored directions \(\theta_a\) and
\(\theta_b\) (clockwise, across north when needed), with \(\Delta = (\theta_b - \theta_a) \bmod 360\)
and \(t = ((\theta - \theta_a) \bmod 360) / \Delta\), and a speed \(S\) asked for. \(\theta\) is
the sweep’s inflow direction (the weights use the sweep’s directions, not reference_direction), and
\(S\) is the local horizontal wind speed at the reference point and first height, not the inflow speed (over
a crest the two differ):
where \(\mathbf{e}_a\) and \(\mathbf{e}_b\) are the unit vectors of the two reference winds
(reference_direction). Each sector’s reference wind has length 1, so the blend at the reference point has
length \(L\) before the division and \(S\) after it. Without the division the blend midway would be
\(\cos(\Delta/2)\) short: 0.4 % for 10 degree sectors and 1.5 % for 20 degree ones. That shortfall comes
from the two directions partly cancelling, not from a weaker flow, so \(k\), a scalar, is scaled by
\(S^2\) only (dividing it by \(L^2\) as well puts it 3 % high at 270 degrees on the test hill). The
blended wind at the reference point points within 0.04 degrees of \(\theta\) for 20 degree sectors (the
vector blend is on the bisector only midway). A direction within \(10^{-6}\) degrees of a stored one takes
that sector alone.
Refused by the query (the message names --height, --speed or --direction): a height the library did not
store; a speed, direction or height that is not a finite number (bool included); a speed that is not above 0; a
library of another format_version or a sector file of the wrong shape; a direction between two
stored directions 180 degrees or more apart; any direction but its own for a library of one direction; a sector
marked "converged": false when its weight is not zero (the message names its folder).
query prints the weights and u, v, w, the speed, the direction and k at --point (default
the reference point); --out writes the fields at the height (u, v, w, k, x, y,
ground) to a .npz file. The same is available from Python:
from steer_library import Library # tools/ on sys.path
w = Library("CASE_DIR").wind(272.0, 6.0, 10.0) # direction from, speed at the reference point, height
w["u"], w["v"], w["k"] # arrays (nx, ny)
Exit status of make_steer_library.py: 0 done; 2 refused, with the option or run folder named.
Ensemble statistics. ensemble gives statistics of the wind over a distribution of directions and speeds,
from the library alone (no new runs):
tools/make_steer_library.py ensemble CASE_DIR --height 10 --members members.txt [--percentiles 10 50 90]
[--thresholds 10 15] [--grids DIR] [--points points.txt] [--out stats.npz]
tools/make_steer_library.py ensemble CASE_DIR --height 10 --directions 240 270 300 --direction-weights 1 2 1
--speeds 5 10 --speed-weights 3 1
A member is a direction (degrees the wind comes from, the sweep’s inflow direction), a speed \(S\) at the
reference point and first height (as in query) and a weight. --members reads one member per line,
direction speed [weight] (weight 1 when left out; spaces or commas; # starts a comment). Otherwise every
--directions is taken with every --speeds, weighted by the product of --direction-weights and
--speed-weights (independent distributions; equal weights when left out). The weights \(w_i\) are divided
by their sum. Each member’s wind is the query’s, \(\mathbf{u}_i = \mathbf{u}(\theta_i, S_i)\), with local speed
\(s_i = |\mathbf{u}_i|\) (horizontal). Per column, at the height:
where \(\mathbf{e}_i\) is the unit vector towards which a wind from \(\theta_i\) blows. \(s_P\) is a weighted percentile without interpolation between members; a member of weight 0 is never a percentile, and the cumulative weight counts as reaching \(P/100\) within \(\max(10^{-12}, 4 n \epsilon)\) for \(n\) members (the rounding of a sum of \(n\) weights). \(p_T\) is the probability of a speed above \(T\), and \(p_\mathrm{rev}\) the probability of a reversal: the local wind blows against the member’s own inflow direction, as in a recirculation. The direction of the vector mean \(\bar{\mathbf{u}}\) is the mean direction (no data where \(|\bar{\mathbf{u}}| \le 10^{-12}\,\bar s\), directions that cancel). The statistics hold only as far as the members’ winds do: each member is a blend and scaling of the library’s runs, with the limits below.
Option |
Default |
Effect |
|---|---|---|
|
none |
The members, one per line. Refused together with |
|
none |
Every direction with every speed. Each speed must be above 0 m/s. |
|
equal |
One weight per direction (per speed); each finite and 0 or more, with a sum above 0. |
|
10 50 90 |
Weighted percentiles of the speed, each in (0, 100], each once (kept to 12 digits in the names).
|
|
none |
Speeds (m/s, 0 or more, each once) for the probability of a speed above each. |
|
none |
The statistics ( |
A weight, speed or direction that is not a finite number, a negative weight, weights that sum to 0, and a
percentile or threshold out of range are refused, with the option named (exit status 2). A member whose
direction the library cannot give (a neighbouring run without STEER’s steady verdict) is refused with the member’s
number and direction. The weights of --members need not sum to 1. The columns are taken a few rows at a time,
so the memory does not grow with the number of members times the columns.
WindNinja-format output. query and ensemble write the wind at the height as WindNinja writes its
output grids, for fire models and GIS:
Option |
Default |
Effect |
|---|---|---|
|
none |
ESRI ASCII grids in |
|
none |
A CSV |
|
from the case |
The start of the file names; by default |
|
|
The units of every speed grid: |
|
none |
A projection file copied beside each grid, in place of the one written from |
--prj and --speed-units other than mps without --grids, --prefix without --grids or
--points, a --prj file that does not exist and a --grids that is a file are refused before anything
is read. Everything else --grids and --points can refuse (the columns, the points file) is checked before
the first file is written.
The grids’ cells are the library’s columns: cellsize is the mesh cell, the corner (xllcorner,
yllcorner) is half a cell beyond the first column centre, the first row written is the north row, and the
no-data value is -9999. An ASCII grid has square cells: for a mesh with \(\Delta x \ne \Delta y\) the fields
are resampled bilinearly onto square cells of \(h = \min(\Delta x, \Delta y)\) from the domain’s south-west
corner (the value at the outermost column centre beyond it), and the tool prints how. The direction is taken from
the resampled components. Columns of uneven spacing are refused. The corner is
placed on the map from the case folder’s case_resolved.yaml: the case frame’s origin (the domain centre, or
its south-west corner with domain.origin) in UTM for a centre given as domain.center_lat_lon, and then the
.prj is the ESRI text of WGS 84 / UTM in that zone; or in the projected frame of domain.center, whose
projection the tool does not know, so no .prj is written unless --prj gives one. Without
case_resolved.yaml (a wind_library/ folder copied alone) the corner is in the case frame. Directions are
relative to the grid’s north (the projection’s northing); the meridian convergence of UTM is not removed. It is
about \(\Delta\lambda \sin\phi\): 0.75 degree at 100 km from the central meridian at 40 degrees latitude,
up to about 2 degrees at the edge of the zone, and more with a domain.utm_zone other than the centre’s own.
The members’ directions are in the same grid frame, while station winds are reported from true north; the
difference is the same convergence. The same is available from Python:
from steer_library import Library, ensemble, grids
lib = Library("CASE_DIR")
st = ensemble.ensemble(lib, ensemble.parse(["240 5 1", "270 10 2"]), 10.0, percentiles=(50,), thresholds=(8,))
grids.export_grids(lib, "out", "mycase", st, ("mean_speed", "mean_u", "mean_v"), ["p50", "preversal"],
speed_names=ensemble.speed_names((50,)))
Tests/Infrastructure/Library_Ensemble (CTest rt_library_ensemble, 4 ranks) checks the statistics against
the runs and the grids’ corner against the map.
Accuracy and limits. Tests/Infrastructure/Library_Hill (CTest rt_library_hill, 2 ranks) blends a
library at 270 degrees and compares it with the 270 degree run, over a 60 m Gaussian hill with 50 m cells. The
horizontal-wind differences, as a percentage of \(S\), 4 cells or more from the lateral faces:
Library |
Height |
Largest difference, 4 cells or more from the faces |
RMS, same cells |
|---|---|---|---|
260/280 (20 degrees) |
10 m |
0.67 % of \(S\) |
0.20 % |
260/280 (20 degrees) |
50 m |
0.44 % |
0.11 % |
265/275 (10 degrees) |
10 m |
0.23 % |
0.10 % |
265/275 (10 degrees) |
50 m |
0.19 % |
0.09 % |
The largest difference falls by about 2.9 from 20 to 10 degree sectors; the 10 degree values are close to the runs’ own convergence level (the 260 and 280 runs mirror each other to 0.3 % at \(r = 10^{-4}\)), so this is not a measured order of accuracy. The 260/280 library queried at 265 and 275 is within 0.51 % of those runs. The interior mean of \(k\) at 270 is 0.1 % (10 m) and 0.3 % (50 m) above the run’s for the 260/280 library. Next to the lateral faces the differences are larger (1.2 to 1.6 %), where a face is an inflow face for one direction and a slip wall for the other. These numbers are for double precision; single precision is not measured.
The blend is linear: a feature present in one direction and not the next, such as a lee recirculation, is smeared between them. Narrow sectors over steep terrain reduce this.
Scaling by the speed holds for a neutral flow over rough ground driven by an inflow profile: the solution then does not depend on the speed, apart from molecular viscosity, the damping layers’ rates (fixed in 1/s) and the wall law’s 0.1 m/s minimum wind, together 0.02 % at half the run’s speed. With a geostrophic drive the turning with height depends on the speed (Rossby number), so such a library holds at the speed its runs used.
The fields are those of the final plotfile; a library does not read checkpoints or nested patches.
Measured sites. Tests/Real_Terrain/Library_Validation builds 36-sector libraries for Askervein, Bolund and
Big Southern Butte and checks them against a run at each measured direction and against the masts (not run by
CTest; its README.md gives the steps and the results). The blend meets its target (2 % of the inflow speed) at
Askervein and at Bolund from 270 and 239 degrees. Bolund from 90 degrees misses it over the field (the masts pass),
and the Butte at 3 m misses it at the masts and over the field: there the lee does not vary smoothly between
sectors 10 degrees apart. Seven Butte sectors, the winds side-on to the hill, do not reach a steady state on the
128 m mesh; for one of them, probes on the hybrid mesh show the edge of the lee recirculation moving with a period
of about 90 iterations, and four of the seven stall at a high residual with no clear period.
Tests/Real_Terrain/Butte_Side_On runs the seven again: one of them (175 degrees) reaches the steady verdict
when the run starts on the 128 m mesh with no coarser level, and unsteady runs show which of the others nearly
settle in time, oscillate about a mean or change slowly (its README.md).
Command-line options
A few keys can be changed on the command line without editing the YAML file; each replaces the file’s value.
Option |
Key |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
Any key (the value read as YAML); |
--dry-run checks the case and prints the summary and the decks without writing; --overwrite writes into a
folder that exists; --no-check skips the deck checker; --strict makes a checker warning count as a failure;
--list-keys prints the key table below. Exit status: 0 written, 1 written but the deck checker found an error (or
a warning with --strict), 2 refused.
python3 tools/make_steer_case.py case.yaml --direction 240 --name from_240
python3 tools/make_steer_case.py case.yaml --directions 0 90 180 270 --set mesh.layers=48
Checking a deck before a run
tools/check_steer_inputs.py reads a deck the way STEER does and reports, without running STEER, what would stop the
run and what is likely not what was meant. It follows the design of ERF’s check_erf_inputs.py: a deck parser,
derived facts of the run, and independent checkers, each reporting findings of four levels.
Level |
Meaning |
|---|---|
ERROR |
STEER would stop at start-up (unknown or repeated key, value out of range, a key with no effect, a missing file, a combination the named set-ups refuse). |
WARNING |
STEER starts, but the setting is very likely not what was meant (for example an inflow face the wind leaves through). |
ADVICE |
A setting that could be chosen better (boxes per rank, the sweep for the build). |
INFO |
Derived numbers: cell sizes, layers, the stretch ratio, boxes, the wind direction. |
python3 tools/check_steer_inputs.py inputs
python3 tools/check_steer_inputs.py inputs io.plot_file=test_plt # command-line keys, as for steer
python3 tools/check_steer_inputs.py --ranks 16 --min-severity WARNING --strict Tests/*/*/inputs*
A command-line key the deck already holds is an ERROR, as in STEER: the decks this tool writes hold
steady.max_iterations, so change it in the YAML file instead. Files named in a deck are looked up from the current
directory, as STEER does: run the checker from the folder STEER will run in (run.sh runs each deck from its own
folder). FILE = name lines are read in place from that folder, as AMReX does; a file that cannot be
opened, or that includes itself, is an ERROR.
Option |
Effect |
|---|---|
|
The MPI ranks of the run; adds the boxes-per-rank advice. |
|
The run uses a GPU build: the default sweep and the box-size advice for a GPU. |
|
Hide findings below |
|
Exit 1 on a WARNING too. |
|
Print the findings as JSON. |
|
Run only the named checker (repeatable); |
|
Another |
|
A file or checkpoint an earlier step of the run writes (repeatable). |
|
Run the checker’s own table of cases and exit. |
The exit status is 0 when no deck has an ERROR (and, with --strict, no WARNING), 1 otherwise, and 2 for a
command-line error.
The ranges and defaults come from Tests/inputs_reference, which is generated from Input reference, so the checker
follows the readers. --made-by-run PATH names a file or checkpoint an earlier step of the run writes (the case
tool passes the column table and the parent checkpoint this way). The checker reads the deck only; a deck it passes
can still stop in STEER on something only the run knows, such as the terrain file’s coverage at every node.
Downloading terrain
tools/fetch_terrain.py downloads the elevation for a case’s domain and its margin and writes it as an ESRI ASCII
grid in longitude and latitude, which the builder reads without rasterio:
python3 tools/fetch_terrain.py case.yaml # dem.asc beside case.yaml
python3 tools/fetch_terrain.py case.yaml --out terrain/dem.asc --sea-floor keep
python3 tools/fetch_terrain.py --box 57.15 57.23 -7.45 -7.30 --out askervein.asc
The case file needs domain.center_lat_lon (the download box comes from it); then give the grid as
terrain.file. The tiles are the SRTM-format (“skadi”) set of the AWS Terrain Tiles: one 1° × 1° tile per file,
1 arc-second (about 30 m) where SRTM covers the ground, heights in metres above the EGM96 geoid. No key or account
is needed.
Option |
Effect |
|---|---|
|
The grid to write ( |
|
Over the sea the tiles hold the sea floor (below 0 m). |
|
Where the raw tiles are kept (default |
|
A box in degrees instead of a case file. |
A download of more than 16 tiles (4° × 4°) or one that crosses the antimeridian is refused, and so is a tile the
server does not have (its address is named). Voids are written as the grid’s no-data value, not filled; the
download reports their number and the builder refuses a domain that holds one. Beside the grid,
<name>.sources.txt records the tiles, the date and the attribution below.
The case set-up window
tools/steer_gui.py is a window over the builder and the checker:
python3 tools/steer_gui.py # the starter case
python3 tools/steer_gui.py case.yaml # a case file
Basic mode. The window opens with only the settings a case needs: the case name and folder, the centre in latitude and longitude, the half-width and top, the elevation file, the cell size and layers, the wind speed, height and direction, the roughness and the MPI ranks. Every other key keeps its default. Show all settings (toolbar and View menu) shows every key. A key that a file gives, or that a check refuses, shows in the basic mode too, so no value is hidden.
Form. One tab per section of the case description and one field per key, with plain labels in groups (the domain’s position on the Earth, its position in the terrain file’s own coordinates, its size; the horizontal and vertical mesh). The field’s tooltip names its YAML key and gives its unit, range and help. An empty field is a key not given; it shows in grey what to type (
number > 0,easting, northing,one of: auto, xyz) and the default, if any. Latitude and longitude have one box each. Lists are typed with commas (0, 500, 1000);[0, 500, 1000]is read too. File and folder keys have a Browse button; a choice inside the case file’s folder is written relative to it. Nested patches are added and removed on theneststab. Keys the form does not know are kept when the file is saved.Open and Save read and write the same YAML as
make_steer_case.py; a file read and saved again holds the same values.Check resolves the case without writing it. A refused key marks its field in red (the refusal is in its tooltip) and the refusals fill the Findings table. The Map tab draws the terrain, the domain, the flat border and the end of the border blend, the nests with their blend, and the wind direction (the first one, when there are several), with the vertical layers beside it.
Write case saves the file, writes the case folder and fills the Findings table with the deck checker’s findings for every deck written.
Download terrain runs the download above and sets
terrain.file.Run writes the case and runs steer step by step in
run.sh’s order (the column, the run, each patch from the run’s newest checkpoint). The log streams into the Run tab and into each step’slog.txt, and the residual columns of the iteration table are plotted as they come (from the aligned table ofio.iteration_log = table, the default; withfullnothing is plotted). steer isrun.executable, a relative path taken from the case folder;run.ranksabove 1 usesrun.mpi_launcher. Stop asks the step to end and ends it after 5 s if it has not; the steps after it do not run. Asrun.sh, it skips the directions that already hold their answer (Stopping and going on) unlessrun.resume = false.Library tab: the wind library of a case folder (filled in after Write case; Browse picks another). Choose the height and either One wind (a direction and a speed at the reference point, as
query) or Distribution (members typed asdirection speed [weight]lines, percentiles and thresholds, asensemble), then Show draws the chosen field on the case frame. Export grids writes the WindNinja-format grids of A wind library from a sweep (in the speed units chosen) and Export points the CSV at the points of a file. Both export what the last Show drew. A refusal shows above the map. The tab has no--prj: for a centre given asdomain.centerit writes no.prj(usemake_steer_library.py --prj). The tab reads a library;make_steer_library.py buildwrites it.
On Windows, the window can be frozen into a folder with PyInstaller (tools/steer_gui.spec: one folder, no console
window, rasterio left out):
cd tools
pyinstaller --noconfirm steer_gui.spec # dist/steer_gui/steer_gui.exe
Put the CPU steer.exe in dist/steer_gui/ beside steer_gui.exe. When the case does not give
run.executable, the frozen window runs that steer; when it does, it runs the one named and falls back to the one
beside it. The frozen window reads GeoTIFF terrain with its built-in reader only.
Data and acknowledgements
The terrain download uses the Terrain Tiles on the Registry of Open Data on AWS, made by Mapzen and maintained by the Tilezen project (tilezen/joerd). We thank Mapzen, Tilezen and Amazon Web Services for making them free to use with the attribution below. The tiles merge several sources; their attribution, which a product made from them must carry, is listed in joerd’s attribution file. It includes SRTM (NASA and USGS), GMTED2010 (USGS), the 3D Elevation Program (USGS), ETOPO1 (NOAA), and national models of several countries. No tile is redistributed in this repository; the download fetches them to the user’s cache.
The download follows FastWindTerrain’s cases/casegen.py (the same tiles, a cache of raw tiles and no partial
file left behind) and the tile layout used by massconsistent_amr’s terrain_reader_srtm.py and by amrTerrain.
No code is copied from them.
Case keys
Tests/inputs_yaml_reference holds the same keys as a commented YAML file to copy lines from: remove the leading
# `` of the lines needed and what is left is a case file, with each key's meaning still a comment. It is written by
``tools/make_steer_case.py --write-yaml-reference Tests/inputs_yaml_reference; the CTest steer_case_selftest
fails when the file differs from what the tool writes, when the uncommented file is not YAML, or when a key or a
default in it differs from the table below. Tests/inputs_reference is its counterpart for STEER’s own deck
inputs (Input reference).
case: Name and place of the case folder.
Key |
Unit |
Default |
Meaning and accepted values |
|---|---|---|---|
|
– |
steer_case |
Name of the case folder, written under output_dir: letters, digits, _, - and ., not starting with a dot. Accepts text. |
|
– |
. |
Folder the case folder is made in; relative to the YAML file. Accepts a file path. |
|
– |
empty |
One line copied to the top of every deck. Accepts text. |
domain: The box: centre, extent and top.
Key |
Unit |
Default |
Meaning and accepted values |
|---|---|---|---|
|
m |
none |
Centre of the domain in the terrain file’s projected frame (easting, northing). Not with center_lat_lon. Absent (and no center_lat_lon): 0 0. Accepts 2 numbers. |
|
degrees |
none |
Centre of the domain as latitude, longitude (WGS 84); converted to UTM. Required with a terrain file in latitude and longitude. Accepts 2 numbers. |
|
– |
none |
UTM zone of the projection. Default: the zone of center_lat_lon. Accepts an integer ≥ 1 and ≤ 60. |
|
m |
none |
Distance from the centre to the domain’s faces: one number, or two (east–west, north–south). Not with west, east, south, north. Accepts a list of numbers > 0. |
|
m |
none |
Distance from the centre to the west face. Accepts a number > 0. |
|
m |
none |
Distance from the centre to the east face. Accepts a number > 0. |
|
m |
none |
Distance from the centre to the south face. Accepts a number > 0. |
|
m |
none |
Distance from the centre to the north face. Accepts a number > 0. |
|
m |
required |
Height of the domain above the zero level of the terrain. Accepts a number > 0. |
|
– |
center |
Where x = y = 0 of the case is: the domain centre or its south-west corner. Accepts center, southwest. |
terrain: Elevation data and how it becomes STEER’s terrain.xyz.
Key |
Unit |
Default |
Meaning and accepted values |
|---|---|---|---|
|
– |
none |
Elevation data. Absent: flat ground. Accepts a file path. |
|
– |
auto |
geotiff (single band), esri_ascii (.asc grid) or xyz (x y z points); auto goes by the file’s extension. Accepts auto, geotiff, esri_ascii, xyz. |
|
– |
auto |
projected (metres) or geographic (longitude, latitude); auto: geographic when the file’s extent fits in ±180, ±90. Accepts auto, projected, geographic. |
|
m |
lowest |
Elevation that becomes z = 0: the lowest point kept, none (the file’s own datum) or a number. Accepts a number, or lowest or none. |
|
– |
btf |
The terrain-following coordinate: btf, stf or sullivan (terrain.smoothing 0, 1, 2). Accepts btf, stf, sullivan. |
|
m |
auto |
Spacing of the points written to terrain.xyz. auto: the data’s own, thinned to no finer than half a cell. Accepts a number > 0, or auto. |
|
m |
auto |
Width of the band of points kept outside the domain. auto: 4 cells. Accepts a number ≥ 0, or auto. |
|
– |
none |
terrain.idw_neighbors (STEER’s default 6). Accepts an integer ≥ 1. |
|
– |
none |
terrain.idw_power (STEER’s default 2). Accepts a number > 0. |
|
m |
0 |
Width of the flat band inside each lateral face. Accepts a number ≥ 0. |
|
m |
0 |
Width over which the ground goes from the flat band to the data. 0 with flat_width 0: the border is left as the data give it. Accepts a number ≥ 0. |
|
m |
lowest |
Elevation of the flat band: the lowest point kept, mean (the mean elevation) or a number in the file’s datum. Accepts a number, or lowest or mean. |
mesh: Cell size, layers and grid hierarchy.
Key |
Unit |
Default |
Meaning and accepted values |
|---|---|---|---|
|
m |
required |
Target horizontal cell size. The cell counts are the nearest multiples of 8, so the actual size differs slightly. Accepts a number > 0. |
|
– |
none |
Number of layers. Required unless first_layer and stretch_ratio are given. Accepts an integer ≥ 1. |
|
m |
none |
Thickness of the first layer. Absent: uniform layers. Accepts a number > 0. |
|
– |
none |
Ratio between successive layers. With first_layer and no layers: the largest ratio allowed, and the layer count follows. With both: the ratio written to the deck (the top is then where the layers end). Accepts a number ≥ 1. |
|
– |
auto |
Levels of the grid hierarchy. auto: up to 3, as the cell counts allow. Accepts an integer ≥ 1 and ≤ 10, or auto. |
|
– |
64 |
Largest box size in x and y. Accepts an integer ≥ 1. |
wind: Speed, direction and what drives the flow.
Key |
Unit |
Default |
Meaning and accepted values |
|---|---|---|---|
|
m/s |
none |
Wind speed at the reference height. Accepts a number > 0. |
|
m |
none |
Reference height above the ground. Accepts a number > 0. |
|
degrees |
none |
Direction the wind comes from, clockwise from north (270: from the west). Accepts a number ≥ 0 and ≤ 360. |
|
– |
none |
A sweep: a list of directions, or start, stop and step. One run folder per direction. Not with direction. Accepts see the text. |
|
– |
inflow_only |
What drives the flow (abl.drive): inflow_only, couette (a moving lid at the log law’s speed), geostrophic_column or geostrophic_inflow (Coriolis and a geostrophic wind; the inflow profile comes from a column run made first). Accepts inflow_only, couette, geostrophic_column, geostrophic_inflow. |
|
– |
log_law |
The inflow profile: log_law, power_law or table (a file of z u v theta [k] rows). Accepts log_law, power_law, table. |
|
– |
none |
Exponent of the power law (STEER’s default 0.14). Accepts a number > 0. |
|
– |
none |
The profile table; copied into the case folder. With profile: table. Accepts a file path. |
|
m |
none |
Roughness length of the inflow profile. Default: surface.roughness. auto: for each direction, the fetch-weighted mean of ln z0 of surface.regional_roughness_map upwind of the inflow faces (log-law profile or a geostrophic drive). Accepts a number > 0, or auto. |
|
m |
none |
Fetch length L of wind.upstream_roughness = auto: the map’s ln z0 is weighted by exp(-x/L) at x upwind of a face (an empirical method). Default: 100 times wind.height. Accepts a number > 0. |
|
– |
slip_wall |
The two faces parallel to a wind along x or y; not with a geostrophic drive. Accepts slip_wall, periodic. |
atmosphere: Potential temperature, the Rayleigh layer and rotation.
Key |
Unit |
Default |
Meaning and accepted values |
|---|---|---|---|
|
– |
neutral |
How potential temperature is treated (abl.theta): neutral (buoyancy off), capped (an inversion or lapse rate aloft, solved), frozen (the sounding held) or surface_flux. Accepts neutral, capped, frozen, surface_flux. |
|
K |
300 |
Potential temperature below the inversion. Accepts a number > 0. |
|
m |
none |
Height of the inversion’s base. Accepts a number > 0. |
|
m |
none |
Thickness of the inversion. Accepts a number > 0. |
|
K |
none |
Rise of potential temperature across the inversion. Accepts a number ≥ 0. |
|
K/m |
none |
Gradient of potential temperature above the inversion (or above the ground without one); also the gradient held at the top. Accepts a number ≥ 0. |
|
m |
none |
Heights of a sounding, increasing from 0. Not with inversion. Accepts a list of numbers ≥ 0. |
|
K |
none |
Potential temperature at those heights. Accepts a list of numbers > 0. |
|
m |
auto |
Height where the Rayleigh layer starts. auto: 0.7 of the top. none: no layer. Accepts a number > 0, or auto or none. |
|
1/s |
0.2 |
Rayleigh coefficient. Accepts a number > 0. |
|
– |
none |
Fields damped. Default: w (w and theta with theta: capped). Accepts a list of words. |
|
degrees |
none |
Latitude of the Coriolis force. Default: that of domain.center_lat_lon. Accepts a number ≥ -90 and ≤ 90. |
|
m/s |
none |
Geostrophic wind (east, north components). With a geostrophic drive: given here, or found by the column run from wind.speed at wind.height. Accepts 2 numbers. |
|
K m/s |
none |
Kinematic surface heat flux; with theta: surface_flux. Accepts a number. |
surface: Roughness, canopy and buildings.
Key |
Unit |
Default |
Meaning and accepted values |
|---|---|---|---|
|
m |
none |
Uniform roughness length. Required unless roughness_map is given. Accepts a number > 0. |
|
– |
none |
A roughness map: x y z0 points, or a land-cover raster. Accepts a file path. |
|
– |
auto |
xyz (x y z0 points, in the terrain file’s frame) or land_cover (a GeoTIFF or ESRI ASCII raster of class codes). auto goes by the extension. Accepts auto, xyz, land_cover. |
|
– |
esa_cci |
The class table of a land-cover raster: esa_cci, or a mapping of class code to roughness length (m). Accepts see the text. |
|
m |
none |
Roughness length of a class the table does not hold. Absent: such a class is refused. Accepts a number > 0. |
|
– |
auto |
As terrain.coordinates. Accepts auto, projected, geographic. |
|
– |
none |
A roughness map larger than the domain, for wind.upstream_roughness = auto: x y z0 points, or a land-cover raster (nodata points are left out). It should reach 5 wind.fetch_length upwind of the inflow faces: under 95 % of the fetch weight covered is noted, under 63 % refused. Accepts a file path. |
|
– |
auto |
As roughness_map.format. Accepts auto, xyz, land_cover. |
|
– |
esa_cci |
As roughness_map.classes. Accepts see the text. |
|
m |
none |
As roughness_map.default. Accepts a number > 0. |
|
– |
auto |
As terrain.coordinates. Accepts auto, projected, geographic. |
|
– |
none |
Round forest patches (ERF’s forest file; canopy.type = patches). Coordinates in the case frame. Accepts a file path. |
|
– |
none |
x y h points of canopy height (canopy.type = map), case frame. Accepts a file path. |
|
– |
none |
x y LAI points; with height_file. Accepts a file path. |
|
– |
none |
Drag coefficient of every column; with height_file. Accepts a number > 0. |
|
– |
none |
x y cd points; with height_file, not with cd. Accepts a file path. |
|
– |
uniform |
Shape of the leaf area density. Accepts uniform, lalic_mihailovic. |
|
– |
none |
Building height map (buildings.type = immersed_forcing), case frame. Accepts a file path. |
|
– |
erf |
erf or xyz (buildings.format). Accepts erf, xyz. |
model: Closure settings.
Key |
Unit |
Default |
Meaning and accepted values |
|---|---|---|---|
|
– |
recommended |
recommended: turb.realizability = 0.309, turb.nut_relax = 0.5 and the convection blend (0.1 below blend_height). none: STEER’s defaults. Accepts recommended, none. |
|
m |
auto |
convection.hybrid_height. auto: 2.5 times the terrain’s relief, highest less lowest point in the domain, a regional slope included (no blend over flat ground). Accepts a number > 0, or auto. |
|
m |
auto |
turb.max_geom_lscale. auto: 100 m, STEER’s default (1e6 with drive: couette): over a 40 H fetch a 30 m cap lets the near-ground wind fall 12 %, 100 m holds it within 4 % (Tests/Real_Terrain/RUSHIL/README.md). Accepts a number > 0, or auto. |
|
m2/s2 |
1e-06 |
turb.tke_floor; 0 is machine epsilon. Accepts 0, or a number ≥ 2.22045e-16. |
solver: The steady iteration.
Key |
Unit |
Default |
Meaning and accepted values |
|---|---|---|---|
|
– |
20000 |
steady.max_iterations. Accepts an integer ≥ 1. |
|
– |
none |
steady.residual_tol (STEER’s default 5e-5). Accepts a number > 0. |
|
– |
none |
steady.residual_drop_orders (STEER’s default 4). Accepts a number ≥ 0 and ≤ 308. |
|
– |
16 |
steady.cfl_max; at least steady.cfl0 (STEER’s default 1, not written). Accepts a number ≥ 1. |
|
– |
lusgs |
steady.sweep: lusgs (CPU), zjacobi (also GPU) or auto (STEER chooses by its build). Accepts lusgs, zjacobi, auto. |
|
– |
none |
Start on the coarse levels (steady.sequencing). Default: on with two or more hierarchy levels. Accepts true or false. |
|
– |
16 |
simplec.w_vnn_cap; 0 switches the cap off. Accepts 0, or a number ≥ 16. |
|
– |
1 0.5 |
init.alpha_h and init.alpha_v of the mass-consistent first guess. Accepts 2 numbers > 0. |
output: Plotfiles and checkpoints.
Key |
Unit |
Default |
Meaning and accepted values |
|---|---|---|---|
|
– |
empty |
Prefix of the plotfile and checkpoint names (prefix_plt, …). Accepts text. |
|
– |
true |
Write the turbulence plotfile (io.turb_plot_file). Accepts true or false. |
|
– |
false |
Write checkpoints. Always on with nests: a patch reads its parent’s. Accepts true or false. |
run: The run script.
Key |
Unit |
Default |
Meaning and accepted values |
|---|---|---|---|
|
– |
1 |
MPI ranks of the run script (run.sh uses run.mpi_launcher even for 1; the window runs steer alone). Accepts an integer ≥ 1. |
|
– |
steer |
The STEER executable: a name on PATH or a path. run.sh runs it from each step’s folder (column/, nest_*/ are one deeper), so give an absolute path there; the case set-up window takes a relative path from the case file’s folder. Accepts text. |
|
– |
mpiexec -n {ranks} |
The MPI command; {ranks} is replaced. Accepts text. |
|
– |
true |
Skip a wind direction whose runs reached STEER’s steady verdict with the current decks, data files and run.sh arguments and wrote a plotfile after it, so a stopped sweep goes on where it stopped. false runs every direction (RESUME=0 ./run.sh does the same once). Accepts true or false. |
nests: Nested patches.
Key |
Unit |
Default |
Meaning and accepted values |
|---|---|---|---|
|
– |
required |
Name of the patch; its folder is nest_<name>. Accepts text. |
|
m |
none |
Centre of the patch, as domain.center. Accepts 2 numbers. |
|
degrees |
none |
Centre of the patch as latitude, longitude. Accepts 2 numbers. |
|
m |
required |
Distance from the centre to the patch’s faces (one or two numbers). The faces are moved to the parent’s nearest cell faces. Accepts a list of numbers > 0. |
|
m |
auto |
terrain.nest_blend_width. auto: 4 parent cells. Accepts a number ≥ 0, or auto. |
|
– |
none |
steady.max_iterations of the patch. Default: solver.max_iterations. Accepts an integer ≥ 1. |
steer_inputs: Any other STEER input.
Key |
Unit |
Default |
Meaning and accepted values |
|---|---|---|---|
|
– |
none |
STEER inputs written as they are (namespace.key: value) after everything else: a key the builder also writes is replaced, and null removes one. They go to the 3-D decks (the run folder’s and each patch’s), not to column/inputs, the 1-D column run with its own mesh and keys. Accepts see the text. |
Limits
Lateral faces are inflow, outflow, slip or periodic; one wind direction per run folder.
The tool writes the column first guess for the geostrophic drives only; the other drives start from the profile.
Nested patches are one level deep (a patch inside the parent, not inside another patch) and one-way: each patch is its own deck with
nestfaces. The tool does not write the nests of one run (nest.names) or a two-way option (nest.feedback).The tool writes steady decks (
steady.stage = simplec). For the Newton stage or an unsteady run, change the stage throughsteer_inputsand setmodel.lee_setting: none, since both stages refuse the upwind blend of the recommended setting; an unsteady deck also needs theunsteady.*keys and no steady-stop keys (How-to guides).tools/check_steer_inputs.pychecks decks of every stage and with nests.A terrain file must cover the domain and its margin; the tool refuses one with gaps rather than filling them.