ras_run
Run a HEC-RAS plan headlessly (copying the project first if desired) and get a QA summary with status, stability, and error metrics once the simulation finishes.
Instructions
Run one HEC-RAS plan headless (Ras.exe -c project.prj plan.p##; geometry preprocessing, unsteady/steady computation and post-processing) and QA the result. If run_dir is given the whole project is first copied there and run inside it (safe); otherwise the plan runs in place (use on a copy!). Blocks until the run finishes. Returns status ('completed', 'completed_with_warnings', 'unstable', 'failed', 'no_results'), usable (bool), reasons, metrics (max WSEL error, volume error %, ERROR/WARNING line counts), the results HDF path, runtime and the log tail. Gate on 'status'/'usable', not on 'ok'. A watchdog accepts HEC-RAS's 'Terms and Conditions for Use' dialog if it appears (accept_tcu, default true) and kills the run after timeout_s (default 4 h). Needs HEC-RAS installed (Windows).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan | Yes | Plan number, e.g. '03'. | |
| project | Yes | Project folder or .prj. | |
| ras_exe | No | Path to Ras.exe (else HECRAS_EXE / auto-detect). | |
| run_dir | No | Optional folder to copy the project into and run there (recommended). | |
| num_cores | No | Override cores for the solvers (2-8). | |
| overwrite | No | Replace run_dir if it exists (default true). | |
| timeout_s | No | Kill the run after this many seconds (default 14400). | |
| accept_tcu | No | Auto-accept HEC-RAS's Terms and Conditions for Use dialog if it blocks the run (default true; false = terminate the run and report). | |
| clear_geompre | No | Delete .c## preprocessor files first (after geometry edits). Default false. |