⚡ Open Source · Apache 2.0

Automated 2D HEC-RAS Hydraulic Modeling — Terrain to Flood Maps

RAS Agent runs the complete HEC-RAS 2D workflow in a single command — from raw terrain data through watershed delineation, peak flow estimation, mesh build, model execution, and GIS results export.

170 tests passing Apache 2.0 Docker ready HEC-RAS 2D Python 3.11 Rocky Linux 8 / Headless

Nine stages. One command.

Each stage is independently testable and produces typed result objects. Run the full pipeline or individual stages — with mock mode for testing without live data or a HEC-RAS license.

01
🗺️
Terrain Ingestion
ILHMP LiDAR + USGS 3DEP fallback. 3m resolution, mosaic & reproject to EPSG:5070.
02
🌊
Watershed Delineation
pysheds D8 flow direction & accumulation. Delineate contributing basin, extract characteristics.
03
📈
Peak Flow Estimation
USGS StreamStats API for peak flows. Fallback to IL regression equations (SIR 2008-5176).
04
〰️
Hydrograph Generation
NRCS dimensionless unit hydrograph (NEH Part 630). Compute Tc via Kirpich method.
05
🏗️
Model Builder
Clone template project. Assign Manning's n from NLCD. Write mesh perimeter to .g## files.
06
⚙️
Execution Engine
RasUnsteady via SQLite job queue. Parallel runs, 4hr timeout, headless on Rocky Linux 8.
07
📦
Results Pipeline
Typed dataclasses, depth/WSE/velocity rasters, flood extent GeoPackage, COG GeoTIFFs per return period.
08
🔁
Batch Mode
Parallel watershed processing via batch.py. Resume on failure, summary CSV output.
09
📄
HTML Reports
Self-contained run reports with hydrograph plots, basin characteristics, and flood extent preview. FEMA-memo ready.

Engineered for the H&H workflow

Built by engineers for engineers. Designed to handle the unglamorous parts of hydraulic modeling — data wrangling, format conversion, and model assembly — so you can focus on review and QA.

Fully Automated
One command runs the entire 9-stage pipeline from coordinates to flood maps. Human-in-the-loop pauses route scientific decisions to the engineer — never silent autonomy on regulatory choices.
python pipeline/orchestrator.py \ --lon -88.578 --lat 40.021 \ --output ./output/test
🔁
Batch Processing
Run hundreds of watersheds in parallel with batch.py. Resume on failure — skip completed runs automatically. Outputs a summary CSV for each batch run.
python batch.py \ --watersheds watersheds.csv \ --workers 8 \ --resume
🗺️
Web Dashboard + Map Viewer
FastAPI backend with React dashboard. MapLibre flood extent viewer with multi-return-period toggle — switch between 10-yr, 50-yr, and 100-yr flood layers interactively.
docker-compose up api # With web dashboard: docker-compose \ --profile dev up
🐳
Docker Ready
Reproducible environment with GDAL, pysheds, and all geospatial dependencies pre-installed. Runs fully headless on Rocky Linux 8 — no Windows required for geometry preprocessing or simulation.
docker build -t ras-agent . docker run --rm ras-agent \ python pipeline/orchestrator.py \ --lon -88.578 --lat 40.021
📄
HTML Run Reports
Self-contained HTML reports generated for every run — hydrograph plots, basin characteristics table, and flood extent preview. Suitable for attaching to FEMA memos or client deliverables.
☁️
Cloud Storage
Cloudflare R2 integration for results storage. Generates presigned download URLs for sharing COG GeoTIFFs, GeoPackages, and HTML reports without exposing storage credentials.
🔬
HITL / Scientific Review
Human-in-the-loop pauses at configurable stages for expert validation. Engineers review and approve before the pipeline advances — critical for regulatory submissions and peer review.
🧪
Mock Mode & CI
Run the complete pipeline without real terrain data, a live StreamStats connection, or a HEC-RAS license. 170 tests pass in CI on every push. Every HTTP call is mocked — no network access required.
python pipeline/orchestrator.py \ --mock python -m pytest tests/ -v # 170 passed
🔔
Webhook Notifications
HMAC-signed webhook payloads on run completion. Email notifications included. Integrate with Slack, Teams, or any CI/CD pipeline to trigger downstream workflows automatically.

What's shipping now

Active development — major capability unlocks in the last development cycle.

🐧
hecras-v66-linux Integration
Eliminates the Windows geometry preprocessing dependency. The ras_preprocess.py module replicates the HEC-RAS GUI "Compute Geometry" step on Linux/Docker, enabling fully headless simulation on Rocky Linux 8.

Verified accuracy: 0.000–0.001 ft WSE diff vs GUI output.
🖥️
Illinois Computes Allocation
100,000 CPU-hours/year awarded on the NCSA Campus Cluster — 16 nodes × 128 cores × 512 GB RAM. SLURM integration is in progress for production-scale statewide batch runs across all Illinois watersheds.
170 Tests Passing
Full test suite runs in CI on every push. 170 tests covering all 9 pipeline stages, batch mode, results parsing, and API endpoints — with mock mode so no live data or HEC-RAS license is required.

Built by the H&H community

Primary Developer
CHAMP Section
Illinois State Water Survey
Prairie Research Institute, UIUC
In Collaboration With
CLB Engineering Corporation
Hydraulic modeling expertise
and workflow validation
Community
RAS Commander
Open source HEC-RAS automation
tooling community
Project
reepworks.com