I was investigating this issue in the cosima recipes where the calculation of the curl of the velocity field with xgcmgives different results depending on the choice of dxt or dxu and interpolation steps. To me this should not be the case - otherwise xgcm is not handling grid info appropriately.
I ended up reducing the problem to the interpolation of dx in the meridional direction. Weirdly, interpolating dxu in the y-direction (such that dxu_interp(xu_ocean, xt_ocean)) is not the same as interpolating dxt in the x-direction (such that dxt_interp(xu_ocean, yt_ocean)). The same goes for the interpolation of area and volume given these depend on dx.
To me this is a tad worrying as it will have an effect on any gradient, differentiation, interpolation, etc operation - I don’t know if its an xgcm problem or a grid problem. I’ve done a minimal working example here for both 0.1 and 0.25 degrees.
Thank you very much in advance