For Limen: what to take from here¶
Limen is the application this library was extracted from. This page lists what Limen still computes on GloFAS data on its own, and what it lacks that the library now has. It is a list for whoever adopts a release, not a promise of what Limen does.
What Limen can delete (since 0.3.0)¶
| In Limen | Use instead |
|---|---|
core/piena.py: piena, Piena, TOLLERANZA_PICCO |
flood_label, FloodLabel, PEAK_TOLERANCE |
integrations/openmeteo/flood.py: percentile_of, MIN_REFERENCE_DAYS |
percentile, MIN_REFERENCE_DAYS |
cli/backtest_flood.py: _discharge_ratios, _node_reference |
peak_ratios, reference_before |
integrations/copernicus/ewds_glofas.py: giorno_del_picco, giorni_dei_picchi |
peak_day, forecast_peak_days |
integrations/copernicus/glofas_soglie.py: leggi, soglie, nome_file, URL |
read_threshold, flood_thresholds, threshold_file_name, threshold_url |
flood_thresholds returns {node: {years: value}}, not Limen's 3-tuple: the
callers of soglie have to be adapted.
What Limen still computes on GloFAS data¶
- The Open-Meteo flood client (
integrations/openmeteo/flood.py, 785 lines): the URLs, the batches, the parsing of the daily series. Since 0.4.0 the library has a small keyless reader (glofas_ewds.openmeteo:flood_url,parse_daily,parse_members). It does not replace Limen's client, which has its own retry, cache and quota; the URL builder and the two parsers can be shared. - The quota arithmetic of the nightly fill (
glofas_riferimenti.py: calls per node, pause between batches). It is about Open-Meteo's limits, not about GloFAS: it stays in Limen. - The fluvial signal: the forecast peak over the node's 90th percentile,
and its thresholds in
flood.yaml. The ratio is the library's (discharge_ratio); the decision is Limen's.
What Limen lacks, and is here since 0.4.0¶
- The ensemble in the decision. Limen reads the control run. The 50
members are downloaded by
download_ensembleand counted bycredibility: how many reach the 2-year flow. A fluvial alert on one control run with three members behind it is the weakest alarm there is. - Persistence between runs.
credibility(..., previous=...)counts how many runs in a row forecast the level for the same days. Limen stores one peak per run (glofas_previsione): the members of the last runs would have to be kept, or at least the control series. - Trust per node.
trust(river)gives a level by the size of the river, with the record of known floods: 25 of 28 from long rain, 4 of 13 flash floods. Limen's open problem on floods is false alarms, and the other half of it is missed alarms: on a small basin the fluvial branch cannot see a flash flood, and should not be the one that speaks. That is a job for rain (the radar, the rain thresholds), not for discharge. - The river cell of a node. Limen's river nodes are a lattice; a node's
own cell is often beside the river.
nearest_riveron the official 2-year flow finds the channel, andRiver.own_sizesays what the node was reading. - A flood label without a ratio.
Facts.dischargelabels a value against the thresholds of its cell even with a short history.
What neither has¶
- A calibration of the forecast. How often a peak with a given share of
members and a given persistence is followed by a flood. It needs the archive
of past forecasts (
cems-glofas-reforecast), an EWDS key and hours of queue. It is the next step for this library. - Dams. The model's thresholds do not know a river is regulated.