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
✔ Handling missing data
Installation
To install eflowpy from PyPI:
pip install eflowpy
To install the development version:
git clone https://github.com/gokhancuceloglu/eflowpy.git
cd eflowpy
pip install -e .
How to Use
** Load Streamflow Data**
from eflowpy.utils.data_reader import read_streamflow_data
df = read_streamflow_data("gauge_12013059_daily.csv")
print(df.head())
** 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
** 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")
** 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
License
This project is licensed under the MIT License.
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.2.tar.gz.
File metadata
- Download URL: eflowpy-0.1.2.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05e80ce4a80dd7cc899ad43bf38f9c0b963fd1bd6448738cd471028a9503aec5
|
|
| MD5 |
06fb0c42d53bc5d544654eb6768ad884
|
|
| BLAKE2b-256 |
0edc34d7cf44d072ecbf5de985231ae6e25d0122e150dd67a521f9da4ea32a1f
|
File details
Details for the file eflowpy-0.1.2-py3-none-any.whl.
File metadata
- Download URL: eflowpy-0.1.2-py3-none-any.whl
- Upload date:
- Size: 11.0 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 |
36775b0cad4d1e74c4762ea227fdfe72924c481a89cd8d638a5d26e897e9e05a
|
|
| MD5 |
f3460dd030bb2904f5f856843598900d
|
|
| BLAKE2b-256 |
d818efca9f161619818bac7e775c0b1031a91810c2b80c2961bdb06a7eb9978b
|