### PyFlowline
[![DOI](https://joss.theoj.org/papers/10.21105/joss.05446/status.svg)](https://doi.org/10.21105/joss.05446)
[![DOI](https://zenodo.org/badge/368338554.svg)](https://zenodo.org/badge/latestdoi/368338554)
[![Downloads](https://static.pepy.tech/badge/pyflowline)](https://pepy.tech/project/pyflowline)
PyFlowline: a mesh-independent river network generator for hydrologic models.
### Quickstart
Please refer to the [quickstart documentation](https://pyflowline.readthedocs.io/en/latest/quickstart.html) for details on how to get started using the PyFlowline package.
PyFlowline is mesh independent, meaning you can apply it to both structured
1. traditional rectangle projected mesh
2. latitude-longitude
3. hexagon
4. dggs ([dggrid](https://github.com/sahrk/DGGRID))
and unstructured mesh systems
1. Model for Prediction Across Scales mesh ([MPAS](https://github.com/MPAS-Dev))
2. Triangulated Irregular Network (TIN) mesh
This package generates the mesh cell-based conceptual river networks using the following steps:
1. `Flowline simplification`: PyFlowline checks the vector dataset and corrects undesired flowlines, such as braided rivers.
2. `Mesh generation`: PyFlowline generates structured meshes (e.g., rectangle, hexagon) or imports user-provided unstructured meshes into the PyFlowline-compatible GEOJSON format.
3. `Topological relationship reconstruction`: PyFlowline reconstructs the topological relationship using the mesh and flowline intersections.
### Dependency
PyFlowline depends on the following packages
1. `numpy`
2. `gdal`
3. `netCDF4`
PyFlowline also has three optional dependency packages
1. `cython` for performance
2. `matplotlib` for visualization
3. `cartopy` for visulization
4. `simplekml` for Google Earth KML support
### Installation
Please refer to the [official documentation](https://pyflowline.readthedocs.io/) 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
1. 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.
2. 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
Raw data
{
"_id": null,
"home_page": "https://github.com/changliao1025/pyflowline",
"name": "pyflowline",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8.0",
"maintainer_email": null,
"keywords": "Earth Science",
"author": "Chang Liao",
"author_email": "chang.liao@pnnl.gov",
"download_url": "https://files.pythonhosted.org/packages/1d/27/db9cd3c35a9fdac0e47159d27f60a72d25b7c66c3a5d3505dc843055c7a9/pyflowline-0.3.10.tar.gz",
"platform": null,
"description": "\n### PyFlowline\n\n[![DOI](https://joss.theoj.org/papers/10.21105/joss.05446/status.svg)](https://doi.org/10.21105/joss.05446)\n[![DOI](https://zenodo.org/badge/368338554.svg)](https://zenodo.org/badge/latestdoi/368338554)\n[![Downloads](https://static.pepy.tech/badge/pyflowline)](https://pepy.tech/project/pyflowline)\n\nPyFlowline: a mesh-independent river network generator for hydrologic models. \n\n### Quickstart\n\nPlease refer to the [quickstart documentation](https://pyflowline.readthedocs.io/en/latest/quickstart.html) for details on how to get started using the PyFlowline package.\n\nPyFlowline is mesh independent, meaning you can apply it to both structured \n\n1. traditional rectangle projected mesh \n2. latitude-longitude \n3. hexagon\n4. dggs ([dggrid](https://github.com/sahrk/DGGRID))\n\nand unstructured mesh systems \n\n1. Model for Prediction Across Scales mesh ([MPAS](https://github.com/MPAS-Dev))\n2. Triangulated Irregular Network (TIN) mesh\n\nThis package generates the mesh cell-based conceptual river networks using the following steps:\n\n1. `Flowline simplification`: PyFlowline checks the vector dataset and corrects undesired flowlines, such as braided rivers.\n2. `Mesh generation`: PyFlowline generates structured meshes (e.g., rectangle, hexagon) or imports user-provided unstructured meshes into the PyFlowline-compatible GEOJSON format.\n3. `Topological relationship reconstruction`: PyFlowline reconstructs the topological relationship using the mesh and flowline intersections.\n\n### Dependency\n\nPyFlowline depends on the following packages\n\n1. `numpy`\n2. `gdal`\n3. `netCDF4`\n\nPyFlowline also has three optional dependency packages\n\n1. `cython` for performance \n2. `matplotlib` for visualization\n3. `cartopy` for visulization\n4. `simplekml` for Google Earth KML support\n\n### Installation\n\nPlease refer to the [official documentation](https://pyflowline.readthedocs.io/) for details on how to install the PyFlowline package.\n\n### Application\n\nWe 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.\n\n### Acknowledgment\n\nThis 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.\n\nThis 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.\n\nThis 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. \n\n### License\n\nBSD 3-Clause License\n\nCopyright \u00a9 2022, Battelle Memorial Institute\n\n1. 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 \u201cthe Software\u201d) 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:\n\n* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers.\n\n* 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.\n\n* 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.\n\n2. 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.\n\n### References\n\nSeveral 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:\n\n* 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\n\n* Liao. C. Cooper, M (2022) Pyflowline: a mesh-independent river network generator for hydrologic models. Zenodo.\nhttps://doi.org/10.5281/zenodo.6407298\n\n* 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\n",
"bugtrack_url": null,
"license": "custom",
"summary": "A mesh-independent river network generator for hydrologic models",
"version": "0.3.10",
"project_urls": {
"Homepage": "https://github.com/changliao1025/pyflowline"
},
"split_keywords": [
"earth",
"science"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fb654d2e2963bb62e796bd0c79fe594c01e8862e0ccb758d1deb44a727420ce3",
"md5": "d52a704c1517e8695797ef91db417f58",
"sha256": "5c2a9e5c39f6466b2371690fcb5c64f73fd85c117b9c965368ed6a1e26e0197f"
},
"downloads": -1,
"filename": "pyflowline-0.3.10-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "d52a704c1517e8695797ef91db417f58",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.8.0",
"size": 126510,
"upload_time": "2024-05-09T22:43:07",
"upload_time_iso_8601": "2024-05-09T22:43:07.248945Z",
"url": "https://files.pythonhosted.org/packages/fb/65/4d2e2963bb62e796bd0c79fe594c01e8862e0ccb758d1deb44a727420ce3/pyflowline-0.3.10-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1d27db9cd3c35a9fdac0e47159d27f60a72d25b7c66c3a5d3505dc843055c7a9",
"md5": "cbd2e6c5394abebc97b9382f0d844037",
"sha256": "4cc3c52f501455293fc144732175ef67a65d227bafb2b906ad6fe0fa60c89103"
},
"downloads": -1,
"filename": "pyflowline-0.3.10.tar.gz",
"has_sig": false,
"md5_digest": "cbd2e6c5394abebc97b9382f0d844037",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8.0",
"size": 5223566,
"upload_time": "2024-05-09T22:43:09",
"upload_time_iso_8601": "2024-05-09T22:43:09.189167Z",
"url": "https://files.pythonhosted.org/packages/1d/27/db9cd3c35a9fdac0e47159d27f60a72d25b7c66c3a5d3505dc843055c7a9/pyflowline-0.3.10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-09 22:43:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "changliao1025",
"github_project": "pyflowline",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "pyflowline"
}