<br><br><div class="gmail_quote">DavidRA wrote:<br><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, here's the problem: I need to implement an operation in GRASS wich takes<br>

an UNDEFINED number of raster layers and, for each position, takes the cell<br>
of each raster, sort those values, makes some calculations and store the<br>
result in the same position of the output raster.<br></blockquote><div> </div><br></div>Hey,<br><br>R.series does all the following calculations for any number of rasters at once:<br><br><em>average, count, median, mode, minimum, min_raster, maximum, 
max_raster, stddev, range, sum, variance, diversity, slope, offset, 
detcoeff, quart1, quart3, perc90, quantile, skewness, kurtosis<br><br>If you need more advanced calculations, I think you will need to use scripting. Or maybe you can tweak the code of r.series to put your own formulas.<br>
<br>Best,<br>Marcello.<br></em>