Skip to content
Back to skills

Docs

ASecurity

Compute slope_x and slope_y from DEM for overland flow routing. ParFlow uses these slopes with Manning's equation to route surface water.

  • 200 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 11, 2026
testing

Security analysis

A100/100

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

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
# S3: Topography and Slopes — Skill Document

## Purpose

Compute slope_x and slope_y from DEM for overland flow routing. ParFlow uses these slopes with Manning's equation to route surface water.

## Prerequisites

- Domain definition (s1)
- DEM raster
- Surface mask (s1)

## Procedure

1. **Run** `build_slopes.py` with DEM and domain definition.
2. **Verify** sinks were filled (check `sinks_filled` count).
3. **Verify** minimum slope was applied to flat cells.
4. **Check** slope sign convention: positive slope in positive coordinate direction.

## Critical Knowledge

- **Unfilled sinks** (dt_pf_010): Create extreme pressure gradients -> NaN crash. Always fill.
- **Slope signs** (dt_pf_011): Inverted signs make water flow uphill (silent error).
- **Zero slopes** (dt_pf_012): All-zero slopes = no drainage. Set min_slope ~0.0001.
- **Smoothing**: Noisy slopes from high-res DEMs can cause CFL instability. Use --smooth 3 for 30m DEMs.

## Validation

1. Mean |slope| > 0 for active cells
2. No NaN or Inf in slope arrays
3. Elevation range matches DEM (no resampling artifacts)

Files in this skill

  • REFERENCES.md1.7 KB
  • format_spec.yaml39.8 KB
  • papers.json5.4 KB
  • s1_domain_skill.md3 KB
  • s2_subsurface_skill.md2.6 KB
  • s3_topography_skill.md1.1 KB
  • s4_clm_skill.md1 KB
  • s5_forcing_skill.md1.3 KB
  • s6_ic_bc_skill.md1.8 KB
  • s7_solver_skill.md1.7 KB
  • s8_execution_skill.md1.5 KB
  • s9_output_skill.md1.8 KB
  • validation_convention.yaml20.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…