Ribasim

Build, run, and validate Ribasim water-resources network models from GeoPackage and TOML inputs.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, pandas, geopandas, shapely, pyogrio, pyarrow, xarray, ribasim, and includes scripts (resource) and references (resource) components.

What problem does it solve? Running the Ribasim water-resources model requires operational expertise scattered across docs and source code: correct unit conventions (m/s fluxes, m³/s flows), GeoPackage schema details, solver settings, and recovery from silent failures. This Skill packages that expertise so an AI agent can build, execute, and validate real Ribasim simulations without substituting approximations. ## Core Features & Use Cases - Network and input construction: Convert CSV/shapefile node-link definitions, basin profiles, and forcing data into a Ribasim-compatible GeoPackage database and ribasim.toml configuration with schema and unit validation. - Checked model execution: Run the actual Ribasim 2026.1.0-rc2 binary (Julia/SciML core) via a wrapper with preflight environment checks and a diagnostic triplet table mapping 18 known failure symptoms to remedies. - Output parsing and validation: Parse NetCDF results (flow_rate, level, storage, balance error, allocation) into CSVs, plots, and metrics scored against cited NSE/PBIAS convention bars. - Use Case: A hydrologist provides basin polygons, ERA5 forcing, and inflow records; the agent converts units (mm/day to m/s), builds the network, runs Ribasim, and reports flow_rate skill against the validation convention. ## Quick Start Ask the agent to run the preflight check and then build and execute a Ribasim model from your node, link, and basin CSV inputs.

Frequently Asked Questions about Ribasim

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

FAQPage Schema
How do I run a Ribasim water resources model from Python?

Build the GeoPackage network and ribasim.toml with the provided tools, then execute via the run_ribasim.py wrapper or the ribasim CLI. A preflight script verifies the binary, Julia runtime, and Python dependencies before execution.

What input format does Ribasim require?

Ribasim reads a TOML configuration file plus a GeoPackage database containing Node, Link, Basin profile/state, and forcing tables. Vertical fluxes must be in m/s and flows in m³/s; mm/day or L/s inputs cause silent magnitude errors.

Is Ribasim a rainfall-runoff model?

No. Ribasim is a network routing and allocation model; it takes external inflows and outflows as boundary conditions from models like VIC, SWAT+, or CaMa-Flood. It cannot generate land-surface runoff itself.

Why does my Ribasim basin flood or dry out immediately?

The most common cause is unit mismatch: precipitation or evaporation passed in mm/day instead of m/s produces roughly an 86-million-fold error. Check the diagnostic triplets table and convert all vertical fluxes to m/s before writing forcing tables.

How is Ribasim model output validated?

Outputs such as flow_rate, level, and storage are parsed from NetCDF results and scored against cited convention bars, for example NSE ≥ 0.75 rated very good for flow_rate. The dag.yaml file defines the headline variable and observability for scoring.