Automated Distance Weighted Accumulation Procedure

advertisement
Automated Distance Weighted Accumulation Procedure
Instructions for using the Python script RawInputTauDEMAccumulation.py
David Nagel
US Forest Service, RMRS, Boise Lab
322 E. Front St., Suite 401, Boise, ID
August 23, 2006
Note: These instructions are meant to give the user a general road map for accumulating
variables along a stream channel. It is unlikely that this process, following these specific
instructions and scripts, will run to completion due to changes in operating systems, and
ArcGIS, TauDEM, and Python versions. August 9, 2010.
Introduction
This program is used to accumulate GIS raster data along a stream channel or within a
watershed. The data are summarized and output as average upstream accumulation.
Accumulation may be computed for the entire upslope contributing area to each pixel, or
for a specified distance upslope from each pixel. If a distance is specified (d),
accumulation (a) decays upslope such that a = 0 at distance d from the focus pixel.
Terminology used for this program
Theme – the name of the GIS raster in Arc grid format that will be accumulated, such as
radiation or slope.
Function – the type of accumulation that will be performed. The two options are: 1)
distance weighted or 2) standard accumulation.
Domain – the area over which the accumulation will be computed. The two options are:
1) channel or 2) basin.
Program Setup
Your working directory must be an ArcInfo workspace.
Two programs must be copied to your working directory:
1) RawInputTauDEMAccumulation.py
2) Adinfdecay.exe
Use Windows Explorer to copy the files.
All TauDEM data and the original DEM must be copied to this workspace.
The DEM must be called “dem” and the TauDEM data must have a root name of “dem”
such as “demang”. The DEM must be clipped to the watershed boundary.
IMPORTANT: This program should not be run in the same directory with your original
TauDEM run data, since it will overwrite some of the original files. Therefore, copy all
TauDEM raster data using ArcCatalog to a new ArcInfo workspace of your choice.
The following TauDEM files are required:
dem (not actually a TauDEM file, but the original DEM)
demad8
demfel
demgord
demp
demplen
demsd8
demslp
demscr
demtlen
These grids can be created by running these TauDEM procedures:
• Select base DEM grid …
• Fill pits
• D8 flow directions
• D8 contributing area
• Grid network order and flow path lengths
• Full river network raster
Copy your theme grid to this workspace using ArcCatalog. The theme grid must be the
same extent and cell size as the input dem. This grid must NOT contain NoData except
outside of the watershed. Background values that will not be accumulated, but are
within the watershed, must be 0.
Running the Program
Note: There are some unresolved issues with this program related to the grid file
generated by Adinfdecay.exe. It’s probably best to have ArcGIS closed when running
this program. It is OK if ArcCatalog is open, but do not view the contents of your
workspace when the program is running.
1) Use Windows Explorer to view the contents of your workspace (ArcCatalog will not
work here).
2) Right click RawInputTauDEMAccumulation.py and select Open With > Pythonwin
main executable.
3) On the Pythonwin toolbar, click the run icon. A popup will appear. Hit OK on the
popup.
4) A series of popup windows will appear.
• For data path, copy and paste the path to your data. You can get this
path from the “Location:” window in ArcCatalog.
• For theme grid, type in the name of the grid. The name is case sensitive.
• For distance weighted or standard accumulation, type d or a.
• For channel or basin, type c or b.
• For e folding length, enter an integer in meters. If you choose standard
accumulation, enter 1.
Output
A grid named theme_avg will be created. This is the average upstream accumulation.
Other grids will also be present. These can be used to help assess the validity of
theme_avg.
The other output grids are:
theme_acc – This is the accumulation of the pixel values from the theme grid.
standard_acc – This is the simple accumulation of pixels, not weighted using the theme
grid.
theme_avg is created by dividing: theme_acc / standard_acc.
IMPORTANT: theme_avg will be overwritten with each program run. So if you need to
do multiple runs with different e folding lengths it will be important to rename or copy
theme_avg to a new name each time.
Note: Be sure to type your input accurately as this program does not trap errors
gracefully.
Procedures and Methods Disclaimer of Liability
Neither the United States Government nor any of its employees makes any warranty,
express or implied, for any purposes regarding these procedures or methods. This
includes warranties of merchantability and fitness for any particular purpose.
Furthermore, neither the United States Government nor any of its employees assumes any
legal liability or responsibility for the accuracy, completeness, or usefulness of any
information or products derived from these procedures.
Download