Description:
Calculates the topographic wetness index (TWI) and width function for Topmodel (version 0)
This code:
- Download data from http://web.corral.tacc.utexas.edu/nfiedata/HAND/ for the desired HUC06 of interest
- Allows the use of 10 or 30 meters DEM
- Calculate a raster with the Topmodel topographic wetness index (TWI)
- For each sub-basin in the HUC06, calculate the TWI histogram (maximum 30 classes)
- Calculates a raster with the distance to the outlet
- For each sub-basin in the HUC06, calculate the Width Function with 500 meters increament to a maximum of 2500 meteres
- Generates the subcat.dat file needed to run topmodel - the file name contains the ID of the sub-basin.
The others folder contains functions to plot the outputs, and to run topmodel for all catchments the data was generated for.
This code was tested in linux
-
TauDEM (which requires gdal, mpiexec,... see https://github.com/dtarb/TauDEM)
-
Python if the TWI histogram per basin will be created. Anaconda distribution was used but is not a requirement. The following libraries are used in python:
- osgeo (gdal,ogr)
- numpy
- agparse
- pandas
-
Curl to download the HAND DEM data
- Edit the workflow_hand_twi_giuh.env file. This file contains all parameters for the runs, including the HUC06 number, path to the hydrofabrics, and environmental variabels for TAUDEM and gdal
- Run: source workflow_hand_twi_giuh.sh
- hydrofabrics if the TWI histogram per basin will be created
- The HUC06 of the area covered by the watershed
- If the polygons in the hydrofabric covers multiple HUC06, all HUC06 can be specified in the "workflow_hand_twi_giuh.env" file