Python Baseflow Separation - A physically-based baseflow separation algorithm for hydrological analysis
Project description
PyBFS
PyBFS - Python Baseflow Separation
A Python implementation of physically-based Baseflow Separation algorithms for hydrological analysis. PyBFS uses a coupled surface-subsurface reservoir model to separate total streamflow into surface flow, baseflow, and direct runoff components.
Features
- Physically-based baseflow separation using coupled reservoir models
- Forecast baseflow using initial conditions
- Comprehensive visualization tools
- Well-documented API with NumPy-style docstrings
Installation
From PyPI (recommended)
pip install pybfs
From source
git clone https://github.com/BYU-Hydroinformatics/pybfs.git
cd pybfs
pip install .
Development installation
git clone https://github.com/BYU-Hydroinformatics/pybfs.git
cd pybfs
pip install -e .
Quick Start
import pandas as pd
from pybfs import get_values_for_site, base_table, PyBFS, plot_baseflow_simulation
# Load streamflow data
streamflow_data = pd.read_csv('streamflow.csv')
# Load site parameters
params_df = pd.read_csv('site_parameters.csv')
# Get parameters for specific site
site_number = 2312200
basin_char, gw_hyd, flow = get_values_for_site(params_df, site_number)
# Extract parameters
area, lb, x1, wb, por = basin_char[0], basin_char[1], basin_char[2], basin_char[3], basin_char[4]
alpha, beta, ks, kb, kz = gw_hyd[0], gw_hyd[1], gw_hyd[2], gw_hyd[3], gw_hyd[4]
# Generate baseflow table
SBT = base_table(lb, x1, wb, beta, kb, streamflow_data, por)
# Run PyBFS baseflow separation
result = PyBFS(streamflow_data, SBT, basin_char, gw_hyd, flow)
# Visualize results
plot_baseflow_simulation(streamflow_data, result)
Requirements
- Python 3.7 or higher
- numpy >= 1.19.0
- pandas >= 1.1.0
- matplotlib >= 3.3.0
Documentation
Full documentation is available at: Documentation
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
Citation
If you use PyBFS in your research, please cite:
PyBFS - Python Baseflow Separation
BYU Hydroinformatics
https://github.com/BYU-Hydroinformatics/pybfs
Support
For issues, questions, or contributions, please visit: https://github.com/BYU-Hydroinformatics/pybfs/issues
Project details
Release history Release notifications | RSS feed
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 pybfs-0.1.1.tar.gz.
File metadata
- Download URL: pybfs-0.1.1.tar.gz
- Upload date:
- Size: 220.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98d7cd79f926086a82899f8f3d77291028aff9e99fd9cb53da16b8cd7527543d
|
|
| MD5 |
d348e944bda6010d1973be467493a6dd
|
|
| BLAKE2b-256 |
2d74b68b50b1a531434947014096292efc873a917a4c028934eb9e5995304735
|
File details
Details for the file pybfs-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pybfs-0.1.1-py3-none-any.whl
- Upload date:
- Size: 34.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d512168ab17941978f54bd9a1c54382a02271c992c5190b7d2de1502e873d29e
|
|
| MD5 |
51b5b20d909072a4309734d61ff67397
|
|
| BLAKE2b-256 |
d08a94be616c50443cd68d63799fe59a008e3016a47282bf2cc7fbc9893e85a4
|