PySWMM
PySWMM: The Python Interface to Stormwater Management Model (SWMM) - Published in JOSS (2020)
Science Score: 77.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 5 DOI reference(s) in README -
✓Academic publication links
Links to: joss.theoj.org -
✓Committers with academic emails
4 of 24 committers (16.7%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (18.2%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Python Wrappers for SWMM
Basic Info
- Host: GitHub
- Owner: pyswmm
- License: other
- Language: Python
- Default Branch: main
- Homepage: https://www.pyswmm.org
- Size: 14.2 MB
Statistics
- Stars: 338
- Watchers: 29
- Forks: 147
- Open Issues: 18
- Releases: 17
Topics
Metadata Files
README.md

python wrappers for the Stormwater Management Model (SWMM5)
Getting started
Project Website: www.pyswmm.org
Introducing the SWAG STORE! All Proceeds go toward the hosting/service fees related to maintaining the PySWMM Project!!! Get yourself a hoodie or coffee cup!
🆘Do you need HELP?🆘
GitHub Discussions to answer support questions related to PySWMM.
Cite our Paper
McDonnell, Bryant E., Ratliff, Katherine M., Tryby, Michael E., Wu, Jennifer Jia Xin, & Mullapudi, Abhiram. (2020). PySWMM: The Python Interface to Stormwater Management Model (SWMM). Journal of Open Source Software, 5(52), 2292, https://doi.org/10.21105/joss.02292
YouTube Training Videos
Setting a manhole inflow during a running simulation!
Overview
PySWMM is a Python language software package for the creation, manipulation, and study of the structure, dynamics, and function of complex networks.
With PySWMM you can load and manipulate USEPA Stormwater Management Models. With the development of PySWMM, control algorithms can now be developed exclusively in Python which allows the use of functions and objects as well as storing and tracking hydraulic trends for control actions.
As of version v1.1.0, PySWMM includes new features to process metadata and timeseries stored in SWMM binary output file.
Who uses PySWMM?
PySWMM is used by engineers, modelers, and researchers who want to streamline stormwater modeling optimization, controls, and post-processing results.
Goals
PySWMM is intended to provide
- tools for the study of the structure and dynamics within USEPA SWMM5,
- a standard programming interface and graph implementation that is suitable for many applications,
- a rapid development environment for collaborative, multidisciplinary projects,
- an interface to USEPA SWMM5,
- development and implementation of control logic outside of native EPA-SWMM Controls,
- methods for users to establish their own node inflows,
- a coding interface to binary output files,
- new modeling possibilities for the SWMM5 Community.
Install
Get the latest version of PySWMM from PyPI See the Quick Guide!
$ pip install pyswmm
As of version 1.3.1, pyswmm can be installed with specific versions of the SWMM engine ranging from 5.1.14 to 5.2.4 using pip extras:
$ pip install pyswmm[swmm5.2.4]
SWMM and Python Compatibility Table
| pyswmm version | swmm-toolkit compatibility
(SWMM engine) | python compatibility |
| -------------- | ------------------------------------------------------------ | -------------------- |
| 1.0.0 - 1.1.1 | 0.8.2 (SWMM 5.1.13) | 3.6 - 3.9 |
| 1.2.0 - 1.5.0 | 0.9.1 - 0.15.0 (SWMM 5.1.14 - 5.2.4)
Note: 0.11.0 (SWMM 5.2.0) only supported on windows | 3.7 - 3.12 |
Usage
A quick example that steps through a simulation:
Examples:
See the Latte Example
``` python from pyswmm import Simulation, Nodes, Links
with Simulation(r'Example1.inp') as sim: Node21 = Nodes(sim)["21"] print("Invert Elevation: {}". format(Node21.invert_elevation))
Link15 = Links(sim)['15']
print("Outlet Node ID: {}".format(Link15.outlet_node))
# Launch a simulation!
for ind, step in enumerate(sim):
if ind % 100 == 0:
print(sim.current_time,",",round(sim.percent_complete*100),"%",\
Node21.depth, Link15.flow)
```
Opening a SWMM binary output file and accessing model metadata and timeseries.
``` python from pyswmm import Output, SubcatchSeries, NodeSeries, LinkSeries, SystemSeries
with Output('model.out') as out: print(len(out.subcatchments)) print(len(out.nodes)) print(len(out.links)) print(out.version)
sub_ts = SubcatchSeries(out)['S1'].runoff_rate
node_ts = NodeSeries(out)['J1'].invert_depth
link_ts = LinkSeries(out)['C2'].flow_rate
sys_ts = SystemSeries(out).rainfall
```
Bugs
Our issue tracker is at https://github.com/pyswmm/pyswmm/issues. Please report any bugs that you find. Or, even better, fork the repository on GitHub and create a pull request. All changes are welcome, big or small, and we will help you make the pull request if you are new to git (just ask on the issue).
Contributing
Please check out our Wiki https://github.com/pyswmm/pyswmm/wiki for more information on contributing, including an Author Contribution Checklist.
License
Distributed with a BSD2 license; see LICENSE.txt:
Copyright (C) 2014-2024 PySWMM Developers
Community-Owned See AUTHORS and CITATION.cff
Owner
- Name: pyswmm
- Login: pyswmm
- Kind: organization
- Location: United States of America
- Website: http://www.pyswmm.org
- Repositories: 1
- Profile: https://github.com/pyswmm
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "McDonnell" given-names: "Bryant" orcid: "https://orcid.org/0000-0002-6250-2220" - family-names: "Ratliff" given-names: "Katherine" orcid: "https://orcid.org/0000-0003-1410-2756" - family-names: "Tryby" given-names: "Michael" orcid: "https://orcid.org/0000-0000-0000-0000" - family-names: "Wu" given-names: "Jia Xin" orcid: "https://orcid.org/0000-0000-0000-0000" - family-names: "Mullapudi" given-names: "Abhiram" orcid: "https://orcid.org/0000-0000-0000-0000" title: "PySWMM: The Python Interface to Stormwater Management Model (SWMM)" version: 1.0.1 doi: 10.21105/joss.02292 date-released: 2020-08-04 url: "https://github.com/OpenWaterAnalytics/pyswmm"
GitHub Events
Total
- Issues event: 11
- Watch event: 45
- Issue comment event: 32
- Push event: 2
- Pull request event: 7
- Pull request review event: 3
- Fork event: 8
- Create event: 1
Last Year
- Issues event: 11
- Watch event: 47
- Issue comment event: 32
- Push event: 2
- Pull request event: 7
- Pull request review event: 3
- Fork event: 8
- Create event: 1
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Bryant E. McDonnell | b****l@g****m | 344 |
| Jenn Wu | j****u@e****t | 113 |
| Katherine Ratliff | r****e@e****v | 69 |
| Stephen Roberts | s****s@a****u | 50 |
| Gonzalo Pena-Castellanos | g****a@g****m | 50 |
| karosc | c****s@o****m | 40 |
| bemason | b****n@u****u | 18 |
| Michael Tryby | t****l@e****v | 15 |
| Timothy Holmes | t****s@g****m | 12 |
| jennwuu | j****u@l****m | 12 |
| abhiramm7 | a****m@u****u | 12 |
| Damon McDougall | d****l@g****m | 5 |
| karosc | k****c@c****m | 4 |
| Jiada | 3****e | 4 |
| Kristina Macro | k****o@e****t | 3 |
| Ruben Kertesz | r****z@e****t | 3 |
| timothy-holmes | 4****s | 2 |
| Caleb | 7****n | 2 |
| James Westover | w****r@p****u | 2 |
| Christian Urich | c****h@g****m | 1 |
| Nick Santos | n****n | 1 |
| dependabot[bot] | 4****] | 1 |
| dokzai | 3****i | 1 |
| unknown | b****l@L****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 275
- Total pull requests: 150
- Average time to close issues: 8 months
- Average time to close pull requests: 29 days
- Total issue authors: 115
- Total pull request authors: 24
- Average comments per issue: 3.78
- Average comments per pull request: 2.24
- Merged pull requests: 129
- Bot issues: 0
- Bot pull requests: 1
Past Year
- Issues: 11
- Pull requests: 5
- Average time to close issues: 4 days
- Average time to close pull requests: 2 days
- Issue authors: 11
- Pull request authors: 3
- Average comments per issue: 2.18
- Average comments per pull request: 0.6
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- bemcdonnell (62)
- goanpeca (26)
- jennwuu (13)
- Jiadalee (7)
- katmratliff (5)
- michaeltryby (5)
- t298 (4)
- tscheuch (4)
- lrntct (4)
- BrianN92 (4)
- pdim21 (3)
- ghost (3)
- jsadler2 (3)
- antviro (3)
- KrushilM (3)
Pull Request Authors
- bemcdonnell (70)
- goanpeca (16)
- katmratliff (15)
- karosc (13)
- jennwuu (9)
- timothy-holmes (6)
- Jiadalee (5)
- abhiramm7 (4)
- ghost (3)
- polyedr (3)
- michaeltryby (2)
- bemason (1)
- christianurich (1)
- kmmacro (1)
- lrntct (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 4,351 last-month
- Total docker downloads: 40
-
Total dependent packages: 4
(may contain duplicates) -
Total dependent repositories: 8
(may contain duplicates) - Total versions: 61
- Total maintainers: 4
pypi.org: pyswmm
Python Wrapper for SWMM5 API
- Homepage: https://www.pyswmm.org
- Documentation: https://pyswmm.readthedocs.io/
- License: BSD2 License
-
Latest release: 2.0.1
published almost 2 years ago
Rankings
Maintainers (4)
proxy.golang.org: github.com/pyswmm/pyswmm
- Documentation: https://pkg.go.dev/github.com/pyswmm/pyswmm#section-documentation
- License: other
-
Latest release: v2.0.1+incompatible
published almost 2 years ago
Rankings
Dependencies
- actions/checkout v2 composite
- actions/setup-python v2 composite
- actions/upload-artifact v2 composite
- pyswmm *
- aenum ==3.1.11
- julian ==0.14
- pytest *
- swmm-toolkit ==0.9.0
- wheel *
