HEC-RAS

Runs the real HEC-RAS steady-flow solver under WINE to compute and validate river water-surface profiles.

155|6|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/lzwei196/KISS-Knowledge-Infrastructure-for-Scientific-Simulation --skill hec-ras-lzwei196
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: HEC-RAS
Source: https://github.com/lzwei196/KISS-Knowledge-Infrastructure-for-Scientific-Simulation/tree/main/models/HEC_RAS
Command: npx skills add https://github.com/lzwei196/KISS-Knowledge-Infrastructure-for-Scientific-Simulation --skill hec-ras-lzwei196

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires h5py, numpy, matplotlib, ras-commander, and includes scripts (resource) and references (resource) components.

What problem does it solve? Operating the HEC-RAS hydraulic model headlessly requires deep operational knowledge: staging the proprietary Windows solver under WINE, seeding HDF results skeletons, editing run files, handling unit-system traps, and validating computed water-surface profiles against observed data. This Skill packages that expertise so an AI agent can execute, check, and recover real HEC-RAS 1-D steady-flow simulations without substituting approximations. ## Core Features & Use Cases - Real solver execution: Drives the actual RasSteady.exe Intel-Fortran binary under WINE, including the HDF skeleton seeding and LD_PRELOAD fixes required for headless runs. - End-to-end steady pipeline: Eleven tools cover project preparation, discharge/boundary editing, Manning roughness scaling, DEM-based cross-section authoring, solving, HDF output parsing, rating curves, and validation against observed water-surface elevations. - Diagnostic recovery: A catalogue of 20 symptom-to-remedy triplets plus a preflight check gate every run, mapping known failures (HDF seeding, Wine Mono gaps, unit traps) to fixes. - Use Case: Given observed discharge peaks for a river reach, generate a parameterized HEC-RAS project, run the steady solver, and validate the computed water-surface profile against observed stages (bundled example achieves NSE 0.9965, RMSE 0.096 ft). ## Quick Start Run python3 preflight_check.py in this directory, then ask the agent to prepare a steady project with your discharges and execute tools/run_hecras.py to produce validated water-surface profiles.

Frequently Asked Questions about HEC-RAS

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run HEC-RAS headlessly on Linux?

Run the steady solver through WINE using tools/run_hecras.py, which copies the project to a temp workspace, seeds the results HDF skeleton from the geometry HDF, and invokes RasSteady.exe with LD_PRELOAD stripped. Always run preflight_check.py first to verify the environment.

How do I validate HEC-RAS results against observed data?

Use tools/validate_hecras.py with the results HDF and a flow file containing Observed WS lines. It computes NSE, KGE, RMSE, PBIAS, and correlation against observed water-surface elevations; the bundled Mixed Flow example achieves NSE 0.9965 and RMSE 0.096 ft.

Can HEC-RAS be used as a rainfall-runoff model?

No. HEC-RAS is a hydraulics model that consumes discharge and boundary stage, not precipitation or temperature. Feeding meteorological forcing into it is a domain error; use observed discharge via convert_flow_to_hecras.py instead.

Why does RasSteady.exe fail with an HDF output file error?

The solver aborts unless the plan results skeleton <prj>.pNN.tmp.hdf already exists. Seed it by copying the geometry HDF (<prj>.gNN.hdf) to that path before running; run_hecras.py does this automatically.

Can I run unsteady, sediment, or water-quality simulations?

The unsteady, sediment, and water-quality solvers load and execute under WINE, but full runs need the plan-HDF skeleton written by Ras.exe, which requires Wine Mono. Wine Mono is not installed in this environment, so only steady flow is validated end-to-end.

What unit traps exist when setting HEC-RAS discharges?

English projects expect cfs while SI projects expect m3/s; feeding m3/s into an English project understates flow about 35 times. Pass --in-units m3/s to auto-convert, and never convert Manning n, which is dimensionless in both systems.