Command line¶
glofas_ewds.cli ¶
The glofas-ewds command.
glofas-ewds thresholds: download the official GloFAS v4 threshold files (three files, about 520 MB, once; no account).glofas-ewds init --place "Faenza,11.88,44.29": find the river of each place, read its thresholds, download its history and forecast, and write the place to the store.--places file.csvreadsname,lon,lat[,radius_km]lines. Safe to run again: it adds what is missing.glofas-ewds update: the newest forecast, and the days of history since the last one, for every place of the store. This is what to schedule.glofas-ewds places: the places of the store and how old their data are.glofas-ewds facts faenza: the facts of a place as JSON (--about river,discharge,forecastorsummary).glofas-ewds find 11.88 44.29: the river cell nearest a point, its thresholds and how far to trust it, without storing anything.glofas-ewds check text.md facts.json: are all the numbers of a text in the facts? For a text written, or rewritten, by someone else.
--source open-meteo (the default) needs no key. --source ewds asks
Copernicus itself: it needs the ewds extra, an EWDS key (~/.cdsapirc
or CDSAPI_URL and CDSAPI_KEY) with the GloFAS licences accepted, and
minutes of queue. The store is --data, else $DATA_ROOT/glofas-ewds,
else ~/.cache/glofas-ewds.
main ¶
main(argv: Sequence[str] | None = None) -> int
Run the command; 0 when it worked, 1 when the library refused, 2 on a bad argument.