CWatM

Run, calibrate, and validate CWatM v1.5 daily hydrological simulations with diagnostic recovery.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, scipy, netCDF4, gdal, pandas, rasterio, flopy, xmipy, and includes scripts (resource) and references (resource) components.

What problem does it solve? Running the CWatM global hydrological model requires deep operational knowledge: preparing NetCDF forcing and static inputs with exact units, configuring a 20-section settings file, and recovering from silent failures like wrong precipitation conversion factors or Kelvin/Celsius mismatches that produce plausible-looking but wrong discharge. This Skill packages that expertise so an agent can execute real CWatM runs correctly. ## Core Features & Use Cases - End-to-end pipeline tooling: Seven tools cover basin static-stack construction from MERIT-Hydro/ESA-CCI-LC, HWSD/SoilGrids soil conversion, CMFD/ERA5/MSWX forcing conversion, model execution, and output parsing. - Diagnostic recovery: 28 symptom-to-diagnosis-to-remedy triplets in diagnostics/triplets.yaml map known failure modes (unit traps, routing library load failures, spin-up errors) to validated fixes. - Validation against observations: A DAG defines ranked outputs (discharge, TWS, ET, snow) with observability metadata, and a verifier script scores simulated discharge against gauge records using NSE, KGE, and PBIAS with crop_correct calibration. - Use Case: Simulate daily discharge for the Huai River at Bengbu by building the static grid, converting CMFD forcing, running CWatM with a 3-year spin-up, and scoring against observed gauge data. ## Quick Start Run python preflight_check.py in this directory to verify the CWatM binary, Python environment, and required data are available before starting any simulation.

Frequently Asked Questions about CWatM

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

FAQPage Schema
How do I run a CWatM hydrological simulation for a new basin?

Build the static grid with build_cwatm_static.py from MERIT-Hydro and ESA-CCI-LC data, convert forcing and soil inputs onto that grid, then execute run_cwatm_wrapper.py with a configured settings.ini. Always run preflight_check.py first to verify the environment.

Why is my CWatM discharge 100 to 1000 times too high or near zero?

The precipitation_coversion factor in settings.ini does not match your forcing units. CWatM expects kg m-2 s-1 with factor 86.4; use 1.0 for m/day or 0.001 for mm/day inputs. This mismatch fails silently with no error raised.

What meteorological forcing data does CWatM require?

CWatM needs daily gridded NetCDF of precipitation, average temperature, and optionally Tmin/Tmax, surface pressure, humidity, wind, and shortwave/longwave radiation for Penman-Monteith ET. Pre-computed reference ET can substitute for the full radiation-based inputs.

Does CWatM support groundwater and reservoir coupling?

CWatM includes a linear-reservoir groundwater module by default and optionally couples to MODFLOW 6 via flopy/xmipy for distributed groundwater. Lakes and reservoirs use storage-outflow rules, and OGGM glacier coupling is also supported.

How long should CWatM spin-up be before scoring results?

Allow 2 to 3 years of spin-up between StepStart and SpinUp so groundwater and channel storage equilibrate. A large basin starting from empty storage can show discharge orders of magnitude below observed values without adequate spin-up.

Why does CWatM baseflow peak in the wrong season?

The recessionCoeff_factor acts as a divisor on the recession coefficient, so raising it slows baseflow. Pin recessionCoeff to 1.0 and treat the factor as residence time in days, searching roughly 2 to 40 days, then verify baseflow fraction and phase against precipitation.