Skip to content

egagli/easysnowdata

Repository files navigation

easysnowdata

PyPI conda-forge DOI CI

A Python package to easily retrieve data relevant to snow science.

easysnowdata unifies access to a wide range of snow-relevant geospatial datasets — weather stations, satellite imagery, climate reanalysis, DEMs, and more — under a consistent API that returns xarray objects. The emphasis is on minimising downloads and local computation by leveraging cloud-optimised data formats wherever possible.

Gallery

easysnowdata

Data Source Status

Last updated: 2026-06-22 10:05 UTC
⚠️ = skipped (credentials not available in this run)

Data Source Latest (Jun 22) Jun 15 Jun 8 Jun 5
SNOTEL/CCSS station list (GitHub)
SNOTEL/CCSS station CSV (GitHub)
HydroATLAS basins (figshare)
GRDC major river basins (World Bank)
GRDC WMO basins
Köppen-Geiger classification (figshare)
Sturm & Liston snow classification (Azure)
Forest cover fraction (Zenodo)
Mountain snow mask (Zenodo)
ARCO-ERA5 (GCS anonymous)
Copernicus DEM (Planetary Computer)
ESA WorldCover (Planetary Computer)
HUC geometries (GEE/USGS WBD)
SNODAS (GEE/Climate Engine)
ERA5 (Google Earth Engine)
CHILI (GEE/CSP ERGo)
NLCD (GEE/USGS)
UCLA Snow Reanalysis (NASA NSIDC) ⚠️ ⚠️ ⚠️ ⚠️

Installation

pip install easysnowdata
conda install -c conda-forge easysnowdata
mamba install -c conda-forge easysnowdata

Development install (with pixi)

git clone https://github.com/egagli/easysnowdata.git
cd easysnowdata
pixi install          # sets up the environment
pixi run test-fast    # run credential-free tests
pixi run test         # run all tests (requires API secrets)
pixi run docs-serve   # preview the docs locally

Services that require account setup

Some data sources need free accounts and credentials passed as environment variables:

Service Env vars Sign-up
Google Earth Engine EARTHENGINE_TOKEN earthengine.google.com
NASA EarthData EARTHDATA_USERNAME, EARTHDATA_PASSWORD urs.earthengine.nasa.gov

Planetary Computer and anonymous GCS access require no credentials.

Modules

Module What it provides
automatic_weather_stations SNOTEL & CCSS station metadata + time-series data
hydroclimatology ERA5, SNODAS, UCLA snow reanalysis, HUC boundaries, HydroATLAS, GRDC basins, Köppen-Geiger
remote_sensing Sentinel-1, Sentinel-2, HLS, MODIS snow, ESA WorldCover, forest cover, snow classification
topography Copernicus DEM (30 m / 90 m), CHILI topographic index
utils Shared helpers: bbox conversion, water-year utilities, STAC config

Quick Start

import easysnowdata

# ── Automatic weather stations ─────────────────────────────────────────────
sc = easysnowdata.automatic_weather_stations.StationCollection()
sc.get_data(stations="679_WA_SNTL", variables=["WTEQ", "SNWD"],
            start_date="2023-10-01", end_date="2024-06-30")
sc.data.plot()                        # pandas DataFrame for one station

# ── Topography ─────────────────────────────────────────────────────────────
bbox = (-121.94, 46.72, -121.54, 46.99)   # Mount Rainier, WA
dem = easysnowdata.topography.get_copernicus_dem(bbox_input=bbox, resolution=30)
dem.plot()                               # xarray DataArray

# ── Hydroclimatology ───────────────────────────────────────────────────────
era5 = easysnowdata.hydroclimatology.get_era5(
    bbox_input=bbox, source="GCS",
    start_date="2023-01-01", end_date="2023-01-31"
)
era5["2m_temperature"].mean("time").plot()

# ── Remote sensing ─────────────────────────────────────────────────────────
snow_class = easysnowdata.remote_sensing.get_seasonal_snow_classification(bbox)
snow_class.attrs["example_plot"](snow_class)

Documentation

Full API reference and example notebooks: https://egagli.github.io/easysnowdata

Contributing

Contributions welcome! See CONTRIBUTING for guidelines.

Citing

If you use easysnowdata in your research, please cite the Zenodo archive:

DOI

About

package for snow science data, providing streamlined access to satellite imagery (Sentinel-1/2, HLS, MODIS, etc), weather station data, climate reanalysis, land cover data, DEMs, and derived snow products as xarray objects.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors

Languages