SWMM Plot for Openclaw

A specialized plotting skill for EPA-SWMM simulation models that generates publication-grade, paired rainfall-runoff time-series figures.

zhonghao1995
v0.7.3
Jun 12, 2026
0
486
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install swmm-plot

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install swmm-plot using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is SWMM Plot?

The SWMM Plot skill is a powerful extension designed for agentic workflows to produce publication-grade hydrology and hydraulics figures. Built as part of the Openclaw Skills ecosystem, it automatically parses EPA-SWMM input (.inp) and binary output (.out) files to render paired, dual-axis charts. These charts feature an inverted rainfall depth plot on the top axis and hydraulic flow or depth series on the bottom axis.

Adhering to strict academic standards, the generator outputs high-resolution PNGs using SI units, Arial typography, inward-pointing tick marks, and clean formatting with no auto-generated titles. This makes it an invaluable asset for researchers, civil engineers, and environmental data analysts automating their reporting pipelines.

SWMM Plot Use Cases

  • Hydrology Report Generation: Automate the creation of high-resolution, peer-review-ready storm event figures directly from model runs.
  • Peak Flow Analysis: Inspect and plot peak junction flows or conduit velocities during heavy rain events to diagnose system bottlenecks.
  • System Calibration: Visually compare rainfall inputs against simulated outfall discharges to tune catchment parameters.
  • Network Mapping: Render the spatial layout of subcatchments, conduits, and nodes to understand model structure.

How SWMM Plot Works

  1. Inspect Simulation Files: The agent runs inspect_plot_options to query a run directory or SWMM files, returning valid rainfall timeseries names, nodes, links, and available attributes.
  2. User Consultation: The agent presents high-peak-flow candidates and asks the user to select the specific entity (node/link), attribute, and simulation time window.
  3. Execute Simulation: If not already done, the SWMM model is run to produce the .inp file and .out binary.
  4. Generate Figure: The agent invokes plot_run (which interfaces with the underlying MCP tool plot_rain_runoff_si), applying publication-ready styling, inverting the rainfall axis, and optionally cropping to a focusDay or custom sub-day window.
  5. Saves Output: The resulting high-resolution (default 300 DPI) PNG is saved to the specified directory.

SWMM Plot Setup

To use this tool within the Openclaw Skills registry, you must first install the Agentic SWMM toolchain.

# Install the agentic-swmm package
pip install agentic-swmm

# Configure the MCP server for SWMM plotting
# The MCP server is located at mcp/swmm-plot/server.js

Ensure that the swmmtoolbox and required Python packages are available in your environment to parse SWMM binary outputs.

SWMM Plot Data Schema & Taxonomy

Expected Inputs and Parameters

Parameter Type Required Description
run_dir String Yes Path to the directory containing the SWMM simulation run files.
node / link String Yes (one of) The specific ID of the junction/outfall or conduit to plot.
rain_ts String Yes The exact name of the rainfall TIMESERIES in the .inp file.
node_attr String No The target attribute (e.g., Total_inflow, Depth_above_invert). Default is Total_inflow.
focus_day String No Date in YYYY-MM-DD format to crop the time series to a single day.
window_start / window_end String No Sub-day window boundary in HH:MM format (requires focus_day).

Outputs Generated

  • Rainfall-Runoff Figure: A dual-axis PNG image (e.g., outfall_flow.png) featuring inverted rainfall depth (top) and flow rate/depth (bottom).
  • Network Layout Map: A spatial PNG representation of the SWMM network model structure.

SWMM Plot Advanced Features

  • Event Window Zooming: Focus on critical windows by specifying a focus_day and sub-day time range (window_start and window_end) to crop the figure axes automatically.
  • Flexible Rain Types: Supports plotting rainfall as intensity (intensity_mm_per_hr), depth per timestep (depth_mm_per_dt), or cumulative depth (cumulative_depth_mm).
  • Automated Network Mapping: Quick generation of topological network layouts with options to toggle subcatchments or model vertices.
  • Direct MCP Routing: Seamless integration with Model Context Protocol (MCP) clients, allowing LLMs to programmatically render analysis artifacts without manual user intervention.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*