<div dir="ltr">Thanks Ken, <div>I try that option but it was creating output files (e.g. flow accumulation) extremely huge, moreover it does not support the option  -b. </div><div>Markus any suggestion?</div><div>Thanks </div><div>Giuseppe</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 10 May 2020 at 19:57, Ken Mankoff <<a href="mailto:mankoff@gmail.com">mankoff@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Guiseppe,<br>
<br>
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?<br>
<br>
  -k.<br>
<br>
On 2020-05-05 at 11:55 -07, Giuseppe Amatulli <<a href="mailto:giuseppe.amatulli@gmail.com" target="_blank">giuseppe.amatulli@gmail.com</a>> wrote...<br>
> Dear GRASS Team<br>
><br>
> I am running a global analysis where I need to use "tiles" as computational<br>
> units in which I use the following three commands:<br>
> r.watershed -b elevation=elv depression=dep accumulation=flow<br>
> drainage=dir_rw flow=pixel_area  memory=100000 --o --verbose<br>
> r.stream.extract elevation=elv accumulation=flow depression=dep<br>
> threshold=0.05 direction=dir_rs stream_raster=stream memory=100000 --o<br>
> --verbose<br>
> r.stream.basins -l  stream_rast=stream direction=dir_rs   basins=lbasin<br>
>  memory=100000 --o --verbose<br>
><br>
> The basins that were not completely within a tile (resulting in<br>
> broken-basins) have been removed (see below the three tiles in Figs. 1,2,3<br>
> including only entire basins),<br>
> and now I'm in the phase of merging all the tiles having only complete<br>
> basins.<br>
><br>
> When I merge the tiles (Fig 4), some basin borders do not match perfectly,<br>
> and some areas have NoData (see Fig 5,6) or have the Basin ID of the below<br>
> basin (Fig 7).<br>
> I noticed that these phenomena appear only when I merge tiles that have<br>
> very large broken-basins that can not be included in the tile due to RAM<br>
> limitations.<br>
><br>
> My thought is that r.stream.basins needs the entire dimension of two<br>
> adjacent basins to be able to detect the border without gap and without a<br>
> potential random selection.<br>
> Is there any part of the r.stream.basins code that I can potentially check<br>
> and eventually hack to avoid this problem?<br>
><br>
> For the rest, all the RAM limitation and other problem have been solved<br>
> soon we will have a global stream network and basin delineation performed<br>
> 100% in GRASS!!!<br>
><br>
> Thank you<br>
> Best Regards<br>
> Giuseppe<br>
><br>
><br>
><br>
> Fig 1. Left Tile<br>
> [image: image.png]<br>
><br>
><br>
> Fig 2. Center tile<br>
> [image: image.png]<br>
><br>
><br>
> Fig 3. Right Tile<br>
> [image: image.png]<br>
><br>
><br>
> Fig 4. Merge all the tiles<br>
> [image: image.png]<br>
><br>
><br>
> Fig 5. Gap -> small white area<br>
> [image: image.png]<br>
><br>
><br>
> Fig 6. Gap -> small white area<br>
> [image: image.png]<br>
><br>
> Fig 7. boarder Basins inconsistency among tiles<br>
><br>
> [image: image.png]<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Giuseppe Amatulli, Ph.D.<br><br>Research scientist at<br><span>School of Forestry & Environmental Studies<br></span><span>Center for Research Computing</span><br>Yale University</div><div>New Haven, CT, USA</div><div>06511<br><div>
   Teaching: <a href="http://spatial-ecology.net" target="_blank">http://spatial-ecology.net</a></div> 
  
   Work:  <a href="https://environment.yale.edu/profile/giuseppe-amatulli/" target="_blank">https://environment.yale.edu/profile/giuseppe-amatulli/</a> <br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>