Skip to main content

A python package for EPA SWMM5 preprocessing, solver, and post-processing.

Project description

EPA ORD Stormwater Management Model (SWMM)

Stormwater Management Model (SWMM) computational engine and output post-processing codebase

Build Status

Build and Unit Testing Build and Regression Testing Deployment Documentation PythonVersion PyPi

Introduction

This is the official SWMM source code repository maintained by US EPA Office of Research and Development, Center For Environmental Solutions & Emergency Response, Water Infrastructure Division located in Cincinnati, Ohio.

SWMM is a dynamic hydrology-hydraulic water quality simulation model. It is used for single event or long-term (continuous) simulation of runoff quantity and quality from primarily urban areas. SWMM source code is written in the C Programming Language and released in the Public Domain.

Build Instructions

The 'src' folder of this repository contains the C source code for version of Storm Water Management Model's computational engine. Consult the included 'Roadmap.txt' file for an overview of the various code modules. The code can be compiled into both a shared object library and a command line executable. Under Windows, the library file (swmm5.dll) is used to power SWMM's graphical user interface.

Also included is a python interface for the SWMM computational engine and output post-processing application programming interfaces located in the python folder.

The 'CMakeLists.txt' file is a script used by CMake (https://cmake.org/) to build the SWMM binaries. CMake is a cross-platform build tool that generates platform native build systems for many compilers. To check if the required version is installed on your system, enter from a console window and check that the version is 3.5 or higher.

cmake --version

To build the SWMM engine library and its command line executable using CMake and the Microsoft Visual Studio C compiler on Windows:

  1. Open a console window and navigate to the directory where this Readme file resides (which should have 'src' as a sub-directory underneath it).

  2. Issue the following commands:

mkdir build
cd build
  1. Then enter the following CMake commands:
cmake -G <compiler> .. -A <platform>
cmake --build . --config Release

where <compiler> is the name of the Visual Studio compiler being used in double quotes (e.g., "Visual Studio 15 2017", "Visual Studio 16 2019", or "Visual Studio 17 2022") and <platform> is Win32 for a 32-bit build or x64 for a 64-bit build. The resulting engine DLL (swmm5.dll), command line executable (runswmm.exe), and output processing libraries (swmm-output.dll) will appear in the build\Release directory.

For other platforms, such as Linux or MacOS, Step 3 can be replaced with:

cmake ..
cmake --build .

The resulting shared object library (libswmm5.so or libswmm5.dylib) and command line executable (runswmm) will appear in the build directory.

The exprimental python bindings can be built and installed locally using the following command.

cd python
python -m pip install -r requirements.txt
python -m pip install . 

Users may also build python wheels for installation or distribution. Once the python bindings have been validated and cleared through EPA'S clearance process, they will be available for installation via ropsitories such as pypi.

Unit and Regression Testing

Unit tests and regression tests have been developed for both the natively compiled SWMM computational engine and output toolkit as well as their respective python bindings. Unit tests for the natively compiled toolkits use the Boost 1.67.0 library and can be compiled by adding DBUILD_TESTS=ON flag during the cmake build phase as shown below:

ctest --test-dir .  -DBUILD_TESTS=ON --config Debug --output-on-failure

Unit testing on the python bindings may be executed using the following command after installation.

cd python\tests
pytest .

Regression tests are executed using the python bindings using the pytest and pytest-regressions extension using the following commands.

cd ci
pytest --data-dir <path-to-regression-testing-files> --atol <absolute-tolerance> --rtol <relative-tolerance> --benchmark-compare --benchmark-json=PATH

Find Out More

The source code distributed here is identical to the code found at the official SWMM website. The SWMM website also hosts the official manuals and installation binaries for the SWMM software.

A live web version of the SWMM documentation of the API and user manuals can be found on the SWMM GitHub Pages website. Note that this is an alpha version that is still under development and has yet to go through EPA'S official QAQC review process.

Disclaimer

The United States Environmental Protection Agency (EPA) GitHub project code is provided on an "as is" basis and the user assumes responsibility for its use. EPA has relinquished control of the information and no longer has responsibility to protect the integrity, confidentiality, or availability of the information. Any reference to specific commercial products, processes, or services by service mark, trademark, manufacturer, or otherwise, does not constitute or imply their endorsement, recommendation or favoring by EPA. The EPA seal and logo shall not be used in any manner to imply endorsement of any commercial product or activity by EPA or the United States Government.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

epaswmm-5.3.0.dev2-cp312-cp312-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.12Windows x86-64

epaswmm-5.3.0.dev2-cp312-cp312-win32.whl (1.1 MB view details)

Uploaded CPython 3.12Windows x86

epaswmm-5.3.0.dev2-cp311-cp311-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.11Windows x86-64

epaswmm-5.3.0.dev2-cp311-cp311-win32.whl (1.1 MB view details)

Uploaded CPython 3.11Windows x86

epaswmm-5.3.0.dev2-cp310-cp310-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.10Windows x86-64

epaswmm-5.3.0.dev2-cp310-cp310-win32.whl (1.1 MB view details)

Uploaded CPython 3.10Windows x86

epaswmm-5.3.0.dev2-cp39-cp39-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.9Windows x86-64

epaswmm-5.3.0.dev2-cp39-cp39-win32.whl (1.1 MB view details)

Uploaded CPython 3.9Windows x86

epaswmm-5.3.0.dev2-cp38-cp38-win_amd64.whl (1.3 MB view details)

Uploaded CPython 3.8Windows x86-64

epaswmm-5.3.0.dev2-cp38-cp38-win32.whl (1.1 MB view details)

Uploaded CPython 3.8Windows x86

File details

Details for the file epaswmm-5.3.0.dev2-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for epaswmm-5.3.0.dev2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7bd8f04a18f99e0a00f59559256c8ffd651255bdd7e0ac2f47238adbed039269
MD5 111dac9b67ebe843d3ce204f446abe1e
BLAKE2b-256 b6324a41a396024d4bd99f08f78820ce34d7a204c6f7fd207f5bcc5621ffce18

See more details on using hashes here.

File details

Details for the file epaswmm-5.3.0.dev2-cp312-cp312-win32.whl.

File metadata

  • Download URL: epaswmm-5.3.0.dev2-cp312-cp312-win32.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.8.16

File hashes

Hashes for epaswmm-5.3.0.dev2-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 4569343dbf41e2248e977ad87d0a18b9f281f60247b7f772c3f91261bd41d6dd
MD5 dd160b493936f3ecd4c86e4ab111ed2d
BLAKE2b-256 34a29dbd3d626a4ac507b3cdd1ea65ec58467d0f70576e64e90cb1c220aa1f5a

See more details on using hashes here.

File details

Details for the file epaswmm-5.3.0.dev2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for epaswmm-5.3.0.dev2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3b78fbf633a0555a9db4813f34390efcf2a740be2253969ad09f8bf7580b90e2
MD5 09cd1463e2d3cf8a52135ce3a1d69e11
BLAKE2b-256 96ee4eab046e379db38db307c72fb13092754baaab13685a54f9908b45c9f0fd

See more details on using hashes here.

File details

Details for the file epaswmm-5.3.0.dev2-cp311-cp311-win32.whl.

File metadata

  • Download URL: epaswmm-5.3.0.dev2-cp311-cp311-win32.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.8.16

File hashes

Hashes for epaswmm-5.3.0.dev2-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 e127ddca57eee5081a63bc4d0fb57a11d8651faec0d820b59938643a244bc693
MD5 5e1599fbbb45ebbc0dca0df54adfc8fb
BLAKE2b-256 99761e0a34bda46cef723aa64871979e2d38aad2a5073f39372d9cbd67a1c37e

See more details on using hashes here.

File details

Details for the file epaswmm-5.3.0.dev2-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for epaswmm-5.3.0.dev2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4fcd0d6a90a948d1698167fda0f6688b8a86547bde47d68f90e7312094e58909
MD5 fe49e88a7a1837a4a76731ceadc04cdc
BLAKE2b-256 bdaddfcb1b6b6e9a919eb01f42659aa884853cbda8078f03f6e52e12f3fbc2ce

See more details on using hashes here.

File details

Details for the file epaswmm-5.3.0.dev2-cp310-cp310-win32.whl.

File metadata

  • Download URL: epaswmm-5.3.0.dev2-cp310-cp310-win32.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.8.16

File hashes

Hashes for epaswmm-5.3.0.dev2-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 7a71f86ac6bb75d030a0ea9ccc197f6258ca7441eb998d08a16ed048b678099a
MD5 cb4de94030585c6c8c1b517b69a45c0f
BLAKE2b-256 366998df52b03ac05e4beda70b138e6ba753f8e46682b86a71fc4e870d3a7bc6

See more details on using hashes here.

File details

Details for the file epaswmm-5.3.0.dev2-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: epaswmm-5.3.0.dev2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.8.16

File hashes

Hashes for epaswmm-5.3.0.dev2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 91b4114514b90a84a56b245219695b026aae69cd0e768b68316a86661ae327ab
MD5 3651fae1995c5c0fb16fcedb4ad56209
BLAKE2b-256 fc167389fd07c579062259ee3730a481d3bf870231c851e5fdfd1e04e9a8ef26

See more details on using hashes here.

File details

Details for the file epaswmm-5.3.0.dev2-cp39-cp39-win32.whl.

File metadata

  • Download URL: epaswmm-5.3.0.dev2-cp39-cp39-win32.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.8.16

File hashes

Hashes for epaswmm-5.3.0.dev2-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 0d905a6d16e60a24a81f20610633b735322ac39e948a9a8a461ab5c01bb0f62f
MD5 97811d58c32327424197c066514ef9a1
BLAKE2b-256 6ba047848fc25150e9732eb7b1ac65139dddeb22c67d1d709475c3204227bb85

See more details on using hashes here.

File details

Details for the file epaswmm-5.3.0.dev2-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: epaswmm-5.3.0.dev2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.8.16

File hashes

Hashes for epaswmm-5.3.0.dev2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 3116c8f41dca084949ef23841b9e55436b5772a6e2a740c8deaae192b9b08ba2
MD5 b61fd55d47005d76471e3858db241b3d
BLAKE2b-256 9a0a5cdbd4c64e073959fe70827e373f257c3bea8d099e142b2e47f4ba711266

See more details on using hashes here.

File details

Details for the file epaswmm-5.3.0.dev2-cp38-cp38-win32.whl.

File metadata

  • Download URL: epaswmm-5.3.0.dev2-cp38-cp38-win32.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.8.16

File hashes

Hashes for epaswmm-5.3.0.dev2-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 ea12f002f72b7f684ac23d9a07c0eb04cccfbc3f15ee77294ded70415fdc0938
MD5 30614e72736efacfed0615832b73b889
BLAKE2b-256 9c5ddafb26d35d3f4623d9df9dbef374f7a938fcead338e9a7c30af87cb50a96

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page