[GIS] Calculating average pixel value for each band across multiple raster layers

qgisrasterrasterstats

enter image description here

I have a set of raster files that are essentially data sets of precipitation across a region. I have multiple raster files that are the outputs of different climate models. Each pixel in the raster file has 365 bands that represent the precipitation value for each day. I want to calculate the mean for each pixel for each band across the different raster files.

I tried converting the raster to point files and extracting multiple values to the point, extracting the data to excel and then averaging them for each raster. I was wondering if there is a more efficient way to do this.

Best Answer

There are many raster calculators available. Depends, what software you are familiar with.

E.g. you can use GRASS GIS r.series module (the module is also accessible via QGIS toolbox).

As @mdsumner commented, you can also use R.

A programatic approach is to read data by Python Numpy and calculate desired statistics. Numpy methods are also implemented in the command line by gdal_calc.py.

If data is in NetCDF (typical format for climate/meteo time-series data), you can process with some of these tools (I can mention e.g. NCO)

In case of precipitation, maybe there is some purpose of averaging of daily data (compare 3 different datasources?). Maybe some other statistics (e.g. sum, max) could be considered.

Related Question