WRF_Hydro

Builds and runs WRF-Hydro v5.2.0 standalone hydrological simulations from raw global datasets.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires netCDF4, numpy, scipy, geopandas, rasterio, pyproj, whitebox, and includes scripts (resource) and references (resource) components.

What problem does it solve? Setting up WRF-Hydro v5.2.0 in standalone mode normally requires WPS, ArcGIS, and manual IDL scripts, and silent failures (wrong D8 encoding, unit mismatches, inverted channel grids) produce invalid results that are hard to diagnose. This Skill replaces that workflow with a validated Python-only pipeline and encodes 46 diagnostic triplets from real basin runs so errors are matched to known remedies. ## Core Features & Use Cases - End-to-end domain construction: 17 tools build geo_em, wrfinput, Fulldom routing grids, soil properties, and groundwater files from DEM, AVHRR, and HWSD data on a Lambert Conformal Conic grid. - Multi-source forcing conversion: Adapters convert CMFD, MSWX, VIC, and NASA POWER data into hourly LDASIN NetCDF forcing with elevation and unit corrections. - Calibration and diagnostics: A parameter-sweep calibration tool (REFKDT, Manning's n, GW bucket coefficients) plus a triplet-based recovery system covering 8 failure domains. - Use Case: Simulate discharge for an ungauged basin anywhere globally — define the domain from a basin shapefile, pull NASA POWER forcing, run the MPI model, and extract outlet discharge from CHRTOUT, validated against cited NSE/PBIAS conventions. ## Quick Start Run the WRF-Hydro pipeline for my basin shapefile from 2000 to 2005 using CMFD forcing and extract the daily outlet discharge.

Frequently Asked Questions about WRF_Hydro

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

FAQPage Schema
How do I run WRF-Hydro standalone without WPS or ArcGIS?

Use the Python pipeline tools in order: define_lambert_domain.py, build_geo_em.py, build_fulldom_hires.py, then forcing conversion and generate_namelists.py, finishing with run_wrfhydro.py. The run_wrfhydro_full_pipeline.py wrapper executes all stages in one command.

How do I extract discharge from WRF-Hydro output correctly?

Always read the streamflow variable from CHRTOUT files at the outlet channel cell, never basin-averaged SFCRNOFF from LDASOUT. LDASOUT runoff fields include routed upstream contributions and overestimate discharge by roughly 2.4x when averaged.

What forcing data sources does WRF-Hydro standalone support?

Three adapters are provided: cmfd_to_ldasin.py for CMFD over China, nasa_power_to_ldasin.py for any global location via the NASA POWER API, and convert_forcing_to_ldasin.py for existing VIC 3-hourly forcing. All produce hourly LDASIN NetCDF on the LCC grid.

Why does WRF-Hydro produce no correlation with observations in mountain basins?

The default Noah-MP REFKDT=3.0 infiltrates nearly all rainfall, leaving no surface runoff to route, so discharge comes only from the slow groundwater bucket with inverted seasonality. Reduce REFKDT to 0.5-1.0 in soil_properties.nc as the first calibration step.

What channel routing options does WRF-Hydro support?

Three options: diffusive wave gridded routing (channel_option=3, the default needing only Fulldom_hires.nc), and reach-based Muskingum or Muskingum-Cunge (options 1/2) which additionally require Route_Link.nc, spatialweights.nc, and UDMP_OPT=1.

Why does WRF-Hydro crash with a network topology error?

Boundary cells on the Fulldom routing grid must have FLOWDIRECTION=0, and the WhiteboxTools D8 encoding must be remapped to the ArcGIS/WRF-Hydro convention. The documented WhiteboxTools mapping is wrong for 8 of 9 directions, so verify encoding empirically.