It's been challenging to test this. So far I've tried to reproduce the linear 2D example to show scaling with $r^2$ and $r^3$. It seems to match relatively well if I set the latitude and longitude arrays to vary from 0 to 1m, similar to the 0 to 1 code units range in the original example. But if I use a larger range of lats/lons, the amplitudes change a lot. Each SF still scales with $r^2$ and $r^3$ as before, but the factors are different, especially for the advective SF which becomes much smaller with a larger range of lats/lons. I expect that this is because of the advection/gradient calculation since dx/dy is now much larger (keeping nx/ny the same). Find the example notebook here, relevant figure below.
This PR aims to improve latlon grid support.
It's been challenging to test this. So far I've tried to reproduce the linear 2D example to show scaling with $r^2$ and $r^3$. It seems to match relatively well if I set the latitude and longitude arrays to vary from 0 to 1m, similar to the 0 to 1 code units range in the original example. But if I use a larger range of lats/lons, the amplitudes change a lot. Each SF still scales with $r^2$ and $r^3$ as before, but the factors are different, especially for the advective SF which becomes much smaller with a larger range of lats/lons. I expect that this is because of the advection/gradient calculation since dx/dy is now much larger (keeping nx/ny the same). Find the example notebook here, relevant figure below.
I've also included two new examples
Note: this branch was originally created from #23 so this PR will just update that branch/PR instead of
main
directly.