Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Does the autumn ENSO state predict a wet Front Range winter? This cookbook answers that one classification question on NSF NCAR’s CESM2 Large Ensemble, following NSF Unidata’s Supervised Machine Learning Readiness. This chapter frames the question and finds the data.

Code: Apache-2.0 · Content: CC BY 4.0 · Data: NCAR CESM2 Large Ensemble Cloud-Optimized Dataset (Grover & Banihirwe 2021, doi:10.26024/y48t-q717) and Rodgers et al. 2021 (doi:10.5194/esd-12-1393-2021), UCAR Data Terms of Use; Community Earth System Model v2 Large Ensemble (CESM2 LENS) was accessed on 2026-10-20 from https://registry.opendata.aws/ncar-cesm2-lens.

Drafted with AI assistance (Anthropic’s Claude) from cited sources, under the author’s direction, and reviewed by the author in several full read-throughs.

Text and code were checked against those sources and the notebooks’ own outputs by the author’s automated checks (not in this repository) and by separate AI review sessions (also Claude); no human subject-matter expert has reviewed it yet.

Overview

A classifier will read one number, a member’s autumn Niño 3.4 state, and say whether that member’s coming Front Range winter will be wet. This chapter frames that question as a decision, finds the data in the intake-esm catalogue, records it in a Metadata Document, and loads the committed table.

The spine is Unidata’s (Apache-2.0), except that the split is by ensemble member (chapter 3). Terms are in the glossary; shared code is in lensml.py, and show() prints a function’s source.

Prerequisites

ConceptsImportanceNotes
Pythia Foundations: Introduction to XarrayNecessarya Zarr store, a box selection, groupby
Xarray tutorialHelpfulthe same ground, in more depth
Intake-ESMHelpfulone catalogue search
scikit-learnNot requiredevery call is introduced where it is used
  • Time to learn: about 15 minutes with the Try it boxes. Cells run in seconds from the committed cache; the catalogue cells need a network route to AWS.

  • System requirements: the environment.yml at the repository root; no account, no local data beyond the committed cache.

Imports

The second cell prints the package versions; one that disagrees with environment.yml means the wrong kernel.

run started 2026-10-30T21:55:56+00:00   kernel python 3.12.16
numpy         2.5.4
pandas        3.0.6
scipy         1.18.1
scikit-learn  1.9.1
matplotlib    3.11.2
xarray        2026.9.0
zarr          3.4.2
s3fs          2026.9.0
cftime        1.6.5
intake        2.0.9
intake-esm    2025.12.12

The question, as a decision

The person who acts on the answer is a forecaster drafting a local winter-outlook briefing, such as NWS Boulder’s (2020) or NWS Pueblo’s (2025). The SON mean is complete only on 30 November, so this input serves a December update at zero lead; those two briefings date, by their files, from mid-September and mid-October, before it exists, and would need an earlier input (JJA for Boulder’s, JAS for Pueblo’s: a parameter edit and a rebuild). Pueblo’s briefing relays the Climate Prediction Center’s official lean and reports what the ENSO state statistically suggests locally. A “wet” call right more often than the base rate, without missing most wet winters, would be the precondition for testing that on observed winters (every score here is CESM2 against CESM2), beside CPC’s “equal chances”, as Pueblo’s 2025 briefing did for southeast Colorado, mostly south of the box: “Statistically, warmer and drier SE CO, but CPC’s forecast is equal chances …”.

Every parameter in lensml.py is a design decision with its reason; changing one is a trial you record. The seed is declared once and passed down, never np.random.seed() (scikit-learn’s Common pitfalls, §12.3.3). The figure draws the two boxes from those parameters.

Schematic map on a longitude–latitude frame with no coastlines: a wide gold rectangle on the equator marks the Niño 3.4 box (5°S–5°N, 170°–120°W) over which the autumn input is averaged; a small gold rectangle near 39.5°N, 105°W marks the Front Range box over which the winter precipitation target is averaged; a curved arrow from the first to the second is labelled with the season step from the autumn of one year to the following winter.

Framing: Unidata’s three questions

Unidata opens every analysis with three questions, so that the target answers someone’s decision.

The catalogue on AWS

The catalogue forces two design facts: there is no monthly PRECT, so the target is PRECC + PRECL; and there is no variable named SST, so the Niño 3.4 index is built from atmospheric TS over open ocean. The first cell lists the six stores; the second computes what a box subset reads. Offline, each prints OFFLINE and the chapter runs from the cache.

catalogue last_updated: 2021-12-27 14:29:25+00:00   rows in catalogue: 322   rows selected: 6
Loading...
dims      : {'member_id': 50, 'time': 1980, 'lat': 192, 'lon': 288, 'nbnd': 2}
coords    : ['lat', 'lon', 'member_id', 'time', 'time_bnds']
members   : ['r10i1181p1f1' 'r10i1231p1f1' 'r10i1251p1f1'] … calendar: DatetimeNoLeap
chunking  : (1, 600, 192, 288) float32 → 133 MB per chunk uncompressed; one member-variable (1980 months) = 4 chunks × 133 MB ≈ 531 MB read for any box subset; the derivation (100 members × 3 variables) ≈ 159 GB

