I am working with a global raster dataset (WGS84 projection) where the value of each grid cell equals a rate (g N m-2 yr-1) (r_rate). I would like to calculate the average rate (i) for the whole raster and (ii) for 10 different zones, which are specified by another raster (r_zone).
I managed to calculte means for r_rate for each unique value in r_zone with the "Raster Layer Zonal Statistics" tool, however, different grid cells have different areas (grid cell area increases with latitude); so I was wondering how to calculate the area-weighted mean of all values in r_rate by zone.
- Is there tool that does this automatically, or
- Is there a tool to create a raster containing the area of each grid cell (r_grid_area)? That would allow me to do the calculation manually by multiplying r_rate by r_grid_area, then summing the resulting values by zone and dividing by the sum of r_grid_area-values in each zone.