GR4J___airGR

Runs and calibrates the GR4J daily lumped rainfall-runoff model via the airGR R package.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Running the GR4J hydrological model correctly requires operational expertise scattered across R documentation, Fortran source, and practitioner knowledge: exact unit conventions (mm/day fluxes, Celsius temperatures), warm-up requirements, calibration in transformed parameter space, and recovery from silent failures like Kelvin-to-Celsius errors that produce plausible-looking but wrong discharge. ## Core Features & Use Cases - End-to-end simulation pipeline: Four validated Python tools convert CMFD/ERA5/Caravan forcing to airGR format, extract catchment parameters, execute GR4J via rpy2 with warmup and calibration, and parse outputs with NSE/KGE/PBIAS metrics. - Diagnostic recovery: 18 symptom-diagnosis-remedy triplets cover known failure modes such as unit mismatches, missing warm-up, NA forcing values, and parameter clipping. - Snow coupling: Optional CemaNeige snow module with elevation-band hypsometry for cold-region catchments where plain GR4J fails. - Use Case: Calibrate GR4J against a HYDAT or GRDC gauged basin using MSWX or Caravan forcing, then validate simulated discharge against observed streamflow with cited performance thresholds. ## Quick Start Run the preflight check with python preflight_check.py, then ask the agent to calibrate GR4J on your catchment forcing CSV and report NSE and KGE against observed discharge.

Frequently Asked Questions about GR4J___airGR

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

FAQPage Schema
How do I run the GR4J rainfall-runoff model in Python?

Use the run_gr4j.py tool, which wraps the airGR R package via rpy2. Prepare forcing with convert_forcing_to_gr4j.py (Date, Precip_mm, PotEvap_mm columns), then run in calibration or simulation mode with a warm-up period of at least one year.

How do I convert observed discharge to mm/day for GR4J calibration?

Convert m3/s to mm/day with Qmm = Q_m3s * 86.4 / area_km2, or l/s with Qmm = Q_ls * 0.0864 / area_km2. Using m3/s directly drives NSE to large negative values and breaks calibration.

Why does GR4J produce near-zero runoff or drain all soil moisture?

The usual cause is a unit error: temperature in Kelvin instead of Celsius makes PE_Oudin return ~300 mm/day, or precipitation in m/day or unaggregated 3-hourly values makes rainfall far too small. Check the unit trap table and diagnostics/triplets.yaml first.

Does GR4J support snow processes for cold-region catchments?

Yes, through the optional CemaNeige module via run_gr4j.py --snow, adding two parameters (CTG, Kf) and requiring TempMean_degC. High-relief basins can pass a 101-point hypsometry JSON for elevation-band snow accounting.

What are the limitations of the GR4J model?

GR4J is a lumped 0-D daily model with no spatial routing, no energy balance, and conceptual calibrated stores rather than physical soil parameters. Catchments under ~10 km2 or with sub-daily flood dynamics hit the X4 = 0.5 day floor and need an hourly model like GR4H.