[GRASS-user] Global Hydrological modeling with r.watershed, r.stream.extract, r.stream.extract

Ken Mankoff mankoff at gmail.com
Sun May 10 16:57:22 PDT 2020


Hi Guiseppe,

I've successfully run with 4.5 billion cells. How many cells do you have? I notice you do not have the "-m" flag to tell it to use disk swap in place of all memory. Maybe that would help?

  -k.

On 2020-05-05 at 11:55 -07, Giuseppe Amatulli <giuseppe.amatulli at gmail.com> wrote...
> Dear GRASS Team
>
> I am running a global analysis where I need to use "tiles" as computational
> units in which I use the following three commands:
> r.watershed -b elevation=elv depression=dep accumulation=flow
> drainage=dir_rw flow=pixel_area  memory=100000 --o --verbose
> r.stream.extract elevation=elv accumulation=flow depression=dep
> threshold=0.05 direction=dir_rs stream_raster=stream memory=100000 --o
> --verbose
> r.stream.basins -l  stream_rast=stream direction=dir_rs   basins=lbasin
>  memory=100000 --o --verbose
>
> The basins that were not completely within a tile (resulting in
> broken-basins) have been removed (see below the three tiles in Figs. 1,2,3
> including only entire basins),
> and now I'm in the phase of merging all the tiles having only complete
> basins.
>
> When I merge the tiles (Fig 4), some basin borders do not match perfectly,
> and some areas have NoData (see Fig 5,6) or have the Basin ID of the below
> basin (Fig 7).
> I noticed that these phenomena appear only when I merge tiles that have
> very large broken-basins that can not be included in the tile due to RAM
> limitations.
>
> My thought is that r.stream.basins needs the entire dimension of two
> adjacent basins to be able to detect the border without gap and without a
> potential random selection.
> Is there any part of the r.stream.basins code that I can potentially check
> and eventually hack to avoid this problem?
>
> For the rest, all the RAM limitation and other problem have been solved
> soon we will have a global stream network and basin delineation performed
> 100% in GRASS!!!
>
> Thank you
> Best Regards
> Giuseppe
>
>
>
> Fig 1. Left Tile
> [image: image.png]
>
>
> Fig 2. Center tile
> [image: image.png]
>
>
> Fig 3. Right Tile
> [image: image.png]
>
>
> Fig 4. Merge all the tiles
> [image: image.png]
>
>
> Fig 5. Gap -> small white area
> [image: image.png]
>
>
> Fig 6. Gap -> small white area
> [image: image.png]
>
> Fig 7. boarder Basins inconsistency among tiles
>
> [image: image.png]



More information about the grass-user mailing list