{"slug":"swmm-params","title":"swmm-params","summary":"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.","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-09-03T16:10:53.057708Z","repo":{"url":"https://github.com/Zhonghao1995/agentic-swmm-workflow","stars":29,"forks":15,"license":"MIT","updatedAt":"2026-09-26T11:54:00Z"},"bodyHtml":"<hr>\n<h2>name: swmm-params\ndescription: 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.</h2>\n<h1>SWMM Params (MVP mapping layer)</h1>\n<p>Part of <a href=\"https://github.com/Zhonghao1995/agentic-swmm-workflow\">Agentic SWMM</a> — install the project first for the executable toolchain (aiswmm CLI, SWMM solver, MCP servers).</p>\n<h2>What this skill provides</h2>\n<ul>\n<li>Transparent CSV-to-JSON mapping for:\n<ul>\n<li>land use class -&gt; SWMM <code>[SUBCATCHMENTS]</code> + <code>[SUBAREAS]</code> defaults</li>\n<li>soil texture/type -&gt; SWMM <code>[INFILTRATION]</code> (Green-Ampt) defaults</li>\n</ul>\n</li>\n<li>Deterministic, auditable outputs with explicit fallback usage and unmatched-key reporting.</li>\n<li>Optional merge step that emits one builder-ready JSON artifact.</li>\n</ul>\n<h2>Scripts</h2>\n<ul>\n<li><code>scripts/landuse_to_swmm_params.py</code>\n<ul>\n<li>maps <code>subcatchment_id + landuse_class</code> to runoff/subarea parameters</li>\n</ul>\n</li>\n<li><code>scripts/soil_to_greenampt.py</code>\n<ul>\n<li>maps <code>subcatchment_id + soil_texture</code> to Green-Ampt infiltration parameters</li>\n</ul>\n</li>\n<li><code>scripts/merge_swmm_params.py</code>\n<ul>\n<li>merges outputs from the two mapping scripts into one JSON package for future <code>swmm-builder</code></li>\n</ul>\n</li>\n</ul>\n<h2>Default lookup tables</h2>\n<p>By default, scripts read bundled lookup CSVs:</p>\n<ul>\n<li><code>skills/swmm-params/references/landuse_class_to_subcatch_params.csv</code></li>\n<li><code>skills/swmm-params/references/soil_texture_to_greenampt.csv</code></li>\n</ul>\n<p>You can override lookup paths with CLI flags.</p>\n<h2>Minimal input format</h2>\n<p>Land use input CSV:</p>\n<ul>\n<li>required columns: <code>subcatchment_id</code>, <code>landuse_class</code></li>\n</ul>\n<p>Soil input CSV:</p>\n<ul>\n<li>required columns: <code>subcatchment_id</code>, <code>soil_texture</code></li>\n</ul>\n<p>Example files are provided under <code>examples/</code>.</p>\n<h2>Outputs</h2>\n<p>Each mapper writes explicit JSON containing:</p>\n<ul>\n<li><code>records</code> (row-level audit trail)</li>\n<li><code>sections</code> (SWMM-oriented lists keyed by subcatchment)</li>\n<li><code>unmatched_*</code> lists (rows that used fallback)</li>\n<li><code>counts</code> summary</li>\n</ul>\n<p>The merge script writes:</p>\n<ul>\n<li><code>sections</code> (<code>subcatchments</code>, <code>subareas</code>, <code>infiltration</code>)</li>\n<li><code>by_subcatchment</code> (combined record per subcatchment ID)</li>\n<li><code>incomplete_ids</code> (IDs missing one or more sections)</li>\n</ul>\n<h2>CLI flags</h2>\n<p>All three scripts share these optional flags:</p>\n<ul>\n<li><code>--strict</code> — fail instead of using the <code>DEFAULT</code> 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.</li>\n</ul>\n<p><code>landuse_to_swmm_params.py</code> also accepts:</p>\n<ul>\n<li><code>--subcatchment-column &lt;col&gt;</code> — override the CSV column used as the subcatchment ID (default: <code>subcatchment_id</code>).</li>\n<li><code>--landuse-column &lt;col&gt;</code> — override the CSV column used as the land use class (default: <code>landuse_class</code>).</li>\n</ul>\n<p><code>soil_to_greenampt.py</code> also accepts:</p>\n<ul>\n<li><code>--subcatchment-column &lt;col&gt;</code> — override the CSV column used as the subcatchment ID (default: <code>subcatchment_id</code>).</li>\n<li><code>--soil-column &lt;col&gt;</code> — override the CSV column used as the soil texture/type (default: <code>soil_texture</code>).</li>\n</ul>\n<h2>MCP</h2>\n<p>MCP wrapper location:</p>\n<ul>\n<li><code>mcp/swmm-params/server.js</code></li>\n</ul>\n<p>Exposed tools:</p>\n<ul>\n<li><code>map_landuse</code> (<code>inputCsvPath</code>, optional <code>lookupCsvPath</code>, <code>outputPath</code>)</li>\n<li><code>map_soil</code> (<code>inputCsvPath</code>, optional <code>lookupCsvPath</code>, <code>outputPath</code>)</li>\n<li><code>merge_params</code> (<code>landuseJsonPath</code>, <code>soilJsonPath</code>, <code>outputPath</code>)</li>\n</ul>\n<p>Quick start:</p>\n<pre><code>npm --prefix mcp/swmm-params install\nnpm --prefix mcp/swmm-params run start\n</code></pre>\n<h2>Known limitations</h2>\n<ul>\n<li>Lookup mapping is key-based only (no spatial interpolation or fuzzy matching).</li>\n<li>A fallback row is expected in lookup tables (<code>DEFAULT</code> for land use, <code>-</code> or <code>DEFAULT</code> for soil).</li>\n<li>No unit conversion or calibration logic is included here.</li>\n<li>This skill only maps parameters; it does not write a full SWMM <code>.inp</code>.</li>\n</ul>\n<h2>Example commands</h2>\n<pre><code>python3 skills/swmm-params/scripts/landuse_to_swmm_params.py \\\n  --input skills/swmm-params/examples/landuse_input.csv \\\n  --output runs/swmm-params/example_landuse.json\n</code></pre>\n<pre><code>python3 skills/swmm-params/scripts/soil_to_greenampt.py \\\n  --input skills/swmm-params/examples/soil_input.csv \\\n  --output runs/swmm-params/example_soil.json\n</code></pre>\n<pre><code>python3 skills/swmm-params/scripts/merge_swmm_params.py \\\n  --landuse-json runs/swmm-params/example_landuse.json \\\n  --soil-json runs/swmm-params/example_soil.json \\\n  --output runs/swmm-params/example_builder_params.json\n</code></pre>\n","files":[{"path":"examples/landuse_input.csv","sizeBytes":96,"isText":false},{"path":"examples/soil_input.csv","sizeBytes":74,"isText":false},{"path":"references/landuse_class_to_subcatch_params.csv","sizeBytes":1313,"isText":false},{"path":"references/soil_texture_to_greenampt.csv","sizeBytes":363,"isText":false},{"path":"scripts/landuse_to_swmm_params.py","sizeBytes":7627,"isText":true},{"path":"scripts/merge_swmm_params.py","sizeBytes":5320,"isText":true},{"path":"scripts/soil_to_greenampt.py","sizeBytes":6562,"isText":true},{"path":"SKILL.md","sizeBytes":4195,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-09-03T16:11:21.621397Z","sha256":"A8D57C1B5F7AC07631686067EAFEF4DED64369E1C40C8BD3E5956D4A4FE51DD3","sizeBytes":9208},"review":null,"source":{"repositoryUrl":"https://github.com/Zhonghao1995/agentic-swmm-workflow","path":"skills/swmm-params","license":"MIT","commit":"a64d9501a1205301e97dd11bf5c6a80d08f61d87","subtreeSha":"3600F4F8AF17DECD56224A7BAE8217E3A5815CA2FFF5927936A7CDD69CABA18C","lastSyncedAt":"2026-09-30T15:23:16.271464Z"},"reviewedAt":"2026-09-03T16:14:48.016675Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/Zhonghao1995/agentic-swmm-workflow/tree/main/skills/swmm-params"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install zhonghao1995-agentic-swmm-workflow@llmmart"},{"target":"git","command":"git clone https://github.com/Zhonghao1995/agentic-swmm-workflow.git"}]}