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).

1 Answer 1


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
  • Thanks a lot, I didn't know that module. I used it (through QGis "GRASS tools") and I was a little disappointed. It looks like the module changes the scale of the layer, aggregating the data. The output layer looses a lot of columns and rows. Any idea about how to fix this issue?
    – Bap
    Commented Nov 15, 2012 at 22:59
  • 1
    Sounds like your GRASS region settings need to set the correct cell size.
    – underdark
    Commented Nov 16, 2012 at 9:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.