Lifespans
Two modules, and the feature definitions they share.
Lifespan Design
riverarchitect.lifespan - the Lifespan ▸ Lifespan Design tab.
Answers two questions per cell, for a chosen restoration feature:
Lifespan - how many years is this feature expected to survive here? Each modelled discharge carries a flood return period. For every criterion the feature has a threshold for, the analysis finds the lowest return period at which that threshold is exceeded, which is when the feature fails. The lifespan is the cell-wise minimum across criteria: the first flood that breaks it.
Cells that survive every modelled flood stay NoData. Their lifespan is longer than the largest modelled event and cannot be quantified from the data - writing a number there would be inventing one.
Design - how big does the feature have to be to reach a target lifespan? For grain-based features that is the stable grain size at the design flood, for example the minimum diameter of angular boulders that will not mobilise in a 20-year event.
The criteria
Hydraulic criteria produce a failure return period each, and their minimum is the lifespan:
Criterion |
Fails when |
|---|---|
Flow depth |
depth reaches |
Flow velocity |
velocity reaches |
Froude number |
Froude reaches |
Grain stability |
dimensionless bed shear stress reaches |
Spatial criteria are masks applied to that result:
Criterion |
Restricts to |
|---|---|
Depth to water table |
|
Detrended DEM |
|
Grain size |
at most |
Terrain slope |
at least |
Topographic change |
scour or fill at or above the rate - or, for an inverse-relevance feature, below it |
Morphological units |
the units in |
Threshold values
Defaults live in riverarchitect.lifespan.FEATURES as Python rather than a binary
workbook, so they are diffable and reviewable. They reproduce the original
threshold_values.xlsx exactly.
riverarchitect.lifespan.load_threshold_workbook() still reads a project’s own
customised workbook.
The threshold units are a round trip
The original multiplies every length threshold by ft2m when reading the workbook and
divides by it again when applying it, so the two cancel. The values in FEATURES are the
workbook’s own U.S. customary numbers, unconverted. This looks like a missing conversion
and is not one.
Relation to the original
This implements the analysis hierarchy as the wiki documents it, not as a line-by-line
transcription of the arcpy control flow. The original threaded results through a mutable
raster_dict and a chain of Con() calls whose behaviour depended on which rasters
happened to exist, and several of its criteria overwrote their own result four times in a
row. Two-argument riverarchitect.raster.con() is used throughout, so the false branch
is NoData and never zero - passing 0 instead is what creates wetted-area artefacts.
Max Lifespan
riverarchitect.maxlifespan - the Lifespan ▸ Max Lifespan tab.
Lifespan mapping answers “how long does this feature last here?”. This answers the planner’s question instead: which feature belongs here, and how long will it last?
max_lf.tifis the cell-wise maximum across the feature lifespan rasters;a feature wins a cell where its own lifespan equals that maximum;
each winner is written as a mask raster and polygonised into a GeoPackage, so the result can be drawn as action areas on a map.
Ties are kept rather than broken. A cell where two features both reach the maximum appears in both layers, which is why the reported shares add to more than 100 per cent. That is deliberate, and it is what the original did: it tells the planner the choice is theirs.
The result feeds Morphology (Terraforming) - the best_<feature>.tif masks are what Terraforming
reads to know where a feature is planned.
In this section
- Feature lifespan and design assessment
- Introduction to lifespan and design mapping
- Quick GUIde to lifespan and design maps
- Lifespan design: parameter hypotheses
- Parameter hypotheses
- River design and restoration features
- Introduction and Feature Groups
- Pre-defined features and hypotheses
- Define new and modify existing features
- Lifespan design: code extension and modification
- Code extension and modification
- Maximum Lifespan Assessment (MaxLifespan)
- Introduction to maxium (best) lifespan mapping
- Quick GUIde to maximum lifespan maps
- Working principle
- Code modification: Add feature sets for maximum lifespan maps
See also
riverarchitect.lifespan and riverarchitect.maxlifespan in the API
reference.