-
Notifications
You must be signed in to change notification settings - Fork 230
Divergent initial velocity fields cause tracer and buoyancy non-conservation with zstar
#4412
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
Comments
Is it also possible that there is some inconsistency between the free surface and the velocity field divergence? There is a similar issue with the NonhydrostaticModel which is why we subtract out the divergent part of the initial condition: Oceananigans.jl/src/Models/NonhydrostaticModels/set_nonhydrostatic_model.jl Lines 52 to 57 in dfe0b6e
Possibly we need to do something similar involving a free surface spin up / fake time-step to ensure consistency there before starting a simulation, not sure. |
The problem seems to be specific to the |
Great, we can probably just do what is done for the NonhyrdostaticModel. |
Ah perhaps, but note that the divergence in the nonhydrostatic model is 3D whereas (I think) you may be referring to 2D divergence here (which is valid, but there is a vertical velocity implied). I wonder if the right solution is not to do exactly the same thing but some kind of analog, eg compute the free surface displacement consistent with the horizontal divergence / vertical velocity, or something... |
Yeah, I think we can compute δx(Δy U) + δy(Δx V) ∇ ⋅ U
∂t_σ = - --------------------- = - --------
Az ⋅ H H (where wᵏ⁺¹ - wᵏ δx(Ax u) + δy(Ay v) Δr ∂t_σ
---------- = - --------------------- - ----------
Δz vol Δz |
While working on #4395 and #4403, we tested initializing simulations with random velocity fields using the
zstar
vertical coordinate. This resulted in tracer and buoyancy non-conservation due to the barotropic velocity field being divergent at the start. The divergence causes non-zero vertical velocities at the surface, which immediately breaks conservation.Proposed Solutions
zstar
simulation with a divergent horizontal velocity field.zstar
is used. This would be helpful in all cases where users don't spin up from rest, for example if they:The text was updated successfully, but these errors were encountered: