What about coastal cells?
UPDATE: code at the drop
With the validation in place we can now test the difference one gets if you look at the actual water area in cells. We did the same thing with the Land. Counting any cell with ANY Land as 100% Land, and then calculating the effect of using the “percent” mask. Not much of a difference on the land. What about SST.
So a new script was added to the zip.
we add the following
Download the LAND/OCEAN .25 degree percent of land grid. This is different from the Land/water I used. That will make its way back into the Land analysis. Land/Water contains “inland” water. I do the download for you and unzip the file.
get the land/ocean mask into a raster layer. cell size to match the ocean. I pull the data in at .25degrees And then I aggregate it to 5 degree data.
Since the landOcean contains values of 0 to 1. zero for ocean, .5 for half and half, 1 for all land, I just switch this to 1 for all ocean and 0 for all land.. values inbetween for “percent” water.
Inside our loop….
That reads.. get the temperature for this layer (mth). Create a ‘logical’ binary map of temp/notemp. Then calculate the area of every cell and FACTOR it according to the percent of Ocean in that cell. If its all ‘1’, then the area is just the area.
Results: Tiny difference.