easysnowdata.stations.archive.load#
- easysnowdata.stations.archive.load(stations: Any = None, *, aoi: Any = None, variables: Any = None, time: Any = None, networks: Any = None, source: str | None = None, hemisphere: str = 'northern') Dataset[source]#
Daily SWE and snow depth for many stations, from the published archive.
- Parameters:
stations – Station codes, or an inventory frame.
Nonewith no aoi means every station in the archive — which is the point of this route.aoi – Any form
easysnowdata.aoi.parse_aoi()accepts; picks the stations when stations isNone.variables –
"swe","snwd"or both (the default). The archive holds nothing else;easysnowdata.stations.load()does.time – Any form
easysnowdata.temporal.parse_time()accepts. Each station’s series is cut to the window before the dense grid is built, so a narrow window is cheap — but the bundle is still downloaded whole, because that is how it is published.networks – Keep only these networks.
source –
"github-tarball"(default) downloads the one ~28 MB bundle and reads every wanted CSV out of it — right for more than a handful of stations, and the only sane route for all of them."github-csv"fetches one CSV per station instead, which is cheaper for a few stations and needs no temporary file.hemisphere – Which water year to attach.
- Returns:
xarray.Dataset–sweandsnwdin centimetres with dims(station, time), station metadata onstationand water-year coordinates ontime.
Notes
The whole archive is about 1 550 stations by 47 000 days, so asking for all of it materializes roughly 1.2 GB of float64 (measured: 31 s and under 2 GB of peak memory). Pass time, aoi or stations when you do not need every cell.
Examples
>>> import easysnowdata as esd >>> ds = esd.stations.archive.load() # every daily station