Skip to main content

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])

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

eflowpy-0.1.3.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

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

eflowpy-0.1.3-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file eflowpy-0.1.3.tar.gz.

File metadata

  • Download URL: eflowpy-0.1.3.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for eflowpy-0.1.3.tar.gz
Algorithm Hash digest
SHA256 a482e090e5f702dfc0c0d0e1bd3feeaf20b73f5b821c31acd08ad2947b1f8f5e
MD5 7bf15f9efda016cb3c5e1823cacf42aa
BLAKE2b-256 7ade427d42bbbbc7762dc3876e805a9584906cd5000952ae3dd38c0ba01112a1

See more details on using hashes here.

File details

Details for the file eflowpy-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: eflowpy-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for eflowpy-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 575adc78e00c26719e0e6617075de822475dac89a511911845c8c693704b8985
MD5 12053b91bec5da5eec66f553af3e9393
BLAKE2b-256 16e741cf32c98fa1e4498987cd32826da546b0cd88742c3fadce7345718ab1a0

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