aospy
aospy copied to clipboard
Infer surface area from lat + lon if none provided.
I want to use Region
's functionality on some non-aospy-generated data, but it doesn't have a separate surface area array, which we currently assume.
So we should add support for inferring surface area from the lat+lon arrays (preferably the lat+lon bound arrays, but this data also lacks those).
I'll need to code up this functionality to do these calculations anyways, which I'll do initially outside of aospy, but hopefully it won't be too much trouble to then translate that into a PR.
I knew I had done this before somewhere...model.py already implements this as _grid_sfc_area
. So that's a good starting place.