[GIS] How to calculate a standard deviation across multiple raster layers

qgisraster-calculator

I have 15 raster layers. Each one shows accumulated precipitation (rainfalls) for the month of April for the same US state during a given year. So, I cover the period from 1997 to 2012. I would like to have an idea of the variability of precipitation during the last 15 years.

I would like for example to calculate the standard deviation at each pixel across the 15 layers. I am guessing I can do it through the raster calculator using sums, subtractions and divisions. But the final formula would pretty long.
Is there a more efficient way to achieve my goal? (So far, I am only a QGis user and I don't know Python…but I can start learning if necessary).

Best Answer

You could use the GRASS module r.series with method=stddev. For example, if you have rasters named apr_precip_97, apr_precip_98, and so on then in a GRASS terminal you would run:

r.series in=`g.mlist rast pat=apr_precip* sep=,` out=apr_precip_stddev method=stddev
Related Question