Floods: a peak and how far to trust it¶
limen_core.flood ¶
A forecast river peak with how far to trust it, and the water seen after.
The flood join. glofas-ewds forecasts the discharge of a river cell, says
how many members of the ensemble reach which level and for how many runs in a
row (its Credibility), and how far its rivers can be trusted by size (its
Trust, from a record of 41 Italian floods). copernicus-ems maps the
water seen from satellite over a place (its PlaceWater). None imports the
others; here they meet.
- :func:
fluvial_evidence: the peak, its credibility and the trust of the river in one record, facts only. - :func:
hold_back: the reasons, if any, not to let the fluvial branch speak on its own: too few members, a first run, a river too small to see a flash flood. Every limit is the caller's; no reason is invented here. - :func:
observed: what the satellite says about a place after an event:"flooded","dry", or"not_observed"when too little of the place was looked at. Seven per cent of Faenza observed is not a dry Faenza.
What the record says, and why the hold-back exists. On the GloFAS 4 reanalysis, 25 of 28 known floods from long, wide rain reached the 2-year level of their river cell, and 4 of 13 flash floods did (Senigallia, 15 September 2022: 0.4 m³/s on a cell whose 2-year flood is 33.4). On a small river the fluvial branch cannot see a flash flood: the rain and the rainfall thresholds have to speak there. Pure functions, no I/O.
FluvialEvidence
dataclass
¶
A forecast peak at a place, with how far to trust it. None: not known.
fluvial_evidence ¶
fluvial_evidence(ratio: float | None, credibility: _CredibilityLike | None, trust: _TrustLike, *, record: Mapping[str, Mapping[str, tuple[int, int]]] | None = None) -> FluvialEvidence
The record of one node: glofas_ewds.credibility(...), glofas_ewds.trust(...).
record is glofas_ewds.KNOWN_FLOODS: the entry of the river's size
is kept. credibility is None when no peak reaches a level.
hold_back ¶
hold_back(evidence: FluvialEvidence, *, min_share: float, min_runs: int, blind_sizes: Collection[str]) -> tuple[str, ...]
Why the fluvial branch should not speak on its own here; empty when nothing stands against.
no_river: no river within reach;river_blind_to_flash: a river of a size inblind_sizes, where a flash flood is shorter than the day the model averages;few_members: the share of members at the level is belowmin_share, or not known;first_run: fewer thanmin_runsruns in a row, or not known.
The limits have no default: they come from a backtest, and the caller has it.
observed ¶
observed(water: _PlaceWaterLike | None, *, min_observed_share: float, min_water_km2: float) -> Observed
What the satellite says about a place after an event (copernicus_ems.places.PlaceWater).
not_observed when no product looked there (None) or less than
min_observed_share of the place was looked at; then flooded when
at least min_water_km2 of water was mapped, otherwise dry. A place
seen for a small share is not a dry place: the flood may be in the rest.