Skip to content
Back to skills

Docs

ASecurity

Create `mhm_parameter.nml`, the global MPR transfer-function parameter file. These are process parameters, not per-cell calibrated maps, and later s9/s10 stages modify or transfer them.

  • 200 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 11, 2026
documentationpythonbash

Works with

  • cli

Security analysis

A100/100

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

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_mpr Skill

## Purpose

Create `mhm_parameter.nml`, the global MPR transfer-function parameter file. These are process parameters, not per-cell calibrated maps, and later s9/s10 stages modify or transfer them.

## Inputs

- `config.json` from s0.
- Climate preset, one of the presets accepted by `tools/s3_mpr/generate_mhm_parameters.py`; `SKILL.md` documents `humid_subtropical`, `semi_arid`, `cold_alpine`, and `tropical`.
- Completed s2 physiographic inputs for meaningful MPR evaluation at model startup.

## Outputs

- `<run_dir>/mhm_parameter.nml`.

## Procedure

Generate climate-zone-aware default MPR parameters:

```bash
python tools/s3_mpr/generate_mhm_parameters.py \
  --config runs/wangjiaba/config.json \
  --climate_zone humid_subtropical
```

Keep this file as the baseline defaults. Calibration in s9 writes the optimized parameter file; transfer in s10 copies calibrated values into a target basin's `mhm_parameter.nml`.

## Verification

Check that the file exists and that parameter rows keep the mHM lower, upper, value, FLAG, SCALING structure:

```bash
test -s runs/wangjiaba/mhm_parameter.nml
rg -n "^[[:space:]]*[0-9.+-]" runs/wangjiaba/mhm_parameter.nml | head
```

Before running mHM, scan for obvious out-of-bound edits if the file was manually changed:

```bash
python - <<'PY'
from pathlib import Path
for n,line in enumerate(Path("runs/wangjiaba/mhm_parameter.nml").read_text().splitlines(),1):
    parts=line.replace(",", " ").split()
    if len(parts) >= 3:
        try:
            lo,hi,val=map(float, parts[:3])
        except ValueError:
            continue
        assert lo <= val <= hi, (n, lo, hi, val)
print("parameter bounds OK")
PY
```

## Traps

- `dt_r08` in `../diagnostics/triplets.yaml`: mHM aborts when a parameter value is outside its lower/upper bounds.
- `dt_s06`: low interflow storage capacity can silently zero interflow.
- `dt_s03`: MPR transfer only remains valid when source and target basins use the same L0 soil, geology, and land-cover data sources.

## Example

For the humid subtropical Wangjiaba reference setup in `SKILL.md`, use:

```bash
python tools/s3_mpr/generate_mhm_parameters.py \
  --config runs/wangjiaba/config.json \
  --climate_zone humid_subtropical
```

Files in this skill

  • REFERENCES.md1.1 KB
  • format_spec.yaml37.1 KB
  • papers.json5.2 KB
  • s0_config_skill.md2.7 KB
  • s10_regionalize_skill.md2.5 KB
  • s1_domain_skill.md2.6 KB
  • s2_morphology_skill.md3.5 KB
  • s3_mpr_skill.md2.2 KB
  • s4_forcing_skill.md2.2 KB
  • s5_gauge_skill.md1.9 KB
  • s6_namelist_skill.md2.9 KB
  • s7_execute_skill.md2 KB
  • s8_postprocess_skill.md2.4 KB
  • s9_calibration_skill.md2.6 KB
  • validation_convention.yaml12.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…