Conversation
|
Now that the scope for |
|
Looks like masking inactive nodes is always the numerically correct implementation and it is not a user choice, so I think we can remove |
|
@simone-silvestri feel free to make these changes |
Nevermind I did it. |
Not sure what you have in mind for test or something more general but feel free to add it. Note that we've received feedback that metaprogramming makes it hard to understand Oceananigans code/errors and slows down development. So I think we should avoid it if we don't need it. Not sure how many of the "active-weighted" operators are needed. |
|
I was thinking to use it for sea ice, so I think we can add only the horizontal interpolations for now and add other ones as we see fit |
|
Hm... I can't understand neither from this PR nor from the issue why Coriolis needs to be reconstructed. |
The reconstruction is required because of staggering. For example computing This PR does not change whether we reconstruct or not. Instead, it changes how we reconstruct by omitting inactive cells from the reconstruction. As for why, the evidence is given by the empirical test. I'm not offering a theoretical explanation which would require more work... |
|
Oh ok. I get it now. I wasn’t asking for deeper why. |
updated the top-level description |
Resolves #4111. Thanks for the bugfind @kenflat2!
Basically this implements boundary-aware reconstruction for Coriolis terms. Reconstruction is required for Coriolis terms on a staggered grid. Previously, reconstruction was not boundary-aware.
Note, I am not sure about
ConstantCartesianCoriolisorNonTraditionalBetaPlane. Probably there is some work to do there, but reconstruction is different for those so I left it out of this PR.Here's my updated script:
on
mainthis PR
I'm not sure how to test this, ideas welcome.