[WIP] Fix tracer conservation when wind is blowing#4467
[WIP] Fix tracer conservation when wind is blowing#4467
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.
is it possible to write this test to use any grid? or maybe too difficult?
There was a problem hiding this comment.
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.
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.
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.
I don't think we can use the TripolarGrid without bathymetry because of the coordinate singularities
There was a problem hiding this comment.
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.
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.