Skip to content
Back to skills

Docs

ASecurity

Generate the Raven .rvh file defining subbasins and HRUs (Hydrologic Response Units). The .rvh file is the spatial foundation — it defines where and how water moves through the basin.

  • 200 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 11, 2026
testingpythonbashgit

Security analysis

A100/100

Pro scans all 12 files and shows the line behind each finding

Scanned September 11, 2026

npx -y skills add lzwei196/KISS---Knowledge-Infrastructure-for-Scientific-Simulation --skill docs --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Docs?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Docs
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/lzwei196-docs-2302450a/badge)](https://www.skillsdirectory.com/skills/lzwei196-docs-2302450a)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# s1: Basin and HRU Setup

## Purpose

Generate the Raven .rvh file defining subbasins and HRUs (Hydrologic Response Units). The .rvh file is the spatial foundation — it defines where and how water moves through the basin.

## Prerequisites

- Basin boundary shapefile (from HydroCraft delineation or GRDC/HYDAT)
- DEM raster (china_dem_90m.tif for China, Copernicus GLO-30 for global)
- AVHRR land cover raster (optional, for land-use based HRUs)
- Chosen HRU strategy

## HRU Strategies

### Lumped (1 HRU)
- **When**: GR4J, HYMOD, quick assessment, basins < 500 km2
- **Advantage**: Simplest, fastest, minimal data needed
- **Disadvantage**: No spatial heterogeneity

### Elevation Bands (N HRUs)
- **When**: Mountainous basins, UBC model, elevation range > 500m
- **Advantage**: Captures orographic precipitation and temperature lapse
- **Typical N**: 3-10 bands
- **Rule of thumb**: 1 band per 300-500m of elevation range

### Land Use (N HRUs)
- **When**: Mixed land use basins, agricultural/forest/urban areas
- **Advantage**: Different ET and infiltration by land type
- **Typical N**: 3-8 classes (merge classes < 5% of area)

## Procedure

1. **Run tool**:
```bash
python build_rvh_from_shapefile.py \
    --basin_shp <path> --dem <path> \
    --landcover <path> \
    --output_dir <path> --basin_name <name> \
    --strategy elevation_bands --n_bands 5
```

2. **Verify output**:
   - Total HRU area matches basin area (within 1%)
   - All HRU elevations are within DEM range
   - Land use class names are standard Raven names

3. **Note class names** — these MUST be defined in .rvp (stage s2)

## Validation Checks

- [ ] Sum of HRU areas = basin area (within 1%)
- [ ] All HRU IDs are unique integers starting from 1
- [ ] Basin ID references valid SubBasin IDs
- [ ] Latitude/longitude are within basin bounds
- [ ] Elevation values are reasonable (not 0 or -9999)

## Common Pitfalls

- **dt_006**: HRU area sum != basin area — Raven crashes
- **dt_007**: Soil profile name in .rvh not defined in .rvp
- **dt_008**: Land use or vegetation class not defined in .rvp

Files in this skill

  • REFERENCES.md1 KB
  • coupling_skill.md1.9 KB
  • format_spec.yaml41.6 KB
  • papers.json7.7 KB
  • s0_model_selection_skill.md3 KB
  • s1_basin_hru_setup_skill.md2 KB
  • s3_forcing_conversion_skill.md3.8 KB
  • s4_process_algorithm_guide.md3.5 KB
  • s8_model_intercomparison_skill.md2.7 KB
  • s9_calibration_skill.md3.2 KB
  • validation_convention.yaml13.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…