Skip to content

About

Read, analyze and visualize HEC-RAS 1D steady-flow HDF results in Python with ras-commander.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

HEC-RAS Results in Python — Water Surface Profile

An exploratory project: reading and visualising HEC-RAS 1D steady-flow results in Python with the ras-commander library. It reads a plan's HDF output directly — no HEC-RAS installation or GUI required — and builds an annotated longitudinal profile with a flow-regime panel.

What it does

  • Reads 1D steady-flow results straight from a HEC-RAS plan HDF file (.p01.hdf)
  • Reconstructs hydraulic quantities the library returns empty, from first principles: channel invert (bed = wsel − max_depth), energy grade line (E = wsel + V²/2g), Froude number (Fr = V / √(g·D), D = area / top_width)
  • Classifies flow regime per cross section (subcritical / critical / supercritical)
  • Plots the longitudinal profile — bed, water surface, energy line, shaded depth — with a Froude panel below, marking where flow goes supercritical

Note on scope

This explores the library's read/visualisation capabilities; it isn't a finished tool. Running simulations (rather than reading finished results) is a separate, more involved step and is out of scope here.

Data

Uses the public 1D Steady Flow example (Merced River, Yosemite Valley) from the official HEC-RAS tutorial. The model files are not included in this repo — download the zip from the tutorial and point the notebook at the .p01.hdf file:

Steady Flow Modeling with HEC-RAS

Run

pip install -r requirements.txt
jupyter lab hecras_water_surface_profile.ipynb

No HEC-RAS installation needed — the notebook reads the HDF results directly, so it runs on Linux, macOS or Windows.

Tech

Python · pandas · NumPy · Matplotlib · ras-commander

About

Read, analyze and visualize HEC-RAS 1D steady-flow HDF results in Python with ras-commander.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages