-
Notifications
You must be signed in to change notification settings - Fork 235
[WIP] Fix tracer conservation when wind is blowing #4467
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
base: main
Are you sure you want to change the base?
Conversation
Is the problem specific to TripolarGrid, or does it also occur on rectilinear or lat-lon? |
Co-authored-by: Gregory L. Wagner <[email protected]>
model = make_tripolar_test_model(arch, with_wind=false) | ||
Δt = 2minutes | ||
test_zstar_coordinate(model, 300, Δt) |
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.
is it possible to write this test to use any grid? or maybe too difficult?
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.
Could be done with a slight refactor. Question is: Do we want to double the number of tests? We are testing quite a number of rectilinear grid cases (different topologies, immersed boundary vs. not, etc.)
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.
It's probably worth doing the refactor and test with wind forcing for all grids. This would also answer the question whether the issue is specific to the TripolarGrid. I will continue working on this in a few hours.
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.
we can take a look at how long the test is taking and decide based on that perhaps. Perhaps prioritizing just lat-lon along with Tripolar makes sense
Good question - I haven't tested this for rectilinear and lat-lon. |
Co-authored-by: Gregory L. Wagner <[email protected]>
could be a red herring, but if there is a difference between grids (also when using immersed boundaries or not) that might be an important clue |
test/test_zstar_coordinate.jl
Outdated
Δt = 2minutes | ||
test_zstar_coordinate(model, 300, Δt) | ||
for with_wind in (false, true) | ||
for with_bathymetry in (false, true) |
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.
I don't think we can use the TripolarGrid without bathymetry because of the coordinate singularities
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.
oh okay, that explains
However, tracer conservation fails at the initial time step for the TripolarGrid without bathymetry (both with and without wind). So this adds more questions than answers...
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.
okay, I will roll back
In an attempt to get some more clues, 765be75 sets up additional tracer conservation tests but without bathymetry (with and without wind). However, tracer conservation fails at the initial time step for the TripolarGrid without bathymetry (both with and without wind). So this adds more questions than answers... |
765be75
to
6c74724
Compare
This PR aims to close #4466.
I am adding a test that checks for tracer conservation on a tripolar grid with wind forcing, using the code snippet provided in #4466. Currently, the test fails due to non-conservation of the passive tracer. Once the underlying issue is resolved, this test should pass.
Feel free to push directly to this PR with any proposed fixes of the underlying issue.