Closed spencerkclark closed 1 year ago
I have been wondering about this more. Perhaps this should not even be a functionality of xesmf? Should there be a stand alone package that can create these sorts of grids, but also add grid metrics (cell area, distance between different grid positions)? Climate models generate these routinely, I wonder if there is a way to expose this functionality in a user friendly python package. This would certainly help with https://github.com/xgcm/xgcm/issues/487 and also https://github.com/jbusecke/cmip6_preprocessing/issues/237. These were all efforts of mine to achieve this functionality, but I find none of them satisfactory (and this is a more general problem than xgcm or cmip6_preprocessing serves).
cc @raphaeldussin
Indeed a more general purpose grid generation tool would be nice. It seems like the grid_global
utility in xESMF was largely designed around making it easy to construct examples for documentation and testing, which is probably fine to leave as is. I agree given that it would be natural to include additional functionality to a more general tool that it would probably make sense for it to live outside xESMF.
also cc @dcherian
I'm guessing there can be a smaller example than this, but I encountered this recently in my work. Notice that there is a longitude center coordinate greater than 180 degrees:
More generally I'm +1 on @jbusecke's suggestion for more options in
grid_global
in #149; perhaps this issue could be kept in mind in such a refactor.