Build reproducible watershed modeling pipelines in Python.
Practical, production-grade guides for hydrologists, environmental engineers, and Python GIS teams. Condition DEMs, route flow with D8 / D∞ / MFD, extract stream networks, delineate watersheds, and orchestrate scalable spatial pipelines — all from one consistent automation playbook.
What you'll find here
Watershed Modeling is a focused reference for automating hydrologic workflows in Python. Every page is built around concrete, reproducible patterns: which library to reach for, why a routing algorithm behaves the way it does on a given terrain, and how to wrap it in a defensible pipeline with logging, idempotency, and topology validation.
Whether you're moving from desktop GIS to a code-driven pipeline, integrating LiDAR into an operational workflow, or scaling watershed delineation across a continent of tiles, the content here favours the algorithmic depth and engineering rigor that production agency-grade work demands — not surface-level tutorials.
Browse the content
Three pillar areas cover the full hydrologic pipeline from raw elevation data through hydrologically sound catchments. Each section drills down into specific implementation guides with code, validation strategies, and operational pitfalls.
Hydrology Data Preparation & DEM Processing
Acquire, harmonize, and condition DEMs into hydrologically sound surfaces — covering CRS alignment, pit filling, resolution tradeoffs, and SRTM/LiDAR data acquisition.
Explore sectionFlow Routing & Stream Network Extraction
Implement D8, MFD, and D-infinity routing, tune flow accumulation thresholds, and derive defensible stream networks with RichDEM and WhiteboxTools in Python.
Explore sectionWatershed Delineation & Catchment Synchronization
Map outlets, partition basins, validate boundary topology, and synchronize nested catchments across multi-source datasets in reproducible Python pipelines.
Explore section