Skip to content
Back to skills

Docs

ASecurity

> **Stage ID**: s4_parameters > **Pipeline order**: 4 of 7 > **Depends on**: s1_domain_setup, s3_decisions

  • 231 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added September 11, 2026
devopspythonbashdatabase

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

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
# Parameter Configuration -- Skill Document

> **Stage ID**: s4_parameters
> **Pipeline order**: 4 of 7
> **Depends on**: s1_domain_setup, s3_decisions

## Purpose

Set site-specific parameters that override SUMMA's default lookup table values (VEGPARM.TBL, SOILPARM.TBL, GENPARM.TBL, MPTABLE.TBL). The trial parameters file is where calibrated values are applied. Parameters not in the trial file use defaults from the lookup tables based on vegTypeIndex and soilTypeIndex from the attributes file.

## Prerequisites

- [ ] Local attributes NetCDF exists (from Stage 1)
- [ ] Decisions file configured (from Stage 3) -- some parameters are only relevant for certain decisions
- [ ] Soil properties known (from HWSD or field data) for key soil parameters

## Inputs

| Input | Type | Source | Description |
|-------|------|--------|-------------|
| attributes_nc | file | Stage 1 | SUMMA local attributes NetCDF |
| parameters | config | user/calibration | Dict of parameter_name -> value |

## Key Calibration Parameters

| Parameter | Typical Range | Units | What It Controls |
|-----------|--------------|-------|-----------------|
| k_soil | 1e-7 to 1e-3 | m/s | Saturated hydraulic conductivity |
| theta_sat | 0.3 to 0.55 | - | Porosity / saturated water content |
| theta_res | 0.01 to 0.15 | - | Residual water content |
| vGn_alpha | 0.5 to 5.0 | 1/m | van Genuchten alpha |
| vGn_n | 1.1 to 3.0 | - | van Genuchten n |
| critSoilWilting | 0.05 to 0.20 | - | Wilting point (controls ET shutoff) |
| critSoilTranspire | 0.15 to 0.40 | - | Transpiration threshold |
| heightCanopyTop | 0.1 to 40.0 | m | Canopy height (radiation, roughness) |
| rootingDepth | 0.5 to 3.0 | m | Root zone depth |
| qSurfScale | 10 to 100 | - | Surface runoff scaling |
| aquiferScaleFactor | 10 to 500 | m | Aquifer response time |
| tempCritRain | 272 to 275 | K | Rain/snow temperature threshold |
| frozenPrecipMultip | 0.8 to 1.5 | - | Snow undercatch correction |

## Procedure

### Step 1: Determine parameter sources

For each HRU, determine soil and vegetation parameters from:
1. **HWSD database**: Use `hwsd_soil_adapter.py` from HydroCraft for soil properties
2. **Literature**: Published values for similar basins
3. **Calibration**: If observed data is available (Stage 7 of HydroCraft workflow)
4. **Defaults**: SUMMA's lookup tables (acceptable for uncalibrated runs)

### Step 2: Generate trial parameters NetCDF

```bash
python tools/s4_parameters/set_trial_parameters.py \
  --attributes_nc outputs/<run>/summa_settings/attributes.nc \
  --output_nc outputs/<run>/summa_settings/trialParams.nc \
  --parameters '{"k_soil": 0.001, "theta_sat": 0.45, "tempCritRain": 273.15}'
```

**Expected result**: `trialParams.nc` created with specified parameters.

### Step 3: Copy parameter lookup tables

SUMMA needs four parameter table files in the settings directory:

```bash
cp model/summa/settings/VEGPARM.TBL outputs/<run>/summa_settings/
cp model/summa/settings/SOILPARM.TBL outputs/<run>/summa_settings/
cp model/summa/settings/GENPARM.TBL outputs/<run>/summa_settings/
cp model/summa/settings/MPTABLE.TBL outputs/<run>/summa_settings/
```

Also copy the parameter info files:

```bash
cp model/summa/settings/meta/localParamInfo.txt outputs/<run>/summa_settings/
cp model/summa/settings/meta/basinParamInfo.txt outputs/<run>/summa_settings/
```

## Expected Outputs

| Output | Path | Verification |
|--------|------|--------------|
| Trial parameters | `outputs/<run>/summa_settings/trialParams.nc` | Has hru dimension matching attributes |
| Parameter tables | `outputs/<run>/summa_settings/VEGPARM.TBL` etc. | Files exist and are non-empty |

## Validation Checks

1. **Parameter names are valid**: `ncdump -h trialParams.nc` -- all variable names should be recognized SUMMA parameters.
2. **Values in range**: Check each parameter against PARAM_RANGES in set_trial_parameters.py.
3. **HRU dimension matches**: `ncdump -h trialParams.nc | grep hru` should match attributes.nc.

## Common Pitfalls

> **PITFALL**: Using wrong parameter name (e.g., 'ksat' instead of 'k_soil').
> SUMMA silently ignores unknown parameters and uses lookup table defaults. No error, wrong results. See dt_014.

> **PITFALL**: Setting theta_res >= theta_sat.
> Residual moisture must be less than saturated moisture. SUMMA may crash or produce NaN soil moisture.

---

*This skill document is part of the hydrocraft-summa knowledge infrastructure.*
*Stage 4 of 7 | Tools used: set_trial_parameters | Related triplets: dt_014*

Files in this skill

  • REFERENCES.md1.6 KB
  • format_spec.yaml42.2 KB
  • papers.json5.8 KB
  • phase2_knowledge_classification.md4.4 KB
  • s1_domain_setup_skill.md5.2 KB
  • s2_forcing_prep_skill.md7.1 KB
  • s3_decisions_skill.md6 KB
  • s4_parameters_skill.md4.4 KB
  • s5_initial_conditions_skill.md4 KB
  • s6_execution_skill.md5.9 KB
  • s7_physics_comparison_skill.md4.7 KB
  • s8_routing_skill.md3 KB
  • validation_convention.yaml10.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.

View all in devops →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.