[GRASS-user] need help computing all flow routing for large DEM

Ken Mankoff mankoff at gmail.com
Tue Nov 20 01:09:23 PST 2018


Hi Markus,

On 2018-11-20 at 09:56 +0100, Markus Metz <markus.metz.giswork at gmail.com> wrote:
> On Tue, Nov 20, 2018 at 9:50 AM Ken Mankoff <mankoff at gmail.com> wrote:
> What has worked for the 0.5 B pixel region is running r.watershed and
> then for every negative pixel, I run r.water.outlet and find the upstream
> contributors. But I can't run r.watershed on the entire large region. I can
> run it quickly on sub-regions, but some very large interior basins cause
> this method to fail.
>
> How does it fail? What is the error output? You did use the -m flag
> for r.watershed, right?

On the 0.5 Bpixel region it takes ~6 hours and produces good results. I killed it after 24 hours on the 4 Bpixel region - there was no indication anything was happening. I ran it with the -m flag both times. r.terraflow takes ~12 hours on the 4 Bpixel region. I will try re-running r.watershed and letting it run longer. I have plenty of disk space.

The failure (not error!) is only when doing sub-regions and patching. In this case interior basins aren't handled correctly. I think the code is correct, but you simply cannot split some things. I think the issue is if there are large interior basins. Picture a crater as your entire domain, with lip all around it, then null (ocean) cells surrounding it. If it is run in 1 region, the lowest portion of the lip will be found and that will drain the crater to the ocean. If it is split into 4 quadrants + buffer, then cropped (to remove the weird flow that happens when cells border NULL cells), then there will be be no exterior drainage. Again - the code is fine, but the method causes the bug. I think...

> You don't need r.watershed or r.terraflow for this purpose., You can
> run r.stream.extract with a DEM as the only input, then you get the
> outlets and can feed them to r.stream.basins.

OK - I will look into this. And let it run longer than 24 hours before I kill the process.

Thanks,

  -k.


More information about the grass-user mailing list