Downloads¶
glofas_ewds.download ¶
Download EWDS files to a folder, one month (or one run) per file.
Synchronous, like cdsapi: from async code call these in a thread, or use
:class:~glofas_ewds.client.EwdsClient. They work with any object that has
retrieve(dataset, request, target), so you can pass a cdsapi.Client,
your own wrapper (a budget, a queue timeout) or a fake in tests.
Every function can be run again: a file already there is not requested.
Each download goes to <name>.part and is renamed when complete, so a
request you stopped waiting for never leaves half a file that passes for a
whole one.
Retriever ¶
Bases: Protocol
What cdsapi.Client offers and these functions use.
download_history ¶
download_history(folder: Path, start: date, end: date, *, client: Retriever, area: Area = ITALY) -> list[Path]
GloFAS 4 daily discharge, one NetCDF per month; intermediate where the consolidated history does not reach yet.
download_forecast ¶
download_forecast(folder: Path, run: date, *, client: Retriever, area: Area = ITALY) -> Path
The control forecast of run, one NetCDF.
download_ensemble ¶
download_ensemble(folder: Path, run: date, *, client: Retriever, area: Area = ITALY) -> Path
The 50 perturbed members of run, one NetCDF (about 90 MB for Italy).
download_fire ¶
download_fire(folder: Path, start: date, end: date, *, client: Retriever, area: Area = ITALY) -> list[Path]
The Copernicus FWI components, one NetCDF per month.