Skip to content
Prev 22723 / 29559 Next

Faster way to get raster average?

"Thiago V. dos Santos" <thi_veloso at yahoo.com.br> writes:
I am not an expert on netcdf files, but I would probably look outside R
to do these calculations. GRASS, and possibly even gdal, come to
mind. Depending on how often you have to do the calculations, putting
them into a spatial database and do the calculations there might be an
option?

Concerning paralelization: if, as Robert points out, the disk access is
the bottleneck (memory allocation in R will also take some time,
depending on the size of the individual map), paralelization will not
speed up (possibly even slow it down). In this case, your option is an
SSD, or a raid, and, as you are using a Mac, an internal or Thunderbolt
raid (all faster then even USB 3) - and definitely not an USB 2.0 HDD.

Otherwise, just using mcapply() over all maps would help.

Cheers,

Rainer

  
    
Message-ID: <m2lhh29lva.fsf@krugs.de>
In-Reply-To: <673401754.791703.1430876912015.JavaMail.yahoo@mail.yahoo.com> (Thiago V. dos Santos's message of "Wed, 6 May 2015 01:48:32 +0000 (UTC)")