Skip to content

Fix for latlon grid cases #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Fix for latlon grid cases #34

wants to merge 13 commits into from

Conversation

cassidymwagner
Copy link
Owner

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 PR is a duplicate of #29 which was closed when #23 was merged into main.
Screenshot 2024-07-29 at 6 05 56 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant