Skip to content
Back to skills

Docs

ASecurity

Run the actual mHM binary for the prepared basin. This stage must execute `KISSPATH_BINARIES/mhm/mhm` or the binary path in the run config; do not replace it with a simplified formula.

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

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

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

## Purpose

Run the actual mHM binary for the prepared basin. This stage must execute `KISSPATH_BINARIES/mhm/mhm` or the binary path in the run config; do not replace it with a simplified formula.

## Inputs

- Complete run directory from s0-s6.
- mHM binary path.
- Timeout in seconds.
- Morphology, forcing, gauge, latlon, namelist, and parameter files already present.

## Outputs

- mHM logs and model outputs under the run directory.
- `output_b1` NetCDF files such as `mHM_Fluxes_States.nc` and `mRM_Fluxes_States.nc`.
- Gauge discharge output such as `daily_discharge.out` when configured.

## Procedure

Run preflight, then execute through the stage wrapper:

```bash
python preflight_check.py

python tools/s7_execute/run_mhm.py \
  --run_dir runs/wangjiaba \
  --mhm_binary KISSPATH_BINARIES/mhm/mhm \
  --timeout 3600
```

If the wrapper reports a model error, check `../diagnostics/triplets.yaml` before changing tools or inputs.

## Verification

Confirm that mHM finished and wrote expected output files:

```bash
find runs/wangjiaba -maxdepth 3 -type f | rg "mHM_Fluxes_States|mRM_Fluxes_States|daily_discharge|ConfigFile"
rg -n "mHM: Finished|Finished|ERROR|WARNING|L2_variable_init|POSITION_NML" runs/wangjiaba -g "*.log" -g "*.out" || true
```

If the process exits cleanly during calibration, also verify calibration artifacts in s9; Fortran `stop` can return status 0.

## Traps

- `dt_r09` in `../diagnostics/triplets.yaml`: undefined class ids or nodata leakage can produce NaN output.
- `dt_r10`: excessive L0 cell count can make runtime far slower than expected.
- `dt_v001`: near-zero gauge discharge with nonzero gridded runoff usually means a coordinate-system flag problem.
- `dt_v002`: nonzero routed field with zero gauge column can mean the gauge is on the wrong L11 cell.
- `dt_r13`: a flow-direction cycle can make startup hang after `Initialize domains ...`.

## Example

After s6 writes namelists for `runs/wangjiaba`, execute:

```bash
python tools/s7_execute/run_mhm.py --run_dir runs/wangjiaba --timeout 3600
```

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.

View all in testing →

Comments

Loading comments…

Newsletter

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