Skip to content

Releases: rehsani/floodpath

v0.2.1 — Interactive outlet picker

07 May 18:18
f0cf164

Choose a tag to compare

Adds an ArcSWAT-style interactive outlet picker (floodpath.interactive) on a leafmap widget — clicks on a hillshaded DEM auto-snap downstream to the nearest stream cell, the upstream basin is delineated and overlaid, and the marker is draggable for fine-tuning.

Highlights

  • floodpath.interactive.pick_outlet(lat, lon, ...) — Jupyter-first outlet picker. Returns an OutletPicker whose .selection carries the snapped outlet, basin, DEM, flow grid, and streams so downstream stages chain off it without re-fetching.
  • floodpath.hydrology.snap_to_stream — public helper underneath the picker; surfaces outside-bbox clicks as a clean ValueError.
  • New optional extra: pip install floodpath[interactive] (adds leafmap, ipyleaflet, matplotlib).
  • New end-to-end example notebook at examples/pick_outlet.ipynb, walking DEM → flow → streams → outlet → HAND → flood → population → damage at Kigali, Rwanda.

Install

pip install --upgrade floodpath           # core
pip install --upgrade floodpath[interactive]  # picker + plotting

See PR #18 and PR #19 for the full changeset.

v0.2.0 — end-to-end rainfall-driven flood + damage

04 May 22:13

Choose a tag to compare

What's new

floodpath is now an end-to-end physically grounded flood model. From v0.1's static-water-level inundation, the pipeline now also accepts precipitation directly and produces a per-cell flood depth + damage map driven by SCS-CN runoff partitioning, steady-state flow accumulation, and Manning normal-depth at stream cells.

Precipitation (uniform synthetic, or any user-supplied grid)
    ↓ SCS-CN (NEH 630 Ch10)
Runoff Q (mm/cell)
    ↓ flow accumulation (pyflwdir)
Accumulated upstream volume + peak discharge
    ↓ Manning normal-depth + Leopold-Maddock width
Stream-cell water levels h (m)
    ↓ HAND broadcast (per-stream → per-cell)
Flood depth (m) per cell
    ↓ JRC depth-damage curves
Damage (m² of damaged built-up surface)

New modules

Module What
floodpath.landuse ESA WorldCover 10 m + Manning's roughness derivation (Chow 1959 / USACE)
floodpath.soil ISRIC SoilGrids 2.0 + USDA texture triangle + NEH 630 Ch7 hydrologic soil group
floodpath.precip PrecipGrid interface + uniform synthetic helper (real fetchers swap in via the same interface)
floodpath.runoff NEH 630 Ch9 SCS Curve Number + Ch10 SCS-CN equation Q = (P-0.2S)²/(P+0.8S)
floodpath.routing Steady-state hydrologic routing (accumulation + peak discharge) + hydraulic closure (Manning at streams) + rainfall-driven HAND inundation

API additions (backward compatible)

  • compute_damage now accepts either a static InundationDepth (the v0.1 path) or the new RainfallInundationDepth from the routing chain. The resulting DamageMap carries a scenario field so the two are always distinguishable.
  • RoughnessGrid, HSGGrid, CurveNumberGrid, RunoffGrid, AccumulatedRunoffGrid, DischargeGrid, WaterLevelGrid, RainfallInundationDepth — the new dataclasses for each pipeline stage.

Numbers from the reference Robit Bata run (100 mm × 6 hr storm)

Stage Result
Mean runoff 67.5 mm (C = 0.674)
Outlet peak Q 66.2 m³/s
Outlet stream water level 10.07 m
Flooded area 9.5% of patch
Damaged built-up 7,355 m² (vs 69,199 m² for hypothetical static 5 m water level)

Status

  • 332 offline unit tests (up from 154 in v0.1)
  • 16 integration tests against the public buckets
  • Smoke test now runs 19 end-to-end stages from DEM through rainfall-driven damage
  • Bumped from "Alpha" to "Beta"

Limitations

  • Steady-state routing only — no time-resolved hydrographs (planned for v0.3)
  • No 2D shallow-water dynamics (not planned; use LISFLOOD-FP / HEC-RAS 2D for that)
  • Steady-state assumption is appropriate for small basins under intense storms; large basins where peak attenuation matters will see biased-high peak Q

Citations

See the Citation section of README.md — added references for ESA WorldCover, ISRIC SoilGrids, NEH Part 630 Chapters 7 + 9, and Leopold & Maddock 1953.

Install

pip install floodpath==0.2.0

v0.1.0 — Initial release

04 May 03:59

Choose a tag to compare

First public release of floodpath — a modular Python pipeline for HAND-based flood inundation and damage estimation.

Install

pip install floodpath

What's included

  • floodpath.dem — Copernicus GLO-30 DEM fetcher (get_dem)
  • floodpath.hydrology — flow direction, accumulation, stream networks, basin delineation, HAND
  • floodpath.exposure — GHSL built-up surface, WorldPop population, OpenStreetMap building footprints
  • floodpath.damage — JRC Huizinga 2017 depth-damage curves (26 continental-average curves across residential / commerce / industry / transport / infrastructure / agriculture), inundation-depth and per-cell damage computation

Status

Alpha. The pipeline produces sensible flood/damage maps for static water-level scenarios. Time-resolved hydraulics, rainfall→runoff routing, and 2D shallow-water dynamics are not in scope.

Test fixtures

Ships with a small set of committed test fixtures (Robit Bata watershed, northern Ethiopia) so contributors can iterate offline. 122 tests passing on CI.