(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
examples
ornotebooks
folder
- Edit the template
configuration
json 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
geojson
files usingQGIS
.
-
Why my
conda
cannot create environment?Turn off the VPN or bypass it.
-
Why import
GDAL
failed?Consider using the
conda-forge
channel. -
proj
related issue OSGeo/gdal#1546,Make sure you correctly set up the
PROJ_LIB
Because the
GDAL
library is used by this project and theproj
library is often not configured correctly automatically. On Linux or Mac, you can set it up using the.bash_profile
such as:Anaconda:
export PROJ_LIB=/people/user/.conda/envs/hexwatershed_tutorial/share/proj
Miniconda:
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_debug
option in the configuration file to output theintermediate files
.
-
JIGSAW
is the mesh generator that is used to generator the variable resolution meshes. -
Other meshes such as
DGGrid
will be supported. -
The depression filling algorithm is modified based on the
RichDEM
priority-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