Open-Meteo¶
glofas_ewds.openmeteo ¶
The same GloFAS 4 numbers from Open-Meteo, for whoever has no EWDS account.
The EWDS needs an account, a licence accepted per dataset and a queue of
minutes. The Open-Meteo flood API <https://open-meteo.com/en/docs/flood-api>_
serves the same GloFAS 4 discharge with no key, point by point: the cell
:func:~glofas_ewds.cells.open_meteo_cell names is the one whose values it
returns (28 nodes out of 28 on 11 October 2026, and again every week in
live.yml). This module asks it with the standard library alone.
It is the small door, not the main one: a few nodes, a few years. The public API counts a call for every two weeks of every point (a node's two years are about 52 calls) and caps a day at 10,000; for Italy in bulk, use the EWDS. After 2024 its history is its forecast archive, not the reanalysis.
The builders and the parsers are pure; :func:fetch is the only I/O.
flood_url ¶
flood_url(nodes: Sequence[Node], *, model: str = SEAMLESS, start: date | None = None, end: date | None = None, forecast_days: int | None = None, ensemble: bool = False) -> str
The URL of the daily discharge of nodes.
With start and end: the history between them. With
forecast_days: the forecast from today; ensemble adds the members.
parse_daily ¶
parse_daily(payload: Any, nodes: Sequence[Node]) -> dict[Node, dict[date, float]]
{node: {day: m³/s}} from an answer; a day without a value is left out.
parse_members ¶
parse_members(payload: Any, nodes: Sequence[Node]) -> dict[Node, tuple[date, list[list[float]]]]
{node: (first day, members)} from an ensemble answer.
members is (member, lead time) with NaN where there is no value, the
control run first: what :func:~glofas_ewds.ensemble.exceedance_probability
and :func:~glofas_ewds.ensemble.peak_day take. A node without a single
value is left out.
fetch ¶
fetch(url: str, *, timeout: float = 60.0, retries: int = 2, pause: float = 3.0) -> Any
The JSON at url; :class:~glofas_ewds.errors.GlofasEwdsError if it does not come.
A request that fails (a timeout, a dropped connection) is sent again up to
retries times, pause seconds apart.