Skip to content

Requests

glofas_ewds.request

The EWDS requests for GloFAS, built without sending them.

Pure: nothing here does I/O. Each function returns the dict you pass to cdsapi.Client.retrieve(dataset, request, target).

Three choices matter more than they look:

  • GloFAS 4, not 5. Open-Meteo serves its forecast from GloFAS 4 (checked on 11 October 2026 at Faenza: 7.1 / 6.1 / 8.9 m³/s from the EWDS against 7.3 / 5.9 / 8.9 from Open-Meteo), and version 5 gives about half. A ratio of a v4 forecast to a v5 reference is a number without meaning.
  • Consolidated, then intermediate. The consolidated history arrives months late; the recent months exist only as intermediate, the same model and version. :func:historical_request takes the product.
  • The control run. The forecast dataset holds an ensemble; the control run is the one Open-Meteo serves as forecast_v4. The 50 perturbed members (:data:ENSEMBLE) say how likely a peak is, which one run cannot.

months

months(start: date, end: date) -> list[tuple[int, int, list[str]]]

(year, month, days) for every month between start and end, both included.

The EWDS limits how much one request may hold; a month of Italy is well inside it, and a month is what you re-download when one fails.

historical_request

historical_request(year: int, month: int, days: list[str], *, product: str = 'consolidated', area: Area = ITALY, version: str = GLOFAS_VERSION) -> dict[str, Any]

Daily mean discharge for days of one month; product is consolidated or intermediate.

forecast_request

forecast_request(run: date, *, days: int = FORECAST_DAYS, area: Area = ITALY, product: str = CONTROL) -> dict[str, Any]

The run of run (00 UTC), one step per 24 hours of lead time.

product is :data:CONTROL (one run, what Open-Meteo serves) or :data:ENSEMBLE (the 50 perturbed members: about 50 times the size).

candidate_runs

candidate_runs(today: date, *, latest_saved: date | None = None) -> list[date]

The forecast runs worth trying, newest first.

GloFAS runs once a day at 00 UTC and the EWDS publishes it some hours later: early in the day today's run is usually missing, so yesterday's is the fallback. Runs you already have are left out.