Note
Go to the end to download the full example code.
Yukon snow stations (AquaCache)#
The Yukon Snow Survey Network mixes automated snow weather stations that
report SWE and snow depth daily with manual snow courses surveyed monthly
through late winter and spring, and the territory’s water-data database (AquaCache) also
mirrors Environment and Climate Change Canada meteorological stations. All of
them come through the inventory; daily_only keeps the automated sites.
There is one route, source="yukon", the open Yukon Water Data REST API.
No account is needed. Station codes are AquaCache location codes such as
09AA-M1; the M sites are the automated meteorological stations and
the SC sites are courses.
The figures show every station the network lists, coloured by kind, and one water year of SWE and snow depth at two automated sites.
import matplotlib.pyplot as plt
import easysnowdata as esd
print(f"easysnowdata {esd.__version__}")
easysnowdata 0.3.9.dev1+gd97689c2f
Where the product comes from.
for src in esd.catalog.get("yukon-stations").sources:
print(f"{src.id:20} {src.title:45} {', '.join(src.requires) or 'no account'}")
yukon Yukon Water Data (AquaCache) API v2 no account
No area of interest: the whole network is small enough to list at once.
everything_gdf = esd.stations.inventory(networks="yukon")
everything_gdf["kind"] = everything_gdf["daily_or_better"].map(
{True: "automated (daily)", False: "snow course"}
)
print(everything_gdf["kind"].value_counts().to_string())
kind
snow course 92
automated (daily) 17
A few of the courses the survey operates sit across the border in northern
British Columbia and Alaska, so state is not always YT.
print(everything_gdf["state"].value_counts().to_string())
ax = esd.plotting.points(
everything_gdf,
column="kind",
legend_label="Yukon site kind",
title="Yukon Snow Survey Network",
)

state
YT 102
BC 4
AK 3
/home/runner/work/easysnowdata/easysnowdata/docs/gallery/stations/plot_yukon_stations.py:43: GeographicAxesWarning: The data are in a geographic CRS (EPSG:4326), so one axis unit is a degree, not a metre. The axes use a latitude-corrected aspect (1/cos(63.9°) = 2.28) so shapes are not stretched; for a true equal-area grid load the product with crs='utm'.
ax = esd.plotting.points(
One water year of SWE and snow depth at two automated sites.
obs_ds = esd.stations.load(
["09AA-M1", "09BA-M7"], variables=["swe", "snwd"], time="2023-10/2024-09"
)
print(obs_ds)
fig, axes = plt.subplots(2, 1, figsize=(9, 7), sharex=True)
esd.plotting.timeseries(obs_ds["swe"], ax=axes[0], title="Water year 2024")
esd.plotting.timeseries(obs_ds["snwd"], ax=axes[1], title="", legend=False)
fig.tight_layout()

<xarray.Dataset> Size: 23kB
Dimensions: (station: 2, time: 366)
Coordinates: (12/29)
* station (station) <U7 56B '09AA-M1' '09BA-M7'
network (station) <U5 40B 'yukon' 'yukon'
name (station) <U32 256B 'Tagish Meteorological' 'Twin C...
client (station) <U5 40B 'yukon' 'yukon'
network_code (station) <U3 24B 'YSS' 'YSS'
network_name (station) <U25 200B 'Yukon Snow Survey Network' 'Yu...
... ...
metadata_fetched_at (station) <U19 152B '2026-11-07 00:00:00' '2026-11-...
station_id (station) <U7 56B '09AA-M1' '09BA-M7'
hemisphere (station) <U8 64B 'northern' 'northern'
* time (time) datetime64[us] 3kB 2023-10-01 ... 2024-09-30
water_year (time) int64 3kB 2024 2024 2024 ... 2024 2024 2024
dowy (time) int64 3kB 1 2 3 4 5 6 ... 362 363 364 365 366
Data variables:
snwd (station, time) float64 6kB 0.0175 0.7701 ... 0.0 0.0
swe (station, time) float64 6kB 0.0 0.0 ... 0.087 0.025
Attributes:
source: yukon
source_id: yukon
source_title: Yukon Water Data (AquaCache) API v2
source_url: https://service.yukon.ca/water-data/api/v2
product_id: yukon-stations
title: Yukon snow survey and automated stations (AquaCache)
data_citation: Government of Yukon, Department of Environment, Wa...
license: Open Government Licence – Yukon
easysnowdata_version: 0.3.9.dev1+gd97689c2f
interval: daily
A subarctic snowpack holds little water: peak SWE here is around 15 cm, an order of magnitude below a Cascades SNOTEL site. Snow depth flattens out in March while SWE keeps rising for another month, and the whole pack goes in about two weeks at the end of April.
peak_snwd_da = obs_ds["snwd"].idxmax(dim="time").dt.strftime("%Y-%m-%d")
peak_swe_da = obs_ds["swe"].idxmax(dim="time").dt.strftime("%Y-%m-%d")
for station in obs_ds["station"].values:
print(
f"{str(obs_ds['name'].sel(station=station).values):34}"
f" deepest {str(peak_snwd_da.sel(station=station).values)}"
f" peak SWE {str(peak_swe_da.sel(station=station).values)}"
)
Tagish Meteorological deepest 2024-03-16 peak SWE 2024-04-18
Twin Creeks North Meteorological deepest 2024-03-16 peak SWE 2024-04-19
Total running time of the script: (0 minutes 7.388 seconds)