Open glwagner opened 1 month ago
Also the default vertical_scheme
is EnergyConserving()
, but here we use Centered()
:
VectorInvariant
search: VectorInvariant VectorInvariantFormulation WENOVectorInvariant
VectorInvariant(; vorticity_scheme = EnstrophyConserving(),
vorticity_stencil = VelocityStencil(),
vertical_scheme = EnergyConserving(),
kinetic_energy_gradient_scheme = vertical_scheme,
divergence_scheme = vertical_scheme,
upwinding = OnlySelfUpwinding(; cross_scheme = vertical_scheme),
multi_dimensional_stencil = false)
Return a vector invariant momentum advection scheme.
Keyword arguments
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
• vorticity_scheme: Scheme used for Center reconstruction of vorticity. Default: EnstrophyConserving(). Options:
• UpwindBiased()
• WENO()
• EnergyConserving()
• EnstrophyConserving()
• vorticity_stencil: Stencil used for smoothness indicators for WENO schemes. Default: VelocityStencil(). Options:
• VelocityStencil() (smoothness based on horizontal velocities)
• DefaultStencil() (smoothness based on variable being reconstructed)
• vertical_scheme: Scheme used for vertical advection of horizontal momentum. Default: EnergyConserving().
why haven't we changed the default?
Because the default was not working due to a bug when this code was written. I fixed that bug so you can change this default.
Even if the bug was fixed, the docstring for WENOVectorInvariant
doesn't make it clear how to build the advection scheme above:
help?> WENOVectorInvariant
search: WENOVectorInvariant
WENOVectorInvariant(; upwinding = nothing,
multi_dimensional_stencil = false,
weno_kw...)
the docstring also needs to be updated in Oceananigans, in addition to invoking it here.
The constructor was created to facilitate construction of advection schemes for hydrostatic models that use WENO. However, it's not being used.
https://github.com/CliMA/ClimaOcean.jl/blob/9005d74a63668ca85863579091e23eaf956c3f91/src/OceanSimulations/OceanSimulations.jl#L31-L33
We should: