Dear community,
I’m trying to use the Calc function in a raster stack (8000 binary format
rasters). Each raster covers 2,421,090 cells, as such, I’m using parallel
coding to make the most of the available cores for this computation, however,
this process is extremely slow on a 36 core and 76 Gb RAM. How could I speed up
the calculations? This is the code I’m using:
beginCluster(30)
interflood <- clusterR(all_predictions, calc, args=list(function(x){y <-
rle(as.numeric(x));return(max( y$lengths[y$values == 0]))}))
endCluster()
RegardsSara
-------------------------
Sara Shaeri KarimiPhD Candidate, Department of Environmental SciencesFaculty of
Science and EngineeringMacquarie University, NSW 2109 Australia
Researchgate
Linkedin
[[alternative HTML version deleted]]
_______________________________________________
R-sig-Geo mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo