SWMM error codes
Every error EPA SWMM can raise, with EPA’s own wording and, where it helps, what to actually do. 110 codes in total.
Start here
Section titled “Start here”Three codes account for most of what people hit:
| Code | Meaning |
|---|---|
| 200 | A wrapper. It means “something in the input file is wrong” and is never actionable on its own - the real cause is reported beside it, usually 203, 205, 207, 209 or 211. Look for the companion error |
| 209 | Something references an object that does not exist: a link naming a missing node, an RDII entry naming a missing hydrograph, a pump naming a missing curve |
| 211 | A value that should be a number is not, or is negative where only positive makes sense |
Errors you meet while modelling
Section titled “Errors you meet while modelling”Input parser
Section titled “Input parser”Something in the file could not be read. These are the ones you meet most.
| Code | What SWMM says | What to do |
|---|---|---|
| 200 | one or more errors in input file. | A generic wrapper: one or more lines in the input file could not be read. The specific problem is reported alongside it, usually as 203, 205, 207, 209 or 211. |
| 201 | too many characters in input line | A single input line is too long. |
| 203 | too few items | A line has fewer values than the section requires. A storage node with a shape but no parameters is the usual cause. |
| 205 | invalid keyword name | A keyword is not one SWMM recognises in that position. Check spelling and the allowed set. |
| 207 | duplicate ID name name | Two objects of the same kind share an id. Ids must be unique within their type. |
| 209 | undefined object name | Something references an object that does not exist: a link naming a missing node, an RDII entry naming a missing hydrograph, a pump naming a missing curve. |
| 211 | invalid number name | A value that should be a number is not, or is negative where only positive makes sense. |
| 213 | invalid date/time name | A date or time is not in a format SWMM accepts. |
| 217 | control rule clause invalid or out of sequence | A control rule could not be parsed. Check the RULE, IF, THEN and PRIORITY clauses. |
| 219 | data provided for unidentified transect | Station (GR) data appears for a transect that has not been identified yet. Each transect must start with its X1 line before its GR lines. |
| 221 | transect station out of sequence | |
| 223 | Transect name has too few stations. | |
| 225 | Transect name has too many stations. | |
| 227 | Transect name has no Manning’s N. | |
| 229 | Transect name has invalid overbank locations. | |
| 231 | Transect name has no depth. | |
| 233 | invalid math expression | A math expression could not be parsed: a treatment expression, a control-rule expression or a custom groundwater flow equation. Check the operators, brackets and variable names. |
| 235 | invalid infiltration parameters | Infiltration parameters are invalid for the chosen method. |
Junctions, outfalls, storage and dividers.
| Code | What SWMM says | What to do |
|---|---|---|
| 135 | Divider name does not have two outlet links. | A flow divider must have exactly two outlet links: the main one and the diverted one. |
| 136 | Divider name has invalid diversion link. | The divider’s diversion link is not one of its outlet links. |
| 137 | Weir Divider name has invalid parameters. | Check the weir divider’s height and coefficient. |
| 138 | Node name has initial depth greater than maximum depth. | Initial depth cannot exceed maximum depth. Common on storage nodes when the initial level was entered as an elevation rather than a depth. |
| 139 | Regulator name is the outlet of a non-storage node. | Under steady or kinematic-wave routing, an orifice, weir or outlet can only discharge from a storage node. Switch to dynamic wave, change the upstream node to storage, or use a conduit. |
| 140 | Storage node name has negative volume at full depth. | The storage node’s shape parameters are invalid. TABULAR needs a curve; every other shape needs three numbers. |
| 141 | Outfall name has more than 1 inlet link or an outlet link. | An outfall must be a terminal node: exactly one inlet link and no outlet link. |
| 143 | Regulator name has invalid cross-section shape. | The opening shape does not suit the regulator type: an orifice needs CIRCULAR or RECT_CLOSED, a transverse, side-flow or roadway weir RECT_OPEN, a V-notch weir TRIANGULAR and a trapezoidal weir TRAPEZOIDAL. |
| 145 | Drainage system has no acceptable outlet nodes. | Under dynamic-wave routing the network needs at least one outfall connected by exactly one link. Add an outfall at the downstream end, or fix one that has more than one link. |
Conduits and pumps
Section titled “Conduits and pumps”Links and their geometry.
| Code | What SWMM says | What to do |
|---|---|---|
| 111 | invalid length for Conduit name. | Conduit length must be greater than zero. Check for a conduit created with coincident end points. |
| 112 | elevation drop exceeds length for Conduit name. | The drop between the two node inverts is greater than the conduit’s length, which is geometrically impossible. Lengthen the conduit or correct an invert. |
| 113 | invalid roughness for Conduit name. | Manning’s n must be greater than zero. Typical values are 0.011 to 0.015 for pipe. |
| 114 | invalid number of barrels for Conduit name. | Number of barrels must be a positive whole number. |
| 115 | adverse slope for Conduit name. | The downstream invert is higher than the upstream one. Correct the inverts, or the offsets that lift the pipe off the node floor. |
| 117 | no cross section defined for Link name. | Every conduit needs an entry in [XSECTIONS]. Set its cross-section shape and size. |
| 119 | invalid cross section for Link name. | The cross-section dimensions are invalid for that shape, for example a zero diameter. |
| 121 | missing or invalid pump curve assigned to Pump name. | The curve assigned to the pump is not a pump curve (Pump1 to Pump5), for example a storage or rating curve picked by mistake. A curve name that does not exist raises 209 instead. |
| 122 | startup depth not higher than shutoff depth for Pump name. | The pump’s startup depth must be greater than its shutoff depth. |
Topology
Section titled “Topology”How the network is connected.
| Code | What SWMM says | What to do |
|---|---|---|
| 131 | the following links form cyclic loops in the drainage system: | The links listed form a loop. Dynamic-wave routing handles loops, but kinematic wave cannot: switch routing method, or break the loop. |
| 133 | Node name has more than one outlet link. | Only dynamic-wave routing allows a node to have more than one outlet link. Switch to DYNWAVE or remove the extra link. |
| 134 | Node name has illegal DUMMY link connections. | Under dynamic-wave routing a DUMMY conduit or an ideal pump must be the only link leaving its upstream node, cannot leave a storage node, and cannot leave a node fed only by other DUMMY links or ideal pumps. |
Rain gages
Section titled “Rain gages”Rainfall input.
| Code | What SWMM says | What to do |
|---|---|---|
| 156 | ambiguous station ID for Rain Gage name. | Two rain gages use the same station ID but read it from different rainfall files. |
| 157 | inconsistent rainfall format for Rain Gage name. | Two rain gages share one time series but declare different rainfall formats (INTENSITY, VOLUME or CUMULATIVE). Give them the same format, or separate series. |
| 158 | time series for Rain Gage name is also used by another object. | A time series used by a rain gage cannot also be used by an inflow or anything else. Give the gage its own series. |
| 159 | recording interval greater than time series interval for Rain Gage name. | The gage’s recording interval is longer than the interval in its time series. |
Curves and time series
Section titled “Curves and time series”Tabulated data.
| Code | What SWMM says | What to do |
|---|---|---|
| 171 | Curve name has invalid or out of sequence data. | Curve values must increase monotonically in X. Sort the points and remove duplicates. |
| 173 | Time Series name has its data out of sequence. | Time series entries must be in chronological order. |
Rainfall-derived infiltration and inflow.
| Code | What SWMM says | What to do |
|---|---|---|
| 151 | a Unit Hydrograph in set name has invalid time base. | The unit hydrograph’s time to peak or recession makes its time base invalid. Check T and K. |
| 153 | a Unit Hydrograph in set name has invalid response ratios. | The R values of a unit hydrograph sum to more than 1.0, or one is negative. R is the fraction of rainfall entering the sewer, so the three terms cannot exceed all of it. |
| 155 | invalid sewer area for RDII at node name. | The RDII sewershed area must be positive. An area of zero runs but generates no RDII at all. |
Green infrastructure controls.
| Code | What SWMM says | What to do |
|---|---|---|
| 183 | no type specified for LID name. | Every LID control needs a type on its first line. |
| 184 | missing layer for LID name. | The LID type requires a layer that has not been defined, for example a soil layer for a bio-retention cell. |
| 185 | invalid parameter value for LID name. | An LID layer parameter is out of range, such as a porosity above 1. |
| 187 | LID area exceeds total area for Subcatchment name. | The LID units assigned to a subcatchment cover more area than the subcatchment has. |
| 188 | LID capture area exceeds total impervious area for Subcatchment name. | The LID capture area exceeds the subcatchment’s impervious area. |
Subcatchments and aquifers
Section titled “Subcatchments and aquifers”Hydrology.
| Code | What SWMM says | What to do |
|---|---|---|
| 108 | ambiguous outlet ID name for Subcatchment name. | Two objects share that outlet name. Subcatchment outlets may be a node or another subcatchment, so an id used by both is ambiguous. |
| 109 | invalid parameter values for Aquifer name. | Check the aquifer’s porosity, wilting point and field capacity: porosity > field capacity > wilting point. |
| 110 | ground elevation is below water table for Subcatchment name. | The subcatchment’s ground elevation is below its aquifer water table. Raise the ground elevation or lower the initial water table. |
Snowmelt
Section titled “Snowmelt”Snow packs and melt climatology.
| Code | What SWMM says | What to do |
|---|---|---|
| 181 | invalid Snow Melt Climatology parameters. | Check the snowmelt climatology parameters. |
| 182 | invalid parameters for Snow Pack name. | Check the snow pack’s depths, fractions and melt coefficients. |
Simulation dates
Section titled “Simulation dates”The run window.
| Code | What SWMM says | What to do |
|---|---|---|
| 191 | simulation start date comes after ending date. | The simulation start date is after its end date. |
| 193 | report start date comes after ending date. | The report start date is after the report end date. |
| 195 | reporting time step or duration is less than routing time step. | The reporting step cannot be shorter than the routing step. |
Treatment
Section titled “Treatment”Pollutant removal expressions.
| Code | What SWMM says | What to do |
|---|---|---|
| 161 | cyclic dependency in treatment functions at node name. | Two treatment expressions each depend on the other’s result. |
Runtime
Section titled “Runtime”The solver could not proceed.
| Code | What SWMM says | What to do |
|---|---|---|
| 101 | memory allocation error. | |
| 103 | cannot solve KW equations for Link name. | |
| 105 | cannot open ODE solver. | |
| 107 | cannot compute a valid time step. | |
| 500 | System exception thrown. |
Files, interfaces and the API
Section titled “Files, interfaces and the API”These rarely come up while building a model.
Files and interfaces
Section titled “Files and interfaces”Reading or writing a file. Almost always a path or permissions problem rather than a modelling one.
| Code | What SWMM says | What to do |
|---|---|---|
| 301 | files share same names. | |
| 303 | cannot open input file. | |
| 305 | cannot open report file. | |
| 307 | cannot open binary results file. | |
| 308 | amount of output produced will exceed maximum file size. | |
| 309 | error writing to binary results file. | |
| 311 | error reading from binary results file. | |
| 313 | cannot open scratch rainfall interface file. | |
| 315 | cannot open rainfall interface file name. | |
| 317 | cannot open rainfall data file name. | |
| 318 | the following line is out of sequence in rainfall data file name. | |
| 319 | unknown format for rainfall data file name. | |
| 320 | invalid format for rainfall interface file. | |
| 321 | no data in rainfall interface file for gage name. | |
| 323 | cannot open runoff interface file name. | |
| 325 | incompatible data found in runoff interface file. | |
| 327 | attempting to read beyond end of runoff interface file. | |
| 329 | error in reading from runoff interface file. | |
| 331 | cannot open hot start interface file name. | |
| 333 | incompatible data found in hot start interface file. | |
| 335 | error in reading from hot start interface file. | |
| 336 | no climate file specified for evaporation and/or wind speed. | |
| 337 | cannot open climate file name. | |
| 338 | error in reading from climate file name. | |
| 339 | attempt to read beyond end of climate file name. | |
| 341 | cannot open scratch RDII interface file. | |
| 343 | cannot open RDII interface file name. | |
| 345 | invalid format for RDII interface file. | |
| 351 | cannot open routing interface file name. | |
| 353 | invalid format for routing interface file name. | |
| 355 | mis-matched names in routing interface file name. | |
| 357 | inflows and outflows interface files have same name. | |
| 361 | could not open external file used for Time Series name. | |
| 363 | invalid data in external file used for Time Series name. |
Only relevant when driving the engine programmatically.
| Code | What SWMM says | What to do |
|---|---|---|
| 501 | API Error 501: project not opened. | |
| 502 | API Error 502: simulation not started. | |
| 503 | API Error 503: simulation not ended. | |
| 504 | API Error 504: invalid object type. | |
| 505 | API Error 505: invalid object index. | |
| 506 | API Error 506: invalid object name. | |
| 507 | API Error 507: invalid property type. | |
| 508 | API Error 508: invalid property value. | |
| 509 | API Error 509: invalid time period. |
Where these come from
Section titled “Where these come from”Extracted from src/solver/error.txt in
USEPA/Stormwater-Management-Model,
so the “What SWMM says” column is the engine’s own wording rather than a
paraphrase. The “What to do” column is ours.
*name* in a message is where SWMM substitutes the offending object’s name.