[GRASS-user] faster watershed routing

Ken Mankoff mankoff at gmail.com
Sun Feb 12 03:49:23 PST 2017


It seems the easiest way to speed this up is to parallelize it, which can
be done fairly easily with GNU parallel.
https://grasswiki.osgeo.org/wiki/Parallelizing_Scripts#GNU_Parallel

On Sat, Feb 11, 2017 at 8:12 AM, Ken Mankoff <mankoff at gmail.com> wrote:

> Hi GRASS list,
>
> I have a watershed raster with 200 million cells. I calculate the basins
> and the baseline accumulation (i.e. flow=1) and have done so with
> r.watershed like this:
>
> r.watershed -a elevation=e drainage=d accumulation=a basins=b
> threshold=50000 --q
>
> That takes ~2 minutes.
>
> I now need to calculate surface flow ~1000 times over this same watershed
> (every day for 3 years). That would take 1.5 days which is not
> unreasonable. But is there a faster way? Can I use the pre-computed basins
> and accumulation rasters? Is it faster to loop over the basins (there are
> ~1000 of them)? Or do I just run the entire command as above 1000 times but
> with variables for flow= and accumulation=?
>
> Thanks,
>
>   -k.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170212/c3b8fa5c/attachment.html>


More information about the grass-user mailing list