topoflow-ki

Runs TopoFlow 3.6 distributed hydrology simulations with unit-safe forcing conversion and validation.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, scipy, netCDF4, cfunits, and includes scripts (resource) and references (resource) components.

What problem does it solve? Running the TopoFlow 3.6 spatially-distributed hydrologic model requires operational expertise scattered across source code and docs: correct unit conversions (mm/hr vs m/s precipitation, K vs °C temperature), D8 grid preparation, component selection via provider files, and recovery from silent failures. This Skill packages that expertise so an AI agent can configure, execute, and validate real TopoFlow runs without substituting approximations. ## Core Features & Use Cases - Forcing and soil data conversion: Tools convert ERA5/CMFD/MSWX reanalysis and HWSD/SoilGrids data into TopoFlow's expected formats with correct units, catching common traps like Kelvin temperatures or mm/hr hydraulic conductivity. - Model execution and output parsing: Run the EMELI-coupled model via run_topoflow.py and extract outlet hydrographs, grid stacks, and metrics (NSE, KGE, PBIAS) with parse_output.py. - Diagnostic recovery: 18 symptom-to-remedy triplets in diagnostics/triplets.yaml map known failure modes (unit errors, CFL violations, provider typos) to validated fixes. - Use Case: Simulate the June 1967 rainfall events over the Treynor, Iowa watershed, then score the simulated outlet discharge hydrograph against observed streamflow using cited NSE/PBIAS validation bands. ## Quick Start Ask the agent to run the preflight check and then execute the TopoFlow Treynor Iowa example, converting ERA5 forcing for the basin and validating the outlet discharge against observed data.

Frequently Asked Questions about topoflow-ki

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

FAQPage Schema
How do I run a TopoFlow 3.6 hydrologic simulation?

Run preflight_check.py first to verify the environment, then prepare forcing with convert_forcing.py, soil parameters with convert_soil_params.py, and execute via run_topoflow.py or python -m topoflow with a cfg_prefix and cfg_directory. Success ends with a Finished message and 0D-Q output files.

How do I convert ERA5 forcing data for TopoFlow input?

Use tools/convert_forcing.py with --source era5, providing the NetCDF directory, target lat/lon, and date range. It converts precipitation from kg/m²/s to mm/hr, temperature from Kelvin to °C, and writes text time-series files the meteorology component reads.

What units does TopoFlow expect for precipitation and soil conductivity?

Precipitation must be mm/hr in the .cfg file; TopoFlow converts to m/s internally, so never pre-convert. Saturated hydraulic conductivity Ks must be m/s, requiring a ÷3.6e6 conversion from the mm/hr values common in soil databases.

Why does my TopoFlow run produce flooding or zero discharge?

Silent unit errors are the usual cause: precipitation left in mm/day causes 24x overestimation, while pre-converting to m/s produces near-zero rain. Check diagnostics/triplets.yaml for the matching symptom and its validated remedy before changing anything else.

How is TopoFlow simulation accuracy validated?

Validation targets the rank-1 output outlet_discharge (Q_outlet) against observed streamflow using NSE and PBIAS. Cited bands mark NSE ≥ 0.5 satisfactory, ≥ 0.65 good, and ≥ 0.75 very good, with PBIAS within 10-25 of zero.

What infiltration and routing methods does TopoFlow support?

Infiltration options are Green-Ampt, Smith-Parlange, Richards 1-D, and Beven. Channel routing supports kinematic, diffusive, and dynamic wave closures with Manning or Law-of-Wall friction, selected via the case-sensitive provider file.