Climate#

easysnowdata.climate#

Climate products: ERA5 / ERA5-Land, the Köppen-Geiger classification, and climate-mode indices.

Each module exposes module-level search() / load() functions with a source= argument (design contract §2.12) and registers its catalog entry on import.

easysnowdata.climate.era5#

ERA5 and ERA5-Land reanalysis.

Sources (companion file §B.9):

arco-era5-gcs (default)

Google’s ARCO-ERA5 Zarr store on GCS: hourly ERA5 at 0.25°, 1940 → ERA5T (about one week behind real time), anonymous access, 273 variables. Only hourly ERA5 lives here.

gee

Earth Engine ECMWF/ERA5* and ECMWF/ERA5_LAND* collections: the ERA5-Land route and the daily / monthly aggregates. Needs Earth Engine credentials.

import easysnowdata as esd
t2m_ds = esd.climate.era5.load(aoi, "2020-01", variables=["2m_temperature"])
land_ds = esd.climate.era5.load(aoi, "2020-01", version="ERA5_LAND",
                                cadence="daily", variables=["temperature_2m"])
esd.climate.era5.search()                        # variable inventory

The ERA5 / ERA5T boundary of the ARCO store is exposed in the result attrs (valid_time_stop is the last final-ERA5 day, valid_time_stop_era5t the last preliminary day).

search

Inventory of the selected route: one row per variable.

load

Load ERA5 / ERA5-Land as a lazy xarray.Dataset (time, latitude, longitude).

easysnowdata.climate.indices#

Climate-mode indices: PDO, ENSO (RONI, ONI, Niño 3.4, MEI.v2), AO, NAO, PNA, AMO.

Small monthly time series, one number per month, read straight from the providers’ text files. The same name covers several different series, so the default source, "noaa", reads each index from the provider that maintains it rather than from a mirror:

import easysnowdata as esd

idx_ds = esd.climate.indices.load(indices=["pdo", "roni"], time="1950/..")
esd.climate.indices.search()                     # what is offered, and from where
winter_df = esd.climate.indices.seasonal_mean(idx_ds)        # Nov-Mar, by water year
phase_da = esd.climate.indices.enso_phase(idx_ds["roni"])    # CPC's event rule

The providers are three NOAA offices:

  • CPC — the Climate Prediction Center (https://www.cpc.ncep.noaa.gov), part of the National Weather Service’s NCEP. It issues the ENSO advisories and keeps the operational ENSO, AO, NAO and PNA series.

  • NCEI — the National Centers for Environmental Information (https://www.ncei.noaa.gov), NOAA’s data archive. It keeps the ERSSTv5 sea-surface-temperature record and the PDO and AMO computed from it.

  • PSL — the Physical Sciences Laboratory (https://psl.noaa.gov), a NOAA research lab in Boulder. It maintains MEI.v2 and the “climate indices correlation page”, which republishes many indices in one file format.

Which file each index comes from, and why (checked 2026-10-09):

  • RONI is CPC’s official ENSO index since 2026-02-01 (NWS PNS 26-05); the legacy ONI and the monthly Niño 3.4 are still published for continuity. All three are built on ERSSTv6. RONI and ONI now disagree by up to half a degree, because RONI subtracts the tropical-mean warming.

  • PDO and AMO come from NCEI’s ERSSTv5 files. NOAA names no official PDO; NCEI’s is the maintained, documented, 1854-onward default. PSL’s pdo.data stopped at 2025-08 and its Kaplan AMO at 2023-01.

  • MEI.v2 has one home, PSL. AO, NAO and PNA come from CPC.

source="psl" reads PSL’s correlation-page copies instead (pdo.data, oni.data, nina34.anom.data …), for reproducing work that used them. They are not the same series: PSL’s PDO correlates at about 0.92 with NCEI’s, and two of them have stopped updating, which load logs as a warning.

Timestamps are the first of the month. A 3-month-season index (RONI, ONI) is stamped at its centre month (DJF → January), and MEI.v2’s 2-month seasons at their later month (DJ → January), which is how both providers lay out their own year-by-month tables. JPL’s “Vital Signs” PDO is a different quantity, a sea-surface-height index, and is not offered here; see the best-practices page linked in the catalog entry.

search

The indices a source offers, one row each, with the file each comes from.

load

Load climate-mode indices as a monthly xarray.Dataset.

parse

Parse one index file into a monthly pandas.Series.

seasonal_mean

Average each index over months, one row per water year.

enso_phase

Label each month El Niño, La Niña or neutral with CPC's event rule.

easysnowdata.climate.koppen_geiger#

Köppen-Geiger climate classification (Beck et al. 2023).

One source: the figshare archive of the 2023 paper, file 61012822 (the January 2026 release; file 45057352 was the superseded v1). The archive holds five historical periods and the 2041-2070 / 2071-2099 CMIP6 projections at four resolutions, so this loader exposes period= and scenario= alongside resolution=:

import easysnowdata as esd
kg_da = esd.climate.koppen_geiger.load(aoi)               # 1991-2020, 0.1°
kg_da = esd.climate.koppen_geiger.load(aoi, period="2071_2099",
                                       scenario="ssp245", resolution="1 km")
esd.climate.koppen_geiger.search()                        # what is in the archive
esd.plotting.categorical(kg_da)                           # CF flags → legend

The 30 classes are returned as the source uint8 values with CF flag_values / flag_meanings / flag_colors; 0 is ocean and is kept as the nodata sentinel (§2.5).

search

What the archive holds: one row per (period, scenario, resolution) raster.

load

Load the Köppen-Geiger classes as a categorical xarray.DataArray.