Skip to content
Back to skills

Docs

ASecurity

Assign spatially distributed hydraulic properties (permeability, porosity, van Genuchten parameters, Manning's n) to every grid cell. These control how water moves through the subsurface and over the surface.

  • 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-771a7621/badge)](https://www.skillsdirectory.com/skills/lzwei196-docs-771a7621)

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
# S2: Subsurface Properties — Skill Document

## Purpose

Assign spatially distributed hydraulic properties (permeability, porosity, van Genuchten parameters, Manning's n) to every grid cell. These control how water moves through the subsurface and over the surface.

**If skipped**: ParFlow uses default uniform properties, which are unrealistic for heterogeneous basins.

## Prerequisites

- Domain definition (s1 complete)
- Domain mask (s1 complete)
- HWSD global raster (`data/soil/HWSD_RASTER/hwsd.bil`)

## CRITICAL UNIT TABLE

| Property | ParFlow Unit | MODFLOW Unit | SI Unit | Conversion Factor |
|----------|-------------|-------------|---------|-------------------|
| Permeability K | **m/hr** | m/day | m/s | K_m_hr = K_m_day / 24 = K_m_s * 3600 |
| van Genuchten alpha | **1/m** | n/a | 1/cm | alpha_1m = alpha_1cm * 100 |
| Pressure head | **m water** | m water | Pa | h_m = P_Pa / 9810 |
| Specific storage | **1/m** | 1/m | 1/m | Same |
| Porosity | dimensionless | dimensionless | dimensionless | Same |
| Manning's n | s/m^(1/3) | n/a | s/m^(1/3) | Same |

**THE #1 SILENT ERROR in ParFlow is wrong K units (dt_pf_001).** Always verify.

## Procedure

1. **Run** `build_subsurface_properties.py` with domain_json and mask_npy.
   - The tool reads HWSD raster, classifies soil texture, applies Rosetta pedotransfer.
   - Output: permeability_x/y/z.npy, porosity.npy, vangenuchten_alpha/n.npy, etc.
   - **Verify K range**: Typical 1e-6 (clay) to 0.03 (sand) m/hr.
   - **Verify alpha range**: Typical 0.5 (clay) to 15 (sand) 1/m.

2. **Set K anisotropy** (Kz/Kx ratio):
   - Default 0.1 (layered sediments: vertical flow 10x slower than horizontal).
   - Isotropic: 1.0 (fractured rock, uniform sand).
   - Very low: 0.01 (strongly layered clays).

3. **Run** `build_mannings.py` for overland flow roughness.
   - Output: mannings_n.npy.
   - **Verify range**: 0.01 (urban) to 0.4 (dense forest).
   - **CRITICAL**: Manning's n < 0.01 causes CFL instability. Tool enforces minimum.

## Expected Outputs

| Output | Verification |
|--------|--------------|
| permeability_x/y/z.npy | Values 1e-6 to 0.1 m/hr |
| porosity.npy | Values 0.2 to 0.6 |
| vangenuchten_alpha.npy | Values 0.5 to 15 (1/m, NOT 1/cm) |
| vangenuchten_n.npy | Values 1.05 to 4.0 |
| mannings_n.npy | Values 0.01 to 0.4 |

## Common Pitfalls

- **K units** (dt_pf_001): m/day from MODFLOW literature gives 24x too much flow
- **Alpha units** (dt_pf_005): 1/cm from Rosetta raw output gives 100x more retentive soil
- **PFMG failure** (dt_pf_022): K contrast > 6 orders of magnitude causes solver crash
- **Zero Manning's n**: Causes division by zero in overland flow equation

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…