AI-Hydro Interactive Module · Real Data

Catching the Flow
Real Streamflow Data

In Module 3 you read the shape of a hydrograph on synthetic data. Now you locate a real USGS gauge on a map, fetch its multi-year record, plot the annual regime, and find the year it flooded — all in one Python cell.

Pick a gauge on the map or dropdown · Run the Python cell · Spot where the flood bar appears · Answer the quiz
Follow the arrow — measurement The runoff arrow from Module 1 eventually reaches a stream gauge. USGS has measured discharge continuously at thousands of CONUS gauges since the 1890s. This module puts that archive in your hands.

Six-step tour — click to jump

📍
Pick Gauge
🗺️
Map
🐍
Fetch
📊
Regime
🌊
Flood
✓
Check

1 · Four teaching gauges — four stories

USGS operates ~8 000 active stream gauges in CONUS. We've chosen four whose records tell distinctly different hydrological stories — a range every hydrology student should recognise. Click a card to select that gauge.

🌊
01013500
Fish River, Fort Kent, ME
Flood-prone New England river · rain-on-snow events · sharp peaks
❄️
14305500
Siletz River, Siletz, OR
Pacific Northwest snowmelt · spring melt pulse · high BFI
🏜️
09484000
Rillito Creek, Tucson, AZ
Flashy arid desert wash · near-zero baseflow · monsoon spikes
🌿
02472000
Bogue Chitto, Bush, LA
Baseflow-dominated coastal plain · steady year-round · high BFI
Or use your own Select "Other gauge (enter USGS ID)" in the dropdown below and type any 8-digit USGS site number. These four appear again in the Module 7 Capstone — pick one now to build intuition you'll use later.

2 · Locate your gauge on the map

The four curated gauges are pinned below. Click a marker to jump to that gauge's card above. The selected gauge (highlighted blue) is what the Python cell will use.

🗺️

Interactive map loads inside the AI-Hydro Preview panel.

📍 01013500 — Fort Kent, ME
📍 14305500 — Siletz, OR
📍 09484000 — Tucson, AZ
📍 02472000 — Bush, LA

Tip: In the AI-Hydro map panel, use Hydrography → Add HUCs or search by gauge ID to layer USGS stations over any basemap.

3 · Select your gauge & fetch the record

Choose a gauge below, then click Run ▶. The cell tries to pull 5 years of real USGS daily values via dataretrieval. If that package isn't installed, it synthesises a CAMELS-shaped record so the module always works even offline.

Live data — allow ~10 s The cell fetches from waterservices.usgs.gov when dataretrieval is installed. A progress message appears while the request runs. If you're offline, the synthetic fallback kicks in automatically.
python USGS daily streamflow · multi-year record · flood identification

    
AI-Hydro agent action For real-time analysis in chat, ask: "Fetch 10 years of daily streamflow for gauge 01013500 and compute hydrological signatures." The agent calls fetch_streamflow_data then extract_hydrological_signatures.

4 · Reading the annual regime

The lower panel of the plot shows the annual regime — mean discharge for each calendar month, averaged over the whole record. Each gauge has a distinctive signature shape:

🌊 Fish River (ME) — broad spring peak (snowmelt + rain), summer low, occasional winter spikes from rain-on-snow. Classic mixed rainfall-snowmelt regime.
❄️ Siletz River (OR) — deep winter peaks (Pacific frontal rain + snowmelt), extremely dry August–October. Classic Pacific maritime regime.
🏜️ Rillito Creek (AZ) — near-zero most of the year with sharp July–September monsoon spikes. Zero-to-flood in hours. Classic semi-arid flashy regime.
🌿 Bogue Chitto (LA) — gentle, year-round flow with a slight winter–spring maximum. Nearly flat regime. Classic groundwater-dominated regime.
What to look for After running the cell, compare the regime bar chart to these descriptions. A narrow, spiky regime (Rillito) vs. a smooth, broad one (Bogue Chitto) tells you how quickly the catchment responds and how much groundwater storage it has.

5 · Spotting a flood event

In the cell output, flood days are shaded amber — days where discharge exceeds the 95th percentile threshold of the whole record. This is a simple but robust peak-over-threshold (POT) approach used in operational flood studies.

Why P95?

The 95th percentile means only 5% of all days exceed it. On a 5-year record that's ~91 days — spread across several distinct flood events. Lowering the threshold captures minor high-flow days; raising it isolates only extreme events.

Return period

The peak printed below the plot is the multi-year maximum. Dividing the record length by the number of exceedances gives a rough return period estimate — useful context for flood risk but needs longer records for reliability.

Try this Switch the gauge to Rillito Creek (AZ) and re-run. The amber flood bars should concentrate tightly in July–September (monsoon season). Compare that to Fish River (ME) where flood bars scatter across winter–spring. This is regime diversity in action.

6 · Checkpoint

Answer all three questions correctly to mark this module complete.

USGS measures streamflow at a gauge by recording water level (stage) and converting it to discharge using a rating curve. What is the key assumption behind that conversion?

Rillito Creek in Tucson records near-zero flow for most of the year, then spikes violently during July–September. Which catchment characteristic best explains this pattern?

The 95th-percentile threshold is used in the cell to colour flood days. If you instead used the 99th percentile, what would change in the plot?

References

  1. USGS National Water Information System (NWIS). Real-time and historical streamflow data. U.S. Geological Survey. waterdata.usgs.gov/nwis
  2. Addor, N., Newman, A.J., Mizukami, N. & Clark, M.P. (2017). The CAMELS data set: catchment attributes and meteorology for large-sample studies. Hydrology and Earth System Sciences, 21, 5293–5313. DOI: 10.5194/hess-21-5293-2017
  3. Pettitt, A.N. (1979). A non-parametric approach to the change-point problem. Applied Statistics, 28(2), 126–135. (Background: regime shifts in streamflow.)
  4. Moore, C. et al. (2019). dataretrieval: a Python package for accessing USGS water data. GitHub: DOI-USGS/dataretrieval-python
Module
real-streamflow-data · v0.2.0 · CC-BY-4.0
Authors
Mohammad Galib, Purdue University
Data source
USGS NWIS daily values via dataretrieval (real data) or CAMELS-shaped synthetic fallback.
Curated gauges
01013500 (ME), 14305500 (OR), 09484000 (AZ), 02472000 (LA) — chosen from CAMELS-US for pedagogical diversity.
Flood threshold
Peak-over-threshold at P95 of multi-year record.
Environment
Python (numpy, matplotlib) · optional: dataretrieval.
CC-BY-4.0