PyFlowline
A mesh independent river network generator for hydrologic models.
https://github.com/changliao1025/pyflowline
Category: Hydrosphere
Sub Category: Freshwater and Hydrology
Keywords
earth-system-model gis graph hydrology river
Keywords from Contributors
archiving transforms meshing measur generic conversion observation projection animals watershed
Last synced: about 13 hours ago
JSON representation
Repository metadata
A mesh independent river network generator for hydrologic models
- Host: GitHub
- URL: https://github.com/changliao1025/pyflowline
- Owner: changliao1025
- License: bsd-3-clause
- Created: 2021-05-17T22:36:44.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-02-05T23:42:31.000Z (3 months ago)
- Last Synced: 2025-04-22T07:01:57.723Z (5 days ago)
- Topics: earth-system-model, gis, graph, hydrology, river
- Language: Jupyter Notebook
- Homepage: https://pyflowline.readthedocs.io/
- Size: 66.8 MB
- Stars: 22
- Watchers: 1
- Forks: 4
- Open Issues: 54
- Releases: 45
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
- Citation: CITATION.cff
- Authors: AUTHORS.rst
README.md
PyFlowline
PyFlowline: a mesh-independent river network generator for hydrologic models.
Quickstart
Please refer to the quickstart documentation for details on how to get started using the PyFlowline package.
PyFlowline is mesh independent, meaning you can apply it to both structured
- traditional rectangle projected mesh
- latitude-longitude
- hexagon
- dggs (dggrid)
and unstructured mesh systems
- Model for Prediction Across Scales mesh (MPAS)
- Triangulated Irregular Network (TIN) mesh
This package generates the mesh cell-based conceptual river networks using the following steps:
Flowline simplification
: PyFlowline checks the vector dataset and corrects undesired flowlines, such as braided rivers.Mesh generation
: PyFlowline generates structured meshes (e.g., rectangle, hexagon) or imports user-provided unstructured meshes into the PyFlowline-compatible GEOJSON format.Topological relationship reconstruction
: PyFlowline reconstructs the topological relationship using the mesh and flowline intersections.
Dependency
PyFlowline depends on the following packages
numpy
gdal
netCDF4
PyFlowline also has three optional dependency packages
cython
for performancematplotlib
for visualizationcartopy
for visulizationsimplekml
for Google Earth KML support
Installation
Please refer to the official documentation for details on how to install the PyFlowline package.
Application
We provide several examples in the examples
folder to demonstrate the model capability. We also recommend starting with the notebooks/mpas_example.ipynb
notebook, after following the Quickstart and Installation instructions.
Acknowledgment
This work was supported by the Earth System Model Development program areas of the U.S. Department of Energy, Office of Science, Office of Biological and Environmental Research as part of the multi-program, collaborative Integrated Coastal Modeling (ICoM) project and the Interdisciplinary Research for Arctic Coastal Environments (InteRFACE) project.
This research was supported as part of the Next Generation Ecosystem Experiments-Tropics, funded by the U.S. Department of Energy, Office of Science, Office of Biological and Environmental Research at Pacific Northwest National Laboratory. The study was also partly supported by U.S. Department of Energy Office of Science Biological and Environmental Research through the Earth and Environmental System Modeling program as part of the Energy Exascale Earth System Model (E3SM) project.
This research was supported by the Next Generation Ecosystem Experiments-Tropics project, funded by the U.S. Department of Energy, Office of Science, Office of Biological and Environmental Research at Pacific Northwest National Laboratory.
License
BSD 3-Clause License
Copyright © 2022, Battelle Memorial Institute
- Battelle Memorial Institute (hereinafter Battelle) hereby grants permission to any person or entity lawfully obtaining a copy of this software and associated documentation files (hereinafter “the Software”) to redistribute and use the Software in source and binary forms, with or without modification. Such person or entity may use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software and may permit others to do so, subject to the following conditions:
-
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers.
-
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
Other than as used herein, neither the name Battelle Memorial Institute or Battelle may be used in any form whatsoever without the express written consent of Battelle.
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BATTELLE OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
References
Several publications describe the algorithms used in PyFlowline
in detail. If you make use of PyFlowline
in your work, please consider including a reference to the following:
-
Liao et al., (2023). pyflowline: a mesh-independent river network generator for hydrologic models. Journal of Open Source Software, 8(91), 5446, https://doi.org/10.21105/joss.05446
-
Liao. C. Cooper, M (2022) Pyflowline: a mesh-independent river network generator for hydrologic models. Zenodo.
https://doi.org/10.5281/zenodo.6407298 -
Liao, C., Zhou, T., Xu, D., Cooper, M. G., Engwirda, D., Li, H.-Y., & Leung, L. R. (2023). Topological relationship-based flow direction modeling: Mesh-independent river networks representation. Journal of Advances in Modeling Earth Systems, 15, e2022MS003089. https://doi.org/10.1029/2022MS003089
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: Liao given-names: Chang orcid: https://orcid.org/0000-0002-7348-8858 - family-names: Cooper given-names: Matt orcid: https://orcid.org/0000-0002-0165-209X title: "Pyflowline: a mesh-independent river networks generator for hydrologic models" version: 0.1.22 doi: 10.5281/zenodo.6407299 date-released: 2022-03-31
Owner metadata
- Name: Chang Liao
- Login: changliao1025
- Email:
- Kind: user
- Description: 工欲善其事,必先利其器。
- Website: https://changliao.github.io/
- Location: Richland, WA
- Twitter: changliao1025
- Company: Pacific Northwest National Laboratory
- Icon url: https://avatars.githubusercontent.com/u/20618384?u=41fd98f275af9968990d0d90da5829b90632b984&v=4
- Repositories: 8
- Last ynced at: 2023-03-05T08:09:38.785Z
- Profile URL: https://github.com/changliao1025
GitHub Events
Total
- Issues event: 2
- Watch event: 1
- Push event: 4
Last Year
- Issues event: 2
- Watch event: 1
- Push event: 4
Committers metadata
Last synced: 4 days ago
Total Commits: 739
Total Committers: 6
Avg Commits per committer: 123.167
Development Distribution Score (DDS): 0.147
Commits in past year: 152
Committers in past year: 4
Avg Commits per committer in past year: 38.0
Development Distribution Score (DDS) in past year: 0.164
Name | Commits | |
---|---|---|
changliao1025 | c****5@o****m | 630 |
Chang Liao | 2****5 | 68 |
mgcooper | m****r@g****m | 21 |
Chang Liao | c****5@g****m | 18 |
Hauke Schulz | 4****s | 1 |
dependabot[bot] | 4****] | 1 |
Committer domains:
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 36
Total pull requests: 157
Average time to close issues: about 2 months
Average time to close pull requests: about 1 hour
Total issue authors: 5
Total pull request authors: 4
Average comments per issue: 0.83
Average comments per pull request: 0.01
Merged pull request: 146
Bot issues: 0
Bot pull requests: 1
Past year issues: 5
Past year pull requests: 13
Past year average time to close issues: N/A
Past year average time to close pull requests: about 2 hours
Past year issue authors: 2
Past year pull request authors: 2
Past year average comments per issue: 1.0
Past year average comments per pull request: 0.08
Past year merged pull request: 12
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- changliao1025 (30)
- smchartrand (2)
- andres-patrignani (2)
- donghuix (1)
- mgcooper (1)
Top Pull Request Authors
- changliao1025 (148)
- mgcooper (7)
- dependabot[bot] (1)
- observingClouds (1)
Top Issue Labels
Top Pull Request Labels
- dependencies (1)
Package metadata
- Total packages: 2
-
Total downloads:
- pypi: 1,635 last-month
- Total dependent packages: 2 (may contain duplicates)
- Total dependent repositories: 1 (may contain duplicates)
- Total versions: 50
- Total maintainers: 1
pypi.org: pyflowline
A mesh-independent river network generator for hydrologic models
- Homepage: https://github.com/changliao1025/pyflowline
- Documentation: https://pyflowline.readthedocs.io/
- Licenses: custom
- Latest release: 0.3.10 (published 12 months ago)
- Last Synced: 2025-04-25T13:04:58.540Z (1 day ago)
- Versions: 42
- Dependent Packages: 1
- Dependent Repositories: 1
- Downloads: 1,635 Last month
-
Rankings:
- Dependent packages count: 4.791%
- Stargazers count: 15.638%
- Average: 16.252%
- Downloads: 16.659%
- Dependent repos count: 21.535%
- Forks count: 22.64%
- Maintainers (1)
conda-forge.org: pyflowline
- Homepage: https://github.com/changliao1025/pyflowline
- Licenses: BSD-3-Clause
- Latest release: 0.1.31 (published almost 3 years ago)
- Last Synced: 2025-04-01T02:11:25.059Z (26 days ago)
- Versions: 8
- Dependent Packages: 1
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 28.82%
- Dependent repos count: 34.025%
- Average: 43.369%
- Stargazers count: 49.578%
- Forks count: 61.053%
Dependencies
- breathe *
- actions/checkout v3 composite
- actions/upload-artifact v1 composite
- openjournals/openjournals-draft-action master composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- pypa/gh-action-pypi-publish 27b31702a0e7fc50959f5ad993c78deac1bdfc29 composite
- Cython ==0.23.3
Score: 13.524334388258216