River network for Earth Science
Project description
Pyflowline
The Pyflowline model is a Python package to generate conceptual river networks for hydrologic models.
PyFlowline is mesh independent, meaning you can apply it to both structured (e.g., tradition rectangle mesh, latitude-longitude, hexagon) and unstructured mesh systems (e.g., Triangulated Irregular Network (TIN) mesh and MPAS mesh).
This package runs three steps in general:
- pre-process the existing vector river flowlines. In this step, PyFlowline will check the vector dataset and correct undesired flaws such as braided rivers. The output is a much simplified flowline dataset.
- mesh generation. In this step, PyFlowline will generate various structured meshes (e.g., rectangle, hexagon). Users can also use other unstructured meshes, which can be coverted to the PyFlowline format.
- Re-construct the topological relationship using the mesh and flowline intersections. In this step, PyFlowline will build the topological relationship between mesh cells using the vector flowline and mesh intersection.
Installation
As of right now, the easiest way you can install PyFlowline is through the Conda platform:
-
install the package from the conda forge channel
conda install -c conda-forge pyflowline
Usage
We use the notebook.py example file under the the notebook directory to showcase the model workflow. An additional Python package is required for the visualization purpose.
The following steps are recommended:
-
Open the terminal or use your preferred Conda application to create a new Conda environment:
- conda create --name pyflowline python=3.8
-
Activate the newly crated conda environment
- conda activate pyflowline
-
Install dependency packages using conda
- conda install -c conda-forge pyflowline
-
Install and setup the Python Jupyter Notebook
-
Clone this repository and set this environment as the workspace environment
-
Navigate to the notebook and run it in your preferred Python IDE.
Because of the Python package dependency issue, the visulization should use a different environment or using the QGIS.
Acknowledgement
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. The data used for model simulations can be downloaded through the USGS website (https://www.usgs.gov/national-hydrography). The Pyflowline model can be accessed through the Python Package Index service (https://pypi.org/project/pyflowline/).
Citation
-
Liao, Chang, Tian Zhou, Donghui Xu, Richard Barnes, Gautam Bisht, Hong-Yi Li, Zeli Tan, et al. (02/2022AD) 2022. “Advances In Hexagon Mesh-Based Flow Direction Modeling”. Advances In Water Resources 160. Elsevier BV: 104099. https://doi.org/10.1016/j.advwatres.2021.104099.
-
Liao, C., Tesfa, T., Duan, Z., & Leung, L. R. (2020). Watershed delineation on a hexagonal mesh grid. Environmental Modelling & Software, 128, 104702. https://doi.org/10.1016/j.envsoft.2020.104702
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
Hashes for pyflowline-0.1.22-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 662a5592715ab1f1a5a2457181f7aff5c9a92083bd4fbf4204a48ade839c84af |
|
MD5 | 4f770bf442bd87452847a8f0636ebdf0 |
|
BLAKE2b-256 | fbee0cc6aaead5e4b97ab42006fd6cdaf0836ff4c9faae2c2cdecf8739978bf7 |