pybfs 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pybfs-0.1.1/LICENSE +22 -0
- pybfs-0.1.1/MANIFEST.in +16 -0
- pybfs-0.1.1/PKG-INFO +127 -0
- pybfs-0.1.1/README.md +99 -0
- pybfs-0.1.1/docs/api/reference.md +6 -0
- pybfs-0.1.1/docs/contributing.md +505 -0
- pybfs-0.1.1/docs/files/2312200_data.csv +366 -0
- pybfs-0.1.1/docs/files/bfs_params_50.csv +51 -0
- pybfs-0.1.1/docs/getting-started/quick-start.md +19 -0
- pybfs-0.1.1/docs/images/figure_1.png +0 -0
- pybfs-0.1.1/docs/images/figure_2.png +0 -0
- pybfs-0.1.1/docs/images/figure_3.png +0 -0
- pybfs-0.1.1/docs/images/pycharm.png +0 -0
- pybfs-0.1.1/docs/images/vscode.png +0 -0
- pybfs-0.1.1/docs/index.md +69 -0
- pybfs-0.1.1/docs/stylesheets/extra.css +12 -0
- pybfs-0.1.1/docs/user-guide/examples.md +257 -0
- pybfs-0.1.1/docs/user-guide/installation.md +25 -0
- pybfs-0.1.1/docs/user-guide/overview.md +169 -0
- pybfs-0.1.1/pybfs/__init__.py +72 -0
- pybfs-0.1.1/pybfs/bfs.py +577 -0
- pybfs-0.1.1/pybfs/calibrate.py +1160 -0
- pybfs-0.1.1/pybfs/plot.py +319 -0
- pybfs-0.1.1/pybfs/utilities.py +1135 -0
- pybfs-0.1.1/pybfs.egg-info/PKG-INFO +127 -0
- pybfs-0.1.1/pybfs.egg-info/SOURCES.txt +29 -0
- pybfs-0.1.1/pybfs.egg-info/dependency_links.txt +1 -0
- pybfs-0.1.1/pybfs.egg-info/requires.txt +16 -0
- pybfs-0.1.1/pybfs.egg-info/top_level.txt +1 -0
- pybfs-0.1.1/pyproject.toml +67 -0
- pybfs-0.1.1/setup.cfg +4 -0
pybfs-0.1.1/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 BYU Hydroinformatics
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
pybfs-0.1.1/MANIFEST.in
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
include README.md
|
|
2
|
+
include LICENSE
|
|
3
|
+
include pyproject.toml
|
|
4
|
+
recursive-include docs *
|
|
5
|
+
global-exclude __pycache__
|
|
6
|
+
global-exclude *.py[co]
|
|
7
|
+
|
|
8
|
+
# Keep sdists lean: exclude large calibration artifacts, datasets, and notebooks
|
|
9
|
+
prune bfs
|
|
10
|
+
prune notebooks
|
|
11
|
+
prune refs
|
|
12
|
+
|
|
13
|
+
exclude *.csv
|
|
14
|
+
exclude *.png
|
|
15
|
+
exclude *.pdf
|
|
16
|
+
|
pybfs-0.1.1/PKG-INFO
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: pybfs
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Python Baseflow Separation - A physically-based baseflow separation algorithm for hydrological analysis
|
|
5
|
+
Author: BYU Hydroinformatics
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/BYU-Hydroinformatics/pybfs
|
|
8
|
+
Project-URL: Documentation, https://github.com/BYU-Hydroinformatics/pybfs
|
|
9
|
+
Project-URL: Repository, https://github.com/BYU-Hydroinformatics/pybfs
|
|
10
|
+
Project-URL: Issues, https://github.com/BYU-Hydroinformatics/pybfs/issues
|
|
11
|
+
Keywords: hydrology,baseflow,baseflow separation,streamflow,groundwater
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Requires-Python: >=3.7
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Provides-Extra: docs
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
|
|
29
|
+
# PyBFS
|
|
30
|
+
|
|
31
|
+
PyBFS - Python Baseflow Separation
|
|
32
|
+
|
|
33
|
+
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.
|
|
34
|
+
|
|
35
|
+
## Features
|
|
36
|
+
|
|
37
|
+
- Physically-based baseflow separation using coupled reservoir models
|
|
38
|
+
- Forecast baseflow using initial conditions
|
|
39
|
+
- Comprehensive visualization tools
|
|
40
|
+
- Well-documented API with NumPy-style docstrings
|
|
41
|
+
|
|
42
|
+
## Installation
|
|
43
|
+
|
|
44
|
+
### From PyPI (recommended)
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
pip install pybfs
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### From source
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
git clone https://github.com/BYU-Hydroinformatics/pybfs.git
|
|
54
|
+
cd pybfs
|
|
55
|
+
pip install .
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Development installation
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
git clone https://github.com/BYU-Hydroinformatics/pybfs.git
|
|
62
|
+
cd pybfs
|
|
63
|
+
pip install -e .
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Quick Start
|
|
67
|
+
|
|
68
|
+
```python
|
|
69
|
+
import pandas as pd
|
|
70
|
+
from pybfs import get_values_for_site, base_table, PyBFS, plot_baseflow_simulation
|
|
71
|
+
|
|
72
|
+
# Load streamflow data
|
|
73
|
+
streamflow_data = pd.read_csv('streamflow.csv')
|
|
74
|
+
|
|
75
|
+
# Load site parameters
|
|
76
|
+
params_df = pd.read_csv('site_parameters.csv')
|
|
77
|
+
|
|
78
|
+
# Get parameters for specific site
|
|
79
|
+
site_number = 2312200
|
|
80
|
+
basin_char, gw_hyd, flow = get_values_for_site(params_df, site_number)
|
|
81
|
+
|
|
82
|
+
# Extract parameters
|
|
83
|
+
area, lb, x1, wb, por = basin_char[0], basin_char[1], basin_char[2], basin_char[3], basin_char[4]
|
|
84
|
+
alpha, beta, ks, kb, kz = gw_hyd[0], gw_hyd[1], gw_hyd[2], gw_hyd[3], gw_hyd[4]
|
|
85
|
+
|
|
86
|
+
# Generate baseflow table
|
|
87
|
+
SBT = base_table(lb, x1, wb, beta, kb, streamflow_data, por)
|
|
88
|
+
|
|
89
|
+
# Run PyBFS baseflow separation
|
|
90
|
+
result = PyBFS(streamflow_data, SBT, basin_char, gw_hyd, flow)
|
|
91
|
+
|
|
92
|
+
# Visualize results
|
|
93
|
+
plot_baseflow_simulation(streamflow_data, result)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Requirements
|
|
97
|
+
|
|
98
|
+
- Python 3.7 or higher
|
|
99
|
+
- numpy >= 1.19.0
|
|
100
|
+
- pandas >= 1.1.0
|
|
101
|
+
- matplotlib >= 3.3.0
|
|
102
|
+
|
|
103
|
+
## Documentation
|
|
104
|
+
|
|
105
|
+
Full documentation is available at: [Documentation](https://github.com/BYU-Hydroinformatics/pybfs)
|
|
106
|
+
|
|
107
|
+
## License
|
|
108
|
+
|
|
109
|
+
This project is licensed under the MIT License - see the LICENSE file for details.
|
|
110
|
+
|
|
111
|
+
## Contributing
|
|
112
|
+
|
|
113
|
+
Contributions are welcome! Please see [CONTRIBUTING.md](docs/contributing.md) for guidelines.
|
|
114
|
+
|
|
115
|
+
## Citation
|
|
116
|
+
|
|
117
|
+
If you use PyBFS in your research, please cite:
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
PyBFS - Python Baseflow Separation
|
|
121
|
+
BYU Hydroinformatics
|
|
122
|
+
https://github.com/BYU-Hydroinformatics/pybfs
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Support
|
|
126
|
+
|
|
127
|
+
For issues, questions, or contributions, please visit: https://github.com/BYU-Hydroinformatics/pybfs/issues
|
pybfs-0.1.1/README.md
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# PyBFS
|
|
2
|
+
|
|
3
|
+
PyBFS - Python Baseflow Separation
|
|
4
|
+
|
|
5
|
+
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.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- Physically-based baseflow separation using coupled reservoir models
|
|
10
|
+
- Forecast baseflow using initial conditions
|
|
11
|
+
- Comprehensive visualization tools
|
|
12
|
+
- Well-documented API with NumPy-style docstrings
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
### From PyPI (recommended)
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pip install pybfs
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### From source
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
git clone https://github.com/BYU-Hydroinformatics/pybfs.git
|
|
26
|
+
cd pybfs
|
|
27
|
+
pip install .
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Development installation
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
git clone https://github.com/BYU-Hydroinformatics/pybfs.git
|
|
34
|
+
cd pybfs
|
|
35
|
+
pip install -e .
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Quick Start
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
import pandas as pd
|
|
42
|
+
from pybfs import get_values_for_site, base_table, PyBFS, plot_baseflow_simulation
|
|
43
|
+
|
|
44
|
+
# Load streamflow data
|
|
45
|
+
streamflow_data = pd.read_csv('streamflow.csv')
|
|
46
|
+
|
|
47
|
+
# Load site parameters
|
|
48
|
+
params_df = pd.read_csv('site_parameters.csv')
|
|
49
|
+
|
|
50
|
+
# Get parameters for specific site
|
|
51
|
+
site_number = 2312200
|
|
52
|
+
basin_char, gw_hyd, flow = get_values_for_site(params_df, site_number)
|
|
53
|
+
|
|
54
|
+
# Extract parameters
|
|
55
|
+
area, lb, x1, wb, por = basin_char[0], basin_char[1], basin_char[2], basin_char[3], basin_char[4]
|
|
56
|
+
alpha, beta, ks, kb, kz = gw_hyd[0], gw_hyd[1], gw_hyd[2], gw_hyd[3], gw_hyd[4]
|
|
57
|
+
|
|
58
|
+
# Generate baseflow table
|
|
59
|
+
SBT = base_table(lb, x1, wb, beta, kb, streamflow_data, por)
|
|
60
|
+
|
|
61
|
+
# Run PyBFS baseflow separation
|
|
62
|
+
result = PyBFS(streamflow_data, SBT, basin_char, gw_hyd, flow)
|
|
63
|
+
|
|
64
|
+
# Visualize results
|
|
65
|
+
plot_baseflow_simulation(streamflow_data, result)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Requirements
|
|
69
|
+
|
|
70
|
+
- Python 3.7 or higher
|
|
71
|
+
- numpy >= 1.19.0
|
|
72
|
+
- pandas >= 1.1.0
|
|
73
|
+
- matplotlib >= 3.3.0
|
|
74
|
+
|
|
75
|
+
## Documentation
|
|
76
|
+
|
|
77
|
+
Full documentation is available at: [Documentation](https://github.com/BYU-Hydroinformatics/pybfs)
|
|
78
|
+
|
|
79
|
+
## License
|
|
80
|
+
|
|
81
|
+
This project is licensed under the MIT License - see the LICENSE file for details.
|
|
82
|
+
|
|
83
|
+
## Contributing
|
|
84
|
+
|
|
85
|
+
Contributions are welcome! Please see [CONTRIBUTING.md](docs/contributing.md) for guidelines.
|
|
86
|
+
|
|
87
|
+
## Citation
|
|
88
|
+
|
|
89
|
+
If you use PyBFS in your research, please cite:
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
PyBFS - Python Baseflow Separation
|
|
93
|
+
BYU Hydroinformatics
|
|
94
|
+
https://github.com/BYU-Hydroinformatics/pybfs
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Support
|
|
98
|
+
|
|
99
|
+
For issues, questions, or contributions, please visit: https://github.com/BYU-Hydroinformatics/pybfs/issues
|