zoomy_core.model.models.vam module

zoomy_core.model.models.vam module#

VAM — non-hydrostatic Vertically-Averaged Moment system.

Inherits SigmaReference (and through it, zoomy_core.model.basemodel.Model). Unlike SME, the pressure is NOT eliminated via hydrostatic reduction: w and p stay as state variables and the z-momentum equation is Galerkin-projected alongside continuity and momentum_x.

State (matrix-extraction surface):

[h, q_0..q_N, r_0..r_N, p_0..p_N] with q_k = h·u_k, r_k = h·w_k. Pressure modes p_k are kept symbolic (no closure imposed at this level).

class zoomy_core.model.models.vam.VAM(N=2, *, basis_factory=None, **kwargs)#

Bases: SigmaReference

Non-hydrostatic Vertically-Averaged Moments at level N.

Parameters:
  • N (int) – Moment level — number of u / w / p modes is N + 1.

  • basis_factory (callable, optional) – basis_factory(level) Basisfunction. Constructs the u-basis (level N) and the w-basis (level N + 1). Default: Legendre_shifted(level=level). Subclasses can swap this for any other basis without touching the pipeline.

derive_model()#

Build reference equations (via SigmaReference) and run the VAM post-σ pipeline.

project_2d_to_3d()#

Reconstruct 3D fields from the VAM modal state.

Returns Matrix([b, h, u_3d, v_3d, w_3d, p_3d]) where u / w / p come directly from their modal expansions (VAM keeps w and p as state, so no continuity-reconstruction needed for w).

history: list#