I have a raster dataset in a geographic coordinate system where the value of the grid cell is in tons per hectare. I want to be able to calculate the number of hectares in each grid cell so that I can calculate the number of tons per pixel and eventually perform zonal statistics on the raster. The raster covers much of the globe, so the cells near the equator have a different area value than those in northern latitudes. I am hesitant to project the raster as I'm worried it will distort the values.
Is there any way to calculate the area value of each raster cell using Raster Calculator in ArcMap?
I saw a GeoNet thread on how to do this in an earlier version of ArcMap using the $$YMap function, but it says it won't work in versions over 10.0. I'm open to suggestions on how to do this on other platforms, but I have very little scripting experience.
As pointed out in this geonet discussion (https://geonet.esri.com/thread/43270), which I think the OP was referring to, you could project your data to an cylindrical Equal Area projection. Your raster would then have all cells with same size regardless of the proximity to the equator. You could look at the cell size in the raster layer properties (the unit would be the one of your chosen projection), convert it to hectares, calculate the area of a cell (cellsize^2), and eventually perform zonal statistics ad you need. Of course, there's surely be some distortion, you have to choose carefully the projection which fits your needs the most, or subdivide your area in many parts and project each of them in a different projection (but this would be very tricky).
If you are using a projected coordinate system, your cells should be the same size anyway (though @umbe1987 makes a good point bc an Equal Area projection preserves area better than other projected systems). Take a look at the properties of your raster (see the screenshot below). You can multiply the x and y to get the area in the units of your raster. If the projected coordinate system in use is in units of meters and x=10 and y=10, each cell is 100m (+/-).
I believe that you could just then do a simple calculation on the values in the original raster with that size as a coefficient.