Skip to main content

A Python package for analytics in dam management workflows.

Project description

OptiDamTool

Status Description
PyPI PyPI - Version PyPI - Status PyPI - Python Version PyPI - Wheel
GitHub GitHub commit activity GitHub last commit flake8 mypy pytest
Codecov codecov
Read the Docs Read the Docs
PePy Pepy Total Downloads
License GitHub License

OptiDamTool is a Python package designed for analytics and decision-making in dam management. Conceptualized and released on May 29, 2025, the package offers tools for modeling and analyzing hydrological flow across a network of connected dams.

Leveraging functionalities from the open-source GeoAnalyze package, OptiDamTool provides classes that that assist users in preparing inputs for simulating water erosion and sediment transport, and supports decision-making in dam network deployment aimed at environmental sustainability.

Classes

OptiDamTool.WatemSedem

Provides tools to prepare inputs for the WaTEM/SEDEM model, which simulates soil erosion, sediment transport capacity, and sediment delivery to stream networks at the watershed scale. While this class includes built-in methods for generating most required inputs, it is still recommended to consult the GeoAnalyze documentation for any geospatial operations not covered by its methods.

  • Converts Digital Elevation Model (DEM) data into the stream files required for the WaTEM/SEDEM model with the river routing = 1 extension enabled.
  • Extends input rasters beyond the model region and fills NoData cells with valid values, as WaTEM/SEDEM does not support NoData.
  • Performs reprojection, clipping, resolution rescaling, and reclassification of rasters.
  • Processes open-source Esri land cover data.
  • Generates a land management factor raster from land cover inputs.
  • Computes the product of soil erodibility and rainfall erosivity factors.
  • Converts raster files to the Idrisi raster format, with the .rst file extension.
  • Generates effective upstream drainage area polygons for selected dam locations within a stream network.

OptiDamTool.Network

Offers methods for establishing hydrological and sedimentation flow connectivity between dams using the stream network.

  • Identifies connectivity between adjacent upstream and downstream dams.
  • Computes the controlled upstream drainage areas for selected dam locations within a stream network.
  • Estimates sediment inflow to dams based on controlled upstream drainage areas.
  • Simulates storage dynamics of individual dams in a system due to sedimentation, using a mass balance approach.

OptiDamTool.Analysis

Provides methods for analyzing simulation outputs and generating insights.

  • Integrates sediment delivery to stream segments.
  • Generates stream shapefiles with comprehensive information of each segment's drainage area and sediment input.
  • Summarizes total sediment dynamics for the model region.
  • Assigns a Coordinate Reference System and the default GTiff driver to output Idrisi raster files from a WaTEM/SEDEM simulation.

Easy Installation

To install, use pip:

pip install OptiDamTool

Quickstart

A brief example of how to start:

>>> import OptiDamTool
>>> watemsedem = OptiDamTool.WatemSedem()
>>> network = OptiDamTool.Network()

Documentation

For detailed information, see the documentation.

Support

If this project has been helpful and you'd like to contribute to its development, consider sponsoring with a coffee! Support will help maintain, improve, and expand this open-source project, ensuring continued valuable tools for the community.

Buy Me a Coffee

Project details


Download files

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

Source Distribution

optidamtool-0.3.2.tar.gz (28.7 kB view details)

Uploaded Source

Built Distribution

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

optidamtool-0.3.2-py3-none-any.whl (27.1 kB view details)

Uploaded Python 3

File details

Details for the file optidamtool-0.3.2.tar.gz.

File metadata

  • Download URL: optidamtool-0.3.2.tar.gz
  • Upload date:
  • Size: 28.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.3

File hashes

Hashes for optidamtool-0.3.2.tar.gz
Algorithm Hash digest
SHA256 4e23bfb827e6511b6ea3e512945a8ecad50baba91899054291a7360cead8b98c
MD5 db53c0bb8b2531d94030a6e1a394aa5e
BLAKE2b-256 dc4ff9b9857a00236742d050a56403d36c1d439f39dd2cdd0dfd2e80b8df8e34

See more details on using hashes here.

File details

Details for the file optidamtool-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: optidamtool-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 27.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.3

File hashes

Hashes for optidamtool-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 69348c8697d8dcdf61734a7cd4368939cb3b4d91ef8e9facfbf35463b4a4c67e
MD5 67937758e7de49106f09b4bef2a8e416
BLAKE2b-256 a57d14becd079dfcd31df3d7e5e5cfb963bd2556462cb4950e0e5e50896b633c

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