[GRASS-user] r.watershed, blocking, and max_slope_length

Hi List,

I can't seem to get blocking or max_slope_length to work as I would expect. I see no change to the output when I use them.

I'm calling =r.watershed= like this:

r.watershed -s -a --v --overwrite --verbose elevation=z_s flow=RU85 blocking=z_2000_r thresh=50 max_slope_length=11000 accumulation=tmp.acc

Where =v_200_r= is a raster of a single contour at 2000 made with:

r.contour input=z_s output=z_2000_v levels=2000 --o
v.to.rast --overwrite --verbose input=z_2000_v type=line output=z_2000_r use=z

Based on the =r.watershed= documentation, I would expect two things:

1. All flow routing stops at 2000 m and then restarts below.

2. No flow continues more than 11 km, which is not far because I'm on a 5 km grid.

Instead I see the exact same results as if I did not use either of those keywords.

Although I'd like to understand these keywords, I'm also curious if my planned usage makes sense. I need to route all surface water 1 cell downstream as part of this analysis (actually 1 cell downstream if slope is < 0.5). I plan to do this by generating an accumulation map with max distance of 7.5 km (on a 5 km grid). I assume this routes everything only 1 cell, whether 90 degrees (5 km) or 45 degrees (7.07 km). Then I subtract this accumulation map from the original, and the result is the input flow map but moved 1 cell downstream.

Thanks for any help you can provide,

  -k.

P.S. Using grass 7.0.3 on OS X installed with 'brew' and no Framework packages. Works quite nicely.

Hi again,

On 2016-03-25 at 19:50, Ken Mankoff <mankoff@gmail.com> wrote:

I can't seem to get blocking or max_slope_length to work as I would
expect. I see no change to the output when I use them.

Perhaps some MWEs with the NC data set will help demonstrate what I'm doing and presumably doing wrong...

Here I'm setting max_slope_length to 15 (g.region -p shown the resolution is 10) so I would expect flow to only move ~1 grid cell. But the accumulation map is identical to running r.watershed w/o the max_slope_length setting.

r.mapcalc "rain = 1"
r.watershed -s -a --v elevation=elev_srtm_30m accumulation=acc drainage=fdir flow=rain
r.watershed -s -a --v elevation=elev_srtm_30m accumulation=acc.len drainage=fdir.len flow=rain max_slope_length=15
g.gui.mapswipe first=acc second=acc.len

And here, I'm trying to block flow from crossing the 30 m elevation contour:

r.contour input=elev_srtm_30m@PERMANENT output=z_30_v levels=30
v.to.rast --overwrite --verbose input=z_30_v type=line output=z_30_r use=z --overwrite
r.mapcalc "rain = 1"
r.watershed -s -a --v elevation=elev_srtm_30m accumulation=acc drainage=fdir flow=rain
r.watershed -s -a --v elevation=elev_srtm_30m accumulation=acc.block drainage=fdir.block flow=rain blocking=z_30_r
g.gui.mapswipe first=acc second=acc.block

  -k.