Skip to content
Back to skills

Docs

ASecurity

Configure the ParFlow solver (Richards equation, Newton-Krylov, preconditioner) and generate the run script.

  • 200 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 11, 2026
code-qualitygo

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

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
# S7: Solver Configuration — Skill Document

## Purpose

Configure the ParFlow solver (Richards equation, Newton-Krylov, preconditioner) and generate the run script.

## Key Solver Parameters

| Parameter | Default | Range | Effect |
|-----------|---------|-------|--------|
| TimeStep.Value | 1.0 hr | 0.01-24 hr | Larger = faster but may not converge |
| Nonlinear.MaxIter | 300 | 100-5000 | Max Newton iterations per timestep |
| Nonlinear.ResidualTol | 1e-6 | 1e-8 - 1e-4 | Convergence criterion |
| Linear.Preconditioner | PFMG | PFMG/MGSemi | PFMG for most cases, MGSemi for extreme K contrasts |
| OverlandKinematic | 1 | 0/1 | Kinematic wave (faster, less accurate for flat) |
| OverlandFlowDiffusive | 0 | 0/1 | Diffusive wave (more accurate, slower) |
| TerrainFollowingGrid | True | True/False | Follow topography (essential for sloped terrain) |

## Procedure

1. **Run** `generate_parflow_script.py` with domain JSON, run name, and dates.
2. **Review** generated script: check MPI topology, timestep, CLM settings.
3. **Verify** P*Q*R matches planned number of MPI processes.
4. **Verify** NX%P==0, NY%Q==0, NZ%R==0 (dt_pf_023).

## Overland Flow Choice

- **Kinematic** (default): Good for moderate-to-steep terrain. Faster. May produce unrealistic ponding in flat areas.
- **Diffusive**: Better for flat terrain and flood applications. Slower. More stable for backwater effects.

## Common Pitfalls

- **Timestep too large** (dt_pf_020): Sharp wetting fronts need small dt (0.1-0.5 hr).
- **Bad initial condition** (dt_pf_021): >100 iterations per step = poor IC.
- **PFMG crash** (dt_pf_022): K contrast > 1e6 needs MGSemi or capped K.
- **MPI mismatch** (dt_pf_023): nprocs MUST equal P*Q*R exactly.

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…