-
Notifications
You must be signed in to change notification settings - Fork 32
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
Fixing sign error for mean meridional PV gradient Qy
in MultiLayerQG
module
#329
Conversation
Matts dev
reverting to old definition of reduced grav to test bug fix with sign…
…d denominator by 1 index) to verify that you must have that denominator as constant for zero interior PV
Trying to add shifted (+1) denominator of reduced grav back to main, so that I can use it in Julia
…uest from this fork to main repo
…ull request to main GFjl repo
thanks @mjclobo this looks good! The tests pass both before and after your change! This implies that the tests are oblivious to the sign of that term in the Qy. I'll try to think of an additional test that would capture such mistake an perhaps add it in the PR. Also, since this is a bug fix we should make a new patch release. Can you bump a patch release version number? This means change the package version at: GeophysicalFlows.jl/Project.toml Line 5 in ef43c78
to |
There is a test that would have captured this but it only tests 2 layer configurations! GeophysicalFlows.jl/test/test_multilayerqg.jl Lines 155 to 166 in c0c42ce
And since the typo was in the interior points, it didn't capture it! I'll write another 3-layer version of this test. |
Okay! Being I don't have write access to the main project, I should make changes to my fork and make a PR to merge the change to the Project.toml file, right? |
Ah, I see. Nice! Yes, the two-layer model generally seems to be the star of the show...I'm hoping to run ~15 layer models for a research project of mine, so I'm glad to be the guinea pig :) |
Yes, change the Project.toml file on your fork on this branch: |
I added a test and it does fail on main branch! I'll push to your branch and hopefully it passes there! I'll do that later -- I need to head out now. |
Updating version number for patch release
Okay, no rush! I'll keep an eye out for it. |
unrelated to this PR but note that if you plan to run MultiLayerQG on GPU for more than 2 layers we first need to deal with #112 Otherwise the PV inversion is very slow!! For the 2-layer case we hardcoded the inversion in #270. But that’s not doable for 15-layers. :) |
Thanks for the heads up! I plan on trying to run the models on CPU, since that's what's most available to me, but if that's too slow maybe I can work on this. It seems pretty straightforward, though ``pretty straightforward'' are usually famous last words.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me!
I hope that after merging #293 and merging main here the docs will be able to built on this PR and we can merge.
@mjclobo welcome to GeophysicalFlows :) ! |
This pull request addresses issue #328 by changing the sign of the the Fm term when calculating the mean meridional PV gradient Qy for interior layers of a multi-layer model, found on line 367 of multilayerqg.jl:
GeophysicalFlows.jl/src/multilayerqg.jl
Line 367 in c0c42ce