easysnowdata.stations.clients.CanSWEClient#
- class easysnowdata.stations.clients.CanSWEClient(path: str | Path | None = None, record_id: str | None = None, cache_dir: str | Path | None = None, session: Any = None, timeout: int = 120, max_retries: int = 3, backoff: int = 4)[source]#
Bases:
CanSWEStyleClientClient for the CanSWE netCDF (latest Zenodo version, cached locally).
No credentials are needed.
- Parameters:
path (
strorPath, optional) – Use this local.ncinstead of resolving / downloading.record_id (
str, optional) – Pin a Zenodo record (e.g."19075529"for v8). Default: the latest version of concept record 4734371.cache_dir (
strorPath, optional) – Overrideeasysnowdata.config.cache_dir("stations", "canswe").session (
requests.Session, optional) – Session used for the Zenodo API call.timeout (
int) – Shared retry-loop settings (see_common.request_with_retries).max_retries (
int) – Shared retry-loop settings (see_common.request_with_retries).backoff (
int) – Shared retry-loop settings (see_common.request_with_retries).
- DATASET_URL: str = 'https://doi.org/10.5281/zenodo.4734371'#
Landing page of the dataset (used as
station_urlfallback).
- ERROR#
alias of
CanSWEError
- VARIABLES: dict[str, dict] = {'den': {'description': 'Bulk snow density derived as snw / snd.', 'name': 'Bulk Snow Density', 'notes': 'Derived by the dataset authors, only where both SWE and depth exist; returned as % (kg m-3 ÷ 1000 × 100).', 'output_units': '%', 'scale': 0.1, 'source': 'ECCC CanSWE (Vionnet et al. 2021) — https://doi.org/10.5281/zenodo.4734371', 'type': 'density', 'units': 'kg m-3'}, 'snd': {'description': 'Depth of snow on the ground.', 'name': 'Snow Depth', 'notes': 'Stored in m; returned in cm (× 100).', 'output_units': 'cm', 'scale': 100.0, 'source': 'ECCC CanSWE (Vionnet et al. 2021) — https://doi.org/10.5281/zenodo.4734371', 'type': 'snwd', 'units': 'm'}, 'snw': {'description': 'Water equivalent of snow cover (SWE).', 'name': 'Snow Water Equivalent', 'notes': 'Stored as kg m-2 (= mm of water); returned in cm (× 0.1).', 'output_units': 'cm', 'scale': 0.1, 'source': 'ECCC CanSWE (Vionnet et al. 2021) — https://doi.org/10.5281/zenodo.4734371', 'type': 'swe', 'units': 'kg m-2'}}#
Native variables (copy of
VARIABLES_TEMPLATEwithsource).