A Python package for estimating environmental flow requirements using hydrological methods.
Project description
eflowpy
A Python Package for Estimating Environmental Flow Requirements in Rivers
eflowpy is a Python package for estimating environmental flow requirements using hydrological methods. It provides methods such as Flow Duration Curve (FDC), 7Q10, GEFC, and Tennant Method to analyze river flow conditions for environmental assessments.
๐ Features
โ Calculate Flow Duration Curve (FDC) with exceedance probabilities
โ Compute 7Q10 low-flow values for drought analysis
โ Apply the Tennant Method for environmental flow assessments
โ Use GEFC (Generalized Environmental Flow Criteria) for water resource planning
โ Easily visualize FDC plots with Q-value markers (Q1, Q5, Q10, Q50, Q90, Q95)
โ Support for both daily and monthly streamflow data
๐ฆ Installation
To install eflowpy from PyPI:
pip install eflowpy
To install the development version:
git clone https://github.com/YOUR_USERNAME/eflowpy.git
cd eflowpy
pip install -e .
๐ Usage Examples
1๏ธโฃ Load Streamflow Data
from eflowpy.utils.data_reader import read_streamflow_data
df = read_streamflow_data("gauge_12013059_daily.csv")
print(df.head())
2๏ธโฃ Calculate Flow Duration Curve (FDC)
from eflowpy.hydrological.fdc import FlowDurationCurve
flow_series = df.iloc[:, 0] # Extract flow column
fdc_method = FlowDurationCurve(flow_series)
fdc = fdc_method.calculate_fdc()
print(fdc.head()) # Show first few rows
3๏ธโฃ Get Specific Q-Values from FDC
q10 = fdc_method.get_flow_at_percentile(10) # Q10 flow
q50 = fdc_method.get_flow_at_percentile(50) # Median flow
q90 = fdc_method.get_flow_at_percentile(90) # Low flow
print(f"Q10: {q10} mยณ/s, Q50: {q50} mยณ/s, Q90: {q90} mยณ/s")
4๏ธโฃ Plot FDC with Optional Q-Values
from eflowpy.utils.plotting import plot_fdc
plot_fdc(fdc, q_values=[1, 5, 10, 50, 90, 95])
๐ Folder Structure
eflowpy/
โโโ eflowpy/
โ โโโ __init__.py
โ โโโ core.py # Base class for Environmental Flow methods
โ โโโ hydrological/ # Hydrological methods directory
โ โ โโโ __init__.py
โ โ โโโ tennant.py # Tennant Method
โ โ โโโ fdc.py # Flow Duration Curve (FDC)
โ โ โโโ sevenq10.py # 7Q10 Method
โ โ โโโ gefc.py # GEFC Method
โ โโโ hydraulic/ # Hydraulic methods directory
โ โ โโโ __init__.py
โ โโโ utils/ # Utility functions
โ โ โโโ __init__.py
โ โ โโโ data_reader.py # Reads streamflow data
โ โ โโโ plotting.py # FDC Plotting functions
โ โโโ setup.py # Package configuration
โโโ examples/ # Example usage scripts
โ โโโ test_fdc.py
โ โโโ test_tennant.py
โโโ README.md # Documentation
โโโ requirements.txt # Dependencies
๐๏ธ Contributing
We welcome contributions! If youโd like to add new methods, improve documentation, or fix bugs, please:
- Fork this repository.
- Create a new branch (
feature-xyz). - Submit a pull request.
๐ License
This project is licensed under the MIT License - feel free to use and modify!
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file eflowpy-0.1.1.tar.gz.
File metadata
- Download URL: eflowpy-0.1.1.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41f36e39e39782703f1f67710c4edc443c20fb073dfdd0ff31accbae97b59e25
|
|
| MD5 |
0e151eb92ffed9cc8c9c4e21c3ac0045
|
|
| BLAKE2b-256 |
e988bfc99ae129968da0daa70355dee26a030add32e3a2f0f85021d39d984182
|
File details
Details for the file eflowpy-0.1.1-py3-none-any.whl.
File metadata
- Download URL: eflowpy-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d005f220e2151d621901c9ece24c49c7975370a9cc93e4a3e5ca31563c426cbd
|
|
| MD5 |
962fcb9d93c0ca07fbd7204f365fadaa
|
|
| BLAKE2b-256 |
f5f57c136668d20bb77086222c13041e66daa8d51104a6140a9d690adc4e97e2
|