Skip to content
Automation
Skill

/swmm-params

Deterministic mapping from land use and soil texture to SWMM runoff/subarea and Green-Ampt infiltration parameters. Use when generating first-pass subcatchment parameter tables for swmm-builder.

From plugin
agentic-swmm-workflow
3117 skills

Claude Code

$ npx -y skills add Zhonghao1995/agentic-swmm-workflow --skill swmm-params --agent claude-code

SKILL.md

swmm-params.SKILL.md
name: swmm-params
description: Deterministic mapping from land use and soil texture to SWMM runoff/subarea and Green-Ampt infiltration parameters. Use when generating first-pass subcatchment parameter tables for swmm-builder.

SWMM Params (MVP mapping layer)

Part of [Agentic SWMM](https://github.com/Zhonghao1995/agentic-swmm-workflow) — install the project first for the executable toolchain (aiswmm CLI, SWMM solver, MCP servers).

What this skill provides

  • Transparent CSV-to-JSON mapping for:
  • land use class -> SWMM `[SUBCATCHMENTS]` + `[SUBAREAS]` defaults
  • soil texture/type -> SWMM `[INFILTRATION]` (Green-Ampt) defaults
  • Deterministic, auditable outputs with explicit fallback usage and unmatched-key reporting.
  • Optional merge step that emits one builder-ready JSON artifact.

Scripts

  • `scripts/landuse_to_swmm_params.py`
  • maps `subcatchment_id + landuse_class` to runoff/subarea parameters
  • `scripts/soil_to_greenampt.py`
  • maps `subcatchment_id + soil_texture` to Green-Ampt infiltration parameters
  • `scripts/merge_swmm_params.py`
  • merges outputs from the two mapping scripts into one JSON package for future `swmm-builder`

Default lookup tables

By default, scripts read bundled lookup CSVs:

  • `skills/swmm-params/references/landuse_class_to_subcatch_params.csv`
  • `skills/swmm-params/references/soil_texture_to_greenampt.csv`

You can override lookup paths with CLI flags.

Minimal input format

Land use input CSV:

  • required columns: `subcatchment_id`, `landuse_class`

Soil input CSV:

  • required columns: `subcatchment_id`, `soil_texture`

Example files are provided under `examples/`.

Outputs

Each mapper writes explicit JSON containing:

  • `records` (row-level audit trail)
  • `sections` (SWMM-oriented lists keyed by subcatchment)
  • `unmatched_*` lists (rows that used fallback)
  • `counts` summary

The merge script writes:

  • `sections` (`subcatchments`, `subareas`, `infiltration`)
  • `by_subcatchment` (combined record per subcatchment ID)
  • `incomplete_ids` (IDs missing one or more sections)

CLI flags

All three scripts share these optional flags:

  • `--strict` — fail instead of using the `DEFAULT` fallback row when an input key is missing from the lookup table. Useful for auditable production runs where silent fallback would mask a data gap.

`landuse_to_swmm_params.py` also accepts:

  • `--subcatchment-column <col>` — override the CSV column used as the subcatchment ID (default: `subcatchment_id`).
  • `--landuse-column <col>` — override the CSV column used as the land use class (default: `landuse_class`).

`soil_to_greenampt.py` also accepts:

  • `--subcatchment-column <col>` — override the CSV column used as the subcatchment ID (default: `subcatchment_id`).
  • `--soil-column <col>` — override the CSV column used as the soil texture/type (default: `soil_texture`).

MCP

MCP wrapper location:

  • `mcp/swmm-params/server.js`

Exposed tools:

  • `map_landuse` (`inputCsvPath`, optional `lookupCsvPath`, `outputPath`)
  • `map_soil` (`inputCsvPath`, optional `lookupCsvPath`, `outputPath`)
  • `merge_params` (`landuseJsonPath`, `soilJsonPath`, `outputPath`)

Quick start:

npm --prefix mcp/swmm-params install
npm --prefix mcp/swmm-params run start

Known limitations

  • Lookup mapping is key-based only (no spatial interpolation or fuzzy matching).
  • A fallback row is expected in lookup tables (`DEFAULT` for land use, `-` or `DEFAULT` for soil).
  • No unit conversion or calibration logic is included here.
  • This skill only maps parameters; it does not write a full SWMM `.inp`.

Example commands

python3 skills/swmm-params/scripts/landuse_to_swmm_params.py \
  --input skills/swmm-params/examples/landuse_input.csv \
  --output runs/swmm-params/example_landuse.json
python3 skills/swmm-params/scripts/soil_to_greenampt.py \
  --input skills/swmm-params/examples/soil_input.csv \
  --output runs/swmm-params/example_soil.json
python3 skills/swmm-params/scripts/merge_swmm_params.py \
  --landuse-json runs/swmm-params/example_landuse.json \
  --soil-json runs/swmm-params/example_soil.json \
  --output runs/swmm-params/example_builder_params.json
Read more
@zhonghao1995
Ships withagentic-swmm-workflow

Pre-1.0 · stable v0.9.5 · pip install aiswmm==0.9.5 · CHANGELOG

Stars on GitHub

Momentum

stars in total
31
Star history of Zhonghao1995/agentic-swmm-workflow on GitHub, a chart by star-history.com

Other skills on agentic-swmm-workflow.

More skills from other plugins.

agent-builder

agent-builder

Load immediately after an Agent intent, before the first agent_builder_* call. Governs how you create, configure, test, and…

n8n11d209k
@n8n-io@n8n-ioInstall Skill
browser-use

browser-use

Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also covers…

@browser-use@browser-useInstall Skill
agent-browser

agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling…

@vercel-labs-2@vercel-labs-2Install Skill
add-anydoc

add-anydoc

Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when…

@nanocoai@nanocoaiInstall Skill

Questions about swmm-params.

Which coding agents can use swmm-params?
swmm-params installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.