← 返回 Skills 市场
zhonghao1995

Swmm Params

作者 Zhonghao Zhang · GitHub ↗ · v0.7.3 · MIT-0
cross-platform ✓ 安全检测通过
38
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install swmm-params
功能描述
Deterministic mapping from land use and soil texture to SWMM runoff/subarea and Green-Ampt infiltration parameters. Use when generating first-pass subcatchme...
使用说明 (SKILL.md)

SWMM Params (MVP mapping layer)

Part of Agentic SWMM — 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 \x3Ccol> — override the CSV column used as the subcatchment ID (default: subcatchment_id).
  • --landuse-column \x3Ccol> — override the CSV column used as the land use class (default: landuse_class).

soil_to_greenampt.py also accepts:

  • --subcatchment-column \x3Ccol> — override the CSV column used as the subcatchment ID (default: subcatchment_id).
  • --soil-column \x3Ccol> — 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

MVP 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
安全使用建议
Before installing, note that the scripts can write to output paths you provide and will process local modeling CSVs. Review generated SWMM parameters before using them for engineering decisions, especially because the skill documents fallback defaults and no calibration logic.
能力评估
Purpose & Capability
The stated purpose is deterministic mapping from land-use and soil-texture CSV data into SWMM runoff/subarea and Green-Ampt infiltration parameters, and the included Python scripts and lookup tables directly support that purpose.
Instruction Scope
Instructions are scoped to local CSV processing, optional strict validation, and explicit example commands. I did not find prompt-injection text, hidden role changes, credential requests, or unrelated agent behavior.
Install Mechanism
The artifact includes executable Python scripts and user-directed example commands. It also references an external Agentic SWMM project and MCP quick-start commands, but there is no automatic installer or hidden package execution in this artifact.
Credentials
The scripts use standard-library CSV/JSON/path handling, read user-specified input and lookup files, and write output JSON paths chosen by the user. No network access, credential use, or broad local indexing was found.
Persistence & Privilege
No persistence, background service, privilege escalation, destructive file operations, or credential/session handling was found. File writes are limited to explicit output files requested by the user.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install swmm-params
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /swmm-params 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.7.3
Add project link back to the Agentic SWMM repository (install the project for the executable toolchain).
v0.7.2
Initial ClawHub release, aligned with agentic-swmm-workflow v0.7.2.
元数据
Slug swmm-params
版本 0.7.3
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Swmm Params 是什么?

Deterministic mapping from land use and soil texture to SWMM runoff/subarea and Green-Ampt infiltration parameters. Use when generating first-pass subcatchme... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 38 次。

如何安装 Swmm Params?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install swmm-params」即可一键安装,无需额外配置。

Swmm Params 是免费的吗?

是的,Swmm Params 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Swmm Params 支持哪些平台?

Swmm Params 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Swmm Params?

由 Zhonghao Zhang(@zhonghao1995)开发并维护,当前版本 v0.7.3。

💬 留言讨论