SWMM

Runs EPA SWMM 5.2 urban stormwater simulations through a staged tool pipeline with diagnostics.

155|6|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/lzwei196/KISS-Knowledge-Infrastructure-for-Scientific-Simulation --skill swmm-lzwei196
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: SWMM
Source: https://github.com/lzwei196/KISS-Knowledge-Infrastructure-for-Scientific-Simulation/tree/main/models/SWMM
Command: npx skills add https://github.com/lzwei196/KISS-Knowledge-Infrastructure-for-Scientific-Simulation --skill swmm-lzwei196

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyswmm, swmm-toolkit, swmm-api, and includes scripts (resource) and references (resource) components.

What problem does it solve? Operating EPA SWMM 5.2 correctly requires deep operational knowledge: INP file section formats, unit-system consistency, rainfall encoding, timestep stability, and error recovery. This Skill packages that expertise so an AI agent can build, run, validate, and couple SWMM models without silent scientific errors. ## Core Features & Use Cases - Seven-stage pipeline: Subcatchment delineation, drainage network construction, rainfall forcing, LID setup, INP assembly, execution with continuity checks, and VIC/CaMa-Flood model coupling via 27 executable tools. - Diagnostic recovery: 20+ symptom-diagnosis-remedy triplets in diagnostics/triplets.yaml map common failures (continuity errors, unit mismatches, rainfall format traps) to validated fixes. - Use Case: An agent delineates urban subcatchments from GIS data, imports a pipe network, generates a design storm, assembles and validates the INP file, runs the simulation via pyswmm, and checks continuity errors before extracting outfall hydrographs. ## Quick Start Run python preflight_check.py in this directory, then ask the agent to build and simulate a SWMM drainage model from your subcatchment and network data.

Frequently Asked Questions about SWMM

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run an EPA SWMM simulation from Python?

Install pyswmm with pip, assemble a valid INP file using the stage S5 tools, then run it through the run_swmm tool which uses pyswmm with a CLI fallback. Check continuity errors afterward with check_continuity_errors before trusting results.

How to couple SWMM with VIC and CaMa-Flood models?

Use the S7 coupling tools: convert VIC runoff (mm/day) to SWMM node inflows (m3/s), reuse VIC forcing as SWMM rainfall, and convert CaMa-Flood river stage to SWMM outfall boundary conditions. SWMM outfall discharge can feed back to CaMa-Flood as lateral inflow.

Why are my SWMM flow results wrong by orders of magnitude?

The FLOW_UNITS option silently sets the unit system for all inputs and outputs. If FLOW_UNITS=CMS but pipe diameters are entered in millimeters, SWMM treats them as meters with no warning. Verify every dimensional input matches the selected unit system.

Does SWMM support green infrastructure and LID modeling?

Yes, the S4 stage tools create and assign seven LID control types including bioretention, green roofs, permeable pavement, and rain barrels. Parameter validation enforces constraints like wilting point below field capacity below porosity.

What causes high routing continuity errors in SWMM?

A routing timestep too large for dynamic wave routing is the most common cause. Reduce ROUTING_STEP and WET_STEP so the Courant condition is satisfied for your shortest conduit, then rerun and verify errors drop below 5%.

What are the limitations of this SWMM knowledge infrastructure?

Water quality tools (pollutant buildup/washoff, treatment), real-time control rules, groundwater aquifers, and hydraulic structures like pumps and weirs are not yet implemented. Coverage is about 69% of SWMM 5.2 capabilities per the capability inventory.