(0.106.2) Refactor coriolis and add Triad scheme#5383
(0.106.2) Refactor coriolis and add Triad scheme#5383simone-silvestri merged 49 commits intomainfrom
Conversation
|
Results from the validation case that mimicks the Jamart et al 1986 paper |
|
@jm-c if you want to take a look |
|
what happens on |
|
should you put the test case into the coriolis documentation ? |
Good idea! I ll also test on main. |
|
Ok after a lot of digging, I have the suspicion that the solution is very sensitive to the Coriolis scheme, because that is not added to the split explicit solver, so it is fixed in time and iterated upon many times. I guess that if I add the coriolis scheme to the SplitExplicitFreeSurface solver, the differences are way less since the barotropic flow adapts correctly to the coriolis force, making the flow less numerics-sensitive (typically it means pyhsics is more correctly represented) This PR, therefore, will include a the refactor of the SplitExplicit to include the coriolis scheme in the fast dynamics (if I find out it is indeed relevant) |
|
Regarding the reference for EEN scheme:
but this was for relative vorticity (and not Coriolis), if I remember well. I can send you the pdf if you want. |
Co-authored-by: Navid C. Constantinou <[email protected]>
Co-authored-by: Navid C. Constantinou <[email protected]>
Co-authored-by: Navid C. Constantinou <[email protected]>
Co-authored-by: Navid C. Constantinou <[email protected]>
…jl into ss/refactor-coriolis
|
All of the Coriolis implementations should provide a I am not sure there is a point to the active-weighted schemes. It might be better to delete them. I am not sure in what case there is a benefit to the active weighted schemes -- is there a PR which demonstrated this for some case? |
|
I agree with this:
|
PS can we please not call these "wet point" schemes? They do not only apply to ocean modeling. This is why we introduced the terminology "active weighted", because "active cells" generically apply to any fluid. Just to get all the results in one place... On 2729, there's a plot that shows the "regular scheme" on the left and "active weighted" scheme on the right:
the active-only scheme is shown on the right and has lower noise. On 4112 we have
On this PR, there's a result above:
The analyses are not really consistent with one another though. It seems that active-weighted schemes reduce noise in the vertical velocity. But the analysis on this PR which shows spurious noise due to active weighted schemes looks only at horizontal velocity, and moreover is not a "full test" because it does not include momentum advection. It feels to me like something is missing here. |
Isn't this result specific to some physical parameters that you chose for the test and not a universal result? For example with smaller |
…lization of the interior (#5329) * Enhance MetalGPU support: add device handling for AbstractArray and remove maybe_copy_interior * Fix initialization flag in reduction operations for fields * Remove unused device method for AbstractArray * Refactor device function to accept AbstractArray for broader compatibility * Refactor device function to use Metal.device for Base.ReshapedArray * Add comment about extension for Metal.device to support Base.ReshapedArray * Metal 1.9.3 fix mapreduce device check
|
For sure it might be relevant for other coriolis parameters / coarser resolutions. We should always keep in mind that we are doing this approximation. The only downside is the more computations we need to do which make the free surface heavier in the time stepping |
Yeah it's a typical case of balanced pros vs cons, there is not a universal "better" scheme in this case. |
|
Regarding Coriolis in borotropic sub-time-stepping (split-expliicit free-surface): There might be an inconsistency on C-grid with immerse BC, where the Coriolis tendency of the barotropic model, which is evaluated from the barotropic transport, does not match the vertical integral of the the baroclinic Coriolis tendency. |
|
The failure on the oneAPI extension does not seem related. I will merge. Let's keep in mind the possible |







This PR aims to do three things:
EnstrophyConservingandEnergyConservingschemeintroduce Coriolis force in the split-explicit solver(not beneficial at the moment, to be tested thoroughly in another PR)Point two is necessary since there are some problems in how we do active weighted interpolations. I suspect it is the averaging with the spacing. The motivation for this refactor is described here. The other two points are quality of life improvements and feature additions.
This PR might also help with #4912