Package include method for simulate subcatchment with different features values from Storm Water Management Model. Currently, some of the 'catchment simulation' functionality available in the app - catchment simulation
Creating SWMM object for analyse
pip install catchment-simulation
from catchment_simulation.catchment_features_simulation import FeaturesSimulation
subcatchment_id = "S1"
raw_file = "catchment_simulation/example.inp"
model = FeaturesSimulation(subcatchment_id=subcatchment_id, raw_file=raw_file)
df = model.simulate_area(start=1, stop: = 10, step = 1)
More code examples at the end of the notebook.
The application was built in django share some of the functionality from the 'catchment simulation' package.
It is designed to analyze and predict water flow behavior in catchments. The application contain two main components: the Catchment Simulation package and Catchment Calculation. On the main page you can find information of the 'catchments simulation' package and examples of use.
Application at - https://catchment-simulations.onrender.com/
The 'Simulations' tab allows the user to upload a file and select components for simulation. Once the simulation is executed, the window will display an interactive graph of the obtained data and a button to download the results in an excel spreadsheet.
You will be asked to register and log in before performing the simulation.
The 'Calculations' tab contains a neural network model trained to predict catchment area runoff. The user, after uploading the file, receives the results of calculations performed SWMM and ANN model prediction.
You will be asked to register and log in before performing the simulation.
from catchment_simulation.catchment_features_simulation import FeaturesSimulation
subcatchment_id = "S1"
raw_file = "catchment_simulation/example.inp"
model = FeaturesSimulation(subcatchment_id=subcatchment_id, raw_file=raw_file)
df = model.simulate_percent_impervious(start=1, stop: = 10, step = 1)
from catchment_simulation.catchment_features_simulation import FeaturesSimulation
subcatchment_id = "S1"
raw_file = "catchment_simulation/example.inp"
model = FeaturesSimulation(subcatchment_id=subcatchment_id, raw_file=raw_file)
df = model.simulate_percent_slope(start=1, stop: = 10, step = 1)
from catchment_simulation.catchment_features_simulation import FeaturesSimulation
subcatchment_id = "S1"
raw_file = "catchment_simulation/example.inp"
model = FeaturesSimulation(subcatchment_id=subcatchment_id, raw_file=raw_file)
df = model.simulate_width(start=1, stop: = 10, step = 1)
from catchment_simulation.catchment_features_simulation import FeaturesSimulation
subcatchment_id = "S1"
raw_file = "catchment_simulation/example.inp"
model = FeaturesSimulation(subcatchment_id=subcatchment_id, raw_file=raw_file)
df = model.simulate_curb_length(start=1, stop: = 10, step = 1)
from catchment_simulation.catchment_features_simulation import FeaturesSimulation
subcatchment_id = "S1"
raw_file = "catchment_simulation/example.inp"
model = FeaturesSimulation(subcatchment_id=subcatchment_id, raw_file=raw_file)
df = model.simulate_n_imperv(param="Imperv")
from catchment_simulation.catchment_features_simulation import FeaturesSimulation
subcatchment_id = "S1"
raw_file = "catchment_simulation/example.inp"
model = FeaturesSimulation(subcatchment_id=subcatchment_id, raw_file=raw_file)
df = model.simulate_n_perv(param="Perv")
from catchment_simulation.catchment_features_simulation import FeaturesSimulation
subcatchment_id = "S1"
raw_file = "catchment_simulation/example.inp"
model = FeaturesSimulation(subcatchment_id=subcatchment_id, raw_file=raw_file)
df = model.simulate_s_imperv(param="Imperv")
from catchment_simulation.catchment_features_simulation import FeaturesSimulation
subcatchment_id = "S1"
raw_file = "catchment_simulation/example.inp"
model = FeaturesSimulation(subcatchment_id=subcatchment_id, raw_file=raw_file)
df = model.simulate_s_imperv(param="Perv")
from catchment_simulation.catchment_features_simulation import FeaturesSimulation
subcatchment_id = "S1"
raw_file = "catchment_simulation/example.inp"
model = FeaturesSimulation(subcatchment_id=subcatchment_id, raw_file=raw_file)
df = model.simulate_percent_zero_imperv(start=0, stop=100, step=10)
If you encounter any bugs or issues while using our software, please feel free to report them on the project's issue tracker. When reporting a bug, please provide as much information as possible to help us reproduce and resolve the issue, including:
- A clear and concise description of the issue
- Steps to reproduce the problem
- Expected behavior and actual behavior
- Any error messages or logs that may be relevant
Your feedback is invaluable and will help us improve the software for all users.
We welcome and appreciate contributions from the community! If you're interested in contributing to this project, please follow these steps:
- Fork the repository on GitHub.
- Create a new branch for your changes.
- Make your changes, including updates to documentation if needed.
- Write tests to ensure your changes are working as expected.
- Ensure all tests pass and there are no linting or code style issues.
- Commit your changes and create a pull request, providing a detailed description of your changes.
We will review your pull request as soon as possible and provide feedback. Once your contribution is approved, it will be merged into the main branch.
For more information about contributing to the project, please see our contributing guide.
License This project is licensed under the MIT License. By using, distributing, or contributing to this project, you agree to the terms and conditions of the license. Please refer to the LICENSE.md file for the full text of the license.