FILL takes as input an elevation grid and outputs a flow direction
grid directions.asc and a filled elevation grid
elevations.asc. FILL can also create a special file called the
flowStream which contains all the information required by FLOW
(filled elevations, flow directions) but in the internal format of
TerraFlow. FLOW takes as input the flowStream produced by FILL and
outputs the flow accumulation grid cnew.asc.
Before running TerraFlow the user should set two environment variables:
elevations.asc, directions.asc and cnew.asc are
placed.
Example:
setenv OUTDIR /var/tmp/setenv AMI_SINGLE_DEVICE /var/tmp/elevations.asc,
directions.asc and cnew.asc. Make sure there is
sufficient available space in $AMI_SINGLE_DEVICE to hold the TPIE
intermediate files (approx 40N bytes for FILL and
approx 50N for FLOW, where N is the number of cells of
the input grid).
Assume that the input DEM is /data/testdem.asc and the amount of
available memory on the machine is 100MB.
-z flowStream= option to
create a flowStream. For instance,
fill -m 100M -v -f /data/testdem.asc -z flowStream=/output/testdemFlowstrMFD
Action: Use at most 100MB of main memory at all
times. Verbose mode is on. Use input DEM
/data/testdem.asc. Use
default output paths: place the filled DEM in
$OUTDIR/elevations.asc
and the flow directions in
$OUTDIR/directions.asc. Compute MFD
directions. Place run stats file in
./stats.out. Create
a flowStream
in /output/testdemFlowstrMFD.
fill -m 100M -v -f /data/testdem.asc -z flowStream=/output/testdemFlowstrSFD -z sfd
Action: As above, but compute SFD directions and
place the flowStream in /output/testdemFlowstrSFD.
flow -m 100M -v -e /data/testdem.asc -t
/output/testdemFlowstrMFD
Action: Use at most 100MB of main memory at all
times. Verbose mode is on. Use the flowStream
/output/testdemFlowstrMFD and the header of
/data/testdem.asc. Create and place the flow
accumulation grid in
$OUTDIR/cnew.asc. Use MFD to push flow downslope:
that is, for each cell, push flow in the directions
indicated by the
(precomputed multiple flow directions in the)
flowStream.
flow -m 100M -v -e /data/testdem.asc -t
/output/testdemFlowstrSFD
Action: As above, just that now
the SFD flowStream testdemFlowStrSFD is
used. Push flow to the directions indicated by the
flowStream and, in addition,
to all other downslope neighbors.
flow -m 100M -v -e /data/testdem.asc -t
/output/testdemfFlowstrMFD -c 0
Action: As above, but use SFD to push flow. The flowStream used contains MFD directions, so choose a dominant direction. If instead testdemFlowStrSFDif the flowStream computed by FILL contains SFD directions then just use that direction).
The user has the option to run FLOW without running FILL first. Say for instance that the filled elevation grid, the flow direction grid and the flow accumulation grid were computed with other software like ArcInfo, which uses D8-type algorithms (i.e. pushes flow downslope using SFD). Running FLOW results in a different flow accumulation grid computed by extending the input flow directions to all downslope neighbors.
Example:
flow -m 100M -v -e /data/testdem.asc -d /data/flowdir.asc -a /data/flowaccu.asc
-h
-m
-f
-o
-d
-s
-v
-z flowStream=
-z sfd
-V
-z saveBoundaryStream=
-z loadBoundaryStream=
-z saveLabeledWater=
-z loadLabeledWater=
-z saveMergedWater
-z loadMergedWater=
-z maxWatershedCount=
-h
-m
-t
-z
flowStream= option.
-e
option. FLOW has all the information in the flowStream,
except for the header of the grid, which it reads from the DEM.
-e
-d
-e -a options. It is
used only when the user wants to run FLOW without using
FILL outputs. In this casethe user must provide a
filled DEM, a flow direction and a flow accumulation grid computed
with other software.
-a
-e -d options. It is used
only when the user wants to run FLOW without using
FILL outputs. In this case must provide a filled DEM, a
flow direction and a flow accumulation grid computed with other
software.
-v
-c
-l
-w
-W
-s
TerraFlow can be configured by setting/unsetting flags in the file
stepConfig.H.
Things which can be configured include:
Here is a sample of stepConfig.H.
For more info contact {laura ,
rajiv}.