Skip to content
Back to skills

Docs

ASecurity

Build the river network topology NetCDF that defines every reach and its contributing catchment (HRU). This is the core spatial input for mizuRoute.

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

Works with

  • cli

Security analysis

A100/100

Pro scans all 13 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-0a7a4e90/badge)](https://www.skillsdirectory.com/skills/lzwei196-docs-0a7a4e90)

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
# Stage 1: River Network Topology Construction

## Purpose
Build the river network topology NetCDF that defines every reach and its contributing catchment (HRU). This is the core spatial input for mizuRoute.

If skipped: mizuRoute has no river network to route through.

## Prerequisites
- [ ] Basin shapefile exists
- [ ] DEM available (China 90m or Copernicus GLO-30)
- [ ] WhiteboxTools installed (in HydroCraft python_env)

## Procedure

1. **Run build_network_topology.py**:
   ```bash
   python tools/s1_network/build_network_topology.py \
     --basin_shp <shapefile> --dem <dem_path> \
     --output network_topology.nc \
     --stream_threshold 500 --min_slope 0.0001
   ```

2. **Stream threshold selection guide**:
   | Basin area | Recommended threshold | Approx. reaches |
   |-----------|----------------------|-----------------|
   | < 1,000 km2 | 100-300 | 20-100 |
   | 1,000-10,000 km2 | 300-1000 | 50-500 |
   | 10,000-100,000 km2 | 1000-5000 | 200-2000 |
   | > 100,000 km2 | 5000-20000 | 1000-10000 |

   Higher threshold = fewer, longer reaches = faster routing.

3. **Validate topology**:
   - Exactly one outlet (tosegment=0)
   - All tosegment references exist in seg_id
   - All seg_slope > min_slope
   - All seg_length > 0

## Common Pitfalls
- **Multiple outlets (dt_m015)**: DEM extraction near basin boundary creates extra outlets. Fix by connecting secondary outlets to main outlet.
- **Zero slope (dt_m007)**: Flat terrain gives slope=0. Apply minimum 0.0001 m/m.
- **Wrong width estimation (dt_m018)**: Default Leopold coefficients are for temperate. Adjust for climate zone.
- **Too many reaches**: Very low threshold creates thousands of reaches, slowing routing. Start with threshold=500 and adjust.

Files in this skill

  • REFERENCES.md1.1 KB
  • format_spec.yaml23.5 KB
  • papers.json4.2 KB
  • s0_config_skill.md2.7 KB
  • s1_network_skill.md1.7 KB
  • s2_remap_skill.md1.1 KB
  • s3_runoff_skill.md3.9 KB
  • s4_control_skill.md2 KB
  • s5_execution_skill.md1.5 KB
  • s6_comparison_skill.md2.2 KB
  • s_lake_routing_skill.md1.9 KB
  • validation_convention.yaml12.9 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…