I would like to merge 5 years of world ocean surface productivity data raster into 1 averaged raster in QGIS. However, not every pixel has data in every year. To generate the raster layer with the averaged data, should I use Raster Calculator? And produce the average raster using:
(raster1+raster2+raster3+raster4+raster5)/5
But how can I omit those pixels with no data for the calculation of the average?
Is there a way to detect the nodata pixel such that it will just divided by the number of layers that have data in that pixel? For example if raster3 doesn't have the data, it will automatically become
(raster1+raster2+raster4+raster5)/4
for the calculation in that grid?