Back to skills
SKILL.md
Docs
ASecurityConfigure 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
Security analysis
100/100Pro scans all 14 files and shows the line behind each finding
npx -y skills add lzwei196/KISS---Knowledge-Infrastructure-for-Scientific-Simulation --skill docs --agent claude-codeAre you the author of Docs?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/lzwei196-docs-f9da1fa8)# 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.md
- format_spec.yaml
- papers.json
- s1_domain_skill.md
- s2_subsurface_skill.md
- s3_topography_skill.md
- s4_clm_skill.md
- s5_forcing_skill.md
- s6_ic_bc_skill.md
- s7_solver_skill.md
- s8_execution_skill.md
- s9_output_skill.md
- validation_convention.yaml
Attribution
Comments
Loading comments…