q42·advanced

Is the river through my town running high, and is a flood building upstream?

hydrologydisasterswater-resources Datasets: 3 30–60 min
Find the data for your area

Draw a rectangle to pick your area of interest, then see what NASA data covers it (live, here in your browser) or download a ready-to-run notebook with your AOI pre-filled. The notebook runs in any Python environment — it needs a free Earthdata Login to fetch the data.

Current AOI: -91.3, 30.2 → -90.9, 30.6 (Lower Mississippi near Baton Rouge, USA)

Until recently, the only way to know how high a river was sitting was a gauge bolted to a bridge — and most rivers on Earth have none. NASA and CNES's **SWOT** satellite changed that: it measures the [water-surface elevation](/glossary/radar-altimetry/) of rivers wider than about 100 m everywhere it flies over, breaking each river into short "reaches" and reporting a height and a width for each one. Watch the same reach across several overpasses and you can see the water climbing — and watch the reaches above your town to catch a flood wave while it is still upstream. **Verified locally.** For the Lower Mississippi near Baton Rouge, the SWOT `RiverSP` reach product read a real water-surface elevation of **1.88 m** (with a channel width of about **999 m**) on a reach in the AOI from the 1 Jan 2024 overpass — one of 11 valid reaches the satellite measured here that pass. Heights are reported relative to a geoid datum, so the single number matters less than how it *changes* from one overpass to the next: a steady rise across passes is the signature of a flood building.

Is the river through my town running high, and is a flood building upstream?

Until recently, the only way to know how high a river was sitting was a gauge bolted to a bridge — and most rivers on Earth have none. NASA and CNES’s SWOT satellite changed that: it measures the water-surface elevation of rivers wider than about 100 m everywhere it flies over, breaking each river into short “reaches” and reporting a height and a width for each one. Watch the same reach across several overpasses and you can see the water climbing — and watch the reaches above your town to catch a flood wave while it is still upstream.

Verified locally. For the Lower Mississippi near Baton Rouge, the SWOT RiverSP reach product read a real water-surface elevation of 1.88 m (with a channel width of about 999 m) on a reach in the AOI from the 1 Jan 2024 overpass — one of 11 valid reaches the satellite measured here that pass. Heights are reported relative to a geoid datum, so the single number matters less than how it changes from one overpass to the next: a steady rise across passes is the signature of a flood building.

What you can answer

  • How high a river reach is sitting on a given overpass — the wse field (water-surface elevation, in metres) for every reach SWOT measured over your town
  • How wide the channel is, and whether it is widening — the width field, a direct sign of water spilling toward the banks
  • Whether the river is rising — line up wse for the same reach_id across successive overpasses and read the trend
  • Whether a flood is building upstream — check the reaches above your town first; a rise there precedes a rise at home by hours to days
  • How far above normal today is — compare this overpass to the spread of past overpasses for the same reach
  • Where water historically sits — overlay JRC Global Surface Water to see the floodplain and permanent-water baseline your reading should be judged against

What you can NOT answer with these datasets alone

  • The actual discharge (flow in m³/s) — SWOT gives height and width, not volume; turning that into flow needs a rating relationship or a hydraulic model, not the product alone
  • Exact heights against your local benchmarkwse is referenced to a satellite geoid datum, not the gauge datum your town’s flood stage is defined on; reconcile datums before comparing to a flood threshold
  • Small streams — SWOT only resolves rivers roughly wider than 100 m; a creek through your neighbourhood is below its reach
  • Continuous, real-time tracking — each reach is seen only on overpasses (every few days), so a fast flash flood can crest and fall between visits
  • Why the river is rising — pair with GPM IMERG rainfall upstream to attribute a rise to a storm rather than a dam release or snowmelt
  • Whether your specific street will flood — reach-scale elevation is not a street-level inundation map; that needs a terrain model and local hydraulics

Code template (Python, cloud-direct)

Verified locally. SWOT_L2_HR_RiverSP_reach_D is delivered as a zipped shapefile, not NetCDF. Download the granule, then open it with geopandas using a zip:// path. Each row is a river reach with reach_id, wse (metres), and width (metres); the fill value is -999999999999, so mask it out before computing anything.

import os, re, warnings, earthaccess, geopandas as gpd
warnings.filterwarnings("ignore")

# load Earthdata creds from .env without `source` (passwords can break the shell)
for line in open(".env"):
    m = re.match(r'\s*(?:export\s+)?([A-Z0-9_]+)\s*=\s*(.*)\s*$', line)
    if m: os.environ.setdefault(m.group(1), m.group(2).strip().strip('"').strip("'"))
earthaccess.login(strategy="environment")   # free Earthdata Login

W, S, E, N = -91.3, 30.2, -90.9, 30.6        # Lower Mississippi near Baton Rouge
g = earthaccess.search_data(short_name="SWOT_L2_HR_RiverSP_reach_D",
                            temporal=("2024-01-01", "2024-06-30"),
                            bounding_box=(W, S, E, N))

# the product is a ZIPPED SHAPEFILE — download, then read with a zip:// path
files = earthaccess.download(g[:1], local_path="swot")
gdf = gpd.read_file(f"zip://{files[0]}")

reaches = gdf.cx[W:E, S:N]                    # clip to your town
reaches = reaches[reaches["wse"] != -999999999999]   # drop the fill value
for _, r in reaches.iterrows():
    print(f"reach {r['reach_id']}: wse={r['wse']:.2f} m  width={r['width']:.0f} m")

# flood build-up = the SAME reach_id rising across successive overpasses.
# Loop several granules in date order, keep one reach_id, and plot wse over time;
# check the reaches UPSTREAM first to see a flood wave before it reaches you.
How a scientist answers this
Parameters
Per-reach river water-surface elevation (SWOT_L2_HR_RiverSP `wse`, metres relative to a geoid datum) and channel `width` (metres) for reaches wider than ~100 m, tracked across overpasses; GPM IMERG gives upstream rainfall and JRC Global Surface Water the floodplain baseline.
Method
For each town and upstream reach, build a time series of `wse` and `width` across SWOT overpasses (the change between passes, not the absolute height, is the flood signal), flag a rising trend, and check whether upstream reaches rise before the town's reach; corroborate with accumulated upstream IMERG rainfall as a leading indicator.
Validation
Keep only reaches passing SWOT data-quality flags, report valid-reach counts per overpass, account for the coarse temporal sampling (multi-day repeat) and node/reach aggregation, and cross-check rises against IMERG rainfall and any in-situ gauges.
In plain EnglishWatch the satellite-measured water height and width of river reaches over successive passes, and if reaches upstream of your town start climbing, a flood wave may be on its way.

Make it yours → Pick the town's reach and the upstream reaches, the overpass date range, and the rise threshold in the notebook.

Run the core method · no login

The thresholding a measurement into classes at the heart of this question — runnable on synthetic data, right here. The full earthaccess code template further down does it on real NASA data (needs an Earthdata login).

editable · runs in your browser

Datasets used