DHSMV Support - AML Scripts
The AML scripts in DHSVM create the Stream, Soil, and Road inputs for the model.
This space describes the aml scripts and related files in the tutorial for DHSVM3.1.1, which can be downloaded at the DHSVM website.
1. createstreamnetwork.aml
This aml creates the stream network files for DHSVM. It requires a dem with all the sinks filled in, and a grid indicating the location of the basin outlet. If a soil depth map is not provided, one is created based on local slope (determined from DEM), upstream source area, and elevation. See soildepth.aml for complete assumptions. Note this script assigns channel hydraulic classes automatically based on slope and contributing area. If you have additional channel hydraulic information this will have to be edited.
Usage: streamnetwork.aml <dem> <wshed> <soildepth> <stream network> <MOUTH|MASK>
- For this tutorial exercise, use: streamnetwork.aml dem_float mask soildepthgrid streams MASK 100000 0.76 1.5
Output: soildepthgrid.zip, streams.zip, stream.network.dat, stream.map.dat
2. wshdslope.aml
This is a GRID command. It computes slope for the specified DEM lattice using only 4 neighboring cells, as opposed to 8 as the GRID SLOPE() function does.
Input: dem.zip
Output: aspect.zip, slope.zip
3. wshdoutlet.aml
This is a GRID command. It is used to locate the lowest cell in a watershed dem. This is assumed to be the watershed outlet. A grid with a single cell is produced.
Input: dem.zip
Output: outlet.zip
4. rowcolmap.aml
This is an ARC command. It is a simple script used to produce a polygon representation of a grid, in which the rows and columns are numbered from the lower left had corner starting with zero. The grid should be the aspect grid. The aspect value is passed along into the polygon coverage.
Input: aspect.zip, slope.zip
Output: rowcolout.zip
5. gridspot70.aml
This AML sets an item in a point coverage PAT equal to the value of a grid cell at the corresponding location. It is intended to be similar to the LATTICESPOT command except that it does not perform interpolation. This AML requires ARC/INFO 7.0 or higher.
Input: aspect.zip/slope.zip, rowcolout.zip
Output: aspect.zip/slope.zip
6. roadmap.aml
This is an ARC program. This program combines a road/channel coverage with the polygon coverage produced by ROWCOLMAP, which contains information on the base DEM grid, including slope and aspect. A new road coverage is created with the arcs split up cell by cell. This program transfers the cell aspect and slope to individual arcs since that will be needed with further processing. It will also transfer a single item from the original road/channel coverage, which should be the segment ID, to an item SEG-ID in the new road/channel coverage. By default, SEG-ID is filled with th internal arc ID.
Input: streams.zip, rowcolout.zip
Output: outcover.zip, streamnetworkID
7. transfer.aml
This aml moves an attribute from the input coverage AAT to the output coverage AAT. It copies the output coverage to a temporary working coverage. It uses matchcover to transfer the attribute from the input coverage to the temporary coverage. INFO is used to move the attribute from the temporary coverage to the output coverage.
Input: streams.zip, outcover.zip, streamnetworkID
Output:segmentID
8. roadaspect.aml
This is an ARC command. This script computes the aspect of roads with respect to the aspect of a DEM slope. The coverages supplied should be that produced by ROADMAP. A new item, RDASPECT, is added to the AAT of the specified coverage, or recalculated if it already exists. The RD-ASPECT value is the angle between the cell aspect and the direction of the road in the cell. The DEM grid is specified only to obtain the cell dimensions.
Input: outcover.zip, dem.zip
Output: RDASPECT
column
in outcover.zip attribute table
9. roadelevation.aml
This aml calculates the weed tolerance of each grid cell and creates a point event database of sample elevations on the elevation route.
Input: streams.zip, dem.zip
Output: elevinfo, weed, elevrte
10. streammapfile.aml
This aml creates the stream.map.dat file.
Input:outcover.zip, streams.zip
Output: stream.map.dat, EFFWIDTH, EFFDEPTH, RDASPECT
11. soildepth.aml
This aml creates a soildepth file for DHSVM based on local slope (determined from DEM), upstream source area, and elevation.
Input: dem.zip, flowacc.zip, min. soil depth, max. soil depth. For this exercise, use 0.76 and 1.5 as the minimum and maximum soil depths, respectively.
Output: soildepthgrid.zip