(right click to open in a new window)
This is a short course for the HexWatershed model.
HexWatershed: a mesh independent flow direction model for hydrologic models.
For full details of the model, please refer to our papers and the HexWatershed documentation (https://hexwatershed.readthedocs.io/).
You need internet connection to install the through the Python Pip or Conda (recommended) system.
You can use the Visual Studio Code to run the Python examples.
You can use QGIS to visualize some of the model results.
- Install the HexWatershed Python package through Conda
-
conda create --name hexwatershed_tutorial python numpy gdal cartopy libgdal-arrow-parquet pyearth pyflowline -
conda activate hexwatershed_tutorial -
conda install -c conda-forge hexwatershed
-
Download this tutorial
git clone https://github.com/changliao1025/hexwatershed_tutorial.git -
Run the examples within the
examplesornotebooksfolder
- Edit the template
configurationjson file to match with your data set paths.
- View and visualize model output files.
-
View normal json file using any text editor such as VS Code.
-
Visualize
geojsonfiles usingQGIS.
-
Why my
condacannot create environment?Turn off the VPN or bypass it.
-
Why import
GDALfailed?Consider using the
conda-forgechannel. -
projrelated issue OSGeo/gdal#1546,Make sure you correctly set up the
PROJ_LIBBecause the
GDALlibrary is used by this project and theprojlibrary is often not configured correctly automatically. On Linux or Mac, you can set it up using the.bash_profilesuch as:Anaconda:
export PROJ_LIB=/people/user/.conda/envs/hexwatershed_tutorial/share/projMiniconda:
export PROJ_LIB=/opt/miniconda3/envs/hexwatershed_tutorial/share/proj -
What if my model doesn't produce the correct or expected answer?
Answer: There are several hidden assumptions within the workflow. For example, if you provide the DEM and river network for two different regions, the program won't be able to tell you that. A visual inspection of your data is important.
Optionally, you can turn on the
iFlag_debugoption in the configuration file to output theintermediate files.
-
JIGSAWis the mesh generator that is used to generator the variable resolution meshes. -
Other meshes such as
DGGridwill be supported. -
The depression filling algorithm is modified based on the
RichDEMpriority-flood depression filling method. -
HexWatershed can be run at both regional and global scale, see this Youtube clip for example:
Global scale HexWatershed simulation
-
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
-
Liao. C. (2022). Pyflowline: a mesh independent river network generator for hydrologic models. Zenodo. https://doi.org/10.5281/zenodo.6407299
-
Liao. C. (2022). HexWatershed: a mesh independent flow direction model for hydrologic models (0.1.1). Zenodo. https://doi.org/10.5281/zenodo.6425881