Skip to content
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

Mistake in computation horizontal divergence #14

Open
daanreijnders opened this issue Apr 15, 2021 · 1 comment · May be fixed by #15
Open

Mistake in computation horizontal divergence #14

daanreijnders opened this issue Apr 15, 2021 · 1 comment · May be fixed by #15

Comments

@daanreijnders
Copy link

daanreijnders commented Apr 15, 2021

First of all, thanks for making these tutorials! They've really helped me master xgcm, which I use almost daily now.

I spotted a mistake in the MITgcm example. The computation of the divergence is incorrect. The right MITgcm discrete form is found here. The difference is that there should be no multiplication by ds.drF (which in the link you currently include is present to correctly represent the z-derivative of the vertical velocity in the continuity equation), and that there should be an additional division by ds.hFacC. This also means that you may want to rename u/v_transport, since you don't need the transport after all.

I figured it's easiest for me to open an issue over a PR, since I don't know your specific workflow/integration for getting these examples on the xgcm website.

@daanreijnders daanreijnders linked a pull request Apr 15, 2021 that will close this issue
@daanreijnders
Copy link
Author

Actually, just submitted a PR

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 a pull request may close this issue.

1 participant