<div dir="ltr">Hi,<div><br></div><div>Sorry for the bad math :)</div><div><br></div><div>I mixed up things. With 03-sec resolution, I have 1.4 billion cells, and r.watershed would need 45.5 GB.</div><div>With 01-sec resolution, I have 12.8 billion cells and r.watershed need about 415 GB.</div><div><br></div><div>The Location is in a drive with 1TB free. So this shouldn't be a problem. I'm running it now and it seems it's going to work. I'll report on this tomorrow.</div><div><br></div><div><br></div><div>I think I didn't expressed correctly the r,terraflow issue. I didn't meant if the rows/columns limit is needed in the sense of it being a required parameter, but it was more of a general question, in the sense of 'do we need to have that limit hardcoded?' I can open a ticket on this issue.</div><div><br></div><div>best</div><div><br></div><div>Carlos</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 10, 2017 at 2:51 PM, Markus Neteler <span dir="ltr"><<a href="mailto:neteler@osgeo.org" target="_blank">neteler@osgeo.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, Jan 10, 2017 at 12:30 PM, Carlos Grohmann<br>
<<a href="mailto:carlos.grohmann@gmail.com">carlos.grohmann@gmail.com</a>> wrote:<br>
> Hello all<br>
><br>
> I'm working on deriving a nice drainage network for the Amazon basin. The<br>
> problem is that the area is too large.<br>
><br>
> The region settings are these:<br>
> projection: 3 (Latitude-Longitude)<br>
> zone:       0<br>
> datum:      wgs84<br>
> ellipsoid:  wgs84<br>
> north:      6:17N<br>
> south:      21:30S<br>
> west:       80:37W<br>
> east:       44:50W<br>
> nsres:      0:00:03<br>
> ewres:      0:00:03<br>
> rows:       33340<br>
> cols:       42940<br>
> cells:      1431619600<br>
><br>
> With 14.3 billion cels,<br>
<br>
</span>Isn't it 1431619600 = 1.431.619.600 = 1.4 billion cells?<br>
<span class=""><br>
> r.watershed would need about 450 GiB of disk space<br>
> running in seg mode, is that correct? (from the manual, 31 MB for 1 million<br>
> cells).<br>
<br>
</span><a href="https://grass.osgeo.org/grass72/manuals/r.watershed.html#large-regions-with-many-cells" rel="noreferrer" target="_blank">https://grass.osgeo.org/<wbr>grass72/manuals/r.watershed.<wbr>html#large-regions-with-many-<wbr>cells</a><br>
" The upper limit of the ram version is 2 billion (2^31 - 1) cells,<br>
whereas the upper limit for the seg version is 9 billion-billion (2^63<br>
- 1 = 9.223372e+18) cells."<br>
<br>
So that would be supported by r.watershed.<br>
<span class=""><br>
> I do have that disk space available, but it's in a secondary drive. If I set<br>
> TMPDIR to that drive, will r/watershed use it? I ask because the<br>
> documentation (<a href="https://grass.osgeo.org/grass72/manuals/variables.html" rel="noreferrer" target="_blank">https://grass.osgeo.org/<wbr>grass72/manuals/variables.html</a><wbr>) only<br>
> says that this environmental variable is used by "[Various GRASS GIS<br>
> commands and wxGUI]".<br>
<br>
</span>AFAIK the TMPDIR variable is not relevant here. The tmp dir is<br>
<br>
location/mapset/.tmp/<br>
<br>
which you could link to the extra drive. This should be simplified for sure:<br>
<br>
Involved code:<br>
<a href="https://trac.osgeo.org/grass/browser/grass/trunk/lib/gis/file_name.c" rel="noreferrer" target="_blank">https://trac.osgeo.org/grass/<wbr>browser/grass/trunk/lib/gis/<wbr>file_name.c</a><br>
<a href="https://trac.osgeo.org/grass/browser/grass/trunk/lib/gis/tempfile.c" rel="noreferrer" target="_blank">https://trac.osgeo.org/grass/<wbr>browser/grass/trunk/lib/gis/<wbr>tempfile.c</a><br>
<br>
Please open a ticket with the relevant info in it.<br>
<span class=""><br>
> On a side note, r.terraflow should be an alternative for such a large<br>
> dataset, but from the manual:<br>
> "r.terraflow has a limit on the number of rows and columns (max 32,767<br>
> each)".<br>
> That's the size of a positive short integer. Is this limit still needed?<br>
<br>
</span>I have no idea here, did you try it?<br>
<span class="HOEnZb"><font color="#888888"><br>
Markus<br>
<br>
<br>
--<br>
Markus Neteler<br>
<a href="http://www.mundialis.de" rel="noreferrer" target="_blank">http://www.mundialis.de</a> - free data with free software<br>
<a href="http://grass.osgeo.org" rel="noreferrer" target="_blank">http://grass.osgeo.org</a><br>
<a href="http://courses.neteler.org/blog" rel="noreferrer" target="_blank">http://courses.neteler.org/<wbr>blog</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Prof. Carlos Henrique Grohmann<br>Institute of Energy and Environment - Univ. of São Paulo, Brazil<div>- Digital Terrain Analysis | GIS | Remote Sensing - </div><div><br></div><div><a href="http://carlosgrohmann.com/" target="_blank">http://carlosgrohmann.com</a></div><div><a href="http://orcid.org/0000-0001-5073-5572" style="font-size:13px;color:rgb(17,85,204);font-family:arial,sans-serif;background-color:rgb(255,255,255)" target="_blank">http://orcid.org/0000-0001-5073-5572</a><br><div>________________<br>Can’t stop the signal.</div></div></div></div>
</div>