Skip to content

changliao1025/hexwatershed_tutorial

Repository files navigation

Binder (right click to open in a new window)

Introduction

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/).

Requirements

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.

Step-by-step instruction

  1. 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

  1. Download this tutorial

    git clone https://github.com/changliao1025/hexwatershed_tutorial.git

  2. Run the examples within the examples or notebooks folder

  • Edit the template configuration json file to match with your data set paths.
  1. View and visualize model output files.
  • View normal json file using any text editor such as VS Code.

  • Visualize geojson files using QGIS.

FAQ

  1. Why my conda cannot create environment?

    Turn off the VPN or bypass it.

  2. Why import GDAL failed?

    Consider using the conda-forge channel.

  3. 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 the proj 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

  4. 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 the intermediate files.

Learn more

  1. JIGSAW is the mesh generator that is used to generator the variable resolution meshes.

  2. Other meshes such as DGGrid will be supported.

  3. The depression filling algorithm is modified based on the RichDEM priority-flood depression filling method.

  4. HexWatershed can be run at both regional and global scale, see this Youtube clip for example: Global scale HexWatershed simulation

References

About

A short course for the HexWatershed model

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages