MARRMoT

Run, calibrate, and validate MARRMoT conceptual rainfall-runoff models via Octave with unit-safe forcing conversion.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, pandas, xarray, matplotlib, oct2py, scipy, and includes scripts (resource) and references (resource) components.

What problem does it solve? Running the MARRMoT toolbox (47 conceptual rainfall-runoff model structures in MATLAB/Octave) from an agent workflow is error-prone: forcing data arrives in inconsistent units (mm/3h, kg/m2/s, Kelvin), PET must be pre-computed externally, and silent unit or column-order mistakes produce plausible-looking but wrong streamflow. This Skill encodes the full operational pipeline, unit-trap table, and diagnostic triplets so simulations, calibration, and validation execute correctly against the real model binary. ## Core Features & Use Cases - End-to-end pipeline tools: convert_forcing.py builds the [P, Ep, T] climate array in mm/d and deg C, convert_parameters.py maps soil/land data to parameter vectors, run_marrmot.py executes any of the 47 structures via Octave (with CMA-ES or Monte-Carlo calibration), and parse_output.py extracts Q, Ea, and storage to CSV with NSE/KGE/PBIAS metrics. - Diagnostic recovery: 20 symptom-to-diagnosis-to-remedy triplets in diagnostics/triplets.yaml cover silent unit conversions, solver non-convergence, S0 length mismatches, and water-balance issues, with a preflight_check.py that verifies the Octave binary, source tree, and data before any run. - Use Case: Calibrate GR4J (m_07_gr4j_4p_2s) on daily CMFD forcing for a catchment, then validate simulated streamflow against observed discharge converted from m3/s to mm/d, reporting NSE and PBIAS against cited Moriasi convention bands. ## Quick Start Run python preflight_check.py in this directory, then ask the agent to convert your forcing CSV with tools/convert_forcing.py and execute a GR4J run via tools/run_marrmot.py, scoring the output with tools/parse_output.py against your observed streamflow.

Frequently Asked Questions about MARRMoT

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

FAQPage Schema
How do I run a MARRMoT rainfall-runoff model from Python?

Use tools/run_marrmot.py with a forcing CSV containing [P, Ep, T] columns in mm/d and deg C, a model name like m_07_gr4j_4p_2s, and a theta parameter vector. The tool drives the real MARRMoT toolbox through an Octave subprocess and writes results to JSON.

How do I calibrate GR4J or HYMOD parameters in MARRMoT?

Run tools/run_marrmot.py with --calibrate --optimizer cmaes, which uses MARRMoT's built-in my_cmaes optimiser with an objective such as of_NSE or of_KGE. Use at least 5 IPOP restarts, since single mean-start runs get trapped in local optima.

What units does MARRMoT expect for precipitation, PET, and temperature?

MARRMoT expects precipitation and PET in mm/d and temperature in deg C, arranged as [P, Ep, T] columns, and performs no internal unit conversion. ERA5 kg/m2/s must be multiplied by 86400, CMFD mm/3h summed over 8 steps per day, and Kelvin reduced by 273.15.

Does MARRMoT compute potential evapotranspiration internally?

No, PET must be pre-computed externally with Hargreaves, Penman-Monteith, or Priestley-Taylor and supplied as the Ep column. Passing net radiation in W/m2 as PET silently makes evaporation exceed precipitation and drains the model stores.

Why is my MARRMoT simulated streamflow wildly wrong without any error?

Silent unit or format traps are the usual cause: wrong precipitation units, Kelvin temperature, swapped [P, T, Ep] columns, or delta_t set to 24 instead of 1 day. Check diagnostics/triplets.yaml first, which maps 20 known symptoms to diagnoses and remedies.

Can MARRMoT simulate snow-dominated or distributed catchments?

Only snow-capable structures (e.g. m_06, m_12, m_37) handle rain/snow partitioning; non-snow structures are structurally invalid in snow-dominated basins. All 47 structures are lumped 0-D models, so distributed or gridded routing is out of scope.