The Metadata Document

Unidata’s Metadata Document records the data in four parts (general, structure, quality, provenance), each row naming its evidence. The three Quality rows carry into later chapters: the historical smbb half has no ocean TEMP, so both halves use TS; smbb also differs in forcing (smoothed biomass burning, 1990–2020), so chapter 2 checks base rates per half; and members “should not be considered … independent” soon after 1850, so chapter 3 measures what independence is left by 1900.

The member-winter table

Two box means per member read the volume the chunking line computes, so the derivation runs once and writes data/member_winters.csv for every chapter. Its reader asserts that the header records the current parameters and an access= date equal to ACCESS_DATE (the cache header matches lensml.py line). The committed header predates AUTUMN_MONTHS; the reader assumes SON and prints a line saying so.

Loading...

Rebuilding. REBUILD = True re-derives the table from S3: 33 minutes for the full ensemble on a fast link (2026-10-20), an hour or more on home broadband; fewer members is a quick sample. A rebuild stamps its own access date (and AUTUMN_MONTHS) into the header; the chapters then ask you to set ACCESS_DATE to match.

cache header has no AUTUMN_MONTHS field (it predates the field): taken as AUTUMN_MONTHS=[9, 10, 11], the only autumn the derivation code had: the file's autumn is assumed, not read from the header. A rebuild records it.
# derived by 02_applications.ipynb: SEASON=DJF WINDOW=(1900, 2014) FRONT_RANGE={'lat': slice(38.5, 40.5, None), 'lon': slice(253.75, 256.25, None)} NINO34={'lat': slice(-5, 5, None), 'lon': slice(190, 240, None)} n_members_per_half=50 RNG_SEED=0 access=2026-10-20
cache header matches lensml.py: SEASON=DJF WINDOW=(1900, 2014) FRONT_RANGE={'lat': slice(38.5, 40.5, None), 'lon': slice(253.75, 256.25, None)} NINO34={'lat': slice(-5, 5, None), 'lon': slice(190, 240, None)} AUTUMN_MONTHS=[9, 10, 11] · access=2026-10-20
11500 member-winters · 100 members of 100 in the two stores (the full ensemble) · winters 1900–2014
Loading...

Summary

The question is a forecaster’s decision at the start of winter (the SON input completes on 30 November), measured against three simple rules. The data are in a Metadata Document whose rows point at printed evidence; the table is asserted against the parameters on every read (the cache header matches lensml.py line).

What’s next?

Chapter 2 explores the target and input, removes the forced response on the training members only, and defines “wet”.

Resources and references

ResourceWhere it bearsLicence
Grover, M., & Banihirwe, A. (2021). NCAR CESM2 Large Ensemble Cloud-Optimized Dataset. NSF NCAR CISL. doi:10.26024/y48t-q717the dataset (required citation)UCAR Data Terms of Use
Rodgers, K. B. et al. (2021). Ubiquity of human-induced changes in climate variability. Earth System Dynamics 12, 1393–1411. doi:10.5194/esd-12-1393-2021the ensemble; Quality row (the window); Niño 3.4 boxCC BY 4.0
CESM2 LENS on the Registry of Open Data on AWS. https://registry.opendata.aws/ncar-cesm2-lens/accessUCAR Data Terms of Use
CESM2 LENS intake-esm catalogue (aws-cesm2-le.json). https://ncar-cesm2-lens.s3-us-west-2.amazonaws.com/catalogs/aws-cesm2-le.jsonthe catalogue searchUCAR Data Terms of Use
CESM2 Large Ensemble project page. https://www.cesm.ucar.edu/community-projects/lens2members, smbbUCAR website terms of use
NSF Unidata, Supervised Machine Learning Readiness (NSF award #2319979). https://github.com/Unidata/supervised-ml-readinessthe spine; framing questionsApache-2.0
Project Pythia notebook template. https://foundations.projectpythia.org/appendix/templatethe shape of each chapterCC BY 4.0
Stagge, J. H. et al. (2023). Nature Water 1, 1016–1026. doi:10.1038/s44221-023-00163-9the ENSO dipoleCC BY 4.0
NWS Pueblo (2025). Winter of 2025-2026 Outlook. https://www.weather.gov/media/pub/pdf/SC_SE_CO_Winter_2025_26_Outlook.pdfthe decision framing; CPC’s leanUS Government work
NWS Boulder (2020). La Niña and the Upcoming 2020-2021 Winter Season (contains 2010-era slides, e.g. “perhaps through the spring of 2011”). https://www.weather.gov/media/bou/LaNinaWinterOutlook_Sept20.pdfthe expected sign and its seasonUS Government work
scikit-learn User Guide, §12.3 Controlling randomness (§12.3.3; Common pitfalls). https://scikit-learn.org/stable/common_pitfalls.htmlthe seedBSD-3-Clause