TauDEM 5.1 GUIDE TO USING THE TAUDEM COMMAND LINE FUNCTIONS

Please download to get full document.

View again

of 28
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Information Report
Category:

Environment

Published:

Views: 13 | Pages: 28

Extension: PDF | Download: 0

Share
Related documents
Description
TauDEM 5.1 GUIDE TO USING THE TAUDEM COMMAND LINE FUNCTIONS August 2013 David G. Tarboton Page 1 Purpose The purpose of this document is to introduce Hydrologic Terrain Analysis using the TauDEM command
Transcript
TauDEM 5.1 GUIDE TO USING THE TAUDEM COMMAND LINE FUNCTIONS August 2013 David G. Tarboton Page 1 Purpose The purpose of this document is to introduce Hydrologic Terrain Analysis using the TauDEM command line functionality. TauDEM (Terrain Analysis Using Digital Elevation Models) is a set of Digital Elevation Model (DEM) tools for the extraction and analysis of hydrologic information from topography as represented by a DEM. This is software developed at Utah State University (USU) for hydrologic digital elevation model analysis and watershed delineation and may be obtained from The architecture of TauDEM separates the system into a set of command line executable functions that comprise the engine that does the work, and a graphic user interface developed as a toolbox for ArcGIS. The ArcGIS toolbox is documented in a separate quick start guide and in comprehensive online documentation within the ArcGIS toolbox. This document focuses on the command line functions. These have been coded in C++ that is intended to be platform independent. The ArcGIS toolbox uses system calls to run these functions so running these functions from the command line produces exactly the same output as an equivalent ArcGIS toolbox function. In this guide we assume that you are working on a Windows PC, although much of the functionality is generic and can be (with knowledge of the other system) be transferred to other systems. To use TauDEM command line functions you need the TauDEM 5 software as well as MPI software. Our current Windows PC precompiled executables have been compiled using the Microsoft HPC Pack 2012 MS MPI libraries from us/download/details.aspx?id= Earlier versions used MPICH2 from MPICH2 libraries are suggested for non Windows installations. MPI and TauDEM Installation For this guide we assume that the installation is done to the default locations on the C: drive of a 64 bit Windows PC: Download TauDEM install file TauDEM511.exe or more recent equivalent. This is a Winzip self extracting file that installs the necessary MPI and runtime libraries and then installs TauDEM Run (double click) TauDEM511.exe. Respond Yes to the user account control dialog. Respond OK to the TauDEM install dialog Click Setup at the Install libraries required for TauDEM dialog Page 2 Acknowledge read and accept license terms for the Microsoft software being installed and click install Repeat for all the libraries to install Click Next multiple times at the TauDEM Setup Wizard Page 3 That is it. TauDEM has been installed. The installer did the following Installed Visual Studio 2010 C++ runtime libraries vcredist_x86_2010.exe Installed Visual Studio 2010 C++ runtime libraries vcredist_x64_2010.exe if a 64 bit platform Installed Microsoft HPC Pack 2012 MS MPI from mpi_x64.msi or mpi_x86.msi depending on your platform. Installed TauDEM from TaudemSetup_x86.msi or TaudemSetup_x64.msi depending on your platform The script used off IF EXIST %PROGRAMFILES(X86)% (GOTO 64BIT) ELSE (GOTO 32BIT) :64BIT REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\1D5E3C0FEDA1E FED06E995A infinity 2 &1 IF %errorlevel%==0 GOTO :SKIPX86REDIST rem echo Starting Visual C Redistributable (32-bit) installation... vcredist_x86_2010.exe /norestart Page 4 :SKIPX86REDIST REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\1926E8D15D0BCE F760A7F infinity 2 &1 IF %errorlevel%==0 GOTO :SKIPX64REDIST rem echo Starting Visual C Redistributable (64-bit) installation... vcredist_x64_2010.exe /norestart :SKIPX64REDIST REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\618A082FBC0C00743A6CF9 DDC808DF81 infinity 2 &1 IF %errorlevel%==0 GOTO :SKIPMICROSOFTHPC rem echo Starting Microsoft HPC Pack 2012 MS-MPI (64-bit) installation... mpi_x64.msi /norestart :SKIPMICROSOFTHPC rem echo Starting TauDEM (64-bit) installation... TaudemSetup_x64.msi GOTO END :32BIT REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\1D5E3C0FEDA1E FED06E995A infinity 2 &1 IF %errorlevel%==0 GOTO :SKIPX86REDIST rem echo Starting Visual C Redistributable (32-bit) installation... vcredist_x86_2010.exe /norestart :SKIPX86REDIST REG QUERY HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products\2B417A095389B814BBF026 57C04C242B infinity 2 &1 IF %errorlevel%==0 GOTO :SKIPMICROSOFTHPC rem echo Starting Microsoft HPC Pack 2012 MS-MPI (32-bit) installation... mpi_x86.msi /norestart :SKIPMICROSOFTHPC rem echo Starting TauDEM (32-bit) installation... TaudemSetup_x86.msi GOTO END :END Quick Start Examples Download and unzip the Logan River example data from For these examples we assume these files have been unzipped into a folder C:\dave\logan. Page 5 Open a command prompt. 1. Execute the following command to change to the directory with the data cd C:\Dave\logan 2. Remove Pits mpiexec -n 8 PitRemove logan.tif This produces the output file loganfel.tif that has pits removed. This output needs to be viewed in a GIS grid viewer, e.g. ArcGIS or MapWindow. The first time a TauDEM function is run, you may get a firewall warning. You may select Cancel as TauDEM does not require smpd to use the network. It is used to communicate between processes on the same computer. 3. Flow Directions mpiexec -n 8 D8Flowdir -p loganp.tif -sd8 logansd8.tif -fel loganfel.tif mpiexec -n 8 DinfFlowdir -ang loganang.tif -slp loganslp.tif -fel loganfel.tif These produce the output files loganp.tif, logansd8.tif, loganang.tif and loganslp.tif that respectively contain D8 flow directions, D8 slopes, D Infinity flow angles and D Infinity slopes. Page 6 4. Contributing area mpiexec -n 8 AreaD8 -p loganp.tif -ad8 loganad8.tif mpiexec -n 8 AreaDinf -ang loganang.tif -sca logansca.tif mpiexec -n 8 Aread8 -p loganp.tif -o loganoutlet.shp -ad8 loganad8o.tif The first two of these produce the output files loganad8.tif and logansca.tif that respectively contain D8 and D Infinity contributing area. The last command produces the file loganad8o.tif that is D8 contributing area evaluated upslope of outlets in the outlet.shp shapefile. 5. Gridnet mpiexec -n 8 Gridnet -p loganp.tif -plen loganplen.tif -tlen logantlen.tif -gord logangord.tif This produces the output files loganplen.tif, logantlen.tif and logangord.tif, containing respectively (1) the longest flow path along D8 flow directions to each grid cell, (2) the total length of all flow paths that end at each grid cell, and (3) the grid network order. This is obtained by applying the Strahler stream ordering system to the network defined starting at each grid cell. 6. PeukerDouglas mpiexec -n 8 PeukerDouglas -fel loganfel.tif -ss loganss.tif This produces a skeleton of a stream network derived entirely from a local filter applied to the topography. 7. PeukerDouglas stream delineation mpiexec -n 8 Aread8 -p loganp.tif -o loganoutlet.shp -ad8 loganssa.tif -wg loganss.tif mpiexec -n 8 Dropanalysis -p loganp.tif -fel loganfel.tif -ad8 loganad8.tif -ssa loganssa.tif -drp logandrp.txt -o loganoutlet.shp -par mpiexec -n 8 Threshold -ssa loganssa.tif -src logansrc.tif -thresh 300 These three commands evaluate the weighted contributing area of the PeukerDouglas stream network skeleton, then use stream drop analysis to apply a range of thresholds to this weighted contributing area grid to identify the smallest threshold for which the mean stream drop of first order streams is not significantly different from the mean stream drop of higher order streams. This is the constant drop law (Broscoe, 1959), and TauDEM uses it here to identify the highest resolution stream network that complies with this law as an objective way of identifying the stream delineation threshold. The output results include a table (logandrp.txt) that reports the stream drop statistics for each threshold examined. Page 7 Threshold Drain Den No First Ord No High Ord Mean D First Ord Mean D High Ord Std Dev First Ord Std Dev High Ord E E E E E E E E E E The last column of this gives T statistics for the differences of first and higher order streams. Using a threshold of 2 as indicating significance in this T test the threshold of 300 is chosen in this case as the objective stream delineation threshold. This was used in the last command to output the logansrc.tif stream raster grid 8. Stream Network mpiexec -n 8 Streamnet -fel loganfel.tif -p loganp.tif -ad8 loganad8.tif -src logansrc.tif -ord loganord3.tif -tree logantree.dat -coord logancoord.dat -net logannet.shp -w loganw.tif -o loganoutlet.shp T This produces a number of outputs illustrated below. These include a shapefile of the stream network and subwatersheds draining to each link of the stream network shapefile. This is one a key output from TauDEM. Each link in the stream network has a unique identifier that is linked to downstream and upstream links. Each subwatershed also has a unique identifier that is referenced in terms of the stream network that it drains to. This information enables construction of a subwatershed based distributed hydrologic model with flow from subwatersheds being connected to, accumulated in, and routed along the appropriate stream reaches. Page 8 These examples have illustrated the use of key TauDEM command line functions to delineate watersheds. A summary of TauDEM command line functions with brief descriptions of their functionality is given below. Refer also to the TauDEM ArcGIS toolbox CHM help which provides more comprehensive information on what each function does and the full command line input specifications below. Function Description 1. Basic Grid Analysis Functions PitRemove Pits are grid cells surrounded by higher terrain. A hydrologically correct DEM has no pits so that a drainage path can be defined from each grid cell to the edge of the domain. PitRemove takes as input an elevation data grid and outputs a hydrologically correct elevation grid with pits filled, using the flooding algorithm. D8FlowDir Takes as input the hydrologically correct elevation grid and outputs D8 flow direction and slope for each grid cell. In flat areas flow directions are assigned away from higher ground and towards lower Page 9 DinfFlowDir AreaD8 AreaDinf GridNet ground. Assigns a flow direction based on steepest slope on a triangular facet following the D model. This is recorded as an angle in radians anticlockwise from east. Takes as input a D8 flow directions grid and outputs the contributing area as the number of grid cells draining through each grid cell. (Optionally accumulates an input weight grid) Takes as input a D flow direction grid and outputs the specific catchment area. Specific catchment area is defined as contributing area per unit contour length. (Optionally accumulates an input weight grid) Takes as input a D8 flow directions file and outputs three grid files: 2. Stream Network Functions PeukerDouglas plen contains the path length from the furthest cell that drains to each cell. tlen contains the total length of all paths draining to each cell. gord contains the Strahler order associated with that cell for a flow network defined using the D8 flow directions and including each grid cell. Takes as input an elevation grid and outputs an indicator (1,0) grid of candidate stream cells according to the Peuker and Douglas algorithm. Threshold Takes as any grid and outputs an indicator (1,0) grid of grid cells that have values = the input threshold. This is used to delineate stream networks from contributing area and similar grids. D8FlowPathExtremeUp Evaluates the extreme (either maximum or minimum) upslope value from an input grid based on the D8 flow directions. Used in some stream delineation methods. SlopeArea Evaluates S m a n based on slope and specific catchment area grid inputs, and parameters m and n. Uses with slope area stream delineation. LengthArea Evaluates A = M Ly and outputs an indicator (1,0) grid based on upslope path length and D8 contributing area grid inputs, and parameters M and y. Used with length area stream delineation. DropAnalysis Applies a series of thresholds and outputs a table of stream statistics used in objectively selecting the stream delineation threshold. StreamNet Produces a vector network (shapefile) from a stream raster grid. Outputs a grid of subwatersheds draining to each stream network link MoveOutletsToStreams Adjusts the position of outlets by moving them downslope along D8 flow directions until they reach a stream. 3. Specialized grid analysis functions SlopeAreaRatio Calculates ratio S/A where S is slope and A contributing area D8HDistToStrm Calculates horizontal distance to stream along D8 flow directions Page 10 DinfUpDependence DinfDecayAccum DinfConcLimAccum DinfTransLimAccum DinfRevAccum DinfDistDown DinfDistUp DinfAvalanche SlopeAveDown Calculates upslope dependence Calculates decay limited accumulation Calculates concentration limited accumulation Calculates transport limited accumulation Calculates reverse accumulation Calculates distance downslope to a target zone (typically stream) using Dinf flow directions. Options include vertical, horizontal, along slope and pythagorus distances, computed using minimum, maximum, or flow weighted averaging along multiple Dinf flow paths. Calculates distance upslope to a ridge (grid cell with no inflow) using Dinf flow directions. Options include vertical, horizontal, along slope and pythagorus distances, computed using minimum, maximum, or flow weighted averaging along multiple Dinf flow paths. Calculates avalanche runout zone and distance to avalanche source in avalanche runout zone Calculates slope averaged over specified distance down D8 flow directions Supported File Formats TauDEM version 5 has been developed to read and write grid files in the GeoTiff (.tif) format only. It is up to users to convert their input files to this format before using TauDEM. ArcGIS as well as GDAL_Translate (http://www.gdal.org/gdal_translate.html) are options for producint GeoTiff files that TauDEM can read. In addition, TauDEM reads and writes ESRI shape files and text files generally identified using the.dat extension. TauDEM Codes TauDEM works with numerous input and output file types, each of which contains data that needs to be interpreted differently. To manage this, a set of character TauDEM codes has been developed. The TauDEM codes are used both as suffixes in TauDEM s default file names and as flags in the syntax of the command line functions. File Naming Convention In TauDEM s default file naming convention, the name of the base digital elevation model is used as the base file name for the default file names of all of the different files generated based on that DEM. Many of the TauDEM codes are used as suffixes, where they are combined with the base file name, followed by the extention, to identify each of the various file types used by TauDEM. For example, if sss is the TauDEM code for a particular type of file, and dem.tif is the base elevation grid name, then the default file name for a grid of that type would be demsss.tif, the default file name of a shapefile would be demsss.shp, and the default file name of a text file would be demsss.dat. Command Line Flags TauDEM codes are also used as flags in the command line syntax to indicate the parameter being supplied to the function. When these codes are used as flags in the TauDEM command line syntax, they Page 11 are preceded by a hyphen followed by the parameter. For example, the suffix for the pit filled elevation file is fel while its corresponding command line flag is fel. For the most part, the suffix codes and the flag codes are the same for each type of data file, but there are a few exceptions. Table 1 lists the TauDEM codes used for grid data in TauDEM. The initial elevation file does not have a suffix, however the code z is used on the command line as flag. Table 2 lists the TauDEM codes used for shapefile and text data. Table 3 lists the non file related TauDEM code flags. Table 1 TauDEM codes for grids, their descriptions and input and output functions Suffix/Flag Description Function Input Function Output ad8/ ad8 ang/ ang ass/ ass cs/ cs ctpt/ ctpt dd/ dd D8 contributing area grid (area measured as number of grid cells) D infinity flow direction grid (flow direction grid measured in radians, counter clockwise from east) avalanche source site grid, a required input for D infinity avalanche runout Concentration in supply grid, a grid giving the concentration of a compound of interest in the supply to the transport limited accumulation function Concentration grid, a grid giving the concentration of a compound of interest D infinity distance to stream which can be average, minimum or maximum of horizontal, vertical, surface or Pythagoras distances to the stream. Threshold, DropAnalysis, LengthArea, StreamNet AreaDinf, DinfUpDependence, DinfDecayAccum, DinfConcLimAccum, DinfTransLimAccum, DinfRevAccum, DinfDistDown, DinfDistUp, DinfAvalanche DinfAvalanche DinfTransLimAccum AreaD8 DinfFlowDir DinfConcLimAccum, DinfTransLimAccum DinfDistDown Page 12 Suffix/Flag Description Function Input Function Output dep/ dep Upslope dependence grid, a grid giving at each grid cell the fraction of flow that contributes to any part of the target disturbance grid DinfUpDependence dfs/ dfs Distance from source grid DinfAvalanche dg/ dg di Disturbance indicator grid, an indicator grid that marks the target domain for various functions Downslope influence grid that quantifies the influence of grid cells in the indicator grid on contributing area at each grid cell DinfUpDependence, DinfConcLimAccum AreaDinf dist/ dist D8 distance to stream grid D8HDistDown dm/ dm dmax/ dmax dsca/ dsca du/ du Decay multiplier grid, a grid giving the factor by which flow leaving each grid cell is multiplied before accumulation on downslope grid cells. This may be used to simulate the movement of an attenuating substance. Maximum downslope grid, a grid giving the maximum of the weight loading grid downslope from each grid cell Decayed specific catchment area grid (specific catchment area calculated by accumulating area but using the decay multipliers) D infinity distance to ridge which can be average, minimum or maximum of horizontal, vertical, surface or Pythagoras distances to the ridge. DinfDecayAccum, DinfConcLimAccum DinfRevAccum DinfDecayAccum DinfDistUp Page 13 Suffix/Flag Description Function Input Function Output fel/ fel gord/ gord mask ord/ ord p/ p plen/ plen q/ q racc/ racc Hydrologically correct elevation grid with pits removed either by filling or carving Stahler network order grid (Strahler order for grid network defined from D8 flow directions) Flag used to show mask file, with the name of the mask file as argument. Network order grid, a grid giving the Strahler stream order for each delineated stream grid cell D8 flow direction grid obtained from the D8 flow direction function Longest upslope length grid, a grid that gives the length of the longest upslope flow path terminating at each grid cell Specific discharge of the flow carrying the constituent being loaded at the concentration threshold specified Reverse accumulation grid, a grid giving the result of the Reverse Accumulation function D8FlowDir, DinfFlowDir, StreanRaster, DropAnalysis, StreamNet, DinfDistUp, DinfDistDown, PeukerDouglas, DinfAvalanche Threshold, DropAnalysis Threshold, Gridnet AreaD8, D8HDistToStrm, D8FlowPathExtremeUp, PeukerDouglas, DropAnalysis, StreamNet,, Gridnet, SlopeAveDown Threshold, DropAnalysis, LengthArea DinfConcLimAccum PitRemove Gridnet StreamNet D8FlowDir Gridnet DinfRevAccum Page 14 Suffix/Flag Description Function Input Function Output rz/ rz sa/ sa sar/ sar sca/ sca sd8/ sd8 Runout zone grid, a runout zone indicator grid with value 0 to indicate that this grid cell is not in the runout zone and value 0 to indicate that this grid cell is in the runout zone. Slope Area function output grid containing slope and area combined using S m A n Slope/Area ratio grid used to evaluate wetnes
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks