Revision edb890ff
Added by Jim Regetz over 13 years ago
- ID edb890ffbaa950c2a4d2354328b833f8b4c67e01
terrain/flow/flow-boundary.sh | ||
---|---|---|
1 |
# GRASS commands -- testing some stuff for flow direction |
|
1 |
# GRASS commands for running terraflow on raw and fused DEMs in the |
|
2 |
# 60N Canada boundary region, currently for the purposes of assessing |
|
3 |
# and comparing flow direction. |
|
2 | 4 |
# |
3 | 5 |
# Jim Regetz |
4 | 6 |
# NCEAS |
... | ... | |
18 | 20 |
r.in.gdal input=$DEMDIR/fused_300straddle.tif output=fused_300straddle |
19 | 21 |
r.in.gdal input=$DEMDIR/fused_300straddle_rampexp.tif output=fused_300straddle_rampexp |
20 | 22 |
r.in.gdal input=$DEMDIR/fused_300straddle_blendgau.tif output=fused_300straddle_blendgau |
23 |
r.in.gdal input=$DEMDIR/fused_300straddle_enblend.tif output=fused_300straddle_enblend |
|
21 | 24 |
|
22 | 25 |
# oops -- region is too big for terraflow default of using |
23 | 26 |
# dimension_type (i.e., short), which means nrows and ncols are both |
24 |
# capped at ~30K: |
|
27 |
# capped at ~30K (2^15):
|
|
25 | 28 |
# ERROR: [nrows=300, ncols=48000] dimension_type overflow -- change |
26 | 29 |
# dimension_type and recompile |
27 | 30 |
# so let's restrict it to a smaller lon range for now... |
... | ... | |
41 | 44 |
r.terraflow.short elevation=fused_300straddle_blendgau filled=filled_fused_bg \ |
42 | 45 |
direction=direction_fused_bg swatershed=swatershed_fused_bg \ |
43 | 46 |
accumulation=accumulation_fused_bg tci=tci_fused_bg |
47 |
r.terraflow.short elevation=fused_300straddle_enblend filled=filled_fused_mrs \ |
|
48 |
direction=direction_fused_mrs swatershed=swatershed_fused_mrs \ |
|
49 |
accumulation=accumulation_fused_mrs tci=tci_fused_mrs |
|
44 | 50 |
|
45 | 51 |
# now with SFD (D8) algorithm |
46 | 52 |
# each took ~1 min on xander (22-Jun-2011) |
... | ... | |
56 | 62 |
r.terraflow.short -s elevation=fused_300straddle_blendgau filled=filled_fused_bg_sfd \ |
57 | 63 |
direction=direction_fused_bg_sfd swatershed=swatershed_fused_bg_sfd \ |
58 | 64 |
accumulation=accumulation_fused_bg_sfd tci=tci_fused_bg_sfd |
65 |
r.terraflow.short -s elevation=fused_300straddle_enblend filled=filled_fused_mrs_sfd \ |
|
66 |
direction=direction_fused_mrs_sfd swatershed=swatershed_fused_mrs_sfd \ |
|
67 |
accumulation=accumulation_fused_mrs_sfd tci=tci_fused_mrs_sfd |
|
59 | 68 |
|
60 |
# export flow dir rasters as tif
|
|
69 |
# export flow dir rasters as geotiffs
|
|
61 | 70 |
r.out.gdal input=direction_cdem output=$FLOWDIR/cdem_300straddle_mfd.tif |
62 | 71 |
r.out.gdal input=direction_cdem_sfd output=$FLOWDIR/cdem_300straddle_sfd.tif |
63 | 72 |
r.out.gdal input=direction_aster output=$FLOWDIR/aster_300straddle_mfd.tif |
... | ... | |
66 | 75 |
r.out.gdal input=direction_fused_sfd output=$FLOWDIR/fused_300straddle_sfd.tif |
67 | 76 |
r.out.gdal input=direction_fused_bg output=$FLOWDIR/fused_300straddle_blendgau_mfd.tif |
68 | 77 |
r.out.gdal input=direction_fused_bg_sfd output=$FLOWDIR/fused_300straddle_blendgau_sfd.tif |
78 |
r.out.gdal input=direction_fused_mrs output=$FLOWDIR/fused_300straddle_enblend_mfd.tif |
|
79 |
r.out.gdal input=direction_fused_mrs_sfd output=$FLOWDIR/fused_300straddle_enblend_sfd.tif |
|
69 | 80 |
|
70 |
# export flow accum |
|
81 |
# export flow accumulation
|
|
71 | 82 |
r.out.gdal input=accumulation_fused_bg output=$FLOWDIR/fused_300straddle_blendgau_fa.tif |
72 | 83 |
r.out.gdal input=accumulation_cdem output=$FLOWDIR/cdem_300straddle_fa.tif |
73 | 84 |
r.out.gdal input=accumulation_aster output=$FLOWDIR/aster_300straddle_fa.tif |
... | ... | |
83 | 94 |
r.out.gdal input=direction_srtm output=$FLOWDIR/srtm_150below_mfd.tif |
84 | 95 |
r.out.gdal input=direction_srtm_sfd output=$FLOWDIR/srtm_150below_sfd.tif |
85 | 96 |
r.out.gdal input=accumulation_srtm output=$FLOWDIR/srtm_150below_fa.tif |
97 |
# don't forget to set the region back to include cells above the 60N boundary... |
|
86 | 98 |
g.region n=60.125 s=59.875 w=-125 e=-100 |
87 | 99 |
|
88 | 100 |
|
Also available in: Unified diff
added multiresolution spline fused layer as terraflow input