Fig. 1 · Site, pond and storm
The targets
Generic forms of common local rules, not any jurisdiction's code.
Run log
Kept schemes
Fig. 2 · A continuous year
Carpet: every hour of the year
Each column is a day and each row an hour; colour is the hourly maximum. Flows and rain use a log scale. The rain source is set in console channel 02.
Fig. 3 · Flow-duration, before and after
Fig. 4 · Design-space survey
12 × 12 designs, solved in the engine workersStorm metrics solve one design storm per cell. Year metrics solve a full year per cell and take a minute or more. Everything not on the two axes stays as it is on the desk.
Two engines, one design
Runs the four storms in both engines and compares eight quantities per storm from the .out files.
Divergence register
ED-1 · alpha.4 Green-Ampt never saturates once light rain fills the upper zone
Engine: OpenSWMM 6.0.0-alpha.4 built from swmm6_rel at 137e65e4. Found on 23 Oct 2026 while building this desk.
Symptom. With Green-Ampt infiltration, alpha.4 returns no pervious runoff whenever the storm opens with rain lighter than Ks. EPA SWMM 5.2.4 returns the expected runoff. Curve Number and Horton agree between the two engines.
Measured. 2-yr Type II storm, 4.0 in, loam (Ks 0.13 in/hr): pre-development peak 0.99 cfs on alpha.4 against 19.54 cfs on 5.2.4; pervious runoff 0 in against 1.7 in. Both runs report continuity errors under 0.1%, so a continuity check alone would pass this.
Cause. src/engine/hydrology/Infiltration.cpp, lines 311–312 at 137e65e4:
double Fs = (c1 > 0.0 && ia > state.Ks)
? state.Ks * c1 / (ia - state.Ks) : 1.0e10;
While rain stays lighter than Ks, the upper zone fills and the moisture deficit is reset to (Fumax − Fu)/Lu, which reaches 0. Then c1 = (S + depth)·IMD = 0. EPA's infil.c (line 748, same commit) has no guard:
Fs = ks * (infil->S + depth) * infil->IMD / (ia - ks);
so Fs = 0, the surface counts as saturated, and infiltration falls to Ks. The alpha.4 guard sends Fs to 10¹⁰ instead, the surface never saturates, and every drop on pervious ground soaks in.
Status. Today's swmm6_rel HEAD (c7cf8844, 23 Oct 2026) computes Fs = ks * (s.S + depth) * s.IMD / (ia - ks), as EPA does. The fix is upstream; this wasm6 build predates it. A rebuild from a current commit should clear ED-1.
Ks sweep, same storm and soil suction. Measured in Node on the model this page builds (2-yr storm, 30 s kinematic routing). The engines agree while the soil cannot fill its upper zone before the storm turns heavy, and split once it can.
ED-2 · alpha.4's report lists both outfalls as flooded nodes
Engine: OpenSWMM 6.0.0-alpha.4 built from swmm6_rel at 137e65e4. Found on 24 Oct 2026 while building the rail.
Symptom. On the 10-yr storm at the opening design, alpha.4's Node Flooding Summary lists OF_POST as flooded for 47.48 h with 1.300 ×10⁶ gal, which is the outfall's entire discharge, and lists OF_PRE the same way (27.51 h, 0.632 ×10⁶ gal). Its Highest Continuity Errors block names both outfalls at −50%. The same report's routing table says Flooding Loss 0.000, and the .out flooding series is zero at every node. EPA SWMM 5.2.4 prints "No nodes were flooded."
Cause. The statistics update in src/engine/core/SWMMEngine.cpp counted any node with overflow as flooded, outfalls included. As it read before commit ba77d7e8:
if (ctx_.nodes.overflow[uj] > 0.0) {
ctx_.nodes.stat_time_flooded[uj] += dt_routing;
ctx_.nodes.stat_vol_flooded[uj] += ctx_.nodes.overflow[uj] * dt_routing;
}
Status. Fixed upstream by Caleb Buahin in ba77d7e8 (3 Oct 2026, "fix(report): node volume totals, surcharge and continuity statistics as legacy keeps them"), which also rewrote the per-node volume totals behind the continuity block. Today's swmm6_rel (f4e6374c, 24 Oct 2026) reads, as EPA's stats_updateNodeStats does:
if (ctx_.nodes.type[uj] != NodeType::OUTFALL) {
if (ctx_.nodes.volume[uj] > ctx_.nodes.full_volume[uj] ||
ctx_.nodes.overflow[uj] > 0.0) {
ctx_.nodes.stat_time_flooded[uj] += dt_routing;
ctx_.nodes.stat_vol_flooded[uj] += ctx_.nodes.overflow[uj] * dt_routing;
}
Effect on this desk. None on any result. The desk reads flooding from the .out series, and the rail reads the two system continuity tables, not the node tables. The defect is in report text only, and a rebuild from a current commit clears it.
What this comparison does not show
- Agreement on this one-site model, with these options, says nothing about networks with loops, surcharge, pumps or controls.
- The comparison reads the .out file at a one-minute report step. Peaks between report steps are not seen by either side.
- Kinematic wave is the default. Dynamic wave is selectable, but the measured timings and agreement figures quoted on this page are for kinematic wave unless they say otherwise.
- Two builds agreeing is not the same as either being right. The tests here find differences; they do not certify physics.
About SWMM6 Shoebox
Shoebox is a one-site stormwater desk: a catchment, a detention pond with a two-stage outlet, and a pipe to an outfall, solved by real SWMM engines compiled to WebAssembly. It takes its shape from Samuel Letellier-Duchesne's Shoebox, which runs EnergyPlus 26.1 in a browser tab, and asks the same question for SWMM6: what if the modeling tool came to you?
Every number on the desk comes from an engine run made in this tab. The design storms, the soil tables and the targets are inputs, written into a SWMM .inp file; the engines return .rpt and .out files; the page reads them. Nothing is sent to a server.
AI use
This app was built with Claude, Anthropic's AI model (Claude Opus 5.5), in a single Claude session on 23 October 2026, at the request and under the direction of Robert (Bob) Dickinson. He chose the project, set the scope (alpha.4 plus 5.2.4, the console, a standards board, carpet and duration charts, and the 144-run survey with a flooding mask), and supplied the two engine builds through his BatchSWMMRunner repository. Responsibility for the work is his.
What Claude did. It wrote all of this page's code, text and figures: the .inp writer, the TR-55 storm generator, the synthetic year, the .out reader, the standards, the worker pool, the survey, the GIF encoder and the Doc essay. It chose the opening design by a grid search, found the alpha.4 Green-Ampt defect (ED-1) while checking the engines against each other, traced it to two lines of source, and wrote the register entry. It did not build or modify either engine; both are used exactly as committed, and their SHA-256 hashes are checked before they run.
Version 1.1, 24 October 2026. Bob asked for real rain stations and a water-balance rail. Claude chose the 66 gauges and the years kept, read NCEI's Hourly Precipitation Data files and NOAA's Atlas 14 point tables through the built-in browser in Bob's Claude desktop app (its own workspace cannot reach NOAA's servers), packed them into this page with per-year checksums, and wrote the station panel, the Atlas 14 alternating-block storm, the PFDS and HPD file loaders, the rail and its companion run, the ED-2 entry, and three new essay sections. No rainfall value was altered.
How the results were checked. The checks are engine runs, not the AI's judgment. Both engines were run in Node on the same models used here; with Curve Number infiltration they agree to within 0.3% on peaks, pond depth and flood volume, and their year-long outflow series differ by at most 0.0003 cfs. The page was exercised in a headless browser. No person had reviewed the code, the essay or the defect diagnosis when this version was published.
Sources and credits
- OpenSWMM 6.0.0-alpha.4 engine, HydroCouple/openswmm.engine, Apache License 2.0. Built to WebAssembly for dickinsonre/BatchSWMMRunner with Emscripten 3.1.51 (musl and Emscripten runtime notices apply).
- EPA Storm Water Management Model 5.2 (Build 5.2.4), U.S. Environmental Protection Agency, public domain.
- NRCS (1986), Urban Hydrology for Small Watersheds, TR-55: 24-hour rainfall distributions and curve numbers.
- Rawls, Brakensiek and Miller (1983), Green-Ampt parameters by soil texture, as tabulated in the EPA SWMM 5 User's Manual.
- Samuel Letellier-Duchesne, Shoebox and idfkit (shoebox.idfkit.com), the idea this desk borrows. This page is independent of that project.
- Hourly Precipitation Data (HPD) Network, Version 2.0, NOAA National Centers for Environmental Information, accessed 24 Oct 2026: 2023–2025 hourly records for 66 gauges.
- NOAA Atlas 14, Precipitation-Frequency Atlas of the United States, Volumes 1, 2, 6, 8, 9, 10, 11 and 12, via the Precipitation Frequency Data Server, accessed 24 Oct 2026: partial-duration depths at 63 gauges.
- Chow, V.T., Maidment, D.R. and Mays, L.W. (1988), Applied Hydrology, McGraw-Hill: the alternating-block method.
- State outlines: us-atlas 3.0.1 (ISC), from U.S. Census Bureau cartographic boundary files, simplified.
- html2canvas 1.4.1 (MIT), loaded from cdnjs only when you press Make a GIF.
Revisions
- v1.1, 24 Oct 2026. Rain stations (66 NCEI HPD gauges, 2023–2025 hourly records, Atlas 14 depths at 63), the Atlas 14 alternating-block storm, PFDS and HPD file loaders, the water-balance rail with its companion site-only run, ED-2 in the register, three essay sections.
- v1.0, 23 Oct 2026. The desk: two engines, eighteen channels, standards board, year, survey, engines tab, ED-1.