From 465930317f426eea744b16e895096d9185a41547 Mon Sep 17 00:00:00 2001 From: mark-petersen Date: Thu, 1 May 2025 12:07:26 -0700 Subject: [PATCH 01/65] update variables in V0 to match --- .../omega/doc/design/OmegaV0ShallowWater.md | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/components/omega/doc/design/OmegaV0ShallowWater.md b/components/omega/doc/design/OmegaV0ShallowWater.md index c41f1d830669..eef6b8b6008a 100644 --- a/components/omega/doc/design/OmegaV0ShallowWater.md +++ b/components/omega/doc/design/OmegaV0ShallowWater.md @@ -109,7 +109,7 @@ Next we replace the non-linear advection term with the right-hand side of the ve $$ \boldsymbol{u} \cdot \nabla \boldsymbol{u} &= (\nabla \times \boldsymbol{u}) \times \boldsymbol{u} + \nabla \frac{|\boldsymbol{u}|^2}{2} \\ &= \{\boldsymbol{k} \cdot (\nabla \times \boldsymbol{u})\} \boldsymbol{k} \times \boldsymbol{u} + \nabla \frac{|\boldsymbol{u}|^2}{2} \\ -&= \omega \boldsymbol{u}^{\perp} + \nabla K. +&= \zeta \boldsymbol{u}^{\perp} + \nabla K. $$ The governing equations for Omega-0 in continuous form are then @@ -141,10 +141,10 @@ The drag consists of simple Rayleigh drag for spin-up as well as quadratic botto Here $q$ is the potential vorticity, so that the term $$ -q\left(h\boldsymbol{u}^{\perp}\right) = \frac{\omega + f}{h}\left(h\boldsymbol{u}^{\perp}\right) - = \omega \boldsymbol{u}^{\perp} + f \boldsymbol{u}^{\perp} +q\left(h\boldsymbol{u}^{\perp}\right) = \frac{\zeta + f}{h}\left(h\boldsymbol{u}^{\perp}\right) + = \zeta \boldsymbol{u}^{\perp} + f \boldsymbol{u}^{\perp} $$ -is composed of the rotational part of the advection $\omega \boldsymbol{u}^{\perp}$ and the Coriolis term $f \boldsymbol{u}^{\perp}$. This term is discussed in [Ringler et al. 2010](https://www.sciencedirect.com/science/article/pii/S0021999109006780) sections 2.1 and 2.2. +is composed of the rotational part of the advection $\zeta \boldsymbol{u}^{\perp}$ and the Coriolis term $f \boldsymbol{u}^{\perp}$. This term is discussed in [Ringler et al. 2010](https://www.sciencedirect.com/science/article/pii/S0021999109006780) sections 2.1 and 2.2. The thickness equation (2) is derived from conservation of mass for a fluid with constant density, which reduces to conservation of volume. The model domain uses fixed horizontal cells with horizontal areas that are constant in time, so the area drops out and only the layer thickness $h$ remains as the prognostic variable. @@ -215,7 +215,7 @@ Table 1. Definition of variables | $K$ | kinetic energy | m$^2$/s$^2$ | cell | KineticEnergyCell | $K = \left\| {\boldsymbol u} \right\|^2 / 2$ | | $l_e $ | edge length (vertex span) | m | edge | DvEdge | | | $n_{e,i}$ | edge normal sign | unitless | edge | EdgeSignOnCell| also by index ordering of CellsOnEdge | -| $q$ | potential vorticity | 1/m/s | vertex | | $q = \eta/h = \left(\omega+f\right)/h$ | +| $q$ | potential vorticity | 1/m/s | vertex | | $q = \left(\zeta+f\right)/h$ | | $Ra$ | Rayleigh drag coefficient | 1/s | constant | | | | $t$ | time | s | none | | | | $t_{e,v}$ | edge tangential sign | unitless | edge | EdgeSignOnVertex | also by index ordering of VerticesOnEdge | @@ -225,13 +225,12 @@ Table 1. Definition of variables | ${\boldsymbol u}_W$ | wind velocity | m/s | edge | | | | $w_{e,e'}$ | tangential edge weights| unitless | edge | | weights defined in [Ringler et al. 2010](https://www.sciencedirect.com/science/article/pii/S0021999109006780) eqn 24 | |${\tilde w}_{e,e'}$ | normalized tangential edge weights| unitless | edge | WeightsOnEdge | normalized weights, ${\tilde w}_{e,e'} = \tfrac{l_{e'}}{d_e} w_{e,e'}$ | -| $\eta$ | absolute vorticity | 1/s | vertex | | $\eta=\omega + f$ | | $\kappa_2$ | tracer diffusion | m$^2$/s | cell | | | | $\kappa_4$ | biharmonic tracer diffusion | m$^4$/s | cell | | | | $\nu_2$ | viscosity | m$^2$/s | edge | | | | $\nu_4$ | biharmonic viscosity | m$^4$/s | edge | | | | $\phi$ | tracer | varies | cell | | units may be kg/m$^3$ or similar | -| $\omega$ | relative vorticity | 1/s | vertex | RelativeVorticity | $\omega={\boldsymbol k} \cdot \left( \nabla \times {\boldsymbol u}\right)$ | +| $\zeta$ | relative vorticity | 1/s | vertex | RelativeVorticity | $\zeta={\boldsymbol k} \cdot \left( \nabla \times {\boldsymbol u}\right)$ | @@ -375,11 +374,11 @@ The gradient of a scalar at the middle of an edge, pointing tangentially along t The perpendicular gradient maps a scalar at vertices to an edge-tangential vector component, $$ -\left(\nabla \omega_v\right)_e^\perp = \frac{1}{l_e} \sum_{v\in VE(e)} -t_{e,v}\omega_v. +\left(\nabla \zeta_v\right)_e^\perp = \frac{1}{l_e} \sum_{v\in VE(e)} -t_{e,v}\zeta_v. $$ Like the standard gradient, in practice we drop the sign indicator $t_{e,v}$ and rewrite it using the index ordering, $$ -\left(\nabla \omega_v\right)_e^\perp = \frac{\omega_{v2} - \omega_{v1}}{l_e}, +\left(\nabla \zeta_v\right)_e^\perp = \frac{\zeta_{v2} - \zeta_{v1}}{l_e}, $$ where the positive vector ${\bf n}^\perp$ is 90$^o$ to the left of ${\bf n}$. The indices are ordered such that ${\bf n}^\perp$ points from $v_1$ to $v_2$, which corresponds to `VerticesOnEdge(IEdge, 0)` and `VerticesOnEdge(IEdge, 1)` in the code. @@ -393,7 +392,7 @@ In a Voronoi tessellation the edge is defined to be at the mid-point between the #### 3.2.7. Vertex to Edge Interpolation The mid-point average of a scalar from vertices to the middle of the connecting edge is $$ -[\omega_v]_e = \frac{1}{2} \sum_{v\in VE(e)} \omega_v. +[\zeta_v]_e = \frac{1}{2} \sum_{v\in VE(e)} \zeta_v. $$ The is a distance-weighted average, since the edge quantity lives at the mid-point between the vertices. One could alternatively compute an area-weighted average using the dual-mesh cell area ${\hat A}_v$ surrounding each vertex, but that is not done and would result in very small differences. @@ -470,11 +469,11 @@ See [Calandrini et al. 2021](https://www.sciencedirect.com/science/article/pii/S The potential vorticity term, $q\left(h\boldsymbol{u}^{\perp}\right)$, includes the rotational part of the advection. It may be computed in two ways, $$ -\text{Option 1: } \left[ \frac{\omega_v +f_v}{[h_i]_v}\right]_e\left([h_i]_e u_e^{\perp}\right) +\text{Option 1: } \left[ \frac{\zeta_v +f_v}{[h_i]_v}\right]_e\left([h_i]_e u_e^{\perp}\right) $$ $$ -\text{Option 2: }([\omega_v]_e +f_e) u_e^\perp +\text{Option 2: }([\zeta_v]_e +f_e) u_e^\perp $$ The first computes the potential vorticity $q_v$ at the vertex and interpolates that quantity to the edge, which is what is done in MPAS-Ocean. One may also cancel the thickness $h$ (ignoring the interpolated locations) and use option 2. Additional interpolation options and results are presented in [Calandrini et al. 2021](https://www.sciencedirect.com/science/article/pii/S146350032100161X) @@ -492,17 +491,17 @@ The Del2, or Laplacian operator, viscous momentum dissipation maps edge-normal v $$ \nabla^2 {\bf u} &= \nabla \left( \nabla\cdot{\bf u}\right) - \nabla \times \left( \nabla \times {\bf u} \right) \\ - &= \nabla {\bf D} - \nabla \times \omega \\ - &= \nabla {\bf D} - {\bf k} \times \nabla \omega \\ - &= \nabla {\bf D} - \nabla^\perp \omega. + &= \nabla {\bf D} - \nabla \times \zeta \\ + &= \nabla {\bf D} - {\bf k} \times \nabla \zeta \\ + &= \nabla {\bf D} - \nabla^\perp \zeta. $$ This formulation is also mentioned in [Gassmann 2011](https://linkinghub.elsevier.com/retrieve/pii/S0021999111000325) (equation 17), [Gassman 2018](https://onlinelibrary.wiley.com/doi/10.1002/qj.3294) (equation 44) and [Lapolli et al. 2024](https://www.sciencedirect.com/science/article/pii/S1463500324000222) (section 4.5.2). For our discretization, the full Del2 term is written as $$ -\nu_2 \nabla^2 u_e &= \nu_2 \left( \nabla D_i - \nabla^\perp \omega_v\right) \\ -&= \nu_2 \left( \frac{1}{d_e} \sum_{i\in CE(e)} -n_{e,i}D_i - \frac{1}{l_e} \sum_{v\in VE(e)} -t_{e,v}\omega_v\right) \\ -&= \nu_2 \left( \frac{D_{i2} - D_{i1}}{d_e} - \frac{\omega_{v2} - \omega_{v1}}{l_e} \right), +\nu_2 \nabla^2 u_e &= \nu_2 \left( \nabla D_i - \nabla^\perp \zeta_v\right) \\ +&= \nu_2 \left( \frac{1}{d_e} \sum_{i\in CE(e)} -n_{e,i}D_i - \frac{1}{l_e} \sum_{v\in VE(e)} -t_{e,v}\zeta_v\right) \\ +&= \nu_2 \left( \frac{D_{i2} - D_{i1}}{d_e} - \frac{\zeta_{v2} - \zeta_{v1}}{l_e} \right), $$ where the ordering of indices $\{i_i, i_2\}$ and $\{v_1, v_2\}$ are explained in the gradient operator sections above. From 1f4681ed90b4f9c35e7e70c14e5de2d3ce6df9c4 Mon Sep 17 00:00:00 2001 From: mark-petersen Date: Mon, 21 Apr 2025 07:33:04 -0700 Subject: [PATCH 02/65] Add Omega V1 governing equations --- .../omega/doc/design/OmegaV1GoverningEqns.md | 738 ++++++++++++++++++ components/omega/doc/index.md | 1 + 2 files changed, 739 insertions(+) create mode 100644 components/omega/doc/design/OmegaV1GoverningEqns.md diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md new file mode 100644 index 000000000000..0a7d8f1e6046 --- /dev/null +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -0,0 +1,738 @@ +# Omega V1: Governing Equations + + + + +## 1. Overview + +This design document describes the governing equations for Omega, the Ocean Model for E3SM Global Applications. Overall, Omega is an unstructured-mesh ocean model based on TRiSK numerical methods ([Thuburn et al. 2009](https://www.sciencedirect.com/science/article/pii/S0021999109004434)) that is specifically designed for modern exascale computing architectures. The algorithms in Omega will be mostly identical to those in MPAS-Ocean, but it will be written in c++ rather than Fortran in order to take advantage of libraries to run on GPUs, such as Kokkos ([Trott et al. 2022](https://ieeexplore.ieee.org/document/9485033)). Significant differences between MPAS-Ocean and Omega are: + +1. Omega is non-Boussinesq. This means that the full 3D density is used everywhere, and results in a mass-conserving model. MPAS-Ocean and POP were Boussinesq, so that a reference density $\rho_0$ is used in the pressure gradient term, and were therefore volume-conserving models. In Omega the layered mass-conservation equation is in terms of mass-thickness ($h=\rho \Delta z$). In MPAS-Ocean the simple thickness ($h=\Delta z$) is the prognostic volume variable (normalized by horizontal cell area). +1. Omega will use the updated equation of state TEOS10, while MPAS-Ocean used the Jackett-McDougall equation of state. + +The planned versions of Omega are: + +- **Omega-0: Shallow water equations with identical vertical layers and inactive tracers.** In his first version, there is no vertical transport or advection. The tracer equation is horizontal advection-diffusion, but tracers do not feed back to dynamics. Pressure gradient is simply gradient of sea surface height. Capability is similar to [Ringler et al. 2010](https://www.sciencedirect.com/science/article/pii/S0021999109006780) +- **Omega-1.0: Layered ocean, idealized, no surface fluxes.** This adds active temperature, salinity, and density as a function of pressure in the vertical. Vertical advection and diffusion terms are added to the momentum and tracer equations. An equation of state and simple vertical mixing, such as constant coefficient, are needed. Capability and testing are similar to [Petersen et al. 2015](http://www.sciencedirect.com/science/article/pii/S1463500314001796). Tests include overflow, internal gravity wave, baroclinic channel, seamount, and vertical merry-go-round. +- **Omega-1.1: Layered ocean, idealized, with surface fluxes.** Addition of simple vertical mixing scheme such as Pacanowski & Philander; nonlinear equation of state (TEOS10); tracer surface restoring to a constant field; constant wind forcing; and flux-corrected transport for horizontal advection. Testing will be with the baroclinic gyre and single column tests of surface fluxes and vertical mixing. +- **Omega-2.0: Coupled within E3SM, ocean only.** Ability to run C cases (active ocean only) within E3SM. Requires addition of E3SM coupling infrastructure; simple analysis (time-averaged output of mean, min, max); split baroclinic-barotropic time; global bounds checking on state. Testing and analysis similar to [Ringler et al. 2013](https://www.sciencedirect.com/science/article/pii/S1463500313000760), except Omega uses a non-Boussinesq formulation. +- **Omega-2.1: E3SM fully coupled** Ability to run G cases (active ocean and sea ice) and B cases (all components active) within E3SM. This will include: a full vertical mixing scheme, such as KPP; frazil ice formation in the ocean; and a submosescale parameterization. Omega 2.1 will mostly be run at eddy-resolving resolutions, and will not include parameterizations for lower resolutions such as Gent-McWilliams and Redi mixing. Simulations will be compared to previous E3SM simulations, including [Caldwell et al. 2019](https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2019MS001870) and [Petersen et al. 2019](https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2018MS001373). + +This document describes the governing equations for the layered ocean model, which are applicable for Omega-1.0 onwards. Specific terms, such as the pressure gradient, vertical mixing, and parameterizations, are left in their general form here but are described in more detail in other design documents. + +## 2. Requirements + +The requirements in the [Omega-0 design document](OmegaV0ShallowWater) still apply. Additional design requirements for Omega-1 are: + +### Omega will be an incompressible, hydrostatic, non-Boussinesq ocean model. +See discussion in introduction. The non-Boussinesq formulation uses the full density throughout resulting in governing equations that conserve mass rather than volume. The substantial change is that the ``thickness'' variable, $h$, is now a mass-thickness, $h = \rho \Delta z$. This is explained in the derivation of the [layered equations below](#layered-equations). + +### Omega will use TEOS10 for the equation of state. +See additional [EOS design document](EOS) + +### Omega-1.0 will add new terms for the pressure gradient, vertical mixing, and vertical advection. +See forthcoming design documents on the pressure gradient, vertical mixing, and vertical advection. + +## 3. Continuous Equations + +The continuous form of the conservation equations are as follows [Kundu et al. 2024](https://www.amazon.com/Fluid-Mechanics-Pijush-K-Kundu/dp/012405935X), chapter 4, eqns 4.7 and 4.22. This is before any assumptions are made, so this is a compressible, non-hydrostatic, non-Boussinesq fluid. Here all variables are a function of $(x,y,z)$, ${\bf u}_{3D}$ denotes the three-dimensional velocity vector, ${\bf u}_{3D} \otimes {\bf u}_{3D} = {\bf u}_{3D}{\bf u}_{3D}^T$ is the tensor product, $\nabla_{3D}$ is the three-dimensional gradient, $D/Dt$ is the material derivative, and other variables defined in the [Variable Definition Section below](#variable-definitions). + +momentum: + +$$ +\frac{D \rho {\bf u}_{3D} }{D t} \equiv +\frac{\partial \rho {\bf u}_{3D}}{\partial t} + + \nabla_{3D} \cdot \left( \rho {\bf u}_{3D} \otimes {\bf u}_{3D} \right) + = - \nabla_{3D} p ++ \rho {\bf D}^u + \rho {\bf F}^u +$$ (continuous-momentum) + +mass: + +$$ +\frac{D \rho}{D t} \equiv +\frac{\partial \rho }{\partial t} + + \nabla_{3D} \cdot \left( \rho {\bf u}_{3D} \right) += 0 +$$ (continuous-mass) + +tracers: + +$$ +\frac{D \rho \varphi }{D t} \equiv +\frac{\partial \rho \varphi}{\partial t} + + \nabla_{3D} \cdot \left( \rho \varphi {\bf u}_{3D} \right) += D^\varphi + Q^\varphi +$$ (continuous-tracer) + +Here we have express the following terms as a general operators, with examples of specific forms provided below: the dissipation ${\bf D}^u$, momentum forcing ${\bf F}^u$, tracer diffusion $D^\varphi$, and tracer sources and sinks $Q^\varphi$. The momentum equation can be rewritten using the product rule on $\rho {\bf u}$, mass conservation, and dividing by $\rho$, as: + +$$ +\frac{D {\bf u}_{3D} }{D t} \equiv +\frac{\partial {\bf u}_{3D}}{\partial t} + + \nabla_{3D} \cdot \left( {\bf u}_{3D} \otimes {\bf u}_{3D} \right) + = - \frac{1}{\rho} \nabla_{3D} p ++ {\bf D}^u + {\bf F}^u +$$ (continuous-momentum-rho) + +Geophysical fluids such as the ocean and atmosphere are rotating and stratified, and horizontal velocities are orders of magnitude larger than vertical velocities. It is therefore convenient to separate the horizontal and vertical as ${\bf u}_{3D} = \left( {\bf u}, w \right)$ and $\nabla_{3D} = \left( \nabla_z, d/dz \right)$ where $z$ is the vertical direction in a local coordinate frame on the earth's surface and $w$ is the vertical velocity. The $z$ subscript on $\nabla_z$ is to remind us that this is the true horizontal gradient (perpendicular to $z$), as opposed to gradients within tilted layers used in the following section. The gravitational force $g {\bf k}$ is added in the vertical. The rotating frame of reference results in the Coriolis force $f {\bf k} \times {\bf u} \equiv f {\bf u}^\perp$, where $f$ is the Coriolis parameter and ${\bf u}^\perp$ is the horizontal velocity rotated $90^o$ from $\bf u$. See any textbook in the [References](#references) for a full derivation. + +The horizontal parts of the advective term may be replaced with the vector identity + +$$ +\nabla_z \cdot \left( {\bf u} \otimes {\bf u} \right) = +\boldsymbol{u} \cdot \nabla_z \boldsymbol{u} &= (\nabla_z \times \boldsymbol{u}) \times \boldsymbol{u} + \nabla_z \frac{|\boldsymbol{u}|^2}{2} \\ +&= \{\boldsymbol{k} \cdot (\nabla_z \times \boldsymbol{u})\} \boldsymbol{k} \times \boldsymbol{u} + \nabla_z \frac{|\boldsymbol{u}|^2}{2} \\ +&= \zeta \boldsymbol{u}^{\perp} + \nabla_z K. +$$ (advection-identity) + +where $\zeta$ is relative vorticity and $K$ is kinetic energy. This step separates the horizontal advection into non-divergent and non-rotational components, which is useful in the final TRiSK formulation. + +#### Assumptions + +For a primitive equation ocean model, we assume the fluid is incompressible and hydrostatic. For Omega we are not making the Boussinesq assumption, so all density terms are the full density. In particular, the density coefficient of the pressure gradient in [](#continuous-momentum) is not a constant, as it is in primitive equation models like POP and MPAS-Ocean. + +**Incompressible:** Assume that the three-dimensional velocity field is nondivergent, + +$$ + \nabla_z \cdot {\bf u} + \frac{\partial w}{\partial z} = 0. +$$ (continuous-incompressible) + +**Hydrostatic:** Beginning with the vertical momentum equation, + +$$ +\frac{D w }{D t} + = + - \frac{1}{\rho} \frac{\partial p}{\partial z} - g + {\bf D}^u + {\bf F}^u +$$ (continuous-vert-mom) + +assume that advection of vertical momentum $Dw/Dt$, dissipation, and forcing are small, and that the first order balance is between pressure gradient and buoyancy, + +$$ +\frac{\partial p}{\partial z} + = - \rho g. +$$ (hydrostatic-balance) +We then integrate from $z$ to the surface $\eta$ to obtain the hydrostatic pressure equation, + +$$ +p(x,y,z) = p^{surf}(x,y) + \int_{z}^{\eta} \rho g dz'. +$$ (continuous-hydrostatic-pressure) + +The constitutive equation is the equation of state, + +$$ +\rho = f_{eos}(p,\Theta,S). +$$ (continuous-eos) +where potential temperature, $\Theta$, and salinity ,$S$, are examples of tracers $\varphi$. + +#### Final Continuous Equations + +The final form of the continuous conservation equations for a non-Boussinesq, incompressible, non-hydrostatic ocean are + +momentum: + +$$ +\frac{\partial {\bf u}}{\partial t} ++ \zeta {\bf u}^\perp + f {\bf u}^\perp ++ w\frac{\partial {\bf u}}{\partial z} + = - \frac{1}{\rho} \nabla_z p + - \nabla_z K ++ {\bf D}^u + {\bf F}^u +$$ (continuous-momentum-final) + +mass: + +$$ +\frac{\partial \rho }{\partial t} + + \nabla_z \cdot \left( \rho {\bf u} \right) + + \frac{\partial}{\partial z} \left( \rho w \right) += 0 +$$ (continuous-mass-final) + +tracers: + +$$ +\frac{\partial \rho \varphi}{\partial t} + + \nabla_z \cdot \left( \rho \varphi {\bf u} \right) + + \frac{\partial}{\partial z} \left( \rho \varphi w \right) += D^\varphi + Q^\varphi +$$ (continuous-tracer-final) + +equation of state: + +$$ +\rho = f_{eos}(p,\Theta,S). +$$ (continuous-eos-final) + +hydrostatic pressure: + +$$ +p(x,y,z) = p^{surf}(x,y) + \int_{z}^{\eta} \rho g dz'. +$$ (continuous-hydrostatic-pressure-final) + +Here the $\nabla$ operators are exactly horizontal; we expand terms for tilted layers in the following section. The momentum diffusion terms include Laplacian (del2), biharmonic (del4), and vertical viscosity, + +$$ +{\bf D}^u += \nu_2 \nabla^2 {\bf u} - \nu_4 \nabla^4 {\bf u} + + \frac{\partial }{\partial z} \left( \nu_v \frac{\partial {\bf u}}{\partial z} \right) +$$ (continuous-h_mom_diff) +and may also include a Rayleigh drag and eventually parameterizations. Momentum forcing is due to wind stress and bottom drag. Similarly, the tracer diffusion terms include Laplacian (del2), and vertical viscosity, + +$$ +D^\varphi = + \nabla\cdot\left(\rho \kappa_2 \nabla\varphi \right) ++ \rho \frac{\partial }{\partial z} + \left( \kappa_v \frac{\partial \varphi}{\partial z} \right), +$$ (continuous-v_tr_diff) + +and may also include a biharmonic (del4) term and parameterizations such as Redi mixing. Sources and sinks include surface fluxes from the atmosphere and land, and bio-geo-chemical reactions. +All of the diffusion and forcing terms are written in more detail with the [Discrete Equations](#discrete-equations) below. + +## 4. Layered Equations + +Omega-1 will be non-Boussinesq, which means that density is not assumed to be constant in any terms. This results in a mass conservation equation, rather than a volume conservation equation. The fully continuous equations were presented in the previous section. Here we derive the layered equations by discretizing in the vertical, while the horizontal remains continuous. We discretize by integrating in the vertical from the lower surface $z=z_k^{bot}(x,y)$ to $z=z_k^{top}(x,y)$ for the layer with index $k$, as described in [Ringler et al. 2013](https://www.sciencedirect.com/science/article/pii/S1463500313000760) Appendix A.2. Equivalently, we can vertically integrate from a deeper pressure surface $p=p_k^{bot}(x,y)$ (higher pressure) to $p=p_k^{top}(x,y)$ where $p$ and $z$ are related by the hydrostatic pressure equation [](#continuous-hydrostatic-pressure). + +### Layer Integration + +For non-Boussinesq layered equations we begin by defining the mass-thickness of layer $k$ as + +$$ +h_k(x,y,t) + \equiv \int_{z_k^{bot}}^{z_k^{top}} \rho dz = \frac{1}{g} \int_{p_k^{top}}^{p_k^{bot}} dp. +$$ (def-h) + +The letter $h$ is used because this is the familiar variable for thickness in Boussinesq primitive equations. In the Boussinesq case the thickness equation describes conservation of volume because $h_k^{Bouss}$ is volume normalized by horizontal area, resulting in a height, + +$$ +h_k^{Bouss}(x,y,t) + \equiv \int_{z_k^{bot}}^{z_k^{top}} dz. +$$ (def-h-bouss) + +In this document we remain with the more general non-Boussinesq case, where $h_k$ is mass per unit area (kg/m$^2$). Since horizontal cell area remains constant, the thickness equation is a statement of conservation of mass. + +Throughout this derivation we can write all equations equivalently in $z$-coordinates (depth), or in $p$-coordinates (pressure). From the hydrostatic equation, any quantity $\varphi$ may be integrated in $z$ or $p$ as + +$$ +\int_{z_k^{bot}}^{z_k^{top}} \varphi \rho dz += \frac{1}{g} \int_{p_k^{top}}^{p_k^{bot}} \varphi dp. +$$(depth-pressure-integral-conversion) + +We can convert from an interfacial depth surface $z^{top}$ to a pressure surface $p^{top}$ with the hydrostatic equation [](continuous-hydrostatic-pressure-final): + +$$ +p^{top}(x,y) = p^{surf}(x,y) + \int_{z^{top}(x,y)}^{\eta(x,y)} \rho g dz +$$ (def-p-surf) + +where $\eta$ is the sea surface height and $p^{surf}$ is the surface pressure at $\eta$ imposed by the atmosphere or floating ice. Note that pressure increases with depth. This means that positive $p$ points downward, so that the $top$ and $bot$ extents of the integration limits are flipped in [](#depth-pressure-integral-conversion). + +For any three-dimensional quantity $\varphi(x,y,z,t)$, the mass-thickness-averaged quantity in layer $k$ is defined as + +$$ +\varphi_k(x,y,t) +\equiv \frac{\int_{z_k^{bot}}^{z_k^{top}} \rho \varphi dz}{\int_{z_k^{bot}}^{z_k^{top}} \rho dz} += \frac{\int_{z_k^{bot}}^{z_k^{top}} \rho \varphi dz}{h_k} +$$(def-mass-thickness-average) + +At this point our derivation has not made any assumptions about density, and may be used for both Boussinesq and non-Boussinesq fluids. A Boussinesq derivation would now assume small variations in density and replace $\rho(x,y,z,t)$ with a constant $\rho_0$ everywhere but the pressure gradient coefficient. In that case $\rho$ divides out in [](#def-mass-thickness-average) the Boussinesq layer quantities would simply be thickness-weighted averages. + +We can now derive the layered equations. Writing the momentum equation [](continuous-momentum-final) with $\rho$ included as in [](continuous-momentum), we integrate the continuous equations [](continuous-momentum-final), [](continuous-mass-final), [](continuous-tracer-final) in $z$ from $z_k^{bot}$ to $z_k^{top}$, + +$$ +\frac{\partial }{\partial t} \int_{z_k^{bot}}^{z_k^{top}} \rho{\bf u} dz ++ \int_{z_k^{bot}}^{z_k^{top}} \rho \left( \zeta + f \right){\bf u}^\perp dz ++ \int_{z_k^{bot}}^{z_k^{top}} \frac{\partial }{\partial z} \left( \rho w{\bf u} \right) dz + = \int_{z_k^{bot}}^{z_k^{top}} \rho \left[- \frac{1}{\rho}\nabla_z p - \nabla_z K ++ {\bf D}^u + {\bf F}^u \right] dz +$$ (z-integration-momentum) + +$$ +\frac{\partial }{\partial t} \int_{z_k^{bot}}^{z_k^{top}} \rho dz + +\nabla_z \cdot \left( \int_{z_k^{bot}}^{z_k^{top}} \rho {\bf u} dz \right) + + \int_{z_k^{bot}}^{z_k^{top}}\frac{\partial}{\partial z} \left( \rho w \right) dz += 0 +$$ (z-integration-mass) + +$$ +\frac{\partial }{\partial t} \int_{z_k^{bot}}^{z_k^{top}} \rho \varphi dz + + \nabla_z \cdot \left( \int_{z_k^{bot}}^{z_k^{top}} \rho \varphi {\bf u} dz \right) + + \int_{z_k^{bot}}^{z_k^{top}} \frac{\partial}{\partial z} \left( \rho \varphi w \right) dz += \int_{z_k^{bot}}^{z_k^{top}} \left( D^\varphi + Q^\varphi \right) dz +$$ (z-integration-tracers) + +This results in variables that are vertically mass-averaged, as defined in [](def-mass-thickness-average). The subscript $k$ denotes a variable that has been vertically mass-averaged over layer $k$. This system is now discrete in the vertical, but remains continuous in the horizontal and in time. + +$$ +\frac{\partial {\bf u}_k}{\partial t} ++ \zeta_k {\bf u}_k^{\perp} ++ f {\bf u}_k^{\perp} ++ \left[ \rho_k w_k {\bf u}_k \right]^{top} - \left[ \rho_k w_k {\bf u}_k \right]^{bot} += +- \frac{1}{\rho} \nabla_z p_k +- \nabla_z K_k ++ {\bf D}_k^u + {\bf F}_k^u +$$ (layered-momentum-1) + +$$ +\frac{\partial h_k}{\partial t} + \nabla_z \cdot \left(h_k {\bf u}_k\right) + \left[ \rho_k w_k \right]^{top} - \left[ \rho_k w_k \right]^{bot}= Q^h_k +$$ (layered-mass-1) + +$$ +\frac{\partial h_k \varphi_k}{\partial t} + \nabla_z \cdot \left(h_k {\bf u}_k \varphi_k\right) ++ \left[ \varphi_k \rho_k w_k \right]^{top} - \left[ \varphi_k \rho_k w_k \right]^{bot} += D^\varphi_k + Q^\varphi_k. +$$ (layered-tracer-1) + + +Equivalently, one could have multiplied [](z-integration-momentum), [](z-integration-mass), [](z-integration-tracers) by $g$ and expressed the integrals in terms of pressure, with integration limits from $p_k^{top}$ to $p_k^{bot}$. +Derivations of ocean model equations with pressure as the vertical variable may be found in de Szoeke and Samelson 2002 (link: `https://journals.ametsoc.org/doi/full/10.1175/1520-0485(2002)032%3C2194%3ATDBTBA%3E2.0.CO%3B2`) and [Losch et al. 2003](https://journals.ametsoc.org/view/journals/phoc/34/1/1520-0485_2004_034_0306_hsacgc_2.0.co_2.xml). + +The vertical advection terms use the fundamental theorem of calculus to integrate a derivative in $z$, resulting in boundary conditions at the layer interfaces. This makes intuitive sense as a mass balance. For example, in the absence of horizontal advection and sources, the mass equation is simply + +$$ +\frac{\partial h_k}{\partial t} += \left[ \rho_k w_k \right]^{bot} - \left[ \rho_k w_k \right]^{top}. +$$ (layered-mass-vert-adv) + +This states that the change in mass in the layer is the incoming mass from below minus the outgoing mass above, since the vertical velocity $w$ is positive upwards. The vertical advection of momentum and tracers have a similar interpretation. + +### Questions + +1. How do integrals in [](#z-integration-momentum) to [](#z-integration-tracers) turn into the layered form [](layered-momentum-1) to [](layered-tracer-1) when there are products in the terms? For example, $\zeta_k {\bf u}^\perp_k$, $\nabla K$ and $\rho \varphi {\bf u}$. +1. How do I justify changing from $\nabla_z$ to $\nabla_r$ for terms other than the pressure gradient? Particularly $\nabla K$? + +### General Vertical Coordinate + +The vertical layer interfaces $(z_k^{bot}, z_k^{top})$ (or equivalently $(p_k^{bot}, p_k^{top})$) can vary as a function of $(x,y,t)$. Thus, these equations describe a general vertical coordinate, and these interface surfaces may be chosen arbitrarily by the user. See [Adcroft and Hallberg 2006](https://www.sciencedirect.com/science/article/pii/S1463500305000090) Section 2 and [Griffies et al](http://sciencedirect.com/science/article/pii/S1463500300000147) Section 2. It is convenient to introduce a new variable, the coordinate $r(x,y,z,t)$, where $r$ is constant at the middle of each layer. To be specific, we could design $r$ to be the layer index $k$ at the mid-depth of the layer. That is, define the mid-depth as + +$$ +z_k^{mid}(x,y,t) = \frac{z_k^{bot}(x,y,t) + z_k^{top}(x,y,t)}{2} +$$ (def-z) +and generate the function $r$ such that + +$$ +r(x,y,z_k^{mid}(x,y,t),t) = k +$$ (def-r) +and interpolate linearly in the vertical between mid-layers. When we write the layered form of the equations, we must take into account of the tilted layers using the chain rule. + +We now rewrite derivatives in order to convert from horizontal coordinates to tilted coordinates. Let $(x,y)$ be the original horizontal coordinates, which are perpendicular to $z$, and the horizontal gradient be written as $\nabla_z=(\partial/\partial x, \partial/\partial y)$, as above. Now define a tilted coordinate system using the layers defined by $r$, where the within-layer horizontal coordinates are $(x',y')$ and the along-layer gradient is written as $\nabla_r=(\partial/\partial x', \partial/\partial y')$. We construct $r$ to be monotonic in $z$, so we can invert it as $z(x',y',r,t)$. Now horizontal derivatives along the tilted direction $x'$ for any field $\varphi(x,y,z,t)$ can be expanded as + +$$ +\frac{\partial }{\partial x'} \left[ \varphi(x(x'),y(y'),z(x',y',r,t),t) \right] += \frac{\partial \varphi}{\partial x}\frac{\partial x}{\partial x'} + \frac{\partial \varphi}{\partial z} \frac{\partial z}{\partial x'} +$$ (dvarphidx) + +We may define the tilted horizontal variable $x'$ as we please. The simplest definition is $x'(x)\equiv x$. Then $\partial x / \partial x'=1$. Rearranging [](#dvarphidx) and repeating for $y$, + +$$ +\frac{\partial \varphi}{\partial x} = +\frac{\partial \varphi}{\partial x'} +- \frac{\partial \varphi}{\partial z} \frac{\partial z}{\partial x'}\\ +\frac{\partial \varphi}{\partial y} = +\frac{\partial \varphi}{\partial y'} +- \frac{\partial \varphi}{\partial z} \frac{\partial z}{\partial y'}. +$$ (dvarphidxy) + +This may be written in vector form as + +$$ +\nabla_z \varphi = \nabla_r \varphi - \frac{\partial \varphi}{\partial z} \nabla_r z. +$$ (dvarphidnabla) + +### Pressure Gradient + +The most important change due to general vertical coordinates is in the pressure gradient term. Using the pressure in [](#dvarphidnabla), + +$$ +-\frac{1}{\rho} \nabla_z p +=-\frac{1}{\rho} \nabla_r p +\frac{1}{\rho} \frac{\partial p}{\partial z} \nabla_r z \\ +=-\frac{1}{\rho} \nabla_r p - g \nabla_r z \\ += -\frac{1}{\rho} \nabla_r p - \nabla_r \Phi +$$ (gradp) + +where we have substituted hydrostatic balance [](hydrostatic-balance). The geopoential due to a constant gravitational field is $d \Phi/dz=g$, so that $\Phi = gz + c$ where $c$ is an arbitrary constant. Thus in the equation above, $\nabla_r \Phi = g \nabla_r z$. The geopotential is a more general form than a constant $g$, and allows for alterations in the gravitational field due to self attraction and loading and tidal forces. Further details will be provided in the forthcoming pressure gradient design document. + +See [Adcroft and Hallberg 2006](https://www.sciencedirect.com/science/article/pii/S1463500305000090) eqn. 1 and [Griffies et al](http://sciencedirect.com/science/article/pii/S1463500300000147) eqn 2 for an example of the pressure gradient in tilted coordinates. The additional terms due to the expansion of $\nabla_z$ to $\nabla_r$ in the rest of the equations are small and are ignored. + + +### Vertical Transport +The integration in [](#z-integration-momentum) to [](#z-integration-tracers) changes the vertical velocity $w$ in m/s to a vertical mass-thickness transport $\omega=\rho w$ in kg/s/m$^2$. Here $w$ is the Latin letter and $\omega$ is the Greek letter omega. One can think of fluid velocity $w$ as a volume transport, normalized by area, in units of length per time. Analogously, $\omega$ is mass-thickness transport a mass transport (per unit area). The variables $w$ and $\omega$ have the same sign convention of upward (positive $z$) for positive transport. + +### Final Layered Equations + +momentum: + +$$ +\frac{\partial {\bf u}_k}{\partial t} ++ q_k h_k {\bf u}_k^{\perp} ++ \omega_k^{top} {\bf u}_k^{top} - \omega_k^{bot}{\bf u}_k^{bot} += +- \frac{1}{\rho} \nabla_r p_k - \nabla_r \Phi_k +- \nabla_r K_k ++ {\bf D}_k^u + {\bf F}_k^u +$$ (layered-momentum) + +mass: + +$$ +\frac{\partial h_k}{\partial t} + \nabla_r \cdot \left(h_k {\bf u}_k\right) + \omega_k^{top} - \omega_k^{bot}= Q^h_k +$$ (layered-mass) + +tracers: + +$$ +\frac{\partial h_k \varphi_k}{\partial t} + \nabla_r \cdot \left(h_k {\bf u}_k \varphi_k\right) ++ \varphi_k^{top} \omega_k^{top} - \varphi_k^{bot}\omega_k^{bot} += D^\varphi_k + Q^\varphi_k. +$$ (layered-tracer) + +The superscripts $top$ and $bot$ mean that the layered variable is interpolated to the top and bottom layer interface, respectively. In [](layered-momentum) the non-divergent momentum advection and Coriolis term were combined and expressed in terms of the potential vorticity $q_k$, + +$$ + \zeta_k {\bf u}_k^\perp + f {\bf u}_k^\perp = \frac{\zeta_k + f }{h_k}h_k{\bf u}_k^\perp \equiv q_k h_k {\bf u}^\perp_k. +$$ (potential-vort-adv) + +Surface fluxes $Q^h_k$ have been added to the mass equation for precipitation, evaporation, and river runoff. These fluxes, like mass transport $\omega$, are in units of kg/s/m$^2$. + + +## 5. Discrete Equations + +The horizontally discretized version of the layered equations are as follows. We have dropped the $r$ in $\nabla_r$ for conciseness, and the operator $\nabla$ from here on means within-layer. + +$$ +\frac{\partial u_{e,k}}{\partial t} + \left[ \frac{{\bf k} \cdot \nabla \times u_{e,k} +f_v}{[h_{i,k}]_v}\right]_e\left([h_{i,k}]_e u_{e,k}^{\perp}\right) ++ \left[ \omega_{i,k}^{top} \right]_e u_{e,k}^{top} - \left[ \omega_{i,k}^{bot} \right]_e u_{e,k}^{bot} += +- \frac{1}{\rho_{i,k}} \nabla p_{i,k} - \nabla \Phi_{i,k} +- \nabla K_{i,k} + { \bf D}^u_{e,k} + {\bf F}^u_{e,k} +$$ (discrete-momentum) + +$$ +\frac{\partial h_{i,k}}{\partial t} + \nabla \cdot \left([h_{i,k}]_e u_{e,k}\right) ++ \omega_{i,k}^{top} - \omega_{i,k}^{bot} += Q^h_{i,k} +$$ (discrete-thickness) + +$$ +\frac{\partial h_{i,k} \varphi_{i,k}}{\partial t} + \nabla \cdot \left(u_{e,k} [h_{i,k} \varphi_{i,k}]_e \right) ++ \varphi_{i,k}^{top} \omega_{i,k}^{top} - \varphi_{i,k}^{bot}\omega_{i,k}^{bot} += D^\varphi_{i,k} + Q^\varphi_{i,k} +$$ (discrete-tracer) + +$$ +\rho_{i,k} = f_{eos}(p_{i,k},\Theta_{i,k},S_{i,k}) +$$ (discrete-eos) + +$$ +p_{i,k} = p_{i}^{surf} + \sum_{k'=1}^{k-1} g h_{i,k'} + \frac{1}{2} g h_{i,k} +$$ (discrete-pressure) + +$$ +z_{i,k}^{top} = z_{i}^{floor} + \sum_{k'=k}^{K_{max}} \frac{h_{i,k'}}{\rho_{i,k'}} +$$ (discrete-z) + +The subscripts $i$, $e$, and $v$ indicate cell, edge, and vertex locations and subscript $k$ is the layer. Square brackets $[\cdot]_e$ and $[\cdot]_v$ are quantities that are interpolated to edge and vertex locations. For vector quantities, $u_{e,k}$ denotes the normal component at the center of the edge, while $u_{e,k}^\perp$ denotes the tangential component. The superscripts $top$ and $bot$ refer to individual layers, while $surf$ and $floor$ are the surface and floor of the full ocean column. + +The horizontal operators $\nabla$, $\nabla\cdot$, and $\nabla \times$ are now in their discrete form. In the TRiSK design, gradients ($\nabla$) map cell centers to edges; divergence ($\nabla \cdot$) maps edge quantities to cells; and curl ($\nabla \times$) maps edges to vertices. The exact form of operators and interpolation stencils remain the same as those given in [Omega-0 design document](OmegaV0ShallowWater.md#operator-formulation). The discrete version of terms common with Omega-0, such as advection, potential vorticity, and $\nabla K$, can be found in [Omega-0 Momentum Terms](OmegaV0ShallowWater.md#momentum-terms) and [Omega-0 Thickness and Tracer Terms](OmegaV0ShallowWater.md#thickness-and-tracer-terms). + +We refer to these as the discrete equations, but time derivative remains continuous. The time discretization is described in the [time stepping design document](TimeStepping.md). + +### Momentum Dissipation + +The discretized momentum dissipation ${ \bf D}^u_{e,k}$ may include these terms, which are detailed in the subsections below. + +$$ +{ \bf D}^u_{e,k} = \nu_2 \nabla^2 u_{e,k} - \nu_4 \nabla^4 u_{e,k} + +\frac{\partial }{\partial z} \left( \nu_v \frac{\partial u_{e,k}}{\partial z} \right) +$$ (discrete-mom-del2) + +#### Laplacian dissipation (del2) + +$$ + \nu_2 \nabla^2 u_{e,k} = \nu_2 \left( \nabla D_{i,k} - \nabla^{\perp} \zeta_{v,k} \right) +$$ (discrete-mom-del2) + +where $D$ is divergence and $\zeta$ is relative vorticity. See [Omega V0 Section 3.3.4](OmegaV0ShallowWater.md#del2-momentum-dissipation) + +#### Biharmonic dissipation (del4) +As in [Omega V0 Section 3.3.5](OmegaV0ShallowWater.md#del4-momentum-dissipation), biharmonic momentum dissipation is computed with two applications of the Del2 operator above. + +$$ + - \nu_4 \nabla^4 u_{e,k} += - \nu_4 \nabla^2 \left( \nabla^2 u_{e,k} \right) +$$ (discrete-mom-del4) + +#### Vertical momentum diffusion +Vertical derivatives may be computed with either $z$ or $p$ as the independent variable: + +$$ +\frac{\partial }{\partial z} \left( \nu_v \frac{\partial u_{e,k}}{\partial z} \right) += \frac{\partial }{\partial p}\frac{\partial p}{\partial z} \left( \nu_v \frac{\partial u_{e,k}}{\partial p} \frac{\partial p}{\partial z}\right) += \rho g^2\frac{\partial }{\partial p} \left( \nu_v \rho \frac{\partial u_{e,k}}{\partial p} \right) +$$ (mom-vert-diff-z-p) + +We choose to use $z$ values for simplicity. A single vertical derivative of an arbitrary variable $\varphi$ at mid-layer is + +$$ +\frac{\partial \varphi_k}{\partial z} += \frac{\varphi_k^{top} - \varphi_k^{bot} }{z_k^{top} - z_k^{bot}} +$$ (vertderiv1) + +and a second derivative is + +$$ +\frac{\partial }{\partial z} \left( +\frac{\partial \varphi_k}{\partial z} \right) += +\frac{1}{z_{k}^{top} - z_{k+1}^{top}} \left( +\frac{\varphi_{k-1} - \varphi_k }{z_{k-1}^{mid} - z_k^{mid}} + - +\frac{\varphi_{k} - \varphi_{k+1} }{z_{k}^{mid} - z_{k+1}^{mid}} +\right) +$$ (vertderiv2) + +Thus, the vertical momentum diffusion is + +$$ +\frac{\partial }{\partial z} \left( \nu_v \frac{\partial u_{e,k}}{\partial z} \right) += +\frac{1}{z_{e,k}^{top} - z_{e,k+1}^{top}} \left( +\nu_{e,k}^{top} +\frac{u_{e,k-1} - u_k }{z_{e,k-1}^{mid} - z_k^{mid}} + - +\nu_{e,k+1}^{top} +\frac{u_{e,k} - u_{e,k+1} }{z_{e,k}^{mid} - z_{e,k+1}^{mid}} +\right) +$$ (discrete-mom-vert-diff) + +The native locations for $z$ and $\nu$ are at the mid-layer and cell center, so they must be interpolated to the vertical layer interface and horizontal edge for this computation. This stencil is applied as an implicit tri-diagonal solve at the end of the time step. See details in the [tridiagonal solver design document](TridiagonalSolver) and forthcoming vertical mixing design document. + +### Momentum Forcing +The discretized momentum forcing ${ \bf F}^u_{e,k}$ may include: + +#### Wind Forcing + +The wind forcing is applied as a top boundary condition during implicit vertical mixing as + +$$ +\frac{\tau_{e}}{[ h_{i,k}]_e} +$$ + +where $\tau$ is the wind stress in Pa. Since the mass-thickness $h$ is in kg/s/m$^2$, this results in the desired units of m/s$^2$ for a momentum tendency term. + +#### Bottom Drag + +Bottom Drag is applied as a bottom boundary condition during implicit vertical mixing as + +$$ +- C_D \frac{u_{e,k}\left|u_{e,k}\right|[\rho_{i,k}]_e}{[h_{i,k}]_e} . +$$ (discrete-mom-bottom) + +The units of $h/\rho$ are length (m), so that the full term has units of m/s$^2$. + +#### Rayleigh Drag + +Rayleigh drag is a simple drag applied to every cell. It is used to ensure stability during spin-up. + +$$ +- Ra \, u_{e,k} +$$ (discrete-mom-Ra) + +### Tracer Diffusion + +The discretized tracer diffusion $ D^\varphi_{i,k}$ may include these terms, which are detailed below. Here $\kappa_2$ and $\kappa_4$ are written in front of the operator for simplicity. + +$$ +D^\varphi_{i,k} = \kappa_2 \nabla^2 \varphi_{i,k} - \kappa_4 \nabla^4 \varphi_{i,k} + +\frac{\partial }{\partial z} \left( \kappa_v \frac{\partial \varphi_{i,k}}{\partial z} \right) +$$ (discrete-tracer-diff) + +#### Laplacian diffusion (del2) +The Laplacian may be written as the divergence of the gradient, + +$$ + h_{i,k} \nabla \cdot \left( \kappa_{2,e,k} \nabla \varphi_{i,k} \right). +$$ (discrete-tracer-del2) + +See [Omega V0 Section 3.3.2](OmegaV0ShallowWater.md#del2-tracer-diffusion) for details of this calculation. + +#### Biharmonic diffusion (del4) +The biharmonic is a Laplacian operator applied twice, + +$$ + - h_{i,k} \nabla \cdot \left( \kappa_{4,e,k} \nabla +\right[ +\nabla \cdot \left( \nabla \varphi_{i,k} \right) +\left] + \right). +$$ (discrete-tracer-del4) + +Each of these operators are written as horizontal stencils in the [Omega V0 Operator Formulation Section](OmegaV0ShallowWater.md#operator-formulation) + +#### Vertical tracer diffusion +As discussed above in the [momentum section](#vertical-momentum-diffusion), vertical derivatives may be written in terms of $z$ or $p$, + +$$ +h_{i,k} \frac{\partial }{\partial z} \left( \kappa_v \frac{\partial {\bf \varphi}_{i,k}}{\partial z} \right) += h_{i,k} \rho g^2 \frac{\partial }{\partial p} \left( \kappa_v \rho \frac{\partial {\bf \varphi}_{i,k}}{\partial p} \right) +$$ (discrete-tracer-vertdiff) +and $z$ is chosen. The second derivative stencil is + +$$ +h_{i,k} \frac{\partial }{\partial z} \left( \kappa_v \frac{\partial \varphi_{i,k}}{\partial z} \right) += +\frac{h_{i,k}}{z_{i,k}^{top} - z_{i,k+1}^{top}} \left( +\kappa_{i,k}^{top} +\frac{\varphi_{i,k-1} - \varphi_k }{z_{i,k-1}^{mid} - z_k^{mid}} + - +\kappa_{i,k+1}^{top} +\frac{\varphi_{i,k} - \varphi_{i,k+1} }{z_{i,k}^{mid} - z_{i,k+1}^{mid}} +\right). +$$ (discrete-tracer-vert-diff) + +Like the momentum term, this is applied using a tridiagonal solver in the +[tridiagonal solver](TridiagonalSolver) in the implicit vertical mixing step. + +### MPAS-Ocean Equations of Motion + +The MPAS-Ocean layered formulation are provided here for reference. MPAS-Ocean solves for momentum, thickness, and tracers at layer $k$. These are continuous in the horizontal and discrete in the vertical. + +$$ +\frac{\partial {\bf u}_k}{\partial t} ++ \frac{1}{2}\nabla \left| {\bf u}_k \right|^2 ++ ( {\bf k} \cdot \nabla \times {\bf u}_k) {\bf u}^\perp_k ++ f{\bf u}^{\perp}_k ++ w_k^{bot}{\bf u}_k^{bot} +- w_k^{top}{\bf u}_k^{top} = +- \frac{1}{\rho_0}\nabla p_k +- \frac{\rho g}{\rho_0}\nabla z^{mid}_k ++ \nu_h\nabla^2{\bf u}_k ++ \frac{\partial }{\partial z} \left( \nu_v \frac{\partial {\bf u}_k}{\partial z} \right), +$$ (mpaso-continuous-momentum) + +$$ +\frac{\partial h_k}{\partial t} + \nabla \cdot \left( h_k^e {\bf u}_k \right) + w_k^{bot} - w_k^{top} = 0, +$$ (mpaso-continuous-thickness) + +$$ +\frac{\partial h_k\varphi_k}{\partial t} + \nabla \cdot \left( h_k^e\varphi_k^e {\bf u}_k \right) ++ \varphi_k^{bot} w_k^{bot} - \varphi_k^{top} w_k^{top} += \nabla\cdot\left(h_k^e \kappa_h \nabla\varphi_k \right) ++ h_k \frac{\partial }{\partial z} \left( \kappa_v \frac{\partial \varphi_k}{\partial z} \right). +$$ (mpaso-continuous-tracer) + +The layer thickness $h$, vertical velocity $w$, pressure $p$, and tracer $\varphi$, are cell-centered quantities, while the horizontal velocity ${\bf u}$ and $e$ superscript are variables interpolated to the cell edges. + + +## 6. Variable Definitions + +Table 1. Definition of variables. Geometric variables may be found in the [Omega V0 design document, Table 1](OmegaV0ShallowWater.md#variable-definitions) + +| symbol | name | units | location | name in code | notes | +|---------------------|-----------------------------|----------|-|---------|-------------------------------------------------------| +|$D_{i,k}$ | divergence | 1/s | cell | Divergence |$D=\nabla\cdot\bf u$ | +|${\bf D}^u_{k} $, $ D^u_{e,k} $ | momentum dissipation terms | m/s$^2$ | edge | |see [Momentum Dissipation Section](#momentum-dissipation) | +|$ D_{e,k}^\varphi$ | tracer diffusion terms | | cell | |see [Tracer Diffusion Section](#tracer-diffusion) | +|$f_v$ | Coriolis parameter| 1/s | vertex | FVertex | $f = 2\Omega sin(\phi)$, $\Omega$ rotation rate, $\phi$ latitude| +|${\bf F}^u_{k} $, $ F^u_{e,k} $ | momentum forcing | m/s$^2$ | edge | | see [Momentum Forcing Section](#momentum-forcing) | +|$f_{eos}$ | equation of state | kg/m$^3$ | any | function call | +|$g$ | grav. acceleration | m/s$^2$ | constant | Gravity | +|$h_{i,k}$ | layer mass-thickness | kg/m$^2$ | cell | LayerThickness | see [](def-h) | +|$k$ | vertical index | | +|${\bf k}$ | vertical unit vector | | +|$K_{min}$ | shallowest active layer | | +|$K_{max}$ | deepest active layer | | +|$K_{e,k}$ | kinetic energy | m$^2$/s$^2$ | cell | KineticEnergyCell |$K = \left\| {\bf u} \right\|^2 / 2$ | +|$p_{i,k}$ | pressure | Pa | cell | Pressure | see [](discrete-pressure) | +|$p^{floor}_i$ | bottom pressure | Pa | cell | PFloor | pressure at ocean floor +|$p^{surf}_i$ | surface pressure | Pa | cell | PSurface | due to atm. pressure, sea ice, ice shelves +|$q_{v,k}$ | potential vorticity | 1/m/s | vertex | PotentialVorticity |$q = \left(\zeta+f\right)/h$ | +|$Q^h_{i,k}$ | mass source and sink terms| kg/s/m$^2$ | cell | | +|$Q^\varphi_{i,k}$ | tracer source and sink terms|kg/s/m$^2$ or similar| cell | | +|$Ra$ | Rayleigh drag coefficient | 1/s | constant | | | +|$S_{i,k}$ | salinity | PSU | cell | Salinity | a tracer $\varphi$ | +|$t$ | time | s | none | | | +|${\bf u}_k$ | velocity, vector form | m/s | - | | | +|$u_{e,k}$ | velocity, normal to edge | m/s | edge | NormalVelocity | | +|$u^\perp_{e,k}$ | velocity, tangential to edge | m/s | edge | TangentialVelocity |${\bf u}^\perp = {\bf k} \times {\bf u}$| +|$w_{i,k}$ | vertical velocity | m/s | cell | VerticalVelocity | volume transport per m$^2$ | +|$z$ | vertical coordinate | m | - | | positive upward | +|$z^{top}_{i,k}$ | layer top z-location | m | cell | ZTop | see [](discrete-z) | +|$z^{mid}_{i,k}$ | layer mid-depth z-location | m | cell | ZMid | +|$z^{floor}_{i}$ | ocean floor z-location | m | cell | ZFloor | -bottomDepth from MPAS-Ocean | +|$\zeta_{v,k}$ | relative vorticity| 1/s | vertex | RelativeVorticity |$\zeta={\bf k} \cdot \left( \nabla \times {\bf u}\right)$ | +|$\eta_i$ | sea surface height | m | cell | ZSurface | +|$\Theta_{i,k}$ | conservative temperature | C | cell | Temperature | a tracer $\varphi$ | +|$\kappa_2$| tracer diffusion | m$^2$/s | cell | | | +|$\kappa_4$| biharmonic tracer diffusion | m$^4$/s | cell | | | +|$\kappa_v$| vertical tracer diffusion | m$^2$/s | cell | | | +|$\nu_2$ | horizontal del2 viscosity | m$^2$/s | edge | | | +|$\nu_4$ | horizontal biharmonic (del4) viscosity | m$^4$/s | edge | | | +|$\nu_v$| vertical momentum diffusion | m$^2$/s | edge | | | +|$\varphi_{i,k}$ | tracer | kg/m$^3$ or similar | cell | | e.g. $\Theta$, $S$ | +|$\rho_{i,k}$ | density | kg/m$^3$ | cell | Density | +|$\rho_0$ | Boussinesq reference density | kg/m$^3$ | | constant | +|$\tau_i$ | wind stress | Pa=N/m$^2$ | edge | SurfaceStress | +|$\Phi_{i,k}$ | geopotential| | cell | Geopotential |$\partial \Phi / \partial z = g$ for gravity | +|$\omega$ | mass transport | kg/s/m^2 | cell | VerticalTransport |$\omega=\rho w$| + + +## 7. Verification and Testing + +Capability and testing are similar to [Petersen et al. 2015](http://www.sciencedirect.com/science/article/pii/S1463500314001796). The following tests are in idealized domains and do not require surface fluxes or surface restoring. For the following tests to show results comparable to those published with other models, the full dynamic sequence of density, pressure, momentum, and advection must work correctly. The successful completion of the following tests is a validation of the primitive equation functions in Omega 1.0. All of the following tests may exercise a linear equation of state or the nonlinear TEOS10. The first four tests quantify the anomalous mixing caused by the numerical schemes. The first five are on cartesian planes with regular hexagon meshes. + +### Lock Exchange (Optional) +The Lock Exchange is the simplest possible test of a primitive equation model. There is an analytic formulation for the wave propagation speed. It is listed as optional because the Overflow tests the same dynamics. +See [Petersen et al. 2015](http://www.sciencedirect.com/science/article/pii/S1463500314001796) and the compass `lock_exchange` case. + +### Overflow +The Overflow test case adds bathymetry to the Lock Exchange. It is a particularly effective test of vertical mass and tracer advection, and vertical mixing. It is useful to compare different vertical coordinates, like level (z- or p-level) versus terrain-following (sigma). +See [Petersen et al. 2015](http://www.sciencedirect.com/science/article/pii/S1463500314001796) and the compass `overflow` case. + + +### Internal Gravity Wave +The internal gravity wave tests horizontal and vertical advection. +See [Petersen et al. 2015](http://www.sciencedirect.com/science/article/pii/S1463500314001796) and the `internal_wave` case in both compass and polaris. + +### Baroclinic Channel +This is the first test to add the Coriolis force and uses a three-dimensional domain. It is designed to result in an eddying simulation at sufficiently high resolution. This tests the combination of Coriolis and pressure gradient forces that produce geostrophic balance, as well as horizontal advection and dissipation for numerical stability. +See [Petersen et al. 2015](http://www.sciencedirect.com/science/article/pii/S1463500314001796) and the `baroclinic_channel` case in both compass and polaris. + +### Seamount with zero velocity. +This is a 3D domain with a seamount in the center, where temperature and salinity are stratified in the vertical and constant in the horizontal. The test is simply that an initial velocity field of zero remains zero. For z-level layers the velocity trivially remains zero because the horizontal pressure gradient is zero. For tilted layers, this is a test of the pressure gradient error and the velocity is never exactly zero. This is a common test for sigma-coordinate models like ROMS because the bottom layers are extremely tilted along the seamount, but it is a good test for any model with tilted layers. Omega will use slightly tilted layers in p-star mode (pressure layers oscillating with SSH) and severely tilted layers below ice shelves, just like MPAS-Ocean. See [Ezer et al. 2002](https://www.sciencedirect.com/science/article/pii/S1463500302000033), [Haidvogel et al. 1993](https://journals.ametsoc.org/view/journals/phoc/23/11/1520-0485_1993_023_2373_nsofaa_2_0_co_2.xml), [Shchepetkin and McWilliams 2003](https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2001JC001047), and previous MPAS-Ocean [confluence page](https://acme-climate.atlassian.net/wiki/spaces/OCNICE/blog/2015/11/19/40501447/MPAS-O+Sigma+coordinate+test+sea+mount). + +### Cosine Bell on the Sphere +This test uses a fixed horizontal velocity field to test horizontal tracer advection. It is repeated from [Omega-0 design document](OmegaV0ShallowWater) and is important to conduct again as we convert Omega to a layered primitive-equation model. See `cosine_bell` case in both compass and polaris. + +### Merry-Go-Round +This is an exact test for horizontal and vertical tracer advection. A fixed velocity field is provided, and a tracer distribution is advected around a vertical plane. See the `merry_go_round` test in compass, and the results on the [merry-go-round pull request](https://github.com/MPAS-Dev/compass/pull/108) and [compass port pull request](https://github.com/MPAS-Dev/compass/pull/452). + + +## References +This section is for references without webpage links. These are mostly textbooks. + +- Cushman‐Roisin, B., & Beckers, J.M. (2011). Introduction to Geophysical Fluid Dynamics: Physical and Numerical Aspects. Academic Press. +- Gill, A. E. (2016). Atmosphere—Ocean dynamics. Elsevier. +- Kundu, P.K., Cohen, I.M., Dowling D.R. (2016) Fluid Mechanics 6th Edition, Academic Press. +- Pedlosky, J. (1987). Geophysical Fluid Dynamics (Vol. 710). Springer. +- Vallis, G. K. (2017). Atmospheric and oceanic fluid dynamics. Cambridge University Press. + + + diff --git a/components/omega/doc/index.md b/components/omega/doc/index.md index 0adb821aef1d..5e4e88bd21dc 100644 --- a/components/omega/doc/index.md +++ b/components/omega/doc/index.md @@ -93,6 +93,7 @@ devGuide/TridiagonalSolvers :maxdepth: 1 design/OmegaV0ShallowWater +design/OmegaV1GoverningEqns design/Broadcast design/Config design/DataTypes From 0539bf9732a6d43da98ff58a6c6bb8dd2d1988a5 Mon Sep 17 00:00:00 2001 From: mark-petersen Date: Fri, 2 May 2025 07:24:06 -0700 Subject: [PATCH 03/65] change rho to v specific volume --- .../omega/doc/design/OmegaV1GoverningEqns.md | 57 ++++++++++--------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 0a7d8f1e6046..73f84fbd8005 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -43,7 +43,7 @@ See forthcoming design documents on the pressure gradient, vertical mixing, and ## 3. Continuous Equations -The continuous form of the conservation equations are as follows [Kundu et al. 2024](https://www.amazon.com/Fluid-Mechanics-Pijush-K-Kundu/dp/012405935X), chapter 4, eqns 4.7 and 4.22. This is before any assumptions are made, so this is a compressible, non-hydrostatic, non-Boussinesq fluid. Here all variables are a function of $(x,y,z)$, ${\bf u}_{3D}$ denotes the three-dimensional velocity vector, ${\bf u}_{3D} \otimes {\bf u}_{3D} = {\bf u}_{3D}{\bf u}_{3D}^T$ is the tensor product, $\nabla_{3D}$ is the three-dimensional gradient, $D/Dt$ is the material derivative, and other variables defined in the [Variable Definition Section below](#variable-definitions). +The continuous form of the conservation equations are as follows [Kundu et al. 2024](https://www.amazon.com/Fluid-Mechanics-Pijush-K-Kundu/dp/012405935X), chapter 4, eqns 4.7 and 4.22. This is before any assumptions are made, so this is a compressible, non-hydrostatic, non-Boussinesq fluid. Here all variables are a function of $(x,y,z)$, ${\bf u}_{3D}$ denotes the three-dimensional velocity vector, ${\bf u}_{3D} \otimes {\bf u}_{3D} = {\bf u}_{3D}{\bf u}_{3D}^T$ is the tensor product, $\nabla_{3D}$ is the three-dimensional gradient, $D/Dt$ is the material derivative, and other variables defined in the [Variable Definition Section](#variable-definitions) below. momentum: @@ -83,7 +83,7 @@ $$ + {\bf D}^u + {\bf F}^u $$ (continuous-momentum-rho) -Geophysical fluids such as the ocean and atmosphere are rotating and stratified, and horizontal velocities are orders of magnitude larger than vertical velocities. It is therefore convenient to separate the horizontal and vertical as ${\bf u}_{3D} = \left( {\bf u}, w \right)$ and $\nabla_{3D} = \left( \nabla_z, d/dz \right)$ where $z$ is the vertical direction in a local coordinate frame on the earth's surface and $w$ is the vertical velocity. The $z$ subscript on $\nabla_z$ is to remind us that this is the true horizontal gradient (perpendicular to $z$), as opposed to gradients within tilted layers used in the following section. The gravitational force $g {\bf k}$ is added in the vertical. The rotating frame of reference results in the Coriolis force $f {\bf k} \times {\bf u} \equiv f {\bf u}^\perp$, where $f$ is the Coriolis parameter and ${\bf u}^\perp$ is the horizontal velocity rotated $90^o$ from $\bf u$. See any textbook in the [References](#references) for a full derivation. +Geophysical fluids such as the ocean and atmosphere are rotating and stratified, and horizontal velocities are orders of magnitude larger than vertical velocities. It is therefore convenient to separate the horizontal and vertical as ${\bf u}_{3D} = \left( {\bf u}, w \right)$ and $\nabla_{3D} = \left( \nabla_z, d/dz \right)$ where $z$ is the vertical direction in a local coordinate frame on the Earth's surface and $w$ is the vertical velocity. The $z$ subscript on $\nabla_z$ is to remind us that this is the true horizontal gradient (perpendicular to $z$), as opposed to gradients within tilted layers used in the following section. The gravitational force $g {\bf k}$ is added in the vertical. The rotating frame of reference results in the Coriolis force $f {\bf k} \times {\bf u} \equiv f {\bf u}^\perp$, where $f$ is the Coriolis parameter and ${\bf u}^\perp$ is the horizontal velocity rotated $90^o$ from $\bf u$. See any textbook in the [References](#references) for a full derivation. The horizontal parts of the advective term may be replaced with the vector identity @@ -120,10 +120,10 @@ $$ \frac{\partial p}{\partial z} = - \rho g. $$ (hydrostatic-balance) -We then integrate from $z$ to the surface $\eta$ to obtain the hydrostatic pressure equation, +We then integrate from $z$ to the surface $z^{surf}$ to obtain the hydrostatic pressure equation, $$ -p(x,y,z) = p^{surf}(x,y) + \int_{z}^{\eta} \rho g dz'. +p(x,y,z) = p^{surf}(x,y) + \int_{z}^{z^{surf}} \rho g dz'. $$ (continuous-hydrostatic-pressure) The constitutive equation is the equation of state, @@ -131,7 +131,8 @@ The constitutive equation is the equation of state, $$ \rho = f_{eos}(p,\Theta,S). $$ (continuous-eos) -where potential temperature, $\Theta$, and salinity ,$S$, are examples of tracers $\varphi$. + +where conservative temperature, $\Theta$, and salinity, $S$, are examples of tracers $\varphi$. #### Final Continuous Equations @@ -175,7 +176,7 @@ $$ (continuous-eos-final) hydrostatic pressure: $$ -p(x,y,z) = p^{surf}(x,y) + \int_{z}^{\eta} \rho g dz'. +p(x,y,z) = p^{surf}(x,y) + \int_{z}^{z^{surf}} \rho g dz'. $$ (continuous-hydrostatic-pressure-final) Here the $\nabla$ operators are exactly horizontal; we expand terms for tilted layers in the following section. The momentum diffusion terms include Laplacian (del2), biharmonic (del4), and vertical viscosity, @@ -229,10 +230,10 @@ $$(depth-pressure-integral-conversion) We can convert from an interfacial depth surface $z^{top}$ to a pressure surface $p^{top}$ with the hydrostatic equation [](continuous-hydrostatic-pressure-final): $$ -p^{top}(x,y) = p^{surf}(x,y) + \int_{z^{top}(x,y)}^{\eta(x,y)} \rho g dz +p^{top}(x,y) = p^{surf}(x,y) + \int_{z^{top}(x,y)}^{z^{surf}(x,y)} \rho g dz $$ (def-p-surf) -where $\eta$ is the sea surface height and $p^{surf}$ is the surface pressure at $\eta$ imposed by the atmosphere or floating ice. Note that pressure increases with depth. This means that positive $p$ points downward, so that the $top$ and $bot$ extents of the integration limits are flipped in [](#depth-pressure-integral-conversion). +where $z^{surf}$ is the sea surface height and $p^{surf}$ is the surface pressure at $z^{surf}$ imposed by the atmosphere or floating ice. Note that pressure increases with depth. This means that positive $p$ points downward, so that the $top$ and $bot$ extents of the integration limits are flipped in [](#depth-pressure-integral-conversion). For any three-dimensional quantity $\varphi(x,y,z,t)$, the mass-thickness-averaged quantity in layer $k$ is defined as @@ -307,6 +308,7 @@ This states that the change in mass in the layer is the incoming mass from below ### Questions 1. How do integrals in [](#z-integration-momentum) to [](#z-integration-tracers) turn into the layered form [](layered-momentum-1) to [](layered-tracer-1) when there are products in the terms? For example, $\zeta_k {\bf u}^\perp_k$, $\nabla K$ and $\rho \varphi {\bf u}$. +1. Using the definition of the layer average, the momentum equation [](layered-momentum-1) should also be thickness-weighted. Perhaps that goes away with conservation of mass? 1. How do I justify changing from $\nabla_z$ to $\nabla_r$ for terms other than the pressure gradient? Particularly $\nabla K$? ### General Vertical Coordinate @@ -355,10 +357,10 @@ $$ -\frac{1}{\rho} \nabla_z p =-\frac{1}{\rho} \nabla_r p +\frac{1}{\rho} \frac{\partial p}{\partial z} \nabla_r z \\ =-\frac{1}{\rho} \nabla_r p - g \nabla_r z \\ -= -\frac{1}{\rho} \nabla_r p - \nabla_r \Phi += - v \nabla_r p - \nabla_r \Phi $$ (gradp) -where we have substituted hydrostatic balance [](hydrostatic-balance). The geopoential due to a constant gravitational field is $d \Phi/dz=g$, so that $\Phi = gz + c$ where $c$ is an arbitrary constant. Thus in the equation above, $\nabla_r \Phi = g \nabla_r z$. The geopotential is a more general form than a constant $g$, and allows for alterations in the gravitational field due to self attraction and loading and tidal forces. Further details will be provided in the forthcoming pressure gradient design document. +where we have substituted hydrostatic balance [](hydrostatic-balance) and specific volume $v\equiv 1/\rho$. The geopoential due to a constant gravitational field is $d \Phi/dz=g$, so that $\Phi = gz + c$ where $c$ is an arbitrary constant. Thus in the equation above, $\nabla_r \Phi = g \nabla_r z$. The geopotential is a more general form than a constant $g$, and allows for alterations in the gravitational field due to self attraction and loading and tidal forces. Further details will be provided in the forthcoming pressure gradient design document. See [Adcroft and Hallberg 2006](https://www.sciencedirect.com/science/article/pii/S1463500305000090) eqn. 1 and [Griffies et al](http://sciencedirect.com/science/article/pii/S1463500300000147) eqn 2 for an example of the pressure gradient in tilted coordinates. The additional terms due to the expansion of $\nabla_z$ to $\nabla_r$ in the rest of the equations are small and are ignored. @@ -375,7 +377,7 @@ $$ + q_k h_k {\bf u}_k^{\perp} + \omega_k^{top} {\bf u}_k^{top} - \omega_k^{bot}{\bf u}_k^{bot} = -- \frac{1}{\rho} \nabla_r p_k - \nabla_r \Phi_k +- v_k \nabla_r p_k - \nabla_r \Phi_k - \nabla_r K_k + {\bf D}_k^u + {\bf F}_k^u $$ (layered-momentum) @@ -405,13 +407,13 @@ Surface fluxes $Q^h_k$ have been added to the mass equation for precipitation, e ## 5. Discrete Equations -The horizontally discretized version of the layered equations are as follows. We have dropped the $r$ in $\nabla_r$ for conciseness, and the operator $\nabla$ from here on means within-layer. +The horizontally discretized layered equations are as follows. We have dropped the $r$ in $\nabla_r$ for conciseness, and the operator $\nabla$ from here on means within-layer. $$ \frac{\partial u_{e,k}}{\partial t} + \left[ \frac{{\bf k} \cdot \nabla \times u_{e,k} +f_v}{[h_{i,k}]_v}\right]_e\left([h_{i,k}]_e u_{e,k}^{\perp}\right) + \left[ \omega_{i,k}^{top} \right]_e u_{e,k}^{top} - \left[ \omega_{i,k}^{bot} \right]_e u_{e,k}^{bot} = -- \frac{1}{\rho_{i,k}} \nabla p_{i,k} - \nabla \Phi_{i,k} +- v_{i,k} \nabla p_{i,k} - \nabla \Phi_{i,k} - \nabla K_{i,k} + { \bf D}^u_{e,k} + {\bf F}^u_{e,k} $$ (discrete-momentum) @@ -428,7 +430,7 @@ $$ $$ (discrete-tracer) $$ -\rho_{i,k} = f_{eos}(p_{i,k},\Theta_{i,k},S_{i,k}) +v_{i,k} = f_{eos}(p_{i,k},\Theta_{i,k},S_{i,k}) $$ (discrete-eos) $$ @@ -436,10 +438,10 @@ p_{i,k} = p_{i}^{surf} + \sum_{k'=1}^{k-1} g h_{i,k'} + \frac{1}{2} g h_{i,k} $$ (discrete-pressure) $$ -z_{i,k}^{top} = z_{i}^{floor} + \sum_{k'=k}^{K_{max}} \frac{h_{i,k'}}{\rho_{i,k'}} +z_{i,k}^{top} = z_{i}^{floor} + \sum_{k'=k}^{K_{max}} v_{i,k'}h_{i,k'} $$ (discrete-z) -The subscripts $i$, $e$, and $v$ indicate cell, edge, and vertex locations and subscript $k$ is the layer. Square brackets $[\cdot]_e$ and $[\cdot]_v$ are quantities that are interpolated to edge and vertex locations. For vector quantities, $u_{e,k}$ denotes the normal component at the center of the edge, while $u_{e,k}^\perp$ denotes the tangential component. The superscripts $top$ and $bot$ refer to individual layers, while $surf$ and $floor$ are the surface and floor of the full ocean column. +The subscripts $i$, $e$, and $v$ indicate cell, edge, and vertex locations and subscript $k$ is the layer. Square brackets $[\cdot]_e$ and $[\cdot]_v$ are quantities that are interpolated to edge and vertex locations. For vector quantities, $u_{e,k}$ denotes the normal component at the center of the edge, while $u_{e,k}^\perp$ denotes the tangential component. The superscripts $top$ and $bot$ refer to the top and bottom of individual layers, while $surf$ and $floor$ are the surface and floor of the full ocean column. All variables without these superscripts indicate that they are layer-averaged, as defined in [](def-mass-thickness-average), and can be considered to represent a mid-layer value in the vertical. The mid-layer location is equivalently the average in $z$, $p$, or $h$ (mass), since density $\rho_{i,k}$ is considered constant in the cell. The horizontal operators $\nabla$, $\nabla\cdot$, and $\nabla \times$ are now in their discrete form. In the TRiSK design, gradients ($\nabla$) map cell centers to edges; divergence ($\nabla \cdot$) maps edge quantities to cells; and curl ($\nabla \times$) maps edges to vertices. The exact form of operators and interpolation stencils remain the same as those given in [Omega-0 design document](OmegaV0ShallowWater.md#operator-formulation). The discrete version of terms common with Omega-0, such as advection, potential vorticity, and $\nabla K$, can be found in [Omega-0 Momentum Terms](OmegaV0ShallowWater.md#momentum-terms) and [Omega-0 Thickness and Tracer Terms](OmegaV0ShallowWater.md#thickness-and-tracer-terms). @@ -471,12 +473,12 @@ $$ $$ (discrete-mom-del4) #### Vertical momentum diffusion -Vertical derivatives may be computed with either $z$ or $p$ as the independent variable: +Vertical derivatives may be computed with either $z$ or $p$ as the independent variable, $$ -\frac{\partial }{\partial z} \left( \nu_v \frac{\partial u_{e,k}}{\partial z} \right) -= \frac{\partial }{\partial p}\frac{\partial p}{\partial z} \left( \nu_v \frac{\partial u_{e,k}}{\partial p} \frac{\partial p}{\partial z}\right) -= \rho g^2\frac{\partial }{\partial p} \left( \nu_v \rho \frac{\partial u_{e,k}}{\partial p} \right) +\frac{\partial }{\partial z} \left( \nu_v \frac{\partial u}{\partial z} \right) += \frac{\partial }{\partial p}\frac{\partial p}{\partial z} \left( \nu_v \frac{\partial u}{\partial p} \frac{\partial p}{\partial z}\right) += \rho g^2\frac{\partial }{\partial p} \left( \nu_v \rho \frac{\partial u}{\partial p} \right). $$ (mom-vert-diff-z-p) We choose to use $z$ values for simplicity. A single vertical derivative of an arbitrary variable $\varphi$ at mid-layer is @@ -533,10 +535,10 @@ where $\tau$ is the wind stress in Pa. Since the mass-thickness $h$ is in kg/s/m Bottom Drag is applied as a bottom boundary condition during implicit vertical mixing as $$ -- C_D \frac{u_{e,k}\left|u_{e,k}\right|[\rho_{i,k}]_e}{[h_{i,k}]_e} . +- C_D \frac{u_{e,k}\left|u_{e,k}\right|}{[v_{i,k}h_{i,k}]_e} . $$ (discrete-mom-bottom) -The units of $h/\rho$ are length (m), so that the full term has units of m/s$^2$. +The units of specific volume times mass-thickness $vh$ are length (m), so that the full term has units of m/s$^2$. #### Rayleigh Drag @@ -581,8 +583,8 @@ Each of these operators are written as horizontal stencils in the [Omega V0 Oper As discussed above in the [momentum section](#vertical-momentum-diffusion), vertical derivatives may be written in terms of $z$ or $p$, $$ -h_{i,k} \frac{\partial }{\partial z} \left( \kappa_v \frac{\partial {\bf \varphi}_{i,k}}{\partial z} \right) -= h_{i,k} \rho g^2 \frac{\partial }{\partial p} \left( \kappa_v \rho \frac{\partial {\bf \varphi}_{i,k}}{\partial p} \right) +\frac{\partial }{\partial z} \left( \kappa_v \frac{\partial {\bf \varphi}}{\partial z} \right) += \rho g^2 \frac{\partial }{\partial p} \left( \kappa_v \rho \frac{\partial {\bf \varphi}}{\partial p} \right) $$ (discrete-tracer-vertdiff) and $z$ is chosen. The second derivative stencil is @@ -643,8 +645,8 @@ Table 1. Definition of variables. Geometric variables may be found in the [Omega |$ D_{e,k}^\varphi$ | tracer diffusion terms | | cell | |see [Tracer Diffusion Section](#tracer-diffusion) | |$f_v$ | Coriolis parameter| 1/s | vertex | FVertex | $f = 2\Omega sin(\phi)$, $\Omega$ rotation rate, $\phi$ latitude| |${\bf F}^u_{k} $, $ F^u_{e,k} $ | momentum forcing | m/s$^2$ | edge | | see [Momentum Forcing Section](#momentum-forcing) | -|$f_{eos}$ | equation of state | kg/m$^3$ | any | function call | -|$g$ | grav. acceleration | m/s$^2$ | constant | Gravity | +|$f_{eos}$ | equation of state | - | any | function call | may produce density or specific volume | +|$g$ | gravitational acceleration | m/s$^2$ | constant | Gravity | |$h_{i,k}$ | layer mass-thickness | kg/m$^2$ | cell | LayerThickness | see [](def-h) | |$k$ | vertical index | | |${\bf k}$ | vertical unit vector | | @@ -663,13 +665,14 @@ Table 1. Definition of variables. Geometric variables may be found in the [Omega |${\bf u}_k$ | velocity, vector form | m/s | - | | | |$u_{e,k}$ | velocity, normal to edge | m/s | edge | NormalVelocity | | |$u^\perp_{e,k}$ | velocity, tangential to edge | m/s | edge | TangentialVelocity |${\bf u}^\perp = {\bf k} \times {\bf u}$| +|$v_{i,k}$ | specific volume | m$^3$/kg | cell | SpecificVolume | $v = 1/\rho$ | |$w_{i,k}$ | vertical velocity | m/s | cell | VerticalVelocity | volume transport per m$^2$ | |$z$ | vertical coordinate | m | - | | positive upward | |$z^{top}_{i,k}$ | layer top z-location | m | cell | ZTop | see [](discrete-z) | |$z^{mid}_{i,k}$ | layer mid-depth z-location | m | cell | ZMid | +|$z^{surf}_{i}$ | ocean surface, i.e. sea surface height | m | cell | ZSurface | same as SSH in MPAS-Ocean | |$z^{floor}_{i}$ | ocean floor z-location | m | cell | ZFloor | -bottomDepth from MPAS-Ocean | |$\zeta_{v,k}$ | relative vorticity| 1/s | vertex | RelativeVorticity |$\zeta={\bf k} \cdot \left( \nabla \times {\bf u}\right)$ | -|$\eta_i$ | sea surface height | m | cell | ZSurface | |$\Theta_{i,k}$ | conservative temperature | C | cell | Temperature | a tracer $\varphi$ | |$\kappa_2$| tracer diffusion | m$^2$/s | cell | | | |$\kappa_4$| biharmonic tracer diffusion | m$^4$/s | cell | | | From 2852d1427bcb2b84ac7eec1fc8db0a3a7caa875b Mon Sep 17 00:00:00 2001 From: mark-petersen Date: Fri, 2 May 2025 09:24:07 -0700 Subject: [PATCH 04/65] updates from comments by Steve, Luke, Xylar --- .../omega/doc/design/OmegaV1GoverningEqns.md | 122 +++++++++++------- 1 file changed, 72 insertions(+), 50 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 73f84fbd8005..fe52f882ad2b 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -13,7 +13,7 @@ Add later, if it seems necessary. There is a toc on the left bar. ## 1. Overview -This design document describes the governing equations for Omega, the Ocean Model for E3SM Global Applications. Overall, Omega is an unstructured-mesh ocean model based on TRiSK numerical methods ([Thuburn et al. 2009](https://www.sciencedirect.com/science/article/pii/S0021999109004434)) that is specifically designed for modern exascale computing architectures. The algorithms in Omega will be mostly identical to those in MPAS-Ocean, but it will be written in c++ rather than Fortran in order to take advantage of libraries to run on GPUs, such as Kokkos ([Trott et al. 2022](https://ieeexplore.ieee.org/document/9485033)). Significant differences between MPAS-Ocean and Omega are: +This design document describes the governing equations for Omega, the Ocean Model for E3SM Global Applications. Overall, Omega is an unstructured-mesh ocean model based on TRiSK numerical methods ([Thuburn et al. 2009](https://www.sciencedirect.com/science/article/pii/S0021999109004434)) that is specifically designed for modern exascale computing architectures. The algorithms in Omega will be mostly identical to those in MPAS-Ocean, but it will be written in c++ rather than Fortran in order to take advantage of the Kokkos performance portability library to run on GPUs ([Trott et al. 2022](https://ieeexplore.ieee.org/document/9485033)). Significant differences between MPAS-Ocean and Omega are: 1. Omega is non-Boussinesq. This means that the full 3D density is used everywhere, and results in a mass-conserving model. MPAS-Ocean and POP were Boussinesq, so that a reference density $\rho_0$ is used in the pressure gradient term, and were therefore volume-conserving models. In Omega the layered mass-conservation equation is in terms of mass-thickness ($h=\rho \Delta z$). In MPAS-Ocean the simple thickness ($h=\Delta z$) is the prognostic volume variable (normalized by horizontal cell area). 1. Omega will use the updated equation of state TEOS10, while MPAS-Ocean used the Jackett-McDougall equation of state. @@ -32,7 +32,7 @@ This document describes the governing equations for the layered ocean model, whi The requirements in the [Omega-0 design document](OmegaV0ShallowWater) still apply. Additional design requirements for Omega-1 are: -### Omega will be an incompressible, hydrostatic, non-Boussinesq ocean model. +### Omega will be a hydrostatic, non-Boussinesq ocean model. See discussion in introduction. The non-Boussinesq formulation uses the full density throughout resulting in governing equations that conserve mass rather than volume. The substantial change is that the ``thickness'' variable, $h$, is now a mass-thickness, $h = \rho \Delta z$. This is explained in the derivation of the [layered equations below](#layered-equations). ### Omega will use TEOS10 for the equation of state. @@ -78,33 +78,38 @@ Here we have express the following terms as a general operators, with examples o $$ \frac{D {\bf u}_{3D} }{D t} \equiv \frac{\partial {\bf u}_{3D}}{\partial t} - + \nabla_{3D} \cdot \left( {\bf u}_{3D} \otimes {\bf u}_{3D} \right) ++ {\bf u}_{3D}\cdot \nabla_{3D} {\bf u}_{3D} = - \frac{1}{\rho} \nabla_{3D} p + {\bf D}^u + {\bf F}^u $$ (continuous-momentum-rho) -Geophysical fluids such as the ocean and atmosphere are rotating and stratified, and horizontal velocities are orders of magnitude larger than vertical velocities. It is therefore convenient to separate the horizontal and vertical as ${\bf u}_{3D} = \left( {\bf u}, w \right)$ and $\nabla_{3D} = \left( \nabla_z, d/dz \right)$ where $z$ is the vertical direction in a local coordinate frame on the Earth's surface and $w$ is the vertical velocity. The $z$ subscript on $\nabla_z$ is to remind us that this is the true horizontal gradient (perpendicular to $z$), as opposed to gradients within tilted layers used in the following section. The gravitational force $g {\bf k}$ is added in the vertical. The rotating frame of reference results in the Coriolis force $f {\bf k} \times {\bf u} \equiv f {\bf u}^\perp$, where $f$ is the Coriolis parameter and ${\bf u}^\perp$ is the horizontal velocity rotated $90^o$ from $\bf u$. See any textbook in the [References](#references) for a full derivation. +Geophysical fluids such as the ocean and atmosphere are rotating and stratified, and horizontal velocities are orders of magnitude larger than vertical velocities. It is therefore convenient to separate the horizontal and vertical as ${\bf u}_{3D} = \left( {\bf u}, w \right)$ and $\nabla_{3D} = \left( \nabla_z, d/dz \right)$ where $z$ is the vertical direction in a local coordinate frame on the Earth's surface and $w$ is the vertical velocity. The $z$ subscript on $\nabla_z$ is to remind us that this is the true horizontal gradient (perpendicular to $z$), as opposed to gradients within tilted layers used in the following section. The gravitational force $g {\bf k}$ is included in ${\bf F}^u$. The rotating frame of reference results in the Coriolis force $f {\bf k} \times {\bf u} \equiv f {\bf u}^\perp$, where $f$ is the Coriolis parameter and ${\bf u}^\perp$ is the horizontal velocity rotated $90^o$ from $\bf u$. See any textbook in the [References](#references) for a full derivation. -The horizontal parts of the advective term may be replaced with the vector identity +The advection term may be separated into horizontal and vertical parts as $$ -\nabla_z \cdot \left( {\bf u} \otimes {\bf u} \right) = -\boldsymbol{u} \cdot \nabla_z \boldsymbol{u} &= (\nabla_z \times \boldsymbol{u}) \times \boldsymbol{u} + \nabla_z \frac{|\boldsymbol{u}|^2}{2} \\ -&= \{\boldsymbol{k} \cdot (\nabla_z \times \boldsymbol{u})\} \boldsymbol{k} \times \boldsymbol{u} + \nabla_z \frac{|\boldsymbol{u}|^2}{2} \\ -&= \zeta \boldsymbol{u}^{\perp} + \nabla_z K. +{\bf u}_{3D}\cdot \nabla_{3D} {\bf u}_{3D} += +{\bf u} \cdot \nabla_z {\bf u} + w \frac{\partial {\bf u}}{\partial z}. +$$ (advection-3d2d) + +The horizontal component may be replaced with the vector identity + +$$ +\begin{aligned} +{\bf u} \cdot \nabla_z {\bf u} +&= (\nabla_z \times {\bf u}) \times {\bf u} + \nabla_z \frac{|{\bf u}|^2}{2} \\ +&= \left( \boldsymbol{k} \cdot (\nabla_z \times {\bf u})\right) +\left( \boldsymbol{k} \times {\bf u} \right) + \nabla_z \frac{|{\bf u}|^2}{2} \\ +&= \zeta {\bf u}^{\perp} + \nabla_z K, +\end{aligned} $$ (advection-identity) where $\zeta$ is relative vorticity and $K$ is kinetic energy. This step separates the horizontal advection into non-divergent and non-rotational components, which is useful in the final TRiSK formulation. #### Assumptions -For a primitive equation ocean model, we assume the fluid is incompressible and hydrostatic. For Omega we are not making the Boussinesq assumption, so all density terms are the full density. In particular, the density coefficient of the pressure gradient in [](#continuous-momentum) is not a constant, as it is in primitive equation models like POP and MPAS-Ocean. - -**Incompressible:** Assume that the three-dimensional velocity field is nondivergent, - -$$ - \nabla_z \cdot {\bf u} + \frac{\partial w}{\partial z} = 0. -$$ (continuous-incompressible) +For a primitive equation ocean model, we assume the fluid is hydrostatic. For Omega we are not making the Boussinesq assumption, so all density-dependent terms use the full density. In particular, the density coefficient of the pressure gradient in [](#continuous-momentum) is not a constant, as it is in primitive equation models like POP and MPAS-Ocean. **Hydrostatic:** Beginning with the vertical momentum equation, @@ -132,11 +137,14 @@ $$ \rho = f_{eos}(p,\Theta,S). $$ (continuous-eos) -where conservative temperature, $\Theta$, and salinity, $S$, are examples of tracers $\varphi$. +where conservative temperature, $\Theta$, and absolute salinity, $S$, are examples of tracers $\varphi$. + +The Boussinesq primitive equations also make an incompressibility assumption, which is identical to an assumption of constant density. Non-Boussinesq models do not make thiat assumption and are not explicitly incompressible. However, the mass conservation equation [](continuous-mass), along with an equation of state for sea water where density only varies slightly, results in a fluid that is nearly incompressible. + #### Final Continuous Equations -The final form of the continuous conservation equations for a non-Boussinesq, incompressible, non-hydrostatic ocean are +The final form of the continuous conservation equations for a non-Boussinesq, hydrostatic ocean are momentum: @@ -245,13 +253,13 @@ $$(def-mass-thickness-average) At this point our derivation has not made any assumptions about density, and may be used for both Boussinesq and non-Boussinesq fluids. A Boussinesq derivation would now assume small variations in density and replace $\rho(x,y,z,t)$ with a constant $\rho_0$ everywhere but the pressure gradient coefficient. In that case $\rho$ divides out in [](#def-mass-thickness-average) the Boussinesq layer quantities would simply be thickness-weighted averages. -We can now derive the layered equations. Writing the momentum equation [](continuous-momentum-final) with $\rho$ included as in [](continuous-momentum), we integrate the continuous equations [](continuous-momentum-final), [](continuous-mass-final), [](continuous-tracer-final) in $z$ from $z_k^{bot}$ to $z_k^{top}$, +We can now derive the layered equations. Integrate the continuous equations [](continuous-momentum-final), [](continuous-mass-final), [](continuous-tracer-final) in $z$ from $z_k^{bot}$ to $z_k^{top}$, $$ -\frac{\partial }{\partial t} \int_{z_k^{bot}}^{z_k^{top}} \rho{\bf u} dz -+ \int_{z_k^{bot}}^{z_k^{top}} \rho \left( \zeta + f \right){\bf u}^\perp dz -+ \int_{z_k^{bot}}^{z_k^{top}} \frac{\partial }{\partial z} \left( \rho w{\bf u} \right) dz - = \int_{z_k^{bot}}^{z_k^{top}} \rho \left[- \frac{1}{\rho}\nabla_z p - \nabla_z K +\frac{\partial }{\partial t} \int_{z_k^{bot}}^{z_k^{top}} {\bf u} dz ++ \int_{z_k^{bot}}^{z_k^{top}} \left( \zeta + f \right){\bf u}^\perp dz ++ \int_{z_k^{bot}}^{z_k^{top}} \frac{\partial }{\partial z} \left( w{\bf u} \right) dz + = \int_{z_k^{bot}}^{z_k^{top}} \left[- \frac{1}{\rho}\nabla_z p - \nabla_z K + {\bf D}^u + {\bf F}^u \right] dz $$ (z-integration-momentum) @@ -269,13 +277,13 @@ $$ = \int_{z_k^{bot}}^{z_k^{top}} \left( D^\varphi + Q^\varphi \right) dz $$ (z-integration-tracers) -This results in variables that are vertically mass-averaged, as defined in [](def-mass-thickness-average). The subscript $k$ denotes a variable that has been vertically mass-averaged over layer $k$. This system is now discrete in the vertical, but remains continuous in the horizontal and in time. +This results in conservation equations that are valid over the layer. The momentum variables are simply vertically averaged. Tracer variables are vertically mass-averaged, as defined in [](def-mass-thickness-average). The subscript $k$ denotes a variable average over layer $k$. This system is now discrete in the vertical, but remains continuous in the horizontal and in time. $$ \frac{\partial {\bf u}_k}{\partial t} + \zeta_k {\bf u}_k^{\perp} + f {\bf u}_k^{\perp} -+ \left[ \rho_k w_k {\bf u}_k \right]^{top} - \left[ \rho_k w_k {\bf u}_k \right]^{bot} ++ \left[ w_k {\bf u}_k \right]^{top} - \left[ w_k {\bf u}_k \right]^{bot} = - \frac{1}{\rho} \nabla_z p_k - \nabla_z K_k @@ -294,7 +302,7 @@ $$ (layered-tracer-1) Equivalently, one could have multiplied [](z-integration-momentum), [](z-integration-mass), [](z-integration-tracers) by $g$ and expressed the integrals in terms of pressure, with integration limits from $p_k^{top}$ to $p_k^{bot}$. -Derivations of ocean model equations with pressure as the vertical variable may be found in de Szoeke and Samelson 2002 (link: `https://journals.ametsoc.org/doi/full/10.1175/1520-0485(2002)032%3C2194%3ATDBTBA%3E2.0.CO%3B2`) and [Losch et al. 2003](https://journals.ametsoc.org/view/journals/phoc/34/1/1520-0485_2004_034_0306_hsacgc_2.0.co_2.xml). +Derivations of ocean model equations with pressure as the vertical variable may be found in [de Szoeke and Samelson 2002](https://journals.ametsoc.org/view/journals/phoc/32/7/1520-0485_2002_032_2194_tdbtba_2.0.co_2.xml) and [Losch et al. 2003](https://journals.ametsoc.org/view/journals/phoc/34/1/1520-0485_2004_034_0306_hsacgc_2.0.co_2.xml). The vertical advection terms use the fundamental theorem of calculus to integrate a derivative in $z$, resulting in boundary conditions at the layer interfaces. This makes intuitive sense as a mass balance. For example, in the absence of horizontal advection and sources, the mass equation is simply @@ -325,7 +333,7 @@ r(x,y,z_k^{mid}(x,y,t),t) = k $$ (def-r) and interpolate linearly in the vertical between mid-layers. When we write the layered form of the equations, we must take into account of the tilted layers using the chain rule. -We now rewrite derivatives in order to convert from horizontal coordinates to tilted coordinates. Let $(x,y)$ be the original horizontal coordinates, which are perpendicular to $z$, and the horizontal gradient be written as $\nabla_z=(\partial/\partial x, \partial/\partial y)$, as above. Now define a tilted coordinate system using the layers defined by $r$, where the within-layer horizontal coordinates are $(x',y')$ and the along-layer gradient is written as $\nabla_r=(\partial/\partial x', \partial/\partial y')$. We construct $r$ to be monotonic in $z$, so we can invert it as $z(x',y',r,t)$. Now horizontal derivatives along the tilted direction $x'$ for any field $\varphi(x,y,z,t)$ can be expanded as +We now rewrite derivatives in order to convert from horizontal coordinates to tilted coordinates. Let $(x,y)$ be the original horizontal coordinates, which are perpendicular to $z$, and the horizontal gradient be written as $\nabla_z=(\partial/\partial x, \partial/\partial y)$, as above. Now define a tilted coordinate system using the layers defined by $r$, where the within-layer horizontal coordinates are $(x',y')$ and the along-layer gradient is written as $\nabla_r=(\partial/\partial x', \partial/\partial y')$. We construct $r$ to be monotonic in $z$, so we can invert it as $z(x',y',r,t)$. Now horizontal derivatives along the tilted direction $x'$ for any field $\varphi(x,y,z,t)$ can be expanded using the chain rule as $$ \frac{\partial }{\partial x'} \left[ \varphi(x(x'),y(y'),z(x',y',r,t),t) \right] @@ -335,12 +343,14 @@ $$ (dvarphidx) We may define the tilted horizontal variable $x'$ as we please. The simplest definition is $x'(x)\equiv x$. Then $\partial x / \partial x'=1$. Rearranging [](#dvarphidx) and repeating for $y$, $$ -\frac{\partial \varphi}{\partial x} = +\begin{aligned} +\frac{\partial \varphi}{\partial x} &= \frac{\partial \varphi}{\partial x'} - \frac{\partial \varphi}{\partial z} \frac{\partial z}{\partial x'}\\ -\frac{\partial \varphi}{\partial y} = +\frac{\partial \varphi}{\partial y} &= \frac{\partial \varphi}{\partial y'} - \frac{\partial \varphi}{\partial z} \frac{\partial z}{\partial y'}. +\end{aligned} $$ (dvarphidxy) This may be written in vector form as @@ -349,24 +359,35 @@ $$ \nabla_z \varphi = \nabla_r \varphi - \frac{\partial \varphi}{\partial z} \nabla_r z. $$ (dvarphidnabla) + ### Pressure Gradient -The most important change due to general vertical coordinates is in the pressure gradient term. Using the pressure in [](#dvarphidnabla), +The most important change due to general vertical coordinates is in the pressure gradient term. Substituting pressure for $\varphi$ in [](#dvarphidnabla), $$ +\begin{aligned} -\frac{1}{\rho} \nabla_z p -=-\frac{1}{\rho} \nabla_r p +\frac{1}{\rho} \frac{\partial p}{\partial z} \nabla_r z \\ -=-\frac{1}{\rho} \nabla_r p - g \nabla_r z \\ -= - v \nabla_r p - \nabla_r \Phi +&=-\frac{1}{\rho} \nabla_r p +\frac{1}{\rho} \frac{\partial p}{\partial z} \nabla_r z \\ +&=-\frac{1}{\rho} \nabla_r p - g \nabla_r z \\ +&= - v \nabla_r p - \nabla_r \Phi, +\end{aligned} $$ (gradp) -where we have substituted hydrostatic balance [](hydrostatic-balance) and specific volume $v\equiv 1/\rho$. The geopoential due to a constant gravitational field is $d \Phi/dz=g$, so that $\Phi = gz + c$ where $c$ is an arbitrary constant. Thus in the equation above, $\nabla_r \Phi = g \nabla_r z$. The geopotential is a more general form than a constant $g$, and allows for alterations in the gravitational field due to self attraction and loading and tidal forces. Further details will be provided in the forthcoming pressure gradient design document. +where we have substituted hydrostatic balance [](hydrostatic-balance) and specific volume $v\equiv 1/\rho$. The geopotential due to a constant gravitational field is $d \Phi/dz=g$, so that + +$$ +\Phi(x,y,z,t) = gz + \Phi_0(x,y,t) +$$ (def-geopotential) + +where $\Phi_0(x,y,t)$ is constant in $z$ due to the integration. +Thus $\nabla_r \Phi = g \nabla_r z + \nabla_r \Phi_0$. The geopotential is a more general form than a constant gravitational force $g{\bf k}$, and allows for alterations in the gravitational field due to self attraction and loading and tidal forces, which are specified in $\Phi_0$. For versions 1.0 and 2.0 of Omega we only consider a constant gravitational force, and set $\Phi_0=0$. Further details will be provided in the forthcoming pressure gradient design document. -See [Adcroft and Hallberg 2006](https://www.sciencedirect.com/science/article/pii/S1463500305000090) eqn. 1 and [Griffies et al](http://sciencedirect.com/science/article/pii/S1463500300000147) eqn 2 for an example of the pressure gradient in tilted coordinates. The additional terms due to the expansion of $\nabla_z$ to $\nabla_r$ in the rest of the equations are small and are ignored. +See [Adcroft and Hallberg 2006](https://www.sciencedirect.com/science/article/pii/S1463500305000090) eqn. 1 and [Griffies et al](http://sciencedirect.com/science/article/pii/S1463500300000147) eqn 2 for additional examples of the pressure gradient in tilted coordinates. The additional terms due to the expansion of $\nabla_z$ to $\nabla_r$ in the rest of the equations are small and are ignored. +Some publications state that the transition from Boussinesq to non-Boussinesq equations is accompanied by a change from z-coordinate to pressure-coordinates. However, we use a general vertical coordinate, so the vertical may be referenced to $z$ or $p$. In a purely z-coordinate model like POP, only the $\nabla p$ term is used in [](gradp). In a purely p-coordinate model, only $\nabla z$ remains, as described in [de Szoeke and Samelson 2002](https://journals.ametsoc.org/view/journals/phoc/32/7/1520-0485_2002_032_2194_tdbtba_2.0.co_2.xml). In a general vertical coordinate model the layer interface placement is up to the user's specification, and so both terms are kept. ### Vertical Transport -The integration in [](#z-integration-momentum) to [](#z-integration-tracers) changes the vertical velocity $w$ in m/s to a vertical mass-thickness transport $\omega=\rho w$ in kg/s/m$^2$. Here $w$ is the Latin letter and $\omega$ is the Greek letter omega. One can think of fluid velocity $w$ as a volume transport, normalized by area, in units of length per time. Analogously, $\omega$ is mass-thickness transport a mass transport (per unit area). The variables $w$ and $\omega$ have the same sign convention of upward (positive $z$) for positive transport. +The integration in [](#z-integration-momentum) to [](#z-integration-tracers) changes the vertical velocity $w$ in m/s to a vertical mass-thickness transport $\omega=\rho w$ in kg/s/m$^2$. Here $w$ is the Latin letter and $\omega$ is the Greek letter omega. One can think of fluid velocity $w$ as a volume transport, normalized by area, in units of length per time. Analogously, $\omega$ is mass-thickness transport, which is mass transport per unit area (kg/s/m$^2$). The variables $w$ and $\omega$ have the same sign convention of upward (positive $z$) for positive transport. ### Final Layered Equations @@ -375,7 +396,7 @@ momentum: $$ \frac{\partial {\bf u}_k}{\partial t} + q_k h_k {\bf u}_k^{\perp} -+ \omega_k^{top} {\bf u}_k^{top} - \omega_k^{bot}{\bf u}_k^{bot} ++ \frac{\omega_k^{top}}{\rho_k^{top}} {\bf u}_k^{top} - \frac{\omega_k^{bot}}{\rho_k^{bot}}{\bf u}_k^{bot} = - v_k \nabla_r p_k - \nabla_r \Phi_k - \nabla_r K_k @@ -411,7 +432,7 @@ The horizontally discretized layered equations are as follows. We have dropped t $$ \frac{\partial u_{e,k}}{\partial t} + \left[ \frac{{\bf k} \cdot \nabla \times u_{e,k} +f_v}{[h_{i,k}]_v}\right]_e\left([h_{i,k}]_e u_{e,k}^{\perp}\right) -+ \left[ \omega_{i,k}^{top} \right]_e u_{e,k}^{top} - \left[ \omega_{i,k}^{bot} \right]_e u_{e,k}^{bot} ++ \left[ v_{i,k}^{top}\omega_{i,k}^{top} \right]_e u_{e,k}^{top} - \left[ v_{i,k+1}^{top}\omega_{i,k+1}^{top} \right]_e u_{e,k+1}^{top} = - v_{i,k} \nabla p_{i,k} - \nabla \Phi_{i,k} - \nabla K_{i,k} + { \bf D}^u_{e,k} + {\bf F}^u_{e,k} @@ -419,33 +440,34 @@ $$ (discrete-momentum) $$ \frac{\partial h_{i,k}}{\partial t} + \nabla \cdot \left([h_{i,k}]_e u_{e,k}\right) -+ \omega_{i,k}^{top} - \omega_{i,k}^{bot} ++ \omega_{i,k}^{top} - \omega_{i,k+1}^{top} = Q^h_{i,k} $$ (discrete-thickness) $$ \frac{\partial h_{i,k} \varphi_{i,k}}{\partial t} + \nabla \cdot \left(u_{e,k} [h_{i,k} \varphi_{i,k}]_e \right) -+ \varphi_{i,k}^{top} \omega_{i,k}^{top} - \varphi_{i,k}^{bot}\omega_{i,k}^{bot} ++ \varphi_{i,k}^{top} \omega_{i,k}^{top} - \varphi_{i,k+1}^{top}\omega_{i,k+1}^{top} = D^\varphi_{i,k} + Q^\varphi_{i,k} $$ (discrete-tracer) -$$ -v_{i,k} = f_{eos}(p_{i,k},\Theta_{i,k},S_{i,k}) -$$ (discrete-eos) - $$ p_{i,k} = p_{i}^{surf} + \sum_{k'=1}^{k-1} g h_{i,k'} + \frac{1}{2} g h_{i,k} $$ (discrete-pressure) +$$ +v_{i,k} = f_{eos}(p_{i,k},\Theta_{i,k},S_{i,k}) +$$ (discrete-eos) + $$ z_{i,k}^{top} = z_{i}^{floor} + \sum_{k'=k}^{K_{max}} v_{i,k'}h_{i,k'} $$ (discrete-z) -The subscripts $i$, $e$, and $v$ indicate cell, edge, and vertex locations and subscript $k$ is the layer. Square brackets $[\cdot]_e$ and $[\cdot]_v$ are quantities that are interpolated to edge and vertex locations. For vector quantities, $u_{e,k}$ denotes the normal component at the center of the edge, while $u_{e,k}^\perp$ denotes the tangential component. The superscripts $top$ and $bot$ refer to the top and bottom of individual layers, while $surf$ and $floor$ are the surface and floor of the full ocean column. All variables without these superscripts indicate that they are layer-averaged, as defined in [](def-mass-thickness-average), and can be considered to represent a mid-layer value in the vertical. The mid-layer location is equivalently the average in $z$, $p$, or $h$ (mass), since density $\rho_{i,k}$ is considered constant in the cell. +The subscripts $i$, $e$, and $v$ indicate cell, edge, and vertex locations and subscript $k$ is the layer. Square brackets $[\cdot]_e$ and $[\cdot]_v$ are quantities that are interpolated to edge and vertex locations. For vector quantities, $u_{e,k}$ denotes the normal component at the center of the edge, while $u_{e,k}^\perp$ denotes the tangential component. We have switched from $\varphi_{i,k}^{bot}$ to the identical $\varphi_{i,k+1}^{top}$ for all variables in order for the notation to match the array names in the code. The superscripts $surf$ and $floor$ are the surface and floor of the full ocean column. All variables without these superscripts indicate that they are layer-averaged, as defined in [](def-mass-thickness-average), and can be considered to represent a mid-layer value in the vertical. The mid-layer location is equivalently the average in $z$, $p$, or $h$ (mass), since density $\rho_{i,k}$ is considered constant in the cell. + +We refer to these as the discrete equations, but time derivatives remain continuous. The time discretization is described in the [time stepping design document](TimeStepping.md). The velocity, mass-thickness, and tracers are solved prognostically using [](discrete-momentum), [](discrete-thickness), [](discrete-tracer). At the new time, these variables are used to compute pressure [](discrete-pressure), specific volume [](discrete-eos), and z-locations [](discrete-z). Additional variables are computed diagnostically at the new time: $u^{\perp}$, $K$, $\omega$, $z^{mid}$, $\Phi$, etc. The initial geopotential is simply $\Phi=gz$, but additional gravitational terms may be added later. The horizontal operators $\nabla$, $\nabla\cdot$, and $\nabla \times$ are now in their discrete form. In the TRiSK design, gradients ($\nabla$) map cell centers to edges; divergence ($\nabla \cdot$) maps edge quantities to cells; and curl ($\nabla \times$) maps edges to vertices. The exact form of operators and interpolation stencils remain the same as those given in [Omega-0 design document](OmegaV0ShallowWater.md#operator-formulation). The discrete version of terms common with Omega-0, such as advection, potential vorticity, and $\nabla K$, can be found in [Omega-0 Momentum Terms](OmegaV0ShallowWater.md#momentum-terms) and [Omega-0 Thickness and Tracer Terms](OmegaV0ShallowWater.md#thickness-and-tracer-terms). -We refer to these as the discrete equations, but time derivative remains continuous. The time discretization is described in the [time stepping design document](TimeStepping.md). ### Momentum Dissipation @@ -515,7 +537,7 @@ $$ \right) $$ (discrete-mom-vert-diff) -The native locations for $z$ and $\nu$ are at the mid-layer and cell center, so they must be interpolated to the vertical layer interface and horizontal edge for this computation. This stencil is applied as an implicit tri-diagonal solve at the end of the time step. See details in the [tridiagonal solver design document](TridiagonalSolver) and forthcoming vertical mixing design document. +This stencil is applied as an implicit tri-diagonal solve at the end of the time step. See details in the [tridiagonal solver design document](TridiagonalSolver) and forthcoming vertical mixing design document. ### Momentum Forcing The discretized momentum forcing ${ \bf F}^u_{e,k}$ may include: @@ -641,10 +663,10 @@ Table 1. Definition of variables. Geometric variables may be found in the [Omega | symbol | name | units | location | name in code | notes | |---------------------|-----------------------------|----------|-|---------|-------------------------------------------------------| |$D_{i,k}$ | divergence | 1/s | cell | Divergence |$D=\nabla\cdot\bf u$ | -|${\bf D}^u_{k} $, $ D^u_{e,k} $ | momentum dissipation terms | m/s$^2$ | edge | |see [Momentum Dissipation Section](#momentum-dissipation) | -|$ D_{e,k}^\varphi$ | tracer diffusion terms | | cell | |see [Tracer Diffusion Section](#tracer-diffusion) | +|${\bf D}^u_{k} $, $ D^u_{e,k} $ | momentum dissipation terms | m/s$^2$ | edge | |see [Momentum Dissipation Section](#momentum-dissipation) | +|$ D_{e,k}^\varphi$ | tracer diffusion terms | | cell | |see [Tracer Diffusion Section](#tracer-diffusion) | |$f_v$ | Coriolis parameter| 1/s | vertex | FVertex | $f = 2\Omega sin(\phi)$, $\Omega$ rotation rate, $\phi$ latitude| -|${\bf F}^u_{k} $, $ F^u_{e,k} $ | momentum forcing | m/s$^2$ | edge | | see [Momentum Forcing Section](#momentum-forcing) | +|${\bf F}^u_{k} $, $ F^u_{e,k} $ | momentum forcing | m/s$^2$ | edge | | see [Momentum Forcing Section](#momentum-forcing) | |$f_{eos}$ | equation of state | - | any | function call | may produce density or specific volume | |$g$ | gravitational acceleration | m/s$^2$ | constant | Gravity | |$h_{i,k}$ | layer mass-thickness | kg/m$^2$ | cell | LayerThickness | see [](def-h) | From 6f9b488b710b5a1b509e083adac2d11abcc3cf78 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Mon, 5 May 2025 20:54:57 +0200 Subject: [PATCH 05/65] Add paragraph on acoustic wave suppression, nabla_z --> nabla_r --- components/omega/doc/design/OmegaV1GoverningEqns.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index fe52f882ad2b..4d14448a2043 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -139,8 +139,9 @@ $$ (continuous-eos) where conservative temperature, $\Theta$, and absolute salinity, $S$, are examples of tracers $\varphi$. -The Boussinesq primitive equations also make an incompressibility assumption, which is identical to an assumption of constant density. Non-Boussinesq models do not make thiat assumption and are not explicitly incompressible. However, the mass conservation equation [](continuous-mass), along with an equation of state for sea water where density only varies slightly, results in a fluid that is nearly incompressible. +The Boussinesq primitive equations also make an incompressibility assumption, which is identical to an assumption of constant density. Non-Boussinesq models do not make that assumption and are not explicitly incompressible. However, the mass conservation equation [](continuous-mass), along with an equation of state for sea water where density only varies slightly, results in a fluid that is nearly incompressible. +A concern when using the full, compressible continuity equation is that this might support acoustic waves with wave speeds on the order of 1500 m/s, requiring an extremely small time step. According to [Griffies and Adcroft (2008)](https://agupubs.onlinelibrary.wiley.com/doi/10.1029/177GM18) and [de Szoeke and Samelson (2002)](https://doi.org/10.1175/1520-0485(2002)032%3C2194:TDBTBA%3E2.0.CO;2), the hydrostatic approximation removes vertical sound waves, leaving only barotropic acoustic modes called Lamb waves. Fortunately, the Lamb waves can be "subsumed" into the external gravity mode because the scale height of the ocean is much larger (200 km) than its depth (~5 km). This suggests that Lamb waves should not produce any additional constraints on our barotropic time step (though we should keep an eye on this). For more details on Lamb waves, see [Dukowicz (2013)](https://doi.org/10.1175/MWR-D-13-00148.1) #### Final Continuous Equations @@ -359,10 +360,11 @@ $$ \nabla_z \varphi = \nabla_r \varphi - \frac{\partial \varphi}{\partial z} \nabla_r z. $$ (dvarphidnabla) - ### Pressure Gradient -The most important change due to general vertical coordinates is in the pressure gradient term. Substituting pressure for $\varphi$ in [](#dvarphidnabla), +For most terms, we can safely assume $\nabla_z \approx \nabla_r$ because the vertical to horizontal aspect ratio even at very high horizontal resolution is on the order of $\epsilon ~ 10^{-3}$ (thought may need to re-assess this assumption if we decide to use strongly sloped layers). This applies, for example, to the curl operator uset to compute the relative vorticity and the gradient applied to the kinetic energy in [](z-integration-momentum). + +The exception is the pressure gradient term. This is becasue strong vertical and week horizontal pressure gradients mean that both terms in the chain rule [](dvarphidnabla) are of the same order and must be retained. Substituting pressure for $\varphi$ in [](#dvarphidnabla), $$ \begin{aligned} @@ -674,7 +676,7 @@ Table 1. Definition of variables. Geometric variables may be found in the [Omega |${\bf k}$ | vertical unit vector | | |$K_{min}$ | shallowest active layer | | |$K_{max}$ | deepest active layer | | -|$K_{e,k}$ | kinetic energy | m$^2$/s$^2$ | cell | KineticEnergyCell |$K = \left\| {\bf u} \right\|^2 / 2$ | +|$K_{i,k}$ | kinetic energy | m$^2$/s$^2$ | cell | KineticEnergyCell |$K = \left\| {\bf u} \right\|^2 / 2$ | |$p_{i,k}$ | pressure | Pa | cell | Pressure | see [](discrete-pressure) | |$p^{floor}_i$ | bottom pressure | Pa | cell | PFloor | pressure at ocean floor |$p^{surf}_i$ | surface pressure | Pa | cell | PSurface | due to atm. pressure, sea ice, ice shelves From 8488e6bfda7fb148a0316a257e462f6c6c93a47b Mon Sep 17 00:00:00 2001 From: mark-petersen Date: Fri, 16 May 2025 07:17:56 -0700 Subject: [PATCH 06/65] add geopotential to momentum eqn throughout, PR comments --- .../omega/doc/design/OmegaV1GoverningEqns.md | 62 ++++++++++++------- 1 file changed, 40 insertions(+), 22 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 4d14448a2043..11a7456431ec 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -22,7 +22,7 @@ The planned versions of Omega are: - **Omega-0: Shallow water equations with identical vertical layers and inactive tracers.** In his first version, there is no vertical transport or advection. The tracer equation is horizontal advection-diffusion, but tracers do not feed back to dynamics. Pressure gradient is simply gradient of sea surface height. Capability is similar to [Ringler et al. 2010](https://www.sciencedirect.com/science/article/pii/S0021999109006780) - **Omega-1.0: Layered ocean, idealized, no surface fluxes.** This adds active temperature, salinity, and density as a function of pressure in the vertical. Vertical advection and diffusion terms are added to the momentum and tracer equations. An equation of state and simple vertical mixing, such as constant coefficient, are needed. Capability and testing are similar to [Petersen et al. 2015](http://www.sciencedirect.com/science/article/pii/S1463500314001796). Tests include overflow, internal gravity wave, baroclinic channel, seamount, and vertical merry-go-round. -- **Omega-1.1: Layered ocean, idealized, with surface fluxes.** Addition of simple vertical mixing scheme such as Pacanowski & Philander; nonlinear equation of state (TEOS10); tracer surface restoring to a constant field; constant wind forcing; and flux-corrected transport for horizontal advection. Testing will be with the baroclinic gyre and single column tests of surface fluxes and vertical mixing. +- **Omega-1.1: Layered ocean, idealized, with surface fluxes.** Addition of simple vertical mixing scheme such as Pacanowski & Philander; nonlinear equation of state (TEOS10); tracer surface restoring to a constant field; constant-in-time wind forcing; and flux-corrected transport for horizontal advection. Testing will be with the baroclinic gyre and single column tests of surface fluxes and vertical mixing. - **Omega-2.0: Coupled within E3SM, ocean only.** Ability to run C cases (active ocean only) within E3SM. Requires addition of E3SM coupling infrastructure; simple analysis (time-averaged output of mean, min, max); split baroclinic-barotropic time; global bounds checking on state. Testing and analysis similar to [Ringler et al. 2013](https://www.sciencedirect.com/science/article/pii/S1463500313000760), except Omega uses a non-Boussinesq formulation. - **Omega-2.1: E3SM fully coupled** Ability to run G cases (active ocean and sea ice) and B cases (all components active) within E3SM. This will include: a full vertical mixing scheme, such as KPP; frazil ice formation in the ocean; and a submosescale parameterization. Omega 2.1 will mostly be run at eddy-resolving resolutions, and will not include parameterizations for lower resolutions such as Gent-McWilliams and Redi mixing. Simulations will be compared to previous E3SM simulations, including [Caldwell et al. 2019](https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2019MS001870) and [Petersen et al. 2019](https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2018MS001373). @@ -33,7 +33,7 @@ This document describes the governing equations for the layered ocean model, whi The requirements in the [Omega-0 design document](OmegaV0ShallowWater) still apply. Additional design requirements for Omega-1 are: ### Omega will be a hydrostatic, non-Boussinesq ocean model. -See discussion in introduction. The non-Boussinesq formulation uses the full density throughout resulting in governing equations that conserve mass rather than volume. The substantial change is that the ``thickness'' variable, $h$, is now a mass-thickness, $h = \rho \Delta z$. This is explained in the derivation of the [layered equations below](#layered-equations). +See discussion in introduction. The non-Boussinesq formulation uses the full density throughout resulting in governing equations that conserve mass rather than volume. The substantial change is that the "thickness" variable, $h$, is now a mass-thickness, $h = \rho \Delta z$. This is explained in the derivation of the [layered equations below](#layered-equations). ### Omega will use TEOS10 for the equation of state. See additional [EOS design document](EOS) @@ -43,7 +43,7 @@ See forthcoming design documents on the pressure gradient, vertical mixing, and ## 3. Continuous Equations -The continuous form of the conservation equations are as follows [Kundu et al. 2024](https://www.amazon.com/Fluid-Mechanics-Pijush-K-Kundu/dp/012405935X), chapter 4, eqns 4.7 and 4.22. This is before any assumptions are made, so this is a compressible, non-hydrostatic, non-Boussinesq fluid. Here all variables are a function of $(x,y,z)$, ${\bf u}_{3D}$ denotes the three-dimensional velocity vector, ${\bf u}_{3D} \otimes {\bf u}_{3D} = {\bf u}_{3D}{\bf u}_{3D}^T$ is the tensor product, $\nabla_{3D}$ is the three-dimensional gradient, $D/Dt$ is the material derivative, and other variables defined in the [Variable Definition Section](#variable-definitions) below. +The continuous form of the conservation equations are as follows. See [Kundu et al. 2024](https://www.amazon.com/Fluid-Mechanics-Pijush-K-Kundu/dp/012405935X), chapter 4, eqns 4.7 and 4.22 or the [MOM5 manual](https://mom-ocean.github.io/assets/pdfs/MOM5_manual.pdf) eqn 7.7. This is before any assumptions are made, so this is a compressible, non-hydrostatic, non-Boussinesq fluid. Here all variables are a function of $(x,y,z)$, ${\bf u}_{3D}$ denotes the three-dimensional velocity vector, ${\bf u}_{3D} \otimes {\bf u}_{3D} = {\bf u}_{3D}{\bf u}_{3D}^T$ is the tensor product, $\nabla_{3D}$ is the three-dimensional gradient, $D/Dt$ is the material derivative, and other variables defined in the [Variable Definition Section](#variable-definitions) below. momentum: @@ -52,6 +52,7 @@ $$ \frac{\partial \rho {\bf u}_{3D}}{\partial t} + \nabla_{3D} \cdot \left( \rho {\bf u}_{3D} \otimes {\bf u}_{3D} \right) = - \nabla_{3D} p + - \rho \nabla_{3D} \Phi + \rho {\bf D}^u + \rho {\bf F}^u $$ (continuous-momentum) @@ -73,17 +74,18 @@ $$ = D^\varphi + Q^\varphi $$ (continuous-tracer) -Here we have express the following terms as a general operators, with examples of specific forms provided below: the dissipation ${\bf D}^u$, momentum forcing ${\bf F}^u$, tracer diffusion $D^\varphi$, and tracer sources and sinks $Q^\varphi$. The momentum equation can be rewritten using the product rule on $\rho {\bf u}$, mass conservation, and dividing by $\rho$, as: +Here we have express the following terms as a general operators, with examples of specific forms provided below: the dissipation ${\bf D}^u$, momentum forcing ${\bf F}^u$, tracer diffusion $D^\varphi$, and tracer sources and sinks $Q^\varphi$. The graviational potential, $\Phi$, is written in a general form, and may include Earth's gravity, tidal forces, and self attraction and loading. The momentum equation can be rewritten using the product rule on $\rho {\bf u}$, mass conservation, and dividing by $\rho$, as: $$ \frac{D {\bf u}_{3D} }{D t} \equiv \frac{\partial {\bf u}_{3D}}{\partial t} + {\bf u}_{3D}\cdot \nabla_{3D} {\bf u}_{3D} = - \frac{1}{\rho} \nabla_{3D} p + - \nabla_{3D} \Phi + {\bf D}^u + {\bf F}^u $$ (continuous-momentum-rho) -Geophysical fluids such as the ocean and atmosphere are rotating and stratified, and horizontal velocities are orders of magnitude larger than vertical velocities. It is therefore convenient to separate the horizontal and vertical as ${\bf u}_{3D} = \left( {\bf u}, w \right)$ and $\nabla_{3D} = \left( \nabla_z, d/dz \right)$ where $z$ is the vertical direction in a local coordinate frame on the Earth's surface and $w$ is the vertical velocity. The $z$ subscript on $\nabla_z$ is to remind us that this is the true horizontal gradient (perpendicular to $z$), as opposed to gradients within tilted layers used in the following section. The gravitational force $g {\bf k}$ is included in ${\bf F}^u$. The rotating frame of reference results in the Coriolis force $f {\bf k} \times {\bf u} \equiv f {\bf u}^\perp$, where $f$ is the Coriolis parameter and ${\bf u}^\perp$ is the horizontal velocity rotated $90^o$ from $\bf u$. See any textbook in the [References](#references) for a full derivation. +Geophysical fluids such as the ocean and atmosphere are rotating and stratified, and horizontal velocities are orders of magnitude larger than vertical velocities. It is therefore convenient to separate the horizontal and vertical as ${\bf u}_{3D} = \left( {\bf u}, w \right)$ and $\nabla_{3D} = \left( \nabla_z, d/dz \right)$ where $z$ is the vertical direction in a local Cartesian coordinate system aligned with gravity (approximately normal to Earth's surface), and $w$ is the vertical velocity. The $z$ subscript on $\nabla_z$ is to remind us that this is the true horizontal gradient (perpendicular to $z$), as opposed to gradients within tilted layers used in the following section. The Earth's gravitational force is included as $\Phi_{gravity} = gz $ so that $ \nabla_{3D} \Phi_{gravity} = g{\bf k}$. The rotating frame of reference results in the Coriolis force $f {\bf k} \times {\bf u} \equiv f {\bf u}^\perp$, where $f$ is the Coriolis parameter and ${\bf u}^\perp$ is the horizontal velocity vector rotated $90^\circ$ counterclockwise from $\bf u$ in the horizontal plane. See any textbook in the [References](#references) for a full derivation. The advection term may be separated into horizontal and vertical parts as @@ -116,7 +118,7 @@ For a primitive equation ocean model, we assume the fluid is hydrostatic. For Om $$ \frac{D w }{D t} = - - \frac{1}{\rho} \frac{\partial p}{\partial z} - g + {\bf D}^u + {\bf F}^u + - \frac{1}{\rho} \frac{\partial p}{\partial z} - g + {\bf D}^u \cdot {\bf k} + {\bf F}^u \cdot {\bf k} $$ (continuous-vert-mom) assume that advection of vertical momentum $Dw/Dt$, dissipation, and forcing are small, and that the first order balance is between pressure gradient and buoyancy, @@ -154,6 +156,7 @@ $$ + \zeta {\bf u}^\perp + f {\bf u}^\perp + w\frac{\partial {\bf u}}{\partial z} = - \frac{1}{\rho} \nabla_z p + - \nabla_z \Phi - \nabla_z K + {\bf D}^u + {\bf F}^u $$ (continuous-momentum-final) @@ -188,18 +191,18 @@ $$ p(x,y,z) = p^{surf}(x,y) + \int_{z}^{z^{surf}} \rho g dz'. $$ (continuous-hydrostatic-pressure-final) -Here the $\nabla$ operators are exactly horizontal; we expand terms for tilted layers in the following section. The momentum diffusion terms include Laplacian (del2), biharmonic (del4), and vertical viscosity, +Here the $\nabla_z$ operators are exactly horizontal; we expand terms for tilted layers in the following section. The momentum diffusion terms include Laplacian (del2), biharmonic (del4), and vertical viscosity, $$ {\bf D}^u -= \nu_2 \nabla^2 {\bf u} - \nu_4 \nabla^4 {\bf u} += \nu_2 \nabla_z^2 {\bf u} - \nu_4 \nabla_z^4 {\bf u} + \frac{\partial }{\partial z} \left( \nu_v \frac{\partial {\bf u}}{\partial z} \right) $$ (continuous-h_mom_diff) and may also include a Rayleigh drag and eventually parameterizations. Momentum forcing is due to wind stress and bottom drag. Similarly, the tracer diffusion terms include Laplacian (del2), and vertical viscosity, $$ D^\varphi = - \nabla\cdot\left(\rho \kappa_2 \nabla\varphi \right) + \nabla_z\cdot\left(\rho \kappa_2 \nabla_z\varphi \right) + \rho \frac{\partial }{\partial z} \left( \kappa_v \frac{\partial \varphi}{\partial z} \right), $$ (continuous-v_tr_diff) @@ -209,7 +212,7 @@ All of the diffusion and forcing terms are written in more detail with the [Disc ## 4. Layered Equations -Omega-1 will be non-Boussinesq, which means that density is not assumed to be constant in any terms. This results in a mass conservation equation, rather than a volume conservation equation. The fully continuous equations were presented in the previous section. Here we derive the layered equations by discretizing in the vertical, while the horizontal remains continuous. We discretize by integrating in the vertical from the lower surface $z=z_k^{bot}(x,y)$ to $z=z_k^{top}(x,y)$ for the layer with index $k$, as described in [Ringler et al. 2013](https://www.sciencedirect.com/science/article/pii/S1463500313000760) Appendix A.2. Equivalently, we can vertically integrate from a deeper pressure surface $p=p_k^{bot}(x,y)$ (higher pressure) to $p=p_k^{top}(x,y)$ where $p$ and $z$ are related by the hydrostatic pressure equation [](#continuous-hydrostatic-pressure). +Here we derive the layered equations by discretizing in the vertical, while the horizontal remains continuous. We discretize by integrating in the vertical from the lower surface $z=z_k^{bot}(x,y)$ to $z=z_k^{top}(x,y)$ for the layer with index $k$, as described in [Ringler et al. 2013](https://www.sciencedirect.com/science/article/pii/S1463500313000760) Appendix A.2. Equivalently, we can vertically integrate from a deeper pressure surface $p=p_k^{bot}(x,y)$ (higher pressure) to $p=p_k^{top}(x,y)$ where $p$ and $z$ are related by the hydrostatic pressure equation [](#continuous-hydrostatic-pressure). ### Layer Integration @@ -227,7 +230,7 @@ h_k^{Bouss}(x,y,t) \equiv \int_{z_k^{bot}}^{z_k^{top}} dz. $$ (def-h-bouss) -In this document we remain with the more general non-Boussinesq case, where $h_k$ is mass per unit area (kg/m$^2$). Since horizontal cell area remains constant, the thickness equation is a statement of conservation of mass. +In this document we remain with the more general non-Boussinesq case, where $h_k$ is mass per unit area (kg/m$^2$). Since horizontal cell area remains constant in time, the thickness equation is a statement of conservation of mass. Throughout this derivation we can write all equations equivalently in $z$-coordinates (depth), or in $p$-coordinates (pressure). From the hydrostatic equation, any quantity $\varphi$ may be integrated in $z$ or $p$ as @@ -260,7 +263,8 @@ $$ \frac{\partial }{\partial t} \int_{z_k^{bot}}^{z_k^{top}} {\bf u} dz + \int_{z_k^{bot}}^{z_k^{top}} \left( \zeta + f \right){\bf u}^\perp dz + \int_{z_k^{bot}}^{z_k^{top}} \frac{\partial }{\partial z} \left( w{\bf u} \right) dz - = \int_{z_k^{bot}}^{z_k^{top}} \left[- \frac{1}{\rho}\nabla_z p - \nabla_z K + = \int_{z_k^{bot}}^{z_k^{top}} \left[- \frac{1}{\rho}\nabla_z p + - \nabla_z \Phi - \nabla_z K + {\bf D}^u + {\bf F}^u \right] dz $$ (z-integration-momentum) @@ -278,7 +282,7 @@ $$ = \int_{z_k^{bot}}^{z_k^{top}} \left( D^\varphi + Q^\varphi \right) dz $$ (z-integration-tracers) -This results in conservation equations that are valid over the layer. The momentum variables are simply vertically averaged. Tracer variables are vertically mass-averaged, as defined in [](def-mass-thickness-average). The subscript $k$ denotes a variable average over layer $k$. This system is now discrete in the vertical, but remains continuous in the horizontal and in time. +This results in conservation equations that are valid over the layer. The momentum variables are simply vertically averaged. Tracer variables are vertically mass-averaged, as defined in [](def-mass-thickness-average). We assume that variables such as ${\bf u}$, $\zeta$, and $K$ are constant in the vertical so that they may be taken out of the integral where products occur. The subscript $k$ denotes a variable average over layer $k$. This system is now discrete in the vertical, but remains continuous in the horizontal and in time. $$ \frac{\partial {\bf u}_k}{\partial t} @@ -287,6 +291,7 @@ $$ + \left[ w_k {\bf u}_k \right]^{top} - \left[ w_k {\bf u}_k \right]^{bot} = - \frac{1}{\rho} \nabla_z p_k +- \nabla_z \Phi - \nabla_z K_k + {\bf D}_k^u + {\bf F}_k^u $$ (layered-momentum-1) @@ -322,7 +327,7 @@ This states that the change in mass in the layer is the incoming mass from below ### General Vertical Coordinate -The vertical layer interfaces $(z_k^{bot}, z_k^{top})$ (or equivalently $(p_k^{bot}, p_k^{top})$) can vary as a function of $(x,y,t)$. Thus, these equations describe a general vertical coordinate, and these interface surfaces may be chosen arbitrarily by the user. See [Adcroft and Hallberg 2006](https://www.sciencedirect.com/science/article/pii/S1463500305000090) Section 2 and [Griffies et al](http://sciencedirect.com/science/article/pii/S1463500300000147) Section 2. It is convenient to introduce a new variable, the coordinate $r(x,y,z,t)$, where $r$ is constant at the middle of each layer. To be specific, we could design $r$ to be the layer index $k$ at the mid-depth of the layer. That is, define the mid-depth as +The vertical layer interfaces $(z_k^{bot}, z_k^{top})$ (or equivalently $(p_k^{bot}, p_k^{top})$) can vary as a function of $(x,y,t)$. Thus, these equations describe a general vertical coordinate, and these interface surfaces may be chosen arbitrarily by the user. See [Adcroft and Hallberg 2006](https://www.sciencedirect.com/science/article/pii/S1463500305000090) Section 2 and [Griffies et al (2000)](http://sciencedirect.com/science/article/pii/S1463500300000147) Section 2. It is convenient to introduce a new variable, the coordinate $r(x,y,z,t)$, where $r$ is constant at the middle of each layer. To be specific, we could design $r$ to be the layer index $k$ at the mid-depth of the layer. That is, define the mid-depth as $$ z_k^{mid}(x,y,t) = \frac{z_k^{bot}(x,y,t) + z_k^{top}(x,y,t)}{2} @@ -370,19 +375,32 @@ $$ \begin{aligned} -\frac{1}{\rho} \nabla_z p &=-\frac{1}{\rho} \nabla_r p +\frac{1}{\rho} \frac{\partial p}{\partial z} \nabla_r z \\ -&=-\frac{1}{\rho} \nabla_r p - g \nabla_r z \\ -&= - v \nabla_r p - \nabla_r \Phi, +&=-\frac{1}{\rho} \nabla_r p - g \nabla_r z \\ +&=-v \nabla_r p - \nabla_r \Phi_{gravity}\\ \end{aligned} $$ (gradp) -where we have substituted hydrostatic balance [](hydrostatic-balance) and specific volume $v\equiv 1/\rho$. The geopotential due to a constant gravitational field is $d \Phi/dz=g$, so that +where we have substituted hydrostatic balance [](hydrostatic-balance), specific volume $v\equiv 1/\rho$, and $\Phi_{gravity}=gz$. + +The general form of the geopotential may include the Earth's gravity, tidal forces, and self attraction and loading (SAL), and may be written as $$ -\Phi(x,y,z,t) = gz + \Phi_0(x,y,t) +\Phi = \Phi_{gravity} + \Phi_{tides} + \Phi_{SAL} + c $$ (def-geopotential) -where $\Phi_0(x,y,t)$ is constant in $z$ due to the integration. -Thus $\nabla_r \Phi = g \nabla_r z + \nabla_r \Phi_0$. The geopotential is a more general form than a constant gravitational force $g{\bf k}$, and allows for alterations in the gravitational field due to self attraction and loading and tidal forces, which are specified in $\Phi_0$. For versions 1.0 and 2.0 of Omega we only consider a constant gravitational force, and set $\Phi_0=0$. Further details will be provided in the forthcoming pressure gradient design document. +where $c$ is an arbitrary constant. Therefore, the pressure gradient and geopotential gradient may be written together as + +$$ +\begin{aligned} +-v \nabla_z p - \nabla_z \Phi +&= -v \nabla_z p - \nabla_z \Phi_{tides} - \nabla_z \Phi_{SAL}\\ +&=-v \nabla_r p - \nabla_r \Phi_{gravity} - \nabla_r \Phi_{tides} - \nabla_r \Phi_{SAL}\\ +&=-v \nabla_r p - \nabla_r \Phi. \\ +\end{aligned} +$$ (gradp-gradphi) + +On the first line, note that $\nabla_z \Phi_{gravity}=\nabla_z gz=0$. For tides and SAL we assume that these forces do not vary in the vertical due to the small aspect ratio of the ocean, so that the vertical derivative in the expansion [](dvarphidnabla) is zero. This means that $\nabla_z \Phi_{tides}=\nabla_r \Phi_{tides}$ and $\nabla_z \Phi_{SAL}=\nabla_r \Phi_{SAL}$. +For versions 1.0 and 2.0 of Omega we only consider a constant gravitational force, and will not include tides and SAL. Further details will be provided in the forthcoming pressure gradient design document. See [Adcroft and Hallberg 2006](https://www.sciencedirect.com/science/article/pii/S1463500305000090) eqn. 1 and [Griffies et al](http://sciencedirect.com/science/article/pii/S1463500300000147) eqn 2 for additional examples of the pressure gradient in tilted coordinates. The additional terms due to the expansion of $\nabla_z$ to $\nabla_r$ in the rest of the equations are small and are ignored. @@ -398,7 +416,7 @@ momentum: $$ \frac{\partial {\bf u}_k}{\partial t} + q_k h_k {\bf u}_k^{\perp} -+ \frac{\omega_k^{top}}{\rho_k^{top}} {\bf u}_k^{top} - \frac{\omega_k^{bot}}{\rho_k^{bot}}{\bf u}_k^{bot} ++ v_k^{top}\omega_k^{top} {\bf u}_k^{top} - v_k^{bot}\omega_k^{bot}{\bf u}_k^{bot} = - v_k \nabla_r p_k - \nabla_r \Phi_k - \nabla_r K_k @@ -436,7 +454,7 @@ $$ \frac{\partial u_{e,k}}{\partial t} + \left[ \frac{{\bf k} \cdot \nabla \times u_{e,k} +f_v}{[h_{i,k}]_v}\right]_e\left([h_{i,k}]_e u_{e,k}^{\perp}\right) + \left[ v_{i,k}^{top}\omega_{i,k}^{top} \right]_e u_{e,k}^{top} - \left[ v_{i,k+1}^{top}\omega_{i,k+1}^{top} \right]_e u_{e,k+1}^{top} = -- v_{i,k} \nabla p_{i,k} - \nabla \Phi_{i,k} +- \left[ v_{i,k} \right]_e \nabla p_{i,k} - \nabla \Phi_{i,k} - \nabla K_{i,k} + { \bf D}^u_{e,k} + {\bf F}^u_{e,k} $$ (discrete-momentum) From b4ae909eeb103757708af556c1f5044315e47d16 Mon Sep 17 00:00:00 2001 From: mark-petersen Date: Fri, 16 May 2025 12:23:08 -0700 Subject: [PATCH 07/65] Integrate rho u, results in hu momentum eqn --- .../omega/doc/design/OmegaV1GoverningEqns.md | 118 ++++++++++-------- 1 file changed, 63 insertions(+), 55 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 11a7456431ec..2971320586ea 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -53,7 +53,7 @@ $$ + \nabla_{3D} \cdot \left( \rho {\bf u}_{3D} \otimes {\bf u}_{3D} \right) = - \nabla_{3D} p - \rho \nabla_{3D} \Phi -+ \rho {\bf D}^u + \rho {\bf F}^u ++ \rho {\bf D}^u_{3D} + \rho {\bf F}^u_{3D} $$ (continuous-momentum) mass: @@ -74,40 +74,10 @@ $$ = D^\varphi + Q^\varphi $$ (continuous-tracer) -Here we have express the following terms as a general operators, with examples of specific forms provided below: the dissipation ${\bf D}^u$, momentum forcing ${\bf F}^u$, tracer diffusion $D^\varphi$, and tracer sources and sinks $Q^\varphi$. The graviational potential, $\Phi$, is written in a general form, and may include Earth's gravity, tidal forces, and self attraction and loading. The momentum equation can be rewritten using the product rule on $\rho {\bf u}$, mass conservation, and dividing by $\rho$, as: - -$$ -\frac{D {\bf u}_{3D} }{D t} \equiv -\frac{\partial {\bf u}_{3D}}{\partial t} -+ {\bf u}_{3D}\cdot \nabla_{3D} {\bf u}_{3D} - = - \frac{1}{\rho} \nabla_{3D} p - - \nabla_{3D} \Phi -+ {\bf D}^u + {\bf F}^u -$$ (continuous-momentum-rho) +Here we have express the following terms as a general operators, with examples of specific forms provided below: the dissipation ${\bf D}^u$, momentum forcing ${\bf F}^u$, tracer diffusion $D^\varphi$, and tracer sources and sinks $Q^\varphi$. The graviational potential, $\Phi$, is written in a general form, and may include Earth's gravity, tidal forces, and self attraction and loading. Geophysical fluids such as the ocean and atmosphere are rotating and stratified, and horizontal velocities are orders of magnitude larger than vertical velocities. It is therefore convenient to separate the horizontal and vertical as ${\bf u}_{3D} = \left( {\bf u}, w \right)$ and $\nabla_{3D} = \left( \nabla_z, d/dz \right)$ where $z$ is the vertical direction in a local Cartesian coordinate system aligned with gravity (approximately normal to Earth's surface), and $w$ is the vertical velocity. The $z$ subscript on $\nabla_z$ is to remind us that this is the true horizontal gradient (perpendicular to $z$), as opposed to gradients within tilted layers used in the following section. The Earth's gravitational force is included as $\Phi_{gravity} = gz $ so that $ \nabla_{3D} \Phi_{gravity} = g{\bf k}$. The rotating frame of reference results in the Coriolis force $f {\bf k} \times {\bf u} \equiv f {\bf u}^\perp$, where $f$ is the Coriolis parameter and ${\bf u}^\perp$ is the horizontal velocity vector rotated $90^\circ$ counterclockwise from $\bf u$ in the horizontal plane. See any textbook in the [References](#references) for a full derivation. -The advection term may be separated into horizontal and vertical parts as - -$$ -{\bf u}_{3D}\cdot \nabla_{3D} {\bf u}_{3D} -= -{\bf u} \cdot \nabla_z {\bf u} + w \frac{\partial {\bf u}}{\partial z}. -$$ (advection-3d2d) - -The horizontal component may be replaced with the vector identity - -$$ -\begin{aligned} -{\bf u} \cdot \nabla_z {\bf u} -&= (\nabla_z \times {\bf u}) \times {\bf u} + \nabla_z \frac{|{\bf u}|^2}{2} \\ -&= \left( \boldsymbol{k} \cdot (\nabla_z \times {\bf u})\right) -\left( \boldsymbol{k} \times {\bf u} \right) + \nabla_z \frac{|{\bf u}|^2}{2} \\ -&= \zeta {\bf u}^{\perp} + \nabla_z K, -\end{aligned} -$$ (advection-identity) - -where $\zeta$ is relative vorticity and $K$ is kinetic energy. This step separates the horizontal advection into non-divergent and non-rotational components, which is useful in the final TRiSK formulation. #### Assumptions @@ -116,9 +86,9 @@ For a primitive equation ocean model, we assume the fluid is hydrostatic. For Om **Hydrostatic:** Beginning with the vertical momentum equation, $$ -\frac{D w }{D t} +\frac{D \rho w }{D t} = - - \frac{1}{\rho} \frac{\partial p}{\partial z} - g + {\bf D}^u \cdot {\bf k} + {\bf F}^u \cdot {\bf k} + - \frac{\partial p}{\partial z} - \rho g + \rho {\bf k} \cdot {\bf D}^u_{3D} + \rho {\bf k} \cdot {\bf F}^u_{3D} $$ (continuous-vert-mom) assume that advection of vertical momentum $Dw/Dt$, dissipation, and forcing are small, and that the first order balance is between pressure gradient and buoyancy, @@ -152,13 +122,13 @@ The final form of the continuous conservation equations for a non-Boussinesq, hy momentum: $$ -\frac{\partial {\bf u}}{\partial t} -+ \zeta {\bf u}^\perp + f {\bf u}^\perp -+ w\frac{\partial {\bf u}}{\partial z} - = - \frac{1}{\rho} \nabla_z p - - \nabla_z \Phi - - \nabla_z K -+ {\bf D}^u + {\bf F}^u +\frac{\partial (\rho \mathbf{u})}{\partial t} ++ \nabla \cdot (\rho \mathbf{u} \otimes \mathbf{u}) ++ \partial_z (\rho \mathbf{u} w) ++ f \rho {\bf u}^\perp + = - \nabla_z p + - \rho\nabla_z \Phi ++ \rho{\bf D}^u + \rho{\bf F}^u $$ (continuous-momentum-final) mass: @@ -260,12 +230,14 @@ At this point our derivation has not made any assumptions about density, and may We can now derive the layered equations. Integrate the continuous equations [](continuous-momentum-final), [](continuous-mass-final), [](continuous-tracer-final) in $z$ from $z_k^{bot}$ to $z_k^{top}$, $$ -\frac{\partial }{\partial t} \int_{z_k^{bot}}^{z_k^{top}} {\bf u} dz -+ \int_{z_k^{bot}}^{z_k^{top}} \left( \zeta + f \right){\bf u}^\perp dz -+ \int_{z_k^{bot}}^{z_k^{top}} \frac{\partial }{\partial z} \left( w{\bf u} \right) dz - = \int_{z_k^{bot}}^{z_k^{top}} \left[- \frac{1}{\rho}\nabla_z p - - \nabla_z \Phi - \nabla_z K -+ {\bf D}^u + {\bf F}^u \right] dz +\frac{\partial }{\partial t} \int_{z_k^{bot}}^{z_k^{top}} \rho {\bf u} dz ++ \int_{z_k^{bot}}^{z_k^{top}} \nabla \cdot (\rho \mathbf{u} \otimes \mathbf{u}) dz ++ \int_{z_k^{bot}}^{z_k^{top}} \frac{\partial }{\partial z} \left( \rho w{\bf u} \right) dz ++ \int_{z_k^{bot}}^{z_k^{top}} + f \rho {\bf u}^\perp dz + = \int_{z_k^{bot}}^{z_k^{top}} \left[- \nabla_z p + - \rho \nabla_z \Phi - \rho \nabla_z K ++ \rho {\bf D}^u + \rho {\bf F}^u \right] dz $$ (z-integration-momentum) $$ @@ -285,15 +257,15 @@ $$ (z-integration-tracers) This results in conservation equations that are valid over the layer. The momentum variables are simply vertically averaged. Tracer variables are vertically mass-averaged, as defined in [](def-mass-thickness-average). We assume that variables such as ${\bf u}$, $\zeta$, and $K$ are constant in the vertical so that they may be taken out of the integral where products occur. The subscript $k$ denotes a variable average over layer $k$. This system is now discrete in the vertical, but remains continuous in the horizontal and in time. $$ -\frac{\partial {\bf u}_k}{\partial t} -+ \zeta_k {\bf u}_k^{\perp} -+ f {\bf u}_k^{\perp} -+ \left[ w_k {\bf u}_k \right]^{top} - \left[ w_k {\bf u}_k \right]^{bot} +\frac{\partial h_k {\bf u}_k}{\partial t} ++ \nabla_z \cdot (h_k \mathbf{u}_k \otimes \mathbf{u}_k) ++ \left[ h_k w_k {\bf u}_k \right]^{top} - \left[ h_k w_k {\bf u}_k \right]^{bot} ++ f h_k {\bf u}_k^{\perp} = -- \frac{1}{\rho} \nabla_z p_k -- \nabla_z \Phi -- \nabla_z K_k -+ {\bf D}_k^u + {\bf F}_k^u +- \nabla_z p_k +- h_k \nabla_z \Phi_k +- h_k \nabla_z K_k ++ h_k {\bf D}_k^u + h_k {\bf F}_k^u $$ (layered-momentum-1) $$ @@ -411,6 +383,42 @@ The integration in [](#z-integration-momentum) to [](#z-integration-tracers) cha ### Final Layered Equations +mrp temp: + +The momentum equation can be rewritten using the product rule on $\rho {\bf u}$, mass conservation, and dividing by $\rho$, as: + +$$ +\frac{D {\bf u}_{3D} }{D t} \equiv +\frac{\partial {\bf u}_{3D}}{\partial t} ++ {\bf u}_{3D}\cdot \nabla_{3D} {\bf u}_{3D} + = - \frac{1}{\rho} \nabla_{3D} p + - \nabla_{3D} \Phi ++ {\bf D}^u + {\bf F}^u +$$ (continuous-momentum-rho) + +mrp temp: + +The advection term may be separated into horizontal and vertical parts as + +$$ +{\bf u}_{3D}\cdot \nabla_{3D} {\bf u}_{3D} += +{\bf u} \cdot \nabla_z {\bf u} + w \frac{\partial {\bf u}}{\partial z}. +$$ (advection-3d2d) + +The horizontal component may be replaced with the vector identity + +$$ +\begin{aligned} +{\bf u} \cdot \nabla_z {\bf u} +&= (\nabla_z \times {\bf u}) \times {\bf u} + \nabla_z \frac{|{\bf u}|^2}{2} \\ +&= \left( \boldsymbol{k} \cdot (\nabla_z \times {\bf u})\right) +\left( \boldsymbol{k} \times {\bf u} \right) + \nabla_z \frac{|{\bf u}|^2}{2} \\ +&= \zeta {\bf u}^{\perp} + \nabla_z K, +\end{aligned} +$$ (advection-identity) + +where $\zeta$ is relative vorticity and $K$ is kinetic energy. This step separates the horizontal advection into non-divergent and non-rotational components, which is useful in the final TRiSK formulation. momentum: $$ From 8f76c00d4733830e1e60e1a5813e94cf1a072692 Mon Sep 17 00:00:00 2001 From: mark-petersen Date: Fri, 16 May 2025 12:23:13 -0700 Subject: [PATCH 08/65] Revert "Integrate rho u, results in hu momentum eqn" This reverts commit 83a024b0c48563f56d66870ac8ad5734181ba052. --- .../omega/doc/design/OmegaV1GoverningEqns.md | 118 ++++++++---------- 1 file changed, 55 insertions(+), 63 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 2971320586ea..11a7456431ec 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -53,7 +53,7 @@ $$ + \nabla_{3D} \cdot \left( \rho {\bf u}_{3D} \otimes {\bf u}_{3D} \right) = - \nabla_{3D} p - \rho \nabla_{3D} \Phi -+ \rho {\bf D}^u_{3D} + \rho {\bf F}^u_{3D} ++ \rho {\bf D}^u + \rho {\bf F}^u $$ (continuous-momentum) mass: @@ -74,10 +74,40 @@ $$ = D^\varphi + Q^\varphi $$ (continuous-tracer) -Here we have express the following terms as a general operators, with examples of specific forms provided below: the dissipation ${\bf D}^u$, momentum forcing ${\bf F}^u$, tracer diffusion $D^\varphi$, and tracer sources and sinks $Q^\varphi$. The graviational potential, $\Phi$, is written in a general form, and may include Earth's gravity, tidal forces, and self attraction and loading. +Here we have express the following terms as a general operators, with examples of specific forms provided below: the dissipation ${\bf D}^u$, momentum forcing ${\bf F}^u$, tracer diffusion $D^\varphi$, and tracer sources and sinks $Q^\varphi$. The graviational potential, $\Phi$, is written in a general form, and may include Earth's gravity, tidal forces, and self attraction and loading. The momentum equation can be rewritten using the product rule on $\rho {\bf u}$, mass conservation, and dividing by $\rho$, as: + +$$ +\frac{D {\bf u}_{3D} }{D t} \equiv +\frac{\partial {\bf u}_{3D}}{\partial t} ++ {\bf u}_{3D}\cdot \nabla_{3D} {\bf u}_{3D} + = - \frac{1}{\rho} \nabla_{3D} p + - \nabla_{3D} \Phi ++ {\bf D}^u + {\bf F}^u +$$ (continuous-momentum-rho) Geophysical fluids such as the ocean and atmosphere are rotating and stratified, and horizontal velocities are orders of magnitude larger than vertical velocities. It is therefore convenient to separate the horizontal and vertical as ${\bf u}_{3D} = \left( {\bf u}, w \right)$ and $\nabla_{3D} = \left( \nabla_z, d/dz \right)$ where $z$ is the vertical direction in a local Cartesian coordinate system aligned with gravity (approximately normal to Earth's surface), and $w$ is the vertical velocity. The $z$ subscript on $\nabla_z$ is to remind us that this is the true horizontal gradient (perpendicular to $z$), as opposed to gradients within tilted layers used in the following section. The Earth's gravitational force is included as $\Phi_{gravity} = gz $ so that $ \nabla_{3D} \Phi_{gravity} = g{\bf k}$. The rotating frame of reference results in the Coriolis force $f {\bf k} \times {\bf u} \equiv f {\bf u}^\perp$, where $f$ is the Coriolis parameter and ${\bf u}^\perp$ is the horizontal velocity vector rotated $90^\circ$ counterclockwise from $\bf u$ in the horizontal plane. See any textbook in the [References](#references) for a full derivation. +The advection term may be separated into horizontal and vertical parts as + +$$ +{\bf u}_{3D}\cdot \nabla_{3D} {\bf u}_{3D} += +{\bf u} \cdot \nabla_z {\bf u} + w \frac{\partial {\bf u}}{\partial z}. +$$ (advection-3d2d) + +The horizontal component may be replaced with the vector identity + +$$ +\begin{aligned} +{\bf u} \cdot \nabla_z {\bf u} +&= (\nabla_z \times {\bf u}) \times {\bf u} + \nabla_z \frac{|{\bf u}|^2}{2} \\ +&= \left( \boldsymbol{k} \cdot (\nabla_z \times {\bf u})\right) +\left( \boldsymbol{k} \times {\bf u} \right) + \nabla_z \frac{|{\bf u}|^2}{2} \\ +&= \zeta {\bf u}^{\perp} + \nabla_z K, +\end{aligned} +$$ (advection-identity) + +where $\zeta$ is relative vorticity and $K$ is kinetic energy. This step separates the horizontal advection into non-divergent and non-rotational components, which is useful in the final TRiSK formulation. #### Assumptions @@ -86,9 +116,9 @@ For a primitive equation ocean model, we assume the fluid is hydrostatic. For Om **Hydrostatic:** Beginning with the vertical momentum equation, $$ -\frac{D \rho w }{D t} +\frac{D w }{D t} = - - \frac{\partial p}{\partial z} - \rho g + \rho {\bf k} \cdot {\bf D}^u_{3D} + \rho {\bf k} \cdot {\bf F}^u_{3D} + - \frac{1}{\rho} \frac{\partial p}{\partial z} - g + {\bf D}^u \cdot {\bf k} + {\bf F}^u \cdot {\bf k} $$ (continuous-vert-mom) assume that advection of vertical momentum $Dw/Dt$, dissipation, and forcing are small, and that the first order balance is between pressure gradient and buoyancy, @@ -122,13 +152,13 @@ The final form of the continuous conservation equations for a non-Boussinesq, hy momentum: $$ -\frac{\partial (\rho \mathbf{u})}{\partial t} -+ \nabla \cdot (\rho \mathbf{u} \otimes \mathbf{u}) -+ \partial_z (\rho \mathbf{u} w) -+ f \rho {\bf u}^\perp - = - \nabla_z p - - \rho\nabla_z \Phi -+ \rho{\bf D}^u + \rho{\bf F}^u +\frac{\partial {\bf u}}{\partial t} ++ \zeta {\bf u}^\perp + f {\bf u}^\perp ++ w\frac{\partial {\bf u}}{\partial z} + = - \frac{1}{\rho} \nabla_z p + - \nabla_z \Phi + - \nabla_z K ++ {\bf D}^u + {\bf F}^u $$ (continuous-momentum-final) mass: @@ -230,14 +260,12 @@ At this point our derivation has not made any assumptions about density, and may We can now derive the layered equations. Integrate the continuous equations [](continuous-momentum-final), [](continuous-mass-final), [](continuous-tracer-final) in $z$ from $z_k^{bot}$ to $z_k^{top}$, $$ -\frac{\partial }{\partial t} \int_{z_k^{bot}}^{z_k^{top}} \rho {\bf u} dz -+ \int_{z_k^{bot}}^{z_k^{top}} \nabla \cdot (\rho \mathbf{u} \otimes \mathbf{u}) dz -+ \int_{z_k^{bot}}^{z_k^{top}} \frac{\partial }{\partial z} \left( \rho w{\bf u} \right) dz -+ \int_{z_k^{bot}}^{z_k^{top}} - f \rho {\bf u}^\perp dz - = \int_{z_k^{bot}}^{z_k^{top}} \left[- \nabla_z p - - \rho \nabla_z \Phi - \rho \nabla_z K -+ \rho {\bf D}^u + \rho {\bf F}^u \right] dz +\frac{\partial }{\partial t} \int_{z_k^{bot}}^{z_k^{top}} {\bf u} dz ++ \int_{z_k^{bot}}^{z_k^{top}} \left( \zeta + f \right){\bf u}^\perp dz ++ \int_{z_k^{bot}}^{z_k^{top}} \frac{\partial }{\partial z} \left( w{\bf u} \right) dz + = \int_{z_k^{bot}}^{z_k^{top}} \left[- \frac{1}{\rho}\nabla_z p + - \nabla_z \Phi - \nabla_z K ++ {\bf D}^u + {\bf F}^u \right] dz $$ (z-integration-momentum) $$ @@ -257,15 +285,15 @@ $$ (z-integration-tracers) This results in conservation equations that are valid over the layer. The momentum variables are simply vertically averaged. Tracer variables are vertically mass-averaged, as defined in [](def-mass-thickness-average). We assume that variables such as ${\bf u}$, $\zeta$, and $K$ are constant in the vertical so that they may be taken out of the integral where products occur. The subscript $k$ denotes a variable average over layer $k$. This system is now discrete in the vertical, but remains continuous in the horizontal and in time. $$ -\frac{\partial h_k {\bf u}_k}{\partial t} -+ \nabla_z \cdot (h_k \mathbf{u}_k \otimes \mathbf{u}_k) -+ \left[ h_k w_k {\bf u}_k \right]^{top} - \left[ h_k w_k {\bf u}_k \right]^{bot} -+ f h_k {\bf u}_k^{\perp} +\frac{\partial {\bf u}_k}{\partial t} ++ \zeta_k {\bf u}_k^{\perp} ++ f {\bf u}_k^{\perp} ++ \left[ w_k {\bf u}_k \right]^{top} - \left[ w_k {\bf u}_k \right]^{bot} = -- \nabla_z p_k -- h_k \nabla_z \Phi_k -- h_k \nabla_z K_k -+ h_k {\bf D}_k^u + h_k {\bf F}_k^u +- \frac{1}{\rho} \nabla_z p_k +- \nabla_z \Phi +- \nabla_z K_k ++ {\bf D}_k^u + {\bf F}_k^u $$ (layered-momentum-1) $$ @@ -383,42 +411,6 @@ The integration in [](#z-integration-momentum) to [](#z-integration-tracers) cha ### Final Layered Equations -mrp temp: - -The momentum equation can be rewritten using the product rule on $\rho {\bf u}$, mass conservation, and dividing by $\rho$, as: - -$$ -\frac{D {\bf u}_{3D} }{D t} \equiv -\frac{\partial {\bf u}_{3D}}{\partial t} -+ {\bf u}_{3D}\cdot \nabla_{3D} {\bf u}_{3D} - = - \frac{1}{\rho} \nabla_{3D} p - - \nabla_{3D} \Phi -+ {\bf D}^u + {\bf F}^u -$$ (continuous-momentum-rho) - -mrp temp: - -The advection term may be separated into horizontal and vertical parts as - -$$ -{\bf u}_{3D}\cdot \nabla_{3D} {\bf u}_{3D} -= -{\bf u} \cdot \nabla_z {\bf u} + w \frac{\partial {\bf u}}{\partial z}. -$$ (advection-3d2d) - -The horizontal component may be replaced with the vector identity - -$$ -\begin{aligned} -{\bf u} \cdot \nabla_z {\bf u} -&= (\nabla_z \times {\bf u}) \times {\bf u} + \nabla_z \frac{|{\bf u}|^2}{2} \\ -&= \left( \boldsymbol{k} \cdot (\nabla_z \times {\bf u})\right) -\left( \boldsymbol{k} \times {\bf u} \right) + \nabla_z \frac{|{\bf u}|^2}{2} \\ -&= \zeta {\bf u}^{\perp} + \nabla_z K, -\end{aligned} -$$ (advection-identity) - -where $\zeta$ is relative vorticity and $K$ is kinetic energy. This step separates the horizontal advection into non-divergent and non-rotational components, which is useful in the final TRiSK formulation. momentum: $$ From 07ddde3b52f2a133fbd3c47dbff2d2542d7bca03 Mon Sep 17 00:00:00 2001 From: mark-petersen Date: Fri, 16 May 2025 14:53:37 -0700 Subject: [PATCH 09/65] Simplified Mom Int with constant in layer --- .../omega/doc/design/OmegaV1GoverningEqns.md | 123 ++++++++++++------ 1 file changed, 82 insertions(+), 41 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 11a7456431ec..71054246c94e 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -74,28 +74,47 @@ $$ = D^\varphi + Q^\varphi $$ (continuous-tracer) -Here we have express the following terms as a general operators, with examples of specific forms provided below: the dissipation ${\bf D}^u$, momentum forcing ${\bf F}^u$, tracer diffusion $D^\varphi$, and tracer sources and sinks $Q^\varphi$. The graviational potential, $\Phi$, is written in a general form, and may include Earth's gravity, tidal forces, and self attraction and loading. The momentum equation can be rewritten using the product rule on $\rho {\bf u}$, mass conservation, and dividing by $\rho$, as: +Here we have express the following terms as a general operators, with examples of specific forms provided below: the dissipation ${\bf D}^u$, momentum forcing ${\bf F}^u$, tracer diffusion $D^\varphi$, and tracer sources and sinks $Q^\varphi$. The graviational potential, $\Phi$, is written in a general form, and may include Earth's gravity, tidal forces, and self attraction and loading. + +Geophysical fluids such as the ocean and atmosphere are rotating and stratified, and horizontal velocities are orders of magnitude larger than vertical velocities. It is therefore convenient to separate the horizontal and vertical as ${\bf u}_{3D} = \left( {\bf u}, w \right)$ and $\nabla_{3D} = \left( \nabla_z, d/dz \right)$ where $z$ is the vertical direction in a local Cartesian coordinate system aligned with gravity (approximately normal to Earth's surface), and $w$ is the vertical velocity. The $z$ subscript on $\nabla_z$ is to remind us that this is the true horizontal gradient (perpendicular to $z$), as opposed to gradients within tilted layers used in the following section. The Earth's gravitational force is included as $\Phi_{gravity} = gz $ so that $ \nabla_{3D} \Phi_{gravity} = g{\bf k}$. The rotating frame of reference results in the Coriolis force $f {\bf k} \times {\bf u} \equiv f {\bf u}^\perp$, where $f$ is the Coriolis parameter and ${\bf u}^\perp$ is the horizontal velocity vector rotated $90^\circ$ counterclockwise from $\bf u$ in the horizontal plane. See any textbook in the [References](#references) for a full derivation. + +#### Advection + +The momentum equation may be rewritten using the product rule on the material derivative, + +$$ +\frac{D \rho {\bf u}_{3D} }{D t} = +\rho \frac{D {\bf u}_{3D} }{D t} + +{\bf u}_{3D}\frac{D \rho }{D t}. +$$ (material-der-product-rule) + +The second term is zero by conservation of mass [](continuous-mass). Dividing by $\rho$, the momentum equation is $$ -\frac{D {\bf u}_{3D} }{D t} \equiv \frac{\partial {\bf u}_{3D}}{\partial t} -+ {\bf u}_{3D}\cdot \nabla_{3D} {\bf u}_{3D} ++ \nabla_{3D} \cdot \left( {\bf u}_{3D} \otimes {\bf u}_{3D} \right) = - \frac{1}{\rho} \nabla_{3D} p - \nabla_{3D} \Phi -+ {\bf D}^u + {\bf F}^u ++ {\bf D}^u_{3D} + {\bf F}^u_{3D}. $$ (continuous-momentum-rho) -Geophysical fluids such as the ocean and atmosphere are rotating and stratified, and horizontal velocities are orders of magnitude larger than vertical velocities. It is therefore convenient to separate the horizontal and vertical as ${\bf u}_{3D} = \left( {\bf u}, w \right)$ and $\nabla_{3D} = \left( \nabla_z, d/dz \right)$ where $z$ is the vertical direction in a local Cartesian coordinate system aligned with gravity (approximately normal to Earth's surface), and $w$ is the vertical velocity. The $z$ subscript on $\nabla_z$ is to remind us that this is the true horizontal gradient (perpendicular to $z$), as opposed to gradients within tilted layers used in the following section. The Earth's gravitational force is included as $\Phi_{gravity} = gz $ so that $ \nabla_{3D} \Phi_{gravity} = g{\bf k}$. The rotating frame of reference results in the Coriolis force $f {\bf k} \times {\bf u} \equiv f {\bf u}^\perp$, where $f$ is the Coriolis parameter and ${\bf u}^\perp$ is the horizontal velocity vector rotated $90^\circ$ counterclockwise from $\bf u$ in the horizontal plane. See any textbook in the [References](#references) for a full derivation. +The advection term may be written equivalently as + +$$ +\nabla_{3D} \cdot \left( {\bf u}_{3D} \otimes {\bf u}_{3D} \right) += +{\bf u}_{3D}\cdot \nabla_{3D} {\bf u}_{3D}. +$$ (advection-3d) -The advection term may be separated into horizontal and vertical parts as +Taking only the advection terms in the horizontal components of the momentum equation and then separating them into horizontal and vertical parts, $$ -{\bf u}_{3D}\cdot \nabla_{3D} {\bf u}_{3D} +{\bf u}_{3D}\cdot \nabla_{3D} {\bf u} = {\bf u} \cdot \nabla_z {\bf u} + w \frac{\partial {\bf u}}{\partial z}. $$ (advection-3d2d) -The horizontal component may be replaced with the vector identity +The horizontal portion may be replaced with the vector identity $$ \begin{aligned} @@ -109,16 +128,14 @@ $$ (advection-identity) where $\zeta$ is relative vorticity and $K$ is kinetic energy. This step separates the horizontal advection into non-divergent and non-rotational components, which is useful in the final TRiSK formulation. -#### Assumptions +#### Hydrostatic Assumption -For a primitive equation ocean model, we assume the fluid is hydrostatic. For Omega we are not making the Boussinesq assumption, so all density-dependent terms use the full density. In particular, the density coefficient of the pressure gradient in [](#continuous-momentum) is not a constant, as it is in primitive equation models like POP and MPAS-Ocean. - -**Hydrostatic:** Beginning with the vertical momentum equation, +For a primitive equation ocean model, we assume the fluid is hydrostatic. For Omega we are not making the Boussinesq assumption, so all density-dependent terms use the full density. In particular, the density coefficient of the pressure gradient in [](#continuous-momentum) is not a constant, as it is in primitive equation models like POP and MPAS-Ocean. Beginning with the vertical momentum equation, $$ \frac{D w }{D t} = - - \frac{1}{\rho} \frac{\partial p}{\partial z} - g + {\bf D}^u \cdot {\bf k} + {\bf F}^u \cdot {\bf k} + - \frac{1}{\rho} \frac{\partial p}{\partial z} - g + {\bf k} \cdot {\bf D}^u + {\bf k} \cdot {\bf F}^u, $$ (continuous-vert-mom) assume that advection of vertical momentum $Dw/Dt$, dissipation, and forcing are small, and that the first order balance is between pressure gradient and buoyancy, @@ -136,10 +153,10 @@ $$ (continuous-hydrostatic-pressure) The constitutive equation is the equation of state, $$ -\rho = f_{eos}(p,\Theta,S). +v = f_{eos}(p,\Theta,S), $$ (continuous-eos) -where conservative temperature, $\Theta$, and absolute salinity, $S$, are examples of tracers $\varphi$. +where conservative temperature, $\Theta$, and absolute salinity, $S$, are examples of tracers $\varphi$. We use specific volume $v\equiv 1/\rho$ to avoid divisions in the final equations. The Boussinesq primitive equations also make an incompressibility assumption, which is identical to an assumption of constant density. Non-Boussinesq models do not make that assumption and are not explicitly incompressible. However, the mass conservation equation [](continuous-mass), along with an equation of state for sea water where density only varies slightly, results in a fluid that is nearly incompressible. @@ -147,7 +164,7 @@ A concern when using the full, compressible continuity equation is that this mig #### Final Continuous Equations -The final form of the continuous conservation equations for a non-Boussinesq, hydrostatic ocean are +Putting the previous sections together, the final form of the continuous conservation equations for a non-Boussinesq, hydrostatic ocean are momentum: @@ -155,7 +172,7 @@ $$ \frac{\partial {\bf u}}{\partial t} + \zeta {\bf u}^\perp + f {\bf u}^\perp + w\frac{\partial {\bf u}}{\partial z} - = - \frac{1}{\rho} \nabla_z p + = - v \nabla_z p - \nabla_z \Phi - \nabla_z K + {\bf D}^u + {\bf F}^u @@ -182,7 +199,7 @@ $$ (continuous-tracer-final) equation of state: $$ -\rho = f_{eos}(p,\Theta,S). +v = f_{eos}(p,\Theta,S) $$ (continuous-eos-final) hydrostatic pressure: @@ -210,11 +227,13 @@ $$ (continuous-v_tr_diff) and may also include a biharmonic (del4) term and parameterizations such as Redi mixing. Sources and sinks include surface fluxes from the atmosphere and land, and bio-geo-chemical reactions. All of the diffusion and forcing terms are written in more detail with the [Discrete Equations](#discrete-equations) below. -## 4. Layered Equations +## 4. Vertical Discretization + +Here we derive the layered equations by discretizing in the vertical, while the horizontal remains continuous. First, we select lower and upper surfaces $z=z_k^{bot}(x,y,t)$ and $z=z_k^{top}(x,y,t)$ for each layer $k$. The momentum equation is discretized with standard finite volume methods. We discretize the mass and tracer equations by integrating in the vertical from $z=z_k^{bot}$ to $z=z_k^{top}$, as described in [Ringler et al. 2013](https://www.sciencedirect.com/science/article/pii/S1463500313000760) Appendix A.2. + -Here we derive the layered equations by discretizing in the vertical, while the horizontal remains continuous. We discretize by integrating in the vertical from the lower surface $z=z_k^{bot}(x,y)$ to $z=z_k^{top}(x,y)$ for the layer with index $k$, as described in [Ringler et al. 2013](https://www.sciencedirect.com/science/article/pii/S1463500313000760) Appendix A.2. Equivalently, we can vertically integrate from a deeper pressure surface $p=p_k^{bot}(x,y)$ (higher pressure) to $p=p_k^{top}(x,y)$ where $p$ and $z$ are related by the hydrostatic pressure equation [](#continuous-hydrostatic-pressure). -### Layer Integration +### Layered Equations For non-Boussinesq layered equations we begin by defining the mass-thickness of layer $k$ as @@ -252,9 +271,10 @@ For any three-dimensional quantity $\varphi(x,y,z,t)$, the mass-thickness-averag $$ \varphi_k(x,y,t) \equiv \frac{\int_{z_k^{bot}}^{z_k^{top}} \rho \varphi dz}{\int_{z_k^{bot}}^{z_k^{top}} \rho dz} -= \frac{\int_{z_k^{bot}}^{z_k^{top}} \rho \varphi dz}{h_k} += \frac{\int_{z_k^{bot}}^{z_k^{top}} \rho \varphi dz}{h_k}. $$(def-mass-thickness-average) + At this point our derivation has not made any assumptions about density, and may be used for both Boussinesq and non-Boussinesq fluids. A Boussinesq derivation would now assume small variations in density and replace $\rho(x,y,z,t)$ with a constant $\rho_0$ everywhere but the pressure gradient coefficient. In that case $\rho$ divides out in [](#def-mass-thickness-average) the Boussinesq layer quantities would simply be thickness-weighted averages. We can now derive the layered equations. Integrate the continuous equations [](continuous-momentum-final), [](continuous-mass-final), [](continuous-tracer-final) in $z$ from $z_k^{bot}$ to $z_k^{top}$, @@ -263,7 +283,7 @@ $$ \frac{\partial }{\partial t} \int_{z_k^{bot}}^{z_k^{top}} {\bf u} dz + \int_{z_k^{bot}}^{z_k^{top}} \left( \zeta + f \right){\bf u}^\perp dz + \int_{z_k^{bot}}^{z_k^{top}} \frac{\partial }{\partial z} \left( w{\bf u} \right) dz - = \int_{z_k^{bot}}^{z_k^{top}} \left[- \frac{1}{\rho}\nabla_z p + = \int_{z_k^{bot}}^{z_k^{top}} \left[- v \nabla_z p - \nabla_z \Phi - \nabla_z K + {\bf D}^u + {\bf F}^u \right] dz $$ (z-integration-momentum) @@ -282,22 +302,43 @@ $$ = \int_{z_k^{bot}}^{z_k^{top}} \left( D^\varphi + Q^\varphi \right) dz $$ (z-integration-tracers) -This results in conservation equations that are valid over the layer. The momentum variables are simply vertically averaged. Tracer variables are vertically mass-averaged, as defined in [](def-mass-thickness-average). We assume that variables such as ${\bf u}$, $\zeta$, and $K$ are constant in the vertical so that they may be taken out of the integral where products occur. The subscript $k$ denotes a variable average over layer $k$. This system is now discrete in the vertical, but remains continuous in the horizontal and in time. +This results in conservation equations that are valid over the layer. The momentum variables are simply vertically averaged. Tracer variables are vertically mass-averaged, as defined in [](def-mass-thickness-average). + +In order to deal with nonlinear terms where we take the integrals of products, we may assume that the variables are piecewise constant in the vertical within each layer, i.e. + +$$ +a(x,y,z,t) = a_k(x,y,t) \in [z_k^{bot}, z_k^{top}). +$$ (discrete-a) + +Then variables may come out of the integral as needed. For example, + +$$ +\int_{z_k^{bot}}^{z_k^{top}} \zeta {\bf u}^\perp dz +&= \int_{z_k^{bot}}^{z_k^{top}} \zeta_k {\bf u}^\perp_k dz \\ +&= \zeta_k {\bf u}^\perp_k \int_{z_k^{bot}}^{z_k^{top}} dz \\ +&= \zeta_k {\bf u}^\perp_k \Delta z_k, +$$ (nonlinear-z) + +where $\Delta z_k\equiv z_k^{top}-z_k^{bot}$. In the momentum equation this results in a $\Delta z_k$ factor in every term except vertical advection, which is divided out. + +Our governing equations are now discrete in the vertical, but remain continuous in the horizontal and in time. $$ \frac{\partial {\bf u}_k}{\partial t} + \zeta_k {\bf u}_k^{\perp} + f {\bf u}_k^{\perp} -+ \left[ w_k {\bf u}_k \right]^{top} - \left[ w_k {\bf u}_k \right]^{bot} ++ \frac{\left[ w_k {\bf u}_k \right]^{top} - \left[ w_k {\bf u}_k\right]^{bot}}{\Delta z_k} = -- \frac{1}{\rho} \nabla_z p_k -- \nabla_z \Phi +- v_k \nabla_z p_k +- \nabla_z \Phi_k - \nabla_z K_k + {\bf D}_k^u + {\bf F}_k^u $$ (layered-momentum-1) $$ -\frac{\partial h_k}{\partial t} + \nabla_z \cdot \left(h_k {\bf u}_k\right) + \left[ \rho_k w_k \right]^{top} - \left[ \rho_k w_k \right]^{bot}= Q^h_k +\frac{\partial h_k}{\partial t} ++ \nabla_z \cdot \left(h_k {\bf u}_k\right) ++ \left[ \rho_k w_k \right]^{top} - \left[ \rho_k w_k \right]^{bot}= Q^h_k $$ (layered-mass-1) $$ @@ -319,12 +360,6 @@ $$ (layered-mass-vert-adv) This states that the change in mass in the layer is the incoming mass from below minus the outgoing mass above, since the vertical velocity $w$ is positive upwards. The vertical advection of momentum and tracers have a similar interpretation. -### Questions - -1. How do integrals in [](#z-integration-momentum) to [](#z-integration-tracers) turn into the layered form [](layered-momentum-1) to [](layered-tracer-1) when there are products in the terms? For example, $\zeta_k {\bf u}^\perp_k$, $\nabla K$ and $\rho \varphi {\bf u}$. -1. Using the definition of the layer average, the momentum equation [](layered-momentum-1) should also be thickness-weighted. Perhaps that goes away with conservation of mass? -1. How do I justify changing from $\nabla_z$ to $\nabla_r$ for terms other than the pressure gradient? Particularly $\nabla K$? - ### General Vertical Coordinate The vertical layer interfaces $(z_k^{bot}, z_k^{top})$ (or equivalently $(p_k^{bot}, p_k^{top})$) can vary as a function of $(x,y,t)$. Thus, these equations describe a general vertical coordinate, and these interface surfaces may be chosen arbitrarily by the user. See [Adcroft and Hallberg 2006](https://www.sciencedirect.com/science/article/pii/S1463500305000090) Section 2 and [Griffies et al (2000)](http://sciencedirect.com/science/article/pii/S1463500300000147) Section 2. It is convenient to introduce a new variable, the coordinate $r(x,y,z,t)$, where $r$ is constant at the middle of each layer. To be specific, we could design $r$ to be the layer index $k$ at the mid-depth of the layer. That is, define the mid-depth as @@ -400,9 +435,15 @@ $$ $$ (gradp-gradphi) On the first line, note that $\nabla_z \Phi_{gravity}=\nabla_z gz=0$. For tides and SAL we assume that these forces do not vary in the vertical due to the small aspect ratio of the ocean, so that the vertical derivative in the expansion [](dvarphidnabla) is zero. This means that $\nabla_z \Phi_{tides}=\nabla_r \Phi_{tides}$ and $\nabla_z \Phi_{SAL}=\nabla_r \Phi_{SAL}$. -For versions 1.0 and 2.0 of Omega we only consider a constant gravitational force, and will not include tides and SAL. Further details will be provided in the forthcoming pressure gradient design document. +For versions 1.0 and 2.0 of Omega we only consider a constant gravitational force, and will not include tides and SAL. Further details will be provided in the forthcoming pressure gradient design document. See [Adcroft and Hallberg 2006](https://www.sciencedirect.com/science/article/pii/S1463500305000090) eqn. 1 and [Griffies et al](http://sciencedirect.com/science/article/pii/S1463500300000147) eqn 2 for additional examples of the pressure gradient in tilted coordinates. + +In all other terms with horizontal operators we make the approximation that the within-layer operator is the same as the horizontal operator. For example, for the kinetic energy gradient + +$$ +\nabla_z K = \nabla_r K - \frac{\partial K}{\partial z} \nabla_r z +$$ (gradk) -See [Adcroft and Hallberg 2006](https://www.sciencedirect.com/science/article/pii/S1463500305000090) eqn. 1 and [Griffies et al](http://sciencedirect.com/science/article/pii/S1463500300000147) eqn 2 for additional examples of the pressure gradient in tilted coordinates. The additional terms due to the expansion of $\nabla_z$ to $\nabla_r$ in the rest of the equations are small and are ignored. +we assume that the second term is small so that $\nabla_z K = \nabla_r K$. Some publications state that the transition from Boussinesq to non-Boussinesq equations is accompanied by a change from z-coordinate to pressure-coordinates. However, we use a general vertical coordinate, so the vertical may be referenced to $z$ or $p$. In a purely z-coordinate model like POP, only the $\nabla p$ term is used in [](gradp). In a purely p-coordinate model, only $\nabla z$ remains, as described in [de Szoeke and Samelson 2002](https://journals.ametsoc.org/view/journals/phoc/32/7/1520-0485_2002_032_2194_tdbtba_2.0.co_2.xml). In a general vertical coordinate model the layer interface placement is up to the user's specification, and so both terms are kept. @@ -416,7 +457,7 @@ momentum: $$ \frac{\partial {\bf u}_k}{\partial t} + q_k h_k {\bf u}_k^{\perp} -+ v_k^{top}\omega_k^{top} {\bf u}_k^{top} - v_k^{bot}\omega_k^{bot}{\bf u}_k^{bot} ++ \frac{v_k^{top}\omega_k^{top} {\bf u}_k^{top} - v_k^{bot}\omega_k^{bot}{\bf u}_k^{bot}}{v_k h_k} = - v_k \nabla_r p_k - \nabla_r \Phi_k - \nabla_r K_k @@ -446,13 +487,14 @@ $$ (potential-vort-adv) Surface fluxes $Q^h_k$ have been added to the mass equation for precipitation, evaporation, and river runoff. These fluxes, like mass transport $\omega$, are in units of kg/s/m$^2$. -## 5. Discrete Equations +## 5. Horizontal Discretization The horizontally discretized layered equations are as follows. We have dropped the $r$ in $\nabla_r$ for conciseness, and the operator $\nabla$ from here on means within-layer. $$ \frac{\partial u_{e,k}}{\partial t} + \left[ \frac{{\bf k} \cdot \nabla \times u_{e,k} +f_v}{[h_{i,k}]_v}\right]_e\left([h_{i,k}]_e u_{e,k}^{\perp}\right) -+ \left[ v_{i,k}^{top}\omega_{i,k}^{top} \right]_e u_{e,k}^{top} - \left[ v_{i,k+1}^{top}\omega_{i,k+1}^{top} \right]_e u_{e,k+1}^{top} ++ \frac{\left[ v_{i,k}^{top}\omega_{i,k}^{top} \right]_e u_{e,k}^{top} - \left[ v_{i,k+1}^{top}\omega_{i,k+1}^{top} \right]_e u_{e,k+1}^{top}} + {\left[v_{i,k}h_{i,k}\right]_e} = - \left[ v_{i,k} \right]_e \nabla p_{i,k} - \nabla \Phi_{i,k} - \nabla K_{i,k} + { \bf D}^u_{e,k} + {\bf F}^u_{e,k} @@ -654,8 +696,7 @@ $$ + \frac{1}{2}\nabla \left| {\bf u}_k \right|^2 + ( {\bf k} \cdot \nabla \times {\bf u}_k) {\bf u}^\perp_k + f{\bf u}^{\perp}_k -+ w_k^{bot}{\bf u}_k^{bot} -- w_k^{top}{\bf u}_k^{top} = ++ w \frac{d{\bf u}_k}{dz} = - \frac{1}{\rho_0}\nabla p_k - \frac{\rho g}{\rho_0}\nabla z^{mid}_k + \nu_h\nabla^2{\bf u}_k From 1ba7ebddf93dd3c5e7da41032897b3a4eaa3ee43 Mon Sep 17 00:00:00 2001 From: mark-petersen Date: Wed, 21 May 2025 20:49:39 -0700 Subject: [PATCH 10/65] change back to layered version, with all terms --- .../omega/doc/design/OmegaV1GoverningEqns.md | 246 ++++++++++-------- 1 file changed, 142 insertions(+), 104 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 71054246c94e..783436d638a7 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -53,7 +53,7 @@ $$ + \nabla_{3D} \cdot \left( \rho {\bf u}_{3D} \otimes {\bf u}_{3D} \right) = - \nabla_{3D} p - \rho \nabla_{3D} \Phi -+ \rho {\bf D}^u + \rho {\bf F}^u ++ \rho {\bf D}^u_{3D} + \rho {\bf F}^u_{3D} $$ (continuous-momentum) mass: @@ -78,64 +78,17 @@ Here we have express the following terms as a general operators, with examples o Geophysical fluids such as the ocean and atmosphere are rotating and stratified, and horizontal velocities are orders of magnitude larger than vertical velocities. It is therefore convenient to separate the horizontal and vertical as ${\bf u}_{3D} = \left( {\bf u}, w \right)$ and $\nabla_{3D} = \left( \nabla_z, d/dz \right)$ where $z$ is the vertical direction in a local Cartesian coordinate system aligned with gravity (approximately normal to Earth's surface), and $w$ is the vertical velocity. The $z$ subscript on $\nabla_z$ is to remind us that this is the true horizontal gradient (perpendicular to $z$), as opposed to gradients within tilted layers used in the following section. The Earth's gravitational force is included as $\Phi_{gravity} = gz $ so that $ \nabla_{3D} \Phi_{gravity} = g{\bf k}$. The rotating frame of reference results in the Coriolis force $f {\bf k} \times {\bf u} \equiv f {\bf u}^\perp$, where $f$ is the Coriolis parameter and ${\bf u}^\perp$ is the horizontal velocity vector rotated $90^\circ$ counterclockwise from $\bf u$ in the horizontal plane. See any textbook in the [References](#references) for a full derivation. -#### Advection -The momentum equation may be rewritten using the product rule on the material derivative, +#### Assumptions -$$ -\frac{D \rho {\bf u}_{3D} }{D t} = -\rho \frac{D {\bf u}_{3D} }{D t} + -{\bf u}_{3D}\frac{D \rho }{D t}. -$$ (material-der-product-rule) - -The second term is zero by conservation of mass [](continuous-mass). Dividing by $\rho$, the momentum equation is - -$$ -\frac{\partial {\bf u}_{3D}}{\partial t} -+ \nabla_{3D} \cdot \left( {\bf u}_{3D} \otimes {\bf u}_{3D} \right) - = - \frac{1}{\rho} \nabla_{3D} p - - \nabla_{3D} \Phi -+ {\bf D}^u_{3D} + {\bf F}^u_{3D}. -$$ (continuous-momentum-rho) - -The advection term may be written equivalently as - -$$ -\nabla_{3D} \cdot \left( {\bf u}_{3D} \otimes {\bf u}_{3D} \right) -= -{\bf u}_{3D}\cdot \nabla_{3D} {\bf u}_{3D}. -$$ (advection-3d) - -Taking only the advection terms in the horizontal components of the momentum equation and then separating them into horizontal and vertical parts, - -$$ -{\bf u}_{3D}\cdot \nabla_{3D} {\bf u} -= -{\bf u} \cdot \nabla_z {\bf u} + w \frac{\partial {\bf u}}{\partial z}. -$$ (advection-3d2d) - -The horizontal portion may be replaced with the vector identity - -$$ -\begin{aligned} -{\bf u} \cdot \nabla_z {\bf u} -&= (\nabla_z \times {\bf u}) \times {\bf u} + \nabla_z \frac{|{\bf u}|^2}{2} \\ -&= \left( \boldsymbol{k} \cdot (\nabla_z \times {\bf u})\right) -\left( \boldsymbol{k} \times {\bf u} \right) + \nabla_z \frac{|{\bf u}|^2}{2} \\ -&= \zeta {\bf u}^{\perp} + \nabla_z K, -\end{aligned} -$$ (advection-identity) - -where $\zeta$ is relative vorticity and $K$ is kinetic energy. This step separates the horizontal advection into non-divergent and non-rotational components, which is useful in the final TRiSK formulation. - -#### Hydrostatic Assumption +For a primitive equation ocean model, we assume the fluid is hydrostatic. For Omega we are not making the Boussinesq assumption, so all density-dependent terms use the full density. In particular, the density coefficient of the pressure gradient in [](#continuous-momentum) is not a constant, as it is in primitive equation models like POP and MPAS-Ocean. -For a primitive equation ocean model, we assume the fluid is hydrostatic. For Omega we are not making the Boussinesq assumption, so all density-dependent terms use the full density. In particular, the density coefficient of the pressure gradient in [](#continuous-momentum) is not a constant, as it is in primitive equation models like POP and MPAS-Ocean. Beginning with the vertical momentum equation, +**Hydrostatic:** Beginning with the vertical momentum equation, $$ -\frac{D w }{D t} +\frac{D \rho w }{D t} = - - \frac{1}{\rho} \frac{\partial p}{\partial z} - g + {\bf k} \cdot {\bf D}^u + {\bf k} \cdot {\bf F}^u, + - \frac{\partial p}{\partial z} - \rho g + \rho {\bf k} \cdot {\bf D}^u_{3D} + \rho {\bf k} \cdot {\bf F}^u_{3D} $$ (continuous-vert-mom) assume that advection of vertical momentum $Dw/Dt$, dissipation, and forcing are small, and that the first order balance is between pressure gradient and buoyancy, @@ -153,29 +106,79 @@ $$ (continuous-hydrostatic-pressure) The constitutive equation is the equation of state, $$ -v = f_{eos}(p,\Theta,S), +\rho = f_{eos}(p,\Theta,S). $$ (continuous-eos) -where conservative temperature, $\Theta$, and absolute salinity, $S$, are examples of tracers $\varphi$. We use specific volume $v\equiv 1/\rho$ to avoid divisions in the final equations. +where conservative temperature, $\Theta$, and absolute salinity, $S$, are examples of tracers $\varphi$. The Boussinesq primitive equations also make an incompressibility assumption, which is identical to an assumption of constant density. Non-Boussinesq models do not make that assumption and are not explicitly incompressible. However, the mass conservation equation [](continuous-mass), along with an equation of state for sea water where density only varies slightly, results in a fluid that is nearly incompressible. A concern when using the full, compressible continuity equation is that this might support acoustic waves with wave speeds on the order of 1500 m/s, requiring an extremely small time step. According to [Griffies and Adcroft (2008)](https://agupubs.onlinelibrary.wiley.com/doi/10.1029/177GM18) and [de Szoeke and Samelson (2002)](https://doi.org/10.1175/1520-0485(2002)032%3C2194:TDBTBA%3E2.0.CO;2), the hydrostatic approximation removes vertical sound waves, leaving only barotropic acoustic modes called Lamb waves. Fortunately, the Lamb waves can be "subsumed" into the external gravity mode because the scale height of the ocean is much larger (200 km) than its depth (~5 km). This suggests that Lamb waves should not produce any additional constraints on our barotropic time step (though we should keep an eye on this). For more details on Lamb waves, see [Dukowicz (2013)](https://doi.org/10.1175/MWR-D-13-00148.1) +#### Momentum Advection + +Here we expand the momentum advection in continuous form. This will be a useful reference when we expand the layered version in a later section. The momentum advection, + +$$ +\nabla_{3D} \cdot \left( \rho {\bf u}_{3D} \otimes {\bf u}_{3D} \right) + = \nabla_{3D} \cdot \left( \rho {\bf u}_{3D} {\bf u}_{3D}^T \right), +$$ (advection) + +may be written out fully as the three $(x,y,z)$ cartesian components coordinates as + +$$ +&\partial_x \left( \rho u u\right) + \partial_y \left( \rho v u\right) + \partial_z \left( \rho w u\right) \\ +&\partial_x \left( \rho u v\right) + \partial_y \left( \rho v v\right) + \partial_z \left( \rho w v\right) \\ +&\partial_x \left( \rho u w\right) + \partial_y \left( \rho v w\right) + \partial_z \left( \rho w w\right) . +$$ (advection-written-out) + +The third line is the vertical component, and was assumed to be small in the previous section. The first two lines are the horizontal components may be written as + +$$ +\nabla_z \cdot \left( \rho {\bf u} \otimes {\bf u} \right) + \partial_z \left( \rho w {\bf u}\right) +$$ (adv2d) + +where ${\bf u} = (u,v)$ is the horizontal velocity vector and $\nabla_z=(\partial_x,\partial_y)$ is the horizontal gradient, and the tensor product ${\bf u} \otimes {\bf u}={\bf u} {\bf u}^T$. Using the product rule, this can be expanded as + +$$ +\nabla_z \cdot \left( \rho {\bf u} \otimes {\bf u} \right) + \partial_z \left( \rho w {\bf u}\right) +&= \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} ++ {\bf u} \cdot \nabla_z \left( \rho {\bf u} \right) ++ \partial_z \left( \rho w {\bf u}\right) \\ +&= \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} ++ \left( {\bf u} \cdot \nabla_z \rho \right) {\bf u} ++ \left( {\bf u} \cdot \nabla_z {\bf u} \right) \rho ++ \partial_z \left( \rho w {\bf u}\right) +$$ (adv2d-prod) + +The term ${\bf u} \cdot \nabla_z {\bf u}$ may be replaced with the vector identity + +$$ +\begin{aligned} +{\bf u} \cdot \nabla_z {\bf u} +&= (\nabla_z \times {\bf u}) \times {\bf u} + \nabla_z \frac{|{\bf u}|^2}{2} \\ +&= \left( \boldsymbol{k} \cdot (\nabla_z \times {\bf u})\right) +\left( \boldsymbol{k} \times {\bf u} \right) + \nabla_z \frac{|{\bf u}|^2}{2} \\ +&= \zeta {\bf u}^{\perp} + \nabla_z K, +\end{aligned} +$$ (advection-identity) + +where $\zeta$ is relative vorticity and $K$ is kinetic energy. This step separates the horizontal advection into non-divergent and non-rotational components, which is useful in the final TRiSK formulation. + #### Final Continuous Equations -Putting the previous sections together, the final form of the continuous conservation equations for a non-Boussinesq, hydrostatic ocean are +The final form of the continuous conservation equations for a non-Boussinesq, hydrostatic ocean are momentum: $$ -\frac{\partial {\bf u}}{\partial t} -+ \zeta {\bf u}^\perp + f {\bf u}^\perp -+ w\frac{\partial {\bf u}}{\partial z} - = - v \nabla_z p - - \nabla_z \Phi - - \nabla_z K -+ {\bf D}^u + {\bf F}^u +\frac{\partial (\rho \mathbf{u})}{\partial t} ++ \nabla \cdot (\rho \mathbf{u} \otimes \mathbf{u}) ++ \partial_z (\rho \mathbf{u} w) ++ f \rho {\bf u}^\perp + = - \nabla_z p + - \rho\nabla_z \Phi ++ \rho{\bf D}^u + \rho{\bf F}^u $$ (continuous-momentum-final) mass: @@ -199,7 +202,7 @@ $$ (continuous-tracer-final) equation of state: $$ -v = f_{eos}(p,\Theta,S) +\rho = f_{eos}(p,\Theta,S). $$ (continuous-eos-final) hydrostatic pressure: @@ -227,13 +230,11 @@ $$ (continuous-v_tr_diff) and may also include a biharmonic (del4) term and parameterizations such as Redi mixing. Sources and sinks include surface fluxes from the atmosphere and land, and bio-geo-chemical reactions. All of the diffusion and forcing terms are written in more detail with the [Discrete Equations](#discrete-equations) below. -## 4. Vertical Discretization - -Here we derive the layered equations by discretizing in the vertical, while the horizontal remains continuous. First, we select lower and upper surfaces $z=z_k^{bot}(x,y,t)$ and $z=z_k^{top}(x,y,t)$ for each layer $k$. The momentum equation is discretized with standard finite volume methods. We discretize the mass and tracer equations by integrating in the vertical from $z=z_k^{bot}$ to $z=z_k^{top}$, as described in [Ringler et al. 2013](https://www.sciencedirect.com/science/article/pii/S1463500313000760) Appendix A.2. +## 4. Layered Equations +Here we derive the layered equations by discretizing in the vertical, while the horizontal remains continuous. We discretize by integrating in the vertical from the lower surface $z=z_k^{bot}(x,y)$ to $z=z_k^{top}(x,y)$ for the layer with index $k$, as described in [Ringler et al. 2013](https://www.sciencedirect.com/science/article/pii/S1463500313000760) Appendix A.2. Equivalently, we can vertically integrate from a deeper pressure surface $p=p_k^{bot}(x,y)$ (higher pressure) to $p=p_k^{top}(x,y)$ where $p$ and $z$ are related by the hydrostatic pressure equation [](#continuous-hydrostatic-pressure). - -### Layered Equations +### Layer Integration For non-Boussinesq layered equations we begin by defining the mass-thickness of layer $k$ as @@ -271,21 +272,22 @@ For any three-dimensional quantity $\varphi(x,y,z,t)$, the mass-thickness-averag $$ \varphi_k(x,y,t) \equiv \frac{\int_{z_k^{bot}}^{z_k^{top}} \rho \varphi dz}{\int_{z_k^{bot}}^{z_k^{top}} \rho dz} -= \frac{\int_{z_k^{bot}}^{z_k^{top}} \rho \varphi dz}{h_k}. += \frac{\int_{z_k^{bot}}^{z_k^{top}} \rho \varphi dz}{h_k} $$(def-mass-thickness-average) - At this point our derivation has not made any assumptions about density, and may be used for both Boussinesq and non-Boussinesq fluids. A Boussinesq derivation would now assume small variations in density and replace $\rho(x,y,z,t)$ with a constant $\rho_0$ everywhere but the pressure gradient coefficient. In that case $\rho$ divides out in [](#def-mass-thickness-average) the Boussinesq layer quantities would simply be thickness-weighted averages. We can now derive the layered equations. Integrate the continuous equations [](continuous-momentum-final), [](continuous-mass-final), [](continuous-tracer-final) in $z$ from $z_k^{bot}$ to $z_k^{top}$, $$ -\frac{\partial }{\partial t} \int_{z_k^{bot}}^{z_k^{top}} {\bf u} dz -+ \int_{z_k^{bot}}^{z_k^{top}} \left( \zeta + f \right){\bf u}^\perp dz -+ \int_{z_k^{bot}}^{z_k^{top}} \frac{\partial }{\partial z} \left( w{\bf u} \right) dz - = \int_{z_k^{bot}}^{z_k^{top}} \left[- v \nabla_z p - - \nabla_z \Phi - \nabla_z K -+ {\bf D}^u + {\bf F}^u \right] dz +\frac{\partial }{\partial t} \int_{z_k^{bot}}^{z_k^{top}} \rho {\bf u} dz ++ \int_{z_k^{bot}}^{z_k^{top}} \nabla \cdot (\rho \mathbf{u} \otimes \mathbf{u}) dz ++ \int_{z_k^{bot}}^{z_k^{top}} \frac{\partial }{\partial z} \left( \rho w{\bf u} \right) dz ++ \int_{z_k^{bot}}^{z_k^{top}} + f \rho {\bf u}^\perp dz + = \int_{z_k^{bot}}^{z_k^{top}} \left[- \nabla_z p + - \rho \nabla_z \Phi ++ \rho {\bf D}^u + \rho {\bf F}^u \right] dz $$ (z-integration-momentum) $$ @@ -301,8 +303,8 @@ $$ + \int_{z_k^{bot}}^{z_k^{top}} \frac{\partial}{\partial z} \left( \rho \varphi w \right) dz = \int_{z_k^{bot}}^{z_k^{top}} \left( D^\varphi + Q^\varphi \right) dz $$ (z-integration-tracers) - -This results in conservation equations that are valid over the layer. The momentum variables are simply vertically averaged. Tracer variables are vertically mass-averaged, as defined in [](def-mass-thickness-average). + +This results in conservation equations that are valid over the layer. The momentum variables are simply vertically averaged. Tracer variables are vertically mass-averaged, as defined in [](def-mass-thickness-average). In order to deal with nonlinear terms where we take the integrals of products, we may assume that the variables are piecewise constant in the vertical within each layer, i.e. @@ -313,7 +315,7 @@ $$ (discrete-a) Then variables may come out of the integral as needed. For example, $$ -\int_{z_k^{bot}}^{z_k^{top}} \zeta {\bf u}^\perp dz +\int_{z_k^{bot}}^{z_k^{top}} \zeta {\bf u}^\perp dz &= \int_{z_k^{bot}}^{z_k^{top}} \zeta_k {\bf u}^\perp_k dz \\ &= \zeta_k {\bf u}^\perp_k \int_{z_k^{bot}}^{z_k^{top}} dz \\ &= \zeta_k {\bf u}^\perp_k \Delta z_k, @@ -323,22 +325,22 @@ where $\Delta z_k\equiv z_k^{top}-z_k^{bot}$. In the momentum equation this resu Our governing equations are now discrete in the vertical, but remain continuous in the horizontal and in time. + +This results in conservation equations that are valid over the layer. The momentum variables are simply vertically averaged. Tracer variables are vertically mass-averaged, as defined in [](def-mass-thickness-average). We assume that variables such as ${\bf u}$, $\zeta$, and $K$ are constant in the vertical so that they may be taken out of the integral where products occur. The subscript $k$ denotes a variable average over layer $k$. This system is now discrete in the vertical, but remains continuous in the horizontal and in time. + $$ -\frac{\partial {\bf u}_k}{\partial t} -+ \zeta_k {\bf u}_k^{\perp} -+ f {\bf u}_k^{\perp} -+ \frac{\left[ w_k {\bf u}_k \right]^{top} - \left[ w_k {\bf u}_k\right]^{bot}}{\Delta z_k} +\frac{\partial h_k {\bf u}_k}{\partial t} ++ \nabla_z \cdot (h_k \mathbf{u}_k \otimes \mathbf{u}_k) ++ \left[ \rho_k w_k {\bf u}_k \right]^{top} - \left[ \rho_k w_k {\bf u}_k \right]^{bot} ++ f h_k {\bf u}_k^{\perp} = -- v_k \nabla_z p_k -- \nabla_z \Phi_k -- \nabla_z K_k -+ {\bf D}_k^u + {\bf F}_k^u +- \nabla_z p_k +- h_k \nabla_z \Phi_k ++ h_k {\bf D}_k^u + h_k {\bf F}_k^u $$ (layered-momentum-1) $$ -\frac{\partial h_k}{\partial t} -+ \nabla_z \cdot \left(h_k {\bf u}_k\right) -+ \left[ \rho_k w_k \right]^{top} - \left[ \rho_k w_k \right]^{bot}= Q^h_k +\frac{\partial h_k}{\partial t} + \nabla_z \cdot \left(h_k {\bf u}_k\right) + \left[ \rho_k w_k \right]^{top} - \left[ \rho_k w_k \right]^{bot}= Q^h_k $$ (layered-mass-1) $$ @@ -360,6 +362,12 @@ $$ (layered-mass-vert-adv) This states that the change in mass in the layer is the incoming mass from below minus the outgoing mass above, since the vertical velocity $w$ is positive upwards. The vertical advection of momentum and tracers have a similar interpretation. +### Questions + +1. How do integrals in [](#z-integration-momentum) to [](#z-integration-tracers) turn into the layered form [](layered-momentum-1) to [](layered-tracer-1) when there are products in the terms? For example, $\zeta_k {\bf u}^\perp_k$, $\nabla K$ and $\rho \varphi {\bf u}$. +1. Using the definition of the layer average, the momentum equation [](layered-momentum-1) should also be thickness-weighted. Perhaps that goes away with conservation of mass? +1. How do I justify changing from $\nabla_z$ to $\nabla_r$ for terms other than the pressure gradient? Particularly $\nabla K$? + ### General Vertical Coordinate The vertical layer interfaces $(z_k^{bot}, z_k^{top})$ (or equivalently $(p_k^{bot}, p_k^{top})$) can vary as a function of $(x,y,t)$. Thus, these equations describe a general vertical coordinate, and these interface surfaces may be chosen arbitrarily by the user. See [Adcroft and Hallberg 2006](https://www.sciencedirect.com/science/article/pii/S1463500305000090) Section 2 and [Griffies et al (2000)](http://sciencedirect.com/science/article/pii/S1463500300000147) Section 2. It is convenient to introduce a new variable, the coordinate $r(x,y,z,t)$, where $r$ is constant at the middle of each layer. To be specific, we could design $r$ to be the layer index $k$ at the mid-depth of the layer. That is, define the mid-depth as @@ -435,15 +443,9 @@ $$ $$ (gradp-gradphi) On the first line, note that $\nabla_z \Phi_{gravity}=\nabla_z gz=0$. For tides and SAL we assume that these forces do not vary in the vertical due to the small aspect ratio of the ocean, so that the vertical derivative in the expansion [](dvarphidnabla) is zero. This means that $\nabla_z \Phi_{tides}=\nabla_r \Phi_{tides}$ and $\nabla_z \Phi_{SAL}=\nabla_r \Phi_{SAL}$. -For versions 1.0 and 2.0 of Omega we only consider a constant gravitational force, and will not include tides and SAL. Further details will be provided in the forthcoming pressure gradient design document. See [Adcroft and Hallberg 2006](https://www.sciencedirect.com/science/article/pii/S1463500305000090) eqn. 1 and [Griffies et al](http://sciencedirect.com/science/article/pii/S1463500300000147) eqn 2 for additional examples of the pressure gradient in tilted coordinates. +For versions 1.0 and 2.0 of Omega we only consider a constant gravitational force, and will not include tides and SAL. Further details will be provided in the forthcoming pressure gradient design document. -In all other terms with horizontal operators we make the approximation that the within-layer operator is the same as the horizontal operator. For example, for the kinetic energy gradient - -$$ -\nabla_z K = \nabla_r K - \frac{\partial K}{\partial z} \nabla_r z -$$ (gradk) - -we assume that the second term is small so that $\nabla_z K = \nabla_r K$. +See [Adcroft and Hallberg 2006](https://www.sciencedirect.com/science/article/pii/S1463500305000090) eqn. 1 and [Griffies et al](http://sciencedirect.com/science/article/pii/S1463500300000147) eqn 2 for additional examples of the pressure gradient in tilted coordinates. The additional terms due to the expansion of $\nabla_z$ to $\nabla_r$ in the rest of the equations are small and are ignored. Some publications state that the transition from Boussinesq to non-Boussinesq equations is accompanied by a change from z-coordinate to pressure-coordinates. However, we use a general vertical coordinate, so the vertical may be referenced to $z$ or $p$. In a purely z-coordinate model like POP, only the $\nabla p$ term is used in [](gradp). In a purely p-coordinate model, only $\nabla z$ remains, as described in [de Szoeke and Samelson 2002](https://journals.ametsoc.org/view/journals/phoc/32/7/1520-0485_2002_032_2194_tdbtba_2.0.co_2.xml). In a general vertical coordinate model the layer interface placement is up to the user's specification, and so both terms are kept. @@ -452,12 +454,48 @@ The integration in [](#z-integration-momentum) to [](#z-integration-tracers) cha ### Final Layered Equations +mrp temp: + +The momentum equation can be rewritten using the product rule on $\rho {\bf u}$, mass conservation, and dividing by $\rho$, as: + +$$ +\frac{D {\bf u}_{3D} }{D t} \equiv +\frac{\partial {\bf u}_{3D}}{\partial t} ++ {\bf u}_{3D}\cdot \nabla_{3D} {\bf u}_{3D} + = - \frac{1}{\rho} \nabla_{3D} p + - \nabla_{3D} \Phi ++ {\bf D}^u + {\bf F}^u +$$ (continuous-momentum-rho) + +mrp temp: + +The advection term may be separated into horizontal and vertical parts as + +$$ +{\bf u}_{3D}\cdot \nabla_{3D} {\bf u}_{3D} += +{\bf u} \cdot \nabla_z {\bf u} + w \frac{\partial {\bf u}}{\partial z}. +$$ (advection-3d2d) + +The horizontal component may be replaced with the vector identity + +$$ +\begin{aligned} +{\bf u} \cdot \nabla_z {\bf u} +&= (\nabla_z \times {\bf u}) \times {\bf u} + \nabla_z \frac{|{\bf u}|^2}{2} \\ +&= \left( \boldsymbol{k} \cdot (\nabla_z \times {\bf u})\right) +\left( \boldsymbol{k} \times {\bf u} \right) + \nabla_z \frac{|{\bf u}|^2}{2} \\ +&= \zeta {\bf u}^{\perp} + \nabla_z K, +\end{aligned} +$$ (advection-identity) + +where $\zeta$ is relative vorticity and $K$ is kinetic energy. This step separates the horizontal advection into non-divergent and non-rotational components, which is useful in the final TRiSK formulation. momentum: $$ \frac{\partial {\bf u}_k}{\partial t} + q_k h_k {\bf u}_k^{\perp} -+ \frac{v_k^{top}\omega_k^{top} {\bf u}_k^{top} - v_k^{bot}\omega_k^{bot}{\bf u}_k^{bot}}{v_k h_k} ++ v_k^{top}\omega_k^{top} {\bf u}_k^{top} - v_k^{bot}\omega_k^{bot}{\bf u}_k^{bot} = - v_k \nabla_r p_k - \nabla_r \Phi_k - \nabla_r K_k @@ -487,14 +525,13 @@ $$ (potential-vort-adv) Surface fluxes $Q^h_k$ have been added to the mass equation for precipitation, evaporation, and river runoff. These fluxes, like mass transport $\omega$, are in units of kg/s/m$^2$. -## 5. Horizontal Discretization +## 5. Discrete Equations The horizontally discretized layered equations are as follows. We have dropped the $r$ in $\nabla_r$ for conciseness, and the operator $\nabla$ from here on means within-layer. $$ \frac{\partial u_{e,k}}{\partial t} + \left[ \frac{{\bf k} \cdot \nabla \times u_{e,k} +f_v}{[h_{i,k}]_v}\right]_e\left([h_{i,k}]_e u_{e,k}^{\perp}\right) -+ \frac{\left[ v_{i,k}^{top}\omega_{i,k}^{top} \right]_e u_{e,k}^{top} - \left[ v_{i,k+1}^{top}\omega_{i,k+1}^{top} \right]_e u_{e,k+1}^{top}} - {\left[v_{i,k}h_{i,k}\right]_e} ++ \left[ v_{i,k}^{top}\omega_{i,k}^{top} \right]_e u_{e,k}^{top} - \left[ v_{i,k+1}^{top}\omega_{i,k+1}^{top} \right]_e u_{e,k+1}^{top} = - \left[ v_{i,k} \right]_e \nabla p_{i,k} - \nabla \Phi_{i,k} - \nabla K_{i,k} + { \bf D}^u_{e,k} + {\bf F}^u_{e,k} @@ -696,7 +733,8 @@ $$ + \frac{1}{2}\nabla \left| {\bf u}_k \right|^2 + ( {\bf k} \cdot \nabla \times {\bf u}_k) {\bf u}^\perp_k + f{\bf u}^{\perp}_k -+ w \frac{d{\bf u}_k}{dz} = ++ w_k^{bot}{\bf u}_k^{bot} +- w_k^{top}{\bf u}_k^{top} = - \frac{1}{\rho_0}\nabla p_k - \frac{\rho g}{\rho_0}\nabla z^{mid}_k + \nu_h\nabla^2{\bf u}_k From 45519cb55f176e5539d99f0ecee56fe56867390d Mon Sep 17 00:00:00 2001 From: mark-petersen Date: Thu, 29 May 2025 15:22:04 -0700 Subject: [PATCH 11/65] spec vol to alpha, h in vert mom adv, nabla_z --- .../omega/doc/design/OmegaV1GoverningEqns.md | 126 ++++++++++++------ 1 file changed, 85 insertions(+), 41 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 783436d638a7..a0a440944f67 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -76,7 +76,7 @@ $$ (continuous-tracer) Here we have express the following terms as a general operators, with examples of specific forms provided below: the dissipation ${\bf D}^u$, momentum forcing ${\bf F}^u$, tracer diffusion $D^\varphi$, and tracer sources and sinks $Q^\varphi$. The graviational potential, $\Phi$, is written in a general form, and may include Earth's gravity, tidal forces, and self attraction and loading. -Geophysical fluids such as the ocean and atmosphere are rotating and stratified, and horizontal velocities are orders of magnitude larger than vertical velocities. It is therefore convenient to separate the horizontal and vertical as ${\bf u}_{3D} = \left( {\bf u}, w \right)$ and $\nabla_{3D} = \left( \nabla_z, d/dz \right)$ where $z$ is the vertical direction in a local Cartesian coordinate system aligned with gravity (approximately normal to Earth's surface), and $w$ is the vertical velocity. The $z$ subscript on $\nabla_z$ is to remind us that this is the true horizontal gradient (perpendicular to $z$), as opposed to gradients within tilted layers used in the following section. The Earth's gravitational force is included as $\Phi_{gravity} = gz $ so that $ \nabla_{3D} \Phi_{gravity} = g{\bf k}$. The rotating frame of reference results in the Coriolis force $f {\bf k} \times {\bf u} \equiv f {\bf u}^\perp$, where $f$ is the Coriolis parameter and ${\bf u}^\perp$ is the horizontal velocity vector rotated $90^\circ$ counterclockwise from $\bf u$ in the horizontal plane. See any textbook in the [References](#references) for a full derivation. +Geophysical fluids such as the ocean and atmosphere are rotating and stratified, and horizontal velocities are orders of magnitude larger than vertical velocities. It is therefore convenient to separate the horizontal and vertical as ${\bf u}_{3D} = \left( {\bf u}, w \right)$ and $\nabla_{3D} = \left( \nabla_z, d/dz \right)$ where $z$ is the vertical direction in a local Cartesian coordinate system aligned with gravity (approximately normal to Earth's surface), and $w$ is the vertical velocity. The $z$ subscript on $\nabla_z$ is to remind us that this is the true horizontal gradient (perpendicular to $z$), as opposed to gradients within tilted layers used in the following section. The Earth's gravitational force is included as $\Phi_g = gz $ so that $ \nabla_{3D} \Phi_g = g{\bf k}$. The rotating frame of reference results in the Coriolis force $f {\bf k} \times {\bf u} \equiv f {\bf u}^\perp$, where $f$ is the Coriolis parameter and ${\bf u}^\perp$ is the horizontal velocity vector rotated $90^\circ$ counterclockwise from $\bf u$ in the horizontal plane. See any textbook in the [References](#references) for a full derivation. #### Assumptions @@ -135,20 +135,20 @@ $$ (advection-written-out) The third line is the vertical component, and was assumed to be small in the previous section. The first two lines are the horizontal components may be written as $$ -\nabla_z \cdot \left( \rho {\bf u} \otimes {\bf u} \right) + \partial_z \left( \rho w {\bf u}\right) +\nabla_z \cdot \left( \rho {\bf u} \otimes {\bf u} \right) + \partial_z \left( w \rho {\bf u}\right) $$ (adv2d) where ${\bf u} = (u,v)$ is the horizontal velocity vector and $\nabla_z=(\partial_x,\partial_y)$ is the horizontal gradient, and the tensor product ${\bf u} \otimes {\bf u}={\bf u} {\bf u}^T$. Using the product rule, this can be expanded as $$ -\nabla_z \cdot \left( \rho {\bf u} \otimes {\bf u} \right) + \partial_z \left( \rho w {\bf u}\right) +\nabla_z \cdot \left( \rho {\bf u} \otimes {\bf u} \right) + \partial_z \left( w \rho {\bf u}\right) &= \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} + {\bf u} \cdot \nabla_z \left( \rho {\bf u} \right) -+ \partial_z \left( \rho w {\bf u}\right) \\ ++ \partial_z \left( w \rho {\bf u}\right) \\ &= \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} + \left( {\bf u} \cdot \nabla_z \rho \right) {\bf u} + \left( {\bf u} \cdot \nabla_z {\bf u} \right) \rho -+ \partial_z \left( \rho w {\bf u}\right) ++ \partial_z \left( w \rho {\bf u}\right) $$ (adv2d-prod) The term ${\bf u} \cdot \nabla_z {\bf u}$ may be replaced with the vector identity @@ -173,8 +173,9 @@ momentum: $$ \frac{\partial (\rho \mathbf{u})}{\partial t} -+ \nabla \cdot (\rho \mathbf{u} \otimes \mathbf{u}) -+ \partial_z (\rho \mathbf{u} w) ++ \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} ++ {\bf u} \cdot \nabla_z \left( \rho {\bf u} \right) ++ \partial_z \left( w \rho \mathbf{u} \right) + f \rho {\bf u}^\perp = - \nabla_z p - \rho\nabla_z \Phi @@ -280,9 +281,10 @@ At this point our derivation has not made any assumptions about density, and may We can now derive the layered equations. Integrate the continuous equations [](continuous-momentum-final), [](continuous-mass-final), [](continuous-tracer-final) in $z$ from $z_k^{bot}$ to $z_k^{top}$, $$ -\frac{\partial }{\partial t} \int_{z_k^{bot}}^{z_k^{top}} \rho {\bf u} dz -+ \int_{z_k^{bot}}^{z_k^{top}} \nabla \cdot (\rho \mathbf{u} \otimes \mathbf{u}) dz -+ \int_{z_k^{bot}}^{z_k^{top}} \frac{\partial }{\partial z} \left( \rho w{\bf u} \right) dz +\int_{z_k^{bot}}^{z_k^{top}} \frac{\partial \rho {\bf u}}{\partial t} dz ++ \int_{z_k^{bot}}^{z_k^{top}} \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} dz ++ \int_{z_k^{bot}}^{z_k^{top}} {\bf u} \cdot \nabla_z \left( \rho {\bf u} \right) dz ++ \int_{z_k^{bot}}^{z_k^{top}} \frac{\partial }{\partial z} \left( \rho {\bf u} w \right) dz + \int_{z_k^{bot}}^{z_k^{top}} f \rho {\bf u}^\perp dz = \int_{z_k^{bot}}^{z_k^{top}} \left[- \nabla_z p @@ -312,25 +314,35 @@ $$ a(x,y,z,t) = a_k(x,y,t) \in [z_k^{bot}, z_k^{top}). $$ (discrete-a) -Then variables may come out of the integral as needed. For example, +Then variables may come out of the integral as needed. For example, we can handle the advection terms by making this assumptoin for ${\bf u}$. $$ -\int_{z_k^{bot}}^{z_k^{top}} \zeta {\bf u}^\perp dz -&= \int_{z_k^{bot}}^{z_k^{top}} \zeta_k {\bf u}^\perp_k dz \\ -&= \zeta_k {\bf u}^\perp_k \int_{z_k^{bot}}^{z_k^{top}} dz \\ -&= \zeta_k {\bf u}^\perp_k \Delta z_k, -$$ (nonlinear-z) + \int_{z_k^{bot}}^{z_k^{top}} \nabla_z \cdot \left( \rho \varphi {\bf u} \right) dz +&= \nabla_z \cdot \left( \int_{z_k^{bot}}^{z_k^{top}} \rho \varphi {\bf u} dz \right)\\ +&= \nabla_z \cdot \left( {\bf u}_k \int_{z_k^{bot}}^{z_k^{top}} \rho \varphi dz \right)\\ +&= \nabla_z \cdot \left( {\bf u}_k h_k \varphi_k \right).\\ +$$ (tracer-adv) + +Likewise, for the horizontal momentum advection, -where $\Delta z_k\equiv z_k^{top}-z_k^{bot}$. In the momentum equation this results in a $\Delta z_k$ factor in every term except vertical advection, which is divided out. +$$ +\int_{z_k^{bot}}^{z_k^{top}} \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} dz ++ \int_{z_k^{bot}}^{z_k^{top}} {\bf u} \cdot \nabla_z \left( \rho {\bf u} \right) dz +&= \left( \nabla_z \cdot {\bf u}_k \right) \int_{z_k^{bot}}^{z_k^{top}} \rho {\bf u} dz ++ {\bf u}_k \cdot \nabla_z \left( \int_{z_k^{bot}}^{z_k^{top}}\rho {\bf u} dz\right) \\ +&= \left( \nabla_z \cdot {\bf u}_k \right) h_k {\bf u}_k ++ {\bf u}_k \cdot \nabla_z \left( h_k {\bf u}_k \right) \\ +$$ (mom-adv) Our governing equations are now discrete in the vertical, but remain continuous in the horizontal and in time. -This results in conservation equations that are valid over the layer. The momentum variables are simply vertically averaged. Tracer variables are vertically mass-averaged, as defined in [](def-mass-thickness-average). We assume that variables such as ${\bf u}$, $\zeta$, and $K$ are constant in the vertical so that they may be taken out of the integral where products occur. The subscript $k$ denotes a variable average over layer $k$. This system is now discrete in the vertical, but remains continuous in the horizontal and in time. +This results in the layered conservation equations. This system is now discrete in the vertical, but remains continuous in the horizontal and in time. $$ \frac{\partial h_k {\bf u}_k}{\partial t} -+ \nabla_z \cdot (h_k \mathbf{u}_k \otimes \mathbf{u}_k) ++ \left( \nabla_z \cdot {\bf u}_k \right) h_k {\bf u}_k ++ {\bf u}_k \cdot \nabla_z \left( h_k {\bf u}_k \right) + \left[ \rho_k w_k {\bf u}_k \right]^{top} - \left[ \rho_k w_k {\bf u}_k \right]^{bot} + f h_k {\bf u}_k^{\perp} = @@ -349,8 +361,44 @@ $$ = D^\varphi_k + Q^\varphi_k. $$ (layered-tracer-1) +The term $\left( \nabla_z \cdot {\bf u}_k \right) h_k {\bf u}_k$ is assumed to be small for seawater, which is nearly incompressible. In the Boussinesq approximation this term is formally zero due to the incompressibility assumption. The remaining terms from the momentum material derivative may be rewritten as + +$$ +\frac{\partial h_k {\bf u}_k}{\partial t} ++ {\bf u}_k \cdot \nabla_z \left( h_k {\bf u}_k \right) +&= h_k \frac{\partial {\bf u}_k}{\partial t} ++ {\bf u}_k\frac{\partial h_k} {\partial t} ++ h_k {\bf u}_k \cdot \nabla_z \left( {\bf u}_k \right) ++ {\bf u}_k \cdot \nabla_z \left( h_k \right) {\bf u}_k\\ +&= h_k \frac{\partial {\bf u}_k}{\partial t} ++ {\bf u}_k\frac{\partial h_k} {\partial t} ++ h_k {\bf u}_k \cdot \nabla_z {\bf u}_k ++ {\bf u}_k \cdot \nabla_z \left( h_k \right) {\bf u}_k \\ +&= h_k \left[ \frac{\partial {\bf u}_k}{\partial t} ++ {\bf u}_k \cdot \nabla_z {\bf u}_k \right] ++ {\bf u}_k \left[\frac{\partial h_k} {\partial t} ++ {\bf u}_k \cdot \nabla_z h_k \right] \\ +&= h_k \left[ \frac{\partial {\bf u}_k}{\partial t} ++ \zeta {\bf u}^{\perp} + \nabla_z K + \right] ++ {\bf u}_k \left[\frac{\partial h_k} {\partial t} ++ {\bf u}_k \cdot \nabla_z h_k \right] \\ +$$ (mom-h-adv) + +The terms in the second square brackets drop out due to conservation of mass (note: I need to check on vertical thickness flux and source terms). We now divide the momentum equation by $h_k$ to obtain -Equivalently, one could have multiplied [](z-integration-momentum), [](z-integration-mass), [](z-integration-tracers) by $g$ and expressed the integrals in terms of pressure, with integration limits from $p_k^{top}$ to $p_k^{bot}$. +$$ +\frac{\partial {\bf u}_k}{\partial t} ++ \zeta {\bf u}^{\perp} + \nabla_z K ++ \frac{\left[ \rho_k w_k {\bf u}_k \right]^{top} - \left[ \rho_k w_k {\bf u}_k \right]^{bot}}{h_k} ++ f {\bf u}_k^{\perp} += +- \nabla_z p_k +- \nabla_z \Phi_k ++ {\bf D}_k^u + {\bf F}_k^u +$$ (layered-momentum-2) + +One could derive the layered equations by integrating in pressure rather than $z$. In that case, one would have multiplied [](z-integration-momentum), [](z-integration-mass), [](z-integration-tracers) by $g$ and expressed the integrals in terms of pressure, with integration limits from $p_k^{top}$ to $p_k^{bot}$. Derivations of ocean model equations with pressure as the vertical variable may be found in [de Szoeke and Samelson 2002](https://journals.ametsoc.org/view/journals/phoc/32/7/1520-0485_2002_032_2194_tdbtba_2.0.co_2.xml) and [Losch et al. 2003](https://journals.ametsoc.org/view/journals/phoc/34/1/1520-0485_2004_034_0306_hsacgc_2.0.co_2.xml). The vertical advection terms use the fundamental theorem of calculus to integrate a derivative in $z$, resulting in boundary conditions at the layer interfaces. This makes intuitive sense as a mass balance. For example, in the absence of horizontal advection and sources, the mass equation is simply @@ -362,12 +410,6 @@ $$ (layered-mass-vert-adv) This states that the change in mass in the layer is the incoming mass from below minus the outgoing mass above, since the vertical velocity $w$ is positive upwards. The vertical advection of momentum and tracers have a similar interpretation. -### Questions - -1. How do integrals in [](#z-integration-momentum) to [](#z-integration-tracers) turn into the layered form [](layered-momentum-1) to [](layered-tracer-1) when there are products in the terms? For example, $\zeta_k {\bf u}^\perp_k$, $\nabla K$ and $\rho \varphi {\bf u}$. -1. Using the definition of the layer average, the momentum equation [](layered-momentum-1) should also be thickness-weighted. Perhaps that goes away with conservation of mass? -1. How do I justify changing from $\nabla_z$ to $\nabla_r$ for terms other than the pressure gradient? Particularly $\nabla K$? - ### General Vertical Coordinate The vertical layer interfaces $(z_k^{bot}, z_k^{top})$ (or equivalently $(p_k^{bot}, p_k^{top})$) can vary as a function of $(x,y,t)$. Thus, these equations describe a general vertical coordinate, and these interface surfaces may be chosen arbitrarily by the user. See [Adcroft and Hallberg 2006](https://www.sciencedirect.com/science/article/pii/S1463500305000090) Section 2 and [Griffies et al (2000)](http://sciencedirect.com/science/article/pii/S1463500300000147) Section 2. It is convenient to introduce a new variable, the coordinate $r(x,y,z,t)$, where $r$ is constant at the middle of each layer. To be specific, we could design $r$ to be the layer index $k$ at the mid-depth of the layer. That is, define the mid-depth as @@ -419,16 +461,16 @@ $$ -\frac{1}{\rho} \nabla_z p &=-\frac{1}{\rho} \nabla_r p +\frac{1}{\rho} \frac{\partial p}{\partial z} \nabla_r z \\ &=-\frac{1}{\rho} \nabla_r p - g \nabla_r z \\ -&=-v \nabla_r p - \nabla_r \Phi_{gravity}\\ +&=-v \nabla_r p - \nabla_r \Phi_g\\ \end{aligned} $$ (gradp) -where we have substituted hydrostatic balance [](hydrostatic-balance), specific volume $v\equiv 1/\rho$, and $\Phi_{gravity}=gz$. +where we have substituted hydrostatic balance [](hydrostatic-balance), specific volume $\alpha\equiv 1/\rho$, and $\Phi_g=gz$. The general form of the geopotential may include the Earth's gravity, tidal forces, and self attraction and loading (SAL), and may be written as $$ -\Phi = \Phi_{gravity} + \Phi_{tides} + \Phi_{SAL} + c +\Phi = \Phi_g + \Phi_{tides} + \Phi_{SAL} + c $$ (def-geopotential) where $c$ is an arbitrary constant. Therefore, the pressure gradient and geopotential gradient may be written together as @@ -437,12 +479,12 @@ $$ \begin{aligned} -v \nabla_z p - \nabla_z \Phi &= -v \nabla_z p - \nabla_z \Phi_{tides} - \nabla_z \Phi_{SAL}\\ -&=-v \nabla_r p - \nabla_r \Phi_{gravity} - \nabla_r \Phi_{tides} - \nabla_r \Phi_{SAL}\\ +&=-v \nabla_r p - \nabla_r \Phi_g - \nabla_r \Phi_{tides} - \nabla_r \Phi_{SAL}\\ &=-v \nabla_r p - \nabla_r \Phi. \\ \end{aligned} $$ (gradp-gradphi) -On the first line, note that $\nabla_z \Phi_{gravity}=\nabla_z gz=0$. For tides and SAL we assume that these forces do not vary in the vertical due to the small aspect ratio of the ocean, so that the vertical derivative in the expansion [](dvarphidnabla) is zero. This means that $\nabla_z \Phi_{tides}=\nabla_r \Phi_{tides}$ and $\nabla_z \Phi_{SAL}=\nabla_r \Phi_{SAL}$. +On the first line, note that $\nabla_z \Phi_g=\nabla_z gz=0$. For tides and SAL we assume that these forces do not vary in the vertical due to the small aspect ratio of the ocean, so that the vertical derivative in the expansion [](dvarphidnabla) is zero. This means that $\nabla_z \Phi_{tides}=\nabla_r \Phi_{tides}$ and $\nabla_z \Phi_{SAL}=\nabla_r \Phi_{SAL}$. For versions 1.0 and 2.0 of Omega we only consider a constant gravitational force, and will not include tides and SAL. Further details will be provided in the forthcoming pressure gradient design document. See [Adcroft and Hallberg 2006](https://www.sciencedirect.com/science/article/pii/S1463500305000090) eqn. 1 and [Griffies et al](http://sciencedirect.com/science/article/pii/S1463500300000147) eqn 2 for additional examples of the pressure gradient in tilted coordinates. The additional terms due to the expansion of $\nabla_z$ to $\nabla_r$ in the rest of the equations are small and are ignored. @@ -490,14 +532,15 @@ $$ $$ (advection-identity) where $\zeta$ is relative vorticity and $K$ is kinetic energy. This step separates the horizontal advection into non-divergent and non-rotational components, which is useful in the final TRiSK formulation. + momentum: $$ \frac{\partial {\bf u}_k}{\partial t} + q_k h_k {\bf u}_k^{\perp} -+ v_k^{top}\omega_k^{top} {\bf u}_k^{top} - v_k^{bot}\omega_k^{bot}{\bf u}_k^{bot} ++ \frac{\left[ \alpha_k \omega_k {\bf u}_k \right]^{top} - \left[ \alpha_k \omega_k {\bf u}_k \right]^{bot}}{h_k} = -- v_k \nabla_r p_k - \nabla_r \Phi_k +- \alpha_k \nabla_r p_k - \nabla_r \Phi_k - \nabla_r K_k + {\bf D}_k^u + {\bf F}_k^u $$ (layered-momentum) @@ -531,9 +574,10 @@ The horizontally discretized layered equations are as follows. We have dropped t $$ \frac{\partial u_{e,k}}{\partial t} + \left[ \frac{{\bf k} \cdot \nabla \times u_{e,k} +f_v}{[h_{i,k}]_v}\right]_e\left([h_{i,k}]_e u_{e,k}^{\perp}\right) -+ \left[ v_{i,k}^{top}\omega_{i,k}^{top} \right]_e u_{e,k}^{top} - \left[ v_{i,k+1}^{top}\omega_{i,k+1}^{top} \right]_e u_{e,k+1}^{top} ++ \left[ \frac{ \alpha_{i,k}^{top}\omega_{i,k}^{top}} {h_{i,k}}\right]_e u_{e,k}^{top} +- \left[ \frac{ \alpha_{i,k+1}^{top}\omega_{i,k+1}^{top}} {h_{i,k}} \right]_e u_{e,k+1}^{top} = -- \left[ v_{i,k} \right]_e \nabla p_{i,k} - \nabla \Phi_{i,k} +- \left[ \alpha_{i,k} \right]_e \nabla p_{i,k} - \nabla \Phi_{i,k} - \nabla K_{i,k} + { \bf D}^u_{e,k} + {\bf F}^u_{e,k} $$ (discrete-momentum) @@ -554,11 +598,11 @@ p_{i,k} = p_{i}^{surf} + \sum_{k'=1}^{k-1} g h_{i,k'} + \frac{1}{2} g h_{i,k} $$ (discrete-pressure) $$ -v_{i,k} = f_{eos}(p_{i,k},\Theta_{i,k},S_{i,k}) +\alpha_{i,k} = f_{eos}(p_{i,k},\Theta_{i,k},S_{i,k}) $$ (discrete-eos) $$ -z_{i,k}^{top} = z_{i}^{floor} + \sum_{k'=k}^{K_{max}} v_{i,k'}h_{i,k'} +z_{i,k}^{top} = z_{i}^{floor} + \sum_{k'=k}^{K_{max}} \alpha_{i,k'}h_{i,k'} $$ (discrete-z) The subscripts $i$, $e$, and $v$ indicate cell, edge, and vertex locations and subscript $k$ is the layer. Square brackets $[\cdot]_e$ and $[\cdot]_v$ are quantities that are interpolated to edge and vertex locations. For vector quantities, $u_{e,k}$ denotes the normal component at the center of the edge, while $u_{e,k}^\perp$ denotes the tangential component. We have switched from $\varphi_{i,k}^{bot}$ to the identical $\varphi_{i,k+1}^{top}$ for all variables in order for the notation to match the array names in the code. The superscripts $surf$ and $floor$ are the surface and floor of the full ocean column. All variables without these superscripts indicate that they are layer-averaged, as defined in [](def-mass-thickness-average), and can be considered to represent a mid-layer value in the vertical. The mid-layer location is equivalently the average in $z$, $p$, or $h$ (mass), since density $\rho_{i,k}$ is considered constant in the cell. @@ -656,10 +700,10 @@ where $\tau$ is the wind stress in Pa. Since the mass-thickness $h$ is in kg/s/m Bottom Drag is applied as a bottom boundary condition during implicit vertical mixing as $$ -- C_D \frac{u_{e,k}\left|u_{e,k}\right|}{[v_{i,k}h_{i,k}]_e} . +- C_D \frac{u_{e,k}\left|u_{e,k}\right|}{[\alpha_{i,k}h_{i,k}]_e} . $$ (discrete-mom-bottom) -The units of specific volume times mass-thickness $vh$ are length (m), so that the full term has units of m/s$^2$. +The units of specific volume times mass-thickness $\alpha h$ are length (m), so that the full term has units of m/s$^2$. #### Rayleigh Drag @@ -766,7 +810,7 @@ Table 1. Definition of variables. Geometric variables may be found in the [Omega |$ D_{e,k}^\varphi$ | tracer diffusion terms | | cell | |see [Tracer Diffusion Section](#tracer-diffusion) | |$f_v$ | Coriolis parameter| 1/s | vertex | FVertex | $f = 2\Omega sin(\phi)$, $\Omega$ rotation rate, $\phi$ latitude| |${\bf F}^u_{k} $, $ F^u_{e,k} $ | momentum forcing | m/s$^2$ | edge | | see [Momentum Forcing Section](#momentum-forcing) | -|$f_{eos}$ | equation of state | - | any | function call | may produce density or specific volume | +|$f_{eos}$ | equation of state | - | any | function call | | |$g$ | gravitational acceleration | m/s$^2$ | constant | Gravity | |$h_{i,k}$ | layer mass-thickness | kg/m$^2$ | cell | LayerThickness | see [](def-h) | |$k$ | vertical index | | @@ -786,7 +830,7 @@ Table 1. Definition of variables. Geometric variables may be found in the [Omega |${\bf u}_k$ | velocity, vector form | m/s | - | | | |$u_{e,k}$ | velocity, normal to edge | m/s | edge | NormalVelocity | | |$u^\perp_{e,k}$ | velocity, tangential to edge | m/s | edge | TangentialVelocity |${\bf u}^\perp = {\bf k} \times {\bf u}$| -|$v_{i,k}$ | specific volume | m$^3$/kg | cell | SpecificVolume | $v = 1/\rho$ | +|$\alpha_{i,k}$ | specific volume | m$^3$/kg | cell | SpecificVolume | $v = 1/\rho$ | |$w_{i,k}$ | vertical velocity | m/s | cell | VerticalVelocity | volume transport per m$^2$ | |$z$ | vertical coordinate | m | - | | positive upward | |$z^{top}_{i,k}$ | layer top z-location | m | cell | ZTop | see [](discrete-z) | From 8ba8b96d24eb8f8d37d09fc21f0cd33dff5e9bf0 Mon Sep 17 00:00:00 2001 From: mark-petersen Date: Fri, 30 May 2025 13:49:01 -0700 Subject: [PATCH 12/65] Add Xylars notes unchanged --- .../omega/doc/design/OmegaV1GoverningEqns.md | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index a0a440944f67..9039341ebd7b 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -76,6 +76,74 @@ $$ (continuous-tracer) Here we have express the following terms as a general operators, with examples of specific forms provided below: the dissipation ${\bf D}^u$, momentum forcing ${\bf F}^u$, tracer diffusion $D^\varphi$, and tracer sources and sinks $Q^\varphi$. The graviational potential, $\Phi$, is written in a general form, and may include Earth's gravity, tidal forces, and self attraction and loading. +## 3. Tracer and Mass Equations + + +Here, we closely follow Appendix A2 from Ringler et al. (2013). They state, "The variable $\phi(x, y, z, t)$ may be the fluid density q or the density-weighted concentration of some tracer, in units of tracer mass per volume." This means that $\phi = \rho \varphi$, where $\varphi$ is what we are using as the definition of a tracer. + +We begin with their equations (A.10)-(A.13) which are agnostic to our choice of mass-thickness: + +$$ +h(x, y, t) = \int_{s^{\text{bot}}}^{s^{\text{top}}} \rho \, dz = \frac{1}{g} \left[ p^{\text{bot}}(x, y, t) - p^{\text{top}} (x, y, t) \right]. +$$ + +Instead of geometric thickness to define our layers. Starting at their (A.14), it is useful to write the equation in terms of vertical mass flux $\omega = \rho w$ instead of vertical velocity $w$: + +$$ +\frac{d}{dt} \int_{V(t)} \rho \varphi \, dV + \int_{\partial V_{\text{side}}} \rho \varphi \mathbf{u} \cdot \mathbf{n} \, dA + \int_{\partial V_{\text{top}}(t)} \varphi (\omega - \omega_r) \, dA +- \int_{\partial V_{\text{bot}}(t)} \varphi (\omega - \omega_r) \, dA = 0, +$$ + +Their (A.15) becomes: + +$$ +\frac{d}{dt} \int_{A} \int_{s^{\text{bot}}}^{s^{\text{top}}} \rho \varphi \, dz \, dA + \int_{\partial A} \left( \int_{s^{\text{bot}}}^{s^{\text{top}}} \rho \varphi \mathbf{u} \, dz \right) \cdot d\mathbf{l} + \int_{A} [\varphi (\omega - \omega_r)]_{z = s^{\text{top}}} \, dA +- \int_{A} [\varphi (\omega - \omega_r)]_{z = s^{\text{bot}}} \, dA = 0. +$$ + +The equivalent of their (A.16) is our equation for mass-thickness above. The vertical average of a variable, their (A.17) becomes: + +$$ +\bar{\varphi}^z(x, y, t) = \frac{1}{h} \int_{s^{\text{bot}}}^{s^{\text{top}}} \varphi(x, y, z, t) \rho \, dz. +$$ + +The conservation equation now becomes: + +$$ +\frac{d}{dt} \int_{A} h \, \overline{\varphi}^z \, dA ++ \int_{\partial A} h \, \overline{\varphi}^z \, \mathbf{u} \cdot d\mathbf{l} ++ \int_{A} [\varphi \omega_{tr}]_{z = s^{\text{top}}} \, dA +- \int_{A} [\varphi \omega_{tr}]_{z = s^{\text{bot}}} \, dA = 0, +$$ + +where $\omega_{\text{tr}}$ is the mass transport through the top and bottom surfaces. Making use of their (A.19) and (A.20), we arrive at: + +$$ +\frac{d}{dt} \overline{h \, \overline{\varphi}^z}^A ++ \frac{1}{\tilde{A}} \int_{\partial A} h \, \overline{\varphi}^z \, \mathbf{u} \cdot d\mathbf{l} ++ \left. \overline{\varphi \omega_{tr}}^A \right|_{z = s^{\text{top}}} +- \left. \overline{\varphi \omega_{tr}}^A \right|_{z = s^{\text{bot}}} = 0, +$$ + +which is their (A.21), except with $\phi = \rho \varphi$ and $w \rightarrow \omega$. Taking the limit $\tilde{A} \rightarrow 0$, we get: + +$$ +\frac{\partial}{\partial t} h \, \overline{\varphi}^z + \nabla \cdot (h \, \overline{\varphi}^z \, \mathbf{u}) + [\varphi \omega_{tr}]_{z = s^{\text{top}}} - [\varphi \omega_{tr}]_{z = s^{\text{bot}}} = 0. +$$ + +We get mass conservation by substituting $\varphi \rightarrow 1$: + +$$ +\frac{\partial}{\partial t} h + \nabla \cdot (h \mathbf{u}) + \left.\omega_{tr}\right|_{z = s^{\text{top}}} - \left.\omega_{tr}\right|_{z = s^{\text{bot}}} = 0. +$$ + +This is nearly identical to their (A.25) but with the mass-thickness and $\omega$. + + + + +## 4. Momentum Equations + Geophysical fluids such as the ocean and atmosphere are rotating and stratified, and horizontal velocities are orders of magnitude larger than vertical velocities. It is therefore convenient to separate the horizontal and vertical as ${\bf u}_{3D} = \left( {\bf u}, w \right)$ and $\nabla_{3D} = \left( \nabla_z, d/dz \right)$ where $z$ is the vertical direction in a local Cartesian coordinate system aligned with gravity (approximately normal to Earth's surface), and $w$ is the vertical velocity. The $z$ subscript on $\nabla_z$ is to remind us that this is the true horizontal gradient (perpendicular to $z$), as opposed to gradients within tilted layers used in the following section. The Earth's gravitational force is included as $\Phi_g = gz $ so that $ \nabla_{3D} \Phi_g = g{\bf k}$. The rotating frame of reference results in the Coriolis force $f {\bf k} \times {\bf u} \equiv f {\bf u}^\perp$, where $f$ is the Coriolis parameter and ${\bf u}^\perp$ is the horizontal velocity vector rotated $90^\circ$ counterclockwise from $\bf u$ in the horizontal plane. See any textbook in the [References](#references) for a full derivation. From e89e47c375368dd843d442c0508a032464c86383 Mon Sep 17 00:00:00 2001 From: mark-petersen Date: Fri, 30 May 2025 14:48:16 -0700 Subject: [PATCH 13/65] Change from dz to dp in tracer & mass eqn --- .../omega/doc/design/OmegaV1GoverningEqns.md | 71 +++++++++++-------- 1 file changed, 40 insertions(+), 31 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 9039341ebd7b..1574f394bc19 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -15,7 +15,7 @@ Add later, if it seems necessary. There is a toc on the left bar. This design document describes the governing equations for Omega, the Ocean Model for E3SM Global Applications. Overall, Omega is an unstructured-mesh ocean model based on TRiSK numerical methods ([Thuburn et al. 2009](https://www.sciencedirect.com/science/article/pii/S0021999109004434)) that is specifically designed for modern exascale computing architectures. The algorithms in Omega will be mostly identical to those in MPAS-Ocean, but it will be written in c++ rather than Fortran in order to take advantage of the Kokkos performance portability library to run on GPUs ([Trott et al. 2022](https://ieeexplore.ieee.org/document/9485033)). Significant differences between MPAS-Ocean and Omega are: -1. Omega is non-Boussinesq. This means that the full 3D density is used everywhere, and results in a mass-conserving model. MPAS-Ocean and POP were Boussinesq, so that a reference density $\rho_0$ is used in the pressure gradient term, and were therefore volume-conserving models. In Omega the layered mass-conservation equation is in terms of mass-thickness ($h=\rho \Delta z$). In MPAS-Ocean the simple thickness ($h=\Delta z$) is the prognostic volume variable (normalized by horizontal cell area). +1. Omega is non-Boussinesq. This means that the full 3D density is used everywhere, and results in a mass-conserving model. MPAS-Ocean and POP were Boussinesq, so that a reference density $\rho_0$ is used in the pressure gradient term, and were therefore volume-conserving models. In Omega the layered mass-conservation equation is in terms of pressure-thickness ($h=\rho g \Delta z$). In MPAS-Ocean the simple thickness ($h=\Delta z$) is the prognostic volume variable (normalized by horizontal cell area). 1. Omega will use the updated equation of state TEOS10, while MPAS-Ocean used the Jackett-McDougall equation of state. The planned versions of Omega are: @@ -33,7 +33,7 @@ This document describes the governing equations for the layered ocean model, whi The requirements in the [Omega-0 design document](OmegaV0ShallowWater) still apply. Additional design requirements for Omega-1 are: ### Omega will be a hydrostatic, non-Boussinesq ocean model. -See discussion in introduction. The non-Boussinesq formulation uses the full density throughout resulting in governing equations that conserve mass rather than volume. The substantial change is that the "thickness" variable, $h$, is now a mass-thickness, $h = \rho \Delta z$. This is explained in the derivation of the [layered equations below](#layered-equations). +See discussion in introduction. The non-Boussinesq formulation uses the full density throughout resulting in governing equations that conserve mass rather than volume. The substantial change is that the "thickness" variable, $h$, is now a pressure-thickness, $h = \rho g \Delta z$. This is explained in the derivation of the [layered equations below](#layered-equations). ### Omega will use TEOS10 for the equation of state. See additional [EOS design document](EOS) @@ -81,63 +81,72 @@ Here we have express the following terms as a general operators, with examples o Here, we closely follow Appendix A2 from Ringler et al. (2013). They state, "The variable $\phi(x, y, z, t)$ may be the fluid density q or the density-weighted concentration of some tracer, in units of tracer mass per volume." This means that $\phi = \rho \varphi$, where $\varphi$ is what we are using as the definition of a tracer. -We begin with their equations (A.10)-(A.13) which are agnostic to our choice of mass-thickness: +We begin with their equations (A.10)-(A.13) which are agnostic to our choice of pressure-thickness: $$ -h(x, y, t) = \int_{s^{\text{bot}}}^{s^{\text{top}}} \rho \, dz = \frac{1}{g} \left[ p^{\text{bot}}(x, y, t) - p^{\text{top}} (x, y, t) \right]. -$$ +h(x, y, t) = \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho g \, dz = p^{\text{bot}}(x, y, t) - p^{\text{top}} (x, y, t). +$$ (def-pressure-thickness) -Instead of geometric thickness to define our layers. Starting at their (A.14), it is useful to write the equation in terms of vertical mass flux $\omega = \rho w$ instead of vertical velocity $w$: +Instead of geometric thickness to define our layers. Starting at their (A.14), it is useful to write the equation in terms of vertical pressure (mass) flux $\omega = \rho g w$ instead of vertical velocity $w$: $$ -\frac{d}{dt} \int_{V(t)} \rho \varphi \, dV + \int_{\partial V_{\text{side}}} \rho \varphi \mathbf{u} \cdot \mathbf{n} \, dA + \int_{\partial V_{\text{top}}(t)} \varphi (\omega - \omega_r) \, dA -- \int_{\partial V_{\text{bot}}(t)} \varphi (\omega - \omega_r) \, dA = 0, -$$ +\frac{d}{dt} \int_{V(t)} \rho g \varphi \, dV + \int_{\partial V_{\text{side}}} \rho g \varphi \mathbf{u} \cdot \mathbf{n} \, dA + \int_{\partial V_{\text{top}}(t)} \varphi (\omega - \omega_r) \, dA +- \int_{\partial V_{\text{bot}}(t)} \varphi (\omega - \omega_r) \, dA = 0. +$$ (tracer-V-int) Their (A.15) becomes: $$ -\frac{d}{dt} \int_{A} \int_{s^{\text{bot}}}^{s^{\text{top}}} \rho \varphi \, dz \, dA + \int_{\partial A} \left( \int_{s^{\text{bot}}}^{s^{\text{top}}} \rho \varphi \mathbf{u} \, dz \right) \cdot d\mathbf{l} + \int_{A} [\varphi (\omega - \omega_r)]_{z = s^{\text{top}}} \, dA -- \int_{A} [\varphi (\omega - \omega_r)]_{z = s^{\text{bot}}} \, dA = 0. -$$ +\frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho g \varphi \, dz \, dA + \int_{\partial A} \left( \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho g \varphi \mathbf{u} \, dz \right) \cdot \mathbf{n} \, dl + \int_{A} [\varphi (\omega - \omega_r)]_{p = p^{\text{top}}} \, dA +- \int_{A} [\varphi (\omega - \omega_r)]_{p = p^{\text{bot}}} \, dA = 0. +$$ (tracer-Az-int) -The equivalent of their (A.16) is our equation for mass-thickness above. The vertical average of a variable, their (A.17) becomes: +The assumption of hydostatic balance allows a change of coordinate. This may be written with differentials as $dp = \rho g dz$. Tracer conservation may be rewritten as $$ -\bar{\varphi}^z(x, y, t) = \frac{1}{h} \int_{s^{\text{bot}}}^{s^{\text{top}}} \varphi(x, y, z, t) \rho \, dz. +\frac{d}{dt} \int_{A} \int_{p^{\text{bot}}}^{p^{\text{top}}} \varphi \, dp \, dA + \int_{\partial A} \left( \int_{p^{\text{bot}}}^{p^{\text{top}}} \varphi \mathbf{u} \, dp \right) \cdot \mathbf{n} \, dl + \int_{A} [\varphi (\omega - \omega_r)]_{p = p^{\text{top}}} \, dA +- \int_{A} [\varphi (\omega - \omega_r)]_{p = p^{\text{bot}}} \, dA = 0, +$$ (tracer-Ap-int) + +where we define the pressure surfaces $p^{\text{top}}\equiv p(z^{\text{top}})$ and $p^{\text{bot}}\equiv p(z^{\text{bot}})$. +The equivalent of their (A.16) is our equation for pressure-thickness above. The vertical average of a variable, their (A.17) becomes: + $$ +\overline{\varphi}^p(x, y, t) = \frac{1}{h} \int_{z^{\text{bot}}}^{z^{\text{top}}} \varphi(x, y, z, t) \rho g \, dz \\ + = \frac{1}{h} \int_{p^{\text{bot}}}^{p^{\text{top}}} \varphi(x, y, z, t) \, dp. +$$ (def-tracer-avg) The conservation equation now becomes: $$ -\frac{d}{dt} \int_{A} h \, \overline{\varphi}^z \, dA -+ \int_{\partial A} h \, \overline{\varphi}^z \, \mathbf{u} \cdot d\mathbf{l} -+ \int_{A} [\varphi \omega_{tr}]_{z = s^{\text{top}}} \, dA -- \int_{A} [\varphi \omega_{tr}]_{z = s^{\text{bot}}} \, dA = 0, -$$ +\frac{d}{dt} \int_{A} h \, \overline{\varphi}^p \, dA ++ \int_{\partial A} h \, \overline{\varphi\mathbf{u}}^p \cdot \mathbf{n} \, dl ++ \int_{A} [\varphi \omega_{tr}]_{p = p^{\text{top}}} \, dA +- \int_{A} [\varphi \omega_{tr}]_{p = p^{\text{bot}}} \, dA = 0, +$$ (tracer-Aint-pavg) where $\omega_{\text{tr}}$ is the mass transport through the top and bottom surfaces. Making use of their (A.19) and (A.20), we arrive at: $$ -\frac{d}{dt} \overline{h \, \overline{\varphi}^z}^A -+ \frac{1}{\tilde{A}} \int_{\partial A} h \, \overline{\varphi}^z \, \mathbf{u} \cdot d\mathbf{l} -+ \left. \overline{\varphi \omega_{tr}}^A \right|_{z = s^{\text{top}}} -- \left. \overline{\varphi \omega_{tr}}^A \right|_{z = s^{\text{bot}}} = 0, -$$ +\frac{d}{dt} \overline{h \, \overline{\varphi}^p}^A ++ \frac{1}{\tilde{A}} \int_{\partial A} h \, \overline{\varphi\mathbf{u}}^p \cdot \mathbf{n} \, dl ++ \left. \overline{\varphi \omega_{tr}}^A \right|_{p = p^{\text{top}}} +- \left. \overline{\varphi \omega_{tr}}^A \right|_{p = p^{\text{bot}}} = 0, +$$ (tracer-Aavg-pavg) -which is their (A.21), except with $\phi = \rho \varphi$ and $w \rightarrow \omega$. Taking the limit $\tilde{A} \rightarrow 0$, we get: +which is their (A.21), except with $\phi = \rho g \varphi$ and $w \rightarrow \omega$. Taking the limit $\tilde{A} \rightarrow 0$, we get: $$ -\frac{\partial}{\partial t} h \, \overline{\varphi}^z + \nabla \cdot (h \, \overline{\varphi}^z \, \mathbf{u}) + [\varphi \omega_{tr}]_{z = s^{\text{top}}} - [\varphi \omega_{tr}]_{z = s^{\text{bot}}} = 0. -$$ +\frac{\partial}{\partial t} h \, \overline{\varphi}^p + \nabla \cdot (h \, \overline{\varphi\mathbf{u}}^p ) + [\varphi \omega_{tr}]_{p = p^{\text{top}}} - [\varphi \omega_{tr}]_{p = p^{\text{bot}}} = 0. +$$ (tracer-layered) We get mass conservation by substituting $\varphi \rightarrow 1$: $$ -\frac{\partial}{\partial t} h + \nabla \cdot (h \mathbf{u}) + \left.\omega_{tr}\right|_{z = s^{\text{top}}} - \left.\omega_{tr}\right|_{z = s^{\text{bot}}} = 0. -$$ +\frac{\partial}{\partial t} h + \nabla \cdot (h \overline{\mathbf{u}}^p ) + \left.\omega_{tr}\right|_{p = p^{\text{top}}} - \left.\omega_{tr}\right|_{p = p^{\text{bot}}} = 0. +$$ (mass-layered) -This is nearly identical to their (A.25) but with the mass-thickness and $\omega$. +This is nearly identical to their (A.25) but with the pressure-thickness and $\omega$. @@ -305,7 +314,7 @@ Here we derive the layered equations by discretizing in the vertical, while the ### Layer Integration -For non-Boussinesq layered equations we begin by defining the mass-thickness of layer $k$ as +For non-Boussinesq layered equations we begin by defining the pressure-thickness of layer $k$ as $$ h_k(x,y,t) From a42a2fbdc8bf51235e68236ddd8902bd9ed6c211 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Sat, 31 May 2025 05:07:16 -0500 Subject: [PATCH 14/65] Introduce pseudo-height Use this to express conservation of mass and tracers. --- .../omega/doc/design/OmegaV1GoverningEqns.md | 143 ++++++++++++------ 1 file changed, 95 insertions(+), 48 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 1574f394bc19..d31634b4c7c6 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -52,7 +52,7 @@ $$ \frac{\partial \rho {\bf u}_{3D}}{\partial t} + \nabla_{3D} \cdot \left( \rho {\bf u}_{3D} \otimes {\bf u}_{3D} \right) = - \nabla_{3D} p - - \rho \nabla_{3D} \Phi + - \rho \nabla_{3D} \Phi + \rho {\bf D}^u_{3D} + \rho {\bf F}^u_{3D} $$ (continuous-momentum) @@ -74,76 +74,123 @@ $$ = D^\varphi + Q^\varphi $$ (continuous-tracer) -Here we have express the following terms as a general operators, with examples of specific forms provided below: the dissipation ${\bf D}^u$, momentum forcing ${\bf F}^u$, tracer diffusion $D^\varphi$, and tracer sources and sinks $Q^\varphi$. The graviational potential, $\Phi$, is written in a general form, and may include Earth's gravity, tidal forces, and self attraction and loading. +Here we have express the following terms as a general operators, with examples of specific forms provided below: the dissipation ${\bf D}^u$, momentum forcing ${\bf F}^u$, tracer diffusion $D^\varphi$, and tracer sources and sinks $Q^\varphi$. The graviational potential, $\Phi$, is written in a general form, and may include Earth's gravity, tidal forces, and self attraction and loading. -## 3. Tracer and Mass Equations + +## 3 Pseudo-Height Coordinate + +In our non-Boussinesq hydrostatic framework, we adopt a vertical coordinate based on **pseudo-height**, denoted by $\tilde{z}$. This coordinate measures the mass per unit area between the ocean surface and a given depth, and is defined by: + +$$ +\tilde{z}(z) = -\int_z^{z_s} \rho(z') \, dz', +$$ (def-pseudo-height) + +where $z$ is the geometric height (positive upward), $\rho$ is the in-situ density, and $z_s$ is the ocean surface elevation. Pseudo-height $\tilde{z}$ is therefore **zero at the surface** and becomes **increasingly negative downward**, with units of $\mathrm{kg\,m^{-2}}$. The total column mass per unit area is defined as: + +$$ +M = \int_{z_b}^{z_s} \rho(z') \, dz' > 0, +$$ (def-column-mass) + +where $z_b$ is the bottom elevation. The bottom of the domain corresponds to: + +$$ +\tilde{z}(z_b) = -M. +$$ (def-total-pseudo-height) + +Under hydrostatic balance, we have: + +$$ +\frac{dp}{dz} = -\rho g \quad \Rightarrow \quad dp = -\rho g\,dz \quad \Rightarrow \quad \rho\,dz = -\frac{dp}{g}, +$$ (hydrostatic-balance) + +which allows us to express pseudo-height in terms of pressure: + +$$ +\tilde{z} = -\frac{p - p_s}{g}, \quad \text{or equivalently,} \quad p = p_s - g\tilde{z}, +$$ (pseudo-height-pressure) + +where $p_s$ is the pressure at the ocean surface. This makes $\tilde{z}$ a natural coordinate for tracer and mass budgets when $\rho$ is known as a function of pressure, as is the case in TEOS-10, our proposed equation of state. + +Given $\rho(\tilde{z})$, we can recover geometric height via: + +$$ +z(\tilde{z}) = z_s + \int_{0}^{\tilde{z}} \frac{1}{\rho(\tilde{z}')} \, d\tilde{z}', +$$ (invert-z-from-pseudo) + +noting that the integral moves downward in the column (i.e., toward more negative $\tilde{z}$). + +We now formulate the mass and tracer conservation equations in a finite volume using $\tilde{z}$ as the vertical coordinate. + + + +## 4. Tracer and Mass Equations Here, we closely follow Appendix A2 from Ringler et al. (2013). They state, "The variable $\phi(x, y, z, t)$ may be the fluid density q or the density-weighted concentration of some tracer, in units of tracer mass per volume." This means that $\phi = \rho \varphi$, where $\varphi$ is what we are using as the definition of a tracer. -We begin with their equations (A.10)-(A.13) which are agnostic to our choice of pressure-thickness: +We begin with their equations (A.10)-(A.13) which are agnostic to our choice of mass-thickness: $$ -h(x, y, t) = \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho g \, dz = p^{\text{bot}}(x, y, t) - p^{\text{top}} (x, y, t). +h(x, y, t) = \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, dz = \tilde{z}^{\text{top}}(x, y, t) - \tilde{z}^{\text{bot}} (x, y, t). $$ (def-pressure-thickness) -Instead of geometric thickness to define our layers. Starting at their (A.14), it is useful to write the equation in terms of vertical pressure (mass) flux $\omega = \rho g w$ instead of vertical velocity $w$: +Instead of geometric thickness to define our layers. Starting at their (A.14), it is useful to write the equation in terms of vertical mass flux per unit area $\omega = \rho w$ instead of vertical velocity $w$: $$ -\frac{d}{dt} \int_{V(t)} \rho g \varphi \, dV + \int_{\partial V_{\text{side}}} \rho g \varphi \mathbf{u} \cdot \mathbf{n} \, dA + \int_{\partial V_{\text{top}}(t)} \varphi (\omega - \omega_r) \, dA +\frac{d}{dt} \int_{V(t)} \rho \varphi \, dV + \int_{\partial V_{\text{side}}} \rho \varphi \mathbf{u} \cdot \mathbf{n} \, dA + \int_{\partial V_{\text{top}}(t)} \varphi (\omega - \omega_r) \, dA - \int_{\partial V_{\text{bot}}(t)} \varphi (\omega - \omega_r) \, dA = 0. $$ (tracer-V-int) Their (A.15) becomes: $$ -\frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho g \varphi \, dz \, dA + \int_{\partial A} \left( \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho g \varphi \mathbf{u} \, dz \right) \cdot \mathbf{n} \, dl + \int_{A} [\varphi (\omega - \omega_r)]_{p = p^{\text{top}}} \, dA -- \int_{A} [\varphi (\omega - \omega_r)]_{p = p^{\text{bot}}} \, dA = 0. +\frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \varphi \, dz \, dA + \int_{\partial A} \left( \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \varphi \mathbf{u} \, dz \right) \cdot \mathbf{n} \, dl + \int_{A} [\varphi (\omega - \omega_r)]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +- \int_{A} [\varphi (\omega - \omega_r)]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA = 0. $$ (tracer-Az-int) -The assumption of hydostatic balance allows a change of coordinate. This may be written with differentials as $dp = \rho g dz$. Tracer conservation may be rewritten as +The assumption of hydostatic balance allows a change of coordinate to the pseudo-height described in the previous section. Tracer conservation may be rewritten as $$ -\frac{d}{dt} \int_{A} \int_{p^{\text{bot}}}^{p^{\text{top}}} \varphi \, dp \, dA + \int_{\partial A} \left( \int_{p^{\text{bot}}}^{p^{\text{top}}} \varphi \mathbf{u} \, dp \right) \cdot \mathbf{n} \, dl + \int_{A} [\varphi (\omega - \omega_r)]_{p = p^{\text{top}}} \, dA -- \int_{A} [\varphi (\omega - \omega_r)]_{p = p^{\text{bot}}} \, dA = 0, +\frac{d}{dt} \int_{A} \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \varphi \, d\tilde{z} \, dA + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \varphi \mathbf{u} \, d\tilde{z} \right) \cdot \mathbf{n} \, dl + \int_{A} [\varphi (\omega - \omega_r)]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +- \int_{A} [\varphi (\omega - \omega_r)]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA = 0, $$ (tracer-Ap-int) -where we define the pressure surfaces $p^{\text{top}}\equiv p(z^{\text{top}})$ and $p^{\text{bot}}\equiv p(z^{\text{bot}})$. -The equivalent of their (A.16) is our equation for pressure-thickness above. The vertical average of a variable, their (A.17) becomes: +where we define the pressure surfaces $\tilde{z}^{\text{top}}\equiv \tilde{z}(z^{\text{top}})$ and $\tilde{z}^{\text{bot}}\equiv \tilde{z}(z^{\text{bot}})$. +The equivalent of their (A.16) is our equation for mass-thickness above. The vertical average of a variable, their (A.17) becomes: $$ -\overline{\varphi}^p(x, y, t) = \frac{1}{h} \int_{z^{\text{bot}}}^{z^{\text{top}}} \varphi(x, y, z, t) \rho g \, dz \\ - = \frac{1}{h} \int_{p^{\text{bot}}}^{p^{\text{top}}} \varphi(x, y, z, t) \, dp. +\overline{\varphi}^{\tilde{z}}(x, y, t) = \frac{1}{h} \int_{z^{\text{bot}}}^{z^{\text{top}}} \varphi(x, y, z, t) \rho g \, dz \\ + = \frac{1}{h} \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \varphi(x, y, z, t) \, d\tilde{z}. $$ (def-tracer-avg) The conservation equation now becomes: $$ -\frac{d}{dt} \int_{A} h \, \overline{\varphi}^p \, dA -+ \int_{\partial A} h \, \overline{\varphi\mathbf{u}}^p \cdot \mathbf{n} \, dl -+ \int_{A} [\varphi \omega_{tr}]_{p = p^{\text{top}}} \, dA -- \int_{A} [\varphi \omega_{tr}]_{p = p^{\text{bot}}} \, dA = 0, +\frac{d}{dt} \int_{A} h \, \overline{\varphi}^{\tilde{z}} \, dA ++ \int_{\partial A} h \, \overline{\varphi\mathbf{u}}^{\tilde{z}} \cdot \mathbf{n} \, dl ++ \int_{A} [\varphi \omega_{tr}]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +- \int_{A} [\varphi \omega_{tr}]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA = 0, $$ (tracer-Aint-pavg) -where $\omega_{\text{tr}}$ is the mass transport through the top and bottom surfaces. Making use of their (A.19) and (A.20), we arrive at: +where $\omega_{\text{tr}}$ is the mass transport per unit area through the top and bottom surfaces. Making use of their (A.19) and (A.20), we arrive at: $$ -\frac{d}{dt} \overline{h \, \overline{\varphi}^p}^A -+ \frac{1}{\tilde{A}} \int_{\partial A} h \, \overline{\varphi\mathbf{u}}^p \cdot \mathbf{n} \, dl -+ \left. \overline{\varphi \omega_{tr}}^A \right|_{p = p^{\text{top}}} -- \left. \overline{\varphi \omega_{tr}}^A \right|_{p = p^{\text{bot}}} = 0, +\frac{d}{dt} \overline{h \, \overline{\varphi}^{\tilde{z}}}^A ++ \frac{1}{\tilde{A}} \int_{\partial A} h \, \overline{\varphi\mathbf{u}}^{\tilde{z}} \cdot \mathbf{n} \, dl ++ \left. \overline{\varphi \omega_{tr}}^A \right|_{\tilde{z} = \tilde{z}^{\text{top}}} +- \left. \overline{\varphi \omega_{tr}}^A \right|_{\tilde{z} = \tilde{z}^{\text{bot}}} = 0, $$ (tracer-Aavg-pavg) which is their (A.21), except with $\phi = \rho g \varphi$ and $w \rightarrow \omega$. Taking the limit $\tilde{A} \rightarrow 0$, we get: $$ -\frac{\partial}{\partial t} h \, \overline{\varphi}^p + \nabla \cdot (h \, \overline{\varphi\mathbf{u}}^p ) + [\varphi \omega_{tr}]_{p = p^{\text{top}}} - [\varphi \omega_{tr}]_{p = p^{\text{bot}}} = 0. +\frac{\partial}{\partial t} h \, \overline{\varphi}^{\tilde{z}} + \nabla \cdot (h \, \overline{\varphi\mathbf{u}}^{\tilde{z}} ) + [\varphi \omega_{tr}]_{\tilde{z} = \tilde{z}^{\text{top}}} - [\varphi \omega_{tr}]_{\tilde{z} = \tilde{z}^{\text{bot}}} = 0. $$ (tracer-layered) We get mass conservation by substituting $\varphi \rightarrow 1$: $$ -\frac{\partial}{\partial t} h + \nabla \cdot (h \overline{\mathbf{u}}^p ) + \left.\omega_{tr}\right|_{p = p^{\text{top}}} - \left.\omega_{tr}\right|_{p = p^{\text{bot}}} = 0. +\frac{\partial}{\partial t} h + \nabla \cdot (h \overline{\mathbf{u}}^{\tilde{z}} ) + \left.\omega_{tr}\right|_{\tilde{z} = \tilde{z}^{\text{top}}} - \left.\omega_{tr}\right|_{\tilde{z} = \tilde{z}^{\text{bot}}} = 0. $$ (mass-layered) This is nearly identical to their (A.25) but with the pressure-thickness and $\omega$. @@ -151,7 +198,7 @@ This is nearly identical to their (A.25) but with the pressure-thickness and $\o -## 4. Momentum Equations +## 5. Momentum Equations Geophysical fluids such as the ocean and atmosphere are rotating and stratified, and horizontal velocities are orders of magnitude larger than vertical velocities. It is therefore convenient to separate the horizontal and vertical as ${\bf u}_{3D} = \left( {\bf u}, w \right)$ and $\nabla_{3D} = \left( \nabla_z, d/dz \right)$ where $z$ is the vertical direction in a local Cartesian coordinate system aligned with gravity (approximately normal to Earth's surface), and $w$ is the vertical velocity. The $z$ subscript on $\nabla_z$ is to remind us that this is the true horizontal gradient (perpendicular to $z$), as opposed to gradients within tilted layers used in the following section. The Earth's gravitational force is included as $\Phi_g = gz $ so that $ \nabla_{3D} \Phi_g = g{\bf k}$. The rotating frame of reference results in the Coriolis force $f {\bf k} \times {\bf u} \equiv f {\bf u}^\perp$, where $f$ is the Coriolis parameter and ${\bf u}^\perp$ is the horizontal velocity vector rotated $90^\circ$ counterclockwise from $\bf u$ in the horizontal plane. See any textbook in the [References](#references) for a full derivation. @@ -219,13 +266,13 @@ where ${\bf u} = (u,v)$ is the horizontal velocity vector and $\nabla_z=(\partia $$ \nabla_z \cdot \left( \rho {\bf u} \otimes {\bf u} \right) + \partial_z \left( w \rho {\bf u}\right) -&= \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} -+ {\bf u} \cdot \nabla_z \left( \rho {\bf u} \right) +&= \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} ++ {\bf u} \cdot \nabla_z \left( \rho {\bf u} \right) + \partial_z \left( w \rho {\bf u}\right) \\ -&= \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} -+ \left( {\bf u} \cdot \nabla_z \rho \right) {\bf u} +&= \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} ++ \left( {\bf u} \cdot \nabla_z \rho \right) {\bf u} + \left( {\bf u} \cdot \nabla_z {\bf u} \right) \rho -+ \partial_z \left( w \rho {\bf u}\right) ++ \partial_z \left( w \rho {\bf u}\right) $$ (adv2d-prod) The term ${\bf u} \cdot \nabla_z {\bf u}$ may be replaced with the vector identity @@ -250,12 +297,12 @@ momentum: $$ \frac{\partial (\rho \mathbf{u})}{\partial t} -+ \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} -+ {\bf u} \cdot \nabla_z \left( \rho {\bf u} \right) ++ \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} ++ {\bf u} \cdot \nabla_z \left( \rho {\bf u} \right) + \partial_z \left( w \rho \mathbf{u} \right) -+ f \rho {\bf u}^\perp ++ f \rho {\bf u}^\perp = - \nabla_z p - - \rho\nabla_z \Phi + - \rho\nabla_z \Phi + \rho{\bf D}^u + \rho{\bf F}^u $$ (continuous-momentum-final) @@ -362,10 +409,10 @@ $$ + \int_{z_k^{bot}}^{z_k^{top}} \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} dz + \int_{z_k^{bot}}^{z_k^{top}} {\bf u} \cdot \nabla_z \left( \rho {\bf u} \right) dz + \int_{z_k^{bot}}^{z_k^{top}} \frac{\partial }{\partial z} \left( \rho {\bf u} w \right) dz -+ \int_{z_k^{bot}}^{z_k^{top}} ++ \int_{z_k^{bot}}^{z_k^{top}} f \rho {\bf u}^\perp dz - = \int_{z_k^{bot}}^{z_k^{top}} \left[- \nabla_z p - - \rho \nabla_z \Phi + = \int_{z_k^{bot}}^{z_k^{top}} \left[- \nabla_z p + - \rho \nabla_z \Phi + \rho {\bf D}^u + \rho {\bf F}^u \right] dz $$ (z-integration-momentum) @@ -382,7 +429,7 @@ $$ + \int_{z_k^{bot}}^{z_k^{top}} \frac{\partial}{\partial z} \left( \rho \varphi w \right) dz = \int_{z_k^{bot}}^{z_k^{top}} \left( D^\varphi + Q^\varphi \right) dz $$ (z-integration-tracers) - + This results in conservation equations that are valid over the layer. The momentum variables are simply vertically averaged. Tracer variables are vertically mass-averaged, as defined in [](def-mass-thickness-average). In order to deal with nonlinear terms where we take the integrals of products, we may assume that the variables are piecewise constant in the vertical within each layer, i.e. @@ -404,7 +451,7 @@ Likewise, for the horizontal momentum advection, $$ \int_{z_k^{bot}}^{z_k^{top}} \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} dz -+ \int_{z_k^{bot}}^{z_k^{top}} {\bf u} \cdot \nabla_z \left( \rho {\bf u} \right) dz ++ \int_{z_k^{bot}}^{z_k^{top}} {\bf u} \cdot \nabla_z \left( \rho {\bf u} \right) dz &= \left( \nabla_z \cdot {\bf u}_k \right) \int_{z_k^{bot}}^{z_k^{top}} \rho {\bf u} dz + {\bf u}_k \cdot \nabla_z \left( \int_{z_k^{bot}}^{z_k^{top}}\rho {\bf u} dz\right) \\ &= \left( \nabla_z \cdot {\bf u}_k \right) h_k {\bf u}_k @@ -419,7 +466,7 @@ This results in the layered conservation equations. This system is now discrete $$ \frac{\partial h_k {\bf u}_k}{\partial t} + \left( \nabla_z \cdot {\bf u}_k \right) h_k {\bf u}_k -+ {\bf u}_k \cdot \nabla_z \left( h_k {\bf u}_k \right) ++ {\bf u}_k \cdot \nabla_z \left( h_k {\bf u}_k \right) + \left[ \rho_k w_k {\bf u}_k \right]^{top} - \left[ \rho_k w_k {\bf u}_k \right]^{bot} + f h_k {\bf u}_k^{\perp} = @@ -442,14 +489,14 @@ The term $\left( \nabla_z \cdot {\bf u}_k \right) h_k {\bf u}_k$ is assumed to $$ \frac{\partial h_k {\bf u}_k}{\partial t} -+ {\bf u}_k \cdot \nabla_z \left( h_k {\bf u}_k \right) ++ {\bf u}_k \cdot \nabla_z \left( h_k {\bf u}_k \right) &= h_k \frac{\partial {\bf u}_k}{\partial t} + {\bf u}_k\frac{\partial h_k} {\partial t} -+ h_k {\bf u}_k \cdot \nabla_z \left( {\bf u}_k \right) ++ h_k {\bf u}_k \cdot \nabla_z \left( {\bf u}_k \right) + {\bf u}_k \cdot \nabla_z \left( h_k \right) {\bf u}_k\\ &= h_k \frac{\partial {\bf u}_k}{\partial t} + {\bf u}_k\frac{\partial h_k} {\partial t} -+ h_k {\bf u}_k \cdot \nabla_z {\bf u}_k ++ h_k {\bf u}_k \cdot \nabla_z {\bf u}_k + {\bf u}_k \cdot \nabla_z \left( h_k \right) {\bf u}_k \\ &= h_k \left[ \frac{\partial {\bf u}_k}{\partial t} + {\bf u}_k \cdot \nabla_z {\bf u}_k \right] @@ -529,7 +576,7 @@ $$ (dvarphidnabla) ### Pressure Gradient -For most terms, we can safely assume $\nabla_z \approx \nabla_r$ because the vertical to horizontal aspect ratio even at very high horizontal resolution is on the order of $\epsilon ~ 10^{-3}$ (thought may need to re-assess this assumption if we decide to use strongly sloped layers). This applies, for example, to the curl operator uset to compute the relative vorticity and the gradient applied to the kinetic energy in [](z-integration-momentum). +For most terms, we can safely assume $\nabla_z \approx \nabla_r$ because the vertical to horizontal aspect ratio even at very high horizontal resolution is on the order of $\epsilon ~ 10^{-3}$ (thought may need to re-assess this assumption if we decide to use strongly sloped layers). This applies, for example, to the curl operator uset to compute the relative vorticity and the gradient applied to the kinetic energy in [](z-integration-momentum). The exception is the pressure gradient term. This is becasue strong vertical and week horizontal pressure gradients mean that both terms in the chain rule [](dvarphidnabla) are of the same order and must be retained. Substituting pressure for $\varphi$ in [](#dvarphidnabla), @@ -582,7 +629,7 @@ $$ \frac{\partial {\bf u}_{3D}}{\partial t} + {\bf u}_{3D}\cdot \nabla_{3D} {\bf u}_{3D} = - \frac{1}{\rho} \nabla_{3D} p - - \nabla_{3D} \Phi + - \nabla_{3D} \Phi + {\bf D}^u + {\bf F}^u $$ (continuous-momentum-rho) From 590e9373ad37e7979092fa39a6a7d3c1fe4a99d9 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Sun, 1 Jun 2025 11:29:08 -0500 Subject: [PATCH 15/65] Add layered momentum and velocity equations --- .../omega/doc/design/OmegaV1GoverningEqns.md | 174 +++++++++++++++++- 1 file changed, 171 insertions(+), 3 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index d31634b4c7c6..ccaba587189e 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -76,6 +76,7 @@ $$ (continuous-tracer) Here we have express the following terms as a general operators, with examples of specific forms provided below: the dissipation ${\bf D}^u$, momentum forcing ${\bf F}^u$, tracer diffusion $D^\varphi$, and tracer sources and sinks $Q^\varphi$. The graviational potential, $\Phi$, is written in a general form, and may include Earth's gravity, tidal forces, and self attraction and loading. +(pseudo-height)= ## 3 Pseudo-Height Coordinate @@ -97,6 +98,12 @@ $$ \tilde{z}(z_b) = -M. $$ (def-total-pseudo-height) +**Note:** Because $z$ appears as the *lower bound* of the integral in equation [](#def-pseudo-height), we have +$$ +\frac{d\tilde{z}}{dz} = \rho(z), \quad \text{so} \quad d\tilde{z} = \rho(z)\,dz. +$$ +This means that pseudo-height $\tilde{z}$ increases in the same direction as $z$: both are **zero at the surface** (or close to it) and become **increasingly negative with depth**. + Under hydrostatic balance, we have: $$ @@ -153,7 +160,7 @@ The assumption of hydostatic balance allows a change of coordinate to the pseudo $$ \frac{d}{dt} \int_{A} \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \varphi \, d\tilde{z} \, dA + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \varphi \mathbf{u} \, d\tilde{z} \right) \cdot \mathbf{n} \, dl + \int_{A} [\varphi (\omega - \omega_r)]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA - \int_{A} [\varphi (\omega - \omega_r)]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA = 0, -$$ (tracer-Ap-int) +$$ (tracer-Aztilde-int) where we define the pressure surfaces $\tilde{z}^{\text{top}}\equiv \tilde{z}(z^{\text{top}})$ and $\tilde{z}^{\text{bot}}\equiv \tilde{z}(z^{\text{bot}})$. The equivalent of their (A.16) is our equation for mass-thickness above. The vertical average of a variable, their (A.17) becomes: @@ -170,7 +177,7 @@ $$ + \int_{\partial A} h \, \overline{\varphi\mathbf{u}}^{\tilde{z}} \cdot \mathbf{n} \, dl + \int_{A} [\varphi \omega_{tr}]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA - \int_{A} [\varphi \omega_{tr}]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA = 0, -$$ (tracer-Aint-pavg) +$$ (tracer-Aint-ztildeavg) where $\omega_{\text{tr}}$ is the mass transport per unit area through the top and bottom surfaces. Making use of their (A.19) and (A.20), we arrive at: @@ -179,7 +186,7 @@ $$ + \frac{1}{\tilde{A}} \int_{\partial A} h \, \overline{\varphi\mathbf{u}}^{\tilde{z}} \cdot \mathbf{n} \, dl + \left. \overline{\varphi \omega_{tr}}^A \right|_{\tilde{z} = \tilde{z}^{\text{top}}} - \left. \overline{\varphi \omega_{tr}}^A \right|_{\tilde{z} = \tilde{z}^{\text{bot}}} = 0, -$$ (tracer-Aavg-pavg) +$$ (tracer-Aavg-ztildeavg) which is their (A.21), except with $\phi = \rho g \varphi$ and $w \rightarrow \omega$. Taking the limit $\tilde{A} \rightarrow 0$, we get: @@ -196,6 +203,167 @@ $$ (mass-layered) This is nearly identical to their (A.25) but with the pressure-thickness and $\omega$. +## 5. Horizontal Momentum Equation + +We now derive the horizontal momentum equation in our non-Boussinesq, hydrostatic framework, following the same finite-volume approach used for mass and tracer conservation. We work with a pseudo-height vertical coordinate $\tilde{z}$ as defined in [Pseudo-Height Coordinate Section](pseudo-height). + +We begin by considering conservation of horizontal momentum density $ \rho \mathbf{u} $ over a time-dependent control volume $ V(t) $, bounded horizontally by a fixed area $ A $, and vertically by surfaces $ \tilde{z}^{\text{top}}(x, y, t) $ and $ \tilde{z}^{\text{bot}}(x, y, t) $. The finite-volume balance reads: + +$$ +\frac{d}{dt} \int_{V(t)} \rho \mathbf{u} \, dV ++ \int_{\partial V(t)} \rho \mathbf{u} (\mathbf{v} - \mathbf{v}_r) \cdot \mathbf{n} \, dA += \mathbf{F}_\text{total}[V(t)], +$$ (momentum-FV) + +with total forces given by: + +$$ +\mathbf{F}_\text{total}[V(t)] = +- \int_{V(t)} \rho\, \mathbf{f} \times \mathbf{u} \, dV +- \int_{V(t)} \rho\, \nabla \Phi \, dV +- \int_{\partial V(t)} p \, \mathbf{n} \, dA ++ \int_{\partial V(t)} \boldsymbol{\tau}_h \cdot \mathbf{n} \, dA ++ \int_{\partial V(t)} \boldsymbol{\tau}_h^z \cdot \mathbf{n} \, dA. +$$ (momentum-Ftotal) + +Each term on the right-hand side corresponds to a physically distinct force acting on the fluid within the control volume: + +- The first term is the **Coriolis force**, where $ \mathbf{f} $ is the vector Coriolis parameter (e.g., $ f \hat{\mathbf{z}} $ on the sphere). +- The second term represents the **gravitational force**, expressed in terms of the gradient of the gravitational potential $ \Phi(x, y, z, t) $, which may include effects such as tides and self-attraction and loading. +- The third term is the **pressure force**, which acts on the boundary surfaces and is naturally expressed as a surface integral. It gives rise to both horizontal pressure gradients and contributions from sloping surfaces. +- The fourth term represents **horizontal stress forces** across the vertical sides of the control volume, such as those due to lateral friction or subgrid momentum transfer. +- The final term represents **vertical stress forces** (e.g., wind stress at the ocean surface and bottom drag at the seafloor), projected into horizontal momentum and acting across the top and bottom surfaces. + + +Converting to pseudo-height coordinates using $ d\tilde{z} = \rho \, dz $, and following the same structure as for tracers, we obtain the layer-integrated momentum equation: + +$$ +\begin{aligned} +\frac{d}{dt} \int_A h\, \overline{\mathbf{u}}^{\tilde{z}} \, dA +&+ \int_{\partial A} h\, \overline{\mathbf{u} \otimes \mathbf{u}}^{\tilde{z}} \cdot \mathbf{n} \, dl \\ +&+ \int_A \left[ \mathbf{u} (\omega - \omega_r) \right]_{\tilde{z}^{\text{top}}} \, dA +- \int_A \left[ \mathbf{u} (\omega - \omega_r) \right]_{\tilde{z}^{\text{bot}}} \, dA \\ +&= \int_A h\, \overline{\mathbf{f} \times \mathbf{u} + \nabla \Phi}^{\tilde{z}} \, dA \\ +&\quad - \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} p\, \mathbf{n} \, d\tilde{z} \right) dl \\ +&\quad - \int_A \left[ p \nabla \tilde{z} \right]_{\tilde{z}^{\text{top}}} \, dA ++ \int_A \left[ p \nabla \tilde{z} \right]_{\tilde{z}^{\text{bot}}} \, dA \\ +&\quad + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \boldsymbol{\tau}_h \cdot \mathbf{n} \, d\tilde{z} \right) dl \\ +&\quad + \int_A \left[ \boldsymbol{\tau}_h^z \right]_{\tilde{z}^{\text{top}}} \, dA +- \int_A \left[ \boldsymbol{\tau}_h^z \right]_{\tilde{z}^{\text{bot}}} \, dA +\end{aligned} +$$ (momentum-Aint-ztildeavg) + +Taking the limit as $A \rightarrow 0$, we arrive at the local, horizontally continuous form: + +$$ +\begin{aligned} +\frac{\partial}{\partial t} \left( h\, \overline{\mathbf{u}}^{\tilde{z}} \right) +&+ \nabla \cdot \left( h\, \overline{\mathbf{u} \otimes \mathbf{u}}^{\tilde{z}} \right) \\ +&+ \left[ \mathbf{u} (\omega - \omega_r) \right]_{\tilde{z}^{\text{top}}} +- \left[ \mathbf{u} (\omega - \omega_r) \right]_{\tilde{z}^{\text{bot}}} \\ +&= h\, \overline{ \mathbf{f} \times \mathbf{u} + \nabla \Phi }^{\tilde{z}} \\ +&\quad - \nabla \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} p \, d\tilde{z} \right) +- \left[ p \nabla \tilde{z} \right]_{\tilde{z}^{\text{top}}} ++ \left[ p \nabla \tilde{z} \right]_{\tilde{z}^{\text{bot}}} \\ +&\quad + \nabla \cdot \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \boldsymbol{\tau}_h \, d\tilde{z} \right) ++ \left[ \boldsymbol{\tau}_h^z \right]_{\tilde{z}^{\text{top}}} +- \left[ \boldsymbol{\tau}_h^z \right]_{\tilde{z}^{\text{bot}}} +\end{aligned} +$$ (momentum-layered) + +This expression represents conservation of horizontal momentum in a vertical layer, including horizontal advection, vertical momentum fluxes, Coriolis and gravitational forces, pressure gradients (including slope contributions), and stress divergence. + + +## 6. Horizontal Velocity Equation + +We now derive a prognostic equation for the layer-averaged horizontal velocity, starting from the horizontal momentum and mass conservation equations. The goal is to express the equation in terms of the velocity field $\overline{\mathbf{u}}^{\tilde{z}}$ and to isolate the nonlinear advection term in a standard form that can be further decomposed using vector identities. + +Let us define the layer-averaged velocity as + +$$ +\mathbf{U}(x, y, t) \equiv \overline{\mathbf{u}}^{\tilde{z}}. +$$ (layer-avg-velocity) + +We begin with the horizontally continuous, layer-integrated horizontal momentum equation [](momentum-layered): + +$$ +\begin{aligned} +\frac{\partial}{\partial t} \left( h\, \mathbf{U} \right) +&+ \nabla \cdot \left( h\, \overline{\mathbf{u} \otimes \mathbf{u}}^{\tilde{z}} \right) \\ +&+ \left[ \mathbf{u} (\omega - \omega_r) \right]_{\tilde{z}^{\text{top}}} +- \left[ \mathbf{u} (\omega - \omega_r) \right]_{\tilde{z}^{\text{bot}}} \\ +&= h\, \overline{ \mathbf{f} \times \mathbf{u} + \nabla \Phi }^{\tilde{z}} \\ +&\quad - \nabla \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} p \, d\tilde{z} \right) +- \left[ p \nabla \tilde{z} \right]_{\tilde{z}^{\text{top}}} ++ \left[ p \nabla \tilde{z} \right]_{\tilde{z}^{\text{bot}}} \\ +&\quad + \nabla \cdot \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \boldsymbol{\tau}_h \, d\tilde{z} \right) ++ \left[ \boldsymbol{\tau}_h^z \right]_{\tilde{z}^{\text{top}}} +- \left[ \boldsymbol{\tau}_h^z \right]_{\tilde{z}^{\text{bot}}} +\end{aligned} +$$ (momentum-velocity-start) + +We also have the mass conservation equation [](mass-layered): + +$$ +\frac{\partial h}{\partial t} ++ \nabla \cdot (h \mathbf{U}) ++ \left[ \omega - \omega_r \right]_{\tilde{z}^{\text{top}}} +- \left[ \omega - \omega_r \right]_{\tilde{z}^{\text{bot}}} += 0. +$$ (mass-conservation-repeated) + +Multiplying the mass conservation equation by $\mathbf{U}$ and subtracting it from the momentum equation eliminates time derivatives of $h$ and isolates the evolution of velocity. After simplification, we obtain: + +$$ +\begin{aligned} +h \left( +\frac{\partial \mathbf{U}}{\partial t} ++ \mathbf{U} \cdot \nabla \mathbf{U} +\right) +&+ \left[ \mathbf{u} (\omega - \omega_r) \right]_{\tilde{z}^{\text{top}}} +- \mathbf{U} \left[ \omega - \omega_r \right]_{\tilde{z}^{\text{top}}} \\ +&- \left[ \mathbf{u} (\omega - \omega_r) \right]_{\tilde{z}^{\text{bot}}} ++ \mathbf{U} \left[ \omega - \omega_r \right]_{\tilde{z}^{\text{bot}}} += \text{(forces)} +\end{aligned} +$$ (velocity-eq-general) + +The term $ \mathbf{U} \cdot \nabla \mathbf{U} $ may be rewritten using a standard vector identity: + +$$ +\mathbf{U} \cdot \nabla \mathbf{U} += \nabla \left( \frac{1}{2} |\mathbf{U}|^2 \right) ++ (\nabla \times \mathbf{U}) \times \mathbf{U} = \nabla K + \zeta \times \mathbf{U}, +$$ (velocity-vector-identity) +where $K$ is the kinetic energy per unit mass and $\zeta$ is the relative voriticity. + +This decomposition splits the nonlinear advection into a **potential** component (gradient of kinetic energy) and a **rotational** component (advection by relative vorticity). + +We now combine the relative vorticity term $\zeta \times \mathbf{U}$ with the vertically averaged Coriolis force term $\overline{\mathbf{f} \times \mathbf{u}}^{\tilde{z}}$. If we assume that the Coriolis vector $\mathbf{f}$ is uniform within the layer or varies slowly enough to justify replacing $\mathbf{u}$ with its vertical average $\mathbf{U}$, then the two terms may be added directly. This gives rise to a term of the form $\boldsymbol{\eta} \times \mathbf{U}$, where the **absolute vorticity** is defined as + +$$ +\boldsymbol{\eta} = \zeta + \mathbf{f}. +$$ (absolute-vorticity) + +This substitution makes the rotational part of the velocity equation appear in its familiar form from geophysical fluid dynamics, emphasizing the role of absolute vorticity in governing the curvature and rotation of horizontal flow. Substituting into [](velocity-eq-general) and returning to the $\overline{\mathbf{u}}^{\tilde{z}}$ notation yields: + +$$ +\begin{aligned} +\frac{\partial \overline{\mathbf{u}}^{\tilde{z}}}{\partial t} ++ \nabla K ++ \boldsymbol{\eta} \times \overline{\mathbf{u}}^{\tilde{z}} +&= \overline{ \nabla \Phi }^{\tilde{z}} \\ +&\quad - \frac{1}{h} \nabla \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} p\, d\tilde{z} \right) +- \frac{1}{h} \left[ p \nabla \tilde{z} \right]_{\tilde{z}^{\text{top}}} ++ \frac{1}{h} \left[ p \nabla \tilde{z} \right]_{\tilde{z}^{\text{bot}}} \\ +&\quad + \frac{1}{h} \nabla \cdot \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \boldsymbol{\tau}_h \, d\tilde{z} \right) ++ \frac{1}{h} \left[ \boldsymbol{\tau}_h^z \right]_{\tilde{z}^{\text{top}}} +- \frac{1}{h} \left[ \boldsymbol{\tau}_h^z \right]_{\tilde{z}^{\text{bot}}} \\ +&\quad + \frac{1}{h} \sum_{i = \text{top, bot}} \left[ (\mathbf{u} - \overline{\mathbf{u}}^{\tilde{z}}) (\omega - \omega_r) \right]_i +\end{aligned} +$$ (velocity-layered) + +This is a diagnostic equation for the layer-averaged horizontal velocity, written in a form familiar from geophysical fluid dynamics. The right-hand side includes the horizontal pressure gradient, gravitational body force, divergence of horizontal and vertical stresses, and corrections due to unresolved vertical momentum exchange. ## 5. Momentum Equations From 75e62f8861484a1098f4ec1b6aa6998494fb40e1 Mon Sep 17 00:00:00 2001 From: mark-petersen Date: Tue, 3 Jun 2025 15:02:26 -0700 Subject: [PATCH 16/65] move previous sections to OLD at end --- .../omega/doc/design/OmegaV1GoverningEqns.md | 1132 ++++++++--------- 1 file changed, 566 insertions(+), 566 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index ccaba587189e..9719701798b6 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -366,452 +366,410 @@ $$ (velocity-layered) This is a diagnostic equation for the layer-averaged horizontal velocity, written in a form familiar from geophysical fluid dynamics. The right-hand side includes the horizontal pressure gradient, gravitational body force, divergence of horizontal and vertical stresses, and corrections due to unresolved vertical momentum exchange. -## 5. Momentum Equations +## 7. Discrete Equations -Geophysical fluids such as the ocean and atmosphere are rotating and stratified, and horizontal velocities are orders of magnitude larger than vertical velocities. It is therefore convenient to separate the horizontal and vertical as ${\bf u}_{3D} = \left( {\bf u}, w \right)$ and $\nabla_{3D} = \left( \nabla_z, d/dz \right)$ where $z$ is the vertical direction in a local Cartesian coordinate system aligned with gravity (approximately normal to Earth's surface), and $w$ is the vertical velocity. The $z$ subscript on $\nabla_z$ is to remind us that this is the true horizontal gradient (perpendicular to $z$), as opposed to gradients within tilted layers used in the following section. The Earth's gravitational force is included as $\Phi_g = gz $ so that $ \nabla_{3D} \Phi_g = g{\bf k}$. The rotating frame of reference results in the Coriolis force $f {\bf k} \times {\bf u} \equiv f {\bf u}^\perp$, where $f$ is the Coriolis parameter and ${\bf u}^\perp$ is the horizontal velocity vector rotated $90^\circ$ counterclockwise from $\bf u$ in the horizontal plane. See any textbook in the [References](#references) for a full derivation. - - -#### Assumptions - -For a primitive equation ocean model, we assume the fluid is hydrostatic. For Omega we are not making the Boussinesq assumption, so all density-dependent terms use the full density. In particular, the density coefficient of the pressure gradient in [](#continuous-momentum) is not a constant, as it is in primitive equation models like POP and MPAS-Ocean. - -**Hydrostatic:** Beginning with the vertical momentum equation, +The horizontally discretized layered equations are as follows. We have dropped the $r$ in $\nabla_r$ for conciseness, and the operator $\nabla$ from here on means within-layer. $$ -\frac{D \rho w }{D t} - = - - \frac{\partial p}{\partial z} - \rho g + \rho {\bf k} \cdot {\bf D}^u_{3D} + \rho {\bf k} \cdot {\bf F}^u_{3D} -$$ (continuous-vert-mom) - -assume that advection of vertical momentum $Dw/Dt$, dissipation, and forcing are small, and that the first order balance is between pressure gradient and buoyancy, +\frac{\partial u_{e,k}}{\partial t} + \left[ \frac{{\bf k} \cdot \nabla \times u_{e,k} +f_v}{[h_{i,k}]_v}\right]_e\left([h_{i,k}]_e u_{e,k}^{\perp}\right) ++ \frac{ \left[ \omega_{i,k}^{top} \right]_e u_{e,k}^{top} +- \left[ \omega_{i,k+1}^{top} \right]_e u_{e,k+1}^{top}}{ \left[h_{i,k}\right]_e } += +- \left[ \alpha_{i,k} \right]_e \nabla p_{i,k} - \nabla \Phi_{i,k} +- \nabla K_{i,k} + { \bf D}^u_{e,k} + {\bf F}^u_{e,k} +$$ (discrete-momentum) $$ -\frac{\partial p}{\partial z} - = - \rho g. -$$ (hydrostatic-balance) -We then integrate from $z$ to the surface $z^{surf}$ to obtain the hydrostatic pressure equation, +\frac{\partial h_{i,k}}{\partial t} + \nabla \cdot \left([h_{i,k}]_e u_{e,k}\right) ++ \omega_{i,k}^{top} - \omega_{i,k+1}^{top} += Q^h_{i,k} +$$ (discrete-thickness) $$ -p(x,y,z) = p^{surf}(x,y) + \int_{z}^{z^{surf}} \rho g dz'. -$$ (continuous-hydrostatic-pressure) +\frac{\partial h_{i,k} \varphi_{i,k}}{\partial t} + \nabla \cdot \left(u_{e,k} [h_{i,k} \varphi_{i,k}]_e \right) ++ \varphi_{i,k}^{top} \omega_{i,k}^{top} - \varphi_{i,k+1}^{top}\omega_{i,k+1}^{top} += D^\varphi_{i,k} + Q^\varphi_{i,k} +$$ (discrete-tracer) -The constitutive equation is the equation of state, +$$ +p_{i,k} = p_{i}^{surf} + \sum_{k'=1}^{k-1} g h_{i,k'} + \frac{1}{2} g h_{i,k} +$$ (discrete-pressure) $$ -\rho = f_{eos}(p,\Theta,S). -$$ (continuous-eos) +\alpha_{i,k} = f_{eos}(p_{i,k},\Theta_{i,k},S_{i,k}) +$$ (discrete-eos) -where conservative temperature, $\Theta$, and absolute salinity, $S$, are examples of tracers $\varphi$. +$$ +z_{i,k}^{top} = z_{i}^{floor} + \sum_{k'=k}^{K_{max}} \alpha_{i,k'}h_{i,k'} +$$ (discrete-z) -The Boussinesq primitive equations also make an incompressibility assumption, which is identical to an assumption of constant density. Non-Boussinesq models do not make that assumption and are not explicitly incompressible. However, the mass conservation equation [](continuous-mass), along with an equation of state for sea water where density only varies slightly, results in a fluid that is nearly incompressible. +The subscripts $i$, $e$, and $v$ indicate cell, edge, and vertex locations and subscript $k$ is the layer. Square brackets $[\cdot]_e$ and $[\cdot]_v$ are quantities that are interpolated to edge and vertex locations. For vector quantities, $u_{e,k}$ denotes the normal component at the center of the edge, while $u_{e,k}^\perp$ denotes the tangential component. We have switched from $\varphi_{i,k}^{bot}$ to the identical $\varphi_{i,k+1}^{top}$ for all variables in order for the notation to match the array names in the code. The superscripts $surf$ and $floor$ are the surface and floor of the full ocean column. All variables without these superscripts indicate that they are layer-averaged, as defined in [](def-mass-thickness-average), and can be considered to represent a mid-layer value in the vertical. The mid-layer location is equivalently the average in $z$, $p$, or $h$ (mass), since density $\rho_{i,k}$ is considered constant in the cell. -A concern when using the full, compressible continuity equation is that this might support acoustic waves with wave speeds on the order of 1500 m/s, requiring an extremely small time step. According to [Griffies and Adcroft (2008)](https://agupubs.onlinelibrary.wiley.com/doi/10.1029/177GM18) and [de Szoeke and Samelson (2002)](https://doi.org/10.1175/1520-0485(2002)032%3C2194:TDBTBA%3E2.0.CO;2), the hydrostatic approximation removes vertical sound waves, leaving only barotropic acoustic modes called Lamb waves. Fortunately, the Lamb waves can be "subsumed" into the external gravity mode because the scale height of the ocean is much larger (200 km) than its depth (~5 km). This suggests that Lamb waves should not produce any additional constraints on our barotropic time step (though we should keep an eye on this). For more details on Lamb waves, see [Dukowicz (2013)](https://doi.org/10.1175/MWR-D-13-00148.1) +We refer to these as the discrete equations, but time derivatives remain continuous. The time discretization is described in the [time stepping design document](TimeStepping.md). The velocity, mass-thickness, and tracers are solved prognostically using [](discrete-momentum), [](discrete-thickness), [](discrete-tracer). At the new time, these variables are used to compute pressure [](discrete-pressure), specific volume [](discrete-eos), and z-locations [](discrete-z). Additional variables are computed diagnostically at the new time: $u^{\perp}$, $K$, $\omega$, $z^{mid}$, $\Phi$, etc. The initial geopotential is simply $\Phi=gz$, but additional gravitational terms may be added later. -#### Momentum Advection +The horizontal operators $\nabla$, $\nabla\cdot$, and $\nabla \times$ are now in their discrete form. In the TRiSK design, gradients ($\nabla$) map cell centers to edges; divergence ($\nabla \cdot$) maps edge quantities to cells; and curl ($\nabla \times$) maps edges to vertices. The exact form of operators and interpolation stencils remain the same as those given in [Omega-0 design document](OmegaV0ShallowWater.md#operator-formulation). The discrete version of terms common with Omega-0, such as advection, potential vorticity, and $\nabla K$, can be found in [Omega-0 Momentum Terms](OmegaV0ShallowWater.md#momentum-terms) and [Omega-0 Thickness and Tracer Terms](OmegaV0ShallowWater.md#thickness-and-tracer-terms). -Here we expand the momentum advection in continuous form. This will be a useful reference when we expand the layered version in a later section. The momentum advection, -$$ -\nabla_{3D} \cdot \left( \rho {\bf u}_{3D} \otimes {\bf u}_{3D} \right) - = \nabla_{3D} \cdot \left( \rho {\bf u}_{3D} {\bf u}_{3D}^T \right), -$$ (advection) +### Momentum Dissipation -may be written out fully as the three $(x,y,z)$ cartesian components coordinates as +The discretized momentum dissipation ${ \bf D}^u_{e,k}$ may include these terms, which are detailed in the subsections below. $$ -&\partial_x \left( \rho u u\right) + \partial_y \left( \rho v u\right) + \partial_z \left( \rho w u\right) \\ -&\partial_x \left( \rho u v\right) + \partial_y \left( \rho v v\right) + \partial_z \left( \rho w v\right) \\ -&\partial_x \left( \rho u w\right) + \partial_y \left( \rho v w\right) + \partial_z \left( \rho w w\right) . -$$ (advection-written-out) +{ \bf D}^u_{e,k} = \nu_2 \nabla^2 u_{e,k} - \nu_4 \nabla^4 u_{e,k} + +\frac{\partial }{\partial z} \left( \nu_v \frac{\partial u_{e,k}}{\partial z} \right) +$$ (discrete-mom-del2) -The third line is the vertical component, and was assumed to be small in the previous section. The first two lines are the horizontal components may be written as +#### Laplacian dissipation (del2) $$ -\nabla_z \cdot \left( \rho {\bf u} \otimes {\bf u} \right) + \partial_z \left( w \rho {\bf u}\right) -$$ (adv2d) - -where ${\bf u} = (u,v)$ is the horizontal velocity vector and $\nabla_z=(\partial_x,\partial_y)$ is the horizontal gradient, and the tensor product ${\bf u} \otimes {\bf u}={\bf u} {\bf u}^T$. Using the product rule, this can be expanded as + \nu_2 \nabla^2 u_{e,k} = \nu_2 \left( \nabla D_{i,k} - \nabla^{\perp} \zeta_{v,k} \right) +$$ (discrete-mom-del2) -$$ -\nabla_z \cdot \left( \rho {\bf u} \otimes {\bf u} \right) + \partial_z \left( w \rho {\bf u}\right) -&= \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} -+ {\bf u} \cdot \nabla_z \left( \rho {\bf u} \right) -+ \partial_z \left( w \rho {\bf u}\right) \\ -&= \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} -+ \left( {\bf u} \cdot \nabla_z \rho \right) {\bf u} -+ \left( {\bf u} \cdot \nabla_z {\bf u} \right) \rho -+ \partial_z \left( w \rho {\bf u}\right) -$$ (adv2d-prod) +where $D$ is divergence and $\zeta$ is relative vorticity. See [Omega V0 Section 3.3.4](OmegaV0ShallowWater.md#del2-momentum-dissipation) -The term ${\bf u} \cdot \nabla_z {\bf u}$ may be replaced with the vector identity +#### Biharmonic dissipation (del4) +As in [Omega V0 Section 3.3.5](OmegaV0ShallowWater.md#del4-momentum-dissipation), biharmonic momentum dissipation is computed with two applications of the Del2 operator above. $$ -\begin{aligned} -{\bf u} \cdot \nabla_z {\bf u} -&= (\nabla_z \times {\bf u}) \times {\bf u} + \nabla_z \frac{|{\bf u}|^2}{2} \\ -&= \left( \boldsymbol{k} \cdot (\nabla_z \times {\bf u})\right) -\left( \boldsymbol{k} \times {\bf u} \right) + \nabla_z \frac{|{\bf u}|^2}{2} \\ -&= \zeta {\bf u}^{\perp} + \nabla_z K, -\end{aligned} -$$ (advection-identity) - -where $\zeta$ is relative vorticity and $K$ is kinetic energy. This step separates the horizontal advection into non-divergent and non-rotational components, which is useful in the final TRiSK formulation. - -#### Final Continuous Equations - -The final form of the continuous conservation equations for a non-Boussinesq, hydrostatic ocean are + - \nu_4 \nabla^4 u_{e,k} += - \nu_4 \nabla^2 \left( \nabla^2 u_{e,k} \right) +$$ (discrete-mom-del4) -momentum: +#### Vertical momentum diffusion +Vertical derivatives may be computed with either $z$ or $p$ as the independent variable, $$ -\frac{\partial (\rho \mathbf{u})}{\partial t} -+ \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} -+ {\bf u} \cdot \nabla_z \left( \rho {\bf u} \right) -+ \partial_z \left( w \rho \mathbf{u} \right) -+ f \rho {\bf u}^\perp - = - \nabla_z p - - \rho\nabla_z \Phi -+ \rho{\bf D}^u + \rho{\bf F}^u -$$ (continuous-momentum-final) +\frac{\partial }{\partial z} \left( \nu_v \frac{\partial u}{\partial z} \right) += \frac{\partial }{\partial p}\frac{\partial p}{\partial z} \left( \nu_v \frac{\partial u}{\partial p} \frac{\partial p}{\partial z}\right) += \rho g^2\frac{\partial }{\partial p} \left( \nu_v \rho \frac{\partial u}{\partial p} \right). +$$ (mom-vert-diff-z-p) -mass: +We choose to use $z$ values for simplicity. A single vertical derivative of an arbitrary variable $\varphi$ at mid-layer is $$ -\frac{\partial \rho }{\partial t} - + \nabla_z \cdot \left( \rho {\bf u} \right) - + \frac{\partial}{\partial z} \left( \rho w \right) -= 0 -$$ (continuous-mass-final) +\frac{\partial \varphi_k}{\partial z} += \frac{\varphi_k^{top} - \varphi_k^{bot} }{z_k^{top} - z_k^{bot}} +$$ (vertderiv1) -tracers: +and a second derivative is $$ -\frac{\partial \rho \varphi}{\partial t} - + \nabla_z \cdot \left( \rho \varphi {\bf u} \right) - + \frac{\partial}{\partial z} \left( \rho \varphi w \right) -= D^\varphi + Q^\varphi -$$ (continuous-tracer-final) +\frac{\partial }{\partial z} \left( +\frac{\partial \varphi_k}{\partial z} \right) += +\frac{1}{z_{k}^{top} - z_{k+1}^{top}} \left( +\frac{\varphi_{k-1} - \varphi_k }{z_{k-1}^{mid} - z_k^{mid}} + - +\frac{\varphi_{k} - \varphi_{k+1} }{z_{k}^{mid} - z_{k+1}^{mid}} +\right) +$$ (vertderiv2) -equation of state: +Thus, the vertical momentum diffusion is $$ -\rho = f_{eos}(p,\Theta,S). -$$ (continuous-eos-final) +\frac{\partial }{\partial z} \left( \nu_v \frac{\partial u_{e,k}}{\partial z} \right) += +\frac{1}{z_{e,k}^{top} - z_{e,k+1}^{top}} \left( +\nu_{e,k}^{top} +\frac{u_{e,k-1} - u_k }{z_{e,k-1}^{mid} - z_k^{mid}} + - +\nu_{e,k+1}^{top} +\frac{u_{e,k} - u_{e,k+1} }{z_{e,k}^{mid} - z_{e,k+1}^{mid}} +\right) +$$ (discrete-mom-vert-diff) -hydrostatic pressure: +This stencil is applied as an implicit tri-diagonal solve at the end of the time step. See details in the [tridiagonal solver design document](TridiagonalSolver) and forthcoming vertical mixing design document. -$$ -p(x,y,z) = p^{surf}(x,y) + \int_{z}^{z^{surf}} \rho g dz'. -$$ (continuous-hydrostatic-pressure-final) +### Momentum Forcing +The discretized momentum forcing ${ \bf F}^u_{e,k}$ may include: -Here the $\nabla_z$ operators are exactly horizontal; we expand terms for tilted layers in the following section. The momentum diffusion terms include Laplacian (del2), biharmonic (del4), and vertical viscosity, +#### Wind Forcing -$$ -{\bf D}^u -= \nu_2 \nabla_z^2 {\bf u} - \nu_4 \nabla_z^4 {\bf u} - + \frac{\partial }{\partial z} \left( \nu_v \frac{\partial {\bf u}}{\partial z} \right) -$$ (continuous-h_mom_diff) -and may also include a Rayleigh drag and eventually parameterizations. Momentum forcing is due to wind stress and bottom drag. Similarly, the tracer diffusion terms include Laplacian (del2), and vertical viscosity, +The wind forcing is applied as a top boundary condition during implicit vertical mixing as $$ -D^\varphi = - \nabla_z\cdot\left(\rho \kappa_2 \nabla_z\varphi \right) -+ \rho \frac{\partial }{\partial z} - \left( \kappa_v \frac{\partial \varphi}{\partial z} \right), -$$ (continuous-v_tr_diff) +\frac{\tau_{e}}{[ h_{i,k}]_e} +$$ -and may also include a biharmonic (del4) term and parameterizations such as Redi mixing. Sources and sinks include surface fluxes from the atmosphere and land, and bio-geo-chemical reactions. -All of the diffusion and forcing terms are written in more detail with the [Discrete Equations](#discrete-equations) below. +where $\tau$ is the wind stress in Pa. Since the mass-thickness $h$ is in kg/s/m$^2$, this results in the desired units of m/s$^2$ for a momentum tendency term. -## 4. Layered Equations +#### Bottom Drag -Here we derive the layered equations by discretizing in the vertical, while the horizontal remains continuous. We discretize by integrating in the vertical from the lower surface $z=z_k^{bot}(x,y)$ to $z=z_k^{top}(x,y)$ for the layer with index $k$, as described in [Ringler et al. 2013](https://www.sciencedirect.com/science/article/pii/S1463500313000760) Appendix A.2. Equivalently, we can vertically integrate from a deeper pressure surface $p=p_k^{bot}(x,y)$ (higher pressure) to $p=p_k^{top}(x,y)$ where $p$ and $z$ are related by the hydrostatic pressure equation [](#continuous-hydrostatic-pressure). +Bottom Drag is applied as a bottom boundary condition during implicit vertical mixing as -### Layer Integration +$$ +- C_D \frac{u_{e,k}\left|u_{e,k}\right|}{[\alpha_{i,k}h_{i,k}]_e} . +$$ (discrete-mom-bottom) -For non-Boussinesq layered equations we begin by defining the pressure-thickness of layer $k$ as +The units of specific volume times mass-thickness $\alpha h$ are length (m), so that the full term has units of m/s$^2$. -$$ -h_k(x,y,t) - \equiv \int_{z_k^{bot}}^{z_k^{top}} \rho dz = \frac{1}{g} \int_{p_k^{top}}^{p_k^{bot}} dp. -$$ (def-h) +#### Rayleigh Drag -The letter $h$ is used because this is the familiar variable for thickness in Boussinesq primitive equations. In the Boussinesq case the thickness equation describes conservation of volume because $h_k^{Bouss}$ is volume normalized by horizontal area, resulting in a height, +Rayleigh drag is a simple drag applied to every cell. It is used to ensure stability during spin-up. $$ -h_k^{Bouss}(x,y,t) - \equiv \int_{z_k^{bot}}^{z_k^{top}} dz. -$$ (def-h-bouss) +- Ra \, u_{e,k} +$$ (discrete-mom-Ra) -In this document we remain with the more general non-Boussinesq case, where $h_k$ is mass per unit area (kg/m$^2$). Since horizontal cell area remains constant in time, the thickness equation is a statement of conservation of mass. +### Tracer Diffusion -Throughout this derivation we can write all equations equivalently in $z$-coordinates (depth), or in $p$-coordinates (pressure). From the hydrostatic equation, any quantity $\varphi$ may be integrated in $z$ or $p$ as +The discretized tracer diffusion $ D^\varphi_{i,k}$ may include these terms, which are detailed below. Here $\kappa_2$ and $\kappa_4$ are written in front of the operator for simplicity. $$ -\int_{z_k^{bot}}^{z_k^{top}} \varphi \rho dz -= \frac{1}{g} \int_{p_k^{top}}^{p_k^{bot}} \varphi dp. -$$(depth-pressure-integral-conversion) +D^\varphi_{i,k} = \kappa_2 \nabla^2 \varphi_{i,k} - \kappa_4 \nabla^4 \varphi_{i,k} + +\frac{\partial }{\partial z} \left( \kappa_v \frac{\partial \varphi_{i,k}}{\partial z} \right) +$$ (discrete-tracer-diff) -We can convert from an interfacial depth surface $z^{top}$ to a pressure surface $p^{top}$ with the hydrostatic equation [](continuous-hydrostatic-pressure-final): +#### Laplacian diffusion (del2) +The Laplacian may be written as the divergence of the gradient, $$ -p^{top}(x,y) = p^{surf}(x,y) + \int_{z^{top}(x,y)}^{z^{surf}(x,y)} \rho g dz -$$ (def-p-surf) + h_{i,k} \nabla \cdot \left( \kappa_{2,e,k} \nabla \varphi_{i,k} \right). +$$ (discrete-tracer-del2) -where $z^{surf}$ is the sea surface height and $p^{surf}$ is the surface pressure at $z^{surf}$ imposed by the atmosphere or floating ice. Note that pressure increases with depth. This means that positive $p$ points downward, so that the $top$ and $bot$ extents of the integration limits are flipped in [](#depth-pressure-integral-conversion). +See [Omega V0 Section 3.3.2](OmegaV0ShallowWater.md#del2-tracer-diffusion) for details of this calculation. -For any three-dimensional quantity $\varphi(x,y,z,t)$, the mass-thickness-averaged quantity in layer $k$ is defined as +#### Biharmonic diffusion (del4) +The biharmonic is a Laplacian operator applied twice, $$ -\varphi_k(x,y,t) -\equiv \frac{\int_{z_k^{bot}}^{z_k^{top}} \rho \varphi dz}{\int_{z_k^{bot}}^{z_k^{top}} \rho dz} -= \frac{\int_{z_k^{bot}}^{z_k^{top}} \rho \varphi dz}{h_k} -$$(def-mass-thickness-average) + - h_{i,k} \nabla \cdot \left( \kappa_{4,e,k} \nabla +\right[ +\nabla \cdot \left( \nabla \varphi_{i,k} \right) +\left] + \right). +$$ (discrete-tracer-del4) -At this point our derivation has not made any assumptions about density, and may be used for both Boussinesq and non-Boussinesq fluids. A Boussinesq derivation would now assume small variations in density and replace $\rho(x,y,z,t)$ with a constant $\rho_0$ everywhere but the pressure gradient coefficient. In that case $\rho$ divides out in [](#def-mass-thickness-average) the Boussinesq layer quantities would simply be thickness-weighted averages. +Each of these operators are written as horizontal stencils in the [Omega V0 Operator Formulation Section](OmegaV0ShallowWater.md#operator-formulation) -We can now derive the layered equations. Integrate the continuous equations [](continuous-momentum-final), [](continuous-mass-final), [](continuous-tracer-final) in $z$ from $z_k^{bot}$ to $z_k^{top}$, +#### Vertical tracer diffusion +As discussed above in the [momentum section](#vertical-momentum-diffusion), vertical derivatives may be written in terms of $z$ or $p$, $$ -\int_{z_k^{bot}}^{z_k^{top}} \frac{\partial \rho {\bf u}}{\partial t} dz -+ \int_{z_k^{bot}}^{z_k^{top}} \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} dz -+ \int_{z_k^{bot}}^{z_k^{top}} {\bf u} \cdot \nabla_z \left( \rho {\bf u} \right) dz -+ \int_{z_k^{bot}}^{z_k^{top}} \frac{\partial }{\partial z} \left( \rho {\bf u} w \right) dz -+ \int_{z_k^{bot}}^{z_k^{top}} - f \rho {\bf u}^\perp dz - = \int_{z_k^{bot}}^{z_k^{top}} \left[- \nabla_z p - - \rho \nabla_z \Phi -+ \rho {\bf D}^u + \rho {\bf F}^u \right] dz -$$ (z-integration-momentum) +\frac{\partial }{\partial z} \left( \kappa_v \frac{\partial {\bf \varphi}}{\partial z} \right) += \rho g^2 \frac{\partial }{\partial p} \left( \kappa_v \rho \frac{\partial {\bf \varphi}}{\partial p} \right) +$$ (discrete-tracer-vertdiff) +and $z$ is chosen. The second derivative stencil is $$ -\frac{\partial }{\partial t} \int_{z_k^{bot}}^{z_k^{top}} \rho dz - +\nabla_z \cdot \left( \int_{z_k^{bot}}^{z_k^{top}} \rho {\bf u} dz \right) - + \int_{z_k^{bot}}^{z_k^{top}}\frac{\partial}{\partial z} \left( \rho w \right) dz -= 0 -$$ (z-integration-mass) +h_{i,k} \frac{\partial }{\partial z} \left( \kappa_v \frac{\partial \varphi_{i,k}}{\partial z} \right) += +\frac{h_{i,k}}{z_{i,k}^{top} - z_{i,k+1}^{top}} \left( +\kappa_{i,k}^{top} +\frac{\varphi_{i,k-1} - \varphi_k }{z_{i,k-1}^{mid} - z_k^{mid}} + - +\kappa_{i,k+1}^{top} +\frac{\varphi_{i,k} - \varphi_{i,k+1} }{z_{i,k}^{mid} - z_{i,k+1}^{mid}} +\right). +$$ (discrete-tracer-vert-diff) -$$ -\frac{\partial }{\partial t} \int_{z_k^{bot}}^{z_k^{top}} \rho \varphi dz - + \nabla_z \cdot \left( \int_{z_k^{bot}}^{z_k^{top}} \rho \varphi {\bf u} dz \right) - + \int_{z_k^{bot}}^{z_k^{top}} \frac{\partial}{\partial z} \left( \rho \varphi w \right) dz -= \int_{z_k^{bot}}^{z_k^{top}} \left( D^\varphi + Q^\varphi \right) dz -$$ (z-integration-tracers) +Like the momentum term, this is applied using a tridiagonal solver in the +[tridiagonal solver](TridiagonalSolver) in the implicit vertical mixing step. -This results in conservation equations that are valid over the layer. The momentum variables are simply vertically averaged. Tracer variables are vertically mass-averaged, as defined in [](def-mass-thickness-average). +### MPAS-Ocean Equations of Motion -In order to deal with nonlinear terms where we take the integrals of products, we may assume that the variables are piecewise constant in the vertical within each layer, i.e. +The MPAS-Ocean layered formulation are provided here for reference. MPAS-Ocean solves for momentum, thickness, and tracers at layer $k$. These are continuous in the horizontal and discrete in the vertical. $$ -a(x,y,z,t) = a_k(x,y,t) \in [z_k^{bot}, z_k^{top}). -$$ (discrete-a) - -Then variables may come out of the integral as needed. For example, we can handle the advection terms by making this assumptoin for ${\bf u}$. +\frac{\partial {\bf u}_k}{\partial t} ++ \frac{1}{2}\nabla \left| {\bf u}_k \right|^2 ++ ( {\bf k} \cdot \nabla \times {\bf u}_k) {\bf u}^\perp_k ++ f{\bf u}^{\perp}_k ++ \frac{w_k^{bot}{\bf u}_k^{bot} - w_k^{top}{\bf u}_k^{top}}{h_k} += +- \frac{1}{\rho_0}\nabla p_k +- \frac{\rho g}{\rho_0}\nabla z^{mid}_k ++ \nu_h\nabla^2{\bf u}_k ++ \frac{\partial }{\partial z} \left( \nu_v \frac{\partial {\bf u}_k}{\partial z} \right), +$$ (mpaso-continuous-momentum) $$ - \int_{z_k^{bot}}^{z_k^{top}} \nabla_z \cdot \left( \rho \varphi {\bf u} \right) dz -&= \nabla_z \cdot \left( \int_{z_k^{bot}}^{z_k^{top}} \rho \varphi {\bf u} dz \right)\\ -&= \nabla_z \cdot \left( {\bf u}_k \int_{z_k^{bot}}^{z_k^{top}} \rho \varphi dz \right)\\ -&= \nabla_z \cdot \left( {\bf u}_k h_k \varphi_k \right).\\ -$$ (tracer-adv) - -Likewise, for the horizontal momentum advection, +\frac{\partial h_k}{\partial t} + \nabla \cdot \left( h_k^e {\bf u}_k \right) + w_k^{bot} - w_k^{top} = 0, +$$ (mpaso-continuous-thickness) $$ -\int_{z_k^{bot}}^{z_k^{top}} \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} dz -+ \int_{z_k^{bot}}^{z_k^{top}} {\bf u} \cdot \nabla_z \left( \rho {\bf u} \right) dz -&= \left( \nabla_z \cdot {\bf u}_k \right) \int_{z_k^{bot}}^{z_k^{top}} \rho {\bf u} dz -+ {\bf u}_k \cdot \nabla_z \left( \int_{z_k^{bot}}^{z_k^{top}}\rho {\bf u} dz\right) \\ -&= \left( \nabla_z \cdot {\bf u}_k \right) h_k {\bf u}_k -+ {\bf u}_k \cdot \nabla_z \left( h_k {\bf u}_k \right) \\ -$$ (mom-adv) - -Our governing equations are now discrete in the vertical, but remain continuous in the horizontal and in time. +\frac{\partial h_k\varphi_k}{\partial t} + \nabla \cdot \left( h_k^e\varphi_k^e {\bf u}_k \right) ++ \varphi_k^{bot} w_k^{bot} - \varphi_k^{top} w_k^{top} += \nabla\cdot\left(h_k^e \kappa_h \nabla\varphi_k \right) ++ h_k \frac{\partial }{\partial z} \left( \kappa_v \frac{\partial \varphi_k}{\partial z} \right). +$$ (mpaso-continuous-tracer) +The layer thickness $h$, vertical velocity $w$, pressure $p$, and tracer $\varphi$, are cell-centered quantities, while the horizontal velocity ${\bf u}$ and $e$ superscript are variables interpolated to the cell edges. -This results in the layered conservation equations. This system is now discrete in the vertical, but remains continuous in the horizontal and in time. -$$ -\frac{\partial h_k {\bf u}_k}{\partial t} -+ \left( \nabla_z \cdot {\bf u}_k \right) h_k {\bf u}_k -+ {\bf u}_k \cdot \nabla_z \left( h_k {\bf u}_k \right) -+ \left[ \rho_k w_k {\bf u}_k \right]^{top} - \left[ \rho_k w_k {\bf u}_k \right]^{bot} -+ f h_k {\bf u}_k^{\perp} -= -- \nabla_z p_k -- h_k \nabla_z \Phi_k -+ h_k {\bf D}_k^u + h_k {\bf F}_k^u -$$ (layered-momentum-1) +## 8. Variable Definitions -$$ -\frac{\partial h_k}{\partial t} + \nabla_z \cdot \left(h_k {\bf u}_k\right) + \left[ \rho_k w_k \right]^{top} - \left[ \rho_k w_k \right]^{bot}= Q^h_k -$$ (layered-mass-1) +Table 1. Definition of variables. Geometric variables may be found in the [Omega V0 design document, Table 1](OmegaV0ShallowWater.md#variable-definitions) -$$ -\frac{\partial h_k \varphi_k}{\partial t} + \nabla_z \cdot \left(h_k {\bf u}_k \varphi_k\right) -+ \left[ \varphi_k \rho_k w_k \right]^{top} - \left[ \varphi_k \rho_k w_k \right]^{bot} -= D^\varphi_k + Q^\varphi_k. -$$ (layered-tracer-1) +| symbol | name | units | location | name in code | notes | +|---------------------|-----------------------------|----------|-|---------|-------------------------------------------------------| +|$D_{i,k}$ | divergence | 1/s | cell | Divergence |$D=\nabla\cdot\bf u$ | +|${\bf D}^u_{k} $, $ D^u_{e,k} $ | momentum dissipation terms | m/s$^2$ | edge | |see [Momentum Dissipation Section](#momentum-dissipation) | +|$ D_{e,k}^\varphi$ | tracer diffusion terms | | cell | |see [Tracer Diffusion Section](#tracer-diffusion) | +|$f_v$ | Coriolis parameter| 1/s | vertex | FVertex | $f = 2\Omega sin(\phi)$, $\Omega$ rotation rate, $\phi$ latitude| +|${\bf F}^u_{k} $, $ F^u_{e,k} $ | momentum forcing | m/s$^2$ | edge | | see [Momentum Forcing Section](#momentum-forcing) | +|$f_{eos}$ | equation of state | - | any | function call | | +|$g$ | gravitational acceleration | m/s$^2$ | constant | Gravity | +|$h_{i,k}$ | layer mass-thickness | kg/m$^2$ | cell | LayerThickness | see [](def-h) | +|$k$ | vertical index | | +|${\bf k}$ | vertical unit vector | | +|$K_{min}$ | shallowest active layer | | +|$K_{max}$ | deepest active layer | | +|$K_{i,k}$ | kinetic energy | m$^2$/s$^2$ | cell | KineticEnergyCell |$K = \left\| {\bf u} \right\|^2 / 2$ | +|$p_{i,k}$ | pressure | Pa | cell | Pressure | see [](discrete-pressure) | +|$p^{floor}_i$ | bottom pressure | Pa | cell | PFloor | pressure at ocean floor +|$p^{surf}_i$ | surface pressure | Pa | cell | PSurface | due to atm. pressure, sea ice, ice shelves +|$q_{v,k}$ | potential vorticity | 1/m/s | vertex | PotentialVorticity |$q = \left(\zeta+f\right)/h$ | +|$Q^h_{i,k}$ | mass source and sink terms| kg/s/m$^2$ | cell | | +|$Q^\varphi_{i,k}$ | tracer source and sink terms|kg/s/m$^2$ or similar| cell | | +|$Ra$ | Rayleigh drag coefficient | 1/s | constant | | | +|$S_{i,k}$ | salinity | PSU | cell | Salinity | a tracer $\varphi$ | +|$t$ | time | s | none | | | +|${\bf u}_k$ | velocity, vector form | m/s | - | | | +|$u_{e,k}$ | velocity, normal to edge | m/s | edge | NormalVelocity | | +|$u^\perp_{e,k}$ | velocity, tangential to edge | m/s | edge | TangentialVelocity |${\bf u}^\perp = {\bf k} \times {\bf u}$| +|$\alpha_{i,k}$ | specific volume | m$^3$/kg | cell | SpecificVolume | $v = 1/\rho$ | +|$w_{i,k}$ | vertical velocity | m/s | cell | VerticalVelocity | volume transport per m$^2$ | +|$z$ | vertical coordinate | m | - | | positive upward | +|$z^{top}_{i,k}$ | layer top z-location | m | cell | ZTop | see [](discrete-z) | +|$z^{mid}_{i,k}$ | layer mid-depth z-location | m | cell | ZMid | +|$z^{surf}_{i}$ | ocean surface, i.e. sea surface height | m | cell | ZSurface | same as SSH in MPAS-Ocean | +|$z^{floor}_{i}$ | ocean floor z-location | m | cell | ZFloor | -bottomDepth from MPAS-Ocean | +|$\zeta_{v,k}$ | relative vorticity| 1/s | vertex | RelativeVorticity |$\zeta={\bf k} \cdot \left( \nabla \times {\bf u}\right)$ | +|$\Theta_{i,k}$ | conservative temperature | C | cell | Temperature | a tracer $\varphi$ | +|$\kappa_2$| tracer diffusion | m$^2$/s | cell | | | +|$\kappa_4$| biharmonic tracer diffusion | m$^4$/s | cell | | | +|$\kappa_v$| vertical tracer diffusion | m$^2$/s | cell | | | +|$\nu_2$ | horizontal del2 viscosity | m$^2$/s | edge | | | +|$\nu_4$ | horizontal biharmonic (del4) viscosity | m$^4$/s | edge | | | +|$\nu_v$| vertical momentum diffusion | m$^2$/s | edge | | | +|$\varphi_{i,k}$ | tracer | kg/m$^3$ or similar | cell | | e.g. $\Theta$, $S$ | +|$\rho_{i,k}$ | density | kg/m$^3$ | cell | Density | +|$\rho_0$ | Boussinesq reference density | kg/m$^3$ | | constant | +|$\tau_i$ | wind stress | Pa=N/m$^2$ | edge | SurfaceStress | +|$\Phi_{i,k}$ | geopotential| | cell | Geopotential |$\partial \Phi / \partial z = g$ for gravity | +|$\omega$ | mass transport | kg/s/m^2 | cell | VerticalTransport |$\omega=\rho w$| -The term $\left( \nabla_z \cdot {\bf u}_k \right) h_k {\bf u}_k$ is assumed to be small for seawater, which is nearly incompressible. In the Boussinesq approximation this term is formally zero due to the incompressibility assumption. The remaining terms from the momentum material derivative may be rewritten as -$$ -\frac{\partial h_k {\bf u}_k}{\partial t} -+ {\bf u}_k \cdot \nabla_z \left( h_k {\bf u}_k \right) -&= h_k \frac{\partial {\bf u}_k}{\partial t} -+ {\bf u}_k\frac{\partial h_k} {\partial t} -+ h_k {\bf u}_k \cdot \nabla_z \left( {\bf u}_k \right) -+ {\bf u}_k \cdot \nabla_z \left( h_k \right) {\bf u}_k\\ -&= h_k \frac{\partial {\bf u}_k}{\partial t} -+ {\bf u}_k\frac{\partial h_k} {\partial t} -+ h_k {\bf u}_k \cdot \nabla_z {\bf u}_k -+ {\bf u}_k \cdot \nabla_z \left( h_k \right) {\bf u}_k \\ -&= h_k \left[ \frac{\partial {\bf u}_k}{\partial t} -+ {\bf u}_k \cdot \nabla_z {\bf u}_k \right] -+ {\bf u}_k \left[\frac{\partial h_k} {\partial t} -+ {\bf u}_k \cdot \nabla_z h_k \right] \\ -&= h_k \left[ \frac{\partial {\bf u}_k}{\partial t} -+ \zeta {\bf u}^{\perp} + \nabla_z K - \right] -+ {\bf u}_k \left[\frac{\partial h_k} {\partial t} -+ {\bf u}_k \cdot \nabla_z h_k \right] \\ -$$ (mom-h-adv) +## 9. Verification and Testing -The terms in the second square brackets drop out due to conservation of mass (note: I need to check on vertical thickness flux and source terms). We now divide the momentum equation by $h_k$ to obtain +Capability and testing are similar to [Petersen et al. 2015](http://www.sciencedirect.com/science/article/pii/S1463500314001796). The following tests are in idealized domains and do not require surface fluxes or surface restoring. For the following tests to show results comparable to those published with other models, the full dynamic sequence of density, pressure, momentum, and advection must work correctly. The successful completion of the following tests is a validation of the primitive equation functions in Omega 1.0. All of the following tests may exercise a linear equation of state or the nonlinear TEOS10. The first four tests quantify the anomalous mixing caused by the numerical schemes. The first five are on cartesian planes with regular hexagon meshes. -$$ -\frac{\partial {\bf u}_k}{\partial t} -+ \zeta {\bf u}^{\perp} + \nabla_z K -+ \frac{\left[ \rho_k w_k {\bf u}_k \right]^{top} - \left[ \rho_k w_k {\bf u}_k \right]^{bot}}{h_k} -+ f {\bf u}_k^{\perp} -= -- \nabla_z p_k -- \nabla_z \Phi_k -+ {\bf D}_k^u + {\bf F}_k^u -$$ (layered-momentum-2) +### Lock Exchange (Optional) +The Lock Exchange is the simplest possible test of a primitive equation model. There is an analytic formulation for the wave propagation speed. It is listed as optional because the Overflow tests the same dynamics. +See [Petersen et al. 2015](http://www.sciencedirect.com/science/article/pii/S1463500314001796) and the compass `lock_exchange` case. -One could derive the layered equations by integrating in pressure rather than $z$. In that case, one would have multiplied [](z-integration-momentum), [](z-integration-mass), [](z-integration-tracers) by $g$ and expressed the integrals in terms of pressure, with integration limits from $p_k^{top}$ to $p_k^{bot}$. -Derivations of ocean model equations with pressure as the vertical variable may be found in [de Szoeke and Samelson 2002](https://journals.ametsoc.org/view/journals/phoc/32/7/1520-0485_2002_032_2194_tdbtba_2.0.co_2.xml) and [Losch et al. 2003](https://journals.ametsoc.org/view/journals/phoc/34/1/1520-0485_2004_034_0306_hsacgc_2.0.co_2.xml). +### Overflow +The Overflow test case adds bathymetry to the Lock Exchange. It is a particularly effective test of vertical mass and tracer advection, and vertical mixing. It is useful to compare different vertical coordinates, like level (z- or p-level) versus terrain-following (sigma). +See [Petersen et al. 2015](http://www.sciencedirect.com/science/article/pii/S1463500314001796) and the compass `overflow` case. -The vertical advection terms use the fundamental theorem of calculus to integrate a derivative in $z$, resulting in boundary conditions at the layer interfaces. This makes intuitive sense as a mass balance. For example, in the absence of horizontal advection and sources, the mass equation is simply -$$ -\frac{\partial h_k}{\partial t} -= \left[ \rho_k w_k \right]^{bot} - \left[ \rho_k w_k \right]^{top}. -$$ (layered-mass-vert-adv) +### Internal Gravity Wave +The internal gravity wave tests horizontal and vertical advection. +See [Petersen et al. 2015](http://www.sciencedirect.com/science/article/pii/S1463500314001796) and the `internal_wave` case in both compass and polaris. -This states that the change in mass in the layer is the incoming mass from below minus the outgoing mass above, since the vertical velocity $w$ is positive upwards. The vertical advection of momentum and tracers have a similar interpretation. +### Baroclinic Channel +This is the first test to add the Coriolis force and uses a three-dimensional domain. It is designed to result in an eddying simulation at sufficiently high resolution. This tests the combination of Coriolis and pressure gradient forces that produce geostrophic balance, as well as horizontal advection and dissipation for numerical stability. +See [Petersen et al. 2015](http://www.sciencedirect.com/science/article/pii/S1463500314001796) and the `baroclinic_channel` case in both compass and polaris. -### General Vertical Coordinate +### Seamount with zero velocity. +This is a 3D domain with a seamount in the center, where temperature and salinity are stratified in the vertical and constant in the horizontal. The test is simply that an initial velocity field of zero remains zero. For z-level layers the velocity trivially remains zero because the horizontal pressure gradient is zero. For tilted layers, this is a test of the pressure gradient error and the velocity is never exactly zero. This is a common test for sigma-coordinate models like ROMS because the bottom layers are extremely tilted along the seamount, but it is a good test for any model with tilted layers. Omega will use slightly tilted layers in p-star mode (pressure layers oscillating with SSH) and severely tilted layers below ice shelves, just like MPAS-Ocean. See [Ezer et al. 2002](https://www.sciencedirect.com/science/article/pii/S1463500302000033), [Haidvogel et al. 1993](https://journals.ametsoc.org/view/journals/phoc/23/11/1520-0485_1993_023_2373_nsofaa_2_0_co_2.xml), [Shchepetkin and McWilliams 2003](https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2001JC001047), and previous MPAS-Ocean [confluence page](https://acme-climate.atlassian.net/wiki/spaces/OCNICE/blog/2015/11/19/40501447/MPAS-O+Sigma+coordinate+test+sea+mount). -The vertical layer interfaces $(z_k^{bot}, z_k^{top})$ (or equivalently $(p_k^{bot}, p_k^{top})$) can vary as a function of $(x,y,t)$. Thus, these equations describe a general vertical coordinate, and these interface surfaces may be chosen arbitrarily by the user. See [Adcroft and Hallberg 2006](https://www.sciencedirect.com/science/article/pii/S1463500305000090) Section 2 and [Griffies et al (2000)](http://sciencedirect.com/science/article/pii/S1463500300000147) Section 2. It is convenient to introduce a new variable, the coordinate $r(x,y,z,t)$, where $r$ is constant at the middle of each layer. To be specific, we could design $r$ to be the layer index $k$ at the mid-depth of the layer. That is, define the mid-depth as +### Cosine Bell on the Sphere +This test uses a fixed horizontal velocity field to test horizontal tracer advection. It is repeated from [Omega-0 design document](OmegaV0ShallowWater) and is important to conduct again as we convert Omega to a layered primitive-equation model. See `cosine_bell` case in both compass and polaris. -$$ -z_k^{mid}(x,y,t) = \frac{z_k^{bot}(x,y,t) + z_k^{top}(x,y,t)}{2} -$$ (def-z) -and generate the function $r$ such that +### Merry-Go-Round +This is an exact test for horizontal and vertical tracer advection. A fixed velocity field is provided, and a tracer distribution is advected around a vertical plane. See the `merry_go_round` test in compass, and the results on the [merry-go-round pull request](https://github.com/MPAS-Dev/compass/pull/108) and [compass port pull request](https://github.com/MPAS-Dev/compass/pull/452). -$$ -r(x,y,z_k^{mid}(x,y,t),t) = k -$$ (def-r) -and interpolate linearly in the vertical between mid-layers. When we write the layered form of the equations, we must take into account of the tilted layers using the chain rule. -We now rewrite derivatives in order to convert from horizontal coordinates to tilted coordinates. Let $(x,y)$ be the original horizontal coordinates, which are perpendicular to $z$, and the horizontal gradient be written as $\nabla_z=(\partial/\partial x, \partial/\partial y)$, as above. Now define a tilted coordinate system using the layers defined by $r$, where the within-layer horizontal coordinates are $(x',y')$ and the along-layer gradient is written as $\nabla_r=(\partial/\partial x', \partial/\partial y')$. We construct $r$ to be monotonic in $z$, so we can invert it as $z(x',y',r,t)$. Now horizontal derivatives along the tilted direction $x'$ for any field $\varphi(x,y,z,t)$ can be expanded using the chain rule as +## References +This section is for references without webpage links. These are mostly textbooks. -$$ -\frac{\partial }{\partial x'} \left[ \varphi(x(x'),y(y'),z(x',y',r,t),t) \right] -= \frac{\partial \varphi}{\partial x}\frac{\partial x}{\partial x'} + \frac{\partial \varphi}{\partial z} \frac{\partial z}{\partial x'} -$$ (dvarphidx) +- Cushman‐Roisin, B., & Beckers, J.M. (2011). Introduction to Geophysical Fluid Dynamics: Physical and Numerical Aspects. Academic Press. +- Gill, A. E. (2016). Atmosphere—Ocean dynamics. Elsevier. +- Kundu, P.K., Cohen, I.M., Dowling D.R. (2016) Fluid Mechanics 6th Edition, Academic Press. +- Pedlosky, J. (1987). Geophysical Fluid Dynamics (Vol. 710). Springer. +- Vallis, G. K. (2017). Atmospheric and oceanic fluid dynamics. Cambridge University Press. -We may define the tilted horizontal variable $x'$ as we please. The simplest definition is $x'(x)\equiv x$. Then $\partial x / \partial x'=1$. Rearranging [](#dvarphidx) and repeating for $y$, -$$ -\begin{aligned} -\frac{\partial \varphi}{\partial x} &= -\frac{\partial \varphi}{\partial x'} -- \frac{\partial \varphi}{\partial z} \frac{\partial z}{\partial x'}\\ -\frac{\partial \varphi}{\partial y} &= -\frac{\partial \varphi}{\partial y'} -- \frac{\partial \varphi}{\partial z} \frac{\partial z}{\partial y'}. -\end{aligned} -$$ (dvarphidxy) +## OLD: Momentum Equations -This may be written in vector form as +Geophysical fluids such as the ocean and atmosphere are rotating and stratified, and horizontal velocities are orders of magnitude larger than vertical velocities. It is therefore convenient to separate the horizontal and vertical as ${\bf u}_{3D} = \left( {\bf u}, w \right)$ and $\nabla_{3D} = \left( \nabla_z, d/dz \right)$ where $z$ is the vertical direction in a local Cartesian coordinate system aligned with gravity (approximately normal to Earth's surface), and $w$ is the vertical velocity. The $z$ subscript on $\nabla_z$ is to remind us that this is the true horizontal gradient (perpendicular to $z$), as opposed to gradients within tilted layers used in the following section. The Earth's gravitational force is included as $\Phi_g = gz $ so that $ \nabla_{3D} \Phi_g = g{\bf k}$. The rotating frame of reference results in the Coriolis force $f {\bf k} \times {\bf u} \equiv f {\bf u}^\perp$, where $f$ is the Coriolis parameter and ${\bf u}^\perp$ is the horizontal velocity vector rotated $90^\circ$ counterclockwise from $\bf u$ in the horizontal plane. See any textbook in the [References](#references) for a full derivation. -$$ -\nabla_z \varphi = \nabla_r \varphi - \frac{\partial \varphi}{\partial z} \nabla_r z. -$$ (dvarphidnabla) -### Pressure Gradient +#### Assumptions -For most terms, we can safely assume $\nabla_z \approx \nabla_r$ because the vertical to horizontal aspect ratio even at very high horizontal resolution is on the order of $\epsilon ~ 10^{-3}$ (thought may need to re-assess this assumption if we decide to use strongly sloped layers). This applies, for example, to the curl operator uset to compute the relative vorticity and the gradient applied to the kinetic energy in [](z-integration-momentum). +For a primitive equation ocean model, we assume the fluid is hydrostatic. For Omega we are not making the Boussinesq assumption, so all density-dependent terms use the full density. In particular, the density coefficient of the pressure gradient in [](#continuous-momentum) is not a constant, as it is in primitive equation models like POP and MPAS-Ocean. -The exception is the pressure gradient term. This is becasue strong vertical and week horizontal pressure gradients mean that both terms in the chain rule [](dvarphidnabla) are of the same order and must be retained. Substituting pressure for $\varphi$ in [](#dvarphidnabla), +**Hydrostatic:** Beginning with the vertical momentum equation, $$ -\begin{aligned} --\frac{1}{\rho} \nabla_z p -&=-\frac{1}{\rho} \nabla_r p +\frac{1}{\rho} \frac{\partial p}{\partial z} \nabla_r z \\ -&=-\frac{1}{\rho} \nabla_r p - g \nabla_r z \\ -&=-v \nabla_r p - \nabla_r \Phi_g\\ -\end{aligned} -$$ (gradp) +\frac{D \rho w }{D t} + = + - \frac{\partial p}{\partial z} - \rho g + \rho {\bf k} \cdot {\bf D}^u_{3D} + \rho {\bf k} \cdot {\bf F}^u_{3D} +$$ (continuous-vert-mom) -where we have substituted hydrostatic balance [](hydrostatic-balance), specific volume $\alpha\equiv 1/\rho$, and $\Phi_g=gz$. +assume that advection of vertical momentum $Dw/Dt$, dissipation, and forcing are small, and that the first order balance is between pressure gradient and buoyancy, -The general form of the geopotential may include the Earth's gravity, tidal forces, and self attraction and loading (SAL), and may be written as +$$ +\frac{\partial p}{\partial z} + = - \rho g. +$$ (hydrostatic-balance) +We then integrate from $z$ to the surface $z^{surf}$ to obtain the hydrostatic pressure equation, $$ -\Phi = \Phi_g + \Phi_{tides} + \Phi_{SAL} + c -$$ (def-geopotential) +p(x,y,z) = p^{surf}(x,y) + \int_{z}^{z^{surf}} \rho g dz'. +$$ (continuous-hydrostatic-pressure) -where $c$ is an arbitrary constant. Therefore, the pressure gradient and geopotential gradient may be written together as +The constitutive equation is the equation of state, $$ -\begin{aligned} --v \nabla_z p - \nabla_z \Phi -&= -v \nabla_z p - \nabla_z \Phi_{tides} - \nabla_z \Phi_{SAL}\\ -&=-v \nabla_r p - \nabla_r \Phi_g - \nabla_r \Phi_{tides} - \nabla_r \Phi_{SAL}\\ -&=-v \nabla_r p - \nabla_r \Phi. \\ -\end{aligned} -$$ (gradp-gradphi) +\rho = f_{eos}(p,\Theta,S). +$$ (continuous-eos) -On the first line, note that $\nabla_z \Phi_g=\nabla_z gz=0$. For tides and SAL we assume that these forces do not vary in the vertical due to the small aspect ratio of the ocean, so that the vertical derivative in the expansion [](dvarphidnabla) is zero. This means that $\nabla_z \Phi_{tides}=\nabla_r \Phi_{tides}$ and $\nabla_z \Phi_{SAL}=\nabla_r \Phi_{SAL}$. -For versions 1.0 and 2.0 of Omega we only consider a constant gravitational force, and will not include tides and SAL. Further details will be provided in the forthcoming pressure gradient design document. +where conservative temperature, $\Theta$, and absolute salinity, $S$, are examples of tracers $\varphi$. -See [Adcroft and Hallberg 2006](https://www.sciencedirect.com/science/article/pii/S1463500305000090) eqn. 1 and [Griffies et al](http://sciencedirect.com/science/article/pii/S1463500300000147) eqn 2 for additional examples of the pressure gradient in tilted coordinates. The additional terms due to the expansion of $\nabla_z$ to $\nabla_r$ in the rest of the equations are small and are ignored. +The Boussinesq primitive equations also make an incompressibility assumption, which is identical to an assumption of constant density. Non-Boussinesq models do not make that assumption and are not explicitly incompressible. However, the mass conservation equation [](continuous-mass), along with an equation of state for sea water where density only varies slightly, results in a fluid that is nearly incompressible. -Some publications state that the transition from Boussinesq to non-Boussinesq equations is accompanied by a change from z-coordinate to pressure-coordinates. However, we use a general vertical coordinate, so the vertical may be referenced to $z$ or $p$. In a purely z-coordinate model like POP, only the $\nabla p$ term is used in [](gradp). In a purely p-coordinate model, only $\nabla z$ remains, as described in [de Szoeke and Samelson 2002](https://journals.ametsoc.org/view/journals/phoc/32/7/1520-0485_2002_032_2194_tdbtba_2.0.co_2.xml). In a general vertical coordinate model the layer interface placement is up to the user's specification, and so both terms are kept. +A concern when using the full, compressible continuity equation is that this might support acoustic waves with wave speeds on the order of 1500 m/s, requiring an extremely small time step. According to [Griffies and Adcroft (2008)](https://agupubs.onlinelibrary.wiley.com/doi/10.1029/177GM18) and [de Szoeke and Samelson (2002)](https://doi.org/10.1175/1520-0485(2002)032%3C2194:TDBTBA%3E2.0.CO;2), the hydrostatic approximation removes vertical sound waves, leaving only barotropic acoustic modes called Lamb waves. Fortunately, the Lamb waves can be "subsumed" into the external gravity mode because the scale height of the ocean is much larger (200 km) than its depth (~5 km). This suggests that Lamb waves should not produce any additional constraints on our barotropic time step (though we should keep an eye on this). For more details on Lamb waves, see [Dukowicz (2013)](https://doi.org/10.1175/MWR-D-13-00148.1) -### Vertical Transport -The integration in [](#z-integration-momentum) to [](#z-integration-tracers) changes the vertical velocity $w$ in m/s to a vertical mass-thickness transport $\omega=\rho w$ in kg/s/m$^2$. Here $w$ is the Latin letter and $\omega$ is the Greek letter omega. One can think of fluid velocity $w$ as a volume transport, normalized by area, in units of length per time. Analogously, $\omega$ is mass-thickness transport, which is mass transport per unit area (kg/s/m$^2$). The variables $w$ and $\omega$ have the same sign convention of upward (positive $z$) for positive transport. +#### Momentum Advection -### Final Layered Equations +Here we expand the momentum advection in continuous form. This will be a useful reference when we expand the layered version in a later section. The momentum advection, -mrp temp: +$$ +\nabla_{3D} \cdot \left( \rho {\bf u}_{3D} \otimes {\bf u}_{3D} \right) + = \nabla_{3D} \cdot \left( \rho {\bf u}_{3D} {\bf u}_{3D}^T \right), +$$ (advection) -The momentum equation can be rewritten using the product rule on $\rho {\bf u}$, mass conservation, and dividing by $\rho$, as: +may be written out fully as the three $(x,y,z)$ cartesian components coordinates as $$ -\frac{D {\bf u}_{3D} }{D t} \equiv -\frac{\partial {\bf u}_{3D}}{\partial t} -+ {\bf u}_{3D}\cdot \nabla_{3D} {\bf u}_{3D} - = - \frac{1}{\rho} \nabla_{3D} p - - \nabla_{3D} \Phi -+ {\bf D}^u + {\bf F}^u -$$ (continuous-momentum-rho) +&\partial_x \left( \rho u u\right) + \partial_y \left( \rho v u\right) + \partial_z \left( \rho w u\right) \\ +&\partial_x \left( \rho u v\right) + \partial_y \left( \rho v v\right) + \partial_z \left( \rho w v\right) \\ +&\partial_x \left( \rho u w\right) + \partial_y \left( \rho v w\right) + \partial_z \left( \rho w w\right) . +$$ (advection-written-out) -mrp temp: +The third line is the vertical component, and was assumed to be small in the previous section. The first two lines are the horizontal components may be written as -The advection term may be separated into horizontal and vertical parts as +$$ +\nabla_z \cdot \left( \rho {\bf u} \otimes {\bf u} \right) + \partial_z \left( w \rho {\bf u}\right) +$$ (adv2d) + +where ${\bf u} = (u,v)$ is the horizontal velocity vector and $\nabla_z=(\partial_x,\partial_y)$ is the horizontal gradient, and the tensor product ${\bf u} \otimes {\bf u}={\bf u} {\bf u}^T$. Using the product rule, this can be expanded as $$ -{\bf u}_{3D}\cdot \nabla_{3D} {\bf u}_{3D} -= -{\bf u} \cdot \nabla_z {\bf u} + w \frac{\partial {\bf u}}{\partial z}. -$$ (advection-3d2d) +\nabla_z \cdot \left( \rho {\bf u} \otimes {\bf u} \right) + \partial_z \left( w \rho {\bf u}\right) +&= \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} ++ {\bf u} \cdot \nabla_z \left( \rho {\bf u} \right) ++ \partial_z \left( w \rho {\bf u}\right) \\ +&= \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} ++ \left( {\bf u} \cdot \nabla_z \rho \right) {\bf u} ++ \left( {\bf u} \cdot \nabla_z {\bf u} \right) \rho ++ \partial_z \left( w \rho {\bf u}\right) +$$ (adv2d-prod) -The horizontal component may be replaced with the vector identity +The term ${\bf u} \cdot \nabla_z {\bf u}$ may be replaced with the vector identity $$ \begin{aligned} @@ -825,365 +783,407 @@ $$ (advection-identity) where $\zeta$ is relative vorticity and $K$ is kinetic energy. This step separates the horizontal advection into non-divergent and non-rotational components, which is useful in the final TRiSK formulation. +#### Final Continuous Equations + +The final form of the continuous conservation equations for a non-Boussinesq, hydrostatic ocean are + momentum: $$ -\frac{\partial {\bf u}_k}{\partial t} -+ q_k h_k {\bf u}_k^{\perp} -+ \frac{\left[ \alpha_k \omega_k {\bf u}_k \right]^{top} - \left[ \alpha_k \omega_k {\bf u}_k \right]^{bot}}{h_k} -= -- \alpha_k \nabla_r p_k - \nabla_r \Phi_k -- \nabla_r K_k -+ {\bf D}_k^u + {\bf F}_k^u -$$ (layered-momentum) +\frac{\partial (\rho \mathbf{u})}{\partial t} ++ \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} ++ {\bf u} \cdot \nabla_z \left( \rho {\bf u} \right) ++ \partial_z \left( w \rho \mathbf{u} \right) ++ f \rho {\bf u}^\perp + = - \nabla_z p + - \rho\nabla_z \Phi ++ \rho{\bf D}^u + \rho{\bf F}^u +$$ (continuous-momentum-final) mass: $$ -\frac{\partial h_k}{\partial t} + \nabla_r \cdot \left(h_k {\bf u}_k\right) + \omega_k^{top} - \omega_k^{bot}= Q^h_k -$$ (layered-mass) +\frac{\partial \rho }{\partial t} + + \nabla_z \cdot \left( \rho {\bf u} \right) + + \frac{\partial}{\partial z} \left( \rho w \right) += 0 +$$ (continuous-mass-final) tracers: $$ -\frac{\partial h_k \varphi_k}{\partial t} + \nabla_r \cdot \left(h_k {\bf u}_k \varphi_k\right) -+ \varphi_k^{top} \omega_k^{top} - \varphi_k^{bot}\omega_k^{bot} -= D^\varphi_k + Q^\varphi_k. -$$ (layered-tracer) +\frac{\partial \rho \varphi}{\partial t} + + \nabla_z \cdot \left( \rho \varphi {\bf u} \right) + + \frac{\partial}{\partial z} \left( \rho \varphi w \right) += D^\varphi + Q^\varphi +$$ (continuous-tracer-final) -The superscripts $top$ and $bot$ mean that the layered variable is interpolated to the top and bottom layer interface, respectively. In [](layered-momentum) the non-divergent momentum advection and Coriolis term were combined and expressed in terms of the potential vorticity $q_k$, +equation of state: $$ - \zeta_k {\bf u}_k^\perp + f {\bf u}_k^\perp = \frac{\zeta_k + f }{h_k}h_k{\bf u}_k^\perp \equiv q_k h_k {\bf u}^\perp_k. -$$ (potential-vort-adv) - -Surface fluxes $Q^h_k$ have been added to the mass equation for precipitation, evaporation, and river runoff. These fluxes, like mass transport $\omega$, are in units of kg/s/m$^2$. +\rho = f_{eos}(p,\Theta,S). +$$ (continuous-eos-final) +hydrostatic pressure: -## 5. Discrete Equations +$$ +p(x,y,z) = p^{surf}(x,y) + \int_{z}^{z^{surf}} \rho g dz'. +$$ (continuous-hydrostatic-pressure-final) -The horizontally discretized layered equations are as follows. We have dropped the $r$ in $\nabla_r$ for conciseness, and the operator $\nabla$ from here on means within-layer. +Here the $\nabla_z$ operators are exactly horizontal; we expand terms for tilted layers in the following section. The momentum diffusion terms include Laplacian (del2), biharmonic (del4), and vertical viscosity, $$ -\frac{\partial u_{e,k}}{\partial t} + \left[ \frac{{\bf k} \cdot \nabla \times u_{e,k} +f_v}{[h_{i,k}]_v}\right]_e\left([h_{i,k}]_e u_{e,k}^{\perp}\right) -+ \left[ \frac{ \alpha_{i,k}^{top}\omega_{i,k}^{top}} {h_{i,k}}\right]_e u_{e,k}^{top} -- \left[ \frac{ \alpha_{i,k+1}^{top}\omega_{i,k+1}^{top}} {h_{i,k}} \right]_e u_{e,k+1}^{top} -= -- \left[ \alpha_{i,k} \right]_e \nabla p_{i,k} - \nabla \Phi_{i,k} -- \nabla K_{i,k} + { \bf D}^u_{e,k} + {\bf F}^u_{e,k} -$$ (discrete-momentum) +{\bf D}^u += \nu_2 \nabla_z^2 {\bf u} - \nu_4 \nabla_z^4 {\bf u} + + \frac{\partial }{\partial z} \left( \nu_v \frac{\partial {\bf u}}{\partial z} \right) +$$ (continuous-h_mom_diff) +and may also include a Rayleigh drag and eventually parameterizations. Momentum forcing is due to wind stress and bottom drag. Similarly, the tracer diffusion terms include Laplacian (del2), and vertical viscosity, $$ -\frac{\partial h_{i,k}}{\partial t} + \nabla \cdot \left([h_{i,k}]_e u_{e,k}\right) -+ \omega_{i,k}^{top} - \omega_{i,k+1}^{top} -= Q^h_{i,k} -$$ (discrete-thickness) +D^\varphi = + \nabla_z\cdot\left(\rho \kappa_2 \nabla_z\varphi \right) ++ \rho \frac{\partial }{\partial z} + \left( \kappa_v \frac{\partial \varphi}{\partial z} \right), +$$ (continuous-v_tr_diff) -$$ -\frac{\partial h_{i,k} \varphi_{i,k}}{\partial t} + \nabla \cdot \left(u_{e,k} [h_{i,k} \varphi_{i,k}]_e \right) -+ \varphi_{i,k}^{top} \omega_{i,k}^{top} - \varphi_{i,k+1}^{top}\omega_{i,k+1}^{top} -= D^\varphi_{i,k} + Q^\varphi_{i,k} -$$ (discrete-tracer) +and may also include a biharmonic (del4) term and parameterizations such as Redi mixing. Sources and sinks include surface fluxes from the atmosphere and land, and bio-geo-chemical reactions. +All of the diffusion and forcing terms are written in more detail with the [Discrete Equations](#discrete-equations) below. -$$ -p_{i,k} = p_{i}^{surf} + \sum_{k'=1}^{k-1} g h_{i,k'} + \frac{1}{2} g h_{i,k} -$$ (discrete-pressure) +## OLD: Layered Equations -$$ -\alpha_{i,k} = f_{eos}(p_{i,k},\Theta_{i,k},S_{i,k}) -$$ (discrete-eos) +Here we derive the layered equations by discretizing in the vertical, while the horizontal remains continuous. We discretize by integrating in the vertical from the lower surface $z=z_k^{bot}(x,y)$ to $z=z_k^{top}(x,y)$ for the layer with index $k$, as described in [Ringler et al. 2013](https://www.sciencedirect.com/science/article/pii/S1463500313000760) Appendix A.2. Equivalently, we can vertically integrate from a deeper pressure surface $p=p_k^{bot}(x,y)$ (higher pressure) to $p=p_k^{top}(x,y)$ where $p$ and $z$ are related by the hydrostatic pressure equation [](#continuous-hydrostatic-pressure). + +### Layer Integration + +For non-Boussinesq layered equations we begin by defining the pressure-thickness of layer $k$ as $$ -z_{i,k}^{top} = z_{i}^{floor} + \sum_{k'=k}^{K_{max}} \alpha_{i,k'}h_{i,k'} -$$ (discrete-z) +h_k(x,y,t) + \equiv \int_{z_k^{bot}}^{z_k^{top}} \rho dz = \frac{1}{g} \int_{p_k^{top}}^{p_k^{bot}} dp. +$$ (def-h) -The subscripts $i$, $e$, and $v$ indicate cell, edge, and vertex locations and subscript $k$ is the layer. Square brackets $[\cdot]_e$ and $[\cdot]_v$ are quantities that are interpolated to edge and vertex locations. For vector quantities, $u_{e,k}$ denotes the normal component at the center of the edge, while $u_{e,k}^\perp$ denotes the tangential component. We have switched from $\varphi_{i,k}^{bot}$ to the identical $\varphi_{i,k+1}^{top}$ for all variables in order for the notation to match the array names in the code. The superscripts $surf$ and $floor$ are the surface and floor of the full ocean column. All variables without these superscripts indicate that they are layer-averaged, as defined in [](def-mass-thickness-average), and can be considered to represent a mid-layer value in the vertical. The mid-layer location is equivalently the average in $z$, $p$, or $h$ (mass), since density $\rho_{i,k}$ is considered constant in the cell. +The letter $h$ is used because this is the familiar variable for thickness in Boussinesq primitive equations. In the Boussinesq case the thickness equation describes conservation of volume because $h_k^{Bouss}$ is volume normalized by horizontal area, resulting in a height, -We refer to these as the discrete equations, but time derivatives remain continuous. The time discretization is described in the [time stepping design document](TimeStepping.md). The velocity, mass-thickness, and tracers are solved prognostically using [](discrete-momentum), [](discrete-thickness), [](discrete-tracer). At the new time, these variables are used to compute pressure [](discrete-pressure), specific volume [](discrete-eos), and z-locations [](discrete-z). Additional variables are computed diagnostically at the new time: $u^{\perp}$, $K$, $\omega$, $z^{mid}$, $\Phi$, etc. The initial geopotential is simply $\Phi=gz$, but additional gravitational terms may be added later. +$$ +h_k^{Bouss}(x,y,t) + \equiv \int_{z_k^{bot}}^{z_k^{top}} dz. +$$ (def-h-bouss) -The horizontal operators $\nabla$, $\nabla\cdot$, and $\nabla \times$ are now in their discrete form. In the TRiSK design, gradients ($\nabla$) map cell centers to edges; divergence ($\nabla \cdot$) maps edge quantities to cells; and curl ($\nabla \times$) maps edges to vertices. The exact form of operators and interpolation stencils remain the same as those given in [Omega-0 design document](OmegaV0ShallowWater.md#operator-formulation). The discrete version of terms common with Omega-0, such as advection, potential vorticity, and $\nabla K$, can be found in [Omega-0 Momentum Terms](OmegaV0ShallowWater.md#momentum-terms) and [Omega-0 Thickness and Tracer Terms](OmegaV0ShallowWater.md#thickness-and-tracer-terms). +In this document we remain with the more general non-Boussinesq case, where $h_k$ is mass per unit area (kg/m$^2$). Since horizontal cell area remains constant in time, the thickness equation is a statement of conservation of mass. +Throughout this derivation we can write all equations equivalently in $z$-coordinates (depth), or in $p$-coordinates (pressure). From the hydrostatic equation, any quantity $\varphi$ may be integrated in $z$ or $p$ as -### Momentum Dissipation +$$ +\int_{z_k^{bot}}^{z_k^{top}} \varphi \rho dz += \frac{1}{g} \int_{p_k^{top}}^{p_k^{bot}} \varphi dp. +$$(depth-pressure-integral-conversion) -The discretized momentum dissipation ${ \bf D}^u_{e,k}$ may include these terms, which are detailed in the subsections below. +We can convert from an interfacial depth surface $z^{top}$ to a pressure surface $p^{top}$ with the hydrostatic equation [](continuous-hydrostatic-pressure-final): $$ -{ \bf D}^u_{e,k} = \nu_2 \nabla^2 u_{e,k} - \nu_4 \nabla^4 u_{e,k} + -\frac{\partial }{\partial z} \left( \nu_v \frac{\partial u_{e,k}}{\partial z} \right) -$$ (discrete-mom-del2) +p^{top}(x,y) = p^{surf}(x,y) + \int_{z^{top}(x,y)}^{z^{surf}(x,y)} \rho g dz +$$ (def-p-surf) -#### Laplacian dissipation (del2) +where $z^{surf}$ is the sea surface height and $p^{surf}$ is the surface pressure at $z^{surf}$ imposed by the atmosphere or floating ice. Note that pressure increases with depth. This means that positive $p$ points downward, so that the $top$ and $bot$ extents of the integration limits are flipped in [](#depth-pressure-integral-conversion). + +For any three-dimensional quantity $\varphi(x,y,z,t)$, the mass-thickness-averaged quantity in layer $k$ is defined as $$ - \nu_2 \nabla^2 u_{e,k} = \nu_2 \left( \nabla D_{i,k} - \nabla^{\perp} \zeta_{v,k} \right) -$$ (discrete-mom-del2) +\varphi_k(x,y,t) +\equiv \frac{\int_{z_k^{bot}}^{z_k^{top}} \rho \varphi dz}{\int_{z_k^{bot}}^{z_k^{top}} \rho dz} += \frac{\int_{z_k^{bot}}^{z_k^{top}} \rho \varphi dz}{h_k} +$$(def-mass-thickness-average) -where $D$ is divergence and $\zeta$ is relative vorticity. See [Omega V0 Section 3.3.4](OmegaV0ShallowWater.md#del2-momentum-dissipation) +At this point our derivation has not made any assumptions about density, and may be used for both Boussinesq and non-Boussinesq fluids. A Boussinesq derivation would now assume small variations in density and replace $\rho(x,y,z,t)$ with a constant $\rho_0$ everywhere but the pressure gradient coefficient. In that case $\rho$ divides out in [](#def-mass-thickness-average) the Boussinesq layer quantities would simply be thickness-weighted averages. -#### Biharmonic dissipation (del4) -As in [Omega V0 Section 3.3.5](OmegaV0ShallowWater.md#del4-momentum-dissipation), biharmonic momentum dissipation is computed with two applications of the Del2 operator above. +We can now derive the layered equations. Integrate the continuous equations [](continuous-momentum-final), [](continuous-mass-final), [](continuous-tracer-final) in $z$ from $z_k^{bot}$ to $z_k^{top}$, $$ - - \nu_4 \nabla^4 u_{e,k} -= - \nu_4 \nabla^2 \left( \nabla^2 u_{e,k} \right) -$$ (discrete-mom-del4) +\int_{z_k^{bot}}^{z_k^{top}} \frac{\partial \rho {\bf u}}{\partial t} dz ++ \int_{z_k^{bot}}^{z_k^{top}} \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} dz ++ \int_{z_k^{bot}}^{z_k^{top}} {\bf u} \cdot \nabla_z \left( \rho {\bf u} \right) dz ++ \int_{z_k^{bot}}^{z_k^{top}} \frac{\partial }{\partial z} \left( \rho {\bf u} w \right) dz ++ \int_{z_k^{bot}}^{z_k^{top}} + f \rho {\bf u}^\perp dz + = \int_{z_k^{bot}}^{z_k^{top}} \left[- \nabla_z p + - \rho \nabla_z \Phi ++ \rho {\bf D}^u + \rho {\bf F}^u \right] dz +$$ (z-integration-momentum) -#### Vertical momentum diffusion -Vertical derivatives may be computed with either $z$ or $p$ as the independent variable, +$$ +\frac{\partial }{\partial t} \int_{z_k^{bot}}^{z_k^{top}} \rho dz + +\nabla_z \cdot \left( \int_{z_k^{bot}}^{z_k^{top}} \rho {\bf u} dz \right) + + \int_{z_k^{bot}}^{z_k^{top}}\frac{\partial}{\partial z} \left( \rho w \right) dz += 0 +$$ (z-integration-mass) $$ -\frac{\partial }{\partial z} \left( \nu_v \frac{\partial u}{\partial z} \right) -= \frac{\partial }{\partial p}\frac{\partial p}{\partial z} \left( \nu_v \frac{\partial u}{\partial p} \frac{\partial p}{\partial z}\right) -= \rho g^2\frac{\partial }{\partial p} \left( \nu_v \rho \frac{\partial u}{\partial p} \right). -$$ (mom-vert-diff-z-p) +\frac{\partial }{\partial t} \int_{z_k^{bot}}^{z_k^{top}} \rho \varphi dz + + \nabla_z \cdot \left( \int_{z_k^{bot}}^{z_k^{top}} \rho \varphi {\bf u} dz \right) + + \int_{z_k^{bot}}^{z_k^{top}} \frac{\partial}{\partial z} \left( \rho \varphi w \right) dz += \int_{z_k^{bot}}^{z_k^{top}} \left( D^\varphi + Q^\varphi \right) dz +$$ (z-integration-tracers) -We choose to use $z$ values for simplicity. A single vertical derivative of an arbitrary variable $\varphi$ at mid-layer is +This results in conservation equations that are valid over the layer. The momentum variables are simply vertically averaged. Tracer variables are vertically mass-averaged, as defined in [](def-mass-thickness-average). + +In order to deal with nonlinear terms where we take the integrals of products, we may assume that the variables are piecewise constant in the vertical within each layer, i.e. $$ -\frac{\partial \varphi_k}{\partial z} -= \frac{\varphi_k^{top} - \varphi_k^{bot} }{z_k^{top} - z_k^{bot}} -$$ (vertderiv1) +a(x,y,z,t) = a_k(x,y,t) \in [z_k^{bot}, z_k^{top}). +$$ (discrete-a) -and a second derivative is +Then variables may come out of the integral as needed. For example, we can handle the advection terms by making this assumptoin for ${\bf u}$. $$ -\frac{\partial }{\partial z} \left( -\frac{\partial \varphi_k}{\partial z} \right) -= -\frac{1}{z_{k}^{top} - z_{k+1}^{top}} \left( -\frac{\varphi_{k-1} - \varphi_k }{z_{k-1}^{mid} - z_k^{mid}} - - -\frac{\varphi_{k} - \varphi_{k+1} }{z_{k}^{mid} - z_{k+1}^{mid}} -\right) -$$ (vertderiv2) + \int_{z_k^{bot}}^{z_k^{top}} \nabla_z \cdot \left( \rho \varphi {\bf u} \right) dz +&= \nabla_z \cdot \left( \int_{z_k^{bot}}^{z_k^{top}} \rho \varphi {\bf u} dz \right)\\ +&= \nabla_z \cdot \left( {\bf u}_k \int_{z_k^{bot}}^{z_k^{top}} \rho \varphi dz \right)\\ +&= \nabla_z \cdot \left( {\bf u}_k h_k \varphi_k \right).\\ +$$ (tracer-adv) -Thus, the vertical momentum diffusion is +Likewise, for the horizontal momentum advection, $$ -\frac{\partial }{\partial z} \left( \nu_v \frac{\partial u_{e,k}}{\partial z} \right) -= -\frac{1}{z_{e,k}^{top} - z_{e,k+1}^{top}} \left( -\nu_{e,k}^{top} -\frac{u_{e,k-1} - u_k }{z_{e,k-1}^{mid} - z_k^{mid}} - - -\nu_{e,k+1}^{top} -\frac{u_{e,k} - u_{e,k+1} }{z_{e,k}^{mid} - z_{e,k+1}^{mid}} -\right) -$$ (discrete-mom-vert-diff) +\int_{z_k^{bot}}^{z_k^{top}} \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} dz ++ \int_{z_k^{bot}}^{z_k^{top}} {\bf u} \cdot \nabla_z \left( \rho {\bf u} \right) dz +&= \left( \nabla_z \cdot {\bf u}_k \right) \int_{z_k^{bot}}^{z_k^{top}} \rho {\bf u} dz ++ {\bf u}_k \cdot \nabla_z \left( \int_{z_k^{bot}}^{z_k^{top}}\rho {\bf u} dz\right) \\ +&= \left( \nabla_z \cdot {\bf u}_k \right) h_k {\bf u}_k ++ {\bf u}_k \cdot \nabla_z \left( h_k {\bf u}_k \right) \\ +$$ (mom-adv) -This stencil is applied as an implicit tri-diagonal solve at the end of the time step. See details in the [tridiagonal solver design document](TridiagonalSolver) and forthcoming vertical mixing design document. +Our governing equations are now discrete in the vertical, but remain continuous in the horizontal and in time. -### Momentum Forcing -The discretized momentum forcing ${ \bf F}^u_{e,k}$ may include: -#### Wind Forcing +This results in the layered conservation equations. This system is now discrete in the vertical, but remains continuous in the horizontal and in time. -The wind forcing is applied as a top boundary condition during implicit vertical mixing as +$$ +\frac{\partial h_k {\bf u}_k}{\partial t} ++ \left( \nabla_z \cdot {\bf u}_k \right) h_k {\bf u}_k ++ {\bf u}_k \cdot \nabla_z \left( h_k {\bf u}_k \right) ++ \left[ \rho_k w_k {\bf u}_k \right]^{top} - \left[ \rho_k w_k {\bf u}_k \right]^{bot} ++ f h_k {\bf u}_k^{\perp} += +- \nabla_z p_k +- h_k \nabla_z \Phi_k ++ h_k {\bf D}_k^u + h_k {\bf F}_k^u +$$ (layered-momentum-1) $$ -\frac{\tau_{e}}{[ h_{i,k}]_e} +\frac{\partial h_k}{\partial t} + \nabla_z \cdot \left(h_k {\bf u}_k\right) + \left[ \rho_k w_k \right]^{top} - \left[ \rho_k w_k \right]^{bot}= Q^h_k +$$ (layered-mass-1) + $$ +\frac{\partial h_k \varphi_k}{\partial t} + \nabla_z \cdot \left(h_k {\bf u}_k \varphi_k\right) ++ \left[ \varphi_k \rho_k w_k \right]^{top} - \left[ \varphi_k \rho_k w_k \right]^{bot} += D^\varphi_k + Q^\varphi_k. +$$ (layered-tracer-1) -where $\tau$ is the wind stress in Pa. Since the mass-thickness $h$ is in kg/s/m$^2$, this results in the desired units of m/s$^2$ for a momentum tendency term. +The term $\left( \nabla_z \cdot {\bf u}_k \right) h_k {\bf u}_k$ is assumed to be small for seawater, which is nearly incompressible. In the Boussinesq approximation this term is formally zero due to the incompressibility assumption. The remaining terms from the momentum material derivative may be rewritten as -#### Bottom Drag +$$ +\frac{\partial h_k {\bf u}_k}{\partial t} ++ {\bf u}_k \cdot \nabla_z \left( h_k {\bf u}_k \right) +&= h_k \frac{\partial {\bf u}_k}{\partial t} ++ {\bf u}_k\frac{\partial h_k} {\partial t} ++ h_k {\bf u}_k \cdot \nabla_z \left( {\bf u}_k \right) ++ {\bf u}_k \cdot \nabla_z \left( h_k \right) {\bf u}_k\\ +&= h_k \frac{\partial {\bf u}_k}{\partial t} ++ {\bf u}_k\frac{\partial h_k} {\partial t} ++ h_k {\bf u}_k \cdot \nabla_z {\bf u}_k ++ {\bf u}_k \cdot \nabla_z \left( h_k \right) {\bf u}_k \\ +&= h_k \left[ \frac{\partial {\bf u}_k}{\partial t} ++ {\bf u}_k \cdot \nabla_z {\bf u}_k \right] ++ {\bf u}_k \left[\frac{\partial h_k} {\partial t} ++ {\bf u}_k \cdot \nabla_z h_k \right] \\ +&= h_k \left[ \frac{\partial {\bf u}_k}{\partial t} ++ \zeta {\bf u}^{\perp} + \nabla_z K + \right] ++ {\bf u}_k \left[\frac{\partial h_k} {\partial t} ++ {\bf u}_k \cdot \nabla_z h_k \right] \\ +$$ (mom-h-adv) -Bottom Drag is applied as a bottom boundary condition during implicit vertical mixing as +The terms in the second square brackets drop out due to conservation of mass (note: I need to check on vertical thickness flux and source terms). We now divide the momentum equation by $h_k$ to obtain $$ -- C_D \frac{u_{e,k}\left|u_{e,k}\right|}{[\alpha_{i,k}h_{i,k}]_e} . -$$ (discrete-mom-bottom) +\frac{\partial {\bf u}_k}{\partial t} ++ \zeta {\bf u}^{\perp} + \nabla_z K ++ \frac{\left[ \rho_k w_k {\bf u}_k \right]^{top} - \left[ \rho_k w_k {\bf u}_k \right]^{bot}}{h_k} ++ f {\bf u}_k^{\perp} += +- \nabla_z p_k +- \nabla_z \Phi_k ++ {\bf D}_k^u + {\bf F}_k^u +$$ (layered-momentum-2) + +One could derive the layered equations by integrating in pressure rather than $z$. In that case, one would have multiplied [](z-integration-momentum), [](z-integration-mass), [](z-integration-tracers) by $g$ and expressed the integrals in terms of pressure, with integration limits from $p_k^{top}$ to $p_k^{bot}$. +Derivations of ocean model equations with pressure as the vertical variable may be found in [de Szoeke and Samelson 2002](https://journals.ametsoc.org/view/journals/phoc/32/7/1520-0485_2002_032_2194_tdbtba_2.0.co_2.xml) and [Losch et al. 2003](https://journals.ametsoc.org/view/journals/phoc/34/1/1520-0485_2004_034_0306_hsacgc_2.0.co_2.xml). + +The vertical advection terms use the fundamental theorem of calculus to integrate a derivative in $z$, resulting in boundary conditions at the layer interfaces. This makes intuitive sense as a mass balance. For example, in the absence of horizontal advection and sources, the mass equation is simply + +$$ +\frac{\partial h_k}{\partial t} += \left[ \rho_k w_k \right]^{bot} - \left[ \rho_k w_k \right]^{top}. +$$ (layered-mass-vert-adv) -The units of specific volume times mass-thickness $\alpha h$ are length (m), so that the full term has units of m/s$^2$. +This states that the change in mass in the layer is the incoming mass from below minus the outgoing mass above, since the vertical velocity $w$ is positive upwards. The vertical advection of momentum and tracers have a similar interpretation. -#### Rayleigh Drag +### General Vertical Coordinate -Rayleigh drag is a simple drag applied to every cell. It is used to ensure stability during spin-up. +The vertical layer interfaces $(z_k^{bot}, z_k^{top})$ (or equivalently $(p_k^{bot}, p_k^{top})$) can vary as a function of $(x,y,t)$. Thus, these equations describe a general vertical coordinate, and these interface surfaces may be chosen arbitrarily by the user. See [Adcroft and Hallberg 2006](https://www.sciencedirect.com/science/article/pii/S1463500305000090) Section 2 and [Griffies et al (2000)](http://sciencedirect.com/science/article/pii/S1463500300000147) Section 2. It is convenient to introduce a new variable, the coordinate $r(x,y,z,t)$, where $r$ is constant at the middle of each layer. To be specific, we could design $r$ to be the layer index $k$ at the mid-depth of the layer. That is, define the mid-depth as $$ -- Ra \, u_{e,k} -$$ (discrete-mom-Ra) +z_k^{mid}(x,y,t) = \frac{z_k^{bot}(x,y,t) + z_k^{top}(x,y,t)}{2} +$$ (def-z) +and generate the function $r$ such that -### Tracer Diffusion +$$ +r(x,y,z_k^{mid}(x,y,t),t) = k +$$ (def-r) +and interpolate linearly in the vertical between mid-layers. When we write the layered form of the equations, we must take into account of the tilted layers using the chain rule. -The discretized tracer diffusion $ D^\varphi_{i,k}$ may include these terms, which are detailed below. Here $\kappa_2$ and $\kappa_4$ are written in front of the operator for simplicity. +We now rewrite derivatives in order to convert from horizontal coordinates to tilted coordinates. Let $(x,y)$ be the original horizontal coordinates, which are perpendicular to $z$, and the horizontal gradient be written as $\nabla_z=(\partial/\partial x, \partial/\partial y)$, as above. Now define a tilted coordinate system using the layers defined by $r$, where the within-layer horizontal coordinates are $(x',y')$ and the along-layer gradient is written as $\nabla_r=(\partial/\partial x', \partial/\partial y')$. We construct $r$ to be monotonic in $z$, so we can invert it as $z(x',y',r,t)$. Now horizontal derivatives along the tilted direction $x'$ for any field $\varphi(x,y,z,t)$ can be expanded using the chain rule as $$ -D^\varphi_{i,k} = \kappa_2 \nabla^2 \varphi_{i,k} - \kappa_4 \nabla^4 \varphi_{i,k} + -\frac{\partial }{\partial z} \left( \kappa_v \frac{\partial \varphi_{i,k}}{\partial z} \right) -$$ (discrete-tracer-diff) +\frac{\partial }{\partial x'} \left[ \varphi(x(x'),y(y'),z(x',y',r,t),t) \right] += \frac{\partial \varphi}{\partial x}\frac{\partial x}{\partial x'} + \frac{\partial \varphi}{\partial z} \frac{\partial z}{\partial x'} +$$ (dvarphidx) -#### Laplacian diffusion (del2) -The Laplacian may be written as the divergence of the gradient, +We may define the tilted horizontal variable $x'$ as we please. The simplest definition is $x'(x)\equiv x$. Then $\partial x / \partial x'=1$. Rearranging [](#dvarphidx) and repeating for $y$, $$ - h_{i,k} \nabla \cdot \left( \kappa_{2,e,k} \nabla \varphi_{i,k} \right). -$$ (discrete-tracer-del2) - -See [Omega V0 Section 3.3.2](OmegaV0ShallowWater.md#del2-tracer-diffusion) for details of this calculation. +\begin{aligned} +\frac{\partial \varphi}{\partial x} &= +\frac{\partial \varphi}{\partial x'} +- \frac{\partial \varphi}{\partial z} \frac{\partial z}{\partial x'}\\ +\frac{\partial \varphi}{\partial y} &= +\frac{\partial \varphi}{\partial y'} +- \frac{\partial \varphi}{\partial z} \frac{\partial z}{\partial y'}. +\end{aligned} +$$ (dvarphidxy) -#### Biharmonic diffusion (del4) -The biharmonic is a Laplacian operator applied twice, +This may be written in vector form as $$ - - h_{i,k} \nabla \cdot \left( \kappa_{4,e,k} \nabla -\right[ -\nabla \cdot \left( \nabla \varphi_{i,k} \right) -\left] - \right). -$$ (discrete-tracer-del4) +\nabla_z \varphi = \nabla_r \varphi - \frac{\partial \varphi}{\partial z} \nabla_r z. +$$ (dvarphidnabla) -Each of these operators are written as horizontal stencils in the [Omega V0 Operator Formulation Section](OmegaV0ShallowWater.md#operator-formulation) +### Pressure Gradient -#### Vertical tracer diffusion -As discussed above in the [momentum section](#vertical-momentum-diffusion), vertical derivatives may be written in terms of $z$ or $p$, +For most terms, we can safely assume $\nabla_z \approx \nabla_r$ because the vertical to horizontal aspect ratio even at very high horizontal resolution is on the order of $\epsilon ~ 10^{-3}$ (thought may need to re-assess this assumption if we decide to use strongly sloped layers). This applies, for example, to the curl operator uset to compute the relative vorticity and the gradient applied to the kinetic energy in [](z-integration-momentum). -$$ -\frac{\partial }{\partial z} \left( \kappa_v \frac{\partial {\bf \varphi}}{\partial z} \right) -= \rho g^2 \frac{\partial }{\partial p} \left( \kappa_v \rho \frac{\partial {\bf \varphi}}{\partial p} \right) -$$ (discrete-tracer-vertdiff) -and $z$ is chosen. The second derivative stencil is +The exception is the pressure gradient term. This is becasue strong vertical and week horizontal pressure gradients mean that both terms in the chain rule [](dvarphidnabla) are of the same order and must be retained. Substituting pressure for $\varphi$ in [](#dvarphidnabla), $$ -h_{i,k} \frac{\partial }{\partial z} \left( \kappa_v \frac{\partial \varphi_{i,k}}{\partial z} \right) -= -\frac{h_{i,k}}{z_{i,k}^{top} - z_{i,k+1}^{top}} \left( -\kappa_{i,k}^{top} -\frac{\varphi_{i,k-1} - \varphi_k }{z_{i,k-1}^{mid} - z_k^{mid}} - - -\kappa_{i,k+1}^{top} -\frac{\varphi_{i,k} - \varphi_{i,k+1} }{z_{i,k}^{mid} - z_{i,k+1}^{mid}} -\right). -$$ (discrete-tracer-vert-diff) - -Like the momentum term, this is applied using a tridiagonal solver in the -[tridiagonal solver](TridiagonalSolver) in the implicit vertical mixing step. +\begin{aligned} +-\frac{1}{\rho} \nabla_z p +&=-\frac{1}{\rho} \nabla_r p +\frac{1}{\rho} \frac{\partial p}{\partial z} \nabla_r z \\ +&=-\frac{1}{\rho} \nabla_r p - g \nabla_r z \\ +&=-v \nabla_r p - \nabla_r \Phi_g\\ +\end{aligned} +$$ (gradp) -### MPAS-Ocean Equations of Motion +where we have substituted hydrostatic balance [](hydrostatic-balance), specific volume $\alpha\equiv 1/\rho$, and $\Phi_g=gz$. -The MPAS-Ocean layered formulation are provided here for reference. MPAS-Ocean solves for momentum, thickness, and tracers at layer $k$. These are continuous in the horizontal and discrete in the vertical. +The general form of the geopotential may include the Earth's gravity, tidal forces, and self attraction and loading (SAL), and may be written as $$ -\frac{\partial {\bf u}_k}{\partial t} -+ \frac{1}{2}\nabla \left| {\bf u}_k \right|^2 -+ ( {\bf k} \cdot \nabla \times {\bf u}_k) {\bf u}^\perp_k -+ f{\bf u}^{\perp}_k -+ w_k^{bot}{\bf u}_k^{bot} -- w_k^{top}{\bf u}_k^{top} = -- \frac{1}{\rho_0}\nabla p_k -- \frac{\rho g}{\rho_0}\nabla z^{mid}_k -+ \nu_h\nabla^2{\bf u}_k -+ \frac{\partial }{\partial z} \left( \nu_v \frac{\partial {\bf u}_k}{\partial z} \right), -$$ (mpaso-continuous-momentum) +\Phi = \Phi_g + \Phi_{tides} + \Phi_{SAL} + c +$$ (def-geopotential) -$$ -\frac{\partial h_k}{\partial t} + \nabla \cdot \left( h_k^e {\bf u}_k \right) + w_k^{bot} - w_k^{top} = 0, -$$ (mpaso-continuous-thickness) +where $c$ is an arbitrary constant. Therefore, the pressure gradient and geopotential gradient may be written together as $$ -\frac{\partial h_k\varphi_k}{\partial t} + \nabla \cdot \left( h_k^e\varphi_k^e {\bf u}_k \right) -+ \varphi_k^{bot} w_k^{bot} - \varphi_k^{top} w_k^{top} -= \nabla\cdot\left(h_k^e \kappa_h \nabla\varphi_k \right) -+ h_k \frac{\partial }{\partial z} \left( \kappa_v \frac{\partial \varphi_k}{\partial z} \right). -$$ (mpaso-continuous-tracer) +\begin{aligned} +-v \nabla_z p - \nabla_z \Phi +&= -v \nabla_z p - \nabla_z \Phi_{tides} - \nabla_z \Phi_{SAL}\\ +&=-v \nabla_r p - \nabla_r \Phi_g - \nabla_r \Phi_{tides} - \nabla_r \Phi_{SAL}\\ +&=-v \nabla_r p - \nabla_r \Phi. \\ +\end{aligned} +$$ (gradp-gradphi) -The layer thickness $h$, vertical velocity $w$, pressure $p$, and tracer $\varphi$, are cell-centered quantities, while the horizontal velocity ${\bf u}$ and $e$ superscript are variables interpolated to the cell edges. +On the first line, note that $\nabla_z \Phi_g=\nabla_z gz=0$. For tides and SAL we assume that these forces do not vary in the vertical due to the small aspect ratio of the ocean, so that the vertical derivative in the expansion [](dvarphidnabla) is zero. This means that $\nabla_z \Phi_{tides}=\nabla_r \Phi_{tides}$ and $\nabla_z \Phi_{SAL}=\nabla_r \Phi_{SAL}$. +For versions 1.0 and 2.0 of Omega we only consider a constant gravitational force, and will not include tides and SAL. Further details will be provided in the forthcoming pressure gradient design document. +See [Adcroft and Hallberg 2006](https://www.sciencedirect.com/science/article/pii/S1463500305000090) eqn. 1 and [Griffies et al](http://sciencedirect.com/science/article/pii/S1463500300000147) eqn 2 for additional examples of the pressure gradient in tilted coordinates. The additional terms due to the expansion of $\nabla_z$ to $\nabla_r$ in the rest of the equations are small and are ignored. -## 6. Variable Definitions +Some publications state that the transition from Boussinesq to non-Boussinesq equations is accompanied by a change from z-coordinate to pressure-coordinates. However, we use a general vertical coordinate, so the vertical may be referenced to $z$ or $p$. In a purely z-coordinate model like POP, only the $\nabla p$ term is used in [](gradp). In a purely p-coordinate model, only $\nabla z$ remains, as described in [de Szoeke and Samelson 2002](https://journals.ametsoc.org/view/journals/phoc/32/7/1520-0485_2002_032_2194_tdbtba_2.0.co_2.xml). In a general vertical coordinate model the layer interface placement is up to the user's specification, and so both terms are kept. -Table 1. Definition of variables. Geometric variables may be found in the [Omega V0 design document, Table 1](OmegaV0ShallowWater.md#variable-definitions) +### Vertical Transport +The integration in [](#z-integration-momentum) to [](#z-integration-tracers) changes the vertical velocity $w$ in m/s to a vertical mass-thickness transport $\omega=\rho w$ in kg/s/m$^2$. Here $w$ is the Latin letter and $\omega$ is the Greek letter omega. One can think of fluid velocity $w$ as a volume transport, normalized by area, in units of length per time. Analogously, $\omega$ is mass-thickness transport, which is mass transport per unit area (kg/s/m$^2$). The variables $w$ and $\omega$ have the same sign convention of upward (positive $z$) for positive transport. -| symbol | name | units | location | name in code | notes | -|---------------------|-----------------------------|----------|-|---------|-------------------------------------------------------| -|$D_{i,k}$ | divergence | 1/s | cell | Divergence |$D=\nabla\cdot\bf u$ | -|${\bf D}^u_{k} $, $ D^u_{e,k} $ | momentum dissipation terms | m/s$^2$ | edge | |see [Momentum Dissipation Section](#momentum-dissipation) | -|$ D_{e,k}^\varphi$ | tracer diffusion terms | | cell | |see [Tracer Diffusion Section](#tracer-diffusion) | -|$f_v$ | Coriolis parameter| 1/s | vertex | FVertex | $f = 2\Omega sin(\phi)$, $\Omega$ rotation rate, $\phi$ latitude| -|${\bf F}^u_{k} $, $ F^u_{e,k} $ | momentum forcing | m/s$^2$ | edge | | see [Momentum Forcing Section](#momentum-forcing) | -|$f_{eos}$ | equation of state | - | any | function call | | -|$g$ | gravitational acceleration | m/s$^2$ | constant | Gravity | -|$h_{i,k}$ | layer mass-thickness | kg/m$^2$ | cell | LayerThickness | see [](def-h) | -|$k$ | vertical index | | -|${\bf k}$ | vertical unit vector | | -|$K_{min}$ | shallowest active layer | | -|$K_{max}$ | deepest active layer | | -|$K_{i,k}$ | kinetic energy | m$^2$/s$^2$ | cell | KineticEnergyCell |$K = \left\| {\bf u} \right\|^2 / 2$ | -|$p_{i,k}$ | pressure | Pa | cell | Pressure | see [](discrete-pressure) | -|$p^{floor}_i$ | bottom pressure | Pa | cell | PFloor | pressure at ocean floor -|$p^{surf}_i$ | surface pressure | Pa | cell | PSurface | due to atm. pressure, sea ice, ice shelves -|$q_{v,k}$ | potential vorticity | 1/m/s | vertex | PotentialVorticity |$q = \left(\zeta+f\right)/h$ | -|$Q^h_{i,k}$ | mass source and sink terms| kg/s/m$^2$ | cell | | -|$Q^\varphi_{i,k}$ | tracer source and sink terms|kg/s/m$^2$ or similar| cell | | -|$Ra$ | Rayleigh drag coefficient | 1/s | constant | | | -|$S_{i,k}$ | salinity | PSU | cell | Salinity | a tracer $\varphi$ | -|$t$ | time | s | none | | | -|${\bf u}_k$ | velocity, vector form | m/s | - | | | -|$u_{e,k}$ | velocity, normal to edge | m/s | edge | NormalVelocity | | -|$u^\perp_{e,k}$ | velocity, tangential to edge | m/s | edge | TangentialVelocity |${\bf u}^\perp = {\bf k} \times {\bf u}$| -|$\alpha_{i,k}$ | specific volume | m$^3$/kg | cell | SpecificVolume | $v = 1/\rho$ | -|$w_{i,k}$ | vertical velocity | m/s | cell | VerticalVelocity | volume transport per m$^2$ | -|$z$ | vertical coordinate | m | - | | positive upward | -|$z^{top}_{i,k}$ | layer top z-location | m | cell | ZTop | see [](discrete-z) | -|$z^{mid}_{i,k}$ | layer mid-depth z-location | m | cell | ZMid | -|$z^{surf}_{i}$ | ocean surface, i.e. sea surface height | m | cell | ZSurface | same as SSH in MPAS-Ocean | -|$z^{floor}_{i}$ | ocean floor z-location | m | cell | ZFloor | -bottomDepth from MPAS-Ocean | -|$\zeta_{v,k}$ | relative vorticity| 1/s | vertex | RelativeVorticity |$\zeta={\bf k} \cdot \left( \nabla \times {\bf u}\right)$ | -|$\Theta_{i,k}$ | conservative temperature | C | cell | Temperature | a tracer $\varphi$ | -|$\kappa_2$| tracer diffusion | m$^2$/s | cell | | | -|$\kappa_4$| biharmonic tracer diffusion | m$^4$/s | cell | | | -|$\kappa_v$| vertical tracer diffusion | m$^2$/s | cell | | | -|$\nu_2$ | horizontal del2 viscosity | m$^2$/s | edge | | | -|$\nu_4$ | horizontal biharmonic (del4) viscosity | m$^4$/s | edge | | | -|$\nu_v$| vertical momentum diffusion | m$^2$/s | edge | | | -|$\varphi_{i,k}$ | tracer | kg/m$^3$ or similar | cell | | e.g. $\Theta$, $S$ | -|$\rho_{i,k}$ | density | kg/m$^3$ | cell | Density | -|$\rho_0$ | Boussinesq reference density | kg/m$^3$ | | constant | -|$\tau_i$ | wind stress | Pa=N/m$^2$ | edge | SurfaceStress | -|$\Phi_{i,k}$ | geopotential| | cell | Geopotential |$\partial \Phi / \partial z = g$ for gravity | -|$\omega$ | mass transport | kg/s/m^2 | cell | VerticalTransport |$\omega=\rho w$| +### Final Layered Equations +mrp temp: -## 7. Verification and Testing +The momentum equation can be rewritten using the product rule on $\rho {\bf u}$, mass conservation, and dividing by $\rho$, as: -Capability and testing are similar to [Petersen et al. 2015](http://www.sciencedirect.com/science/article/pii/S1463500314001796). The following tests are in idealized domains and do not require surface fluxes or surface restoring. For the following tests to show results comparable to those published with other models, the full dynamic sequence of density, pressure, momentum, and advection must work correctly. The successful completion of the following tests is a validation of the primitive equation functions in Omega 1.0. All of the following tests may exercise a linear equation of state or the nonlinear TEOS10. The first four tests quantify the anomalous mixing caused by the numerical schemes. The first five are on cartesian planes with regular hexagon meshes. +$$ +\frac{D {\bf u}_{3D} }{D t} \equiv +\frac{\partial {\bf u}_{3D}}{\partial t} ++ {\bf u}_{3D}\cdot \nabla_{3D} {\bf u}_{3D} + = - \frac{1}{\rho} \nabla_{3D} p + - \nabla_{3D} \Phi ++ {\bf D}^u + {\bf F}^u +$$ (continuous-momentum-rho) -### Lock Exchange (Optional) -The Lock Exchange is the simplest possible test of a primitive equation model. There is an analytic formulation for the wave propagation speed. It is listed as optional because the Overflow tests the same dynamics. -See [Petersen et al. 2015](http://www.sciencedirect.com/science/article/pii/S1463500314001796) and the compass `lock_exchange` case. +mrp temp: -### Overflow -The Overflow test case adds bathymetry to the Lock Exchange. It is a particularly effective test of vertical mass and tracer advection, and vertical mixing. It is useful to compare different vertical coordinates, like level (z- or p-level) versus terrain-following (sigma). -See [Petersen et al. 2015](http://www.sciencedirect.com/science/article/pii/S1463500314001796) and the compass `overflow` case. +The advection term may be separated into horizontal and vertical parts as +$$ +{\bf u}_{3D}\cdot \nabla_{3D} {\bf u}_{3D} += +{\bf u} \cdot \nabla_z {\bf u} + w \frac{\partial {\bf u}}{\partial z}. +$$ (advection-3d2d) -### Internal Gravity Wave -The internal gravity wave tests horizontal and vertical advection. -See [Petersen et al. 2015](http://www.sciencedirect.com/science/article/pii/S1463500314001796) and the `internal_wave` case in both compass and polaris. +The horizontal component may be replaced with the vector identity -### Baroclinic Channel -This is the first test to add the Coriolis force and uses a three-dimensional domain. It is designed to result in an eddying simulation at sufficiently high resolution. This tests the combination of Coriolis and pressure gradient forces that produce geostrophic balance, as well as horizontal advection and dissipation for numerical stability. -See [Petersen et al. 2015](http://www.sciencedirect.com/science/article/pii/S1463500314001796) and the `baroclinic_channel` case in both compass and polaris. +$$ +\begin{aligned} +{\bf u} \cdot \nabla_z {\bf u} +&= (\nabla_z \times {\bf u}) \times {\bf u} + \nabla_z \frac{|{\bf u}|^2}{2} \\ +&= \left( \boldsymbol{k} \cdot (\nabla_z \times {\bf u})\right) +\left( \boldsymbol{k} \times {\bf u} \right) + \nabla_z \frac{|{\bf u}|^2}{2} \\ +&= \zeta {\bf u}^{\perp} + \nabla_z K, +\end{aligned} +$$ (advection-identity) -### Seamount with zero velocity. -This is a 3D domain with a seamount in the center, where temperature and salinity are stratified in the vertical and constant in the horizontal. The test is simply that an initial velocity field of zero remains zero. For z-level layers the velocity trivially remains zero because the horizontal pressure gradient is zero. For tilted layers, this is a test of the pressure gradient error and the velocity is never exactly zero. This is a common test for sigma-coordinate models like ROMS because the bottom layers are extremely tilted along the seamount, but it is a good test for any model with tilted layers. Omega will use slightly tilted layers in p-star mode (pressure layers oscillating with SSH) and severely tilted layers below ice shelves, just like MPAS-Ocean. See [Ezer et al. 2002](https://www.sciencedirect.com/science/article/pii/S1463500302000033), [Haidvogel et al. 1993](https://journals.ametsoc.org/view/journals/phoc/23/11/1520-0485_1993_023_2373_nsofaa_2_0_co_2.xml), [Shchepetkin and McWilliams 2003](https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2001JC001047), and previous MPAS-Ocean [confluence page](https://acme-climate.atlassian.net/wiki/spaces/OCNICE/blog/2015/11/19/40501447/MPAS-O+Sigma+coordinate+test+sea+mount). +where $\zeta$ is relative vorticity and $K$ is kinetic energy. This step separates the horizontal advection into non-divergent and non-rotational components, which is useful in the final TRiSK formulation. -### Cosine Bell on the Sphere -This test uses a fixed horizontal velocity field to test horizontal tracer advection. It is repeated from [Omega-0 design document](OmegaV0ShallowWater) and is important to conduct again as we convert Omega to a layered primitive-equation model. See `cosine_bell` case in both compass and polaris. +momentum: -### Merry-Go-Round -This is an exact test for horizontal and vertical tracer advection. A fixed velocity field is provided, and a tracer distribution is advected around a vertical plane. See the `merry_go_round` test in compass, and the results on the [merry-go-round pull request](https://github.com/MPAS-Dev/compass/pull/108) and [compass port pull request](https://github.com/MPAS-Dev/compass/pull/452). +$$ +\frac{\partial {\bf u}_k}{\partial t} ++ q_k h_k {\bf u}_k^{\perp} ++ \frac{\left[ \alpha_k \omega_k {\bf u}_k \right]^{top} - \left[ \alpha_k \omega_k {\bf u}_k \right]^{bot}}{h_k} += +- \alpha_k \nabla_r p_k - \nabla_r \Phi_k +- \nabla_r K_k ++ {\bf D}_k^u + {\bf F}_k^u +$$ (layered-momentum) +mass: -## References -This section is for references without webpage links. These are mostly textbooks. +$$ +\frac{\partial h_k}{\partial t} + \nabla_r \cdot \left(h_k {\bf u}_k\right) + \omega_k^{top} - \omega_k^{bot}= Q^h_k +$$ (layered-mass) -- Cushman‐Roisin, B., & Beckers, J.M. (2011). Introduction to Geophysical Fluid Dynamics: Physical and Numerical Aspects. Academic Press. -- Gill, A. E. (2016). Atmosphere—Ocean dynamics. Elsevier. -- Kundu, P.K., Cohen, I.M., Dowling D.R. (2016) Fluid Mechanics 6th Edition, Academic Press. -- Pedlosky, J. (1987). Geophysical Fluid Dynamics (Vol. 710). Springer. -- Vallis, G. K. (2017). Atmospheric and oceanic fluid dynamics. Cambridge University Press. +tracers: + +$$ +\frac{\partial h_k \varphi_k}{\partial t} + \nabla_r \cdot \left(h_k {\bf u}_k \varphi_k\right) ++ \varphi_k^{top} \omega_k^{top} - \varphi_k^{bot}\omega_k^{bot} += D^\varphi_k + Q^\varphi_k. +$$ (layered-tracer) + +The superscripts $top$ and $bot$ mean that the layered variable is interpolated to the top and bottom layer interface, respectively. In [](layered-momentum) the non-divergent momentum advection and Coriolis term were combined and expressed in terms of the potential vorticity $q_k$, + +$$ + \zeta_k {\bf u}_k^\perp + f {\bf u}_k^\perp = \frac{\zeta_k + f }{h_k}h_k{\bf u}_k^\perp \equiv q_k h_k {\bf u}^\perp_k. +$$ (potential-vort-adv) + +Surface fluxes $Q^h_k$ have been added to the mass equation for precipitation, evaporation, and river runoff. These fluxes, like mass transport $\omega$, are in units of kg/s/m$^2$. b to avoid confusion Add an explanation of n, the normal vector Clarify Lagrangian motion a bit more. --- .../omega/doc/design/OmegaV1GoverningEqns.md | 281 +++++++++++------- 1 file changed, 177 insertions(+), 104 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index e5de0af19cb7..1da515942b07 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -33,7 +33,9 @@ This document describes the governing equations for the layered ocean model, whi The requirements in the [Omega-0 design document](OmegaV0ShallowWater) still apply. Additional design requirements for Omega-1 are: ### Omega will be a hydrostatic, non-Boussinesq ocean model. -See discussion in introduction. The non-Boussinesq formulation uses the full density throughout resulting in governing equations that conserve mass rather than volume. The substantial change is that the "thickness" variable, $h$, is now a pressure-thickness, $h = \rho g \Delta z$. This is explained in the derivation of the [layered equations below](#layered-equations). +Omega will adopt a non-Boussinesq formulation, meaning it retains the full, spatially and temporally varying fluid density $\rho({\bf x}, t)$ in all governing equations. This ensures exact mass conservation, as opposed to volume conservation in Boussinesq models that approximate density as a constant reference value $\rho_0$ outside the pressure gradient. The equations are derived in terms of layer-integrated mass per unit area (see [layered equations](#layered-equations)), and no approximation is made that filters out compressibility or density variations. + +The model also assumes hydrostatic balance in the vertical momentum equation, which is a standard and well-justified simplification for large-scale geophysical flows. In such regimes, vertical accelerations are typically small compared to the vertical pressure gradient and gravitational forces. This assumption simplifies the dynamics and removes most sound waves while retaining fidelity for the mesoscale to planetary-scale ocean circulation that Omega is designed to simulate. ### Omega will use TEOS10 for the equation of state. See additional [EOS design document](EOS) @@ -45,7 +47,7 @@ See forthcoming design documents on the pressure gradient, vertical mixing, and ### Control Volume Formulation -We begin with the continuous, control-volume form of the conservation equations. Consider an arbitrary control volume $V(t)$ with a bounding control surface $\partial V(t)$. The fluid has density $\rho({\bf x},t)$ and velocity ${\bf v}({\bf x},t)$. The control surface is moving at a velocity ${\bf v}_r({\bf x},t)$. The conservation equations are +We begin with the continuous, control-volume form of the conservation equations. Consider an arbitrary control volume $V(t)$ with a bounding control surface $\partial V(t)$. The fluid has density $\rho({\bf x},t)$ and velocity ${\bf v}({\bf x},t)$. The control surface is moving at a velocity ${\bf v}_r({\bf x},t)$. The vector ${\bf n}$ denotes the outward-facing unit normal vector on the control surface $\partial V(t)$, and is used in all surface integrals to represent the direction of fluxes across the boundary. The conservation equations are mass: @@ -69,24 +71,25 @@ $$ &\frac{d}{dt} \int_{V(t)} \rho({\bf x},t)\, {\bf v}({\bf x},t) \, dV + \int_{\partial V(t)}\rho({\bf x},t)\, {\bf v}({\bf x},t) \left({\bf v}({\bf x},t) - {\bf v}_r \right) \cdot {\bf n} \, dA \\ & \; \; \; = -\int_{V(t)} \rho({\bf x},t) \, {\bf g}\, dV +\int_{V(t)} \rho({\bf x},t) \, {\bf b}({\bf x},t)\, dV + \int_{\partial V(t)} {\bf f}({\bf n},{\bf x},t) \, dA $$ (continuous-momentum) -These equations are taken from [Kundu et al. 2016](https://www.amazon.com/dp/012405935X/) (4.5) for mass conservation and (4.17) for momentum conservation. +The operator $\frac{d}{dt}$ used here denotes the rate of change within a moving control volume, sometimes referred to as a Reynolds transport derivative. It differs from the partial derivative $\frac{\partial}{\partial t}$, which represents the local rate of change at a fixed point in space (Eulerian frame), and from the material derivative $\frac{D}{Dt}$, which follows an individual fluid parcel (Lagrangian frame). The use of $\frac{d}{dt}$ allows for conservation laws to be expressed in a general framework that includes both stationary and moving control volumes, consistent with the Reynolds transport theorem. + +These equations are taken from [Kundu et al. 2016](https://doi.org/10.1016/C2012-0-00611-4) (4.5) for mass conservation and (4.17) for momentum conservation. All notation is identical to Kundu, except that we use ${\bf v}$ for the three-dimensional velocity (${\bf u}$ will be used below for horizontal velocities) and ${\bf v}_r$ and $\partial V$ match the notation in [Ringler et al. 2013](https://www.sciencedirect.com/science/article/pii/S1463500313000760) Appendix A.2. The tracer equation is simply mass conservation, where the conserved quantity is the tracer mass $\rho \varphi$, as $\varphi$ is the tracer concentration per unit mass. In all three equations, the first term is the change of the quantity within the control volume; the second term is the flux through the moving boundary. -If the control surface moves with the fluid in a Lagrangian fashion, then ${\bf v}_r={\bf v}$ and the second term is zero. +If the control surface moves with the fluid in a Lagrangian fashion, then ${\bf v}_r={\bf v}$ and the second term (flux through the boundary) vanishes---there is no net mass, momentum, or tracer transport across the moving surface. -The momentum equation is an expression of Newton's second law and has two additional terms on the right hand side. -The first additional term is the body force, $\rho {\bf g} dV$, where ${\bf g}$ may be expressed as the gradient of a potential ${\bf g}= - \nabla_{3D} \Phi$ for conservative body forces. -Note ${\bf g}$ is general here and not yet Earth's gravity. -Body forces also include forces from a rotating frame of reference, such as the Coriolis force. -The last term is due to all surface forces ${\bf f}$ that act on the surface of the fluid element, including pressure and viscous stresses. -The momentum equation derivation may also be found in [Leishman 2025](https://eaglepubs.erau.edu/introductiontoaerospaceflightvehicles/chapter/conservation-of-momentum-momentum-equation/#chapter-260-section-2), Chapter 21, equation 10. + +The momentum equation is an expression of Newton's second law and includes two types of external forces. +The first is the body force, represented here as ${\bf b}({\bf x}, t)$, which encompasses any volumetric force acting throughout the fluid, such as gravitational acceleration or the Coriolis force. In some contexts, body forces may be expressible as the gradient of a potential, ${\bf b} = -\nabla_{3D} \Phi$, but this is not assumed in general. +The second is the surface force ${\bf f}$, which acts on the boundary of the control volume and includes pressure and viscous stresses. These forces appear as surface integrals over the boundary and drive momentum exchange between adjacent fluid parcels or between the fluid and its environment. +The derivation of the momentum equation may also be found in [Leishman 2025](https://eaglepubs.erau.edu/introductiontoaerospaceflightvehicles/chapter/conservation-of-momentum-momentum-equation/#chapter-260-section-2), Chapter 21, equation 10. ### Horizontal \& Vertical Separation @@ -234,15 +237,54 @@ $$ $$ (hydrostatic) +## 4. Favre Averaging + +The most common approach to determine the structure of the small scale stresses in ocean modeling is through Reynolds' averaging. In this approach, a generic field $\phi$ is broken into a mean and deviatoric component, i.e. + +$$ +\phi = \overline{\phi} + \phi^\prime +$$ + +When deriving the Reynolds' averaged equations, averages of terms with a single prime are discarded by construction. This is an attractive approach for Boussinesq ocean models since the density is assumed constant in all equations. When the ocean model is non Boussinesq, this leads to difficulties. For example, consider the first term in equation [](#h-momentum), if a Reynolds' decomposition and averaging is performed, + +$$ +\frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, {\bf u} \, dz \, dA = \frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} (\overline{\rho {\bf u}} + \, \overline{\rho^\prime {\bf u}^\prime}) \, dz \, dA +$$ + +In this equation, the products of prime and average drop out by construction. The $\overline{\rho^\prime {\mathbf u}^\prime}$ term is an unnecessary complication and difficult to parameterize. To circumvent this complication, Omega will adopt Favre averaging [Pope 2000](https://elmoukrie.com/wp-content/uploads/2022/04/pope-s.b.-turbulent-flows-cambridge-university-press-2000.pdf), which for the generic variable $\phi$ is + +$$ +\phi = \hat{\phi} + \phi^" +$$ + +Where $\hat{\phi} \equiv \frac{\overline{\rho \phi}}{\overline{\rho}}$, and the double prime indicates deviations from this density weighted mean. In the definition, the overbar is an averaging operator with identical properties to a Reynolds' average. Using this relation, we can relate Reynolds' average to Favre average by considering a the average of $\rho \phi$. The standard Reynolds' approach gives + +$$ +\overline{\rho \phi} = \overline{\rho}\overline{\phi} + \overline{\rho^\prime \phi^\prime} +$$ + +Isolating $\overline{\phi}$, + +$$ +\overline{\phi} = \frac{\overline{\rho \phi}}{\overline{\rho}} + \frac{\overline{\rho^\prime \phi^\prime}}{\overline{\rho}} +$$ -## 4. Layered Equations +The first term on the right side of the equation is the definition of a Favre average, which yields + +$$ +\overline{\phi} = \hat{\phi} + \frac{\overline{\rho^\prime \phi^\prime}}{\overline{\rho}} +$$ + +Throughout much of the ocean, we expect the second term to be $O(10^{-3})$ but could be large in highly turbulent regions. With the adoption, all Omega variables will be interpreted as Favre averaged, but these variables will be very similar to the traditional Reynolds' average for most flows. + +## 5. Layered Equations ### Pseudo-Height -In our non-Boussinesq hydrostatic framework, we adopt a vertical coordinate based on pseudo-height, +In our non-Boussinesq hydrostatic framework, we adopt a vertical coordinate based on pseudo-height, $$ -\tilde{z}(p) = -\frac{1}{\rho_0 g} \, p +\tilde{z}(\hat{p}) = -\frac{1}{\rho_0 g} \, \hat{p} $$ (def-pseudo-height) The pseudo-height is simply the pressure normalized by two constants, a reference density $\rho_0$ and gravitational acceleration $g$. @@ -250,11 +292,12 @@ A pseudo-height coordinate is effectively a pressure coordinate, but comes with It is convenient to relate these variables using differentials as $$ -d\tilde{z} = -\frac{1}{\rho_0 g}\, dp = \frac{\rho}{\rho_0} \, dz +d\tilde{z} = -\frac{1}{\rho_0 g}\, d\hat{p} = \frac{\hat{\rho}}{\rho_0} \, dz $$ (def-dtildez) -where the second equality uses the hydrostatic balance $dp = -\rho g dz$. -This shows that the pseudo-height is nearly the same as the physical height. +where the second equality uses the hydrostatic balance $d\hat{p} = -\hat{\rho} g dz$. We note that hydrostatic balance applies equivalently to Favre averaged variables. + +This shows that the pseudo-height is nearly the same as the physical height. In order to convert from $z$ to ${\tilde z}$ the pressure must be computed, @@ -269,7 +312,7 @@ $$ \tilde{w} = \frac{\rho}{\rho_0} \, w. $$ (def-pseudo-velocity) -This simply falls out of the definitions above, as +This simply falls out of the definitions above, as $$ \tilde{w} = \frac{d{\tilde z}}{dt} = \frac{\rho}{\rho_0}\frac{dz}{dt} = \frac{\rho}{\rho_0} \, w. @@ -281,15 +324,15 @@ As above, $\tilde{w}$ has identical units and very similar values to $w$. But in Griffies recommends a value of $\rho_0=1035$ kg/m$^3$, following p. 47 of [Gill (1982)](https://www.amazon.com/Atmosphere-Ocean-Dynamics-International-Geophysics-30/dp/0122835220), because ocean density varies less than 2% from that value. Note that the use of a constant $\rho_0$ in these definitions does not imply the Boussinesq approximation, which also uses a $\rho_0$. In that case, the full density $\rho$ is set to $\rho_0$ in all terms but the computation of pressure. -Here we do not make the Boussinesq approximation, and $\rho_0$ is simply a convenient normalization constant so that $d\tilde{z} \approx dz$ when $\rho \approx \rho_0$. +Here we do not make the Boussinesq approximation, and $\rho_0$ is simply a convenient normalization constant so that $d\tilde{z} \approx dz$ when $\rho \approx \rho_0$. -Here we explain the reasoning for the choice of defining $\tilde{z}$ as directly proportional to pressure in [](#def-pseudo-height). +Here we explain the reasoning for the choice of defining $\tilde{z}$ as directly proportional to pressure in [](#def-pseudo-height). The differential form of the hydrostatic balance $dp = -\rho g dz$ implies that we could choose an arbitrary offset. One could set the offset such that $\tilde{z}=0$ at $z=0$, so that the equilibrium sea surface height matches. Or one could set $\tilde{z}^{\text{floor}} = z^{\text{floor}}$ at some reference depth. Our definition [](#def-pseudo-height), sets $\tilde{z}=0$ where $p=0$, which is at the top of the atmosphere. This choice was made so that $\tilde{z}$ is as close as possible to a pressure coordinate, and the additional normalization by $\rho_0 g$ was included so that units and values for $\tilde{z}$, $\tilde{h}$, and $\tilde{w}$ are intuitive and easy to work with. A major advantage of [](#def-pseudo-height) is that $\tilde{z}^{\text{floor}}$ is proportional to the bottom pressure, and can be used directly for the barotropic pressure gradient in time-split methods. ### Vertical Discretization -The previous equation set [](#vh-mass) to [](#vh-momentum) is for an arbitrary layer bounded by $z^{\text{top}}$ above and $z^{\text{bot}}$ below. -We now provide the details of the vertical discretization. +The previous equation set [](#vh-mass) to [](#vh-momentum) is for an arbitrary layer bounded by $z^{\text{top}}$ above and $z^{\text{bot}}$ below. +We now provide the details of the vertical discretization. The ocean is divided vertically into $K_{max}$ layers, with $k=1$ at the top and increasing downwards (opposite from $z$). Layer $k$ is bounded between $z_k^{\text{top}}$ above and $z_{k+1}^{\text{top}}$ below. @@ -309,7 +352,7 @@ $$ (def-pseudo-thickness) which is the mass per unit area in the layer, normalized by $\rho_0$. The density-weighted average of any variable $\phi({\bf x},t)$ in layer $k$ is $$ -{\overline \phi}^{\tilde{z}}_k(x,y,t) = +{\overline \phi}^{\tilde{z}}_k(x,y,t) = \frac{\int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho \phi dz} {\int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho dz} = @@ -326,50 +369,80 @@ Rearranging, is it useful to note that $$ \frac{1}{\rho_0}\int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho \phi dz - = + = {\tilde h}_k {\overline \phi}^{\tilde{z}}_k(x,y,t). $$ (h-phi) -### Layered Tracer & Mass +### Layered Tracer & Mass -Dividing the tracer equation [](#vh-tracer) for layer $k$ by the normalization constant $\rho_0$, and substituting [](#def-pseudo-velocity) and [](#h-phi), we have +Dividing the tracer equation [](#vh-tracer) for layer $k$ by the normalization constant $\rho_0$, and substituting [](#def-pseudo-velocity), we have $$ -\frac{d}{dt} \int_{A} {\tilde h}_k {\overline \varphi}^{\tilde{z}}_k \, dA +\frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, \varphi \, dz \, dA + - \int_{\partial A}\left({\tilde h}_k \overline{\varphi {\bf u}}^{\tilde{z}}_k \right) \cdot {\bf n} \, dl + \int_{\partial A}\left( \int_{z^{\text{bot}}}^{z^{\text{top}}}\rho\, \varphi \, {\bf u} \, dz \right) \cdot {\bf n} \, dl + \int_{A}\left[ \varphi \left({\tilde w} - {\tilde w}_r \right) \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} \, dA - \int_{A}\left[ \varphi \left({\tilde w} - {\tilde w}_r \right) \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} \, dA = 0 $$ (Aintegral-tracer) -where we converted to pseudo-height for the last two terms using [](#formula-pseudo-height). -Taking the limit as $A \rightarrow 0$ and using Gauss's theorem for the horizontal advection, +where we converted to pseudo-height for the last two terms using [](#formula-pseudo-height). Applying this same relation to the first two terms, $$ -\frac{d{\tilde h}_k {\overline \varphi}^{\tilde{z}}_k }{dt} +\frac{d}{dt} \int_{A} {\tilde h}_k {\overline \varphi}^{\tilde{z}}_k \, dA + - \nabla \cdot \left({\tilde h}_k \overline{\varphi {\bf u}}^{\tilde{z}}_k \right) - + \left[ \varphi {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} - - \left[ \varphi {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} + \int_{\partial A}\left( {\tilde h}_k \, {\overline{\varphi \, {\bf u}}}^{\tilde{z}}_k \, \right) \cdot {\bf n} \, dl + + \int_{A}\left[ \varphi \left({\tilde w} - {\tilde w}_r \right) \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} \, dA + - \int_{A}\left[ \varphi \left({\tilde w} - {\tilde w}_r \right) \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} \, dA = 0. +$$ (Aintegral-tracer2) + +The horizontal tracer flux term is expanded using $\varphi \equiv \overline{\varphi}^{\tilde{z}}_k + \delta \varphi$ and ${\bf u} \equiv \overline{\bf u}^{\tilde{z}}_k + \delta {\bf u}$ to yield + +$$ +\frac{d}{dt} \int_{A} {\tilde h}_k {\overline \varphi}^{\tilde{z}}_k \, dA ++ + \int_{\partial A}\left( {\tilde h}_k \, \left(\left(\overline{\varphi}^{\tilde{z}}_k + \delta \varphi\right)\left(\overline{\bf u}^{\tilde{z}}_k + \delta {\bf u}\right)\right) \, \right) \cdot {\bf n} \, dl + + \int_{A}\left[ \varphi \left({\tilde w} - {\tilde w}_r \right) \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} \, dA + - \int_{A}\left[ \varphi \left({\tilde w} - {\tilde w}_r \right) \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} \, dA += 0. +$$ + +$$ +\frac{1}{\rho} \frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \overline{\rho} \, \hat{\varphi} \, dz \, dA ++ + \frac{1}{\rho} \int_{\partial A}\left( \int_{z^{\text{bot}}}^{z^{\text{top}}} \overline{\rho}\, (\hat{\varphi}\hat{\bf u} + \overline{\varphi^{\prime \prime} {\bf u}^{\prime \prime}}) \, dz \right) \cdot {\bf n} \, dl + + \int_{A}\left[ \hat{\varphi} \hat{\tilde w}_{tr} + \overline{\varphi^{\prime \prime} {\tilde w}_{tr}^{\prime \prime}} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} \, dA + - \int_{A}\left[ \hat{\varphi} \hat{\tilde w}_{tr} + \overline{\varphi^{\prime \prime} {\tilde w}_{tr}^{\prime \prime}} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} \, dA += 0 +$$ (Aintegral-tracer2) + +Applying [](#formula-pseudo-height) to the first two terms and taking the limit as $A \rightarrow 0$ and using Gauss's theorem for the horizontal advection, + +$$ +\frac{d{\tilde h}_k {\overline \varphi}^{\tilde{z}}_k }{dt} ++ + \nabla \cdot \left({\tilde h}_k \overline{\varphi {\bf u}}^{\tilde{z}}_k \right) + + \left[ \varphi {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} + - \left[ \varphi {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} += -\left(\nabla \cdot \left({\tilde h}_k \overline{\varphi {\bf u}}^{\tilde{z}}_k \right) + \left[\overline{\varphi^{\prime \prime} {\tilde w}_{tr}^{\prime \prime}}\right]_{{\tilde z}={\tilde z}_k^{\text{top}}} - \left[\overline{\varphi^{\prime \prime} {\tilde w}_{tr}^{\prime \prime}} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}}\right). $$ (layer-tracer-pre) -Here ${\tilde w}_{tr}={\tilde w} - {\tilde w}_r$ is the normalized vertical mass transport through the layer interface. -It is a pseudo-transport velocity in units of m/s. +Here ${\tilde w}_{tr}={\tilde w} - {\tilde w}_r$ is the normalized vertical mass transport through the layer interface. +It is a pseudo-transport velocity in units of m/s. Equation [](#layer-tracer-pre) is identical to [Ringler et al. 2013](https://www.sciencedirect.com/science/article/pii/S1463500313000760) (A.24), and further explanation can be found in that appendix. -As a final step, we substitute the approximation $\overline{\varphi {\bf u}}^{\tilde{z}}_k \approx \overline{\varphi }^{\tilde{z}}_k \overline{{\bf u}}^{\tilde{z}}_k$. +As a final step, we substitute the approximation $\overline{\varphi {\bf u}}^{\tilde{z}}_k \approx \overline{\varphi }^{\tilde{z}}_k \overline{{\bf u}}^{\tilde{z}}_k$. The mass equation is identical to the tracer equation with $\varphi=1$. Dropping the overlines for simpler notation, the layered version of mass and tracer conservation are mass: $$ -\frac{d{\tilde h}_k }{dt} +\frac{d{\tilde h}_k }{dt} + - \nabla \cdot \left({\tilde h}_k{\bf u}_k \right) - + \left[ {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} + \nabla \cdot \left({\tilde h}_k{\bf u}_k \right) + + \left[ {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} - \left[ {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} = 0 $$ (layer-mass) @@ -377,10 +450,10 @@ $$ (layer-mass) tracer: $$ -\frac{d{\tilde h}_k \varphi_k }{dt} +\frac{d{\tilde h}_k \varphi_k }{dt} + - \nabla \cdot \left({\tilde h}_k \varphi_k {\bf u}_k \right) - + \left[ \varphi {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} + \nabla \cdot \left({\tilde h}_k \varphi_k {\bf u}_k \right) + + \left[ \varphi {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} - \left[ \varphi {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} = 0 $$ (layer-tracer) @@ -420,7 +493,7 @@ They also include **vertical stress forces** (e.g., wind stress at the ocean sur The pressure force term may be converted from the boundary to the interior with Gauss' divergence theorem (see [Kundu et al. 2016](https://www.amazon.com/dp/012405935X/) p. 119), $$ -- \int_{\partial V(t)} p \, \mathbf{n} \, dA +- \int_{\partial V(t)} p \, \mathbf{n} \, dA = - \int_{V(t)} \nabla_{3D} p \, dV . $$ (gradp-Gauss) @@ -428,7 +501,7 @@ Considering only the horizontal components, we have $$ - \int_{V(t)} \nabla_{\perp} p \, dV -= - \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} += - \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \nabla_{\perp} p \, dz \, dA = - \int_{A} \overline{\nabla_{\perp} p}^{z} \, dA. $$ (gradp-h) @@ -453,10 +526,10 @@ Taking only the horizontal ($j$=1,2), $$ \int_{V(t)} \frac{\partial}{\partial x_i} \left( \tau_{ij} \right) \, dV -= \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} - \frac{\partial}{\partial x_i} \left( \tau_{ij} \right) += \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} + \frac{\partial}{\partial x_i} \left( \tau_{ij} \right) \, dz \, dA -= \int_{A} += \int_{A} \overline{ \frac{\partial}{\partial x_i} \left( \tau_{ij} \right) }^z dA $$ (gradp-h) @@ -474,10 +547,10 @@ $$ \\ & \; = - \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, \mathbf{f} \times \mathbf{u} \, dz \, dA - \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, \nabla_\perp \Phi \, dz \, dA - - \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} + - \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \nabla_{\perp} p \, dz \, dA -+ \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} - \frac{\partial}{\partial x_i} \left( \tau_{ij} \right) ++ \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} + \frac{\partial}{\partial x_i} \left( \tau_{ij} \right) \, dz \, dA. $$ (h-momentum-p-tau) @@ -499,93 +572,93 @@ $$ (h-momentum-p-tau) Taking the limit as $A \rightarrow 0$, we arrive at the local, horizontally continuous form: $$ -\frac{\partial \tilde{h}\, \overline{ {\bf u} }^{\tilde z} }{\partial t} +\frac{\partial \tilde{h}\, \overline{ {\bf u} }^{\tilde z} }{\partial t} & + - \nabla_\perp \cdot \left( \tilde{h}\, \overline{{\bf u} \otimes {\bf u} }^{\tilde z} \right) - + \left[ {\bf u}\, \tilde{w}_{tr} \right]_{z=z^{\text{top}}} - - \left[ {\bf u}\, \tilde{w}_{tr} \right]_{z=z^{\text{bot}}} + \nabla_\perp \cdot \left( \tilde{h}\, \overline{{\bf u} \otimes {\bf u} }^{\tilde z} \right) + + \left[ {\bf u}\, \tilde{w}_{tr} \right]_{z=z^{\text{top}}} + - \left[ {\bf u}\, \tilde{w}_{tr} \right]_{z=z^{\text{bot}}} \\ & = -- \tilde{h} \,\overline{ \mathbf{f} \times \mathbf{u} }^{\tilde z} -- \tilde{h} \,\overline{ \nabla_\perp \Phi }^{\tilde z} -- \frac{1}{\rho_0} \overline{\nabla_{\perp} p}^{z} -+ \frac{1}{\rho_0} \overline{ \frac{\partial}{\partial x_i} \left( \tau_{ij} \right) }^z +- \tilde{h} \,\overline{ \mathbf{f} \times \mathbf{u} }^{\tilde z} +- \tilde{h} \,\overline{ \nabla_\perp \Phi }^{\tilde z} +- \frac{1}{\rho_0} \overline{\nabla_{\perp} p}^{z} ++ \frac{1}{\rho_0} \overline{ \frac{\partial}{\partial x_i} \left( \tau_{ij} \right) }^z $$ (momentum-layered-differential-1) The first two terms are the material derivative, confined within the horizontal layer. Using the product rule, and layered mass conservation [](#layer-mass), $$ -\frac{\partial \tilde{h}\, \overline{ {\bf u} }^{\tilde z} }{\partial t} -+ \nabla_\perp \cdot \left( \tilde{h}\, \overline{{\bf u} \otimes {\bf u} }^{\tilde z} \right) -&= +\frac{\partial \tilde{h}\, \overline{ {\bf u} }^{\tilde z} }{\partial t} ++ \nabla_\perp \cdot \left( \tilde{h}\, \overline{{\bf u} \otimes {\bf u} }^{\tilde z} \right) +&= \frac{D_\perp \tilde{h}\, \overline{ {\bf u} }^{\tilde z} }{D t} \\ &= -\tilde{h}\frac{D_\perp \overline{ {\bf u} }^{\tilde z} }{D t} +\tilde{h}\frac{D_\perp \overline{ {\bf u} }^{\tilde z} }{D t} + \overline{ {\bf u} }^{\tilde z} \frac{D_\perp \tilde{h}}{D t} \\ -&= +&= \tilde{h}\left( - \frac{\partial \overline{ {\bf u} }^{\tilde z} }{\partial t} + \frac{\partial \overline{ {\bf u} }^{\tilde z} }{\partial t} + \nabla_\perp \cdot \left( \overline{{\bf u} \otimes {\bf u} }^{\tilde z} \right) \right) -- \overline{ {\bf u} }^{\tilde z} \left( - \left[ {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} +- \overline{ {\bf u} }^{\tilde z} \left( + \left[ {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} - \left[ {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} -\right) +\right) $$ (2D-material-der-product) We now substitute [](#2D-material-der-product) into [](#momentum-layered-differential-1) and divide by $\tilde h$ to get $$ - \frac{\partial \overline{ {\bf u} }^{\tilde z} }{\partial t} -+ \nabla_\perp \cdot \left( \overline{{\bf u} \otimes {\bf u} }^{\tilde z} \right) -& + \frac{\left[ {\bf u}\, \tilde{w}_{tr} \right]_{z=z^{\text{top}}} + \frac{\partial \overline{ {\bf u} }^{\tilde z} }{\partial t} ++ \nabla_\perp \cdot \left( \overline{{\bf u} \otimes {\bf u} }^{\tilde z} \right) +& + \frac{\left[ {\bf u}\, \tilde{w}_{tr} \right]_{z=z^{\text{top}}} - \left[ {\bf u}\, \tilde{w}_{tr} \right]_{z=z^{\text{bot}}} }{\tilde h} -- \frac{\overline{ {\bf u} }^{\tilde z}}{\tilde{h}} \left( - \left[ {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} +- \frac{\overline{ {\bf u} }^{\tilde z}}{\tilde{h}} \left( + \left[ {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} - \left[ {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}}\right) \\ & = -- \overline{ \mathbf{f} \times \mathbf{u} }^{\tilde z} -- \overline{ \nabla_\perp \Phi }^{\tilde z} -- \frac{1}{\rho_0 \, \tilde{h}} \overline{\nabla_{\perp} p}^{z} -+ \frac{1}{\rho_0 \, \tilde{h}} \overline{ \frac{\partial}{\partial x_i} \left( \tau_{ij} \right) }^z +- \overline{ \mathbf{f} \times \mathbf{u} }^{\tilde z} +- \overline{ \nabla_\perp \Phi }^{\tilde z} +- \frac{1}{\rho_0 \, \tilde{h}} \overline{\nabla_{\perp} p}^{z} ++ \frac{1}{\rho_0 \, \tilde{h}} \overline{ \frac{\partial}{\partial x_i} \left( \tau_{ij} \right) }^z $$ (momentum-layered-differential-2) Note that the coefficient of the pressure gradient and stress tensor can be rewritten as $$ -\frac{1}{\rho_0 \, \tilde{h}} = +\frac{1}{\rho_0 \, \tilde{h}} = \frac{1}{\rho_0 \,\frac{1}{\rho_0} \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho dz} = \frac{1} {\overline{\rho}^z} = \overline{\alpha}^z, $$ (grad-p-coeff) -where $\alpha$ is the specific volume. +where $\alpha$ is the specific volume. Gathering the vertical advection terms, [](#momentum-layered-differential-2) becomes $$ - \frac{\partial \overline{ {\bf u} }^{\tilde z} }{\partial t} - + \nabla_\perp \cdot \left( \overline{{\bf u} \otimes {\bf u} }^{\tilde z} \right) -& + \frac{\partial \overline{ {\bf u} }^{\tilde z} }{\partial t} + + \nabla_\perp \cdot \left( \overline{{\bf u} \otimes {\bf u} }^{\tilde z} \right) +& + \left( \nabla_\perp \cdot {\bf u} \right) {\bf u} + \frac{1}{\tilde h}\left( - \left[ {\bf u}\right]_{z=z^{\text{top}}}-\overline{ {\bf u} }^{\tilde z}\right) \, \left[\tilde{w}_{tr} \right]_{z=z^{\text{top}}} - - + \left[ {\bf u}\right]_{z=z^{\text{top}}}-\overline{ {\bf u} }^{\tilde z}\right) \, \left[\tilde{w}_{tr} \right]_{z=z^{\text{top}}} + - \frac{1}{\tilde h}\left( - \left[ {\bf u}\right]_{z=z^{\text{bot}}}-\overline{ {\bf u} }^{\tilde z}\right) \, \left[\tilde{w}_{tr} \right]_{z=z^{\text{bot}}} + \left[ {\bf u}\right]_{z=z^{\text{bot}}}-\overline{ {\bf u} }^{\tilde z}\right) \, \left[\tilde{w}_{tr} \right]_{z=z^{\text{bot}}} \\ & = -- \overline{ \mathbf{f} \times \mathbf{u} }^{\tilde z} -- \overline{ \nabla_\perp \Phi }^{\tilde z} -- \overline{\alpha}^z \overline{\nabla_{\perp} p}^{z} -+ \overline{\alpha}^z \overline{ \frac{\partial}{\partial x_i} \left( \tau_{ij} \right) }^z +- \overline{ \mathbf{f} \times \mathbf{u} }^{\tilde z} +- \overline{ \nabla_\perp \Phi }^{\tilde z} +- \overline{\alpha}^z \overline{\nabla_{\perp} p}^{z} ++ \overline{\alpha}^z \overline{ \frac{\partial}{\partial x_i} \left( \tau_{ij} \right) }^z $$ (momentum-layered-differential-3) In addition, the horizontal advection may be rewritten as $$ -\nabla_\perp \cdot \left( {\bf u} \otimes {\bf u} \right) -&= +\nabla_\perp \cdot \left( {\bf u} \otimes {\bf u} \right) +&= \nabla_\perp \cdot \left( {\bf u} {\bf u}^T \right) \\ &= \left( \nabla_\perp \cdot {\bf u} \right) {\bf u} -+ {\bf u} \cdot \nabla_\perp {\bf u} ++ {\bf u} \cdot \nabla_\perp {\bf u} $$ (adv2d-prod) The term ${\bf u} \cdot \nabla_\perp {\bf u}$ may be replaced with the vector identity @@ -601,32 +674,32 @@ $$ $$ (advection-identity) where $\zeta$ is relative vorticity and $K$ is kinetic energy. -This step separates the horizontal advection into non-divergent and non-rotational components, which is useful in the final TRiSK formulation. +This step separates the horizontal advection into non-divergent and non-rotational components, which is useful in the final TRiSK formulation. Now [](#momentum-layered-differential-3) becomes $$ - \frac{\partial \overline{ {\bf u} }^{\tilde z} }{\partial t} + \frac{\partial \overline{ {\bf u} }^{\tilde z} }{\partial t} + \left( \zeta + f \right) {\overline{ {\bf u} }^{\tilde z}}^\perp -& +& + \left( \nabla_\perp \cdot {\bf u} \right) {\bf u} + \frac{1}{\tilde h}\left( - \left[ {\bf u}\right]_{z=z^{\text{top}}}-\overline{ {\bf u} }^{\tilde z}\right) \, \left[\tilde{w}_{tr} \right]_{z=z^{\text{top}}} - - + \left[ {\bf u}\right]_{z=z^{\text{top}}}-\overline{ {\bf u} }^{\tilde z}\right) \, \left[\tilde{w}_{tr} \right]_{z=z^{\text{top}}} + - \frac{1}{\tilde h}\left( - \left[ {\bf u}\right]_{z=z^{\text{bot}}}-\overline{ {\bf u} }^{\tilde z}\right) \, \left[\tilde{w}_{tr} \right]_{z=z^{\text{bot}}} + \left[ {\bf u}\right]_{z=z^{\text{bot}}}-\overline{ {\bf u} }^{\tilde z}\right) \, \left[\tilde{w}_{tr} \right]_{z=z^{\text{bot}}} \\ & = -- \nabla_\perp K -- \overline{ \nabla_\perp \Phi }^{\tilde z} -- \overline{\alpha}^z \overline{\nabla_{\perp} p}^{z} -+ \overline{\alpha}^z \overline{ \frac{\partial}{\partial x_i} \left( \tau_{ij} \right) }^z +- \nabla_\perp K +- \overline{ \nabla_\perp \Phi }^{\tilde z} +- \overline{\alpha}^z \overline{\nabla_{\perp} p}^{z} ++ \overline{\alpha}^z \overline{ \frac{\partial}{\partial x_i} \left( \tau_{ij} \right) }^z $$ (momentum-layered-differential-4) Notes from Mark: 1. I don't know what to do with the z-average in the advection term of [](#momentum-layered-differential-2) and here. In the mean time, I'll just skip to the layer-averaged terms. -2. I don't know what to make of the $\left( \nabla_\perp \cdot {\bf u} \right) {\bf u}$ term, and whether it cancels with some of those odd vertical transport terms. +2. I don't know what to make of the $\left( \nabla_\perp \cdot {\bf u} \right) {\bf u}$ term, and whether it cancels with some of those odd vertical transport terms. @@ -648,7 +721,7 @@ $$ &+ \nabla_z \cdot \left( \tilde{h}\, \overline{\mathbf{u} \otimes \mathbf{u}}^{\tilde{z}} \right) \\ &+ \left[ \mathbf{u} \tilde{w}_{tr} \right]_{\tilde{z}^{\text{top}}} - \left[ \mathbf{u} \tilde{w}_{tr} \right]_{\tilde{z}^{\text{bot}}} \\ -&= +&= - \int_{V(t)} \rho\, \mathbf{f} \times \mathbf{u} \, dV - \tilde{h}\, \overline{ \mathbf{f} \times \mathbf{u} + \nabla_z \Phi }^{\tilde{z}} \\ &\quad - \frac{1}{\rho_0}\nabla_z \left( \int_{{z}^{\text{bot}}}^{{z}^{\text{top}}} p \, d{z} \right) From 4c484fbf85e4fd4685ff0325f02a3fb7e61c809b Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Tue, 17 Jun 2025 03:44:35 -0500 Subject: [PATCH 32/65] Clarify change of notation --- components/omega/doc/design/OmegaV1GoverningEqns.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 1da515942b07..9243bbb5a8b4 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -96,7 +96,7 @@ The derivation of the momentum equation may also be found in [Leishman 2025](htt In geophysical flows the vertical and horizontal directions are treated differently due to rotation and stratification, which leads to different scales of motion. To that end, assume that the control volume $V$ is bounded in the horizontal by a fixed wall $\partial V^{side}$ that does not vary in time or $z$. The top and bottom boundaries of $V$, $\partial V^{\text{top}}$ and $\partial V^{\text{bot}}$, occur at $z = z^{\text{top}}(x,y,t)$ and $z = z^{\text{bot}}(x,y,t)$. -Taking the tracer equation as an example and dropping the explicit $({\bf x},t)$ dependance notation, we separate all integrals between horizontal and vertical, +Taking the tracer equation as an example and dropping the explicit notation for spatial and temporal dependence, i.e., writing $\rho$, $\varphi$, and ${\bf v}$ instead of $\rho({\bf x},t)$, $\varphi({\bf x},t)$, etc., we separate all integrals between horizontal and vertical, $$ \frac{d}{dt} \int_{V(t)} \rho \, \varphi \, dV From 3356b2e9bf4539ee0751ef6c1e507bf828a37ba8 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Tue, 17 Jun 2025 04:54:00 -0500 Subject: [PATCH 33/65] Extensive revisions to "Horizontal & Vertical Separation" Proper handling of the sloped top and bottom surfaces is introduced. Notation is clarified. Approximations are justified. --- .../omega/doc/design/OmegaV1GoverningEqns.md | 122 ++++++++++++------ 1 file changed, 84 insertions(+), 38 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 9243bbb5a8b4..af66f23dc31c 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -93,34 +93,73 @@ The derivation of the momentum equation may also be found in [Leishman 2025](htt ### Horizontal \& Vertical Separation -In geophysical flows the vertical and horizontal directions are treated differently due to rotation and stratification, which leads to different scales of motion. -To that end, assume that the control volume $V$ is bounded in the horizontal by a fixed wall $\partial V^{side}$ that does not vary in time or $z$. -The top and bottom boundaries of $V$, $\partial V^{\text{top}}$ and $\partial V^{\text{bot}}$, occur at $z = z^{\text{top}}(x,y,t)$ and $z = z^{\text{bot}}(x,y,t)$. -Taking the tracer equation as an example and dropping the explicit notation for spatial and temporal dependence, i.e., writing $\rho$, $\varphi$, and ${\bf v}$ instead of $\rho({\bf x},t)$, $\varphi({\bf x},t)$, etc., we separate all integrals between horizontal and vertical, +In geophysical flows, the vertical and horizontal directions are treated differently due to rotation and stratification, which leads to different characteristic scales of motion. +To make this distinction explicit, we reformulate the conservation equations in a geometry that separates horizontal and vertical fluxes. +We partition the surface integral into contributions from the fixed side walls $\partial V^{\text{side}}$ and the time-varying upper and lower surfaces, $\partial V^{\text{top}}(t)$ and $\partial V^{\text{bot}}(t)$. +The top and bottom surfaces are not necessarily flat, so we retain their full geometry. + +As an example, we consider the tracer equation and drop the explicit notation for spatial and temporal dependence for clarity. We write the control-volume form as: $$ \frac{d}{dt} \int_{V(t)} \rho \, \varphi \, dV &+ - \int_{\partial V(t)}\rho\, \varphi \left({\bf v} - {\bf v}_r \right) \cdot {\bf n} \, dA -= 0 \\ -\frac{d}{dt} \int_{V(t)} \rho \, \varphi \, dV +\int_{\partial V^{\text{side}}} \rho \varphi \left({\bf v} - {\bf v}_r \right) \cdot {\bf n} \, dA \\ &+ - \int_{\partial V^{side}}\rho\, \varphi \left({\bf v} - {\bf v}_r \right) \cdot {\bf n} \, dA - + \int_{\partial V^{\text{top}}(t)}\rho\, \varphi \left({\bf v} - {\bf v}_r \right) \cdot {\bf n} \, dA - + \int_{\partial V^{\text{bot}}(t)}\rho\, \varphi \left({\bf v} - {\bf v}_r \right) \cdot {\bf n} \, dA -= 0 \\ -\frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, \varphi \, dz \, dA +\int_{\partial V^{\text{top}}(t)} \rho \varphi \left({\bf v} - {\bf v}_r \right) \cdot {\bf n} \, dA ++ +\int_{\partial V^{\text{bot}}(t)} \rho \varphi \left({\bf v} - {\bf v}_r \right) \cdot {\bf n} \, dA += 0 +$$ (tr-v-h-split) + +The unit normals on the top and bottom surfaces are given by: + +$$ +{\bf n}^{\text{top}} = \frac{(-\nabla z^{\text{top}}, 1)}{\sqrt{1 + |\nabla z^{\text{top}}|^2}}, \quad +{\bf n}^{\text{bot}} = \frac{(-\nabla z^{\text{bot}}, 1)}{\sqrt{1 + |\nabla z^{\text{bot}}|^2}} +$$ (top-bot-normal) + +In typical Omega configurations, the slope of the top and bottom surfaces will be small, i.e., $|\nabla z^{\text{top}}| \ll 1$ and $|\nabla z^{\text{bot}}| \ll 1$. Under this small-slope approximation, we neglect the square root in the denominator of the unit normal, and write: + +$$ +{\bf n}^{\text{top}} \approx (-\nabla z^{\text{top}}, 1), \quad +{\bf n}^{\text{bot}} \approx (-\nabla z^{\text{bot}}, 1) +$$ + +This allows sloping-surface contributions such as $\nabla z^{\text{top}}$ to be retained while avoiding more complex metric factors. The approximation is accurate to leading order in slope and consistent with hydrostatic and layered modeling frameworks. + +Thus, the flux integrals across sloping boundaries retain contributions from both the vertical and horizontal components of ${\bf v} - {\bf v}_r$, and include the slope terms $\nabla z^{\text{top}}$ and $\nabla z^{\text{bot}}$. + +This formulation keeps the geometry fully general and allows for future manipulation or approximations. Subsequent approximations---such as retaining only the vertical component---can be applied explicitly where appropriate in later sections. + +To facilitate integration over a fixed horizontal domain, we introduce the following notation: + +- $A$ is the horizontal footprint (in the $x$–$y$ plane) of the control volume $V(t)$. +- $dA$ is the horizontal area element. +- $\partial A$ is the boundary of $A$, and $dl$ is the line element along this boundary. +- ${\bf n}_\perp$ is the outward-pointing unit normal vector in the horizontal plane, defined on $\partial A$. It lies in the $x$–$y$ plane and is orthogonal to $dl$. + +We now project the tracer equation [](#tr-v-h-split) onto a horizontal domain $A$ (the footprint of the control volume), over which the top and bottom boundaries vary in height. The side walls remain fixed in time and space. Using this projection, we obtain: + +$$ +\frac{d}{dt} \int_{A} \int_{z^{\text{bot}}(x,y,t)}^{z^{\text{top}}(x,y,t)} \rho \, \varphi \, dz \, dA &+ - \int_{\partial A}\left( \int_{z^{\text{bot}}}^{z^{\text{top}}}\rho\, \varphi {\bf u} dz \right) \cdot {\bf n} \, dl - + \int_{A}\left[ \rho\, \varphi \left(w - w_r \right) \right]_{z=z^{\text{top}}} \, dA - - \int_{A}\left[ \rho\, \varphi \left(w - w_r \right) \right]_{z=z^{\text{bot}}} \, dA +\int_{\partial A} \left( \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \varphi \, {\bf u} \, dz \right) \cdot {\bf n}_\perp \, dl \\ +&+ +\int_A \rho \varphi \left[ + (w - w_r) - {\bf u} \cdot \nabla z^{\text{top}} +\right]_{z = z^{\text{top}}} dA \\ +&- +\int_A \rho \varphi \left[ + (w - w_r) - {\bf u} \cdot \nabla z^{\text{bot}} +\right]_{z = z^{\text{bot}}} dA = 0 $$ (tr-v-h-separation) -Here ${\bf v} = ({\bf u},w)$ is written using the horizontal velocity ${\bf u}$ and vertical velocity $w$. -In the final equation, perpendicular velocity components drop out of each integral. -Since $\partial V^{side}$ is fixed, ${\bf u}_r=0$ and drops out of the second term. -Here $A$ is the horizontal region, i.e. the projection of ${\partial V^{\text{top}}(t)}$ and ${\partial V^{\text{top}}(t)}$ into the horizontal plane, which is fixed in time. + +Here ${\bf v} = ({\bf u},w)$ separates the three-dimensional velocity into horizontal velocity ${\bf u}$ and vertical velocity $w$. +In the final equation, only velocity components aligned with the boundary normals contribute to each integral, so perpendicular components drop out. +Since the side boundary $\partial V^{\text{side}}$ is fixed in space, ${\bf v}_r = 0$ there and drops out of the corresponding term. +The domain $A$ is the fixed horizontal footprint of the control volume in the $x$–$y$ plane, over which the top and bottom surfaces $z^{\text{top}}(x,y,t)$ and $z^{\text{bot}}(x,y,t)$ may vary in space and time. Using this procedure of separating the horizontal from the vertical, the governing equations are @@ -128,10 +167,12 @@ mass: $$ \frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, dz \, dA -+ - \int_{\partial A}\left( \int_{z^{\text{bot}}}^{z^{\text{top}}}\rho\, {\bf u} \, dz \right) \cdot {\bf n} \, dl - + \int_{A}\left[ \rho\, \left(w - w_r \right) \right]_{z=z^{\text{top}}} \, dA - - \int_{A}\left[ \rho\, \left(w - w_r \right) \right]_{z=z^{\text{bot}}} \, dA +&+ +\int_{\partial A}\left( \int_{z^{\text{bot}}}^{z^{\text{top}}}\rho\, {\bf u} \, dz \right) \cdot {\bf n}_\perp \, dl \\ +&+ +\int_{A} \rho \left[ (w - w_r) - {\bf u} \cdot \nabla z^{\text{top}} \right]_{z=z^{\text{top}}} \, dA +- +\int_{A} \rho \left[ (w - w_r) - {\bf u} \cdot \nabla z^{\text{bot}} \right]_{z=z^{\text{bot}}} \, dA = 0 $$ (vh-mass) @@ -139,30 +180,35 @@ tracers: $$ \frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, \varphi \, dz \, dA -+ - \int_{\partial A}\left( \int_{z^{\text{bot}}}^{z^{\text{top}}}\rho\, \varphi \, {\bf u} \, dz \right) \cdot {\bf n} \, dl - + \int_{A}\left[ \rho\, \varphi \left(w - w_r \right) \right]_{z=z^{\text{top}}} \, dA - - \int_{A}\left[ \rho\, \varphi \left(w - w_r \right) \right]_{z=z^{\text{bot}}} \, dA +&+ +\int_{\partial A}\left( \int_{z^{\text{bot}}}^{z^{\text{top}}}\rho\, \varphi \, {\bf u} \, dz \right) \cdot {\bf n}_\perp \, dl \\ +&+ +\int_{A} \rho \varphi \left[ (w - w_r) - {\bf u} \cdot \nabla z^{\text{top}} \right]_{z=z^{\text{top}}} \, dA +- +\int_{A} \rho \varphi \left[ (w - w_r) - {\bf u} \cdot \nabla z^{\text{bot}} \right]_{z=z^{\text{bot}}} \, dA = 0 $$ (vh-tracer) momentum: $$ -& \frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, {\bf v} \, dz \, dA -+ - \int_{\partial A}\left( \int_{z^{\text{bot}}}^{z^{\text{top}}}\rho\, {\bf v} \otimes {\bf u} \, dz \right) \cdot {\bf n} \, dl - + \int_{A}\left[ \rho\, {\bf v} \left(w - w_r \right) \right]_{z=z^{\text{top}}} \, dA - - \int_{A}\left[ \rho\, {\bf v} \left(w - w_r \right) \right]_{z=z^{\text{bot}}} \, dA -\\ & \; = -\int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, {\bf g} \, dz \, dA +\frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, {\bf v} \, dz \, dA +&+ +\int_{\partial A} \left( \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, {\bf v} \otimes {\bf u} \, dz \right) \cdot {\bf n}_\perp \, dl \\ +&+ +\int_A \rho \, {\bf v} \left[ (w - w_r) - {\bf u} \cdot \nabla z^{\text{top}} \right]_{z=z^{\text{top}}} \, dA +- +\int_A \rho \, {\bf v} \left[ (w - w_r) - {\bf u} \cdot \nabla z^{\text{bot}} \right]_{z=z^{\text{bot}}} \, dA \\ +&= +\int_A \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, {\bf b} \, dz \, dA + - \int_{\partial A}\left( \int_{z^{\text{bot}}}^{z^{\text{top}}}\, {\bf f} \, dz \right) \, dl - + \int_{A}\left[ {\bf f} \right]_{z=z^{\text{top}}} \, dA - - \int_{A}\left[ {\bf f} \right]_{z=z^{\text{bot}}} \, dA +\int_{\partial A} \left( \int_{z^{\text{bot}}}^{z^{\text{top}}} {\bf f} \, dz \right) dl \\ +&\quad ++ \int_A \left[ {\bf f} \right]_{z = z^{\text{top}}} \, dA +- \int_A \left[ {\bf f} \right]_{z = z^{\text{bot}}} \, dA $$ (vh-momentum) -The momentum advection contains ${\bf v} \otimes {\bf u}$, which is the outer product ${\bf v} {\bf u}^T$, and is also called the tensor product. The dimension of the tensor ${\bf v} \otimes {\bf u}$ is 3$\times$2, where the first is the dimension of the ${\bf v}$ equation in $(x,y,z)$. The second dimension is from ${\bf u}$, which associates with the dot product into the horizontal vector $\bf n$. +The momentum advection term contains ${\bf v} \otimes {\bf u}$, the outer (or tensor) product of the full velocity ${\bf v} = ({\bf u}, w)$ with the horizontal velocity ${\bf u}$. This object is a 3×2 tensor: the three rows correspond to the components of momentum being advected (in $x$, $y$, and $z$), and the two columns correspond to the directions of horizontal transport. This structure naturally arises in the surface integral over $\partial A$, where the tensor is contracted with the horizontal unit normal vector ${\bf n}_\perp$ to yield a vector flux through the vertical sides of the control volume. ### Hydrostatic Approximation From 89223414b3ef9ecda4da7e8389df77a255e1439e Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Tue, 17 Jun 2025 06:09:05 -0500 Subject: [PATCH 34/65] Revisions to notation and clarification in "Hydrostatic Approximation" A few small tweaks to the Favre section A few small revisions to pseudo-height Replace Amazon links with DOIs Some cleanup in "Vertical Discretization" --- .../omega/doc/design/OmegaV1GoverningEqns.md | 121 +++++++++++------- 1 file changed, 72 insertions(+), 49 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index af66f23dc31c..316426e8da8a 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -219,15 +219,19 @@ horizontal momentum: $$ & \frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, {\bf u} \, dz \, dA + - \int_{\partial A}\left( \int_{z^{\text{bot}}}^{z^{\text{top}}}\rho\, {\bf u} \otimes {\bf u} \, dz \right) \cdot {\bf n} \, dl - + \int_{A}\left[ \rho\, {\bf u} \left(w - w_r \right) \right]_{z=z^{\text{top}}} \, dA - - \int_{A}\left[ \rho\, {\bf u} \left(w - w_r \right) \right]_{z=z^{\text{bot}}} \, dA -\\ & \; = -\int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, {\bf g}_\perp \, dz \, dA +\int_{\partial A} \left( \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, {\bf u} \otimes {\bf u} \, dz \right) \cdot {\bf n}_\perp \, dl \\ +& + +\int_{A} \rho \, {\bf u} \left[ (w - w_r) - {\bf u} \cdot \nabla z^{\text{top}} \right]_{z = z^{\text{top}}} \, dA +- +\int_{A} \rho \, {\bf u} \left[ (w - w_r) - {\bf u} \cdot \nabla z^{\text{bot}} \right]_{z = z^{\text{bot}}} \, dA \\ +& = +\int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, {\bf b}_\perp \, dz \, dA + - \int_{\partial A}\left( \int_{z^{\text{bot}}}^{z^{\text{top}}}\, {\bf f}_\perp \, dz \right) \, dl - + \int_{A}\left[ {\bf f}_\perp \right]_{z=z^{\text{top}}} \, dA - - \int_{A}\left[ {\bf f}_\perp \right]_{z=z^{\text{bot}}} \, dA +\int_{\partial A} \left( \int_{z^{\text{bot}}}^{z^{\text{top}}} {\bf f}_\perp \, dz \right) \, dl \\ +& + +\int_{A} \left[ {\bf f}_\perp \right]_{z = z^{\text{top}}} \, dA +- +\int_{A} \left[ {\bf f}_\perp \right]_{z = z^{\text{bot}}} \, dA $$ (h-momentum) vertical momentum: @@ -235,39 +239,51 @@ vertical momentum: $$ & \frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, w \, dz \, dA + - \int_{\partial A}\left( \int_{z^{\text{bot}}}^{z^{\text{top}}}\rho\, w \, {\bf u} \, dz \right) \cdot {\bf n} \, dl - + \int_{A}\left[ \rho\, w \left(w - w_r \right) \right]_{z=z^{\text{top}}} \, dA - - \int_{A}\left[ \rho\, w \left(w - w_r \right) \right]_{z=z^{\text{bot}}} \, dA -\\ & \; = -\int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, g_z \, dz \, dA +\int_{\partial A} \left( \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, w \, {\bf u} \, dz \right) \cdot {\bf n}_\perp \, dl \\ +& + +\int_{A} \rho \, w \left[ (w - w_r) - {\bf u} \cdot \nabla z^{\text{top}} \right]_{z = z^{\text{top}}} \, dA +- +\int_{A} \rho \, w \left[ (w - w_r) - {\bf u} \cdot \nabla z^{\text{bot}} \right]_{z = z^{\text{bot}}} \, dA \\ +& = +\int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, b_z \, dz \, dA + - \int_{\partial A}\left( \int_{z^{\text{bot}}}^{z^{\text{top}}}\, f_z \, dz \right) \, dl - + \int_{A}\left[ f_z \right]_{z=z^{\text{top}}} \, dA - - \int_{A}\left[ f_z \right]_{z=z^{\text{bot}}} \, dA +\int_{\partial A} \left( \int_{z^{\text{bot}}}^{z^{\text{top}}} f_z \, dz \right) \, dl \\ +& + +\int_{A} \left[ f_z \right]_{z = z^{\text{top}}} \, dA +- +\int_{A} \left[ f_z \right]_{z = z^{\text{bot}}} \, dA $$ (v-momentum) -where the potential gradient vector is ${\bf g} = ({\bf g}_\perp, g_z)$ and the surface forces are ${\bf f} = ({\bf f}_\perp, f_z)$. +where the potential gradient vector is ${\bf b} = ({\bf b}_\perp, b_z)$ and the surface forces are ${\bf f} = ({\bf f}_\perp, f_z)$. -The hydrostatic approximation assumes that the first order balance in vertical momentum is between the pressure gradient and buoyancy, and that all other terms are negligible (advection, dissipation, and other forces). +The hydrostatic approximation applies to the vertical component of the momentum equation and assumes that the leading-order balance is between the vertical pressure gradient and the gravitational body force. All other terms---such as vertical acceleration, advection, and viscous or turbulent stresses---are assumed to be negligible in comparison. Applying this assumption to [](#v-momentum), $$ -\int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, g_z \, dz \, dA - + \int_{A}\left[ f_z \right]_{z=z^{\text{top}}} \, dA - - \int_{A}\left[ f_z \right]_{z=z^{\text{bot}}} \, dA - = 0 \\ -\int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, g \, dz \, dA - + \int_{A}\left[ p \right]_{z=z^{\text{top}}} \, dA - - \int_{A}\left[ p \right]_{z=z^{\text{bot}}} \, dA - = 0 \\ -\int_{A}\left( \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, g \, dz - + \left[ p \right]_{z=z^{\text{top}}} - - \left[ p \right]_{z=z^{\text{bot}}} \right) dA - = 0 , +\int_A \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, b_z \, dz \, dA ++ \int_A \left[ f_z \right]_{z = z^{\text{top}}} \, dA +- \int_A \left[ f_z \right]_{z = z^{\text{bot}}} \, dA = 0 +$$ (v-hydrostatic1) + +Assuming the vertical body force is gravity, $b_z = -g$, and the vertical surface stress is from pressure, $f_z = -p$, the equation becomes: + +$$ +- \int_A \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho g \, dz \, dA +- \int_A \left[ p \right]_{z = z^{\text{top}}} \, dA ++ \int_A \left[ p \right]_{z = z^{\text{bot}}} \, dA = 0 +$$ (v-hydrostatic2) + +Although the top and bottom surfaces may be sloping, the vertical component of the pressure force simplifies to $\pm p \, dA$ to leading order. This is because the projection of the pressure force onto the vertical direction introduces a factor of $\hat{\bf n} \cdot \hat{\bf z} \approx 1 - \tfrac{1}{2}|\nabla z|^2$, while the sloping surface area element adds a compensating factor of $\sqrt{1 + |\nabla z|^2} \approx 1 + \tfrac{1}{2}|\nabla z|^2$. These cancel to second order, and the net vertical pressure force is simply the pressure value multiplied by the horizontal area element $dA$. Thus, no explicit slope terms appear in the hydrostatic balance. + +Rewriting: + +$$ +\int_A \left( \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho g \, dz ++ \left[ p \right]_{z = z^{\text{top}}} +- \left[ p \right]_{z = z^{\text{bot}}} \right) dA = 0 $$ (v-hydrostatic) -where $g$ is Earth's gravitational accelleration, and $p({\bf x},t)$ is the fluid pressure. -Because this is valid for any horizontal region $A$, the integrand may be expressed as a general equation, +Because this equation holds for any horizontal region $A$, the integrand must vanish, yielding the hydrostatic pressure relation: $$ \left[ p \right]_{z=z^{\text{bot}}} @@ -297,13 +313,13 @@ $$ \frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, {\bf u} \, dz \, dA = \frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} (\overline{\rho {\bf u}} + \, \overline{\rho^\prime {\bf u}^\prime}) \, dz \, dA $$ -In this equation, the products of prime and average drop out by construction. The $\overline{\rho^\prime {\mathbf u}^\prime}$ term is an unnecessary complication and difficult to parameterize. To circumvent this complication, Omega will adopt Favre averaging [Pope 2000](https://elmoukrie.com/wp-content/uploads/2022/04/pope-s.b.-turbulent-flows-cambridge-university-press-2000.pdf), which for the generic variable $\phi$ is +In this equation, the products of prime and average drop out by construction. The $\overline{\rho^\prime {\mathbf u}^\prime}$ term is an unnecessary complication and difficult to parameterize. To circumvent this complication, Omega will adopt Favre averaging [(Pope 2000)](https://elmoukrie.com/wp-content/uploads/2022/04/pope-s.b.-turbulent-flows-cambridge-university-press-2000.pdf), which for the generic variable $\phi$ is $$ \phi = \hat{\phi} + \phi^" $$ -Where $\hat{\phi} \equiv \frac{\overline{\rho \phi}}{\overline{\rho}}$, and the double prime indicates deviations from this density weighted mean. In the definition, the overbar is an averaging operator with identical properties to a Reynolds' average. Using this relation, we can relate Reynolds' average to Favre average by considering a the average of $\rho \phi$. The standard Reynolds' approach gives +Where $\hat{\phi} \equiv \frac{\overline{\rho \phi}}{\overline{\rho}}$, and the double prime indicates deviations from this density weighted mean. In the definition, the overbar is an averaging operator with identical properties to a Reynolds' average. Using this relation, we can relate Reynolds' average to Favre average by considering the average of $\rho \phi$. The standard Reynolds' approach gives $$ \overline{\rho \phi} = \overline{\rho}\overline{\phi} + \overline{\rho^\prime \phi^\prime} @@ -321,7 +337,8 @@ $$ \overline{\phi} = \hat{\phi} + \frac{\overline{\rho^\prime \phi^\prime}}{\overline{\rho}} $$ -Throughout much of the ocean, we expect the second term to be $O(10^{-3})$ but could be large in highly turbulent regions. With the adoption, all Omega variables will be interpreted as Favre averaged, but these variables will be very similar to the traditional Reynolds' average for most flows. +Throughout much of the ocean, we expect the second term to be $O(10^{-3})$ smaller than the first, but could be large in highly turbulent regions. With this adoption, all prognostic and diagnostic variables in Omega are interpreted as Favre averages. +This choice ensures that the governing equations are closed in terms of density-weighted means, avoiding the need to model second-order density fluctuations like $\overline{\rho' \phi'}$ that would otherwise arise in a Reynolds framework. ## 5. Layered Equations @@ -351,6 +368,7 @@ $$ \tilde{z}(z) = -\frac{1}{\rho_0 g} \, p(z) = -\frac{1}{\rho_0 g}\left( p^\text{surf} + \int_{z}^{z^\text{surf}} \rho(z') g dz'\right). $$ (formula-pseudo-height) +Here, $z'$ is a dummy variable of integration. The pseudo-velocity in the vertical is @@ -366,21 +384,20 @@ $$ (def-pseudo-velocity) As above, $\tilde{w}$ has identical units and very similar values to $w$. But in a non-Boussinesq model, it is the vertical *mass* transport that is the physically relevant quantity, not the volume transport. To this end, $\rho w$ is the mass transport per unit area in kg/m$^2$/s. The pseudo-velocity *is* the Eulerian mass transport, but with a convenient normalization of $\rho_0$. -[Griffies 2018](https://www.amazon.com/Fundamentals-Climate-Models-Stephen-Griffies-ebook/dp/B07DMWP8L7) p. 37 argues for the use of pseudo-velocities, which he calls the density-weighted velocity, for non-Boussinesq models. -Griffies recommends a value of $\rho_0=1035$ kg/m$^3$, following p. 47 of [Gill (1982)](https://www.amazon.com/Atmosphere-Ocean-Dynamics-International-Geophysics-30/dp/0122835220), because ocean density varies less than 2% from that value. -Note that the use of a constant $\rho_0$ in these definitions does not imply the Boussinesq approximation, which also uses a $\rho_0$. -In that case, the full density $\rho$ is set to $\rho_0$ in all terms but the computation of pressure. -Here we do not make the Boussinesq approximation, and $\rho_0$ is simply a convenient normalization constant so that $d\tilde{z} \approx dz$ when $\rho \approx \rho_0$. +[Griffies 2018](https://doi.org/10.2307/j.ctv301gzg) p. 37 argues for the use of pseudo-velocities, which he calls the density-weighted velocity, for non-Boussinesq models. +Griffies recommends a value of $\rho_0=1035$ kg/m$^3$, following p. 47 of [Gill (1982)](https://doi.org/10.1016/S0074-6142(08)60028-5), because ocean density varies less than 2% from that value. + +The use of a constant $\rho_0$ in defining pseudo-height does not imply the Boussinesq approximation. In Boussinesq models, $\rho$ is set to $\rho_0$ everywhere except in the buoyancy term (i.e., the vertical pressure gradient or gravitational forcing). Here, by contrast, we retain the full $\rho$ in all terms, and use $\rho_0$ only as a normalization constant—for example, so that $d\tilde{z} \approx dz$ when $\rho \approx \rho_0$. This preserves full mass conservation while making vertical units more intuitive. Here we explain the reasoning for the choice of defining $\tilde{z}$ as directly proportional to pressure in [](#def-pseudo-height). -The differential form of the hydrostatic balance $dp = -\rho g dz$ implies that we could choose an arbitrary offset. One could set the offset such that $\tilde{z}=0$ at $z=0$, so that the equilibrium sea surface height matches. Or one could set $\tilde{z}^{\text{floor}} = z^{\text{floor}}$ at some reference depth. Our definition [](#def-pseudo-height), sets $\tilde{z}=0$ where $p=0$, which is at the top of the atmosphere. This choice was made so that $\tilde{z}$ is as close as possible to a pressure coordinate, and the additional normalization by $\rho_0 g$ was included so that units and values for $\tilde{z}$, $\tilde{h}$, and $\tilde{w}$ are intuitive and easy to work with. A major advantage of [](#def-pseudo-height) is that $\tilde{z}^{\text{floor}}$ is proportional to the bottom pressure, and can be used directly for the barotropic pressure gradient in time-split methods. +The differential form of the hydrostatic balance $dp = -\rho g dz$ implies that we could choose an arbitrary offset. One could set the offset such that $\tilde{z}=0$ at $z=0$, so that the equilibrium sea surface height matches. Or one could set $\tilde{z}^{\text{floor}} = z^{\text{floor}}$ at some reference depth. Our definition [](#def-pseudo-height) was made so that $\tilde{z}$ varies in space and time in the same way as pressure, and the additional normalization by $\rho_0 g$ was included so that units and values for $\tilde{z}$, $\tilde{h}$, and $\tilde{w}$ are intuitive and easy to work with. A major advantage of [](#def-pseudo-height) is that $\tilde{z}^{\text{floor}}$ is proportional to the bottom pressure, and can be used directly for the barotropic pressure gradient in time-split methods. ### Vertical Discretization The previous equation set [](#vh-mass) to [](#vh-momentum) is for an arbitrary layer bounded by $z^{\text{top}}$ above and $z^{\text{bot}}$ below. We now provide the details of the vertical discretization. -The ocean is divided vertically into $K_{max}$ layers, with $k=1$ at the top and increasing downwards (opposite from $z$). -Layer $k$ is bounded between $z_k^{\text{top}}$ above and $z_{k+1}^{\text{top}}$ below. +The ocean is divided vertically into $K_{max}$ layers, with $k=0$ at the top and increasing downwards (opposite from $z$). +Layer $k$ is bounded between $z_k^{\text{top}}$ above and $z_{k+1}^{\text{top}}$ below (i.e. $z_k^{\text{bot}} = z_{k+1}^{\text{top}}$). The layer thickness of layer k, used in MPAS-Ocean, is @@ -391,11 +408,16 @@ $$ (def-thickness) In Omega we will use the pseudo-thickness, $$ -{\tilde h}_k(x,y,t) = \int_{{\tilde z}_{k+1}^{\text{top}}}^{{\tilde z}_k^{\text{top}}} d{\tilde z} -= \frac{1}{\rho_0} \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho dz, +{\tilde h}_k(x,y,t) +&= \int_{{\tilde z}_{k+1}^{\text{top}}}^{{\tilde z}_k^{\text{top}}} d\tilde{z} \\ +&= \frac{1}{\rho_0} \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho \, dz \\ +&= \frac{1}{\rho_0 g} \left( \hat{p}_{k+1}^{\text{top}} - \hat{p}_k^{\text{top}} \right) $$ (def-pseudo-thickness) -which is the mass per unit area in the layer, normalized by $\rho_0$. The density-weighted average of any variable $\phi({\bf x},t)$ in layer $k$ is +which is the mass per unit area in the layer, normalized by $\rho_0$. This pseudo-thickness and layer-averaging will be used to express conservation laws in a mass-weighted coordinate system. Pseudo-thickness, rather than geometric +thickness will be the prognostic variable in Omega. + +The density-weighted average of any variable $\phi({\bf x},t)$ in layer $k$ is $$ {\overline \phi}^{\tilde{z}}_k(x,y,t) = @@ -419,6 +441,7 @@ $$ {\tilde h}_k {\overline \phi}^{\tilde{z}}_k(x,y,t). $$ (h-phi) +This relation is frequently used in discretized fluxes and conservation equations to replace integrals with layer-mean quantities. ### Layered Tracer & Mass @@ -536,7 +559,7 @@ They also include **vertical stress forces** (e.g., wind stress at the ocean sur #### Pressure Term -The pressure force term may be converted from the boundary to the interior with Gauss' divergence theorem (see [Kundu et al. 2016](https://www.amazon.com/dp/012405935X/) p. 119), +The pressure force term may be converted from the boundary to the interior with Gauss' divergence theorem (see [Kundu et al. 2016](https://doi.org/10.1016/C2012-0-00611-4) p. 119), $$ - \int_{\partial V(t)} p \, \mathbf{n} \, dA @@ -554,7 +577,7 @@ $$ (gradp-h) #### Stress Term -Likewise, the stress tensor integrated over the surface may be converted to a volume integral with Gauss' theorem ([Kundu et al. 2016](https://www.amazon.com/dp/012405935X/) p. 125 eqn 4.20b), +Likewise, the stress tensor integrated over the surface may be converted to a volume integral with Gauss' theorem ([Kundu et al. 2016](https://doi.org/10.1016/C2012-0-00611-4) p. 125 eqn 4.20b), $$ \int_{\partial V(t)} \boldsymbol{\tau} \cdot \mathbf{n} \, dA @@ -1250,7 +1273,7 @@ This section is for references without webpage links. These are mostly textbooks ## OLD: Continuous Equations -The continuous form of the conservation equations are as follows. See [Kundu et al. 2016](https://www.amazon.com/dp/012405935X/), chapter 4, eqns 4.7 and 4.22 or the [MOM5 manual](https://mom-ocean.github.io/assets/pdfs/MOM5_manual.pdf) eqn 7.7. This is before any assumptions are made, so this is a compressible, non-hydrostatic, non-Boussinesq fluid. Here all variables are a function of $(x,y,z)$, ${\bf u}_{3D}$ denotes the three-dimensional velocity vector, ${\bf u}_{3D} \otimes {\bf u}_{3D} = {\bf u}_{3D}{\bf u}_{3D}^T$ is the tensor product, $\nabla_{3D}$ is the three-dimensional gradient, $D/Dt$ is the material derivative, and other variables defined in the [Variable Definition Section](#variable-definitions) below. +The continuous form of the conservation equations are as follows. See [Kundu et al. 2016](https://doi.org/10.1016/C2012-0-00611-4), chapter 4, eqns 4.7 and 4.22 or the [MOM5 manual](https://mom-ocean.github.io/assets/pdfs/MOM5_manual.pdf) eqn 7.7. This is before any assumptions are made, so this is a compressible, non-hydrostatic, non-Boussinesq fluid. Here all variables are a function of $(x,y,z)$, ${\bf u}_{3D}$ denotes the three-dimensional velocity vector, ${\bf u}_{3D} \otimes {\bf u}_{3D} = {\bf u}_{3D}{\bf u}_{3D}^T$ is the tensor product, $\nabla_{3D}$ is the three-dimensional gradient, $D/Dt$ is the material derivative, and other variables defined in the [Variable Definition Section](#variable-definitions) below. momentum: From 375dcd952953a3a3394aebe6dec88e78e3d10bd5 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Tue, 17 Jun 2025 08:58:43 -0500 Subject: [PATCH 35/65] First revisions of "Layered Tracer & Mass" --- .../omega/doc/design/OmegaV1GoverningEqns.md | 38 +++++++++++++------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 316426e8da8a..1ec4529d9fd4 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -445,26 +445,40 @@ This relation is frequently used in discretized fluxes and conservation equation ### Layered Tracer & Mass -Dividing the tracer equation [](#vh-tracer) for layer $k$ by the normalization constant $\rho_0$, and substituting [](#def-pseudo-velocity), we have +Substituting [](#def-pseudo-velocity) into the tracer equation [](#vh-tracer) for layer $k$, we have $$ -\frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, \varphi \, dz \, dA +\frac{d}{dt} \int_{A} \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho \, \varphi \, dz \, dA + - \int_{\partial A}\left( \int_{z^{\text{bot}}}^{z^{\text{top}}}\rho\, \varphi \, {\bf u} \, dz \right) \cdot {\bf n} \, dl - + \int_{A}\left[ \varphi \left({\tilde w} - {\tilde w}_r \right) \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} \, dA - - \int_{A}\left[ \varphi \left({\tilde w} - {\tilde w}_r \right) \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} \, dA -= 0 +\int_{\partial A} \left( \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho \, \varphi \, {\bf u} \, dz \right) \cdot {\bf n}_\perp \, dl & \\ ++ +\int_{A} \left[ \rho_0 \varphi (\tilde{w} - \tilde{w}_r) - \rho \varphi {\bf u} \cdot \nabla z^{\text{top}} \right]_{z = z^{\text{top}}} \, dA & \\ +- +\int_{A} \left[ \rho_0 \varphi (\tilde{w} - \tilde{w}_r) - \rho \varphi {\bf u} \cdot \nabla z^{\text{bot}} \right]_{z = z^{\text{bot}}} \, dA +& = 0 $$ (Aintegral-tracer) -where we converted to pseudo-height for the last two terms using [](#formula-pseudo-height). Applying this same relation to the first two terms, +where we converted to pseudo-height for the last two terms using [](#formula-pseudo-height). + +While working in pseudo-height coordinates, vertical transport across a sloping layer interface must still be expressed in terms of the slope of the geometric height, $\nabla z^{\text{top}}$, of that interface. Although it may be tempting to rewrite this slope as $\nabla \tilde{z}^{\text{top}}$, the two are not exactly equivalent due to the nonlinear transformation between pressure and height. Differentiating the pseudo-height definition under hydrostatic balance yields: $$ -\frac{d}{dt} \int_{A} {\tilde h}_k {\overline \varphi}^{\tilde{z}}_k \, dA +\nabla z^{\text{top}} = \frac{\rho_0}{\rho(z^{\text{top}})} \nabla \tilde{z}^{\text{top}} + \frac{1}{\rho(z^{\text{top}}) g} \nabla p^{\text{surf}} +$$ + +This shows that the geometric slope differs from the pseudo-height slope by a correction term involving the horizontal gradient of surface pressure. Under typical oceanographic conditions—where density is close to the reference $\rho_0$ and surface pressure gradients are modest—this correction may be small. However, we retain $\nabla z^{\text{top}}$ explicitly in the vertical transport terms to avoid introducing assumptions that may not hold in all regimes. + +Substituting [](#h-phi) into the first two terms in [](#Aintegral-tracer) and dividing by $\rho_0$, + +$$ +\frac{d}{dt} \int_A \tilde{h}_k \, \overline{\varphi}^{\tilde{z}}_k \, dA + - \int_{\partial A}\left( {\tilde h}_k \, {\overline{\varphi \, {\bf u}}}^{\tilde{z}}_k \, \right) \cdot {\bf n} \, dl - + \int_{A}\left[ \varphi \left({\tilde w} - {\tilde w}_r \right) \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} \, dA - - \int_{A}\left[ \varphi \left({\tilde w} - {\tilde w}_r \right) \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} \, dA -= 0. +\int_{\partial A} \left( \tilde{h}_k \, \overline{\varphi {\bf u}}^{\tilde{z}}_k \right) \cdot {\bf n}_\perp \, dl & \\ ++ +\int_A \left[ \varphi (\tilde{w} - \tilde{w}_r) - \frac{\rho}{\rho_0} \varphi {\bf u} \cdot \nabla z^{\text{top}} \right]_{z = z^{\text{top}}} \, dA & \\ +- +\int_A \left[ \varphi (\tilde{w} - \tilde{w}_r) - \frac{\rho}{\rho_0} \varphi {\bf u} \cdot \nabla z^{\text{bot}} \right]_{z = z^{\text{bot}}} \, dA +& = 0 $$ (Aintegral-tracer2) The horizontal tracer flux term is expanded using $\varphi \equiv \overline{\varphi}^{\tilde{z}}_k + \delta \varphi$ and ${\bf u} \equiv \overline{\bf u}^{\tilde{z}}_k + \delta {\bf u}$ to yield From 71c347201eed2bf3e1f6ad2613216cae854634bb Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Tue, 17 Jun 2025 10:38:06 -0500 Subject: [PATCH 36/65] Better handling of layer-interface gradient terms --- .../omega/doc/design/OmegaV1GoverningEqns.md | 49 +++++++++++++++++-- 1 file changed, 44 insertions(+), 5 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 1ec4529d9fd4..1420f3c3b87c 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -392,6 +392,45 @@ The use of a constant $\rho_0$ in defining pseudo-height does not imply the Bous Here we explain the reasoning for the choice of defining $\tilde{z}$ as directly proportional to pressure in [](#def-pseudo-height). The differential form of the hydrostatic balance $dp = -\rho g dz$ implies that we could choose an arbitrary offset. One could set the offset such that $\tilde{z}=0$ at $z=0$, so that the equilibrium sea surface height matches. Or one could set $\tilde{z}^{\text{floor}} = z^{\text{floor}}$ at some reference depth. Our definition [](#def-pseudo-height) was made so that $\tilde{z}$ varies in space and time in the same way as pressure, and the additional normalization by $\rho_0 g$ was included so that units and values for $\tilde{z}$, $\tilde{h}$, and $\tilde{w}$ are intuitive and easy to work with. A major advantage of [](#def-pseudo-height) is that $\tilde{z}^{\text{floor}}$ is proportional to the bottom pressure, and can be used directly for the barotropic pressure gradient in time-split methods. +#### Slope Terms and the Limits of the Pseudo-Height Transformation + +While pseudo-height provides a convenient vertical coordinate for discretization and conservation, it does not eliminate all geometric complexity from the governing equations. In particular, the sloping geometry of layer interfaces must still be described using their geometric height $z(x, y, t)$, not their pseudo-height $\tilde{z}$. This distinction is important when computing vertical mass and tracer fluxes across moving, sloping layers, where the normal transport includes a contribution from the slope of the interface. + +Although it may be tempting to replace terms involving $\nabla z^{\text{top}}$ with $\nabla \tilde{z}^{\text{top}}$, the two quantities are not equivalent. Differentiating the definition of pseudo-height under hydrostatic balance yields a relationship between the geometric slope and pseudo-height slope of the layer interface: + +$$ +\rho(z^{\text{top}}) \nabla z^{\text{top}} = \rho_0 \left( \nabla \tilde{z}^{\text{top}} - \nabla \tilde{z}^{\text{surf}} \right) +$$ (grad-z-top) + +To derive this relationship, we begin with [](#def-pseudo-height), the definition of pseudo-height, under hydrostatic balance: +$$ +\tilde{z}(z) = -\frac{\hat{p}(z)}{\rho_0 g}, \quad \text{with} \quad \frac{d\hat{p}}{dz} = -\rho g. +$$ + +Taking a horizontal gradient of the pressure at the top of a layer, we write: +$$ +\hat{p}^{\text{top}} = \hat{p}^{\text{surf}} + \int_{z^{\text{top}}}^{z^{\text{surf}}} \rho(z') g \, dz', +$$ +and therefore: +$$ +\nabla \hat{p}^{\text{top}} = \nabla \hat{p}^{\text{surf}} + \rho(z^{\text{top}}) g \nabla z^{\text{top}}. +$$ + +Substituting into the gradient of pseudo-height: +$$ +\nabla \tilde{z}^{\text{top}} = -\frac{1}{\rho_0 g} \nabla \hat{p}^{\text{top}} += -\frac{1}{\rho_0 g} \left( \nabla \hat{p}^{\text{surf}} + \rho(z^{\text{top}}) g \nabla z^{\text{top}} \right). +$$ + +Rearranging: +$$ +\rho(z^{\text{top}}) \nabla z^{\text{top}} = \rho_0 \left( \nabla \tilde{z}^{\text{top}} - \nabla \tilde{z}^{\text{surf}} \right). +$$ + +This shows that the density-weighted geometric slope differs from the pseudo-height slope by a correction involving the horizontal gradient of surface pressure. + +An analogous expression holds for the slope of the bottom interface, $\nabla z^{\text{bot}}$. Together, these slopes determine the projection of horizontal velocity into vertical fluxes in the Arbitray Lagrangian-Eulerian (ALE) framework and remain essential for correctly evaluating mass and tracer conservation across layers. + ### Vertical Discretization The previous equation set [](#vh-mass) to [](#vh-momentum) is for an arbitrary layer bounded by $z^{\text{top}}$ above and $z^{\text{bot}}$ below. @@ -445,16 +484,16 @@ This relation is frequently used in discretized fluxes and conservation equation ### Layered Tracer & Mass -Substituting [](#def-pseudo-velocity) into the tracer equation [](#vh-tracer) for layer $k$, we have +Substituting [](#def-pseudo-velocity) and [](#grad-z-top) into the tracer equation [](#vh-tracer) for layer $k$, we have $$ \frac{d}{dt} \int_{A} \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho \, \varphi \, dz \, dA + \int_{\partial A} \left( \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho \, \varphi \, {\bf u} \, dz \right) \cdot {\bf n}_\perp \, dl & \\ + -\int_{A} \left[ \rho_0 \varphi (\tilde{w} - \tilde{w}_r) - \rho \varphi {\bf u} \cdot \nabla z^{\text{top}} \right]_{z = z^{\text{top}}} \, dA & \\ +\int_{A} \left\{ \rho_0 \varphi \left[\tilde{w} - \tilde{w}_r - {\bf u} \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right) \right] \right\}_{z = z^{\text{top}}} \, dA & \\ - -\int_{A} \left[ \rho_0 \varphi (\tilde{w} - \tilde{w}_r) - \rho \varphi {\bf u} \cdot \nabla z^{\text{bot}} \right]_{z = z^{\text{bot}}} \, dA +\int_{A} \left\{ \rho_0 \varphi \left[\tilde{w} - \tilde{w}_r - {\bf u} \cdot \nabla \left( \tilde{z}^{\text{bot}} - \tilde{z}^{\text{surf}} \right) \right] \right\}_{z = z^{\text{bot}}}\, dA & = 0 $$ (Aintegral-tracer) @@ -475,9 +514,9 @@ $$ + \int_{\partial A} \left( \tilde{h}_k \, \overline{\varphi {\bf u}}^{\tilde{z}}_k \right) \cdot {\bf n}_\perp \, dl & \\ + -\int_A \left[ \varphi (\tilde{w} - \tilde{w}_r) - \frac{\rho}{\rho_0} \varphi {\bf u} \cdot \nabla z^{\text{top}} \right]_{z = z^{\text{top}}} \, dA & \\ +\int_A \left\{ \varphi \left[\tilde{w} - \tilde{w}_r - {\bf u} \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right) \right] \right\}_{z = z^{\text{top}}} \, dA & \\ - -\int_A \left[ \varphi (\tilde{w} - \tilde{w}_r) - \frac{\rho}{\rho_0} \varphi {\bf u} \cdot \nabla z^{\text{bot}} \right]_{z = z^{\text{bot}}} \, dA +\int_A \left\{ \varphi \left[\tilde{w} - \tilde{w}_r - {\bf u} \cdot \nabla \left( \tilde{z}^{\text{bot}} - \tilde{z}^{\text{surf}} \right) \right] \right\}_{z = z^{\text{bot}}} \, dA & = 0 $$ (Aintegral-tracer2) From 20dc912080db89a39ddad6379f33caf7ab7b6e1b Mon Sep 17 00:00:00 2001 From: vanroekel Date: Tue, 17 Jun 2025 13:06:39 -0700 Subject: [PATCH 37/65] Adds new approach for tracer equation --- .../omega/doc/design/OmegaV1GoverningEqns.md | 365 +++++++++++------- 1 file changed, 220 insertions(+), 145 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 1420f3c3b87c..92026889ed17 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -298,56 +298,14 @@ $$ \frac{\partial p}{\partial z} = - \rho g $$ (hydrostatic) - -## 4. Favre Averaging - -The most common approach to determine the structure of the small scale stresses in ocean modeling is through Reynolds' averaging. In this approach, a generic field $\phi$ is broken into a mean and deviatoric component, i.e. - -$$ -\phi = \overline{\phi} + \phi^\prime -$$ - -When deriving the Reynolds' averaged equations, averages of terms with a single prime are discarded by construction. This is an attractive approach for Boussinesq ocean models since the density is assumed constant in all equations. When the ocean model is non Boussinesq, this leads to difficulties. For example, consider the first term in equation [](#h-momentum), if a Reynolds' decomposition and averaging is performed, - -$$ -\frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, {\bf u} \, dz \, dA = \frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} (\overline{\rho {\bf u}} + \, \overline{\rho^\prime {\bf u}^\prime}) \, dz \, dA -$$ - -In this equation, the products of prime and average drop out by construction. The $\overline{\rho^\prime {\mathbf u}^\prime}$ term is an unnecessary complication and difficult to parameterize. To circumvent this complication, Omega will adopt Favre averaging [(Pope 2000)](https://elmoukrie.com/wp-content/uploads/2022/04/pope-s.b.-turbulent-flows-cambridge-university-press-2000.pdf), which for the generic variable $\phi$ is - -$$ -\phi = \hat{\phi} + \phi^" -$$ - -Where $\hat{\phi} \equiv \frac{\overline{\rho \phi}}{\overline{\rho}}$, and the double prime indicates deviations from this density weighted mean. In the definition, the overbar is an averaging operator with identical properties to a Reynolds' average. Using this relation, we can relate Reynolds' average to Favre average by considering the average of $\rho \phi$. The standard Reynolds' approach gives - -$$ -\overline{\rho \phi} = \overline{\rho}\overline{\phi} + \overline{\rho^\prime \phi^\prime} -$$ - -Isolating $\overline{\phi}$, - -$$ -\overline{\phi} = \frac{\overline{\rho \phi}}{\overline{\rho}} + \frac{\overline{\rho^\prime \phi^\prime}}{\overline{\rho}} -$$ - -The first term on the right side of the equation is the definition of a Favre average, which yields - -$$ -\overline{\phi} = \hat{\phi} + \frac{\overline{\rho^\prime \phi^\prime}}{\overline{\rho}} -$$ - -Throughout much of the ocean, we expect the second term to be $O(10^{-3})$ smaller than the first, but could be large in highly turbulent regions. With this adoption, all prognostic and diagnostic variables in Omega are interpreted as Favre averages. -This choice ensures that the governing equations are closed in terms of density-weighted means, avoiding the need to model second-order density fluctuations like $\overline{\rho' \phi'}$ that would otherwise arise in a Reynolds framework. - -## 5. Layered Equations +## 4. Vertical Coordinate ### Pseudo-Height In our non-Boussinesq hydrostatic framework, we adopt a vertical coordinate based on pseudo-height, $$ -\tilde{z}(\hat{p}) = -\frac{1}{\rho_0 g} \, \hat{p} +\tilde{z}(p) = -\frac{1}{\rho_0 g} \, p $$ (def-pseudo-height) The pseudo-height is simply the pressure normalized by two constants, a reference density $\rho_0$ and gravitational acceleration $g$. @@ -355,12 +313,10 @@ A pseudo-height coordinate is effectively a pressure coordinate, but comes with It is convenient to relate these variables using differentials as $$ -d\tilde{z} = -\frac{1}{\rho_0 g}\, d\hat{p} = \frac{\hat{\rho}}{\rho_0} \, dz +d\tilde{z} = -\frac{1}{\rho_0 g}\, dp = \frac{\rho}{\rho_0} \, dz $$ (def-dtildez) -where the second equality uses the hydrostatic balance $d\hat{p} = -\hat{\rho} g dz$. We note that hydrostatic balance applies equivalently to Favre averaged variables. - -This shows that the pseudo-height is nearly the same as the physical height. +where the second equality uses the hydrostatic balance $dp = -\rho g dz$. This shows that the pseudo-height is nearly the same as the physical height. In order to convert from $z$ to ${\tilde z}$ the pressure must be computed, @@ -404,22 +360,22 @@ $$ (grad-z-top) To derive this relationship, we begin with [](#def-pseudo-height), the definition of pseudo-height, under hydrostatic balance: $$ -\tilde{z}(z) = -\frac{\hat{p}(z)}{\rho_0 g}, \quad \text{with} \quad \frac{d\hat{p}}{dz} = -\rho g. +\tilde{z}(z) = -\frac{p(z)}{\rho_0 g}, \quad \text{with} \quad \frac{dp}{dz} = -\rho g. $$ Taking a horizontal gradient of the pressure at the top of a layer, we write: $$ -\hat{p}^{\text{top}} = \hat{p}^{\text{surf}} + \int_{z^{\text{top}}}^{z^{\text{surf}}} \rho(z') g \, dz', +p^{\text{top}} = p^{\text{surf}} + \int_{z^{\text{top}}}^{z^{\text{surf}}} \rho(z') g \, dz', $$ and therefore: $$ -\nabla \hat{p}^{\text{top}} = \nabla \hat{p}^{\text{surf}} + \rho(z^{\text{top}}) g \nabla z^{\text{top}}. +\nabla p^{\text{top}} = \nabla p^{\text{surf}} + \rho(z^{\text{top}}) g \nabla z^{\text{top}}. $$ Substituting into the gradient of pseudo-height: $$ -\nabla \tilde{z}^{\text{top}} = -\frac{1}{\rho_0 g} \nabla \hat{p}^{\text{top}} -= -\frac{1}{\rho_0 g} \left( \nabla \hat{p}^{\text{surf}} + \rho(z^{\text{top}}) g \nabla z^{\text{top}} \right). +\nabla \tilde{z}^{\text{top}} = -\frac{1}{\rho_0 g} \nabla p^{\text{top}} += -\frac{1}{\rho_0 g} \left( \nabla p^{\text{surf}} + \rho(z^{\text{top}}) g \nabla z^{\text{top}} \right). $$ Rearranging: @@ -482,6 +438,105 @@ $$ (h-phi) This relation is frequently used in discretized fluxes and conservation equations to replace integrals with layer-mean quantities. + +## 5. Favre Averaging + +To determine the subgrid scale (SGS) fluxes and stresses in ocean models, it is most common to utilize a Reynolds' decomposition and averaging. In this approach, a generic field $\phi$ is broken into a mean and deviatoric component, i.e. + +$$ +\varphi = \left<\varphi\right> + \varphi^\prime +$$ + +To disambiguate from the definition of the bar as the vertical density weighted average, the Reynolds' average will be denoted by $< . >$, instead of the more common overbar. When deriving the Reynolds' averaged equations, averages of terms with a single prime are discarded by construction. This is an attractive approach for Boussinesq ocean models since the fundamental equations do not include products of spatially variable density and tracer, pressure, or momentum. When the ocean model is non Boussinesq, these products arise and create difficulties. For example, consider the first term in equation [](#h-momentum), if a Reynolds' decomposition and averaging is performed, + +$$ +\frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, {\bf u} \, dz \, dA = \frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} (\left<\rho {\bf u}\right> + \, \left<\rho^\prime {\bf u}^\prime\right>) \, dz \, dA +$$ + +In this equation, the products of prime and average drop out by construction. The $\left<\rho^\prime {\mathbf u}^\prime\right>$ term is an unnecessary complication and difficult to parameterize. To circumvent this complication, Omega will also adopt Favre averaging [(e.g., Greatbatch et al, 2001)](https://journals.ametsoc.org/view/journals/atot/18/11/1520-0426_2001_018_1911_rtbaio_2_0_co_2.xml), which for the generic variable $\phi$ is + +$$ +\varphi = \widehat{\varphi} + \varphi^" +$$ + +Where $\widehat{\varphi} \equiv \frac{\left<\rho \varphi\right>}{\left<\rho\right>}$, and the double prime indicates deviations from this density weighted mean. In the definition, the hat is an averaging operator with identical properties to a Reynolds' average. Using this relation, we can relate Reynolds' average to Favre average by considering a the average of $\rho \varphi$. The standard Reynolds' approach gives + +$$ +\left<\rho \varphi\right> = \left<\rho\right>\left<\varphi\right> + \left<\rho^\prime \varphi^\prime\right> +$$ + +Isolating $\left<\varphi\right>$, + +$$ +\left<\varphi\right> = \frac{\left<\rho \varphi\right>}{\left<\rho\right>} + \frac{\left<\rho^\prime \varphi^\prime\right>}{\left<\rho\right>} +$$ + +The first term on the right side of the equation is the definition of a Favre average, which yields + +$$ +\left<\varphi\right> = \widehat{\varphi} + \frac{\left<\rho^\prime \varphi^\prime\right>}{\left<\rho\right>} +$$ (favre-reynolds-relation) + +Throughout much of the ocean, we expect the second term to be very small as the numerator is most often three orders of magnitude smaller than the denominator, but could be large in highly turbulent regions. With this adoption, all prognostic and diagnostic variables in Omega are interpreted as Favre averages. + +This choice ensures that the governing equations are closed in terms of density-weighted means, avoiding the need to model second-order density correlations like $\left<\rho' \phi'\right>$ that would otherwise arise in a Reynolds framework. + +### Managing Multiple Decompositions + +Within Omega, two distinct decompositions are critical. The first decomposition is the deviation from the density weighted average of a generic variable $\varphi$. We decompose the continuous variable $\phi$ following + +$$ +\varphi \equiv \overline{\varphi}^{\tilde{z}}_k + \delta \varphi +$$ (averaging-decomp-definition) + +where this has been specified for our chosen $\tilde{z}$ framework. In our $\tilde{z}$ coordinate system, it is important to note that the Favre average, while similar in structure, is different from the vertical density weighted average given by [](#def-layer-average). + +The density weighted average is the quantity predicted by Omega, but the deviation from this value is potentially critical for operations like reconstruction of variables at layer interfaces or horizontal boundaries. As will become clear, inclusion of the Reynolds' average will also be important for the derivation. + +The Favre decomposition is defined as above as $\overline{\varphi}^{\tilde{z}}_k \equiv \widehat{\overline{\varphi}^{\tilde{z}}_k} + \varphi^{\prime \prime}$. When performing Favre decomposition and averaging (as with the more traditional Reynolds' approach), the fluctuating quantity is defined relative to a sufficent time or ensemble mean of the model predicted quantity. In this context, sufficient most commonly means a time average over a statistically significant number of eddy turnover times for the quantity being modeled or for the turbulence to equilibrate. + +As discussed below, Omega will predict density weighted average variables, which have been Favre averaged and the turbulent fluxes are deviations from this quantity unless denoted by $< . >$ for Reynolds' averaged turbulent fluxes and stresses. Again we note that the Favre average is very close, but not exactly the same, to the Reynolds' average [](#favre-reynolds-relation). + +### Useful Averaging Relationships + +Most equations that will be Favre averaged will contain terms of the form $\rho \varphi$. This can be written as + +$$ +\left<\rho \phi\right> = \left<\rho\right>\widehat{\varphi}. +$$ (Favre-relation1) + +Here we have utilized the definition of the Favre average of $\varphi$. Equation [](#Favre-relation1) implies that the model predicted variables in Omega should be interpreted as Favre averaged. Given this, turbulent fluxes should also be Favre averaged. As can be seen in equation [](#vh-tracer), we will have flux terms of the form $\rho \varphi {\mathbf u}$. To gain an intuition for how these terms are treated, we first perform a Favre decomposition, but leave the density as full field. + +$$ +\rho \varphi {\mathbf u} &= \rho \left(\widehat{\varphi} + \varphi^{\prime \prime}\right)\left(\widehat{\mathbf u} + {\mathbf u}^{\prime \prime}\right) \\ + &= \rho \left( \widehat{\varphi}\widehat{\mathbf u} + \varphi^{\prime \prime}\widehat{\mathbf u} + \widehat{\varphi}{\mathbf u}^{\prime \prime} + \varphi^{\prime \prime}{\mathbf u}^{\prime \prime} \right) +$$ + +Following in the spirit of [](#Favre-relation1) and using the fact that a Reynolds' average of a product of perturbation and average is zero, we find + +$$ +\left<\rho \varphi {\mathbf u}\right> &= \left<\rho\widehat{\varphi}\widehat{\mathbf u}\right> + \left<\rho\varphi^{\prime \prime}{\mathbf u}^{\prime \prime}\right> \\ + &= \left<\rho\right>\widehat{\varphi}\widehat{\mathbf u} + \left<\rho\right>\widehat{\varphi^{\prime \prime}{\mathbf u}^{\prime \prime}} +$$ (Favre-relation2) + +Where we have also used the fact that $\left<\widehat{\varphi}\widehat{\mathbf u}\right> = \widehat{\varphi}\widehat{\mathbf u}$ by construction of the Reynolds' averaging operator and definition of the Favre average. The second term utilizes [](#Favre-relation1) to arrive at this form. + +The form in [](#Favre-relation2) allows us to use fluxes that appear similar to a traditional Reynolds' average, but again is distinct although close in magnitude (See [](#favre-reynolds-relation)). + +For the decomposition related to vertical averaging, we will encounter terms such as ${\overline \varphi}^{\tilde{z}}_k \delta\varphi$ that need to be vertical averaged. Using [](#def-layer-average) we have + +$$ +\overline{{\overline \varphi}^{\tilde{z}}_k \delta\varphi}^{\tilde{z}}_k &= \frac{\int_{{\tilde z}_{k+1}^{\text{top}}}^{{\tilde z}_k^{\text{top}}} {\overline \varphi}^{\tilde{z}}_k \delta \varphi d{\tilde z}} + {\int_{{\tilde z}_{k+1}^{\text{top}}}^{{\tilde z}_k^{\text{top}}} d{\tilde z}} \\ + &= {\overline \varphi}^{\tilde{z}}_k \frac{\int_{{\tilde z}_{k+1}^{\text{top}}}^{{\tilde z}_k^{\text{top}}} \delta \varphi d{\tilde z}} + {\int_{{\tilde z}_{k+1}^{\text{top}}}^{{\tilde z}_k^{\text{top}}} d{\tilde z}} \\ + &= 0, +$$ (delta-vert-average) + +where the last equality is true by definition. + +## 6. Layer Equations + ### Layered Tracer & Mass Substituting [](#def-pseudo-velocity) and [](#grad-z-top) into the tracer equation [](#vh-tracer) for layer $k$, we have @@ -499,6 +554,47 @@ $$ (Aintegral-tracer) where we converted to pseudo-height for the last two terms using [](#formula-pseudo-height). +We first Reynolds' average this equation and given the definition of the operator we can move the averaging past the derivatives and integrals without correction terms to yield + +$$ +\frac{d}{dt} \int_{A} \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \left<\rho \, \varphi\right> \, dz \, dA ++ +\int_{\partial A} \left( \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \left<\rho \, \varphi \, {\bf u} \right> \, dz \right) \cdot {\bf n}_\perp \, dl & \\ ++ +\int_{A} \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - {\bf u} \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right) \right] \right\}\right>_{z = z^{\text{top}}} \, dA & \\ +- +\int_{A} \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - {\bf u} \cdot \nabla \left( \tilde{z}^{\text{bot}} - \tilde{z}^{\text{surf}} \right) \right] \right\}\right>_{z = z^{\text{bot}}}\, dA +& = 0. +$$ (Aintegral-tracer-reynolds) + +In this equation we have also invoked the definition of vertical transport velocity, $\tilde{w}_{tr} \equiv \tilde{w} - \tilde{w}_r$. + +Next we use the definition of the Favre average on the first two terms + +$$ +\frac{d}{dt} \int_{A} \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \left<\rho\right> \, \widehat{\varphi}\, dz \, dA ++ +\int_{\partial A} \left( \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \left<\rho\right> \, \widehat{\varphi \, {\bf u}} \, dz \right) \cdot {\bf n}_\perp \, dl & \\ ++ +\int_{A} \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - {\bf u} \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right) \right] \right\}\right>_{z = z^{\text{top}}} \, dA & \\ +- +\int_{A} \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - {\bf u} \cdot \nabla \left( \tilde{z}^{\text{bot}} - \tilde{z}^{\text{surf}} \right) \right] \right\}\right>_{z = z^{\text{bot}}}\, dA +& = 0. +$$ (Aintegral-tracer-reynolds2) + +Next, we use a Favre decomposition on any products of terms that are Favre averaged and use the Reynolds' decomposition on products of terms that are Reynolds' averaged. + +$$ +\frac{d}{dt} \int_{A} \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \left<\rho\right> \, \widehat{\varphi}\, dz \, dA ++ +\int_{\partial A} \left( \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \left<\rho\right> \, \left(\widehat{\varphi}\widehat{\bf u} + \widehat{\varphi^{\prime \prime}{\bf u}^{\prime \prime}} \right) \right) \, \cdot {\bf n}_\perp \, dl & \\ ++ +\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right) \right\}_{z = z^{\text{top}}} \, dA & \\ +- +\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right) \right\}_{z = z^{\text{bot}}}\, dA +& = 0. +$$ (Aintegral-tracer-favre-reynolds) + While working in pseudo-height coordinates, vertical transport across a sloping layer interface must still be expressed in terms of the slope of the geometric height, $\nabla z^{\text{top}}$, of that interface. Although it may be tempting to rewrite this slope as $\nabla \tilde{z}^{\text{top}}$, the two are not exactly equivalent due to the nonlinear transformation between pressure and height. Differentiating the pseudo-height definition under hydrostatic balance yields: $$ @@ -507,7 +603,7 @@ $$ This shows that the geometric slope differs from the pseudo-height slope by a correction term involving the horizontal gradient of surface pressure. Under typical oceanographic conditions—where density is close to the reference $\rho_0$ and surface pressure gradients are modest—this correction may be small. However, we retain $\nabla z^{\text{top}}$ explicitly in the vertical transport terms to avoid introducing assumptions that may not hold in all regimes. -Substituting [](#h-phi) into the first two terms in [](#Aintegral-tracer) and dividing by $\rho_0$, +Given that the hydrostatic relation doesn't change form if Reynolds' averaged and reinterpreting the density weighted vertical average ([](#h-phi)) to utilize Reynolds' averaged density, and dividing by $\rho_0$ the first two terms in [](#Aintegral-tracer) can be rewritten as, $$ \frac{d}{dt} \int_A \tilde{h}_k \, \overline{\varphi}^{\tilde{z}}_k \, dA @@ -520,65 +616,81 @@ $$ & = 0 $$ (Aintegral-tracer2) -The horizontal tracer flux term is expanded using $\varphi \equiv \overline{\varphi}^{\tilde{z}}_k + \delta \varphi$ and ${\bf u} \equiv \overline{\bf u}^{\tilde{z}}_k + \delta {\bf u}$ to yield +Next we utilize the definition of the transport vertical velocity $\tilde{w}_{tr} \equiv \tilde{w} - \tilde{w}_r$ and perform the averaging expansion [](#averaging-decomp-definition) on the second term, $$ \frac{d}{dt} \int_{A} {\tilde h}_k {\overline \varphi}^{\tilde{z}}_k \, dA + - \int_{\partial A}\left( {\tilde h}_k \, \left(\left(\overline{\varphi}^{\tilde{z}}_k + \delta \varphi\right)\left(\overline{\bf u}^{\tilde{z}}_k + \delta {\bf u}\right)\right) \, \right) \cdot {\bf n} \, dl - + \int_{A}\left[ \varphi \left({\tilde w} - {\tilde w}_r \right) \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} \, dA - - \int_{A}\left[ \varphi \left({\tilde w} - {\tilde w}_r \right) \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} \, dA + \int_{\partial A}\left\{ {\tilde h}_k \, \left[\overline{\left(\overline{\varphi}^{\tilde{z}}_k + \delta \varphi\right)\left(\overline{\bf u}^{\tilde{z}}_k + \delta {\bf u}\right)}^{\tilde{z}}_k \right] \, \right\} \cdot {\bf n} \, dl & \\ + + \int_{A}\left[ \varphi {\tilde w}_{tr} - {\bf u} \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right)\right]_{{\tilde z}={\tilde z}_k^{\text{top}}} \, dA & \\ + - \int_{A}\left[ \varphi {\tilde w}_{tr} - {\bf u} \cdot \nabla \left( \tilde{z}^{\text{bot}} - \tilde{z}^{\text{surf}} \right)\right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} \, dA = 0. $$ +The second term is simplified using [](#delta-vert-average) + $$ -\frac{1}{\rho} \frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \overline{\rho} \, \hat{\varphi} \, dz \, dA +\frac{d}{dt} \int_{A} {\tilde h}_k {\overline \varphi}^{\tilde{z}}_k \, dA + - \frac{1}{\rho} \int_{\partial A}\left( \int_{z^{\text{bot}}}^{z^{\text{top}}} \overline{\rho}\, (\hat{\varphi}\hat{\bf u} + \overline{\varphi^{\prime \prime} {\bf u}^{\prime \prime}}) \, dz \right) \cdot {\bf n} \, dl - + \int_{A}\left[ \hat{\varphi} \hat{\tilde w}_{tr} + \overline{\varphi^{\prime \prime} {\tilde w}_{tr}^{\prime \prime}} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} \, dA - - \int_{A}\left[ \hat{\varphi} \hat{\tilde w}_{tr} + \overline{\varphi^{\prime \prime} {\tilde w}_{tr}^{\prime \prime}} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} \, dA -= 0 -$$ (Aintegral-tracer2) + \int_{\partial A}\left\{ {\tilde h}_k \, \left[\left(\overline{\varphi}^{\tilde{z}}_k \overline{\bf u}^{\tilde{z}}_k + \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right)\right] \, \right\} \cdot {\bf n} \, dl & \\ + + \int_{A}\left[ \varphi {\tilde w}_{tr} - {\bf u} \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right)\right]_{{\tilde z}={\tilde z}_k^{\text{top}}} \, dA & \\ + - \int_{A}\left[ \varphi {\tilde w}_{tr} - {\bf u} \cdot \nabla \left( \tilde{z}^{\text{bot}} - \tilde{z}^{\text{surf}} \right)\right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} \, dA += 0. +$$ -Applying [](#formula-pseudo-height) to the first two terms and taking the limit as $A \rightarrow 0$ and using Gauss's theorem for the horizontal advection, +Next, a Favre decomposition is used for the layer averaged variables and a Reynolds' decomposition is used for the full variable reconstructions at the top and bottom of the model layers. $$ -\frac{d{\tilde h}_k {\overline \varphi}^{\tilde{z}}_k }{dt} +\frac{d}{dt} \int_{A} {\tilde h}_k {\overline \varphi}^{\tilde{z}}_k \, dA + - \nabla \cdot \left({\tilde h}_k \overline{\varphi {\bf u}}^{\tilde{z}}_k \right) - + \left[ \varphi {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} - - \left[ \varphi {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} -= -\left(\nabla \cdot \left({\tilde h}_k \overline{\varphi {\bf u}}^{\tilde{z}}_k \right) + \left[\overline{\varphi^{\prime \prime} {\tilde w}_{tr}^{\prime \prime}}\right]_{{\tilde z}={\tilde z}_k^{\text{top}}} - \left[\overline{\varphi^{\prime \prime} {\tilde w}_{tr}^{\prime \prime}} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}}\right). -$$ (layer-tracer-pre) + \int_{\partial A}\left\{ {\tilde h}_k \, \left[\left(\widehat{\overline{\varphi}^{\tilde{z}}_k} + \varphi^{\prime \prime}\right) \left(\widehat{\overline{\bf u}^{\tilde{z}}_k} + {\bf u}^{\prime \prime}\right) + \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right] \, \right\} \cdot {\bf n} \, dl & \\ + + \int_{A}\left[ \left(\left<\varphi\right> + \varphi^\prime \right) \left\{\left(\left<{\tilde w}_{tr}\right> + {\tilde w}_{tr}^{\prime} \right) - \left(\left<{\bf u}\right> + {\bf u}^{\prime} \right) \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right)\right\}\right]_{{\tilde z}={\tilde z}_k^{\text{top}}} \, dA & \\ + - \int_{A}\left[ \left(\left<\varphi\right> + \varphi^\prime \right) \left\{\left(\left<{\tilde w}_{tr}\right> + {\tilde w}_{tr}^{\prime} \right) - \left(\left<{\bf u}\right> + {\bf u}^{\prime} \right) \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right)\right\}\right]_{{\tilde z}={\tilde z}_k^{\text{bot}}} \, dA & \\ += 0. +$$ (favre-full-expansion) -Here ${\tilde w}_{tr}={\tilde w} - {\tilde w}_r$ is the normalized vertical mass transport through the layer interface. -It is a pseudo-transport velocity in units of m/s. -Equation [](#layer-tracer-pre) is identical to [Ringler et al. 2013](https://www.sciencedirect.com/science/article/pii/S1463500313000760) (A.24), and further explanation can be found in that appendix. +The terms on the first line are next Favre averaged and the terms on the second and third lines are expanded and then Reynolds' averaged to yield -As a final step, we substitute the approximation $\overline{\varphi {\bf u}}^{\tilde{z}}_k \approx \overline{\varphi }^{\tilde{z}}_k \overline{{\bf u}}^{\tilde{z}}_k$. -The mass equation is identical to the tracer equation with $\varphi=1$. Dropping the overlines for simpler notation, the layered version of mass and tracer conservation are +$$ +\frac{d}{dt} \int_{A} {\tilde h}_k {\overline \varphi}^{\tilde{z}}_k \, dA ++ + \int_{\partial A}\left\{ {\tilde h}_k \, \left[\widehat{\overline{\varphi}^{\tilde{z}}_k} \widehat{\overline{\bf u}^{\tilde{z}}_k} + \widehat{\varphi^{\prime \prime}{\bf u}^{\prime \prime}} + \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right] \, \right\} \cdot {\bf n} \, dl & \\ + + \int_{A}\left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> + \left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left(\left<\varphi\right>\left<{\bf u}\right> + \left< \varphi^\prime {\bf u}^{\prime}\right> \right) \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right)\right]_{{\tilde z}={\tilde z}_k^{\text{top}}} \, dA & \\ +- \int_{A}\left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> + \left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left(\left<\varphi\right>\left<{\bf u}\right> + \left< \varphi^\prime {\bf u}^{\prime}\right> \right) \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right)\right]_{{\tilde z}={\tilde z}_k^{\text{bot}}} \, dA & \\ += 0. +$$ (favre-reynolds-tracer-final) -mass: +A few comments on the last two integrals. If only the first two terms of the integrals are retained, this represents the vertical advective and turbulent fluxes for a finite volume framework. The second two terms represent the projection of the horizontal advective and turbulent fluxes into the direction normal to the sloping surface. When the coordinate surfaces are flat $\tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} = 0$ and the vertical fluxes are aligned with the normal to the coordinate surface reducing the equation to the expected z-coordinate, finite volume, formulation. + +Finally, we take the limit as $A \rightarrow 0$ and using Gauss' theorem for the horizontal advection to arrive at the final tracer equation + +tracer: $$ -\frac{d{\tilde h}_k }{dt} +\frac{\partial {\tilde h}_k \widehat{\overline \varphi^{\tilde{z}}_k} }{dt} + - \nabla \cdot \left({\tilde h}_k{\bf u}_k \right) - + \left[ {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} - - \left[ {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} -= 0 -$$ (layer-mass) + \nabla \cdot \left({\tilde h}_k \widehat{\overline{\varphi}^{\tilde{z}}_k} \widehat{\overline{\bf u}^{\tilde{z}}_k}\right) + + \left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> - \left<\varphi\right>\left<{\bf u}\right> \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right) \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} & \\ + - \left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> - \left<\varphi\right>\left<{\bf u}\right> \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right) \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} += & \\ +- \nabla \cdot \left({\tilde h}_k \widehat{{\overline{\varphi}^{\tilde{z}}_k}^{\prime \prime} {\overline{\bf u}^{\tilde{z}}_k}^{\prime \prime}} \, + {\tilde h}_k \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right) & \\ +- \left\{\left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime {\bf u}^{\prime}\right> \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right)\right]_{{\tilde z}={\tilde z}_{k+1}^{\text{top}}} - \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime {\bf u}^{\prime}\right> \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right)\right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}}\right\}. +$$ (layer-tracer) + +A few notes on the layer averaged tracer equation. In this complete form, it includes three types of fluctuating quantities that must be dealt with: (1) the Favre averaged turbulent flux $\left(\widehat{{\overline{\varphi}^{\tilde{z}}_k}^{\prime \prime} {\overline{\bf u}^{\tilde{z}}_k}^{\prime \prime}}\right)$, (2) the Reynolds' average turbulent flux $\left( \left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> \right)$, and (3) the vertical integral of the product of deviations from the layer integrated variables $\left(\overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right)$. The details of the first two quantities will be discussed later in this document and follow on design documents. The terms involving perturbations from the layer integrated quantity are necessary to extend beyond piecewise constant represenation of variables. In this equation, variables with no overline are the full field variable at the interfaces. -tracer: +The mass equation is identical to the tracer equation with $\varphi=1$. + +mass: $$ -\frac{d{\tilde h}_k \varphi_k }{dt} +\frac{\partial {\tilde h}_k }{dt} + - \nabla \cdot \left({\tilde h}_k \varphi_k {\bf u}_k \right) - + \left[ \varphi {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} - - \left[ \varphi {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} + \nabla \cdot \left({\tilde h}_k \widehat{\overline{\bf u}^{\tilde{z}}_k}\right) + + \left[ \left<{\tilde w}_{tr}\right> - \left<{\bf u}\right> \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}}\right) \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} + - \left[ \left<{\tilde w}_{tr}\right> - \left<{\bf u}\right> \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}}\right) \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} = 0 -$$ (layer-tracer) +$$ (layer-mass) ### Layered Momentum @@ -587,7 +699,7 @@ We now derive the horizontal momentum equation in our non-Boussinesq, hydrostati We begin by specifying the forces in the full three-dimensional momentum equation [](#continuous-momentum), $$ -\frac{d}{dt} \int_{V(t)} \rho\, {\bf v} \, dV +\frac{\partial}{\partial t} \int_{V(t)} \rho\, {\bf v} \, dV + \int_{\partial V(t)}\rho\, {\bf v} \left({\bf v} - {\bf v}_r \right) \cdot {\bf n} \, dA = \mathbf{F}_\text{total}[V(t)], $$ (continuous-momentum2) @@ -607,8 +719,7 @@ Each term on the right-hand side corresponds to a physically distinct force acti - The first term is the **Coriolis force**, where $ \mathbf{f} $ is the vector Coriolis parameter (e.g., $ f \hat{\mathbf{z}} $ on the sphere). - The second term represents the **gravitational force**, expressed in terms of the gradient of the gravitational potential $ \Phi(x, y, z, t) $, which may include effects such as tides and self-attraction and loading. - The third term is the **pressure force**, which acts on the boundary surfaces and is naturally expressed as a surface integral. It gives rise to both horizontal pressure gradients and contributions from sloping surfaces. -- The fourth term represents the surface stresses. They include **horizontal stress forces** across the vertical sides of the control volume, such as those due to lateral friction or subgrid momentum transfer. -They also include **vertical stress forces** (e.g., wind stress at the ocean surface and bottom drag at the seafloor), projected into horizontal momentum and acting across the top and bottom surfaces. +- The fourth term represents resolved stresses. Wind stress, drag, and horizontal boundary conditions are turbulent stresses and are not included in this term. For Omega, the fourth term is zero. #### Pressure Term @@ -628,34 +739,6 @@ $$ = - \int_{A} \overline{\nabla_{\perp} p}^{z} \, dA. $$ (gradp-h) -#### Stress Term - -Likewise, the stress tensor integrated over the surface may be converted to a volume integral with Gauss' theorem ([Kundu et al. 2016](https://doi.org/10.1016/C2012-0-00611-4) p. 125 eqn 4.20b), - -$$ -\int_{\partial V(t)} \boldsymbol{\tau} \cdot \mathbf{n} \, dA -= \int_{V(t)} \nabla_{3D} \cdot \boldsymbol{\tau} \, dV -$$ (stress-Gauss) - -for clarity, this can be written in index notation as - -$$ -\int_{\partial V(t)} n_i \tau_{ij} \, dA -= \int_{V(t)} \frac{\partial}{\partial x_i} \left( \tau_{ij} \right) \, dV -$$ (stress-Gauss-index) - -Taking only the horizontal ($j$=1,2), - -$$ - \int_{V(t)} \frac{\partial}{\partial x_i} \left( \tau_{ij} \right) \, dV -= \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} - \frac{\partial}{\partial x_i} \left( \tau_{ij} \right) -\, dz \, dA -= \int_{A} - \overline{ - \frac{\partial}{\partial x_i} \left( \tau_{ij} \right) }^z dA -$$ (gradp-h) - #### Horizontal momentum Putting the pressure and stress term into [](h-momentum), and using Gauss' Theorem on the advection, the horizontal momentum equation is @@ -669,11 +752,8 @@ $$ \\ & \; = - \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, \mathbf{f} \times \mathbf{u} \, dz \, dA - \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, \nabla_\perp \Phi \, dz \, dA - - \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} - \nabla_{\perp} p \, dz \, dA -+ \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} - \frac{\partial}{\partial x_i} \left( \tau_{ij} \right) -\, dz \, dA. + - \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} + \nabla_{\perp} p \, dz \, dA. $$ (h-momentum-p-tau) Dividing by $\rho_0$ and taking vertical averages using [](#def-thickness) and [](#def-pseudo-thickness), @@ -688,7 +768,6 @@ $$ - \int_{A} \tilde{h} \,\overline{ \mathbf{f} \times \mathbf{u} }^{\tilde z} \, dA - \int_{A} \tilde{h} \,\overline{ \nabla_\perp \Phi }^{\tilde z} \, dA - \int_{A} \frac{1}{\rho_0} \overline{\nabla_{\perp} p}^{z} \, dA -+ \int_{A} \frac{1}{\rho_0} \overline{ \frac{\partial}{\partial x_i} \left( \tau_{ij} \right) }^z dA $$ (h-momentum-p-tau) Taking the limit as $A \rightarrow 0$, we arrive at the local, horizontally continuous form: @@ -700,10 +779,9 @@ $$ + \left[ {\bf u}\, \tilde{w}_{tr} \right]_{z=z^{\text{top}}} - \left[ {\bf u}\, \tilde{w}_{tr} \right]_{z=z^{\text{bot}}} \\ & = -- \tilde{h} \,\overline{ \mathbf{f} \times \mathbf{u} }^{\tilde z} -- \tilde{h} \,\overline{ \nabla_\perp \Phi }^{\tilde z} -- \frac{1}{\rho_0} \overline{\nabla_{\perp} p}^{z} -+ \frac{1}{\rho_0} \overline{ \frac{\partial}{\partial x_i} \left( \tau_{ij} \right) }^z +- \tilde{h} \,\overline{ \mathbf{f} \times \mathbf{u} }^{\tilde z} +- \tilde{h} \,\overline{ \nabla_\perp \Phi }^{\tilde z} +- \frac{1}{\rho_0} \overline{\nabla_{\perp} p}^{z} $$ (momentum-layered-differential-1) The first two terms are the material derivative, confined within the horizontal layer. Using the product rule, and layered mass conservation [](#layer-mass), @@ -738,10 +816,9 @@ $$ \left[ {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} - \left[ {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}}\right) \\ & = -- \overline{ \mathbf{f} \times \mathbf{u} }^{\tilde z} -- \overline{ \nabla_\perp \Phi }^{\tilde z} -- \frac{1}{\rho_0 \, \tilde{h}} \overline{\nabla_{\perp} p}^{z} -+ \frac{1}{\rho_0 \, \tilde{h}} \overline{ \frac{\partial}{\partial x_i} \left( \tau_{ij} \right) }^z +- \overline{ \mathbf{f} \times \mathbf{u} }^{\tilde z} +- \overline{ \nabla_\perp \Phi }^{\tilde z} +- \frac{1}{\rho_0 \, \tilde{h}} \overline{\nabla_{\perp} p}^{z} $$ (momentum-layered-differential-2) Note that the coefficient of the pressure gradient and stress tensor can be rewritten as @@ -767,10 +844,9 @@ $$ \frac{1}{\tilde h}\left( \left[ {\bf u}\right]_{z=z^{\text{bot}}}-\overline{ {\bf u} }^{\tilde z}\right) \, \left[\tilde{w}_{tr} \right]_{z=z^{\text{bot}}} \\ & = -- \overline{ \mathbf{f} \times \mathbf{u} }^{\tilde z} -- \overline{ \nabla_\perp \Phi }^{\tilde z} -- \overline{\alpha}^z \overline{\nabla_{\perp} p}^{z} -+ \overline{\alpha}^z \overline{ \frac{\partial}{\partial x_i} \left( \tau_{ij} \right) }^z +- \overline{ \mathbf{f} \times \mathbf{u} }^{\tilde z} +- \overline{ \nabla_\perp \Phi }^{\tilde z} +- \overline{\alpha}^z \overline{\nabla_{\perp} p}^{z} $$ (momentum-layered-differential-3) In addition, the horizontal advection may be rewritten as @@ -812,10 +888,9 @@ $$ \frac{1}{\tilde h}\left( \left[ {\bf u}\right]_{z=z^{\text{bot}}}-\overline{ {\bf u} }^{\tilde z}\right) \, \left[\tilde{w}_{tr} \right]_{z=z^{\text{bot}}} \\ & = -- \nabla_\perp K -- \overline{ \nabla_\perp \Phi }^{\tilde z} -- \overline{\alpha}^z \overline{\nabla_{\perp} p}^{z} -+ \overline{\alpha}^z \overline{ \frac{\partial}{\partial x_i} \left( \tau_{ij} \right) }^z +- \nabla_\perp K +- \overline{ \nabla_\perp \Phi }^{\tilde z} +- \overline{\alpha}^z \overline{\nabla_{\perp} p}^{z} $$ (momentum-layered-differential-4) Notes from Mark: @@ -1337,7 +1412,7 @@ $$ = - \nabla_{3D} p - \rho \nabla_{3D} \Phi + \rho {\bf D}^u_{3D} + \rho {\bf F}^u_{3D} -$$ (continuous-momentum) +$$ mass: @@ -1346,7 +1421,7 @@ $$ \frac{\partial \rho }{\partial t} + \nabla_{3D} \cdot \left( \rho {\bf u}_{3D} \right) = 0 -$$ (continuous-mass) +$$ tracers: @@ -1355,7 +1430,7 @@ $$ \frac{\partial \rho \varphi}{\partial t} + \nabla_{3D} \cdot \left( \rho \varphi {\bf u}_{3D} \right) = D^\varphi + Q^\varphi -$$ (continuous-tracer) +$$ Here we have express the following terms as a general operators, with examples of specific forms provided below: the dissipation ${\bf D}^u$, momentum forcing ${\bf F}^u$, tracer diffusion $D^\varphi$, and tracer sources and sinks $Q^\varphi$. The graviational potential, $\Phi$, is written in a general form, and may include Earth's gravity, tidal forces, and self attraction and loading. From 6d6240a21cfdef0e898508ac4fc5e3253839ec67 Mon Sep 17 00:00:00 2001 From: vanroekel Date: Sun, 29 Jun 2025 20:13:51 -0700 Subject: [PATCH 38/65] adds more detail on favre vs. reynolds --- .../omega/doc/design/OmegaV1GoverningEqns.md | 85 +++++++++++++++---- 1 file changed, 68 insertions(+), 17 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 92026889ed17..0e48aa234e8a 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -438,28 +438,61 @@ $$ (h-phi) This relation is frequently used in discretized fluxes and conservation equations to replace integrals with layer-mean quantities. +**NOTE:** The quantity being averaged in [](#def-layer-average) is arbitrary. For example, this equation would apply equally to a Favre or Reynolds' averaged quantity. We also choose to alter the density-weighted vertical average to use the Reynolds' averaged density, i.e., -## 5. Favre Averaging +$$ +{\overline \phi}^{\tilde{z}}_k(x,y,t) = +\frac{\int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \left<\rho\right> \phi dz} + {\int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \left<\rho\right> dz}. +$$ (def-layer-average-reynolds) + +Given that density fluctuations are small relative to the mean density, we expect the Reynolds' averaged density to be very close to the full density. Finally, we note that utilizing a Reynolds' average does not alter the hydrostatic approximation or the pseudo-height discussion. -To determine the subgrid scale (SGS) fluxes and stresses in ocean models, it is most common to utilize a Reynolds' decomposition and averaging. In this approach, a generic field $\phi$ is broken into a mean and deviatoric component, i.e. +## 5. Turbulent fluxes + +For implementation in Omega, the fundamental equations are most often Reynolds' averaged and each variable is decomposed into an average and a fluctuating component, i.e., $$ \varphi = \left<\varphi\right> + \varphi^\prime -$$ +$$ (reynolds-definition) -To disambiguate from the definition of the bar as the vertical density weighted average, the Reynolds' average will be denoted by $< . >$, instead of the more common overbar. When deriving the Reynolds' averaged equations, averages of terms with a single prime are discarded by construction. This is an attractive approach for Boussinesq ocean models since the fundamental equations do not include products of spatially variable density and tracer, pressure, or momentum. When the ocean model is non Boussinesq, these products arise and create difficulties. For example, consider the first term in equation [](#h-momentum), if a Reynolds' decomposition and averaging is performed, +The averaging operator is defined such that it can be passed through derivatives and integrals without corrections and an average of products with a single perturbation quantity is zero. + +The Reynolds' average is most commonly denoted by an overbar, to disambiguate from the definition of the bar as the vertical density weighted average, the Reynolds' average herein is denoted by $< . >$. + +The Reynolds' approach is an attractive approach for Boussinesq ocean models since the fundamental equations do not include products of spatially variable density and tracer, pressure, or momentum. When the ocean model is non Boussinesq, products of spatially varying density and other fields (e.g., tracer) arise and create difficulties. For example, consider the first term in equation [](#h-momentum), if a Reynolds' decomposition and averaging is performed, $$ \frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, {\bf u} \, dz \, dA = \frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} (\left<\rho {\bf u}\right> + \, \left<\rho^\prime {\bf u}^\prime\right>) \, dz \, dA +$$ (reynolds-example) + +In this equation, the products of prime and average drop out by construction. The $\left<\rho^\prime {\mathbf u}^\prime\right>$ term is an unnecessary complication and difficult to parameterize. + +## 6. Favre Averaging + +Favre averaging is common in compressible turbulence literature and has been leveraged for other non Boussinesq ocean modeling efforts [(e.g., Greatbatch et al, 2001)](https://journals.ametsoc.org/view/journals/atot/18/11/1520-0426_2001_018_1911_rtbaio_2_0_co_2.xml). As will be shown, a Favre decomposition and averaging will circumvent the complication, discussed in the previous section, that arises when using a Reynolds' approach in a non Boussinesq model. + +The Favre average and decomposition follows closely with the Reynolds' approach. For a generic variable $\varphi$, the Favre decomposition is given by + +$$ +\varphi = \widehat{\varphi} + \varphi^{\prime \prime} $$ -In this equation, the products of prime and average drop out by construction. The $\left<\rho^\prime {\mathbf u}^\prime\right>$ term is an unnecessary complication and difficult to parameterize. To circumvent this complication, Omega will also adopt Favre averaging [(e.g., Greatbatch et al, 2001)](https://journals.ametsoc.org/view/journals/atot/18/11/1520-0426_2001_018_1911_rtbaio_2_0_co_2.xml), which for the generic variable $\phi$ is +where the Favre average $\widehat{\varphi}$ is defined as $$ -\varphi = \widehat{\varphi} + \varphi^" +\widehat{\varphi} = \frac{\left<\rho \varphi\right>}{\left<\rho \right>}. +$$ (favre-defn) + +The Favre average has many properties in common with with the Reynolds' average, but we note the averages are not interchangable, i.e. $\widehat{\varphi^\prime} \neq 0$. The term in [](#reynolds-example) can now be simplified with [](#favre-defn), i.e. + $$ +\left<\rho {\bf u}\right> = \left<\rho\right>\widehat{\bf u}. +$$ + +The Favre approach removes the second term that emerges from the traditional Reynolds' approach. Therefore, we adopt Favre averaged variables as the model predicted variables in Omega. -Where $\widehat{\varphi} \equiv \frac{\left<\rho \varphi\right>}{\left<\rho\right>}$, and the double prime indicates deviations from this density weighted mean. In the definition, the hat is an averaging operator with identical properties to a Reynolds' average. Using this relation, we can relate Reynolds' average to Favre average by considering a the average of $\rho \varphi$. The standard Reynolds' approach gives +To help gain an intuition for Favre averaged variables and fluxes, we can relate the Reynolds' average to Favre average by considering the average of $\rho \varphi$. The standard Reynolds' approach gives $$ \left<\rho \varphi\right> = \left<\rho\right>\left<\varphi\right> + \left<\rho^\prime \varphi^\prime\right> @@ -471,31 +504,27 @@ $$ \left<\varphi\right> = \frac{\left<\rho \varphi\right>}{\left<\rho\right>} + \frac{\left<\rho^\prime \varphi^\prime\right>}{\left<\rho\right>} $$ -The first term on the right side of the equation is the definition of a Favre average, which yields +The first term on the right side of the equation is the definition of a Favre average ([](#favre-defn)), which yields $$ \left<\varphi\right> = \widehat{\varphi} + \frac{\left<\rho^\prime \varphi^\prime\right>}{\left<\rho\right>} $$ (favre-reynolds-relation) -Throughout much of the ocean, we expect the second term to be very small as the numerator is most often three orders of magnitude smaller than the denominator, but could be large in highly turbulent regions. With this adoption, all prognostic and diagnostic variables in Omega are interpreted as Favre averages. - -This choice ensures that the governing equations are closed in terms of density-weighted means, avoiding the need to model second-order density correlations like $\left<\rho' \phi'\right>$ that would otherwise arise in a Reynolds framework. +Throughout much of the ocean, we expect the second term to be very small as the numerator is most often three orders of magnitude smaller than the denominator, but could be large in highly turbulent regions. ### Managing Multiple Decompositions -Within Omega, two distinct decompositions are critical. The first decomposition is the deviation from the density weighted average of a generic variable $\varphi$. We decompose the continuous variable $\phi$ following +Within Omega, three distinct decompositions are critical. In the derivation to follow, any term involving a product of spatially varying density and some other quanitity (e.g., $\rho \varphi$) will use a Favre average, terms without the density factor will use the Reynolds' decomposition. The final decomposition is the deviation from the density weighted vertical integral of a generic variable $\varphi$. We decompose the continuous variable $\phi$ following $$ \varphi \equiv \overline{\varphi}^{\tilde{z}}_k + \delta \varphi $$ (averaging-decomp-definition) -where this has been specified for our chosen $\tilde{z}$ framework. In our $\tilde{z}$ coordinate system, it is important to note that the Favre average, while similar in structure, is different from the vertical density weighted average given by [](#def-layer-average). - -The density weighted average is the quantity predicted by Omega, but the deviation from this value is potentially critical for operations like reconstruction of variables at layer interfaces or horizontal boundaries. As will become clear, inclusion of the Reynolds' average will also be important for the derivation. +The density weighted vertical average ([](#def-layer-average)) is the quantity predicted by Omega, but the deviation from this value is potentially critical for operations like reconstruction of variables at layer interfaces or horizontal boundaries. As will become clear, inclusion of the Reynolds' average will also be important for the derivation. -The Favre decomposition is defined as above as $\overline{\varphi}^{\tilde{z}}_k \equiv \widehat{\overline{\varphi}^{\tilde{z}}_k} + \varphi^{\prime \prime}$. When performing Favre decomposition and averaging (as with the more traditional Reynolds' approach), the fluctuating quantity is defined relative to a sufficent time or ensemble mean of the model predicted quantity. In this context, sufficient most commonly means a time average over a statistically significant number of eddy turnover times for the quantity being modeled or for the turbulence to equilibrate. +In our $\tilde{z}$ coordinate system, it is important to note that the Favre average, while apparently similar in structure, is different from the vertical density weighted average given by [](#def-layer-average). The average in the Favre approach is defined relative to a sufficent time or ensemble mean of the model predicted quantity. In this context, sufficient most commonly means a time average over a statistically significant number of eddy turnover times for the quantity being modeled or for the turbulence to equilibrate. -As discussed below, Omega will predict density weighted average variables, which have been Favre averaged and the turbulent fluxes are deviations from this quantity unless denoted by $< . >$ for Reynolds' averaged turbulent fluxes and stresses. Again we note that the Favre average is very close, but not exactly the same, to the Reynolds' average [](#favre-reynolds-relation). +Omega will predict Favre averaged, density weighted vertically integrated variables and the turbulent fluxes are deviations from this quantity unless denoted by $< . >$ for Reynolds' averaged turbulent fluxes and stresses. ### Useful Averaging Relationships @@ -535,6 +564,28 @@ $$ (delta-vert-average) where the last equality is true by definition. +### Summary + +In the derivations to follow, the equations will first be Reynolds' averaged and [](#Favre-relation1) will be used. Thus, three decompositions will be critical in this document. The decompositions are summarized as + +$$ +\varphi = \overline{\varphi}^{\tilde{z}}_k + \delta \varphi +$$ + +which is a density weighted vertical integral and the deviation from this value. The second decomposition is + +$$ +\varphi = \left<\varphi\right> + \varphi^\prime +$$ + +which is the traditional Reynolds' decomposition. This will apply to quantities that don't include the full spatially variable density. The final decomposition is + +$$ +\varphi = \widehat{\varphi} + \varphi^{\prime \prime} +$$ + +which is the Favre decomposition. It is important to recall that the prime and double prime variables are different as they are fluctuations relative to different averages. + ## 6. Layer Equations ### Layered Tracer & Mass From 018cb98dd05863e1ad35f23811311af3a6ff825e Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Tue, 17 Jun 2025 10:38:06 -0500 Subject: [PATCH 39/65] Better handling of layer-interface gradient terms --- components/omega/doc/design/OmegaV1GoverningEqns.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 0e48aa234e8a..f5d7691e6f5e 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -360,22 +360,22 @@ $$ (grad-z-top) To derive this relationship, we begin with [](#def-pseudo-height), the definition of pseudo-height, under hydrostatic balance: $$ -\tilde{z}(z) = -\frac{p(z)}{\rho_0 g}, \quad \text{with} \quad \frac{dp}{dz} = -\rho g. +\tilde{z}(z) = -\frac{\hat{p}(z)}{\rho_0 g}, \quad \text{with} \quad \frac{d\hat{p}}{dz} = -\rho g. $$ Taking a horizontal gradient of the pressure at the top of a layer, we write: $$ -p^{\text{top}} = p^{\text{surf}} + \int_{z^{\text{top}}}^{z^{\text{surf}}} \rho(z') g \, dz', +\hat{p}^{\text{top}} = \hat{p}^{\text{surf}} + \int_{z^{\text{top}}}^{z^{\text{surf}}} \rho(z') g \, dz', $$ and therefore: $$ -\nabla p^{\text{top}} = \nabla p^{\text{surf}} + \rho(z^{\text{top}}) g \nabla z^{\text{top}}. +\nabla \hat{p}^{\text{top}} = \nabla \hat{p}^{\text{surf}} + \rho(z^{\text{top}}) g \nabla z^{\text{top}}. $$ Substituting into the gradient of pseudo-height: $$ -\nabla \tilde{z}^{\text{top}} = -\frac{1}{\rho_0 g} \nabla p^{\text{top}} -= -\frac{1}{\rho_0 g} \left( \nabla p^{\text{surf}} + \rho(z^{\text{top}}) g \nabla z^{\text{top}} \right). +\nabla \tilde{z}^{\text{top}} = -\frac{1}{\rho_0 g} \nabla \hat{p}^{\text{top}} += -\frac{1}{\rho_0 g} \left( \nabla \hat{p}^{\text{surf}} + \rho(z^{\text{top}}) g \nabla z^{\text{top}} \right). $$ Rearranging: From cb3592a8a5fce5b70745ed9883dcf3da4a28cdb3 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Fri, 27 Jun 2025 19:52:31 +0200 Subject: [PATCH 40/65] Expand derivation in the slope term section --- .../omega/doc/design/OmegaV1GoverningEqns.md | 79 ++++++++++++++++--- 1 file changed, 68 insertions(+), 11 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index f5d7691e6f5e..49912d7d63f0 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -358,34 +358,91 @@ $$ \rho(z^{\text{top}}) \nabla z^{\text{top}} = \rho_0 \left( \nabla \tilde{z}^{\text{top}} - \nabla \tilde{z}^{\text{surf}} \right) $$ (grad-z-top) -To derive this relationship, we begin with [](#def-pseudo-height), the definition of pseudo-height, under hydrostatic balance: +To derive this relationship, we begin with [](#def-pseudo-height), the definition of pseudo-height under hydrostatic balance: + $$ \tilde{z}(z) = -\frac{\hat{p}(z)}{\rho_0 g}, \quad \text{with} \quad \frac{d\hat{p}}{dz} = -\rho g. +$$ (pseudo-height-hydrostatic) + +We now consider the pressure at the top of a layer: + +$$ +\hat{p}^{\text{top}}(x,y,t) = \hat{p}(x, y, z^{\text{top}}(x,y,t), t) = \hat{p}^{\text{surf}} + \int_{z^{\text{top}}}^{z^{\text{surf}}} \rho(z') g \, dz'. +$$ (p-hat-top) + +Here, the superscript notation denotes evaluation of the full 3D pressure field $\hat{p}(x, y, z, t)$ at a specific vertical level: +- $\hat{p}^{\text{surf}} \equiv \hat{p}(x, y, z^{\text{surf}}(x,y,t), t)$ is the pressure at the ocean surface, +- $\hat{p}^{\text{top}} \equiv \hat{p}(x, y, z^{\text{top}}(x,y,t), t)$ is the pressure at the top of the layer. + +Because $z^{\text{surf}}$ and $z^{\text{top}}$ both vary in space, taking horizontal gradients of these quantities involves applying the chain rule. + +Taking the horizontal gradient of $\hat{p}^{\text{top}}$: + +$$ +\nabla \hat{p}^{\text{top}} = \nabla \hat{p}^{\text{surf}} + \nabla \left( \int_{z^{\text{top}}}^{z^{\text{surf}}} \rho(z') g \, dz' \right). +$$ (grad-p-hat-top1) + +Using the Leibniz rule: + $$ +\nabla \left( \int_{z^{\text{top}}}^{z^{\text{surf}}} \rho(z') g \, dz' \right) += \rho(z^{\text{surf}}) g \nabla z^{\text{surf}} - \rho(z^{\text{top}}) g \nabla z^{\text{top}}. +$$ (grad-hydrostatic-integral) + +Meanwhile, applying the chain rule to $\hat{p}^{\text{surf}} = \hat{p}(x, y, z^{\text{surf}}(x,y,t), t)$ gives: -Taking a horizontal gradient of the pressure at the top of a layer, we write: $$ -\hat{p}^{\text{top}} = \hat{p}^{\text{surf}} + \int_{z^{\text{top}}}^{z^{\text{surf}}} \rho(z') g \, dz', +\nabla \hat{p}^{\text{surf}} = \left. \nabla \hat{p} \right|_{z} + \left( \frac{\partial \hat{p}}{\partial z} \right) \nabla z^{\text{surf}}. +$$ (grad-p-hat-surf1) + +Under hydrostatic balance, $\partial \hat{p} / \partial z = -\rho g$, so: + $$ -and therefore: +\nabla \hat{p}^{\text{surf}} = \nabla \hat{p} - \rho(z^{\text{surf}}) g \nabla z^{\text{surf}}. +$$ (grad-p-hat-surf2) + +Substituting this back in, we find: + $$ -\nabla \hat{p}^{\text{top}} = \nabla \hat{p}^{\text{surf}} + \rho(z^{\text{top}}) g \nabla z^{\text{top}}. +\nabla \hat{p}^{\text{top}} = +\left( \nabla \hat{p} - \rho(z^{\text{surf}}) g \nabla z^{\text{surf}} \right) ++ \left( \rho(z^{\text{surf}}) g \nabla z^{\text{surf}} - \rho(z^{\text{top}}) g \nabla z^{\text{top}} \right). +$$ (grad-p-hat-top2) + +The $\rho(z^{\text{surf}}) g \nabla z^{\text{surf}}$ terms cancel exactly, leaving: + $$ +\nabla \hat{p}^{\text{top}} = \nabla \hat{p} - \rho(z^{\text{top}}) g \nabla z^{\text{top}}. +$$ (grad-p-hat-top-final) + +We now substitute into the definition of the pseudo-height gradient: -Substituting into the gradient of pseudo-height: $$ \nabla \tilde{z}^{\text{top}} = -\frac{1}{\rho_0 g} \nabla \hat{p}^{\text{top}} -= -\frac{1}{\rho_0 g} \left( \nabla \hat{p}^{\text{surf}} + \rho(z^{\text{top}}) g \nabla z^{\text{top}} \right). += -\frac{1}{\rho_0 g} \left( \nabla \hat{p} - \rho(z^{\text{top}}) g \nabla z^{\text{top}} \right). +$$ (grad-z-tilde-top1) + +Rearranging terms: + $$ +\rho(z^{\text{top}}) \nabla z^{\text{top}} = \rho_0 \left( \nabla \tilde{z}^{\text{top}} + \frac{1}{\rho_0 g} \nabla \hat{p} \right). +$$ (rho-grad-z-top) + +But from the definition $\tilde{z}^{\text{surf}} = -\hat{p}^{\text{surf}} / (\rho_0 g)$, we have: -Rearranging: $$ -\rho(z^{\text{top}}) \nabla z^{\text{top}} = \rho_0 \left( \nabla \tilde{z}^{\text{top}} - \nabla \tilde{z}^{\text{surf}} \right). +\nabla \tilde{z}^{\text{surf}} = -\frac{1}{\rho_0 g} \nabla \hat{p}, +$$ (grad-z-tilde-surf) + +so we finally arrive at: + $$ +\rho(z^{\text{top}}) \nabla z^{\text{top}} = \rho_0 \left( \nabla \tilde{z}^{\text{top}} - \nabla \tilde{z}^{\text{surf}} \right), +$$ (grad-z-tilde-top-final) -This shows that the density-weighted geometric slope differs from the pseudo-height slope by a correction involving the horizontal gradient of surface pressure. +as stated in equation [](#grad-z-top). This confirms that the slope of the interface in geometric coordinates cannot be entirely expressed in terms of pseudo-height coordinates alone. -An analogous expression holds for the slope of the bottom interface, $\nabla z^{\text{bot}}$. Together, these slopes determine the projection of horizontal velocity into vertical fluxes in the Arbitray Lagrangian-Eulerian (ALE) framework and remain essential for correctly evaluating mass and tracer conservation across layers. +An analogous expression holds for the slope of the bottom interface, $\nabla z^{\text{bot}}$. Together, these slopes determine the projection of horizontal velocity into vertical fluxes in the Arbitrary Lagrangian-Eulerian (ALE) framework and remain essential for correctly evaluating mass and tracer conservation across layers. ### Vertical Discretization From e23d6fbfe7bafa98eb27f46d853d3032d4daa00d Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Fri, 27 Jun 2025 13:52:34 -0500 Subject: [PATCH 41/65] Fix Leibnitz --- .../omega/doc/design/OmegaV1GoverningEqns.md | 70 +++++++++++-------- 1 file changed, 42 insertions(+), 28 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 49912d7d63f0..7230ffd33bc7 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -355,38 +355,44 @@ While pseudo-height provides a convenient vertical coordinate for discretization Although it may be tempting to replace terms involving $\nabla z^{\text{top}}$ with $\nabla \tilde{z}^{\text{top}}$, the two quantities are not equivalent. Differentiating the definition of pseudo-height under hydrostatic balance yields a relationship between the geometric slope and pseudo-height slope of the layer interface: $$ -\rho(z^{\text{top}}) \nabla z^{\text{top}} = \rho_0 \left( \nabla \tilde{z}^{\text{top}} - \nabla \tilde{z}^{\text{surf}} \right) +\rho(x, y, z^{\text{top}}, t) \nabla z^{\text{top}} = \rho_0 \left( \nabla \tilde{z}^{\text{top}} - \nabla \tilde{z}^{\text{surf}} \right) +- \int_{z^{\text{top}}}^{z^{\text{surf}}} \nabla \rho(x, y, z', t) \, dz'. $$ (grad-z-top) To derive this relationship, we begin with [](#def-pseudo-height), the definition of pseudo-height under hydrostatic balance: $$ -\tilde{z}(z) = -\frac{\hat{p}(z)}{\rho_0 g}, \quad \text{with} \quad \frac{d\hat{p}}{dz} = -\rho g. +\tilde{z}(x, y, z, t) = -\frac{\hat{p}(x,y,z,t)}{\rho_0 g}, \quad \text{with} \quad \frac{ \partial \hat{p}}{\partial z} = -\rho g. $$ (pseudo-height-hydrostatic) We now consider the pressure at the top of a layer: $$ -\hat{p}^{\text{top}}(x,y,t) = \hat{p}(x, y, z^{\text{top}}(x,y,t), t) = \hat{p}^{\text{surf}} + \int_{z^{\text{top}}}^{z^{\text{surf}}} \rho(z') g \, dz'. +\hat{p}^{\text{top}}(x,y,t) = \hat{p}(x, y, z^{\text{top}}(x,y,t), t) = \hat{p}^{\text{surf}} + \int_{z^{\text{top}}}^{z^{\text{surf}}} \rho(x, y, z', t) g \, dz'. $$ (p-hat-top) Here, the superscript notation denotes evaluation of the full 3D pressure field $\hat{p}(x, y, z, t)$ at a specific vertical level: - $\hat{p}^{\text{surf}} \equiv \hat{p}(x, y, z^{\text{surf}}(x,y,t), t)$ is the pressure at the ocean surface, - $\hat{p}^{\text{top}} \equiv \hat{p}(x, y, z^{\text{top}}(x,y,t), t)$ is the pressure at the top of the layer. -Because $z^{\text{surf}}$ and $z^{\text{top}}$ both vary in space, taking horizontal gradients of these quantities involves applying the chain rule. +Because $z^{\text{surf}}$ and $z^{\text{top}}$ vary in space, their gradients contribute via the chain rule. Taking the horizontal gradient of $\hat{p}^{\text{top}}$: $$ -\nabla \hat{p}^{\text{top}} = \nabla \hat{p}^{\text{surf}} + \nabla \left( \int_{z^{\text{top}}}^{z^{\text{surf}}} \rho(z') g \, dz' \right). +\nabla \hat{p}^{\text{top}} = \nabla \hat{p}^{\text{surf}} + \nabla \left( \int_{z^{\text{top}}}^{z^{\text{surf}}} \rho(x, y, z', t) g \, dz' \right). $$ (grad-p-hat-top1) -Using the Leibniz rule: +Applying the multivariate Leibniz rule: $$ -\nabla \left( \int_{z^{\text{top}}}^{z^{\text{surf}}} \rho(z') g \, dz' \right) -= \rho(z^{\text{surf}}) g \nabla z^{\text{surf}} - \rho(z^{\text{top}}) g \nabla z^{\text{top}}. +\nabla \left( \int_{z^{\text{top}}}^{z^{\text{surf}}} \rho(x, y, z', t) g \, dz' \right) += +\rho(x, y, z^{\text{surf}}, t) g \nabla z^{\text{surf}} +- +\rho(x, y, z^{\text{top}}, t) g \nabla z^{\text{top}} ++ +\int_{z^{\text{top}}}^{z^{\text{surf}}} \nabla \rho(x, y, z', t) g \, dz'. $$ (grad-hydrostatic-integral) Meanwhile, applying the chain rule to $\hat{p}^{\text{surf}} = \hat{p}(x, y, z^{\text{surf}}(x,y,t), t)$ gives: @@ -398,49 +404,57 @@ $$ (grad-p-hat-surf1) Under hydrostatic balance, $\partial \hat{p} / \partial z = -\rho g$, so: $$ -\nabla \hat{p}^{\text{surf}} = \nabla \hat{p} - \rho(z^{\text{surf}}) g \nabla z^{\text{surf}}. +\nabla \hat{p}^{\text{surf}} = \nabla \hat{p} - \rho(x, y, z^{\text{surf}}, t) g \nabla z^{\text{surf}}. $$ (grad-p-hat-surf2) -Substituting this back in, we find: +Substituting this and equation [](#grad-hydrostatic-integral) into [](#grad-p-hat-top1), we obtain: $$ \nabla \hat{p}^{\text{top}} = -\left( \nabla \hat{p} - \rho(z^{\text{surf}}) g \nabla z^{\text{surf}} \right) -+ \left( \rho(z^{\text{surf}}) g \nabla z^{\text{surf}} - \rho(z^{\text{top}}) g \nabla z^{\text{top}} \right). +\nabla \hat{p} +- \rho(x, y, z^{\text{top}}, t) g \nabla z^{\text{top}} ++ \int_{z^{\text{top}}}^{z^{\text{surf}}} \nabla \rho(x, y, z', t) g \, dz'. $$ (grad-p-hat-top2) -The $\rho(z^{\text{surf}}) g \nabla z^{\text{surf}}$ terms cancel exactly, leaving: - -$$ -\nabla \hat{p}^{\text{top}} = \nabla \hat{p} - \rho(z^{\text{top}}) g \nabla z^{\text{top}}. -$$ (grad-p-hat-top-final) - -We now substitute into the definition of the pseudo-height gradient: +Substituting into the pseudo-height gradient: $$ -\nabla \tilde{z}^{\text{top}} = -\frac{1}{\rho_0 g} \nabla \hat{p}^{\text{top}} -= -\frac{1}{\rho_0 g} \left( \nabla \hat{p} - \rho(z^{\text{top}}) g \nabla z^{\text{top}} \right). +\nabla \tilde{z}^{\text{top}} = -\frac{1}{\rho_0 g} \nabla \hat{p}^{\text{top}} = +-\frac{1}{\rho_0 g} \left( \nabla \hat{p} +- \rho(x, y, z^{\text{top}}, t) g \nabla z^{\text{top}} ++ \int_{z^{\text{top}}}^{z^{\text{surf}}} \nabla \rho(x, y, z', t) g \, dz' \right). $$ (grad-z-tilde-top1) -Rearranging terms: +Rearranging: $$ -\rho(z^{\text{top}}) \nabla z^{\text{top}} = \rho_0 \left( \nabla \tilde{z}^{\text{top}} + \frac{1}{\rho_0 g} \nabla \hat{p} \right). +\rho(x, y, z^{\text{top}}, t) \nabla z^{\text{top}} = +\rho_0 \nabla \tilde{z}^{\text{top}} ++ \frac{1}{g} \nabla \hat{p} +- \int_{z^{\text{top}}}^{z^{\text{surf}}} \nabla \rho(x, y, z', t) \, dz'. $$ (rho-grad-z-top) -But from the definition $\tilde{z}^{\text{surf}} = -\hat{p}^{\text{surf}} / (\rho_0 g)$, we have: +Now, from the definition $\tilde{z}^{\text{surf}} = -\hat{p}^{\text{surf}} / (\rho_0 g)$, we have: $$ -\nabla \tilde{z}^{\text{surf}} = -\frac{1}{\rho_0 g} \nabla \hat{p}, +\nabla \tilde{z}^{\text{surf}} = -\frac{1}{\rho_0 g} \nabla \hat{p}^{\text{surf}}. $$ (grad-z-tilde-surf) -so we finally arrive at: +Substituting in $\nabla \hat{p}^{\text{surf}} = \nabla \hat{p} - \rho(x, y, z^{\text{surf}}, t) g \nabla z^{\text{surf}}$ from [](#grad-p-hat-surf2), we get: + +$$ +\nabla \tilde{z}^{\text{surf}} = -\frac{1}{\rho_0 g} \left( \nabla \hat{p} - \rho(x, y, z^{\text{surf}}, t) g \nabla z^{\text{surf}} \right). +$$ + +So finally: $$ -\rho(z^{\text{top}}) \nabla z^{\text{top}} = \rho_0 \left( \nabla \tilde{z}^{\text{top}} - \nabla \tilde{z}^{\text{surf}} \right), +\rho(x, y, z^{\text{top}}, t) \nabla z^{\text{top}} = +\rho_0 \left( \nabla \tilde{z}^{\text{top}} - \nabla \tilde{z}^{\text{surf}} \right) +- \int_{z^{\text{top}}}^{z^{\text{surf}}} \nabla \rho(x, y, z', t) \, dz'. $$ (grad-z-tilde-top-final) -as stated in equation [](#grad-z-top). This confirms that the slope of the interface in geometric coordinates cannot be entirely expressed in terms of pseudo-height coordinates alone. +This is the fully general expression for the geometric slope in terms of pseudo-height, including horizontal density variations. If $\nabla \rho$ is small within the vertical column, the last term may be neglected, recovering the simpler form of equation [](#grad-z-top). An analogous expression holds for the slope of the bottom interface, $\nabla z^{\text{bot}}$. Together, these slopes determine the projection of horizontal velocity into vertical fluxes in the Arbitrary Lagrangian-Eulerian (ALE) framework and remain essential for correctly evaluating mass and tracer conservation across layers. From eea15166011063faf5f1c49a5ae593716ca7d336 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Sun, 29 Jun 2025 02:01:31 -0500 Subject: [PATCH 42/65] Define pseudo-height earlier and use for vert flux --- .../omega/doc/design/OmegaV1GoverningEqns.md | 400 ++++++------------ 1 file changed, 135 insertions(+), 265 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 7230ffd33bc7..76451628a0f1 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -91,372 +91,242 @@ The first is the body force, represented here as ${\bf b}({\bf x}, t)$, which en The second is the surface force ${\bf f}$, which acts on the boundary of the control volume and includes pressure and viscous stresses. These forces appear as surface integrals over the boundary and drive momentum exchange between adjacent fluid parcels or between the fluid and its environment. The derivation of the momentum equation may also be found in [Leishman 2025](https://eaglepubs.erau.edu/introductiontoaerospaceflightvehicles/chapter/conservation-of-momentum-momentum-equation/#chapter-260-section-2), Chapter 21, equation 10. -### Horizontal \& Vertical Separation +## 4. Hydrostatic Approximation -In geophysical flows, the vertical and horizontal directions are treated differently due to rotation and stratification, which leads to different characteristic scales of motion. -To make this distinction explicit, we reformulate the conservation equations in a geometry that separates horizontal and vertical fluxes. -We partition the surface integral into contributions from the fixed side walls $\partial V^{\text{side}}$ and the time-varying upper and lower surfaces, $\partial V^{\text{top}}(t)$ and $\partial V^{\text{bot}}(t)$. -The top and bottom surfaces are not necessarily flat, so we retain their full geometry. - -As an example, we consider the tracer equation and drop the explicit notation for spatial and temporal dependence for clarity. We write the control-volume form as: +In large-scale geophysical flows, vertical accelerations are typically much smaller than the vertical pressure gradient and gravitational forces. As a result, we adopt the **hydrostatic approximation**, which simplifies the vertical momentum equation by assuming a leading-order balance between pressure and gravity: $$ -\frac{d}{dt} \int_{V(t)} \rho \, \varphi \, dV -&+ -\int_{\partial V^{\text{side}}} \rho \varphi \left({\bf v} - {\bf v}_r \right) \cdot {\bf n} \, dA \\ -&+ -\int_{\partial V^{\text{top}}(t)} \rho \varphi \left({\bf v} - {\bf v}_r \right) \cdot {\bf n} \, dA -+ -\int_{\partial V^{\text{bot}}(t)} \rho \varphi \left({\bf v} - {\bf v}_r \right) \cdot {\bf n} \, dA -= 0 -$$ (tr-v-h-split) - -The unit normals on the top and bottom surfaces are given by: - -$$ -{\bf n}^{\text{top}} = \frac{(-\nabla z^{\text{top}}, 1)}{\sqrt{1 + |\nabla z^{\text{top}}|^2}}, \quad -{\bf n}^{\text{bot}} = \frac{(-\nabla z^{\text{bot}}, 1)}{\sqrt{1 + |\nabla z^{\text{bot}}|^2}} -$$ (top-bot-normal) +\frac{\partial p}{\partial z} = -\rho g +$$ (hydrostatic) -In typical Omega configurations, the slope of the top and bottom surfaces will be small, i.e., $|\nabla z^{\text{top}}| \ll 1$ and $|\nabla z^{\text{bot}}| \ll 1$. Under this small-slope approximation, we neglect the square root in the denominator of the unit normal, and write: +This balance allows us to express the pressure at any depth $z$ in terms of an integral over the density field above: $$ -{\bf n}^{\text{top}} \approx (-\nabla z^{\text{top}}, 1), \quad -{\bf n}^{\text{bot}} \approx (-\nabla z^{\text{bot}}, 1) -$$ - -This allows sloping-surface contributions such as $\nabla z^{\text{top}}$ to be retained while avoiding more complex metric factors. The approximation is accurate to leading order in slope and consistent with hydrostatic and layered modeling frameworks. +p(x,y,z,t) = p^{\text{surf}}(x,y,t) + \int_{z}^{z^{\text{surf}}} \rho(x,y,z',t) g \, dz' +$$ (pressure) -Thus, the flux integrals across sloping boundaries retain contributions from both the vertical and horizontal components of ${\bf v} - {\bf v}_r$, and include the slope terms $\nabla z^{\text{top}}$ and $\nabla z^{\text{bot}}$. +Here, $p^{\text{surf}}$ is the pressure at the free surface $z^{\text{surf}}(x, y, t)$, and $\rho(z')$ is the local fluid density. This relation holds pointwise in space and time and provides a foundation for defining vertical coordinates based on pressure. -This formulation keeps the geometry fully general and allows for future manipulation or approximations. Subsequent approximations---such as retaining only the vertical component---can be applied explicitly where appropriate in later sections. - -To facilitate integration over a fixed horizontal domain, we introduce the following notation: - -- $A$ is the horizontal footprint (in the $x$–$y$ plane) of the control volume $V(t)$. -- $dA$ is the horizontal area element. -- $\partial A$ is the boundary of $A$, and $dl$ is the line element along this boundary. -- ${\bf n}_\perp$ is the outward-pointing unit normal vector in the horizontal plane, defined on $\partial A$. It lies in the $x$–$y$ plane and is orthogonal to $dl$. - -We now project the tracer equation [](#tr-v-h-split) onto a horizontal domain $A$ (the footprint of the control volume), over which the top and bottom boundaries vary in height. The side walls remain fixed in time and space. Using this projection, we obtain: +The hydrostatic approximation also simplifies vertical pressure forces in control-volume integrations. For example, in a finite-volume cell bounded above and below by sloping surfaces, the vertical pressure force reduces to: $$ -\frac{d}{dt} \int_{A} \int_{z^{\text{bot}}(x,y,t)}^{z^{\text{top}}(x,y,t)} \rho \, \varphi \, dz \, dA -&+ -\int_{\partial A} \left( \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \varphi \, {\bf u} \, dz \right) \cdot {\bf n}_\perp \, dl \\ -&+ -\int_A \rho \varphi \left[ - (w - w_r) - {\bf u} \cdot \nabla z^{\text{top}} -\right]_{z = z^{\text{top}}} dA \\ -&- -\int_A \rho \varphi \left[ - (w - w_r) - {\bf u} \cdot \nabla z^{\text{bot}} -\right]_{z = z^{\text{bot}}} dA -= 0 -$$ (tr-v-h-separation) +- p|_{z = z^{\text{top}}} + p|_{z = z^{\text{bot}}} +$$ (vert-pressure-balance) +because the area correction from the slope and the projection of the pressure gradient into the vertical direction cancel to leading order. -Here ${\bf v} = ({\bf u},w)$ separates the three-dimensional velocity into horizontal velocity ${\bf u}$ and vertical velocity $w$. -In the final equation, only velocity components aligned with the boundary normals contribute to each integral, so perpendicular components drop out. -Since the side boundary $\partial V^{\text{side}}$ is fixed in space, ${\bf v}_r = 0$ there and drops out of the corresponding term. -The domain $A$ is the fixed horizontal footprint of the control volume in the $x$–$y$ plane, over which the top and bottom surfaces $z^{\text{top}}(x,y,t)$ and $z^{\text{bot}}(x,y,t)$ may vary in space and time. +This hydrostatic balance underlies the definition of **pseudo-height**, introduced next, and ensures consistency between the prognostic vertical coordinate and the model’s vertical force balance. -Using this procedure of separating the horizontal from the vertical, the governing equations are +## 5. Pseudo-Height -mass: +In our non-Boussinesq, hydrostatic ocean model, we adopt **pseudo-height** $\tilde{z}$ as the prognostic vertical coordinate. This choice is motivated directly by the hydrostatic approximation introduced in [](#hydrostatic). +Under this balance, we define the pseudo-height as a normalized pressure: $$ -\frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, dz \, dA -&+ -\int_{\partial A}\left( \int_{z^{\text{bot}}}^{z^{\text{top}}}\rho\, {\bf u} \, dz \right) \cdot {\bf n}_\perp \, dl \\ -&+ -\int_{A} \rho \left[ (w - w_r) - {\bf u} \cdot \nabla z^{\text{top}} \right]_{z=z^{\text{top}}} \, dA -- -\int_{A} \rho \left[ (w - w_r) - {\bf u} \cdot \nabla z^{\text{bot}} \right]_{z=z^{\text{bot}}} \, dA -= 0 -$$ (vh-mass) +\tilde{z}(x, y, z, t) = -\frac{1}{\rho_0 g} \, p(x, y, z, t) +$$ (pseudo-height) -tracers: +Here, $\rho_0$ is a constant reference density and $g$ is gravitational acceleration. Although $\tilde{z}$ is essentially a pressure coordinate, the normalization ensures it has units of length and retains an intuitive geometric interpretation. -$$ -\frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, \varphi \, dz \, dA -&+ -\int_{\partial A}\left( \int_{z^{\text{bot}}}^{z^{\text{top}}}\rho\, \varphi \, {\bf u} \, dz \right) \cdot {\bf n}_\perp \, dl \\ -&+ -\int_{A} \rho \varphi \left[ (w - w_r) - {\bf u} \cdot \nabla z^{\text{top}} \right]_{z=z^{\text{top}}} \, dA -- -\int_{A} \rho \varphi \left[ (w - w_r) - {\bf u} \cdot \nabla z^{\text{bot}} \right]_{z=z^{\text{bot}}} \, dA -= 0 -$$ (vh-tracer) - -momentum: +The inverse relation, giving $\tilde{z}$ in terms of geometric height, follows from the hydrostatic pressure integral: $$ -\frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, {\bf v} \, dz \, dA -&+ -\int_{\partial A} \left( \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, {\bf v} \otimes {\bf u} \, dz \right) \cdot {\bf n}_\perp \, dl \\ -&+ -\int_A \rho \, {\bf v} \left[ (w - w_r) - {\bf u} \cdot \nabla z^{\text{top}} \right]_{z=z^{\text{top}}} \, dA -- -\int_A \rho \, {\bf v} \left[ (w - w_r) - {\bf u} \cdot \nabla z^{\text{bot}} \right]_{z=z^{\text{bot}}} \, dA \\ -&= -\int_A \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, {\bf b} \, dz \, dA -+ -\int_{\partial A} \left( \int_{z^{\text{bot}}}^{z^{\text{top}}} {\bf f} \, dz \right) dl \\ -&\quad -+ \int_A \left[ {\bf f} \right]_{z = z^{\text{top}}} \, dA -- \int_A \left[ {\bf f} \right]_{z = z^{\text{bot}}} \, dA -$$ (vh-momentum) - -The momentum advection term contains ${\bf v} \otimes {\bf u}$, the outer (or tensor) product of the full velocity ${\bf v} = ({\bf u}, w)$ with the horizontal velocity ${\bf u}$. This object is a 3×2 tensor: the three rows correspond to the components of momentum being advected (in $x$, $y$, and $z$), and the two columns correspond to the directions of horizontal transport. This structure naturally arises in the surface integral over $\partial A$, where the tensor is contracted with the horizontal unit normal vector ${\bf n}_\perp$ to yield a vector flux through the vertical sides of the control volume. - -### Hydrostatic Approximation +\tilde{z}(z) = -\frac{1}{\rho_0 g} \left( p^{\text{surf}} + \int_{z}^{z^{\text{surf}}} \rho(z') g \, dz' \right) +$$ (pseudo-heigh-from-z) -The momentum equation [](#vh-momentum) consists of three components for the $(x,y,z)$ directions. Thus we may rewrite it as +This expression shows that pseudo-height varies in space and time like pressure. It also makes clear that $z$ is no longer a prognostic variable but a derived quantity, recoverable via hydrostatic inversion. -horizontal momentum: +Taking a differential, we relate pseudo-height and geometric height: $$ -& \frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, {\bf u} \, dz \, dA -+ -\int_{\partial A} \left( \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, {\bf u} \otimes {\bf u} \, dz \right) \cdot {\bf n}_\perp \, dl \\ -& + -\int_{A} \rho \, {\bf u} \left[ (w - w_r) - {\bf u} \cdot \nabla z^{\text{top}} \right]_{z = z^{\text{top}}} \, dA -- -\int_{A} \rho \, {\bf u} \left[ (w - w_r) - {\bf u} \cdot \nabla z^{\text{bot}} \right]_{z = z^{\text{bot}}} \, dA \\ -& = -\int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, {\bf b}_\perp \, dz \, dA -+ -\int_{\partial A} \left( \int_{z^{\text{bot}}}^{z^{\text{top}}} {\bf f}_\perp \, dz \right) \, dl \\ -& + -\int_{A} \left[ {\bf f}_\perp \right]_{z = z^{\text{top}}} \, dA -- -\int_{A} \left[ {\bf f}_\perp \right]_{z = z^{\text{bot}}} \, dA -$$ (h-momentum) +d\tilde{z} = -\frac{1}{\rho_0 g} \, dp = \frac{\rho}{\rho_0} \, dz +$$ (d-z-tilde) -vertical momentum: +This motivates the definition of **pseudo-velocity** in the vertical direction: $$ -& \frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, w \, dz \, dA -+ -\int_{\partial A} \left( \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, w \, {\bf u} \, dz \right) \cdot {\bf n}_\perp \, dl \\ -& + -\int_{A} \rho \, w \left[ (w - w_r) - {\bf u} \cdot \nabla z^{\text{top}} \right]_{z = z^{\text{top}}} \, dA -- -\int_{A} \rho \, w \left[ (w - w_r) - {\bf u} \cdot \nabla z^{\text{bot}} \right]_{z = z^{\text{bot}}} \, dA \\ -& = -\int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, b_z \, dz \, dA -+ -\int_{\partial A} \left( \int_{z^{\text{bot}}}^{z^{\text{top}}} f_z \, dz \right) \, dl \\ -& + -\int_{A} \left[ f_z \right]_{z = z^{\text{top}}} \, dA -- -\int_{A} \left[ f_z \right]_{z = z^{\text{bot}}} \, dA -$$ (v-momentum) +\tilde{w} \equiv \frac{d\tilde{z}}{dt} = \frac{\rho}{\rho_0} \, w +$$ (w-tilde) -where the potential gradient vector is ${\bf b} = ({\bf b}_\perp, b_z)$ and the surface forces are ${\bf f} = ({\bf f}_\perp, f_z)$. +In this formulation: +- $\tilde{w}$ is the vertical **mass flux per unit reference density**, a key variable in a non-Boussinesq framework. +- Vertical transport of mass, tracers, and momentum will use $\tilde{w}$ rather than volume flux $w$. -The hydrostatic approximation applies to the vertical component of the momentum equation and assumes that the leading-order balance is between the vertical pressure gradient and the gravitational body force. All other terms---such as vertical acceleration, advection, and viscous or turbulent stresses---are assumed to be negligible in comparison. -Applying this assumption to [](#v-momentum), +[Griffies 2018](https://doi.org/10.2307/j.ctv301gzg) p. 37 argues for the use of pseudo-velocities, which he calls the density-weighted velocity, for non-Boussinesq models. +Griffies recommends a value of $\rho_0=1035$ kg/m$^3$, following p. 47 of [Gill (1982)](https://doi.org/10.1016/S0074-6142(08)60028-5), because ocean density varies less than 2% from that value. -$$ -\int_A \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, b_z \, dz \, dA -+ \int_A \left[ f_z \right]_{z = z^{\text{top}}} \, dA -- \int_A \left[ f_z \right]_{z = z^{\text{bot}}} \, dA = 0 -$$ (v-hydrostatic1) +The use of a constant $\rho_0$ in defining pseudo-height does not imply the Boussinesq approximation. In Boussinesq models, $\rho$ is set to $\rho_0$ everywhere except in the buoyancy term (i.e., the vertical pressure gradient or gravitational forcing). Here, by contrast, we retain the full $\rho$ in all terms, and use $\rho_0$ only as a normalization constant—for example, so that $d\tilde{z} \approx dz$ when $\rho \approx \rho_0$. This preserves full mass conservation while making vertical units more intuitive. -Assuming the vertical body force is gravity, $b_z = -g$, and the vertical surface stress is from pressure, $f_z = -p$, the equation becomes: +This approach ensures consistency with mass conservation and simplifies vertical discretization. -$$ -- \int_A \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho g \, dz \, dA -- \int_A \left[ p \right]_{z = z^{\text{top}}} \, dA -+ \int_A \left[ p \right]_{z = z^{\text{bot}}} \, dA = 0 -$$ (v-hydrostatic2) +> **Note:** This definition does not invoke the Boussinesq approximation. The full, time- and space-dependent density $\rho(x, y, z, t)$ is retained in all conservation laws. The use of $\rho_0$ is solely for normalization. -Although the top and bottom surfaces may be sloping, the vertical component of the pressure force simplifies to $\pm p \, dA$ to leading order. This is because the projection of the pressure force onto the vertical direction introduces a factor of $\hat{\bf n} \cdot \hat{\bf z} \approx 1 - \tfrac{1}{2}|\nabla z|^2$, while the sloping surface area element adds a compensating factor of $\sqrt{1 + |\nabla z|^2} \approx 1 + \tfrac{1}{2}|\nabla z|^2$. These cancel to second order, and the net vertical pressure force is simply the pressure value multiplied by the horizontal area element $dA$. Thus, no explicit slope terms appear in the hydrostatic balance. +### 5.1. Justification for Pseudo-Height Definition -Rewriting: +Alternative definitions could add an arbitrary offset, e.g., setting $\tilde{z} = 0$ at mean sea level. However, the adopted form: $$ -\int_A \left( \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho g \, dz -+ \left[ p \right]_{z = z^{\text{top}}} -- \left[ p \right]_{z = z^{\text{bot}}} \right) dA = 0 -$$ (v-hydrostatic) - -Because this equation holds for any horizontal region $A$, the integrand must vanish, yielding the hydrostatic pressure relation: - +\tilde{z} = -\frac{1}{\rho_0 g} \, p $$ - \left[ p \right]_{z=z^{\text{bot}}} - = - \left[ p \right]_{z=z^{\text{top}}} - + \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, g \, dz. -$$ (integral-hydrostatic) -Taking the limit as $dz \rightarrow 0$, we arrive at the typical form of the hydrostatic approximation, +was chosen for its practical advantages: +- It ensures that $\tilde{z}$ varies identically to pressure. +- Units of $\tilde{z}$, $\tilde{h}$, and $\tilde{w}$ are intuitive. +- It aligns layer thickness with pressure thickness: $\tilde{h} = \Delta \tilde{z} \propto \Delta p$ +- $\tilde{z}^{\text{floor}} \propto p^{\text{bot}}$, which aids barotropic pressure gradient calculation. -$$ - \frac{\partial p}{\partial z} = - \rho g -$$ (hydrostatic) +This makes $\tilde{z}$ a natural coordinate for a mass-conserving hydrostatic model. + +## 6. Horizontal and Vertical Flux Separation in Pseudo-Height Coordinates -## 4. Vertical Coordinate +In geophysical flows, the vertical and horizontal directions are treated differently due to rotation and stratification, which lead to distinct characteristic scales of motion. To reflect this, we separate horizontal and vertical fluxes explicitly in the governing equations. -### Pseudo-Height +We partition the control surface of a finite-volume cell into the side walls $\partial V^{\text{side}}$ (which are fixed in space) and the upper and lower pseudo-height surfaces $\partial V^{\text{top}}(t)$ and $\partial V^{\text{bot}}(t)$, which evolve in time. -In our non-Boussinesq hydrostatic framework, we adopt a vertical coordinate based on pseudo-height, +As an example, we consider the tracer equation and drop explicit notation for spatial and temporal dependence for clarity. We write the control-volume form as: $$ -\tilde{z}(p) = -\frac{1}{\rho_0 g} \, p -$$ (def-pseudo-height) +\frac{d}{dt} \int_{V(t)} \rho \, \varphi \, dV +& + \int_{\partial V^{\text{side}}} \rho \varphi ({\bf v} - {\bf v}_r) \cdot {\bf n} \, dA \\ +& + \int_{\partial V^{\text{top}}(t)} \rho \varphi ({\bf v} - {\bf v}_r) \cdot {\bf n} \, dA ++ \int_{\partial V^{\text{bot}}(t)} \rho \varphi ({\bf v} - {\bf v}_r) \cdot {\bf n} \, dA += 0 +$$ (tr-vh-split-pseudo) -The pseudo-height is simply the pressure normalized by two constants, a reference density $\rho_0$ and gravitational acceleration $g$. -A pseudo-height coordinate is effectively a pressure coordinate, but comes with the intuition and units of distance that people are familiar with. -It is convenient to relate these variables using differentials as +We now express the top and bottom surfaces using the pseudo-height variable $\tilde{z}(x,y,t)$ rather than geometric height $z$. The unit normals are therefore: $$ -d\tilde{z} = -\frac{1}{\rho_0 g}\, dp = \frac{\rho}{\rho_0} \, dz -$$ (def-dtildez) +{\bf n}^{\text{top}} \approx (-\nabla \tilde{z}^{\text{top}}, 1), \quad +{\bf n}^{\text{bot}} \approx (-\nabla \tilde{z}^{\text{bot}}, 1) +$$ (top-bot-normal-pseudo) -where the second equality uses the hydrostatic balance $dp = -\rho g dz$. This shows that the pseudo-height is nearly the same as the physical height. +Here we apply a small-slope approximation, assuming $|\nabla \tilde{z}| \ll 1$, and omit normalization factors for clarity. This approximation retains leading-order effects of slope while simplifying the surface geometry. -In order to convert from $z$ to ${\tilde z}$ the pressure must be computed, +To facilitate integration over a fixed horizontal domain, we introduce the following notation: +- $A$ is the horizontal footprint (in the $x$–$y$ plane) of the control volume $V(t)$. +- $dA$ is the horizontal area element. +- $\partial A$ is the boundary of $A$, and $dl$ is the line element along this boundary. +- ${\bf n}_\perp$ is the outward-pointing unit normal vector in the horizontal plane, defined on $\partial A$. It lies in the $x$–$y$ plane and is orthogonal to $dl$. -$$ -\tilde{z}(z) = -\frac{1}{\rho_0 g} \, p(z) = -\frac{1}{\rho_0 g}\left( p^\text{surf} + \int_{z}^{z^\text{surf}} \rho(z') g dz'\right). -$$ (formula-pseudo-height) +We now project the tracer equation [](#tr-v-h-split-pseudo) onto a horizontal domain $A$ (the footprint of the control volume), over which the top and bottom boundaries vary in height. The side walls remain fixed in time and space. -Here, $z'$ is a dummy variable of integration. -The pseudo-velocity in the vertical is +The pseudo-height surfaces $\tilde{z}^{\text{top}}(x,y,t)$ and $\tilde{z}^{\text{bot}}(x,y,t)$ are not fixed in time, so their motion must be accounted for when computing vertical fluxes. We define $\tilde{w}_r$ as the pseudo-height velocity of the interface: $$ -\tilde{w} = \frac{\rho}{\rho_0} \, w. -$$ (def-pseudo-velocity) +\tilde{w}_{r} = \left.\frac{d\tilde{z}}{dt}\right |_{\text interface} +$$ (interface-velocity) -This simply falls out of the definitions above, as +The **net vertical transport** through a moving surface is then $$ -\tilde{w} = \frac{d{\tilde z}}{dt} = \frac{\rho}{\rho_0}\frac{dz}{dt} = \frac{\rho}{\rho_0} \, w. -$$ (def-pseudo-velocity) - -As above, $\tilde{w}$ has identical units and very similar values to $w$. But in a non-Boussinesq model, it is the vertical *mass* transport that is the physically relevant quantity, not the volume transport. To this end, $\rho w$ is the mass transport per unit area in kg/m$^2$/s. The pseudo-velocity *is* the Eulerian mass transport, but with a convenient normalization of $\rho_0$. - -[Griffies 2018](https://doi.org/10.2307/j.ctv301gzg) p. 37 argues for the use of pseudo-velocities, which he calls the density-weighted velocity, for non-Boussinesq models. -Griffies recommends a value of $\rho_0=1035$ kg/m$^3$, following p. 47 of [Gill (1982)](https://doi.org/10.1016/S0074-6142(08)60028-5), because ocean density varies less than 2% from that value. +\tilde{w}_{tr} = \tilde{w} - \tilde{w}_r +$$ (w-tilde-tr) -The use of a constant $\rho_0$ in defining pseudo-height does not imply the Boussinesq approximation. In Boussinesq models, $\rho$ is set to $\rho_0$ everywhere except in the buoyancy term (i.e., the vertical pressure gradient or gravitational forcing). Here, by contrast, we retain the full $\rho$ in all terms, and use $\rho_0$ only as a normalization constant—for example, so that $d\tilde{z} \approx dz$ when $\rho \approx \rho_0$. This preserves full mass conservation while making vertical units more intuitive. +This gives the relative pseudo-mass flux through the interface per unit reference density. Vertical flux terms are written using this difference to ensure conservation in the presence of interface motion. -Here we explain the reasoning for the choice of defining $\tilde{z}$ as directly proportional to pressure in [](#def-pseudo-height). -The differential form of the hydrostatic balance $dp = -\rho g dz$ implies that we could choose an arbitrary offset. One could set the offset such that $\tilde{z}=0$ at $z=0$, so that the equilibrium sea surface height matches. Or one could set $\tilde{z}^{\text{floor}} = z^{\text{floor}}$ at some reference depth. Our definition [](#def-pseudo-height) was made so that $\tilde{z}$ varies in space and time in the same way as pressure, and the additional normalization by $\rho_0 g$ was included so that units and values for $\tilde{z}$, $\tilde{h}$, and $\tilde{w}$ are intuitive and easy to work with. A major advantage of [](#def-pseudo-height) is that $\tilde{z}^{\text{floor}}$ is proportional to the bottom pressure, and can be used directly for the barotropic pressure gradient in time-split methods. +In the flux integrals below, we express all surface-normal transport using $\tilde{w}_{tr}$, i.e., -#### Slope Terms and the Limits of the Pseudo-Height Transformation +$$ +\rho_0 \varphi \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right] += \rho_0 \varphi \left[ \tilde{w} - \tilde{w}_r - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right] +$$ (vertical-flux) -While pseudo-height provides a convenient vertical coordinate for discretization and conservation, it does not eliminate all geometric complexity from the governing equations. In particular, the sloping geometry of layer interfaces must still be described using their geometric height $z(x, y, t)$, not their pseudo-height $\tilde{z}$. This distinction is important when computing vertical mass and tracer fluxes across moving, sloping layers, where the normal transport includes a contribution from the slope of the interface. +so that the vertical flux terms correctly account for both the local motion of the fluid and the motion of the interface itself. -Although it may be tempting to replace terms involving $\nabla z^{\text{top}}$ with $\nabla \tilde{z}^{\text{top}}$, the two quantities are not equivalent. Differentiating the definition of pseudo-height under hydrostatic balance yields a relationship between the geometric slope and pseudo-height slope of the layer interface: +The quantity $\tilde{w}$ from equation [](#w-tilde) is the pseudo-velocity. The second term, ${\bf u} \cdot \nabla \tilde{z}^{\text{top}}$, captures the component of horizontal velocity advecting material across a sloping pseudo-height interface. Together, the expression in brackets represents the **net vertical transport** through a surface of constant $\tilde{z}$. -$$ -\rho(x, y, z^{\text{top}}, t) \nabla z^{\text{top}} = \rho_0 \left( \nabla \tilde{z}^{\text{top}} - \nabla \tilde{z}^{\text{surf}} \right) -- \int_{z^{\text{top}}}^{z^{\text{surf}}} \nabla \rho(x, y, z', t) \, dz'. -$$ (grad-z-top) +Because both terms are scaled by $1/\rho_0$, the full flux is multiplied by $\rho_0$ to recover a physical mass flux. This ensures dimensional consistency and physical equivalence to the traditional form $\rho w - \rho {\bf u} \cdot \nabla z$ expressed in geometric-height coordinates. -To derive this relationship, we begin with [](#def-pseudo-height), the definition of pseudo-height under hydrostatic balance: +Using this projection, we obtain: $$ -\tilde{z}(x, y, z, t) = -\frac{\hat{p}(x,y,z,t)}{\rho_0 g}, \quad \text{with} \quad \frac{ \partial \hat{p}}{\partial z} = -\rho g. -$$ (pseudo-height-hydrostatic) - -We now consider the pressure at the top of a layer: +\frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho \, \varphi \, d\tilde{z} \, dA +& + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho \varphi \, {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ +& + \int_A \rho_0 \varphi \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} dA \\ +& - \int_A \rho_0 \varphi \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} dA += 0 +$$ (tr-vh-separation-pseudo) -$$ -\hat{p}^{\text{top}}(x,y,t) = \hat{p}(x, y, z^{\text{top}}(x,y,t), t) = \hat{p}^{\text{surf}} + \int_{z^{\text{top}}}^{z^{\text{surf}}} \rho(x, y, z', t) g \, dz'. -$$ (p-hat-top) +This equation is structurally identical to its $z$-based counterpart but with all references to geometric height replaced by pseudo-height quantities. -Here, the superscript notation denotes evaluation of the full 3D pressure field $\hat{p}(x, y, z, t)$ at a specific vertical level: -- $\hat{p}^{\text{surf}} \equiv \hat{p}(x, y, z^{\text{surf}}(x,y,t), t)$ is the pressure at the ocean surface, -- $\hat{p}^{\text{top}} \equiv \hat{p}(x, y, z^{\text{top}}(x,y,t), t)$ is the pressure at the top of the layer. +This formulation allows vertical mass and tracer transport to be computed directly in terms of prognostic variables, without reconstructing $\rho$ or $z$ explicitly. -Because $z^{\text{surf}}$ and $z^{\text{top}}$ vary in space, their gradients contribute via the chain rule. +Similar expressions to [](#tr-vh-separation-pseudo) hold for mass and momentum: -Taking the horizontal gradient of $\hat{p}^{\text{top}}$: +**Mass:** $$ -\nabla \hat{p}^{\text{top}} = \nabla \hat{p}^{\text{surf}} + \nabla \left( \int_{z^{\text{top}}}^{z^{\text{surf}}} \rho(x, y, z', t) g \, dz' \right). -$$ (grad-p-hat-top1) +\frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho \, d\tilde{z} \, dA +& + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho \, {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ +& + \int_A \rho_0 \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right] dA \\ +& - \int_A \rho_0 \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right] dA += 0 +$$ (vh-mass-pseudo) -Applying the multivariate Leibniz rule: +**Momentum:** $$ -\nabla \left( \int_{z^{\text{top}}}^{z^{\text{surf}}} \rho(x, y, z', t) g \, dz' \right) -= -\rho(x, y, z^{\text{surf}}, t) g \nabla z^{\text{surf}} +\frac{d}{dt} \int_{A} \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho \, {\bf v} \, d\tilde{z} \, dA +&+ +\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho \, {\bf v} \otimes {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ +&+ +\int_A \rho_0 \, {\bf v} \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA - -\rho(x, y, z^{\text{top}}, t) g \nabla z^{\text{top}} +\int_A \rho_0 \, {\bf v} \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ +&= +\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho \, {\bf b} \, d\tilde{z} \, dA + -\int_{z^{\text{top}}}^{z^{\text{surf}}} \nabla \rho(x, y, z', t) g \, dz'. -$$ (grad-hydrostatic-integral) +\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} {\bf f} \, d\tilde{z} \right) dl \\ +&\quad ++ \int_A \left[ {\bf f} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +- \int_A \left[ {\bf f} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA +$$ (vh-momentum-pseudo) -Meanwhile, applying the chain rule to $\hat{p}^{\text{surf}} = \hat{p}(x, y, z^{\text{surf}}(x,y,t), t)$ gives: +These equations express horizontal and vertical fluxes naturally in terms of pseudo-height, enabling fully consistent discretization in the vertical coordinate used for prognostic evolution. -$$ -\nabla \hat{p}^{\text{surf}} = \left. \nabla \hat{p} \right|_{z} + \left( \frac{\partial \hat{p}}{\partial z} \right) \nabla z^{\text{surf}}. -$$ (grad-p-hat-surf1) +## 7. Favre Averaging -Under hydrostatic balance, $\partial \hat{p} / \partial z = -\rho g$, so: +The most common approach to determine the structure of the small scale stresses in ocean modeling is through Reynolds' averaging. In this approach, a generic field $\phi$ is broken into a mean and deviatoric component, i.e. $$ -\nabla \hat{p}^{\text{surf}} = \nabla \hat{p} - \rho(x, y, z^{\text{surf}}, t) g \nabla z^{\text{surf}}. -$$ (grad-p-hat-surf2) - -Substituting this and equation [](#grad-hydrostatic-integral) into [](#grad-p-hat-top1), we obtain: - +\phi = \overline{\phi} + \phi^\prime $$ -\nabla \hat{p}^{\text{top}} = -\nabla \hat{p} -- \rho(x, y, z^{\text{top}}, t) g \nabla z^{\text{top}} -+ \int_{z^{\text{top}}}^{z^{\text{surf}}} \nabla \rho(x, y, z', t) g \, dz'. -$$ (grad-p-hat-top2) -Substituting into the pseudo-height gradient: +When deriving the Reynolds' averaged equations, averages of terms with a single prime are discarded by construction. This is an attractive approach for Boussinesq ocean models since the density is assumed constant in all equations. When the ocean model is non Boussinesq, this leads to difficulties. For example, consider the first term in equation [](#h-momentum), if a Reynolds' decomposition and averaging is performed, $$ -\nabla \tilde{z}^{\text{top}} = -\frac{1}{\rho_0 g} \nabla \hat{p}^{\text{top}} = --\frac{1}{\rho_0 g} \left( \nabla \hat{p} -- \rho(x, y, z^{\text{top}}, t) g \nabla z^{\text{top}} -+ \int_{z^{\text{top}}}^{z^{\text{surf}}} \nabla \rho(x, y, z', t) g \, dz' \right). -$$ (grad-z-tilde-top1) +\frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, {\bf u} \, dz \, dA = \frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} (\overline{\rho {\bf u}} + \, \overline{\rho^\prime {\bf u}^\prime}) \, dz \, dA +$$ -Rearranging: +In this equation, the products of prime and average drop out by construction. The $\overline{\rho^\prime {\mathbf u}^\prime}$ term is an unnecessary complication and difficult to parameterize. To circumvent this complication, Omega will adopt Favre averaging [(Pope 2000)](https://elmoukrie.com/wp-content/uploads/2022/04/pope-s.b.-turbulent-flows-cambridge-university-press-2000.pdf), which for the generic variable $\phi$ is $$ -\rho(x, y, z^{\text{top}}, t) \nabla z^{\text{top}} = -\rho_0 \nabla \tilde{z}^{\text{top}} -+ \frac{1}{g} \nabla \hat{p} -- \int_{z^{\text{top}}}^{z^{\text{surf}}} \nabla \rho(x, y, z', t) \, dz'. -$$ (rho-grad-z-top) +\phi = \hat{\phi} + \phi^" +$$ -Now, from the definition $\tilde{z}^{\text{surf}} = -\hat{p}^{\text{surf}} / (\rho_0 g)$, we have: +Where $\hat{\phi} \equiv \frac{\overline{\rho \phi}}{\overline{\rho}}$, and the double prime indicates deviations from this density weighted mean. In the definition, the overbar is an averaging operator with identical properties to a Reynolds' average. Using this relation, we can relate Reynolds' average to Favre average by considering the average of $\rho \phi$. The standard Reynolds' approach gives $$ -\nabla \tilde{z}^{\text{surf}} = -\frac{1}{\rho_0 g} \nabla \hat{p}^{\text{surf}}. -$$ (grad-z-tilde-surf) +\overline{\rho \phi} = \overline{\rho}\overline{\phi} + \overline{\rho^\prime \phi^\prime} +$$ -Substituting in $\nabla \hat{p}^{\text{surf}} = \nabla \hat{p} - \rho(x, y, z^{\text{surf}}, t) g \nabla z^{\text{surf}}$ from [](#grad-p-hat-surf2), we get: +Isolating $\overline{\phi}$, $$ -\nabla \tilde{z}^{\text{surf}} = -\frac{1}{\rho_0 g} \left( \nabla \hat{p} - \rho(x, y, z^{\text{surf}}, t) g \nabla z^{\text{surf}} \right). +\overline{\phi} = \frac{\overline{\rho \phi}}{\overline{\rho}} + \frac{\overline{\rho^\prime \phi^\prime}}{\overline{\rho}} $$ -So finally: +The first term on the right side of the equation is the definition of a Favre average, which yields $$ -\rho(x, y, z^{\text{top}}, t) \nabla z^{\text{top}} = -\rho_0 \left( \nabla \tilde{z}^{\text{top}} - \nabla \tilde{z}^{\text{surf}} \right) -- \int_{z^{\text{top}}}^{z^{\text{surf}}} \nabla \rho(x, y, z', t) \, dz'. -$$ (grad-z-tilde-top-final) +\overline{\phi} = \hat{\phi} + \frac{\overline{\rho^\prime \phi^\prime}}{\overline{\rho}} +$$ -This is the fully general expression for the geometric slope in terms of pseudo-height, including horizontal density variations. If $\nabla \rho$ is small within the vertical column, the last term may be neglected, recovering the simpler form of equation [](#grad-z-top). +Throughout much of the ocean, we expect the second term to be $O(10^{-3})$ smaller than the first, but could be large in highly turbulent regions. With this adoption, all prognostic and diagnostic variables in Omega are interpreted as Favre averages. +This choice ensures that the governing equations are closed in terms of density-weighted means, avoiding the need to model second-order density fluctuations like $\overline{\rho' \phi'}$ that would otherwise arise in a Reynolds framework. -An analogous expression holds for the slope of the bottom interface, $\nabla z^{\text{bot}}$. Together, these slopes determine the projection of horizontal velocity into vertical fluxes in the Arbitrary Lagrangian-Eulerian (ALE) framework and remain essential for correctly evaluating mass and tracer conservation across layers. +## 8. Layered Equations ### Vertical Discretization From f166f516e90c5b38c3c2636f5dfb1bb59c0ef941 Mon Sep 17 00:00:00 2001 From: vanroekel Date: Sun, 29 Jun 2025 22:10:25 -0700 Subject: [PATCH 43/65] Finishes tracer rewrite --- .../omega/doc/design/OmegaV1GoverningEqns.md | 171 ++++++------------ 1 file changed, 56 insertions(+), 115 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 76451628a0f1..baaa0d151c56 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -285,50 +285,7 @@ $$ (vh-momentum-pseudo) These equations express horizontal and vertical fluxes naturally in terms of pseudo-height, enabling fully consistent discretization in the vertical coordinate used for prognostic evolution. -## 7. Favre Averaging - -The most common approach to determine the structure of the small scale stresses in ocean modeling is through Reynolds' averaging. In this approach, a generic field $\phi$ is broken into a mean and deviatoric component, i.e. - -$$ -\phi = \overline{\phi} + \phi^\prime -$$ - -When deriving the Reynolds' averaged equations, averages of terms with a single prime are discarded by construction. This is an attractive approach for Boussinesq ocean models since the density is assumed constant in all equations. When the ocean model is non Boussinesq, this leads to difficulties. For example, consider the first term in equation [](#h-momentum), if a Reynolds' decomposition and averaging is performed, - -$$ -\frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, {\bf u} \, dz \, dA = \frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} (\overline{\rho {\bf u}} + \, \overline{\rho^\prime {\bf u}^\prime}) \, dz \, dA -$$ - -In this equation, the products of prime and average drop out by construction. The $\overline{\rho^\prime {\mathbf u}^\prime}$ term is an unnecessary complication and difficult to parameterize. To circumvent this complication, Omega will adopt Favre averaging [(Pope 2000)](https://elmoukrie.com/wp-content/uploads/2022/04/pope-s.b.-turbulent-flows-cambridge-university-press-2000.pdf), which for the generic variable $\phi$ is - -$$ -\phi = \hat{\phi} + \phi^" -$$ - -Where $\hat{\phi} \equiv \frac{\overline{\rho \phi}}{\overline{\rho}}$, and the double prime indicates deviations from this density weighted mean. In the definition, the overbar is an averaging operator with identical properties to a Reynolds' average. Using this relation, we can relate Reynolds' average to Favre average by considering the average of $\rho \phi$. The standard Reynolds' approach gives - -$$ -\overline{\rho \phi} = \overline{\rho}\overline{\phi} + \overline{\rho^\prime \phi^\prime} -$$ - -Isolating $\overline{\phi}$, - -$$ -\overline{\phi} = \frac{\overline{\rho \phi}}{\overline{\rho}} + \frac{\overline{\rho^\prime \phi^\prime}}{\overline{\rho}} -$$ - -The first term on the right side of the equation is the definition of a Favre average, which yields - -$$ -\overline{\phi} = \hat{\phi} + \frac{\overline{\rho^\prime \phi^\prime}}{\overline{\rho}} -$$ - -Throughout much of the ocean, we expect the second term to be $O(10^{-3})$ smaller than the first, but could be large in highly turbulent regions. With this adoption, all prognostic and diagnostic variables in Omega are interpreted as Favre averages. -This choice ensures that the governing equations are closed in terms of density-weighted means, avoiding the need to model second-order density fluctuations like $\overline{\rho' \phi'}$ that would otherwise arise in a Reynolds framework. - -## 8. Layered Equations - -### Vertical Discretization +## 8. Vertical Discretization for the Layered Equations The previous equation set [](#vh-mass) to [](#vh-momentum) is for an arbitrary layer bounded by $z^{\text{top}}$ above and $z^{\text{bot}}$ below. We now provide the details of the vertical discretization. @@ -389,9 +346,11 @@ $$ (def-layer-average-reynolds) Given that density fluctuations are small relative to the mean density, we expect the Reynolds' averaged density to be very close to the full density. Finally, we note that utilizing a Reynolds' average does not alter the hydrostatic approximation or the pseudo-height discussion. -## 5. Turbulent fluxes +## 9. Turbulent fluxes + +### Reynolds' Average -For implementation in Omega, the fundamental equations are most often Reynolds' averaged and each variable is decomposed into an average and a fluctuating component, i.e., +The fundamental ocean model equations are most often Reynolds' averaged to derive the sub gridscale stresses. Each variable is decomposed into an average and a fluctuating component, i.e., $$ \varphi = \left<\varphi\right> + \varphi^\prime @@ -409,7 +368,7 @@ $$ (reynolds-example) In this equation, the products of prime and average drop out by construction. The $\left<\rho^\prime {\mathbf u}^\prime\right>$ term is an unnecessary complication and difficult to parameterize. -## 6. Favre Averaging +### Favre Averaging Favre averaging is common in compressible turbulence literature and has been leveraged for other non Boussinesq ocean modeling efforts [(e.g., Greatbatch et al, 2001)](https://journals.ametsoc.org/view/journals/atot/18/11/1520-0426_2001_018_1911_rtbaio_2_0_co_2.xml). As will be shown, a Favre decomposition and averaging will circumvent the complication, discussed in the previous section, that arises when using a Reynolds' approach in a non Boussinesq model. @@ -513,13 +472,21 @@ $$ \varphi = \overline{\varphi}^{\tilde{z}}_k + \delta \varphi $$ -which is a density weighted vertical integral and the deviation from this value. The second decomposition is +which is a density weighted vertical integral and the deviation from this value. We again note that in the Omega equations, the Favre averaged field will be the quantity that is density weighted vertically averaged. Hence we rewrite the previous equation as + +$$ +\widehat{\varphi} = \overline{\widehat{\varphi}}^{\tilde{z}}_k + \delta \varphi +$$ (vertical-decomposition-favre) + +The second decomposition is $$ \varphi = \left<\varphi\right> + \varphi^\prime $$ -which is the traditional Reynolds' decomposition. This will apply to quantities that don't include the full spatially variable density. The final decomposition is +which is the traditional Reynolds' decomposition. This will apply to quantities that don't include the full spatially variable density. + +The final decomposition is $$ \varphi = \widehat{\varphi} + \varphi^{\prime \prime} @@ -527,9 +494,9 @@ $$ which is the Favre decomposition. It is important to recall that the prime and double prime variables are different as they are fluctuations relative to different averages. -## 6. Layer Equations +## 10. Layer Equations -### Layered Tracer & Mass +### Tracer & Mass Substituting [](#def-pseudo-velocity) and [](#grad-z-top) into the tracer equation [](#vh-tracer) for layer $k$, we have @@ -538,9 +505,9 @@ $$ + \int_{\partial A} \left( \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho \, \varphi \, {\bf u} \, dz \right) \cdot {\bf n}_\perp \, dl & \\ + -\int_{A} \left\{ \rho_0 \varphi \left[\tilde{w} - \tilde{w}_r - {\bf u} \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right) \right] \right\}_{z = z^{\text{top}}} \, dA & \\ +\int_{A} \left\{ \rho_0 \varphi \left[\tilde{w} - \tilde{w}_r - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right] \right\}_{z = z^{\text{top}}} \, dA & \\ - -\int_{A} \left\{ \rho_0 \varphi \left[\tilde{w} - \tilde{w}_r - {\bf u} \cdot \nabla \left( \tilde{z}^{\text{bot}} - \tilde{z}^{\text{surf}} \right) \right] \right\}_{z = z^{\text{bot}}}\, dA +\int_{A} \left\{ \rho_0 \varphi \left[\tilde{w} - \tilde{w}_r - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right] \right\}_{z = z^{\text{bot}}}\, dA & = 0 $$ (Aintegral-tracer) @@ -553,9 +520,9 @@ $$ + \int_{\partial A} \left( \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \left<\rho \, \varphi \, {\bf u} \right> \, dz \right) \cdot {\bf n}_\perp \, dl & \\ + -\int_{A} \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - {\bf u} \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right) \right] \right\}\right>_{z = z^{\text{top}}} \, dA & \\ +\int_{A} \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right] \right\}\right>_{z = z^{\text{top}}} \, dA & \\ - -\int_{A} \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - {\bf u} \cdot \nabla \left( \tilde{z}^{\text{bot}} - \tilde{z}^{\text{surf}} \right) \right] \right\}\right>_{z = z^{\text{bot}}}\, dA +\int_{A} \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right] \right\}\right>_{z = z^{\text{bot}}}\, dA & = 0. $$ (Aintegral-tracer-reynolds) @@ -568,9 +535,9 @@ $$ + \int_{\partial A} \left( \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \left<\rho\right> \, \widehat{\varphi \, {\bf u}} \, dz \right) \cdot {\bf n}_\perp \, dl & \\ + -\int_{A} \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - {\bf u} \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right) \right] \right\}\right>_{z = z^{\text{top}}} \, dA & \\ +\int_{A} \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right] \right\}\right>_{z = z^{\text{top}}} \, dA & \\ - -\int_{A} \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - {\bf u} \cdot \nabla \left( \tilde{z}^{\text{bot}} - \tilde{z}^{\text{surf}} \right) \right] \right\}\right>_{z = z^{\text{bot}}}\, dA +\int_{A} \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right] \right\}\right>_{z = z^{\text{bot}}}\, dA & = 0. $$ (Aintegral-tracer-reynolds2) @@ -581,75 +548,49 @@ $$ + \int_{\partial A} \left( \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \left<\rho\right> \, \left(\widehat{\varphi}\widehat{\bf u} + \widehat{\varphi^{\prime \prime}{\bf u}^{\prime \prime}} \right) \right) \, \cdot {\bf n}_\perp \, dl & \\ + -\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right) \right\}_{z = z^{\text{top}}} \, dA & \\ +\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{top}}} \, dA & \\ - -\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right) \right\}_{z = z^{\text{bot}}}\, dA +\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{bot}}}\, dA & = 0. $$ (Aintegral-tracer-favre-reynolds) -While working in pseudo-height coordinates, vertical transport across a sloping layer interface must still be expressed in terms of the slope of the geometric height, $\nabla z^{\text{top}}$, of that interface. Although it may be tempting to rewrite this slope as $\nabla \tilde{z}^{\text{top}}$, the two are not exactly equivalent due to the nonlinear transformation between pressure and height. Differentiating the pseudo-height definition under hydrostatic balance yields: - -$$ -\nabla z^{\text{top}} = \frac{\rho_0}{\rho(z^{\text{top}})} \nabla \tilde{z}^{\text{top}} + \frac{1}{\rho(z^{\text{top}}) g} \nabla p^{\text{surf}} -$$ - -This shows that the geometric slope differs from the pseudo-height slope by a correction term involving the horizontal gradient of surface pressure. Under typical oceanographic conditions—where density is close to the reference $\rho_0$ and surface pressure gradients are modest—this correction may be small. However, we retain $\nabla z^{\text{top}}$ explicitly in the vertical transport terms to avoid introducing assumptions that may not hold in all regimes. - -Given that the hydrostatic relation doesn't change form if Reynolds' averaged and reinterpreting the density weighted vertical average ([](#h-phi)) to utilize Reynolds' averaged density, and dividing by $\rho_0$ the first two terms in [](#Aintegral-tracer) can be rewritten as, +We can rewrite the first two terms in [](#Aintegral-tracer-favre-reynolds) using [](#def-layer-average) and [](#def-layer-average-reynolds) $$ -\frac{d}{dt} \int_A \tilde{h}_k \, \overline{\varphi}^{\tilde{z}}_k \, dA +\frac{d}{dt} \int_A \tilde{h}_k \, \overline{\widehat{\varphi}}^{\tilde{z}}_k \, dA + -\int_{\partial A} \left( \tilde{h}_k \, \overline{\varphi {\bf u}}^{\tilde{z}}_k \right) \cdot {\bf n}_\perp \, dl & \\ +\int_{\partial A} \left( \tilde{h}_k \, \overline{\widehat{\varphi} \widehat{{\bf u}} + \widehat{\varphi^{\prime \prime}{\bf u}^{\prime \prime}}}^{\tilde{z}}_k \right) \cdot {\bf n}_\perp \, dl & \\ + -\int_A \left\{ \varphi \left[\tilde{w} - \tilde{w}_r - {\bf u} \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right) \right] \right\}_{z = z^{\text{top}}} \, dA & \\ +\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{top}}} \, dA & \\ - -\int_A \left\{ \varphi \left[\tilde{w} - \tilde{w}_r - {\bf u} \cdot \nabla \left( \tilde{z}^{\text{bot}} - \tilde{z}^{\text{surf}} \right) \right] \right\}_{z = z^{\text{bot}}} \, dA +\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{bot}}}\, dA & = 0 $$ (Aintegral-tracer2) -Next we utilize the definition of the transport vertical velocity $\tilde{w}_{tr} \equiv \tilde{w} - \tilde{w}_r$ and perform the averaging expansion [](#averaging-decomp-definition) on the second term, +The second term is expanded utilizing [](#vertical-decomposition-favre) $$ -\frac{d}{dt} \int_{A} {\tilde h}_k {\overline \varphi}^{\tilde{z}}_k \, dA +\frac{d}{dt} \int_A \tilde{h}_k \, \overline{\widehat{\varphi}}^{\tilde{z}}_k \, dA + - \int_{\partial A}\left\{ {\tilde h}_k \, \left[\overline{\left(\overline{\varphi}^{\tilde{z}}_k + \delta \varphi\right)\left(\overline{\bf u}^{\tilde{z}}_k + \delta {\bf u}\right)}^{\tilde{z}}_k \right] \, \right\} \cdot {\bf n} \, dl & \\ - + \int_{A}\left[ \varphi {\tilde w}_{tr} - {\bf u} \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right)\right]_{{\tilde z}={\tilde z}_k^{\text{top}}} \, dA & \\ - - \int_{A}\left[ \varphi {\tilde w}_{tr} - {\bf u} \cdot \nabla \left( \tilde{z}^{\text{bot}} - \tilde{z}^{\text{surf}} \right)\right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} \, dA -= 0. -$$ - -The second term is simplified using [](#delta-vert-average) - -$$ -\frac{d}{dt} \int_{A} {\tilde h}_k {\overline \varphi}^{\tilde{z}}_k \, dA +\int_{\partial A} \left( \tilde{h}_k \, \overline{\left(\overline{\widehat{\varphi}}^{\tilde{z}}_k + \delta \varphi\right)\left(\overline{\widehat{\bf u}}^{\tilde{z}}_k + \delta {\bf u}\right)}^{\tilde{z}}_k + \tilde{h}_k \overline{\widehat{\varphi^{\prime \prime}{\bf u}^{\prime \prime}}}^{\tilde{z}}_k \right) \cdot {\bf n}_\perp \, dl & \\ + - \int_{\partial A}\left\{ {\tilde h}_k \, \left[\left(\overline{\varphi}^{\tilde{z}}_k \overline{\bf u}^{\tilde{z}}_k + \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right)\right] \, \right\} \cdot {\bf n} \, dl & \\ - + \int_{A}\left[ \varphi {\tilde w}_{tr} - {\bf u} \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right)\right]_{{\tilde z}={\tilde z}_k^{\text{top}}} \, dA & \\ - - \int_{A}\left[ \varphi {\tilde w}_{tr} - {\bf u} \cdot \nabla \left( \tilde{z}^{\text{bot}} - \tilde{z}^{\text{surf}} \right)\right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} \, dA -= 0. -$$ +\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{top}}} \, dA & \\ +- +\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{bot}}}\, dA +& = 0 +$$ (Aintegral-tracer2) -Next, a Favre decomposition is used for the layer averaged variables and a Reynolds' decomposition is used for the full variable reconstructions at the top and bottom of the model layers. +The second term is simplified using [](#delta-vert-average) $$ -\frac{d}{dt} \int_{A} {\tilde h}_k {\overline \varphi}^{\tilde{z}}_k \, dA +\frac{d}{dt} \int_A \tilde{h}_k \, \overline{\widehat{\varphi}}^{\tilde{z}}_k \, dA + - \int_{\partial A}\left\{ {\tilde h}_k \, \left[\left(\widehat{\overline{\varphi}^{\tilde{z}}_k} + \varphi^{\prime \prime}\right) \left(\widehat{\overline{\bf u}^{\tilde{z}}_k} + {\bf u}^{\prime \prime}\right) + \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right] \, \right\} \cdot {\bf n} \, dl & \\ - + \int_{A}\left[ \left(\left<\varphi\right> + \varphi^\prime \right) \left\{\left(\left<{\tilde w}_{tr}\right> + {\tilde w}_{tr}^{\prime} \right) - \left(\left<{\bf u}\right> + {\bf u}^{\prime} \right) \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right)\right\}\right]_{{\tilde z}={\tilde z}_k^{\text{top}}} \, dA & \\ - - \int_{A}\left[ \left(\left<\varphi\right> + \varphi^\prime \right) \left\{\left(\left<{\tilde w}_{tr}\right> + {\tilde w}_{tr}^{\prime} \right) - \left(\left<{\bf u}\right> + {\bf u}^{\prime} \right) \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right)\right\}\right]_{{\tilde z}={\tilde z}_k^{\text{bot}}} \, dA & \\ -= 0. -$$ (favre-full-expansion) - -The terms on the first line are next Favre averaged and the terms on the second and third lines are expanded and then Reynolds' averaged to yield - -$$ -\frac{d}{dt} \int_{A} {\tilde h}_k {\overline \varphi}^{\tilde{z}}_k \, dA +\int_{\partial A} \left[ \tilde{h}_k \, \left(\overline{\widehat{\varphi}}^{\tilde{z}}_k \overline{\widehat{\bf u}}^{\tilde{z}}_k + \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k + \overline{\widehat{\varphi^{\prime \prime}{\bf u}^{\prime \prime}}}^{\tilde{z}}_k \right)\right] \cdot {\bf n}_\perp \, dl & \\ + - \int_{\partial A}\left\{ {\tilde h}_k \, \left[\widehat{\overline{\varphi}^{\tilde{z}}_k} \widehat{\overline{\bf u}^{\tilde{z}}_k} + \widehat{\varphi^{\prime \prime}{\bf u}^{\prime \prime}} + \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right] \, \right\} \cdot {\bf n} \, dl & \\ - + \int_{A}\left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> + \left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left(\left<\varphi\right>\left<{\bf u}\right> + \left< \varphi^\prime {\bf u}^{\prime}\right> \right) \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right)\right]_{{\tilde z}={\tilde z}_k^{\text{top}}} \, dA & \\ -- \int_{A}\left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> + \left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left(\left<\varphi\right>\left<{\bf u}\right> + \left< \varphi^\prime {\bf u}^{\prime}\right> \right) \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right)\right]_{{\tilde z}={\tilde z}_k^{\text{bot}}} \, dA & \\ -= 0. +\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{top}}} \, dA & \\ +- +\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{bot}}}\, dA +& = 0 $$ (favre-reynolds-tracer-final) A few comments on the last two integrals. If only the first two terms of the integrals are retained, this represents the vertical advective and turbulent fluxes for a finite volume framework. The second two terms represent the projection of the horizontal advective and turbulent fluxes into the direction normal to the sloping surface. When the coordinate surfaces are flat $\tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} = 0$ and the vertical fluxes are aligned with the normal to the coordinate surface reducing the equation to the expected z-coordinate, finite volume, formulation. @@ -659,14 +600,14 @@ Finally, we take the limit as $A \rightarrow 0$ and using Gauss' theorem for the tracer: $$ -\frac{\partial {\tilde h}_k \widehat{\overline \varphi^{\tilde{z}}_k} }{dt} +\frac{\partial {\tilde h}_k \overline{\widehat{\varphi}^{\tilde{z}}_k} }{dt} + - \nabla \cdot \left({\tilde h}_k \widehat{\overline{\varphi}^{\tilde{z}}_k} \widehat{\overline{\bf u}^{\tilde{z}}_k}\right) - + \left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> - \left<\varphi\right>\left<{\bf u}\right> \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right) \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} & \\ - - \left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> - \left<\varphi\right>\left<{\bf u}\right> \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right) \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} + \nabla \cdot \left({\tilde h}_k \overline{\widehat{\varphi}}^{\tilde{z}}_k \overline{\widehat{\bf u}}^{\tilde{z}}_k\right) + + \left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> - \left<\varphi\right>\left<{\bf u}\right> \cdot \nabla \tilde{z}^{\text{top}} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} & \\ + - \left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> - \left<\varphi\right>\left<{\bf u}\right> \cdot \nabla \tilde{z}^{\text{top}} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} = & \\ -- \nabla \cdot \left({\tilde h}_k \widehat{{\overline{\varphi}^{\tilde{z}}_k}^{\prime \prime} {\overline{\bf u}^{\tilde{z}}_k}^{\prime \prime}} \, + {\tilde h}_k \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right) & \\ -- \left\{\left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime {\bf u}^{\prime}\right> \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right)\right]_{{\tilde z}={\tilde z}_{k+1}^{\text{top}}} - \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime {\bf u}^{\prime}\right> \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} \right)\right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}}\right\}. +- \nabla \cdot \left({\tilde h}_k \overline{\widehat{\varphi^{\prime \prime} {\bf u}^{\prime \prime}}}^{\tilde{z}}_k \, + {\tilde h}_k \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right) & \\ +- \left\{\left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime {\bf u}^{\prime}\right> \cdot \nabla \tilde{z}^{\text{top}} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{top}}} - \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime {\bf u}^{\prime}\right> \cdot \nabla \tilde{z}^{\text{top}}\right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}}\right\}. $$ (layer-tracer) A few notes on the layer averaged tracer equation. In this complete form, it includes three types of fluctuating quantities that must be dealt with: (1) the Favre averaged turbulent flux $\left(\widehat{{\overline{\varphi}^{\tilde{z}}_k}^{\prime \prime} {\overline{\bf u}^{\tilde{z}}_k}^{\prime \prime}}\right)$, (2) the Reynolds' average turbulent flux $\left( \left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> \right)$, and (3) the vertical integral of the product of deviations from the layer integrated variables $\left(\overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right)$. The details of the first two quantities will be discussed later in this document and follow on design documents. The terms involving perturbations from the layer integrated quantity are necessary to extend beyond piecewise constant represenation of variables. In this equation, variables with no overline are the full field variable at the interfaces. @@ -676,11 +617,11 @@ The mass equation is identical to the tracer equation with $\varphi=1$. mass: $$ -\frac{\partial {\tilde h}_k }{dt} +\frac{\partial {\tilde h}_k }{\partial t} + - \nabla \cdot \left({\tilde h}_k \widehat{\overline{\bf u}^{\tilde{z}}_k}\right) - + \left[ \left<{\tilde w}_{tr}\right> - \left<{\bf u}\right> \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}}\right) \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} - - \left[ \left<{\tilde w}_{tr}\right> - \left<{\bf u}\right> \cdot \nabla \left( \tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}}\right) \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} + \nabla \cdot \left({\tilde h}_k \overline{\widehat{\bf u}}^{\tilde{z}}_k\right) + + \left[ \left<{\tilde w}_{tr}\right> - \left<{\bf u}\right> \cdot \nabla \tilde{z}^{\text{top}} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} + - \left[ \left<{\tilde w}_{tr}\right> - \left<{\bf u}\right> \cdot \nabla \tilde{z}^{\text{top}} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} = 0 $$ (layer-mass) From d12ee93a71fdac8041f391d866639b0282819d44 Mon Sep 17 00:00:00 2001 From: Luke Van Roekel Date: Wed, 2 Jul 2025 09:23:22 -0600 Subject: [PATCH 44/65] Finishes v1 rewrite of the tracer section --- .../omega/doc/design/OmegaV1GoverningEqns.md | 48 ++++++++++++------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index baaa0d151c56..5c7ddcd66954 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -285,7 +285,7 @@ $$ (vh-momentum-pseudo) These equations express horizontal and vertical fluxes naturally in terms of pseudo-height, enabling fully consistent discretization in the vertical coordinate used for prognostic evolution. -## 8. Vertical Discretization for the Layered Equations +## 7. Vertical Discretization for the Layered Equations The previous equation set [](#vh-mass) to [](#vh-momentum) is for an arbitrary layer bounded by $z^{\text{top}}$ above and $z^{\text{bot}}$ below. We now provide the details of the vertical discretization. @@ -344,9 +344,9 @@ $$ {\int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \left<\rho\right> dz}. $$ (def-layer-average-reynolds) -Given that density fluctuations are small relative to the mean density, we expect the Reynolds' averaged density to be very close to the full density. Finally, we note that utilizing a Reynolds' average does not alter the hydrostatic approximation or the pseudo-height discussion. +Given that density fluctuations are small relative to the mean density, we expect the Reynolds' averaged density to be very close to the full density. [](#def-layer-average) is also valid for any quantity, e.g., it is equally valid for a Reynolds' averaged quantity ($\varphi = \left<\varphi \right>$). -## 9. Turbulent fluxes +## 8. Turbulent fluxes ### Reynolds' Average @@ -434,7 +434,7 @@ $$ \left<\rho \phi\right> = \left<\rho\right>\widehat{\varphi}. $$ (Favre-relation1) -Here we have utilized the definition of the Favre average of $\varphi$. Equation [](#Favre-relation1) implies that the model predicted variables in Omega should be interpreted as Favre averaged. Given this, turbulent fluxes should also be Favre averaged. As can be seen in equation [](#vh-tracer), we will have flux terms of the form $\rho \varphi {\mathbf u}$. To gain an intuition for how these terms are treated, we first perform a Favre decomposition, but leave the density as full field. +Here we have utilized the definition of the Favre average of $\varphi$. Equation [](#Favre-relation1) implies that the model predicted variables in Omega should be interpreted as Favre averaged. Given this, turbulent fluxes should also be Favre averaged. As can be seen in equation [](#tr-vh-split-pseudo), we will have flux terms of the form $\rho \varphi {\mathbf u}$. To gain an intuition for how these terms are treated, we first perform a Favre decomposition, but leave the density as full field. $$ \rho \varphi {\mathbf u} &= \rho \left(\widehat{\varphi} + \varphi^{\prime \prime}\right)\left(\widehat{\mathbf u} + {\mathbf u}^{\prime \prime}\right) \\ @@ -494,11 +494,11 @@ $$ which is the Favre decomposition. It is important to recall that the prime and double prime variables are different as they are fluctuations relative to different averages. -## 10. Layer Equations +## 9. Layer Equations ### Tracer & Mass -Substituting [](#def-pseudo-velocity) and [](#grad-z-top) into the tracer equation [](#vh-tracer) for layer $k$, we have +Substituting [](#w-tilde) into the tracer equation [](#tr-vh-split-pseudo) for layer $k$, we have $$ \frac{d}{dt} \int_{A} \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho \, \varphi \, dz \, dA @@ -508,11 +508,9 @@ $$ \int_{A} \left\{ \rho_0 \varphi \left[\tilde{w} - \tilde{w}_r - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right] \right\}_{z = z^{\text{top}}} \, dA & \\ - \int_{A} \left\{ \rho_0 \varphi \left[\tilde{w} - \tilde{w}_r - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right] \right\}_{z = z^{\text{bot}}}\, dA -& = 0 +& = 0. $$ (Aintegral-tracer) -where we converted to pseudo-height for the last two terms using [](#formula-pseudo-height). - We first Reynolds' average this equation and given the definition of the operator we can move the averaging past the derivatives and integrals without correction terms to yield $$ @@ -563,7 +561,7 @@ $$ + \int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{top}}} \, dA & \\ - -\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{bot}}}\, dA +\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{bot}} \right\}_{z = z^{\text{bot}}}\, dA & = 0 $$ (Aintegral-tracer2) @@ -576,7 +574,7 @@ $$ + \int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{top}}} \, dA & \\ - -\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{bot}}}\, dA +\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{bot}} \right\}_{z = z^{\text{bot}}}\, dA & = 0 $$ (Aintegral-tracer2) @@ -589,18 +587,32 @@ $$ + \int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{top}}} \, dA & \\ - -\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{bot}}}\, dA +\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{bot}} \right\}_{z = z^{\text{bot}}}\, dA +& = 0 +$$ + +Given that the horizontal area is not changing in time, we can move the time derivative through the first integral. We also invoke Green's Theorem for the second integral to convert that from a surface integral to an area integral. With these changes, the equation becomes + +$$ +\int_A \frac{\partial \tilde{h}_k \, \overline{\widehat{\varphi}}^{\tilde{z}}_k}{\partial t} ++ +\nabla \cdot \left[ \tilde{h}_k \, \left(\overline{\widehat{\varphi}}^{\tilde{z}}_k \overline{\widehat{\bf u}}^{\tilde{z}}_k + \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k + \overline{\widehat{\varphi^{\prime \prime}{\bf u}^{\prime \prime}}}^{\tilde{z}}_k \right)\right] & \\ ++ +\left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{top}}} & \\ +- +\left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{bot}} \right\}_{z = z^{\text{bot}}} \, dA & = 0 $$ (favre-reynolds-tracer-final) -A few comments on the last two integrals. If only the first two terms of the integrals are retained, this represents the vertical advective and turbulent fluxes for a finite volume framework. The second two terms represent the projection of the horizontal advective and turbulent fluxes into the direction normal to the sloping surface. When the coordinate surfaces are flat $\tilde{z}^{\text{top}} - \tilde{z}^{\text{surf}} = 0$ and the vertical fluxes are aligned with the normal to the coordinate surface reducing the equation to the expected z-coordinate, finite volume, formulation. -Finally, we take the limit as $A \rightarrow 0$ and using Gauss' theorem for the horizontal advection to arrive at the final tracer equation +A few comments on the last two lines of [](#favre-reynolds-tracer-final). If only the first two terms of the integrals are retained, this represents the vertical advective and turbulent fluxes for a finite volume framework. The second two terms represent the projection of the horizontal advective and turbulent fluxes into the direction normal to the sloping surface. When the coordinate surfaces are flat $\nabla \tilde{z}^{\text{top}} = \nabla \tilde{z}^{\text{bot}} = 0$ and the vertical fluxes are aligned with the normal to the coordinate surface reducing the equation to the expected z-coordinate, finite volume, formulation. + +Finally, given that the area integral operates on the entire equation, it is valid for any area and we can take the limit as $A \rightarrow 0$ to arrive at the final tracer equation tracer: $$ -\frac{\partial {\tilde h}_k \overline{\widehat{\varphi}^{\tilde{z}}_k} }{dt} +\frac{\partial {\tilde h}_k \overline{\widehat{\varphi}^{\tilde{z}}_k} }{\partial t} + \nabla \cdot \left({\tilde h}_k \overline{\widehat{\varphi}}^{\tilde{z}}_k \overline{\widehat{\bf u}}^{\tilde{z}}_k\right) + \left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> - \left<\varphi\right>\left<{\bf u}\right> \cdot \nabla \tilde{z}^{\text{top}} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} & \\ @@ -610,14 +622,16 @@ $$ - \left\{\left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime {\bf u}^{\prime}\right> \cdot \nabla \tilde{z}^{\text{top}} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{top}}} - \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime {\bf u}^{\prime}\right> \cdot \nabla \tilde{z}^{\text{top}}\right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}}\right\}. $$ (layer-tracer) -A few notes on the layer averaged tracer equation. In this complete form, it includes three types of fluctuating quantities that must be dealt with: (1) the Favre averaged turbulent flux $\left(\widehat{{\overline{\varphi}^{\tilde{z}}_k}^{\prime \prime} {\overline{\bf u}^{\tilde{z}}_k}^{\prime \prime}}\right)$, (2) the Reynolds' average turbulent flux $\left( \left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> \right)$, and (3) the vertical integral of the product of deviations from the layer integrated variables $\left(\overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right)$. The details of the first two quantities will be discussed later in this document and follow on design documents. The terms involving perturbations from the layer integrated quantity are necessary to extend beyond piecewise constant represenation of variables. In this equation, variables with no overline are the full field variable at the interfaces. +A few notes on the layer averaged tracer equation. In this complete form, it includes three types of fluctuating quantities that must be dealt with: (1) the vertically density weighted, Favre averaged turbulent flux $\left(\overline{\widehat{\varphi^{\prime \prime} {\bf u}^{\prime \prime}}}^{\tilde{z}}_k \right)$, (2) the Reynolds' average turbulent flux $\left( \left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> \right)$, and (3) the vertical integral of the product of deviations from the layer integrated variables $\left(\overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right)$. The details of the first two quantities will be discussed later in this document and follow on design documents. The terms involving perturbations from the layer integrated quantity are necessary to extend beyond piecewise constant represenation of variables. In this equation, variables with no overline are the full field variable at the interfaces. + +In the parameterization of the horizontal Favre turbulent flux, it will be important to keep in mind that it is also the density weighted vertical average that could cause complications. This is discussed further later in this document. The mass equation is identical to the tracer equation with $\varphi=1$. mass: $$ -\frac{\partial {\tilde h}_k }{\partial t} +\frac{d {\tilde h}_k }{d t} + \nabla \cdot \left({\tilde h}_k \overline{\widehat{\bf u}}^{\tilde{z}}_k\right) + \left[ \left<{\tilde w}_{tr}\right> - \left<{\bf u}\right> \cdot \nabla \tilde{z}^{\text{top}} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} From 3a4d486828c19b2f8e23cf68473794cf90b4e1f9 Mon Sep 17 00:00:00 2001 From: Luke Van Roekel Date: Wed, 2 Jul 2025 15:25:48 -0600 Subject: [PATCH 45/65] start of layered momentum --- .../omega/doc/design/OmegaV1GoverningEqns.md | 79 ++++++++++--------- 1 file changed, 43 insertions(+), 36 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 5c7ddcd66954..b4f6a4b39c80 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -594,13 +594,13 @@ $$ Given that the horizontal area is not changing in time, we can move the time derivative through the first integral. We also invoke Green's Theorem for the second integral to convert that from a surface integral to an area integral. With these changes, the equation becomes $$ -\int_A \frac{\partial \tilde{h}_k \, \overline{\widehat{\varphi}}^{\tilde{z}}_k}{\partial t} +\int_A \bigl\{ \frac{\partial \tilde{h}_k \, \overline{\widehat{\varphi}}^{\tilde{z}}_k}{\partial t} + \nabla \cdot \left[ \tilde{h}_k \, \left(\overline{\widehat{\varphi}}^{\tilde{z}}_k \overline{\widehat{\bf u}}^{\tilde{z}}_k + \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k + \overline{\widehat{\varphi^{\prime \prime}{\bf u}^{\prime \prime}}}^{\tilde{z}}_k \right)\right] & \\ + \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{top}}} & \\ - -\left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{bot}} \right\}_{z = z^{\text{bot}}} \, dA +\left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{bot}} \right\}_{z = z^{\text{bot}}} \bigr\} \, dA & = 0 $$ (favre-reynolds-tracer-final) @@ -619,7 +619,7 @@ $$ - \left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> - \left<\varphi\right>\left<{\bf u}\right> \cdot \nabla \tilde{z}^{\text{top}} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} = & \\ - \nabla \cdot \left({\tilde h}_k \overline{\widehat{\varphi^{\prime \prime} {\bf u}^{\prime \prime}}}^{\tilde{z}}_k \, + {\tilde h}_k \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right) & \\ -- \left\{\left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime {\bf u}^{\prime}\right> \cdot \nabla \tilde{z}^{\text{top}} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{top}}} - \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime {\bf u}^{\prime}\right> \cdot \nabla \tilde{z}^{\text{top}}\right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}}\right\}. +- \left\{\left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime {\bf u}^{\prime}\right> \cdot \nabla \tilde{z}^{\text{top}} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{top}}} - \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime {\bf u}^{\prime}\right> \cdot \nabla \tilde{z}^{\text{bot}}\right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}}\right\}. $$ (layer-tracer) A few notes on the layer averaged tracer equation. In this complete form, it includes three types of fluctuating quantities that must be dealt with: (1) the vertically density weighted, Favre averaged turbulent flux $\left(\overline{\widehat{\varphi^{\prime \prime} {\bf u}^{\prime \prime}}}^{\tilde{z}}_k \right)$, (2) the Reynolds' average turbulent flux $\left( \left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> \right)$, and (3) the vertical integral of the product of deviations from the layer integrated variables $\left(\overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right)$. The details of the first two quantities will be discussed later in this document and follow on design documents. The terms involving perturbations from the layer integrated quantity are necessary to extend beyond piecewise constant represenation of variables. In this equation, variables with no overline are the full field variable at the interfaces. @@ -635,7 +635,7 @@ $$ + \nabla \cdot \left({\tilde h}_k \overline{\widehat{\bf u}}^{\tilde{z}}_k\right) + \left[ \left<{\tilde w}_{tr}\right> - \left<{\bf u}\right> \cdot \nabla \tilde{z}^{\text{top}} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} - - \left[ \left<{\tilde w}_{tr}\right> - \left<{\bf u}\right> \cdot \nabla \tilde{z}^{\text{top}} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} + - \left[ \left<{\tilde w}_{tr}\right> - \left<{\bf u}\right> \cdot \nabla \tilde{z}^{\text{bot}} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} = 0 $$ (layer-mass) @@ -643,50 +643,57 @@ $$ (layer-mass) We now derive the horizontal momentum equation in our non-Boussinesq, hydrostatic framework, following the same finite-volume approach used for mass and tracer conservation. We work with a pseudo-height vertical coordinate $\tilde{z}$ as defined in [Pseudo-Height Coordinate Section](pseudo-height). -We begin by specifying the forces in the full three-dimensional momentum equation [](#continuous-momentum), +We begin from [](#vh-momentum-pseudo) and specify the body forces ${\bf b}$ and surface forces ${\bf f}$ $$ -\frac{\partial}{\partial t} \int_{V(t)} \rho\, {\bf v} \, dV -+ \int_{\partial V(t)}\rho\, {\bf v} \left({\bf v} - {\bf v}_r \right) \cdot {\bf n} \, dA -= \mathbf{F}_\text{total}[V(t)], -$$ (continuous-momentum2) +\frac{d}{dt} \int_{A} \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho \, {\bf v} \, d\tilde{z} \, dA +&+ +\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho \, {\bf v} \otimes {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ +&+ +\int_A \rho_0 \, {\bf v} \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +- +\int_A \rho_0 \, {\bf v} \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ +&= +-\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho \, \left({\bf f} \times \mathbf{u} + \nabla \Phi \right) \, d\tilde{z} \, dA ++ +\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} p \, d\tilde{z} \right) dl \\ +&\quad ++ \int_A \left[ p \nabla \tilde{z} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +- \int_A \left[ p \nabla \tilde{z} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. +$$ (vh-momentum-forces) -with total forces given by: +In this equation: -$$ -\mathbf{F}_\text{total}[V(t)] = -- \int_{V(t)} \rho\, \mathbf{f} \times \mathbf{u} \, dV -- \int_{V(t)} \rho\, \nabla_{3D} \Phi \, dV -- \int_{\partial V(t)} p \, \mathbf{n} \, dA -+ \int_{\partial V(t)} \boldsymbol{\tau} \cdot \mathbf{n} \, dA -$$ (momentum-Ftotal) +- The first term on the right hand side is the **Coriolis force**, where $ \mathbf{f} $ is the vector Coriolis parameter (e.g., $ f \hat{\mathbf{z}} $ on the sphere). +- The second term on the right hand side represents the **gravitational force**, expressed in terms of the gradient of the gravitational potential $ \Phi(x, y, z, t) $, which may include effects such as tides and self-attraction and loading. +- The final terms are the **pressure force**, which acts on the boundary surfaces and is naturally expressed as a surface integral. It gives rise to both horizontal pressure gradients and contributions from sloping surfaces. -Each term on the right-hand side corresponds to a physically distinct force acting on the fluid within the control volume: +As with the tracer derivation, we next Reynolds' average [](#vh-momentum-forces), -- The first term is the **Coriolis force**, where $ \mathbf{f} $ is the vector Coriolis parameter (e.g., $ f \hat{\mathbf{z}} $ on the sphere). -- The second term represents the **gravitational force**, expressed in terms of the gradient of the gravitational potential $ \Phi(x, y, z, t) $, which may include effects such as tides and self-attraction and loading. -- The third term is the **pressure force**, which acts on the boundary surfaces and is naturally expressed as a surface integral. It gives rise to both horizontal pressure gradients and contributions from sloping surfaces. -- The fourth term represents resolved stresses. Wind stress, drag, and horizontal boundary conditions are turbulent stresses and are not included in this term. For Omega, the fourth term is zero. +$$ +\frac{d}{dt} \int_{A} \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left< \rho \, {\bf v} \right> \, d\tilde{z} \, dA +&+ +\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left< \rho \, {\bf v} \otimes {\bf u} \right> \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ +&+ +\int_A \rho_0 \,\left< {\bf v} \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \right> \, dA +- +\int_A \rho_0 \, \left< {\bf v} \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right> \, dA \\ +&= +-\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho \, \left( \left< {\bf f} \times \mathbf{u} \right> + \left< \nabla \Phi \right> \right) \, d\tilde{z} \, dA ++ +\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left< p \right> \, d\tilde{z} \right) dl \\ +&\quad ++ \int_A \left[ \left< p \nabla \tilde{z} \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +- \int_A \left[ \left< p \nabla \tilde{z} \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. +$$ (vh-momentum-reynolds1) + +Here we have also moved the Reynolds' average through the spatial integrals given the properties of the averaging. -#### Pressure Term -The pressure force term may be converted from the boundary to the interior with Gauss' divergence theorem (see [Kundu et al. 2016](https://doi.org/10.1016/C2012-0-00611-4) p. 119), -$$ -- \int_{\partial V(t)} p \, \mathbf{n} \, dA -= - \int_{V(t)} \nabla_{3D} p \, dV . -$$ (gradp-Gauss) -Considering only the horizontal components, we have -$$ - - \int_{V(t)} \nabla_{\perp} p \, dV -= - \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} - \nabla_{\perp} p \, dz \, dA -= - \int_{A} \overline{\nabla_{\perp} p}^{z} \, dA. -$$ (gradp-h) -#### Horizontal momentum Putting the pressure and stress term into [](h-momentum), and using Gauss' Theorem on the advection, the horizontal momentum equation is From 6a276de23a0a8114435ad4e58220586e6460e705 Mon Sep 17 00:00:00 2001 From: vanroekel Date: Mon, 7 Jul 2025 08:45:02 -0700 Subject: [PATCH 46/65] rough draft through momentum section --- .../omega/doc/design/OmegaV1GoverningEqns.md | 509 +++++++----------- 1 file changed, 205 insertions(+), 304 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index b4f6a4b39c80..3fc2afc1b9d1 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -241,8 +241,8 @@ Because both terms are scaled by $1/\rho_0$, the full flux is multiplied by $\rh Using this projection, we obtain: $$ -\frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho \, \varphi \, d\tilde{z} \, dA -& + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho \varphi \, {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ +\frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \, \varphi \, d\tilde{z} \, dA +& + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \varphi \, {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ & + \int_A \rho_0 \varphi \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} dA \\ & - \int_A \rho_0 \varphi \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} dA = 0 @@ -257,8 +257,8 @@ Similar expressions to [](#tr-vh-separation-pseudo) hold for mass and momentum: **Mass:** $$ -\frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho \, d\tilde{z} \, dA -& + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho \, {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ +\frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \, d\tilde{z} \, dA +& + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \, {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ & + \int_A \rho_0 \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right] dA \\ & - \int_A \rho_0 \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right] dA = 0 @@ -267,20 +267,20 @@ $$ (vh-mass-pseudo) **Momentum:** $$ -\frac{d}{dt} \int_{A} \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho \, {\bf v} \, d\tilde{z} \, dA +\frac{d}{dt} \int_{A} \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \, {\bf u} \, d\tilde{z} \, dA &+ -\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho \, {\bf v} \otimes {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ +\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \, {\bf u} \otimes {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ &+ -\int_A \rho_0 \, {\bf v} \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +\int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA - -\int_A \rho_0 \, {\bf v} \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ +\int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ &= -\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho \, {\bf b} \, d\tilde{z} \, dA +\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 {\bf b}_{\perp} \, d\tilde{z} \, dA + -\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} {\bf f} \, d\tilde{z} \right) dl \\ +\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \frac{\rho_0 {\bf f}}{\rho} \, d\tilde{z} \right) dl \\ &\quad -+ \int_A \left[ {\bf f} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA -- \int_A \left[ {\bf f} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA ++ \int_A \left[ \frac{\rho_0 {\bf f}}{\rho} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +- \int_A \left[ \frac{\rho_0 {\bf f}}{\rho} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA $$ (vh-momentum-pseudo) These equations express horizontal and vertical fluxes naturally in terms of pseudo-height, enabling fully consistent discretization in the vertical coordinate used for prognostic evolution. @@ -368,90 +368,8 @@ $$ (reynolds-example) In this equation, the products of prime and average drop out by construction. The $\left<\rho^\prime {\mathbf u}^\prime\right>$ term is an unnecessary complication and difficult to parameterize. -### Favre Averaging - -Favre averaging is common in compressible turbulence literature and has been leveraged for other non Boussinesq ocean modeling efforts [(e.g., Greatbatch et al, 2001)](https://journals.ametsoc.org/view/journals/atot/18/11/1520-0426_2001_018_1911_rtbaio_2_0_co_2.xml). As will be shown, a Favre decomposition and averaging will circumvent the complication, discussed in the previous section, that arises when using a Reynolds' approach in a non Boussinesq model. - -The Favre average and decomposition follows closely with the Reynolds' approach. For a generic variable $\varphi$, the Favre decomposition is given by - -$$ -\varphi = \widehat{\varphi} + \varphi^{\prime \prime} -$$ - -where the Favre average $\widehat{\varphi}$ is defined as - -$$ -\widehat{\varphi} = \frac{\left<\rho \varphi\right>}{\left<\rho \right>}. -$$ (favre-defn) - -The Favre average has many properties in common with with the Reynolds' average, but we note the averages are not interchangable, i.e. $\widehat{\varphi^\prime} \neq 0$. The term in [](#reynolds-example) can now be simplified with [](#favre-defn), i.e. - -$$ -\left<\rho {\bf u}\right> = \left<\rho\right>\widehat{\bf u}. -$$ - -The Favre approach removes the second term that emerges from the traditional Reynolds' approach. Therefore, we adopt Favre averaged variables as the model predicted variables in Omega. - -To help gain an intuition for Favre averaged variables and fluxes, we can relate the Reynolds' average to Favre average by considering the average of $\rho \varphi$. The standard Reynolds' approach gives - -$$ -\left<\rho \varphi\right> = \left<\rho\right>\left<\varphi\right> + \left<\rho^\prime \varphi^\prime\right> -$$ - -Isolating $\left<\varphi\right>$, - -$$ -\left<\varphi\right> = \frac{\left<\rho \varphi\right>}{\left<\rho\right>} + \frac{\left<\rho^\prime \varphi^\prime\right>}{\left<\rho\right>} -$$ - -The first term on the right side of the equation is the definition of a Favre average ([](#favre-defn)), which yields - -$$ -\left<\varphi\right> = \widehat{\varphi} + \frac{\left<\rho^\prime \varphi^\prime\right>}{\left<\rho\right>} -$$ (favre-reynolds-relation) - -Throughout much of the ocean, we expect the second term to be very small as the numerator is most often three orders of magnitude smaller than the denominator, but could be large in highly turbulent regions. - -### Managing Multiple Decompositions - -Within Omega, three distinct decompositions are critical. In the derivation to follow, any term involving a product of spatially varying density and some other quanitity (e.g., $\rho \varphi$) will use a Favre average, terms without the density factor will use the Reynolds' decomposition. The final decomposition is the deviation from the density weighted vertical integral of a generic variable $\varphi$. We decompose the continuous variable $\phi$ following - -$$ -\varphi \equiv \overline{\varphi}^{\tilde{z}}_k + \delta \varphi -$$ (averaging-decomp-definition) - -The density weighted vertical average ([](#def-layer-average)) is the quantity predicted by Omega, but the deviation from this value is potentially critical for operations like reconstruction of variables at layer interfaces or horizontal boundaries. As will become clear, inclusion of the Reynolds' average will also be important for the derivation. - -In our $\tilde{z}$ coordinate system, it is important to note that the Favre average, while apparently similar in structure, is different from the vertical density weighted average given by [](#def-layer-average). The average in the Favre approach is defined relative to a sufficent time or ensemble mean of the model predicted quantity. In this context, sufficient most commonly means a time average over a statistically significant number of eddy turnover times for the quantity being modeled or for the turbulence to equilibrate. - -Omega will predict Favre averaged, density weighted vertically integrated variables and the turbulent fluxes are deviations from this quantity unless denoted by $< . >$ for Reynolds' averaged turbulent fluxes and stresses. - ### Useful Averaging Relationships -Most equations that will be Favre averaged will contain terms of the form $\rho \varphi$. This can be written as - -$$ -\left<\rho \phi\right> = \left<\rho\right>\widehat{\varphi}. -$$ (Favre-relation1) - -Here we have utilized the definition of the Favre average of $\varphi$. Equation [](#Favre-relation1) implies that the model predicted variables in Omega should be interpreted as Favre averaged. Given this, turbulent fluxes should also be Favre averaged. As can be seen in equation [](#tr-vh-split-pseudo), we will have flux terms of the form $\rho \varphi {\mathbf u}$. To gain an intuition for how these terms are treated, we first perform a Favre decomposition, but leave the density as full field. - -$$ -\rho \varphi {\mathbf u} &= \rho \left(\widehat{\varphi} + \varphi^{\prime \prime}\right)\left(\widehat{\mathbf u} + {\mathbf u}^{\prime \prime}\right) \\ - &= \rho \left( \widehat{\varphi}\widehat{\mathbf u} + \varphi^{\prime \prime}\widehat{\mathbf u} + \widehat{\varphi}{\mathbf u}^{\prime \prime} + \varphi^{\prime \prime}{\mathbf u}^{\prime \prime} \right) -$$ - -Following in the spirit of [](#Favre-relation1) and using the fact that a Reynolds' average of a product of perturbation and average is zero, we find - -$$ -\left<\rho \varphi {\mathbf u}\right> &= \left<\rho\widehat{\varphi}\widehat{\mathbf u}\right> + \left<\rho\varphi^{\prime \prime}{\mathbf u}^{\prime \prime}\right> \\ - &= \left<\rho\right>\widehat{\varphi}\widehat{\mathbf u} + \left<\rho\right>\widehat{\varphi^{\prime \prime}{\mathbf u}^{\prime \prime}} -$$ (Favre-relation2) - -Where we have also used the fact that $\left<\widehat{\varphi}\widehat{\mathbf u}\right> = \widehat{\varphi}\widehat{\mathbf u}$ by construction of the Reynolds' averaging operator and definition of the Favre average. The second term utilizes [](#Favre-relation1) to arrive at this form. - -The form in [](#Favre-relation2) allows us to use fluxes that appear similar to a traditional Reynolds' average, but again is distinct although close in magnitude (See [](#favre-reynolds-relation)). - For the decomposition related to vertical averaging, we will encounter terms such as ${\overline \varphi}^{\tilde{z}}_k \delta\varphi$ that need to be vertical averaged. Using [](#def-layer-average) we have $$ @@ -466,17 +384,13 @@ where the last equality is true by definition. ### Summary -In the derivations to follow, the equations will first be Reynolds' averaged and [](#Favre-relation1) will be used. Thus, three decompositions will be critical in this document. The decompositions are summarized as +In this document, two decompositions will be critical in this document. The decompositions are summarized as $$ \varphi = \overline{\varphi}^{\tilde{z}}_k + \delta \varphi $$ -which is a density weighted vertical integral and the deviation from this value. We again note that in the Omega equations, the Favre averaged field will be the quantity that is density weighted vertically averaged. Hence we rewrite the previous equation as - -$$ -\widehat{\varphi} = \overline{\widehat{\varphi}}^{\tilde{z}}_k + \delta \varphi -$$ (vertical-decomposition-favre) +which is a density weighted vertical integral and the deviation from this value. The second decomposition is @@ -484,15 +398,7 @@ $$ \varphi = \left<\varphi\right> + \varphi^\prime $$ -which is the traditional Reynolds' decomposition. This will apply to quantities that don't include the full spatially variable density. - -The final decomposition is - -$$ -\varphi = \widehat{\varphi} + \varphi^{\prime \prime} -$$ - -which is the Favre decomposition. It is important to recall that the prime and double prime variables are different as they are fluctuations relative to different averages. +which is the traditional Reynolds' decomposition. ## 9. Layer Equations @@ -501,52 +407,39 @@ which is the Favre decomposition. It is important to recall that the prime and Substituting [](#w-tilde) into the tracer equation [](#tr-vh-split-pseudo) for layer $k$, we have $$ -\frac{d}{dt} \int_{A} \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho \, \varphi \, dz \, dA +\frac{d}{dt} \int_{A} \int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \varphi \, d\tilde{z} \, dA + -\int_{\partial A} \left( \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho \, \varphi \, {\bf u} \, dz \right) \cdot {\bf n}_\perp \, dl & \\ +\int_{\partial A} \left( \int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \varphi \, {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl & \\ + -\int_{A} \left\{ \rho_0 \varphi \left[\tilde{w} - \tilde{w}_r - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right] \right\}_{z = z^{\text{top}}} \, dA & \\ +\int_{A} \left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right] \right\}_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA & \\ - -\int_{A} \left\{ \rho_0 \varphi \left[\tilde{w} - \tilde{w}_r - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right] \right\}_{z = z^{\text{bot}}}\, dA +\int_{A} \left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right] \right\}_{\tilde{z} = \tilde{z}^{\text{bot}}}\, dA & = 0. $$ (Aintegral-tracer) We first Reynolds' average this equation and given the definition of the operator we can move the averaging past the derivatives and integrals without correction terms to yield $$ -\frac{d}{dt} \int_{A} \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \left<\rho \, \varphi\right> \, dz \, dA +\frac{d}{dt} \int_{A} \int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \left<\varphi\right> \, d\tilde{z} \, dA + -\int_{\partial A} \left( \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \left<\rho \, \varphi \, {\bf u} \right> \, dz \right) \cdot {\bf n}_\perp \, dl & \\ +\int_{\partial A} \left( \int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \left<\varphi \, {\bf u} \right> \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl & \\ + -\int_{A} \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right] \right\}\right>_{z = z^{\text{top}}} \, dA & \\ +\int_{A} \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right] \right\}\right>_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA & \\ - -\int_{A} \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right] \right\}\right>_{z = z^{\text{bot}}}\, dA +\int_{A} \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right] \right\}\right>_{\tilde{z} = \tilde{z}^{\text{bot}}}\, dA & = 0. $$ (Aintegral-tracer-reynolds) In this equation we have also invoked the definition of vertical transport velocity, $\tilde{w}_{tr} \equiv \tilde{w} - \tilde{w}_r$. -Next we use the definition of the Favre average on the first two terms +Next, we use a Reynolds' decomposition on any terms involving products inside a Reynolds' averaged, $$ -\frac{d}{dt} \int_{A} \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \left<\rho\right> \, \widehat{\varphi}\, dz \, dA +\frac{d}{dt} \int_{A} \int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \left<\varphi \right> \, d\tilde{z} \, dA + -\int_{\partial A} \left( \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \left<\rho\right> \, \widehat{\varphi \, {\bf u}} \, dz \right) \cdot {\bf n}_\perp \, dl & \\ +\int_{\partial A} \left( \int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \left(\left<{\varphi}\right>\left<{\bf u}\right> + \left<\varphi^{\prime}{\bf u}^{\prime}\right> \right) d\tilde{z} \right) \, \cdot {\bf n}_\perp \, dl & \\ + -\int_{A} \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right] \right\}\right>_{z = z^{\text{top}}} \, dA & \\ -- -\int_{A} \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right] \right\}\right>_{z = z^{\text{bot}}}\, dA -& = 0. -$$ (Aintegral-tracer-reynolds2) - -Next, we use a Favre decomposition on any products of terms that are Favre averaged and use the Reynolds' decomposition on products of terms that are Reynolds' averaged. - -$$ -\frac{d}{dt} \int_{A} \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \left<\rho\right> \, \widehat{\varphi}\, dz \, dA -+ -\int_{\partial A} \left( \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \left<\rho\right> \, \left(\widehat{\varphi}\widehat{\bf u} + \widehat{\varphi^{\prime \prime}{\bf u}^{\prime \prime}} \right) \right) \, \cdot {\bf n}_\perp \, dl & \\ -+ -\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{top}}} \, dA & \\ +\int_{A} \left\{ \rho_0 \left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{top}}} \, dA & \\ - \int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{bot}}}\, dA & = 0. @@ -555,9 +448,9 @@ $$ (Aintegral-tracer-favre-reynolds) We can rewrite the first two terms in [](#Aintegral-tracer-favre-reynolds) using [](#def-layer-average) and [](#def-layer-average-reynolds) $$ -\frac{d}{dt} \int_A \tilde{h}_k \, \overline{\widehat{\varphi}}^{\tilde{z}}_k \, dA +\frac{d}{dt} \int_A \tilde{h}_k \, \overline{\left<\varphi\right>}^{\tilde{z}}_k \, dA + -\int_{\partial A} \left( \tilde{h}_k \, \overline{\widehat{\varphi} \widehat{{\bf u}} + \widehat{\varphi^{\prime \prime}{\bf u}^{\prime \prime}}}^{\tilde{z}}_k \right) \cdot {\bf n}_\perp \, dl & \\ +\int_{\partial A} \left( \tilde{h}_k \, \overline{\left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime}{\bf u}^{\prime}\right>}^{\tilde{z}}_k d\tilde{z} d\tilde{z} \right) \cdot {\bf n}_\perp \, dl & \\ + \int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{top}}} \, dA & \\ - @@ -568,22 +461,22 @@ $$ (Aintegral-tracer2) The second term is expanded utilizing [](#vertical-decomposition-favre) $$ -\frac{d}{dt} \int_A \tilde{h}_k \, \overline{\widehat{\varphi}}^{\tilde{z}}_k \, dA +\frac{d}{dt} \int_A \tilde{h}_k \, \overline{\left<\varphi\right>}^{\tilde{z}}_k \, dA + -\int_{\partial A} \left( \tilde{h}_k \, \overline{\left(\overline{\widehat{\varphi}}^{\tilde{z}}_k + \delta \varphi\right)\left(\overline{\widehat{\bf u}}^{\tilde{z}}_k + \delta {\bf u}\right)}^{\tilde{z}}_k + \tilde{h}_k \overline{\widehat{\varphi^{\prime \prime}{\bf u}^{\prime \prime}}}^{\tilde{z}}_k \right) \cdot {\bf n}_\perp \, dl & \\ +\int_{\partial A} \left( \tilde{h}_k \, \overline{\left(\overline{\left<\varphi\right>}^{\tilde{z}}_k + \delta \varphi\right)\left(\overline{\left<{\bf u}\right>}^{\tilde{z}}_k + \delta {\bf u}\right)}^{\tilde{z}}_k + \tilde{h}_k \overline{\left<\varphi^{\prime}{\bf u}^{\prime}\right>}^{\tilde{z}}_k \right) \cdot {\bf n}_\perp \, dl & \\ + -\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{top}}} \, dA & \\ +\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA & \\ - -\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{bot}} \right\}_{z = z^{\text{bot}}}\, dA +\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{bot}} \right\}_{\tilde{z} = \tilde{z}^{\text{bot}}}\, dA & = 0 $$ (Aintegral-tracer2) The second term is simplified using [](#delta-vert-average) $$ -\frac{d}{dt} \int_A \tilde{h}_k \, \overline{\widehat{\varphi}}^{\tilde{z}}_k \, dA +\frac{d}{dt} \int_A \tilde{h}_k \, \overline{\left<\varphi\right>}^{\tilde{z}}_k \, dA + -\int_{\partial A} \left[ \tilde{h}_k \, \left(\overline{\widehat{\varphi}}^{\tilde{z}}_k \overline{\widehat{\bf u}}^{\tilde{z}}_k + \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k + \overline{\widehat{\varphi^{\prime \prime}{\bf u}^{\prime \prime}}}^{\tilde{z}}_k \right)\right] \cdot {\bf n}_\perp \, dl & \\ +\int_{\partial A} \left[ \tilde{h}_k \, \left(\overline{\left<\varphi\right>}^{\tilde{z}}_k \overline{\left<{\bf u}\right>}^{\tilde{z}}_k + \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k + \overline{\left<\varphi^{\prime}{\bf u}^{\prime}\right>}^{\tilde{z}}_k \right)\right] \cdot {\bf n}_\perp \, dl & \\ + \int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{top}}} \, dA & \\ - @@ -594,9 +487,9 @@ $$ Given that the horizontal area is not changing in time, we can move the time derivative through the first integral. We also invoke Green's Theorem for the second integral to convert that from a surface integral to an area integral. With these changes, the equation becomes $$ -\int_A \bigl\{ \frac{\partial \tilde{h}_k \, \overline{\widehat{\varphi}}^{\tilde{z}}_k}{\partial t} +\int_A \bigl\{ \frac{\partial \tilde{h}_k \, \overline{\left<\varphi\right>}^{\tilde{z}}_k}{\partial t} + -\nabla \cdot \left[ \tilde{h}_k \, \left(\overline{\widehat{\varphi}}^{\tilde{z}}_k \overline{\widehat{\bf u}}^{\tilde{z}}_k + \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k + \overline{\widehat{\varphi^{\prime \prime}{\bf u}^{\prime \prime}}}^{\tilde{z}}_k \right)\right] & \\ +\nabla \cdot \left[ \tilde{h}_k \, \left(\overline{\left<\varphi\right>}^{\tilde{z}}_k \overline{\left<{\bf u}\right>}^{\tilde{z}}_k + \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k + \overline{\left<\varphi^{\prime}{\bf u}^{\prime}\right>}^{\tilde{z}}_k \right)\right] & \\ + \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{top}}} & \\ - @@ -612,14 +505,14 @@ Finally, given that the area integral operates on the entire equation, it is val tracer: $$ -\frac{\partial {\tilde h}_k \overline{\widehat{\varphi}^{\tilde{z}}_k} }{\partial t} +\frac{\partial {\tilde h}_k \overline{\left<\varphi\right>}^{\tilde{z}}_k }{\partial t} + - \nabla \cdot \left({\tilde h}_k \overline{\widehat{\varphi}}^{\tilde{z}}_k \overline{\widehat{\bf u}}^{\tilde{z}}_k\right) - + \left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> - \left<\varphi\right>\left<{\bf u}\right> \cdot \nabla \tilde{z}^{\text{top}} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} & \\ - - \left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> - \left<\varphi\right>\left<{\bf u}\right> \cdot \nabla \tilde{z}^{\text{top}} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} + \nabla \cdot \left({\tilde h}_k \overline{\left<\varphi\right>}^{\tilde{z}}_k \overline{\left<{\bf u}\right>}^{\tilde{z}}_k\right) + + \rho_0 \left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> - \left<\varphi\right>\left<{\bf u}\right> \cdot \nabla \tilde{z}^{\text{top}} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} & \\ + - \rho_0 \left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> - \left<\varphi\right>\left<{\bf u}\right> \cdot \nabla \tilde{z}^{\text{bot}} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} = & \\ -- \nabla \cdot \left({\tilde h}_k \overline{\widehat{\varphi^{\prime \prime} {\bf u}^{\prime \prime}}}^{\tilde{z}}_k \, + {\tilde h}_k \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right) & \\ -- \left\{\left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime {\bf u}^{\prime}\right> \cdot \nabla \tilde{z}^{\text{top}} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{top}}} - \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime {\bf u}^{\prime}\right> \cdot \nabla \tilde{z}^{\text{bot}}\right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}}\right\}. +- \nabla \cdot \left({\tilde h}_k \overline{\left<\varphi^{\prime} {\bf u}^{\prime}\right>}^{\tilde{z}}_k \, + {\tilde h}_k \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right) & \\ +- \rho_0 \left\{ \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime {\bf u}^{\prime}\right> \cdot \nabla \tilde{z}^{\text{top}} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{top}}} - \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime {\bf u}^{\prime}\right> \cdot \nabla \tilde{z}^{\text{bot}}\right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}}\right\}. $$ (layer-tracer) A few notes on the layer averaged tracer equation. In this complete form, it includes three types of fluctuating quantities that must be dealt with: (1) the vertically density weighted, Favre averaged turbulent flux $\left(\overline{\widehat{\varphi^{\prime \prime} {\bf u}^{\prime \prime}}}^{\tilde{z}}_k \right)$, (2) the Reynolds' average turbulent flux $\left( \left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> \right)$, and (3) the vertical integral of the product of deviations from the layer integrated variables $\left(\overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right)$. The details of the first two quantities will be discussed later in this document and follow on design documents. The terms involving perturbations from the layer integrated quantity are necessary to extend beyond piecewise constant represenation of variables. In this equation, variables with no overline are the full field variable at the interfaces. @@ -631,35 +524,35 @@ The mass equation is identical to the tracer equation with $\varphi=1$. mass: $$ -\frac{d {\tilde h}_k }{d t} +\frac{\partial {\tilde h}_k }{\partial t} + - \nabla \cdot \left({\tilde h}_k \overline{\widehat{\bf u}}^{\tilde{z}}_k\right) - + \left[ \left<{\tilde w}_{tr}\right> - \left<{\bf u}\right> \cdot \nabla \tilde{z}^{\text{top}} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} - - \left[ \left<{\tilde w}_{tr}\right> - \left<{\bf u}\right> \cdot \nabla \tilde{z}^{\text{bot}} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} + \nabla \cdot \left({\tilde h}_k \overline{\left<{\bf u}\right>}^{\tilde{z}}_k\right) + + \rho_0 \left[ \left<{\tilde w}_{tr}\right> - \left<{\bf u}\right> \cdot \nabla \tilde{z}^{\text{top}} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} + - \rho_0 \left[ \left<{\tilde w}_{tr}\right> - \left<{\bf u}\right> \cdot \nabla \tilde{z}^{\text{bot}} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} = 0 $$ (layer-mass) -### Layered Momentum +### Momentum We now derive the horizontal momentum equation in our non-Boussinesq, hydrostatic framework, following the same finite-volume approach used for mass and tracer conservation. We work with a pseudo-height vertical coordinate $\tilde{z}$ as defined in [Pseudo-Height Coordinate Section](pseudo-height). We begin from [](#vh-momentum-pseudo) and specify the body forces ${\bf b}$ and surface forces ${\bf f}$ $$ -\frac{d}{dt} \int_{A} \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho \, {\bf v} \, d\tilde{z} \, dA +\frac{d}{dt} \int_{A} \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} {\bf u} \, d\tilde{z} \, dA &+ -\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho \, {\bf v} \otimes {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ +\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} {\bf u} \otimes {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ &+ -\int_A \rho_0 \, {\bf v} \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +\int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA - -\int_A \rho_0 \, {\bf v} \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ +\int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ &= --\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho \, \left({\bf f} \times \mathbf{u} + \nabla \Phi \right) \, d\tilde{z} \, dA +-\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \left({\bf f} \times \mathbf{u} + \nabla \Phi \right) \, d\tilde{z} \, dA + -\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} p \, d\tilde{z} \right) dl \\ +\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \frac{\rho_0 p}{\rho} \, d\tilde{z} \right) dl \\ &\quad -+ \int_A \left[ p \nabla \tilde{z} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA -- \int_A \left[ p \nabla \tilde{z} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. ++ \int_A \left[ \frac{\rho_0 p}{\rho} \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +- \int_A \left[ \frac{\rho_0 p}{\rho} \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. $$ (vh-momentum-forces) In this equation: @@ -671,186 +564,194 @@ In this equation: As with the tracer derivation, we next Reynolds' average [](#vh-momentum-forces), $$ -\frac{d}{dt} \int_{A} \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left< \rho \, {\bf v} \right> \, d\tilde{z} \, dA +\frac{d}{dt} \int_{A} \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left< {\bf u} \right> \, d\tilde{z} \, dA &+ -\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left< \rho \, {\bf v} \otimes {\bf u} \right> \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ +\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left< {\bf u} \otimes {\bf u} \right> \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ &+ -\int_A \rho_0 \,\left< {\bf v} \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \right> \, dA +\int_A \rho_0 \,\left< {\bf u} \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \right> \, dA - -\int_A \rho_0 \, \left< {\bf v} \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right> \, dA \\ +\int_A \rho_0 \, \left< {\bf u} \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right> \, dA \\ &= --\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho \, \left( \left< {\bf f} \times \mathbf{u} \right> + \left< \nabla \Phi \right> \right) \, d\tilde{z} \, dA +-\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \, \left<\left( {\bf f} \times \mathbf{u} + \nabla \Phi \right) \right> \, d\tilde{z} \, dA + -\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left< p \right> \, d\tilde{z} \right) dl \\ +\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \left< \frac{p}{\rho} \right> \, d\tilde{z} \right) dl \\ &\quad -+ \int_A \left[ \left< p \nabla \tilde{z} \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA -- \int_A \left[ \left< p \nabla \tilde{z} \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. ++ \int_A \left[ \rho_0 \left< \frac{p}{\rho} \nabla \tilde{z}^{\text{top}} \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +- \int_A \left[ \rho_0 \left< \frac{p}{\rho} \nabla \tilde{z}^{\text{top}} \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. $$ (vh-momentum-reynolds1) -Here we have also moved the Reynolds' average through the spatial integrals given the properties of the averaging. - - - - - +Here we have also moved the Reynolds' average through the spatial integrals given the properties of the averaging. Next we do a Reynolds' decomposition, and again assume that $\nabla \tilde{z}$ terms do not contribute to turbulent correlations, this yields +$$ +\frac{d}{dt} \int_{A} \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left< {\bf u} \right> \, d\tilde{z} \, dA +&+ +\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left( \left< {\bf u} \right> \otimes \left< {\bf u} \right> + \left< {\bf u}^\prime \otimes {\bf u}^\prime \right> \right) \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ +&+ +\int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<{\bf u}\right> + \left< {\bf u}^\prime {\bf u}^\prime \right> \right) \cdot \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ +&- +\int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<{\bf u}\right> + \left< {\bf u}^\prime {\bf u}^\prime \right> \right) \cdot \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ +&= +-\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \, \left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right) \, d\tilde{z} \, dA \\ +&+ +\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \, d\tilde{z} \right) dl \\ +&\quad ++ \int_A \left[ \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +- \int_A \left[ \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. +$$ (vh-momentum-reynolds2) -Putting the pressure and stress term into [](h-momentum), and using Gauss' Theorem on the advection, the horizontal momentum equation is +In [](#vh-momentum-reynolds2) we have also used $\alpha = \frac{1}{\rho}$ for notation conciseness. The definition of the layer average ([](#def-layer-average)) is now utilized on terms with vertical integrals to yield $$ -& \frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, {\bf u} \, dz \, dA -+ - \int_{A}\nabla_\perp \cdot \left( \int_{z^{\text{bot}}}^{z^{\text{top}}}\rho\, {\bf u} \otimes {\bf u} \, dz \right) dA - + \int_{A}\left[ \rho\, {\bf u} \left(w - w_r \right) \right]_{z=z^{\text{top}}} \, dA - - \int_{A}\left[ \rho\, {\bf u} \left(w - w_r \right) \right]_{z=z^{\text{bot}}} \, dA -\\ & \; = -- \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, \mathbf{f} \times \mathbf{u} \, dz \, dA -- \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, \nabla_\perp \Phi \, dz \, dA - - \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} - \nabla_{\perp} p \, dz \, dA. -$$ (h-momentum-p-tau) +\frac{d}{dt} \int_{A} \tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \, dA +&+ +\int_{\partial A} \tilde{h}_k \left( \overline{\left< {\bf u} \right> \otimes \left< {\bf u} \right>}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \cdot {\bf n}_\perp \, dl \\ +&+ +\int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<{\bf u}\right> + \left< {\bf u}^\prime {\bf u}^\prime \right> \right) \cdot \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ +&- +\int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<{\bf u}\right> + \left< {\bf u}^\prime {\bf u}^\prime \right> \right) \cdot \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ +&= +-\int_A \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \, dA \\ +&+ +\int_{\partial A} \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right> \left

}^{\tilde{z}}_k + \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right] \right) dl \\ +&\quad ++ \int_A \left[ \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +- \int_A \left[ \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. +$$ (vh-momentum-reynolds-lay-avg) -Dividing by $\rho_0$ and taking vertical averages using [](#def-thickness) and [](#def-pseudo-thickness), +The next step is to decompose vertical averages of products. This yields $$ -\frac{d}{dt} \int_{A} \tilde{h}\, \overline{ {\bf u} }^{\tilde z} \, dA -+ - \int_{A}\nabla_\perp \cdot \left( \tilde{h}\, \overline{{\bf u} \otimes {\bf u} }^{\tilde z} \right) dA -& + \int_{A}\left[ {\bf u}\, \tilde{w}_{tr} \right]_{z=z^{\text{top}}} \, dA - - \int_{A}\left[ {\bf u}\, \tilde{w}_{tr} \right]_{z=z^{\text{bot}}} \, dA -\\ & \; = -- \int_{A} \tilde{h} \,\overline{ \mathbf{f} \times \mathbf{u} }^{\tilde z} \, dA -- \int_{A} \tilde{h} \,\overline{ \nabla_\perp \Phi }^{\tilde z} \, dA -- \int_{A} \frac{1}{\rho_0} \overline{\nabla_{\perp} p}^{z} \, dA -$$ (h-momentum-p-tau) - -Taking the limit as $A \rightarrow 0$, we arrive at the local, horizontally continuous form: - -$$ -\frac{\partial \tilde{h}\, \overline{ {\bf u} }^{\tilde z} }{\partial t} -& + - \nabla_\perp \cdot \left( \tilde{h}\, \overline{{\bf u} \otimes {\bf u} }^{\tilde z} \right) - + \left[ {\bf u}\, \tilde{w}_{tr} \right]_{z=z^{\text{top}}} - - \left[ {\bf u}\, \tilde{w}_{tr} \right]_{z=z^{\text{bot}}} -\\ & = -- \tilde{h} \,\overline{ \mathbf{f} \times \mathbf{u} }^{\tilde z} -- \tilde{h} \,\overline{ \nabla_\perp \Phi }^{\tilde z} -- \frac{1}{\rho_0} \overline{\nabla_{\perp} p}^{z} -$$ (momentum-layered-differential-1) - -The first two terms are the material derivative, confined within the horizontal layer. Using the product rule, and layered mass conservation [](#layer-mass), - -$$ -\frac{\partial \tilde{h}\, \overline{ {\bf u} }^{\tilde z} }{\partial t} -+ \nabla_\perp \cdot \left( \tilde{h}\, \overline{{\bf u} \otimes {\bf u} }^{\tilde z} \right) -&= -\frac{D_\perp \tilde{h}\, \overline{ {\bf u} }^{\tilde z} }{D t} \\ -&= -\tilde{h}\frac{D_\perp \overline{ {\bf u} }^{\tilde z} }{D t} -+ -\overline{ {\bf u} }^{\tilde z} \frac{D_\perp \tilde{h}}{D t} \\ +\frac{d}{dt} \int_{A} \tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \, dA +&+ +\int_{\partial A} \tilde{h}_k \left( \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \otimes \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \cdot {\bf n}_\perp \, dl \\ +&+ +\int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<{\bf u}\right> + \left< {\bf u}^\prime {\bf u}^\prime \right> \right) \cdot \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ +&- +\int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<{\bf u}\right> + \left< {\bf u}^\prime {\bf u}^\prime \right> \right) \cdot \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ &= -\tilde{h}\left( - \frac{\partial \overline{ {\bf u} }^{\tilde z} }{\partial t} -+ \nabla_\perp \cdot \left( \overline{{\bf u} \otimes {\bf u} }^{\tilde z} \right) \right) -- \overline{ {\bf u} }^{\tilde z} \left( - \left[ {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} - - \left[ {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} -\right) -$$ (2D-material-der-product) +-\int_A \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \, dA \\ +&+ +\int_{\partial A} \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] dl \\ +&\quad ++ \int_A \left[ \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +- \int_A \left[ \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. +$$ (vh-momentum-reynolds-lay-avg2) -We now substitute [](#2D-material-der-product) into [](#momentum-layered-differential-1) and divide by $\tilde h$ to get +We next use the Divergence theorem on the surface integrals and combine terms into fewer integrals on each side of the equation. $$ - \frac{\partial \overline{ {\bf u} }^{\tilde z} }{\partial t} -+ \nabla_\perp \cdot \left( \overline{{\bf u} \otimes {\bf u} }^{\tilde z} \right) -& + \frac{\left[ {\bf u}\, \tilde{w}_{tr} \right]_{z=z^{\text{top}}} - - \left[ {\bf u}\, \tilde{w}_{tr} \right]_{z=z^{\text{bot}}} }{\tilde h} -- \frac{\overline{ {\bf u} }^{\tilde z}}{\tilde{h}} \left( - \left[ {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} - - \left[ {\tilde w}_{tr} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}}\right) -\\ & = -- \overline{ \mathbf{f} \times \mathbf{u} }^{\tilde z} -- \overline{ \nabla_\perp \Phi }^{\tilde z} -- \frac{1}{\rho_0 \, \tilde{h}} \overline{\nabla_{\perp} p}^{z} -$$ (momentum-layered-differential-2) +\int_{A} \bigl\{ \frac{\partial\tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} +&+ +\nabla \cdot \left[ \tilde{h}_k \left(\overline{\left< {\bf u} \right>}^{\tilde{z}}_k \otimes \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ +&+ +\rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<{\bf u}\right> + \left< {\bf u}^\prime {\bf u}^\prime \right> \right) \cdot \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ +&- +\rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<{\bf u}\right> + \left< {\bf u}^\prime {\bf u}^\prime \right> \right) \cdot \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \bigr\} \, dA \\ +&= +-\int_A \bigl\{ \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ +&+ +\nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ +&\quad ++ \left[ \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} +- \left[ \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}\bigr\} \, dA. +$$ (vh-momentum-reynolds-lay-avg3) -Note that the coefficient of the pressure gradient and stress tensor can be rewritten as +Since the equation is fully inside the integral, the equation is true for any area and therefore we can write the layer averaged momentum equation as $$ -\frac{1}{\rho_0 \, \tilde{h}} = -\frac{1}{\rho_0 \,\frac{1}{\rho_0} \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho dz} -= \frac{1} {\overline{\rho}^z} -= \overline{\alpha}^z, -$$ (grad-p-coeff) +\frac{\partial\tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} +&+ +\nabla \cdot \left[ \tilde{h}_k \left( \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \otimes \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ +&+ +\rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<{\bf u}\right> + \left< {\bf u}^\prime {\bf u}^\prime \right> \right) \cdot \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ +&- +\rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<{\bf u}\right> + \left< {\bf u}^\prime {\bf u}^\prime \right> \right) \cdot \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \\ +&= +\rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ +&+ +\nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ +&\quad ++ \left[ \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} +- \left[ \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. +$$ (vh-momentum-v1) -where $\alpha$ is the specific volume. -Gathering the vertical advection terms, [](#momentum-layered-differential-2) becomes +The product rule is used on the first two terms of [](#vh-momentum-v1) and then we multiply [](#layer-mass) by $\overline{\mathbf{u}}^{\tilde{z}}_k$ and subtract it from [](#vh-momentum-v1). This yields $$ - \frac{\partial \overline{ {\bf u} }^{\tilde z} }{\partial t} - + \nabla_\perp \cdot \left( \overline{{\bf u} \otimes {\bf u} }^{\tilde z} \right) -& -+ \left( \nabla_\perp \cdot {\bf u} \right) {\bf u} -+ \frac{1}{\tilde h}\left( - \left[ {\bf u}\right]_{z=z^{\text{top}}}-\overline{ {\bf u} }^{\tilde z}\right) \, \left[\tilde{w}_{tr} \right]_{z=z^{\text{top}}} - - - \frac{1}{\tilde h}\left( - \left[ {\bf u}\right]_{z=z^{\text{bot}}}-\overline{ {\bf u} }^{\tilde z}\right) \, \left[\tilde{w}_{tr} \right]_{z=z^{\text{bot}}} -\\ & = -- \overline{ \mathbf{f} \times \mathbf{u} }^{\tilde z} -- \overline{ \nabla_\perp \Phi }^{\tilde z} -- \overline{\alpha}^z \overline{\nabla_{\perp} p}^{z} -$$ (momentum-layered-differential-3) +\tilde{h}_k \frac{\partial \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} +&+ +\tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \cdot \nabla \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \nabla \cdot \left[ \tilde{h}_k \left(\overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ +&+ +\rho_0 \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{ \left[ \left<\tilde{w}_{tr}\right> - \left<\mathbf{u}\right> \cdot \nabla \tilde{z}^{top} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\tilde{w}_{tr}\right> - \left<\mathbf{u}\right> \cdot \nabla \tilde{z}^{bot} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +&+ +\rho_0 \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \mathbf{u}^\prime \right> \cdot \nabla \tilde{z}^{top}\right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \mathbf{u}^\prime \right> \cdot \nabla \tilde{z}^{bot}\right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +&= +\rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ +&+ +\nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ +&\quad ++ \left[ \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} +- \left[ \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. +$$ (vh-momentum-v2) -In addition, the horizontal advection may be rewritten as +The previous equation is divided by $\tilde{h}_k$, $$ -\nabla_\perp \cdot \left( {\bf u} \otimes {\bf u} \right) +\frac{\partial \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} +&+ +\overline{\left< {\bf u} \right>}^{\tilde{z}}_k \cdot \nabla \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \frac{1}{\tilde{h}_k} \nabla \cdot \left[ \tilde{h}_k \left(\overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ +&+ +\frac{\rho_0}{\tilde{h}_k} \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{ \left[ \left<\tilde{w}_{tr}\right> - \left<\mathbf{u}\right> \cdot \nabla \tilde{z}^{top} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\tilde{w}_{tr}\right> - \left<\mathbf{u}\right> \cdot \nabla \tilde{z}^{bot} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +&+ +\frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \mathbf{u}^\prime \right> \cdot \nabla \tilde{z}^{top}\right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \mathbf{u}^\prime \right> \cdot \nabla \tilde{z}^{bot}\right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ &= -\nabla_\perp \cdot \left( {\bf u} {\bf u}^T \right) \\ -&= \left( \nabla_\perp \cdot {\bf u} \right) {\bf u} -+ {\bf u} \cdot \nabla_\perp {\bf u} -$$ (adv2d-prod) +\rho_0 \, \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ +&+ +\frac{1}{\tilde{h}_k} \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ +&\quad ++ \left[ \frac{\rho_0}{\tilde{h}_k} \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} +- \left[ \frac{\rho_0}{\tilde{h}_k} \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. +$$ (vh-momentum-v3) -The term ${\bf u} \cdot \nabla_\perp {\bf u}$ may be replaced with the vector identity + +The $\overline{\bf u}^{\tilde{z}}_k \cdot \nabla \overline{\bf u}^{\tilde{z}}_k$ may be replaced with the vector identity $$ \begin{aligned} -{\bf u} \cdot \nabla_\perp{\bf u} -&= (\nabla_\perp\times {\bf u}) \times {\bf u} + \nabla_\perp\frac{|{\bf u}|^2}{2} \\ -&= \left( \boldsymbol{k} \cdot (\nabla_\perp\times {\bf u})\right) -\left( \boldsymbol{k} \times {\bf u} \right) + \nabla_\perp\frac{|{\bf u}|^2}{2} \\ -&= \zeta {\bf u}^{\perp} + \nabla_\perp K, +\overline{\left<{\bf u}\right>}^{\tilde{z}}_k \cdot \nabla \overline{\left<{\bf u}\right>}^{\tilde{z}}_k +&= (\nabla \times \overline{\left<{\bf u}\right>}^{\tilde{z}}_k) \times \overline{\left<{\bf u}\right>}^{\tilde{z}}_k + \nabla \frac{\left|\overline{\left<{\bf u}\right>}^{\tilde{z}}_k\right|^2}{2} \\ +&= \left( \hat{k} \cdot (\nabla_\perp\times \overline{\left<{\bf u}\right>}^{\tilde{z}}_k)\right) +\left( \hat{k} \times \overline{\left<{\bf u}\right>}^{\tilde{z}}_k \right) + \nabla_\perp\frac{\left|\overline{\left<{\bf u}\right>}^{\tilde{z}}_k\right|^2}{2} \\ +&= \zeta {\overline{\left<{\bf u}\right>}^{\tilde{z}}_k}^{\perp} + \nabla K. \end{aligned} $$ (advection-identity) -where $\zeta$ is relative vorticity and $K$ is kinetic energy. -This step separates the horizontal advection into non-divergent and non-rotational components, which is useful in the final TRiSK formulation. +where $\zeta$ is relative vorticity and $K$ is kinetic energy. This step separates the horizontal advection into non-divergent and non-rotational components, which is useful in the final TRiSK formulation. -Now [](#momentum-layered-differential-3) becomes +The Coriolis term in [](#vh-momentum-v3), when projected into a local coordinate system can be written as $$ - \frac{\partial \overline{ {\bf u} }^{\tilde z} }{\partial t} - + - \left( \zeta + f \right) {\overline{ {\bf u} }^{\tilde z}}^\perp -& -+ \left( \nabla_\perp \cdot {\bf u} \right) {\bf u} -+ \frac{1}{\tilde h}\left( - \left[ {\bf u}\right]_{z=z^{\text{top}}}-\overline{ {\bf u} }^{\tilde z}\right) \, \left[\tilde{w}_{tr} \right]_{z=z^{\text{top}}} - - - \frac{1}{\tilde h}\left( - \left[ {\bf u}\right]_{z=z^{\text{bot}}}-\overline{ {\bf u} }^{\tilde z}\right) \, \left[\tilde{w}_{tr} \right]_{z=z^{\text{bot}}} -\\ & = -- \nabla_\perp K -- \overline{ \nabla_\perp \Phi }^{\tilde z} -- \overline{\alpha}^z \overline{\nabla_{\perp} p}^{z} -$$ (momentum-layered-differential-4) - -Notes from Mark: - -1. I don't know what to do with the z-average in the advection term of [](#momentum-layered-differential-2) and here. In the mean time, I'll just skip to the layer-averaged terms. -2. I don't know what to make of the $\left( \nabla_\perp \cdot {\bf u} \right) {\bf u}$ term, and whether it cancels with some of those odd vertical transport terms. +{\bf f} \times \left<\mathbf{u}\right> = f \left<\mathbf{u}\right>^\perp + 2 \Omega \tilde{w}_{tr} \cos \phi +$$ (coriolis-expansion) + +We expect the second term above to be negligible for the ocean. Ocean vertical velocities are largest ($\approx 10$ cm) in the high latitudes, where $\cos \phi$ is small. Further, these large vertical velocities only arise in non-hydrostatic ocean models. Therefore we expect this second term to always be small in Omega and will neglect it. + +Defining the absolute vorticity $\zeta_a$ as $\zeta + f$, where $f$ is the Coriolis parameter, which results from [](#coriolis-expansion), [](#vh-momentum-v3) becomes, + +$$ +\frac{\partial \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} +&+ + \zeta_a {\overline{\left<{\bf u}\right>}^{\tilde{z}}_k}^{\perp} + \nabla K + \frac{1}{\tilde{h}_k} \nabla \cdot \left[ \tilde{h}_k \left(\overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ +&+ +\frac{\rho_0}{\tilde{h}_k} \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{ \left[ \left<\tilde{w}_{tr}\right> - \left<\mathbf{u}\right> \cdot \nabla \tilde{z}^{top} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\tilde{w}_{tr}\right> - \left<\mathbf{u}\right> \cdot \nabla \tilde{z}^{bot} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +&+ +\frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \mathbf{u}^\prime \right> \cdot \nabla \tilde{z}^{top}\right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \mathbf{u}^\prime \right> \cdot \nabla \tilde{z}^{bot}\right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +&= +\rho_0 \, \overline{\nabla \left<\Phi\right>}^{\tilde{z}}_k + \frac{1}{\tilde{h}_k} \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ +&\quad ++ \left[ \frac{\rho_0}{\tilde{h}_k} \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} +- \left[ \frac{\rho_0}{\tilde{h}_k} \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. +$$ (layer-momentum-final) From 6f9ac654874a6a5f2280cc058931fea041126503 Mon Sep 17 00:00:00 2001 From: vanroekel Date: Tue, 8 Jul 2025 21:54:04 -0700 Subject: [PATCH 47/65] cleans up extra ending sections --- .../omega/doc/design/OmegaV1GoverningEqns.md | 645 +----------------- 1 file changed, 9 insertions(+), 636 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 3fc2afc1b9d1..1d93356a5e4a 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -743,7 +743,7 @@ $$ &+ \zeta_a {\overline{\left<{\bf u}\right>}^{\tilde{z}}_k}^{\perp} + \nabla K + \frac{1}{\tilde{h}_k} \nabla \cdot \left[ \tilde{h}_k \left(\overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ &+ -\frac{\rho_0}{\tilde{h}_k} \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{ \left[ \left<\tilde{w}_{tr}\right> - \left<\mathbf{u}\right> \cdot \nabla \tilde{z}^{top} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\tilde{w}_{tr}\right> - \left<\mathbf{u}\right> \cdot \nabla \tilde{z}^{bot} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +\frac{\rho_0}{\tilde{h}_k} \left\{ \left[\left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{\left<\tilde{w}_{tr}\right> - \left<\mathbf{u}\right> \cdot \nabla \tilde{z}^{top} \right\} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{\left<\tilde{w}_{tr}\right> - \left<\mathbf{u}\right> \cdot \nabla \tilde{z}^{bot} \right\} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ &+ \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \mathbf{u}^\prime \right> \cdot \nabla \tilde{z}^{top}\right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \mathbf{u}^\prime \right> \cdot \nabla \tilde{z}^{bot}\right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ &= @@ -753,183 +753,14 @@ $$ - \left[ \frac{\rho_0}{\tilde{h}_k} \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. $$ (layer-momentum-final) +## 10. Discrete Equations +Next things to do -- -### Xylar: Horizontal Velocity Equation - -We now derive a prognostic equation for the layer-averaged horizontal velocity, starting from the horizontal momentum and mass conservation equations. The goal is to express the equation in terms of the velocity field $\overline{\mathbf{u}}^{\tilde{z}}$ and to isolate the nonlinear advection term in a standard form that can be further decomposed using vector identities. - -Let us define the layer-averaged velocity as - -$$ -\mathbf{U}(x, y, t) \equiv \overline{\mathbf{u}}^{\tilde{z}}. -$$ (layer-avg-velocity) - -We begin with the horizontally continuous, layer-integrated horizontal momentum equation [](momentum-layered): - -$$ -\begin{aligned} -\frac{\partial}{\partial t} \left( \tilde{h}\, \mathbf{U} \right) -&+ \nabla_z \cdot \left( \tilde{h}\, \overline{\mathbf{u} \otimes \mathbf{u}}^{\tilde{z}} \right) \\ -&+ \left[ \mathbf{u} \tilde{w}_{tr} \right]_{\tilde{z}^{\text{top}}} -- \left[ \mathbf{u} \tilde{w}_{tr} \right]_{\tilde{z}^{\text{bot}}} \\ -&= -- \int_{V(t)} \rho\, \mathbf{f} \times \mathbf{u} \, dV -- \tilde{h}\, \overline{ \mathbf{f} \times \mathbf{u} + \nabla_z \Phi }^{\tilde{z}} \\ -&\quad - \frac{1}{\rho_0}\nabla_z \left( \int_{{z}^{\text{bot}}}^{{z}^{\text{top}}} p \, d{z} \right) -- \frac{1}{\rho_0}\left[ p \nabla_z \tilde{z} \right]_{\tilde{z}^{\text{top}}} -+ \frac{1}{\rho_0}\left[ p \nabla_z \tilde{z} \right]_{\tilde{z}^{\text{bot}}} \\ -&\quad + \frac{1}{\rho_0}\nabla_z \cdot \left( \int_{{z}^{\text{bot}}}^{{z}^{\text{top}}} \boldsymbol{\tau}_h \, d{z} \right) -+ \frac{1}{\rho_0}\left[ \boldsymbol{\tau}_h^z \right]_{\tilde{z}^{\text{top}}} -- \frac{1}{\rho_0}\left[ \boldsymbol{\tau}_h^z \right]_{\tilde{z}^{\text{bot}}} -\end{aligned} -$$ (momentum-velocity-start) - -We also have the mass conservation equation [](layer-mass): - -$$ -\frac{\partial \tilde{h}}{\partial t} -+ \nabla_z \cdot ({\tilde h} \mathbf{U}) -+ \left[ \tilde{w}_{tr} \right]_{\tilde{z}^{\text{top}}} -- \left[ \tilde{w}_{tr} \right]_{\tilde{z}^{\text{bot}}} -= 0. -$$ (mass-conservation-repeated) - -Multiplying the mass conservation equation by $\mathbf{U}$ and subtracting it from the momentum equation eliminates time derivatives of $h$ and isolates the evolution of velocity. After simplification, we obtain: - -$$ -\begin{aligned} -\tilde{h} \left( -\frac{\partial \mathbf{U}}{\partial t} -+ \mathbf{U} \cdot \nabla_z \mathbf{U} -\right) -&+ \left[ \mathbf{u} \tilde{w}_{tr} \right]_{\tilde{z}^{\text{top}}} -- \mathbf{U} \left[ \tilde{w}_{tr} \right]_{\tilde{z}^{\text{top}}} \\ -&- \left[ \mathbf{u} \tilde{w}_{tr} \right]_{\tilde{z}^{\text{bot}}} -+ \mathbf{U} \left[ \tilde{w}_{tr} \right]_{\tilde{z}^{\text{bot}}} -= \text{(forces)} -\end{aligned} -$$ (velocity-eq-general) - -The term $ \mathbf{U} \cdot \nabla_z \mathbf{U} $ may be rewritten using a standard vector identity: - -$$ -\mathbf{U} \cdot \nabla_z \mathbf{U} -= \nabla_z \left( \frac{1}{2} |\mathbf{U}|^2 \right) -+ (\nabla_z \times \mathbf{U}) \times \mathbf{U} = \nabla_z K + \zeta \times \mathbf{U}, -$$ (velocity-vector-identity) -where $K$ is the kinetic energy per unit mass and $\zeta$ is the relative voriticity. - -This decomposition splits the nonlinear advection into a **potential** component (gradient of kinetic energy) and a **rotational** component (advection by relative vorticity). - -We now combine the relative vorticity term $\zeta \times \mathbf{U}$ with the vertically averaged Coriolis force term $\overline{\mathbf{f} \times \mathbf{u}}^{\tilde{z}}$. If we assume that the Coriolis vector $\mathbf{f}$ is uniform within the layer or varies slowly enough to justify replacing $\mathbf{u}$ with its vertical average $\mathbf{U}$, then the two terms may be added directly. This gives rise to a term of the form $\boldsymbol{\eta} \times \mathbf{U}$, where the **absolute vorticity** is defined as - -$$ -\boldsymbol{\eta} = \zeta + \mathbf{f}. -$$ (absolute-vorticity) - -This substitution makes the rotational part of the velocity equation appear in its familiar form from geophysical fluid dynamics, emphasizing the role of absolute vorticity in governing the curvature and rotation of horizontal flow. Substituting into [](velocity-eq-general) and returning to the $\overline{\mathbf{u}}^{\tilde{z}}$ notation yields: - -$$ -\begin{aligned} -\frac{\partial \overline{\mathbf{u}}^{\tilde{z}}}{\partial t} -+ \nabla_z K -+ \boldsymbol{\eta} \times \overline{\mathbf{u}}^{\tilde{z}} -&= \overline{ \nabla_z \Phi }^{\tilde{z}} \\ -&\quad - \frac{1}{\rho_0{\tilde h}} \nabla_z \left( \int_{{z}^{\text{bot}}}^{{z}^{\text{top}}} p\, d{z} \right) -- \frac{1}{\rho_0{\tilde h}} \left[ p \nabla_z \tilde{z} \right]_{\tilde{z}^{\text{top}}} -+ \frac{1}{\rho_0{\tilde h}} \left[ p \nabla_z \tilde{z} \right]_{\tilde{z}^{\text{bot}}} \\ -&\quad + \frac{1}{\rho_0{\tilde h}} \nabla_z \cdot \left( \int_{{z}^{\text{bot}}}^{{z}^{\text{top}}} \boldsymbol{\tau}_h \, d{z} \right) -+ \frac{1}{\rho_0{\tilde h}} \left[ \boldsymbol{\tau}_h^z \right]_{\tilde{z}^{\text{top}}} -- \frac{1}{\rho_0{\tilde h}} \left[ \boldsymbol{\tau}_h^z \right]_{\tilde{z}^{\text{bot}}} \\ -&\quad + \frac{1}{\tilde h} \sum_{i = \text{top, bot}} \left[ (\mathbf{u} - \overline{\mathbf{u}}^{\tilde{z}}) \tilde{w}_{tr} \right]_i -\end{aligned} -$$ (velocity-layered) - -This is a prognostic equation for the layer-averaged horizontal velocity, written in a form familiar from geophysical fluid dynamics. The right-hand side includes the horizontal pressure gradient, gravitational body force, divergence of horizontal and vertical stresses, and corrections due to unresolved vertical momentum exchange. - -### General Vertical Coordinate - -The vertical layer interfaces $(z_k^{bot}, z_k^{top})$ (or equivalently $(p_k^{bot}, p_k^{top})$) can vary as a function of $(x,y,t)$. Thus, these equations describe a general vertical coordinate, and these interface surfaces may be chosen arbitrarily by the user. See [Adcroft and Hallberg 2006](https://www.sciencedirect.com/science/article/pii/S1463500305000090) Section 2 and [Griffies et al (2000)](http://sciencedirect.com/science/article/pii/S1463500300000147) Section 2. It is convenient to introduce a new variable, the coordinate $r(x,y,z,t)$, where $r$ is constant at the middle of each layer. To be specific, we could design $r$ to be the layer index $k$ at the mid-depth of the layer. That is, define the mid-depth as - -$$ -z_k^{mid}(x,y,t) = \frac{z_k^{bot}(x,y,t) + z_k^{top}(x,y,t)}{2} -$$ (def-z) -and generate the function $r$ such that - -$$ -r(x,y,z_k^{mid}(x,y,t),t) = k -$$ (def-r) -and interpolate linearly in the vertical between mid-layers. When we write the layered form of the equations, we must take into account of the tilted layers using the chain rule. - -We now rewrite derivatives in order to convert from horizontal coordinates to tilted coordinates. Let $(x,y)$ be the original horizontal coordinates, which are perpendicular to $z$, and the horizontal gradient be written as $\nabla_z=(\partial/\partial x, \partial/\partial y)$, as above. Now define a tilted coordinate system using the layers defined by $r$, where the within-layer horizontal coordinates are $(x',y')$ and the along-layer gradient is written as $\nabla_r=(\partial/\partial x', \partial/\partial y')$. We construct $r$ to be monotonic in $z$, so we can invert it as $z(x',y',r,t)$. Now horizontal derivatives along the tilted direction $x'$ for any field $\varphi(x,y,z,t)$ can be expanded using the chain rule as - -$$ -\frac{\partial }{\partial x'} \left[ \varphi(x(x'),y(y'),z(x',y',r,t),t) \right] -= \frac{\partial \varphi}{\partial x}\frac{\partial x}{\partial x'} + \frac{\partial \varphi}{\partial z} \frac{\partial z}{\partial x'} -$$ (dvarphidx) - -We may define the tilted horizontal variable $x'$ as we please. The simplest definition is $x'(x)\equiv x$. Then $\partial x / \partial x'=1$. Rearranging [](#dvarphidx) and repeating for $y$, - -$$ -\begin{aligned} -\frac{\partial \varphi}{\partial x} &= -\frac{\partial \varphi}{\partial x'} -- \frac{\partial \varphi}{\partial z} \frac{\partial z}{\partial x'}\\ -\frac{\partial \varphi}{\partial y} &= -\frac{\partial \varphi}{\partial y'} -- \frac{\partial \varphi}{\partial z} \frac{\partial z}{\partial y'}. -\end{aligned} -$$ (dvarphidxy) - -This may be written in vector form as - -$$ -\nabla_z \varphi = \nabla_r \varphi - \frac{\partial \varphi}{\partial z} \nabla_r z. -$$ (dvarphidnabla) - -### Pressure Gradient - -For most terms, we can safely assume $\nabla_z \approx \nabla_r$ because the vertical to horizontal aspect ratio even at very high horizontal resolution is on the order of $\epsilon ~ 10^{-3}$ (thought may need to re-assess this assumption if we decide to use strongly sloped layers). This applies, for example, to the curl operator uset to compute the relative vorticity and the gradient applied to the kinetic energy in [](z-integration-momentum). - -The exception is the pressure gradient term. This is becasue strong vertical and week horizontal pressure gradients mean that both terms in the chain rule [](dvarphidnabla) are of the same order and must be retained. Substituting pressure for $\varphi$ in [](#dvarphidnabla), - -$$ -\begin{aligned} --\frac{1}{\rho} \nabla_z p -&=-\frac{1}{\rho} \nabla_r p +\frac{1}{\rho} \frac{\partial p}{\partial z} \nabla_r z \\ -&=-\frac{1}{\rho} \nabla_r p - g \nabla_r z \\ -&=-v \nabla_r p - \nabla_r \Phi_g\\ -\end{aligned} -$$ (gradp) - -where we have substituted hydrostatic balance [](hydrostatic-balance), specific volume $\alpha\equiv 1/\rho$, and $\Phi_g=gz$. - -The general form of the geopotential may include the Earth's gravity, tidal forces, and self attraction and loading (SAL), and may be written as - -$$ -\Phi = \Phi_g + \Phi_{tides} + \Phi_{SAL} + c -$$ (def-geopotential) - -where $c$ is an arbitrary constant. Therefore, the pressure gradient and geopotential gradient may be written together as - -$$ -\begin{aligned} --v \nabla_z p - \nabla_z \Phi -&= -v \nabla_z p - \nabla_z \Phi_{tides} - \nabla_z \Phi_{SAL}\\ -&=-v \nabla_r p - \nabla_r \Phi_g - \nabla_r \Phi_{tides} - \nabla_r \Phi_{SAL}\\ -&=-v \nabla_r p - \nabla_r \Phi. \\ -\end{aligned} -$$ (gradp-gradphi) - -On the first line, note that $\nabla_z \Phi_g=\nabla_z gz=0$. For tides and SAL we assume that these forces do not vary in the vertical due to the small aspect ratio of the ocean, so that the vertical derivative in the expansion [](dvarphidnabla) is zero. This means that $\nabla_z \Phi_{tides}=\nabla_r \Phi_{tides}$ and $\nabla_z \Phi_{SAL}=\nabla_r \Phi_{SAL}$. -For versions 1.0 and 2.0 of Omega we only consider a constant gravitational force, and will not include tides and SAL. Further details will be provided in the forthcoming pressure gradient design document. - -See [Adcroft and Hallberg 2006](https://www.sciencedirect.com/science/article/pii/S1463500305000090) eqn. 1 and [Griffies et al](http://sciencedirect.com/science/article/pii/S1463500300000147) eqn 2 for additional examples of the pressure gradient in tilted coordinates. The additional terms due to the expansion of $\nabla_z$ to $\nabla_r$ in the rest of the equations are small and are ignored. - -Some publications state that the transition from Boussinesq to non-Boussinesq equations is accompanied by a change from z-coordinate to pressure-coordinates. However, we use a general vertical coordinate, so the vertical may be referenced to $z$ or $p$. In a purely z-coordinate model like POP, only the $\nabla p$ term is used in [](gradp). In a purely p-coordinate model, only $\nabla z$ remains, as described in [de Szoeke and Samelson 2002](https://journals.ametsoc.org/view/journals/phoc/32/7/1520-0485_2002_032_2194_tdbtba_2.0.co_2.xml). In a general vertical coordinate model the layer interface placement is up to the user's specification, and so both terms are kept. - -## 5. Discrete Equations +1. need to discuss assumptions on terms like $\delta \mathbf{u} \otimes \mathbf{u}$ +2. drop all the $<>$ just for simplicity except on the turbulent fluxes +3. clean the section to be less MPAS-O +4. clearly say what is happening with the fluxes and the projection into the vertical. The horizontally discretized layered equations are as follows. We have dropped the $r$ in $\nabla_r$ for conciseness, and the operator $\nabla$ from here on means within-layer. @@ -1160,7 +991,7 @@ $$ (mpaso-continuous-tracer) The layer thickness $h$, vertical velocity $w$, pressure $p$, and tracer $\varphi$, are cell-centered quantities, while the horizontal velocity ${\bf u}$ and $e$ superscript are variables interpolated to the cell edges. -## 6. Variable Definitions +## 11. Variable Definitions Table 1. Definition of variables. Geometric variables may be found in the [Omega V0 design document, Table 1](OmegaV0ShallowWater.md#variable-definitions) @@ -1214,7 +1045,7 @@ Table 1. Definition of variables. Geometric variables may be found in the [Omega |$\omega$ | mass transport | kg/s/m^2 | cell | VerticalTransport |$\omega=\rho w$| -## 7. Verification and Testing +## 12. Verification and Testing Capability and testing are similar to [Petersen et al. 2015](http://www.sciencedirect.com/science/article/pii/S1463500314001796). The following tests are in idealized domains and do not require surface fluxes or surface restoring. For the following tests to show results comparable to those published with other models, the full dynamic sequence of density, pressure, momentum, and advection must work correctly. The successful completion of the following tests is a validation of the primitive equation functions in Omega 1.0. All of the following tests may exercise a linear equation of state or the nonlinear TEOS10. The first four tests quantify the anomalous mixing caused by the numerical schemes. The first five are on cartesian planes with regular hexagon meshes. @@ -1254,461 +1085,3 @@ This section is for references without webpage links. These are mostly textbooks - Pedlosky, J. (1987). Geophysical Fluid Dynamics (Vol. 710). Springer. - Vallis, G. K. (2017). Atmospheric and oceanic fluid dynamics. Cambridge University Press. -## OLD: Continuous Equations - -The continuous form of the conservation equations are as follows. See [Kundu et al. 2016](https://doi.org/10.1016/C2012-0-00611-4), chapter 4, eqns 4.7 and 4.22 or the [MOM5 manual](https://mom-ocean.github.io/assets/pdfs/MOM5_manual.pdf) eqn 7.7. This is before any assumptions are made, so this is a compressible, non-hydrostatic, non-Boussinesq fluid. Here all variables are a function of $(x,y,z)$, ${\bf u}_{3D}$ denotes the three-dimensional velocity vector, ${\bf u}_{3D} \otimes {\bf u}_{3D} = {\bf u}_{3D}{\bf u}_{3D}^T$ is the tensor product, $\nabla_{3D}$ is the three-dimensional gradient, $D/Dt$ is the material derivative, and other variables defined in the [Variable Definition Section](#variable-definitions) below. - -momentum: - -$$ -\frac{D \rho {\bf u}_{3D} }{D t} \equiv -\frac{\partial \rho {\bf u}_{3D}}{\partial t} - + \nabla_{3D} \cdot \left( \rho {\bf u}_{3D} \otimes {\bf u}_{3D} \right) - = - \nabla_{3D} p - - \rho \nabla_{3D} \Phi -+ \rho {\bf D}^u_{3D} + \rho {\bf F}^u_{3D} -$$ - -mass: - -$$ -\frac{D \rho}{D t} \equiv -\frac{\partial \rho }{\partial t} - + \nabla_{3D} \cdot \left( \rho {\bf u}_{3D} \right) -= 0 -$$ - -tracers: - -$$ -\frac{D \rho \varphi }{D t} \equiv -\frac{\partial \rho \varphi}{\partial t} - + \nabla_{3D} \cdot \left( \rho \varphi {\bf u}_{3D} \right) -= D^\varphi + Q^\varphi -$$ - -Here we have express the following terms as a general operators, with examples of specific forms provided below: the dissipation ${\bf D}^u$, momentum forcing ${\bf F}^u$, tracer diffusion $D^\varphi$, and tracer sources and sinks $Q^\varphi$. The graviational potential, $\Phi$, is written in a general form, and may include Earth's gravity, tidal forces, and self attraction and loading. - -## OLD: Momentum Equations - -Geophysical fluids such as the ocean and atmosphere are rotating and stratified, and horizontal velocities are orders of magnitude larger than vertical velocities. It is therefore convenient to separate the horizontal and vertical as ${\bf u}_{3D} = \left( {\bf u}, w \right)$ and $\nabla_{3D} = \left( \nabla_z, d/dz \right)$ where $z$ is the vertical direction in a local Cartesian coordinate system aligned with gravity (approximately normal to Earth's surface), and $w$ is the vertical velocity. The $z$ subscript on $\nabla_z$ is to remind us that this is the true horizontal gradient (perpendicular to $z$), as opposed to gradients within tilted layers used in the following section. The Earth's gravitational force is included as $\Phi_g = gz $ so that $ \nabla_{3D} \Phi_g = g{\bf k}$. The rotating frame of reference results in the Coriolis force $f {\bf k} \times {\bf u} \equiv f {\bf u}^\perp$, where $f$ is the Coriolis parameter and ${\bf u}^\perp$ is the horizontal velocity vector rotated $90^\circ$ counterclockwise from $\bf u$ in the horizontal plane. See any textbook in the [References](#references) for a full derivation. - - -#### Assumptions - -For a primitive equation ocean model, we assume the fluid is hydrostatic. For Omega we are not making the Boussinesq assumption, so all density-dependent terms use the full density. In particular, the density coefficient of the pressure gradient in [](#continuous-momentum) is not a constant, as it is in primitive equation models like POP and MPAS-Ocean. - -**Hydrostatic:** Beginning with the vertical momentum equation, - -$$ -\frac{D \rho w }{D t} - = - - \frac{\partial p}{\partial z} - \rho g + \rho {\bf k} \cdot {\bf D}^u_{3D} + \rho {\bf k} \cdot {\bf F}^u_{3D} -$$ (continuous-vert-mom) - -assume that advection of vertical momentum $Dw/Dt$, dissipation, and forcing are small, and that the first order balance is between pressure gradient and buoyancy, - -$$ -\frac{\partial p}{\partial z} - = - \rho g. -$$ (hydrostatic-balance) -We then integrate from $z$ to the surface $z^{surf}$ to obtain the hydrostatic pressure equation, - -$$ -p(x,y,z) = p^{surf}(x,y) + \int_{z}^{z^{surf}} \rho g dz'. -$$ (continuous-hydrostatic-pressure) - -The constitutive equation is the equation of state, - -$$ -\rho = f_{eos}(p,\Theta,S). -$$ (continuous-eos) - -where conservative temperature, $\Theta$, and absolute salinity, $S$, are examples of tracers $\varphi$. - -The Boussinesq primitive equations also make an incompressibility assumption, which is identical to an assumption of constant density. Non-Boussinesq models do not make that assumption and are not explicitly incompressible. However, the mass conservation equation [](continuous-mass), along with an equation of state for sea water where density only varies slightly, results in a fluid that is nearly incompressible. - -A concern when using the full, compressible continuity equation is that this might support acoustic waves with wave speeds on the order of 1500 m/s, requiring an extremely small time step. According to [Griffies and Adcroft (2008)](https://agupubs.onlinelibrary.wiley.com/doi/10.1029/177GM18) and [de Szoeke and Samelson (2002)](https://doi.org/10.1175/1520-0485(2002)032%3C2194:TDBTBA%3E2.0.CO;2), the hydrostatic approximation removes vertical sound waves, leaving only barotropic acoustic modes called Lamb waves. Fortunately, the Lamb waves can be "subsumed" into the external gravity mode because the scale height of the ocean is much larger (200 km) than its depth (~5 km). This suggests that Lamb waves should not produce any additional constraints on our barotropic time step (though we should keep an eye on this). For more details on Lamb waves, see [Dukowicz (2013)](https://doi.org/10.1175/MWR-D-13-00148.1) - -#### Momentum Advection - -Here we expand the momentum advection in continuous form. This will be a useful reference when we expand the layered version in a later section. The momentum advection, - -$$ -\nabla_{3D} \cdot \left( \rho {\bf u}_{3D} \otimes {\bf u}_{3D} \right) - = \nabla_{3D} \cdot \left( \rho {\bf u}_{3D} {\bf u}_{3D}^T \right), -$$ (advection) - -may be written out fully as the three $(x,y,z)$ cartesian components coordinates as - -$$ -&\partial_x \left( \rho u u\right) + \partial_y \left( \rho v u\right) + \partial_z \left( \rho w u\right) \\ -&\partial_x \left( \rho u v\right) + \partial_y \left( \rho v v\right) + \partial_z \left( \rho w v\right) \\ -&\partial_x \left( \rho u w\right) + \partial_y \left( \rho v w\right) + \partial_z \left( \rho w w\right) . -$$ (advection-written-out) - -The third line is the vertical component, and was assumed to be small in the previous section. The first two lines are the horizontal components may be written as - -$$ -\nabla_z \cdot \left( \rho {\bf u} \otimes {\bf u} \right) + \partial_z \left( w \rho {\bf u}\right) -$$ (adv2d) - -where ${\bf u} = (u,v)$ is the horizontal velocity vector and $\nabla_z=(\partial_x,\partial_y)$ is the horizontal gradient, and the tensor product ${\bf u} \otimes {\bf u}={\bf u} {\bf u}^T$. Using the product rule, this can be expanded as - -$$ -\nabla_z \cdot \left( \rho {\bf u} \otimes {\bf u} \right) + \partial_z \left( w \rho {\bf u}\right) -&= \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} -+ {\bf u} \cdot \nabla_z \left( \rho {\bf u} \right) -+ \partial_z \left( w \rho {\bf u}\right) \\ -&= \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} -+ \left( {\bf u} \cdot \nabla_z \rho \right) {\bf u} -+ \left( {\bf u} \cdot \nabla_z {\bf u} \right) \rho -+ \partial_z \left( w \rho {\bf u}\right) -$$ (adv2d-prod) - -The term ${\bf u} \cdot \nabla_z {\bf u}$ may be replaced with the vector identity - -$$ -\begin{aligned} -{\bf u} \cdot \nabla_z {\bf u} -&= (\nabla_z \times {\bf u}) \times {\bf u} + \nabla_z \frac{|{\bf u}|^2}{2} \\ -&= \left( \boldsymbol{k} \cdot (\nabla_z \times {\bf u})\right) -\left( \boldsymbol{k} \times {\bf u} \right) + \nabla_z \frac{|{\bf u}|^2}{2} \\ -&= \zeta {\bf u}^{\perp} + \nabla_z K, -\end{aligned} -$$ (advection-identity) - -where $\zeta$ is relative vorticity and $K$ is kinetic energy. This step separates the horizontal advection into non-divergent and non-rotational components, which is useful in the final TRiSK formulation. - -#### Final Continuous Equations - -The final form of the continuous conservation equations for a non-Boussinesq, hydrostatic ocean are - -momentum: - -$$ -\frac{\partial (\rho \mathbf{u})}{\partial t} -+ \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} -+ {\bf u} \cdot \nabla_z \left( \rho {\bf u} \right) -+ \partial_z \left( w \rho \mathbf{u} \right) -+ f \rho {\bf u}^\perp - = - \nabla_z p - - \rho\nabla_z \Phi -+ \rho{\bf D}^u + \rho{\bf F}^u -$$ (continuous-momentum-final) - -mass: - -$$ -\frac{\partial \rho }{\partial t} - + \nabla_z \cdot \left( \rho {\bf u} \right) - + \frac{\partial}{\partial z} \left( \rho w \right) -= 0 -$$ (continuous-mass-final) - -tracers: - -$$ -\frac{\partial \rho \varphi}{\partial t} - + \nabla_z \cdot \left( \rho \varphi {\bf u} \right) - + \frac{\partial}{\partial z} \left( \rho \varphi w \right) -= D^\varphi + Q^\varphi -$$ (continuous-tracer-final) - -equation of state: - -$$ -\rho = f_{eos}(p,\Theta,S). -$$ (continuous-eos-final) - -hydrostatic pressure: - -$$ -p(x,y,z) = p^{surf}(x,y) + \int_{z}^{z^{surf}} \rho g dz'. -$$ (continuous-hydrostatic-pressure-final) - -Here the $\nabla_z$ operators are exactly horizontal; we expand terms for tilted layers in the following section. The momentum diffusion terms include Laplacian (del2), biharmonic (del4), and vertical viscosity, - -$$ -{\bf D}^u -= \nu_2 \nabla_z^2 {\bf u} - \nu_4 \nabla_z^4 {\bf u} - + \frac{\partial }{\partial z} \left( \nu_v \frac{\partial {\bf u}}{\partial z} \right) -$$ (continuous-h_mom_diff) -and may also include a Rayleigh drag and eventually parameterizations. Momentum forcing is due to wind stress and bottom drag. Similarly, the tracer diffusion terms include Laplacian (del2), and vertical viscosity, - -$$ -D^\varphi = - \nabla_z\cdot\left(\rho \kappa_2 \nabla_z\varphi \right) -+ \rho \frac{\partial }{\partial z} - \left( \kappa_v \frac{\partial \varphi}{\partial z} \right), -$$ (continuous-v_tr_diff) - -and may also include a biharmonic (del4) term and parameterizations such as Redi mixing. Sources and sinks include surface fluxes from the atmosphere and land, and bio-geo-chemical reactions. -All of the diffusion and forcing terms are written in more detail with the [Discrete Equations](#discrete-equations) below. - -## OLD: Layered Equations - -Here we derive the layered equations by discretizing in the vertical, while the horizontal remains continuous. We discretize by integrating in the vertical from the lower surface $z=z_k^{bot}(x,y)$ to $z=z_k^{top}(x,y)$ for the layer with index $k$, as described in [Ringler et al. 2013](https://www.sciencedirect.com/science/article/pii/S1463500313000760) Appendix A.2. Equivalently, we can vertically integrate from a deeper pressure surface $p=p_k^{bot}(x,y)$ (higher pressure) to $p=p_k^{top}(x,y)$ where $p$ and $z$ are related by the hydrostatic pressure equation [](#continuous-hydrostatic-pressure). - -### Layer Integration - -For non-Boussinesq layered equations we begin by defining the pressure-thickness of layer $k$ as - -$$ -h_k(x,y,t) - \equiv \int_{z_k^{bot}}^{z_k^{top}} \rho dz = \frac{1}{g} \int_{p_k^{top}}^{p_k^{bot}} dp. -$$ (def-h) - -The letter $h$ is used because this is the familiar variable for thickness in Boussinesq primitive equations. In the Boussinesq case the thickness equation describes conservation of volume because $h_k^{Bouss}$ is volume normalized by horizontal area, resulting in a height, - -$$ -h_k^{Bouss}(x,y,t) - \equiv \int_{z_k^{bot}}^{z_k^{top}} dz. -$$ (def-h-bouss) - -In this document we remain with the more general non-Boussinesq case, where $h_k$ is mass per unit area (kg/m$^2$). Since horizontal cell area remains constant in time, the thickness equation is a statement of conservation of mass. - -Throughout this derivation we can write all equations equivalently in $z$-coordinates (depth), or in $p$-coordinates (pressure). From the hydrostatic equation, any quantity $\varphi$ may be integrated in $z$ or $p$ as - -$$ -\int_{z_k^{bot}}^{z_k^{top}} \varphi \rho dz -= \frac{1}{g} \int_{p_k^{top}}^{p_k^{bot}} \varphi dp. -$$(depth-pressure-integral-conversion) - -We can convert from an interfacial depth surface $z^{top}$ to a pressure surface $p^{top}$ with the hydrostatic equation [](continuous-hydrostatic-pressure-final): - -$$ -p^{top}(x,y) = p^{surf}(x,y) + \int_{z^{top}(x,y)}^{z^{surf}(x,y)} \rho g dz -$$ (def-p-surf) - -where $z^{surf}$ is the sea surface height and $p^{surf}$ is the surface pressure at $z^{surf}$ imposed by the atmosphere or floating ice. Note that pressure increases with depth. This means that positive $p$ points downward, so that the $top$ and $bot$ extents of the integration limits are flipped in [](#depth-pressure-integral-conversion). - -For any three-dimensional quantity $\varphi(x,y,z,t)$, the mass-thickness-averaged quantity in layer $k$ is defined as - -$$ -\varphi_k(x,y,t) -\equiv \frac{\int_{z_k^{bot}}^{z_k^{top}} \rho \varphi dz}{\int_{z_k^{bot}}^{z_k^{top}} \rho dz} -= \frac{\int_{z_k^{bot}}^{z_k^{top}} \rho \varphi dz}{h_k} -$$(def-mass-thickness-average) - -At this point our derivation has not made any assumptions about density, and may be used for both Boussinesq and non-Boussinesq fluids. A Boussinesq derivation would now assume small variations in density and replace $\rho(x,y,z,t)$ with a constant $\rho_0$ everywhere but the pressure gradient coefficient. In that case $\rho$ divides out in [](#def-mass-thickness-average) the Boussinesq layer quantities would simply be thickness-weighted averages. - -We can now derive the layered equations. Integrate the continuous equations [](continuous-momentum-final), [](continuous-mass-final), [](continuous-tracer-final) in $z$ from $z_k^{bot}$ to $z_k^{top}$, - -$$ -\int_{z_k^{bot}}^{z_k^{top}} \frac{\partial \rho {\bf u}}{\partial t} dz -+ \int_{z_k^{bot}}^{z_k^{top}} \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} dz -+ \int_{z_k^{bot}}^{z_k^{top}} {\bf u} \cdot \nabla_z \left( \rho {\bf u} \right) dz -+ \int_{z_k^{bot}}^{z_k^{top}} \frac{\partial }{\partial z} \left( \rho {\bf u} w \right) dz -+ \int_{z_k^{bot}}^{z_k^{top}} - f \rho {\bf u}^\perp dz - = \int_{z_k^{bot}}^{z_k^{top}} \left[- \nabla_z p - - \rho \nabla_z \Phi -+ \rho {\bf D}^u + \rho {\bf F}^u \right] dz -$$ (z-integration-momentum) - -$$ -\frac{\partial }{\partial t} \int_{z_k^{bot}}^{z_k^{top}} \rho dz - +\nabla_z \cdot \left( \int_{z_k^{bot}}^{z_k^{top}} \rho {\bf u} dz \right) - + \int_{z_k^{bot}}^{z_k^{top}}\frac{\partial}{\partial z} \left( \rho w \right) dz -= 0 -$$ (z-integration-mass) - -$$ -\frac{\partial }{\partial t} \int_{z_k^{bot}}^{z_k^{top}} \rho \varphi dz - + \nabla_z \cdot \left( \int_{z_k^{bot}}^{z_k^{top}} \rho \varphi {\bf u} dz \right) - + \int_{z_k^{bot}}^{z_k^{top}} \frac{\partial}{\partial z} \left( \rho \varphi w \right) dz -= \int_{z_k^{bot}}^{z_k^{top}} \left( D^\varphi + Q^\varphi \right) dz -$$ (z-integration-tracers) - -This results in conservation equations that are valid over the layer. The momentum variables are simply vertically averaged. Tracer variables are vertically mass-averaged, as defined in [](def-mass-thickness-average). - -In order to deal with nonlinear terms where we take the integrals of products, we may assume that the variables are piecewise constant in the vertical within each layer, i.e. - -$$ -a(x,y,z,t) = a_k(x,y,t) \in [z_k^{bot}, z_k^{top}). -$$ (discrete-a) - -Then variables may come out of the integral as needed. For example, we can handle the advection terms by making this assumptoin for ${\bf u}$. - -$$ - \int_{z_k^{bot}}^{z_k^{top}} \nabla_z \cdot \left( \rho \varphi {\bf u} \right) dz -&= \nabla_z \cdot \left( \int_{z_k^{bot}}^{z_k^{top}} \rho \varphi {\bf u} dz \right)\\ -&= \nabla_z \cdot \left( {\bf u}_k \int_{z_k^{bot}}^{z_k^{top}} \rho \varphi dz \right)\\ -&= \nabla_z \cdot \left( {\bf u}_k h_k \varphi_k \right).\\ -$$ (tracer-adv) - -Likewise, for the horizontal momentum advection, - -$$ -\int_{z_k^{bot}}^{z_k^{top}} \left( \nabla_z \cdot {\bf u} \right) \rho {\bf u} dz -+ \int_{z_k^{bot}}^{z_k^{top}} {\bf u} \cdot \nabla_z \left( \rho {\bf u} \right) dz -&= \left( \nabla_z \cdot {\bf u}_k \right) \int_{z_k^{bot}}^{z_k^{top}} \rho {\bf u} dz -+ {\bf u}_k \cdot \nabla_z \left( \int_{z_k^{bot}}^{z_k^{top}}\rho {\bf u} dz\right) \\ -&= \left( \nabla_z \cdot {\bf u}_k \right) h_k {\bf u}_k -+ {\bf u}_k \cdot \nabla_z \left( h_k {\bf u}_k \right) \\ -$$ (mom-adv) - -Our governing equations are now discrete in the vertical, but remain continuous in the horizontal and in time. - - -This results in the layered conservation equations. This system is now discrete in the vertical, but remains continuous in the horizontal and in time. - -$$ -\frac{\partial h_k {\bf u}_k}{\partial t} -+ \left( \nabla_z \cdot {\bf u}_k \right) h_k {\bf u}_k -+ {\bf u}_k \cdot \nabla_z \left( h_k {\bf u}_k \right) -+ \left[ \rho_k w_k {\bf u}_k \right]^{top} - \left[ \rho_k w_k {\bf u}_k \right]^{bot} -+ f h_k {\bf u}_k^{\perp} -= -- \nabla_z p_k -- h_k \nabla_z \Phi_k -+ h_k {\bf D}_k^u + h_k {\bf F}_k^u -$$ (layered-momentum-1) - -$$ -\frac{\partial h_k}{\partial t} + \nabla_z \cdot \left(h_k {\bf u}_k\right) + \left[ \rho_k w_k \right]^{top} - \left[ \rho_k w_k \right]^{bot}= Q^h_k -$$ (layered-mass-1) - -$$ -\frac{\partial h_k \varphi_k}{\partial t} + \nabla_z \cdot \left(h_k {\bf u}_k \varphi_k\right) -+ \left[ \varphi_k \rho_k w_k \right]^{top} - \left[ \varphi_k \rho_k w_k \right]^{bot} -= D^\varphi_k + Q^\varphi_k. -$$ (layered-tracer-1) - -The term $\left( \nabla_z \cdot {\bf u}_k \right) h_k {\bf u}_k$ is assumed to be small for seawater, which is nearly incompressible. In the Boussinesq approximation this term is formally zero due to the incompressibility assumption. The remaining terms from the momentum material derivative may be rewritten as - -$$ -\frac{\partial h_k {\bf u}_k}{\partial t} -+ {\bf u}_k \cdot \nabla_z \left( h_k {\bf u}_k \right) -&= h_k \frac{\partial {\bf u}_k}{\partial t} -+ {\bf u}_k\frac{\partial h_k} {\partial t} -+ h_k {\bf u}_k \cdot \nabla_z \left( {\bf u}_k \right) -+ {\bf u}_k \cdot \nabla_z \left( h_k \right) {\bf u}_k\\ -&= h_k \frac{\partial {\bf u}_k}{\partial t} -+ {\bf u}_k\frac{\partial h_k} {\partial t} -+ h_k {\bf u}_k \cdot \nabla_z {\bf u}_k -+ {\bf u}_k \cdot \nabla_z \left( h_k \right) {\bf u}_k \\ -&= h_k \left[ \frac{\partial {\bf u}_k}{\partial t} -+ {\bf u}_k \cdot \nabla_z {\bf u}_k \right] -+ {\bf u}_k \left[\frac{\partial h_k} {\partial t} -+ {\bf u}_k \cdot \nabla_z h_k \right] \\ -&= h_k \left[ \frac{\partial {\bf u}_k}{\partial t} -+ \zeta {\bf u}^{\perp} + \nabla_z K - \right] -+ {\bf u}_k \left[\frac{\partial h_k} {\partial t} -+ {\bf u}_k \cdot \nabla_z h_k \right] \\ -$$ (mom-h-adv) - -The terms in the second square brackets drop out due to conservation of mass (note: I need to check on vertical thickness flux and source terms). We now divide the momentum equation by $h_k$ to obtain - -$$ -\frac{\partial {\bf u}_k}{\partial t} -+ \zeta {\bf u}^{\perp} + \nabla_z K -+ \frac{\left[ \rho_k w_k {\bf u}_k \right]^{top} - \left[ \rho_k w_k {\bf u}_k \right]^{bot}}{h_k} -+ f {\bf u}_k^{\perp} -= -- \nabla_z p_k -- \nabla_z \Phi_k -+ {\bf D}_k^u + {\bf F}_k^u -$$ (layered-momentum-2) - -One could derive the layered equations by integrating in pressure rather than $z$. In that case, one would have multiplied [](z-integration-momentum), [](z-integration-mass), [](z-integration-tracers) by $g$ and expressed the integrals in terms of pressure, with integration limits from $p_k^{top}$ to $p_k^{bot}$. -Derivations of ocean model equations with pressure as the vertical variable may be found in [de Szoeke and Samelson 2002](https://journals.ametsoc.org/view/journals/phoc/32/7/1520-0485_2002_032_2194_tdbtba_2.0.co_2.xml) and [Losch et al. 2003](https://journals.ametsoc.org/view/journals/phoc/34/1/1520-0485_2004_034_0306_hsacgc_2.0.co_2.xml). - -The vertical advection terms use the fundamental theorem of calculus to integrate a derivative in $z$, resulting in boundary conditions at the layer interfaces. This makes intuitive sense as a mass balance. For example, in the absence of horizontal advection and sources, the mass equation is simply - -$$ -\frac{\partial h_k}{\partial t} -= \left[ \rho_k w_k \right]^{bot} - \left[ \rho_k w_k \right]^{top}. -$$ (layered-mass-vert-adv) - -This states that the change in mass in the layer is the incoming mass from below minus the outgoing mass above, since the vertical velocity $w$ is positive upwards. The vertical advection of momentum and tracers have a similar interpretation. - -### Vertical Transport -The integration in [](#z-integration-momentum) to [](#z-integration-tracers) changes the vertical velocity $w$ in m/s to a vertical mass-thickness transport $\omega=\rho w$ in kg/s/m$^2$. Here $w$ is the Latin letter and $\omega$ is the Greek letter omega. One can think of fluid velocity $w$ as a volume transport, normalized by area, in units of length per time. Analogously, $\omega$ is mass-thickness transport, which is mass transport per unit area (kg/s/m$^2$). The variables $w$ and $\omega$ have the same sign convention of upward (positive $z$) for positive transport. - -### Final Layered Equations - -mrp temp: - -The momentum equation can be rewritten using the product rule on $\rho {\bf u}$, mass conservation, and dividing by $\rho$, as: - -$$ -\frac{D {\bf u}_{3D} }{D t} \equiv -\frac{\partial {\bf u}_{3D}}{\partial t} -+ {\bf u}_{3D}\cdot \nabla_{3D} {\bf u}_{3D} - = - \frac{1}{\rho} \nabla_{3D} p - - \nabla_{3D} \Phi -+ {\bf D}^u + {\bf F}^u -$$ (continuous-momentum-rho) - -mrp temp: - -The advection term may be separated into horizontal and vertical parts as - -$$ -{\bf u}_{3D}\cdot \nabla_{3D} {\bf u}_{3D} -= -{\bf u} \cdot \nabla_z {\bf u} + w \frac{\partial {\bf u}}{\partial z}. -$$ (advection-3d2d) - -The horizontal component may be replaced with the vector identity - -$$ -\begin{aligned} -{\bf u} \cdot \nabla_z {\bf u} -&= (\nabla_z \times {\bf u}) \times {\bf u} + \nabla_z \frac{|{\bf u}|^2}{2} \\ -&= \left( \boldsymbol{k} \cdot (\nabla_z \times {\bf u})\right) -\left( \boldsymbol{k} \times {\bf u} \right) + \nabla_z \frac{|{\bf u}|^2}{2} \\ -&= \zeta {\bf u}^{\perp} + \nabla_z K, -\end{aligned} -$$ (advection-identity) - -where $\zeta$ is relative vorticity and $K$ is kinetic energy. This step separates the horizontal advection into non-divergent and non-rotational components, which is useful in the final TRiSK formulation. - -momentum: - -$$ -\frac{\partial {\bf u}_k}{\partial t} -+ q_k h_k {\bf u}_k^{\perp} -+ \frac{\left[ \alpha_k \omega_k {\bf u}_k \right]^{top} - \left[ \alpha_k \omega_k {\bf u}_k \right]^{bot}}{h_k} -= -- \alpha_k \nabla_r p_k - \nabla_r \Phi_k -- \nabla_r K_k -+ {\bf D}_k^u + {\bf F}_k^u -$$ (layered-momentum) - -mass: - -$$ -\frac{\partial h_k}{\partial t} + \nabla_r \cdot \left(h_k {\bf u}_k\right) + \omega_k^{top} - \omega_k^{bot}= Q^h_k -$$ (layered-mass) - -tracers: - -$$ -\frac{\partial h_k \varphi_k}{\partial t} + \nabla_r \cdot \left(h_k {\bf u}_k \varphi_k\right) -+ \varphi_k^{top} \omega_k^{top} - \varphi_k^{bot}\omega_k^{bot} -= D^\varphi_k + Q^\varphi_k. -$$ (layered-tracer) - -The superscripts $top$ and $bot$ mean that the layered variable is interpolated to the top and bottom layer interface, respectively. In [](layered-momentum) the non-divergent momentum advection and Coriolis term were combined and expressed in terms of the potential vorticity $q_k$, - -$$ - \zeta_k {\bf u}_k^\perp + f {\bf u}_k^\perp = \frac{\zeta_k + f }{h_k}h_k{\bf u}_k^\perp \equiv q_k h_k {\bf u}^\perp_k. -$$ (potential-vort-adv) - -Surface fluxes $Q^h_k$ have been added to the mass equation for precipitation, evaporation, and river runoff. These fluxes, like mass transport $\omega$, are in units of kg/s/m$^2$. - - - From f22eca2aabb31ea920734b6830f48a64402c2d92 Mon Sep 17 00:00:00 2001 From: vanroekel Date: Wed, 9 Jul 2025 20:17:50 -0700 Subject: [PATCH 48/65] updates to assumptions section --- components/omega/doc/design/OmegaV1GoverningEqns.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 1d93356a5e4a..1434ce37f636 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -753,6 +753,10 @@ $$ - \left[ \frac{\rho_0}{\tilde{h}_k} \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. $$ (layer-momentum-final) +### Simplifying Assumptions + +In [](#layer-momentum-final), if we assume a piecewise constant representation of variables in Omega, then all the $\deltaX$ variables would be zero. However, in general, piecewise constant representations are not recommended (e.g., [White and Adcroft (2008)](https://www.sciencedirect.com/science/article/pii/S0021999108002593)), thus we keep these terms for Omega. They will be based on the order of reconstruction assumed for the model. More details are given in the following section. In addition to simplifying the product of $\delta$ terms based on reconstruction order in the vertical, we will assume that $\left<\alpha^\prime p^\prime \right>$ is small. We would only expect this term to be large in nonhydrostatic codes in regions of vigorous convection. + ## 10. Discrete Equations Next things to do -- From ee99781b513bc41a8557f942b6227a9e225da955 Mon Sep 17 00:00:00 2001 From: Kat Smith Date: Wed, 9 Jul 2025 15:26:36 -0700 Subject: [PATCH 49/65] cleans up design doc up to tracer equ in section 9 --- .../omega/doc/design/OmegaV1GoverningEqns.md | 234 +++++++----------- 1 file changed, 92 insertions(+), 142 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 1434ce37f636..369388aa004b 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -208,7 +208,7 @@ To facilitate integration over a fixed horizontal domain, we introduce the follo - $\partial A$ is the boundary of $A$, and $dl$ is the line element along this boundary. - ${\bf n}_\perp$ is the outward-pointing unit normal vector in the horizontal plane, defined on $\partial A$. It lies in the $x$–$y$ plane and is orthogonal to $dl$. -We now project the tracer equation [](#tr-v-h-split-pseudo) onto a horizontal domain $A$ (the footprint of the control volume), over which the top and bottom boundaries vary in height. The side walls remain fixed in time and space. +We now project the tracer equation [](#tr-vh-split-pseudo) onto a horizontal domain $A$ (the footprint of the control volume), over which the top and bottom boundaries vary in height. The side walls remain fixed in time and space. The pseudo-height surfaces $\tilde{z}^{\text{top}}(x,y,t)$ and $\tilde{z}^{\text{bot}}(x,y,t)$ are not fixed in time, so their motion must be accounted for when computing vertical fluxes. We define $\tilde{w}_r$ as the pseudo-height velocity of the interface: @@ -228,13 +228,13 @@ This gives the relative pseudo-mass flux through the interface per unit referenc In the flux integrals below, we express all surface-normal transport using $\tilde{w}_{tr}$, i.e., $$ -\rho_0 \varphi \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right] -= \rho_0 \varphi \left[ \tilde{w} - \tilde{w}_r - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right] +\rho_0 \varphi \left[ \tilde{w}_{tr} - \tilde{\bf u} \right] += \rho_0 \varphi \left[ \tilde{w} - \tilde{w}_r - \tilde{\bf u} \right] $$ (vertical-flux) so that the vertical flux terms correctly account for both the local motion of the fluid and the motion of the interface itself. -The quantity $\tilde{w}$ from equation [](#w-tilde) is the pseudo-velocity. The second term, ${\bf u} \cdot \nabla \tilde{z}^{\text{top}}$, captures the component of horizontal velocity advecting material across a sloping pseudo-height interface. Together, the expression in brackets represents the **net vertical transport** through a surface of constant $\tilde{z}$. +The quantity $\tilde{w}$ from equation [](#w-tilde) is the pseudo-velocity. The second term, $\tilde{\bf u} = {\bf u} \cdot \nabla \tilde{z}^{\text{top}}$, captures the component of horizontal velocity advecting material across a sloping pseudo-height interface. Together, the expression in brackets represents the **net vertical transport** through a surface of constant $\tilde{z}$. Because both terms are scaled by $1/\rho_0$, the full flux is multiplied by $\rho_0$ to recover a physical mass flux. This ensures dimensional consistency and physical equivalence to the traditional form $\rho w - \rho {\bf u} \cdot \nabla z$ expressed in geometric-height coordinates. @@ -243,8 +243,8 @@ Using this projection, we obtain: $$ \frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \, \varphi \, d\tilde{z} \, dA & + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \varphi \, {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ -& + \int_A \rho_0 \varphi \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} dA \\ -& - \int_A \rho_0 \varphi \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} dA +& + \int_A \rho_0 \varphi \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} dA \\ +& - \int_A \rho_0 \varphi \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} dA = 0 $$ (tr-vh-separation-pseudo) @@ -259,11 +259,21 @@ Similar expressions to [](#tr-vh-separation-pseudo) hold for mass and momentum: $$ \frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \, d\tilde{z} \, dA & + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \, {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ -& + \int_A \rho_0 \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right] dA \\ -& - \int_A \rho_0 \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right] dA +& + \int_A \rho_0 \left[ \tilde{w}_{tr} - \tilde{\bf u} \right] dA \\ +& - \int_A \rho_0 \left[ \tilde{w}_{tr} - \tilde{\bf u} \right] dA = 0 $$ (vh-mass-pseudo) +**Tracer:** + +$$ +\frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \varphi \, d\tilde{z} \, dA +& + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \varphi \, {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl & \\ +& + \int_A \left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - \tilde{\bf u} \right] \right\}_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA & \\ +& - \int_A \left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - \tilde{\bf u} \right] \right\}_{\tilde{z} = \tilde{z}^{\text{bot}}}\, dA +& = 0 +$$ (vh-tracer-pseudo) + **Momentum:** $$ @@ -271,9 +281,9 @@ $$ &+ \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \, {\bf u} \otimes {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ &+ -\int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +\int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA - -\int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ +\int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ &= \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 {\bf b}_{\perp} \, d\tilde{z} \, dA + @@ -287,12 +297,9 @@ These equations express horizontal and vertical fluxes naturally in terms of pse ## 7. Vertical Discretization for the Layered Equations -The previous equation set [](#vh-mass) to [](#vh-momentum) is for an arbitrary layer bounded by $z^{\text{top}}$ above and $z^{\text{bot}}$ below. -We now provide the details of the vertical discretization. -The ocean is divided vertically into $K_{max}$ layers, with $k=0$ at the top and increasing downwards (opposite from $z$). -Layer $k$ is bounded between $z_k^{\text{top}}$ above and $z_{k+1}^{\text{top}}$ below (i.e. $z_k^{\text{bot}} = z_{k+1}^{\text{top}}$). +The previous equation set [](#vh-mass-pseudo) to [](#vh-momentum-pseudo) is for an arbitrary layer bounded by $z^{\text{top}}$ above and $z^{\text{bot}}$ below. We now provide the details of the vertical discretization. The ocean is divided vertically into $K_{max}$ layers, with $k=0$ at the top and increasing downwards (opposite from $z$). Layer $k$ is bounded between $z_k^{\text{top}}$ above and $z_{k+1}^{\text{top}}$ below (i.e. $z_k^{\text{bot}} = z_{k+1}^{\text{top}}$). -The layer thickness of layer k, used in MPAS-Ocean, is +The layer thickness of layer $k$, used in MPAS-Ocean, is $$ h_k = \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} dz. @@ -310,67 +317,67 @@ $$ (def-pseudo-thickness) which is the mass per unit area in the layer, normalized by $\rho_0$. This pseudo-thickness and layer-averaging will be used to express conservation laws in a mass-weighted coordinate system. Pseudo-thickness, rather than geometric thickness will be the prognostic variable in Omega. -The density-weighted average of any variable $\phi({\bf x},t)$ in layer $k$ is +The density-weighted average of any variable $\varphi({\bf x},t)$ in layer $k$ is $$ -{\overline \phi}^{\tilde{z}}_k(x,y,t) = -\frac{\int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho \phi dz} +{\overline \varphi}^{\tilde{z}}_k(x,y,t) = +\frac{\int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho \varphi dz} {\int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho dz} = -\frac{\frac{1}{\rho_0}\int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho \phi dz} +\frac{\frac{1}{\rho_0}\int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho \varphi dz} {\frac{1}{\rho_0}\int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho dz} = -\frac{\int_{{\tilde z}_{k+1}^{\text{top}}}^{{\tilde z}_k^{\text{top}}} \phi d{\tilde z}} +\frac{\int_{{\tilde z}_{k+1}^{\text{top}}}^{{\tilde z}_k^{\text{top}}} \varphi d{\tilde z}} {\int_{{\tilde z}_{k+1}^{\text{top}}}^{{\tilde z}_k^{\text{top}}} d{\tilde z}} = -\frac{1}{{\tilde h}_k}\int_{{\tilde z}_{k+1}^{\text{top}}}^{{\tilde z}_k^{\text{top}}} \phi d{\tilde z}. +\frac{1}{{\tilde h}_k}\int_{{\tilde z}_{k+1}^{\text{top}}}^{{\tilde z}_k^{\text{top}}} \varphi d{\tilde z}. $$ (def-layer-average) Rearranging, is it useful to note that $$ -\frac{1}{\rho_0}\int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho \phi dz - = -{\tilde h}_k {\overline \phi}^{\tilde{z}}_k(x,y,t). +\int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \rho \varphi d\tilde{z} + = {\tilde h}_k {\overline \varphi}^{\tilde{z}}_k(x,y,t). $$ (h-phi) This relation is frequently used in discretized fluxes and conservation equations to replace integrals with layer-mean quantities. -**NOTE:** The quantity being averaged in [](#def-layer-average) is arbitrary. For example, this equation would apply equally to a Favre or Reynolds' averaged quantity. We also choose to alter the density-weighted vertical average to use the Reynolds' averaged density, i.e., +## 8. Decomposition and Averaging -$$ -{\overline \phi}^{\tilde{z}}_k(x,y,t) = -\frac{\int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \left<\rho\right> \phi dz} - {\int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \left<\rho\right> dz}. -$$ (def-layer-average-reynolds) +### Decomposition -Given that density fluctuations are small relative to the mean density, we expect the Reynolds' averaged density to be very close to the full density. [](#def-layer-average) is also valid for any quantity, e.g., it is equally valid for a Reynolds' averaged quantity ($\varphi = \left<\varphi \right>$). +In this document, two decompositions will be critical. The first decomposition is -## 8. Turbulent fluxes +$$ +\varphi = \overline{\varphi}^{\tilde{z}}_k + \delta \varphi +$$ (vertical-decomposition) -### Reynolds' Average +which is a density weighted vertical integral based upon [](#def-layer-average) and the deviation from this value. -The fundamental ocean model equations are most often Reynolds' averaged to derive the sub gridscale stresses. Each variable is decomposed into an average and a fluctuating component, i.e., +The second decomposition is $$ \varphi = \left<\varphi\right> + \varphi^\prime $$ (reynolds-definition) -The averaging operator is defined such that it can be passed through derivatives and integrals without corrections and an average of products with a single perturbation quantity is zero. +which is the traditional Reynolds' average and deviation from this value. -The Reynolds' average is most commonly denoted by an overbar, to disambiguate from the definition of the bar as the vertical density weighted average, the Reynolds' average herein is denoted by $< . >$. +The fundamental ocean model equations are most often Reynolds' averaged to derive the sub gridscale stresses. Each variable is decomposed into an average and a fluctuating component [[](#reynolds-definition)]. The averaging operator is defined such that it can be passed through derivatives and integrals without corrections and an average of products with a single perturbation quantity is zero. -The Reynolds' approach is an attractive approach for Boussinesq ocean models since the fundamental equations do not include products of spatially variable density and tracer, pressure, or momentum. When the ocean model is non Boussinesq, products of spatially varying density and other fields (e.g., tracer) arise and create difficulties. For example, consider the first term in equation [](#h-momentum), if a Reynolds' decomposition and averaging is performed, +The Reynolds' average is most commonly denoted by an overbar. However, to disambiguate from the definition of the bar as the vertical density weighted average, the Reynolds' average herein is denoted by $< . >$. -$$ -\frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} \rho \, {\bf u} \, dz \, dA = \frac{d}{dt} \int_{A} \int_{z^{\text{bot}}}^{z^{\text{top}}} (\left<\rho {\bf u}\right> + \, \left<\rho^\prime {\bf u}^\prime\right>) \, dz \, dA -$$ (reynolds-example) +The Reynolds' approach is an attractive approach for Boussinesq ocean models since the fundamental equations do not include products of spatially variable density and tracer, pressure, or momentum. When the ocean model is non Boussinesq, products of spatially varying density and other fields (e.g., tracer) arise and create difficulties, producing a term like $\left<\rho^\prime {\mathbf u}^\prime\right>$ which is difficult to parameterize. However, given the definition of our chosen pseudo-height, the density terms are wrapped up in $\tilde{z}$ and once again a Reynolds' approach can be cleanly used. -In this equation, the products of prime and average drop out by construction. The $\left<\rho^\prime {\mathbf u}^\prime\right>$ term is an unnecessary complication and difficult to parameterize. +### Averaging -### Useful Averaging Relationships +The quantity being averaged in [](#def-layer-average) is arbitrary. For example, this equation can apply equally to a Reynolds' averaged quantity, e.g., -For the decomposition related to vertical averaging, we will encounter terms such as ${\overline \varphi}^{\tilde{z}}_k \delta\varphi$ that need to be vertical averaged. Using [](#def-layer-average) we have +$$ +\overline{\left<\varphi\right>}^{\tilde{z}}_k(x,y,t) = +\frac{1}{\tilde{h}_k} \int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \left<\varphi\right> d\tilde{z}. +$$ (def-layer-average-reynolds) + +Additionally, for the decomposition related to vertical averaging, we will encounter terms such as ${\overline \varphi}^{\tilde{z}}_k \delta\varphi$ that need to be vertical averaged. Using [](#def-layer-average) we have $$ \overline{{\overline \varphi}^{\tilde{z}}_k \delta\varphi}^{\tilde{z}}_k &= \frac{\int_{{\tilde z}_{k+1}^{\text{top}}}^{{\tilde z}_k^{\text{top}}} {\overline \varphi}^{\tilde{z}}_k \delta \varphi d{\tilde z}} @@ -382,154 +389,97 @@ $$ (delta-vert-average) where the last equality is true by definition. -### Summary - -In this document, two decompositions will be critical in this document. The decompositions are summarized as - -$$ -\varphi = \overline{\varphi}^{\tilde{z}}_k + \delta \varphi -$$ - -which is a density weighted vertical integral and the deviation from this value. - -The second decomposition is - -$$ -\varphi = \left<\varphi\right> + \varphi^\prime -$$ - -which is the traditional Reynolds' decomposition. - ## 9. Layer Equations ### Tracer & Mass -Substituting [](#w-tilde) into the tracer equation [](#tr-vh-split-pseudo) for layer $k$, we have - -$$ -\frac{d}{dt} \int_{A} \int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \varphi \, d\tilde{z} \, dA -+ -\int_{\partial A} \left( \int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \varphi \, {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl & \\ -+ -\int_{A} \left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right] \right\}_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA & \\ -- -\int_{A} \left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right] \right\}_{\tilde{z} = \tilde{z}^{\text{bot}}}\, dA -& = 0. -$$ (Aintegral-tracer) - -We first Reynolds' average this equation and given the definition of the operator we can move the averaging past the derivatives and integrals without correction terms to yield +We first Reynolds' average [](#vh-tracer-pseudo) and given the definition of the operator we can move the averaging past the derivatives and integrals without correction terms to yield $$ -\frac{d}{dt} \int_{A} \int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \left<\varphi\right> \, d\tilde{z} \, dA -+ -\int_{\partial A} \left( \int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \left<\varphi \, {\bf u} \right> \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl & \\ -+ -\int_{A} \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right] \right\}\right>_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA & \\ -- -\int_{A} \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right] \right\}\right>_{\tilde{z} = \tilde{z}^{\text{bot}}}\, dA +\frac{d}{dt} \int_A \int_{\tilde{z}_{k+1}^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \left<\varphi\right> \, d\tilde{z} \, dA +& + \int_{\partial A} \left( \int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \left<\varphi \, {\bf u} \right> \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl & \\ +& + \int_A \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - \tilde{\bf u} \right] \right\}\right>_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA & \\ +& - \int_A \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - \tilde{\bf u} \right] \right\}\right>_{\tilde{z} = \tilde{z}^{\text{bot}}}\, dA & = 0. $$ (Aintegral-tracer-reynolds) -In this equation we have also invoked the definition of vertical transport velocity, $\tilde{w}_{tr} \equiv \tilde{w} - \tilde{w}_r$. - Next, we use a Reynolds' decomposition on any terms involving products inside a Reynolds' averaged, $$ -\frac{d}{dt} \int_{A} \int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \left<\varphi \right> \, d\tilde{z} \, dA -+ +\frac{d}{dt} \int_A \int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \left<\varphi \right> \, d\tilde{z} \, dA +& + \int_{\partial A} \left( \int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \left(\left<{\varphi}\right>\left<{\bf u}\right> + \left<\varphi^{\prime}{\bf u}^{\prime}\right> \right) d\tilde{z} \right) \, \cdot {\bf n}_\perp \, dl & \\ -+ -\int_{A} \left\{ \rho_0 \left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{top}}} \, dA & \\ -- -\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{bot}}}\, dA +& + \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{\bf u}\right> -\left<\varphi^{\prime} \tilde{\bf u}^{\prime}\right> \right] \right\}_{z = z^{\text{top}}} \, dA & \\ +& - \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{\bf u}\right> - \left<\varphi^{\prime} \tilde{\bf u}^{\prime}\right> \right] \right\}_{z = z^{\text{bot}}}\, dA & = 0. -$$ (Aintegral-tracer-favre-reynolds) +$$ (Aintegral-tracer-reynolds) -We can rewrite the first two terms in [](#Aintegral-tracer-favre-reynolds) using [](#def-layer-average) and [](#def-layer-average-reynolds) +We can rewrite the first two terms in [](#Aintegral-tracer-reynolds) using [](#def-layer-average-reynolds) $$ \frac{d}{dt} \int_A \tilde{h}_k \, \overline{\left<\varphi\right>}^{\tilde{z}}_k \, dA -+ -\int_{\partial A} \left( \tilde{h}_k \, \overline{\left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime}{\bf u}^{\prime}\right>}^{\tilde{z}}_k d\tilde{z} d\tilde{z} \right) \cdot {\bf n}_\perp \, dl & \\ -+ -\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{top}}} \, dA & \\ -- -\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{bot}} \right\}_{z = z^{\text{bot}}}\, dA -& = 0 +& + \int_{\partial A} \left( \tilde{h}_k \, \overline{\left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime}{\bf u}^{\prime}\right>}^{\tilde{z}}_k \right) \cdot {\bf n}_\perp \, dl & \\ +& + \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{\bf u}\right> -\left<\varphi^{\prime} \tilde{\bf u}^{\prime}\right> \right] \right\}_{z = z^{\text{top}}} \, dA & \\ +& - \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{\bf u}\right> - \left<\varphi^{\prime} \tilde{\bf u}^{\prime}\right> \right] \right\}_{z = z^{\text{bot}}}\, dA +& = 0. $$ (Aintegral-tracer2) -The second term is expanded utilizing [](#vertical-decomposition-favre) +The second term is expanded utilizing [](#vertical-decomposition) $$ \frac{d}{dt} \int_A \tilde{h}_k \, \overline{\left<\varphi\right>}^{\tilde{z}}_k \, dA -+ -\int_{\partial A} \left( \tilde{h}_k \, \overline{\left(\overline{\left<\varphi\right>}^{\tilde{z}}_k + \delta \varphi\right)\left(\overline{\left<{\bf u}\right>}^{\tilde{z}}_k + \delta {\bf u}\right)}^{\tilde{z}}_k + \tilde{h}_k \overline{\left<\varphi^{\prime}{\bf u}^{\prime}\right>}^{\tilde{z}}_k \right) \cdot {\bf n}_\perp \, dl & \\ -+ -\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA & \\ -- -\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{bot}} \right\}_{\tilde{z} = \tilde{z}^{\text{bot}}}\, dA -& = 0 +& + \int_{\partial A} \left( \tilde{h}_k \, \overline{\left(\overline{\left<\varphi\right>}^{\tilde{z}}_k + \delta \varphi\right)\left(\overline{\left<{\bf u}\right>}^{\tilde{z}}_k + \delta {\bf u}\right)}^{\tilde{z}}_k + \tilde{h}_k \overline{\left<\varphi^{\prime}{\bf u}^{\prime}\right>}^{\tilde{z}}_k \right) \cdot {\bf n}_\perp \, dl & \\ +& + \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{\bf u}\right> -\left<\varphi^{\prime} \tilde{\bf u}^{\prime}\right> \right] \right\}_{z = z^{\text{top}}} \, dA & \\ +& - \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{\bf u}\right> - \left<\varphi^{\prime} \tilde{\bf u}^{\prime}\right> \right] \right\}_{z = z^{\text{bot}}}\, dA +& = 0. $$ (Aintegral-tracer2) -The second term is simplified using [](#delta-vert-average) +And then is simplified using [](#delta-vert-average) $$ \frac{d}{dt} \int_A \tilde{h}_k \, \overline{\left<\varphi\right>}^{\tilde{z}}_k \, dA -+ -\int_{\partial A} \left[ \tilde{h}_k \, \left(\overline{\left<\varphi\right>}^{\tilde{z}}_k \overline{\left<{\bf u}\right>}^{\tilde{z}}_k + \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k + \overline{\left<\varphi^{\prime}{\bf u}^{\prime}\right>}^{\tilde{z}}_k \right)\right] \cdot {\bf n}_\perp \, dl & \\ -+ -\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{top}}} \, dA & \\ -- -\int_{A} \left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{bot}} \right\}_{z = z^{\text{bot}}}\, dA -& = 0 +& + \int_{\partial A} \left[ \tilde{h}_k \, \left(\overline{\left<\varphi\right>}^{\tilde{z}}_k \overline{\left<{\bf u}\right>}^{\tilde{z}}_k + \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k + \overline{\left<\varphi^{\prime}{\bf u}^{\prime}\right>}^{\tilde{z}}_k \right)\right] \cdot {\bf n}_\perp \, dl & \\ +& + \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{\bf u}\right> -\left<\varphi^{\prime} \tilde{\bf u}^{\prime}\right> \right] \right\}_{z = z^{\text{top}}} \, dA & \\ +& - \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{\bf u}\right> - \left<\varphi^{\prime} \tilde{\bf u}^{\prime}\right> \right] \right\}_{z = z^{\text{bot}}}\, dA +& = 0. $$ Given that the horizontal area is not changing in time, we can move the time derivative through the first integral. We also invoke Green's Theorem for the second integral to convert that from a surface integral to an area integral. With these changes, the equation becomes $$ \int_A \bigl\{ \frac{\partial \tilde{h}_k \, \overline{\left<\varphi\right>}^{\tilde{z}}_k}{\partial t} -+ -\nabla \cdot \left[ \tilde{h}_k \, \left(\overline{\left<\varphi\right>}^{\tilde{z}}_k \overline{\left<{\bf u}\right>}^{\tilde{z}}_k + \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k + \overline{\left<\varphi^{\prime}{\bf u}^{\prime}\right>}^{\tilde{z}}_k \right)\right] & \\ -+ -\left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{top}} \right\}_{z = z^{\text{top}}} & \\ -- -\left\{ \rho_0 \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \rho_0 \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \rho_0\left[ \left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime} {\bf u}^{\prime}\right> \right] \cdot \nabla \tilde{z}^{\text{bot}} \right\}_{z = z^{\text{bot}}} \bigr\} \, dA -& = 0 -$$ (favre-reynolds-tracer-final) +& + \nabla \cdot \left[ \tilde{h}_k \, \left(\overline{\left<\varphi\right>}^{\tilde{z}}_k \overline{\left<{\bf u}\right>}^{\tilde{z}}_k + \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k + \overline{\left<\varphi^{\prime}{\bf u}^{\prime}\right>}^{\tilde{z}}_k \right)\right] & \\ +& + \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{\bf u}\right> - \left<\varphi^{\prime} \tilde{\bf u}^{\prime}\right> \right] \right\}_{z = z^{\text{top}}} & \\ +& - \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{\bf u}\right> - \left<\varphi^{\prime} \tilde{\bf u}^{\prime}\right> \right] \right\}_{z = z^{\text{bot}}} \bigr\} \, dA +& = 0. +$$ (reynolds-tracer-final) -A few comments on the last two lines of [](#favre-reynolds-tracer-final). If only the first two terms of the integrals are retained, this represents the vertical advective and turbulent fluxes for a finite volume framework. The second two terms represent the projection of the horizontal advective and turbulent fluxes into the direction normal to the sloping surface. When the coordinate surfaces are flat $\nabla \tilde{z}^{\text{top}} = \nabla \tilde{z}^{\text{bot}} = 0$ and the vertical fluxes are aligned with the normal to the coordinate surface reducing the equation to the expected z-coordinate, finite volume, formulation. +A few comments on the last two lines of [](#reynolds-tracer-final). If only the first two terms of the integrals are retained, this represents the vertical advective and turbulent fluxes for a finite volume framework. The second two terms represent the projection of the horizontal advective and turbulent fluxes into the direction normal to the sloping surface. When the coordinate surfaces are flat $\nabla \tilde{z}^{\text{top}} = \nabla \tilde{z}^{\text{bot}} = 0$ and the vertical fluxes are aligned with the normal to the coordinate surface reducing the equation to the expected z-coordinate, finite volume, formulation. Finally, given that the area integral operates on the entire equation, it is valid for any area and we can take the limit as $A \rightarrow 0$ to arrive at the final tracer equation -tracer: +**Tracer:** $$ -\frac{\partial {\tilde h}_k \overline{\left<\varphi\right>}^{\tilde{z}}_k }{\partial t} -+ - \nabla \cdot \left({\tilde h}_k \overline{\left<\varphi\right>}^{\tilde{z}}_k \overline{\left<{\bf u}\right>}^{\tilde{z}}_k\right) - + \rho_0 \left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> - \left<\varphi\right>\left<{\bf u}\right> \cdot \nabla \tilde{z}^{\text{top}} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} & \\ - - \rho_0 \left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> - \left<\varphi\right>\left<{\bf u}\right> \cdot \nabla \tilde{z}^{\text{bot}} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} -= & \\ -- \nabla \cdot \left({\tilde h}_k \overline{\left<\varphi^{\prime} {\bf u}^{\prime}\right>}^{\tilde{z}}_k \, + {\tilde h}_k \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right) & \\ -- \rho_0 \left\{ \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime {\bf u}^{\prime}\right> \cdot \nabla \tilde{z}^{\text{top}} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{top}}} - \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime {\bf u}^{\prime}\right> \cdot \nabla \tilde{z}^{\text{bot}}\right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}}\right\}. +\frac{\partial {\tilde h}_k \overline{\left<\varphi\right>}^{\tilde{z}}_k }{\partial t} & + \nabla \cdot \left({\tilde h}_k \overline{\left<\varphi\right>}^{\tilde{z}}_k \overline{\left<{\bf u}\right>}^{\tilde{z}}_k\right) \\ +& + \rho_0 \left\{ \left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> - \left<\varphi\right>\left<\tilde{\bf u}\right> \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} - \left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> - \left<\varphi\right>\left<\tilde{\bf u}\right> \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} \right\} \\ +& = - \nabla \cdot \left({\tilde h}_k \overline{\left<\varphi^{\prime} {\bf u}^{\prime}\right>}^{\tilde{z}}_k \, + {\tilde h}_k \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right) \\ +& - \rho_0 \left\{ \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{\bf u}^{\prime}\right> \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{top}}} - \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{\bf u}^{\prime}\right> \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}}\right\}. $$ (layer-tracer) -A few notes on the layer averaged tracer equation. In this complete form, it includes three types of fluctuating quantities that must be dealt with: (1) the vertically density weighted, Favre averaged turbulent flux $\left(\overline{\widehat{\varphi^{\prime \prime} {\bf u}^{\prime \prime}}}^{\tilde{z}}_k \right)$, (2) the Reynolds' average turbulent flux $\left( \left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> \right)$, and (3) the vertical integral of the product of deviations from the layer integrated variables $\left(\overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right)$. The details of the first two quantities will be discussed later in this document and follow on design documents. The terms involving perturbations from the layer integrated quantity are necessary to extend beyond piecewise constant represenation of variables. In this equation, variables with no overline are the full field variable at the interfaces. - -In the parameterization of the horizontal Favre turbulent flux, it will be important to keep in mind that it is also the density weighted vertical average that could cause complications. This is discussed further later in this document. +A few notes on the layer averaged tracer equation. In this complete form, it includes three types of fluctuating quantities that must be dealt with: (1) the layer averaged, Reynolds' averaged horizontal turbulent flux $\left( \overline{\left<\varphi^{\prime} {\bf u}^{\prime}\right>}^{\tilde{z}}_k \right)$, (2) the Reynolds' average vertical turbulent flux $\left( \left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime {\bf u}_{proj}^{\prime}\right> \right)$, and (3) the layer averaged product of deviations from the layer integrated variables $\left(\overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right)$. The details of the first two quantities will be discussed later in this document and follow on design documents. The terms involving perturbations from the layer integrated quantity are necessary to extend beyond piecewise constant represenation of variables. In this equation, variables with no overline are the full field variable at the interfaces. The mass equation is identical to the tracer equation with $\varphi=1$. -mass: +**Mass:** $$ \frac{\partial {\tilde h}_k }{\partial t} -+ - \nabla \cdot \left({\tilde h}_k \overline{\left<{\bf u}\right>}^{\tilde{z}}_k\right) - + \rho_0 \left[ \left<{\tilde w}_{tr}\right> - \left<{\bf u}\right> \cdot \nabla \tilde{z}^{\text{top}} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} - - \rho_0 \left[ \left<{\tilde w}_{tr}\right> - \left<{\bf u}\right> \cdot \nabla \tilde{z}^{\text{bot}} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} -= 0 ++ \nabla \cdot \left({\tilde h}_k \overline{\left<{\bf u}\right>}^{\tilde{z}}_k\right) ++ \rho_0 \left[ \left<{\tilde w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} +- \rho_0 \left[ \left<{\tilde w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} += 0. $$ (layer-mass) ### Momentum From 8b719e63803c4f0819a3165c44f5ac794c7e785b Mon Sep 17 00:00:00 2001 From: Kat Smith Date: Wed, 9 Jul 2025 16:25:31 -0700 Subject: [PATCH 50/65] cleans up design doc from tracers through mom in section 9 --- .../omega/doc/design/OmegaV1GoverningEqns.md | 217 +++++++----------- 1 file changed, 79 insertions(+), 138 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 369388aa004b..76c77d206d39 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -489,20 +489,14 @@ We now derive the horizontal momentum equation in our non-Boussinesq, hydrostati We begin from [](#vh-momentum-pseudo) and specify the body forces ${\bf b}$ and surface forces ${\bf f}$ $$ -\frac{d}{dt} \int_{A} \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} {\bf u} \, d\tilde{z} \, dA -&+ -\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} {\bf u} \otimes {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ -&+ -\int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA -- -\int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ -&= --\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \left({\bf f} \times \mathbf{u} + \nabla \Phi \right) \, d\tilde{z} \, dA -+ -\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \frac{\rho_0 p}{\rho} \, d\tilde{z} \right) dl \\ -&\quad -+ \int_A \left[ \frac{\rho_0 p}{\rho} \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA -- \int_A \left[ \frac{\rho_0 p}{\rho} \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. +\frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} {\bf u} \, d\tilde{z} \, dA +& + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} {\bf u} \otimes {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ +& + \int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +- \int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ +& = -\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \left({\bf f} \times \mathbf{u} + \nabla \Phi \right) \, d\tilde{z} \, dA ++ \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \frac{\rho_0 p}{\rho} \, d\tilde{z} \right) dl \\ +& + \int_A \left[ \frac{\rho_0 p}{\rho} \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +- \int_A \left[ \frac{\rho_0 p}{\rho} \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. $$ (vh-momentum-forces) In this equation: @@ -514,153 +508,105 @@ In this equation: As with the tracer derivation, we next Reynolds' average [](#vh-momentum-forces), $$ -\frac{d}{dt} \int_{A} \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left< {\bf u} \right> \, d\tilde{z} \, dA -&+ -\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left< {\bf u} \otimes {\bf u} \right> \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ -&+ -\int_A \rho_0 \,\left< {\bf u} \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \right> \, dA -- -\int_A \rho_0 \, \left< {\bf u} \left[ \tilde{w}_{tr} - {\bf u} \cdot \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right> \, dA \\ -&= --\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \, \left<\left( {\bf f} \times \mathbf{u} + \nabla \Phi \right) \right> \, d\tilde{z} \, dA -+ -\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \left< \frac{p}{\rho} \right> \, d\tilde{z} \right) dl \\ -&\quad -+ \int_A \left[ \rho_0 \left< \frac{p}{\rho} \nabla \tilde{z}^{\text{top}} \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA -- \int_A \left[ \rho_0 \left< \frac{p}{\rho} \nabla \tilde{z}^{\text{top}} \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. +\frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left< {\bf u} \right> \, d\tilde{z} \, dA +& + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left< {\bf u} \otimes {\bf u} \right> \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ +& + \int_A \rho_0 \,\left< {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \right> \, dA +- \int_A \rho_0 \, \left< {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right> \, dA \\ +& = -\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \, \left<\left( {\bf f} \times \mathbf{u} + \nabla \Phi \right) \right> \, d\tilde{z} \, dA ++ \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \left< \frac{p}{\rho} \right> \, d\tilde{z} \right) dl \\ +& + \int_A \rho_0 \left[ \left< \frac{p}{\rho} \nabla \tilde{z}^{\text{top}} \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +- \int_A \rho_0 \left[ \left< \frac{p}{\rho} \nabla \tilde{z}^{\text{bot}} \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. $$ (vh-momentum-reynolds1) -Here we have also moved the Reynolds' average through the spatial integrals given the properties of the averaging. Next we do a Reynolds' decomposition, and again assume that $\nabla \tilde{z}$ terms do not contribute to turbulent correlations, this yields +Here we have also moved the Reynolds' average through the spatial integrals given the properties of the averaging. Next we do a Reynolds' decomposition, this yields $$ -\frac{d}{dt} \int_{A} \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left< {\bf u} \right> \, d\tilde{z} \, dA -&+ -\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left( \left< {\bf u} \right> \otimes \left< {\bf u} \right> + \left< {\bf u}^\prime \otimes {\bf u}^\prime \right> \right) \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ -&+ -\int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<{\bf u}\right> + \left< {\bf u}^\prime {\bf u}^\prime \right> \right) \cdot \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ -&- -\int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<{\bf u}\right> + \left< {\bf u}^\prime {\bf u}^\prime \right> \right) \cdot \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ -&= --\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \, \left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right) \, d\tilde{z} \, dA \\ -&+ -\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \, d\tilde{z} \right) dl \\ -&\quad -+ \int_A \left[ \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA -- \int_A \left[ \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. +\frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left< {\bf u} \right> \, d\tilde{z} \, dA +& + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left( \left< {\bf u} \right> \otimes \left< {\bf u} \right> + \left< {\bf u}^\prime \otimes {\bf u}^\prime \right> \right) \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ +& + \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ +& - \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ +& = - \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \, \left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right) \, d\tilde{z} \, dA \\ +& + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \, d\tilde{z} \right) dl \\ +& + \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}}\right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ +& - \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}}\right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. $$ (vh-momentum-reynolds2) -In [](#vh-momentum-reynolds2) we have also used $\alpha = \frac{1}{\rho}$ for notation conciseness. The definition of the layer average ([](#def-layer-average)) is now utilized on terms with vertical integrals to yield +In [](#vh-momentum-reynolds2) we have also used $\alpha = \frac{1}{\rho}$ for notation conciseness. The definition of the layer average [](#def-layer-average-reynolds) is now utilized on terms with vertical integrals to yield $$ -\frac{d}{dt} \int_{A} \tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \, dA -&+ -\int_{\partial A} \tilde{h}_k \left( \overline{\left< {\bf u} \right> \otimes \left< {\bf u} \right>}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \cdot {\bf n}_\perp \, dl \\ -&+ -\int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<{\bf u}\right> + \left< {\bf u}^\prime {\bf u}^\prime \right> \right) \cdot \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ -&- -\int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<{\bf u}\right> + \left< {\bf u}^\prime {\bf u}^\prime \right> \right) \cdot \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ -&= --\int_A \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \, dA \\ -&+ -\int_{\partial A} \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right> \left

}^{\tilde{z}}_k + \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right] \right) dl \\ -&\quad -+ \int_A \left[ \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA -- \int_A \left[ \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. +\frac{d}{dt} \int_A \tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \, dA +& + \int_{\partial A} \tilde{h}_k \left( \overline{\left< {\bf u} \right> \otimes \left< {\bf u} \right>}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \cdot {\bf n}_\perp \, dl \\ +& + \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ +& - \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ +& = - \int_A \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \, dA \\ +& + \int_{\partial A} \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right> \left

}^{\tilde{z}}_k + \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) dl \\ +& + \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ +& - \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. $$ (vh-momentum-reynolds-lay-avg) The next step is to decompose vertical averages of products. This yields $$ \frac{d}{dt} \int_{A} \tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \, dA -&+ -\int_{\partial A} \tilde{h}_k \left( \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \otimes \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \cdot {\bf n}_\perp \, dl \\ -&+ -\int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<{\bf u}\right> + \left< {\bf u}^\prime {\bf u}^\prime \right> \right) \cdot \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ -&- -\int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<{\bf u}\right> + \left< {\bf u}^\prime {\bf u}^\prime \right> \right) \cdot \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ -&= --\int_A \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \, dA \\ -&+ -\int_{\partial A} \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] dl \\ -&\quad -+ \int_A \left[ \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA -- \int_A \left[ \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. +& + \int_{\partial A} \tilde{h}_k \left( \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \otimes \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \cdot {\bf n}_\perp \, dl \\ +& + \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ +& - \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ +& = - \int_A \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \, dA \\ +& + \int_{\partial A} \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) dl \\ +& + \int_A \rho_0 \left[\left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ +& - \int_A \rho_0 \left[\left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. $$ (vh-momentum-reynolds-lay-avg2) We next use the Divergence theorem on the surface integrals and combine terms into fewer integrals on each side of the equation. $$ -\int_{A} \bigl\{ \frac{\partial\tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} -&+ -\nabla \cdot \left[ \tilde{h}_k \left(\overline{\left< {\bf u} \right>}^{\tilde{z}}_k \otimes \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ -&+ -\rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<{\bf u}\right> + \left< {\bf u}^\prime {\bf u}^\prime \right> \right) \cdot \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ -&- -\rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<{\bf u}\right> + \left< {\bf u}^\prime {\bf u}^\prime \right> \right) \cdot \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \bigr\} \, dA \\ -&= --\int_A \bigl\{ \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ -&+ -\nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ -&\quad -+ \left[ \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} -- \left[ \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}\bigr\} \, dA. +\int_A \bigl\{ \frac{\partial\tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} +& + \nabla \cdot \left[ \tilde{h}_k \left(\overline{\left< {\bf u} \right>}^{\tilde{z}}_k \otimes \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ +& + \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ +& - \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \bigr\} \, dA \\ +& = - \int_A \bigl\{ \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ +& + \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ +& + \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ +& - \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}\bigr\} \, dA. $$ (vh-momentum-reynolds-lay-avg3) Since the equation is fully inside the integral, the equation is true for any area and therefore we can write the layer averaged momentum equation as $$ \frac{\partial\tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} -&+ -\nabla \cdot \left[ \tilde{h}_k \left( \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \otimes \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ -&+ -\rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<{\bf u}\right> + \left< {\bf u}^\prime {\bf u}^\prime \right> \right) \cdot \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ -&- -\rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<{\bf u}\right> + \left< {\bf u}^\prime {\bf u}^\prime \right> \right) \cdot \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \\ -&= -\rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ -&+ -\nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ -&\quad -+ \left[ \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} -- \left[ \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. +& + \nabla \cdot \left[ \tilde{h}_k \left( \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \otimes \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ +& + \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ +& - \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \\ +& = - \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ +& + \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ +& + \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \cdot \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ +& - \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \cdot \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. $$ (vh-momentum-v1) The product rule is used on the first two terms of [](#vh-momentum-v1) and then we multiply [](#layer-mass) by $\overline{\mathbf{u}}^{\tilde{z}}_k$ and subtract it from [](#vh-momentum-v1). This yields $$ \tilde{h}_k \frac{\partial \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} -&+ -\tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \cdot \nabla \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \nabla \cdot \left[ \tilde{h}_k \left(\overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ -&+ -\rho_0 \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{ \left[ \left<\tilde{w}_{tr}\right> - \left<\mathbf{u}\right> \cdot \nabla \tilde{z}^{top} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\tilde{w}_{tr}\right> - \left<\mathbf{u}\right> \cdot \nabla \tilde{z}^{bot} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ -&+ -\rho_0 \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \mathbf{u}^\prime \right> \cdot \nabla \tilde{z}^{top}\right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \mathbf{u}^\prime \right> \cdot \nabla \tilde{z}^{bot}\right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ -&= -\rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ -&+ -\nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ -&\quad -+ \left[ \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} -- \left[ \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. +& + \tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \cdot \nabla \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \nabla \cdot \left[ \tilde{h}_k \left(\overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ +& + \rho_0 \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{ \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +& + \rho_0 \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +& = - \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ +& + \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ +& + \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ +& - \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. $$ (vh-momentum-v2) The previous equation is divided by $\tilde{h}_k$, $$ \frac{\partial \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} -&+ -\overline{\left< {\bf u} \right>}^{\tilde{z}}_k \cdot \nabla \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \frac{1}{\tilde{h}_k} \nabla \cdot \left[ \tilde{h}_k \left(\overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ -&+ -\frac{\rho_0}{\tilde{h}_k} \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{ \left[ \left<\tilde{w}_{tr}\right> - \left<\mathbf{u}\right> \cdot \nabla \tilde{z}^{top} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\tilde{w}_{tr}\right> - \left<\mathbf{u}\right> \cdot \nabla \tilde{z}^{bot} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ -&+ -\frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \mathbf{u}^\prime \right> \cdot \nabla \tilde{z}^{top}\right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \mathbf{u}^\prime \right> \cdot \nabla \tilde{z}^{bot}\right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ -&= -\rho_0 \, \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ -&+ -\frac{1}{\tilde{h}_k} \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ -&\quad -+ \left[ \frac{\rho_0}{\tilde{h}_k} \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} -- \left[ \frac{\rho_0}{\tilde{h}_k} \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. +& + \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \cdot \nabla \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \frac{1}{\tilde{h}_k} \nabla \cdot \left[ \tilde{h}_k \left(\overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ +& + \frac{\rho_0}{\tilde{h}_k} \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{ \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +& = - \rho_0 \, \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ +& + \frac{1}{\tilde{h}_k} \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ +& + \frac{\rho_0}{\tilde{h}_k} \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ +& - \frac{\rho_0}{\tilde{h}_k} \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. $$ (vh-momentum-v3) @@ -669,10 +615,10 @@ The $\overline{\bf u}^{\tilde{z}}_k \cdot \nabla \overline{\bf u}^{\tilde{z}}_k$ $$ \begin{aligned} \overline{\left<{\bf u}\right>}^{\tilde{z}}_k \cdot \nabla \overline{\left<{\bf u}\right>}^{\tilde{z}}_k -&= (\nabla \times \overline{\left<{\bf u}\right>}^{\tilde{z}}_k) \times \overline{\left<{\bf u}\right>}^{\tilde{z}}_k + \nabla \frac{\left|\overline{\left<{\bf u}\right>}^{\tilde{z}}_k\right|^2}{2} \\ -&= \left( \hat{k} \cdot (\nabla_\perp\times \overline{\left<{\bf u}\right>}^{\tilde{z}}_k)\right) +& = (\nabla \times \overline{\left<{\bf u}\right>}^{\tilde{z}}_k) \times \overline{\left<{\bf u}\right>}^{\tilde{z}}_k + \nabla \frac{\left|\overline{\left<{\bf u}\right>}^{\tilde{z}}_k\right|^2}{2} \\ +& = \left( \hat{k} \cdot (\nabla_\perp\times \overline{\left<{\bf u}\right>}^{\tilde{z}}_k)\right) \left( \hat{k} \times \overline{\left<{\bf u}\right>}^{\tilde{z}}_k \right) + \nabla_\perp\frac{\left|\overline{\left<{\bf u}\right>}^{\tilde{z}}_k\right|^2}{2} \\ -&= \zeta {\overline{\left<{\bf u}\right>}^{\tilde{z}}_k}^{\perp} + \nabla K. +& = \zeta {\overline{\left<{\bf u}\right>}^{\tilde{z}}_k}^{\perp} + \nabla K. \end{aligned} $$ (advection-identity) @@ -690,17 +636,12 @@ Defining the absolute vorticity $\zeta_a$ as $\zeta + f$, where $f$ is the Corio $$ \frac{\partial \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} -&+ - \zeta_a {\overline{\left<{\bf u}\right>}^{\tilde{z}}_k}^{\perp} + \nabla K + \frac{1}{\tilde{h}_k} \nabla \cdot \left[ \tilde{h}_k \left(\overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ -&+ -\frac{\rho_0}{\tilde{h}_k} \left\{ \left[\left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{\left<\tilde{w}_{tr}\right> - \left<\mathbf{u}\right> \cdot \nabla \tilde{z}^{top} \right\} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{\left<\tilde{w}_{tr}\right> - \left<\mathbf{u}\right> \cdot \nabla \tilde{z}^{bot} \right\} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ -&+ -\frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \mathbf{u}^\prime \right> \cdot \nabla \tilde{z}^{top}\right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \mathbf{u}^\prime \right> \cdot \nabla \tilde{z}^{bot}\right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ -&= -\rho_0 \, \overline{\nabla \left<\Phi\right>}^{\tilde{z}}_k + \frac{1}{\tilde{h}_k} \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ -&\quad -+ \left[ \frac{\rho_0}{\tilde{h}_k} \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} -- \left[ \frac{\rho_0}{\tilde{h}_k} \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. +& + \zeta_a {\overline{\left<{\bf u}\right>}^{\tilde{z}}_k}^{\perp} + \nabla K + \frac{1}{\tilde{h}_k} \nabla \cdot \left[ \tilde{h}_k \left(\overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ +& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[\left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{\left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right\} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{\left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right\} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +& = - \rho_0 \, \overline{\nabla \left<\Phi\right>}^{\tilde{z}}_k + \frac{1}{\tilde{h}_k} \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ +& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} +- \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\}. $$ (layer-momentum-final) ### Simplifying Assumptions From 9e2b98fda9b6175a130779853a556ace08d6156d Mon Sep 17 00:00:00 2001 From: vanroekel Date: Fri, 11 Jul 2025 14:09:13 -0700 Subject: [PATCH 51/65] updates through discrete equations --- .../omega/doc/design/OmegaV1GoverningEqns.md | 305 +++++++++++------- 1 file changed, 181 insertions(+), 124 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 76c77d206d39..688e90feb661 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -72,7 +72,7 @@ $$ + \int_{\partial V(t)}\rho({\bf x},t)\, {\bf v}({\bf x},t) \left({\bf v}({\bf x},t) - {\bf v}_r \right) \cdot {\bf n} \, dA \\ & \; \; \; = \int_{V(t)} \rho({\bf x},t) \, {\bf b}({\bf x},t)\, dV -+ \int_{\partial V(t)} {\bf f}({\bf n},{\bf x},t) \, dA ++ \int_{\partial V(t)} {\bf \tau}({\bf n},{\bf x},t) \, dA $$ (continuous-momentum) The operator $\frac{d}{dt}$ used here denotes the rate of change within a moving control volume, sometimes referred to as a Reynolds transport derivative. It differs from the partial derivative $\frac{\partial}{\partial t}$, which represents the local rate of change at a fixed point in space (Eulerian frame), and from the material derivative $\frac{D}{Dt}$, which follows an individual fluid parcel (Lagrangian frame). The use of $\frac{d}{dt}$ allows for conservation laws to be expressed in a general framework that includes both stationary and moving control volumes, consistent with the Reynolds transport theorem. @@ -228,23 +228,21 @@ This gives the relative pseudo-mass flux through the interface per unit referenc In the flux integrals below, we express all surface-normal transport using $\tilde{w}_{tr}$, i.e., $$ -\rho_0 \varphi \left[ \tilde{w}_{tr} - \tilde{\bf u} \right] -= \rho_0 \varphi \left[ \tilde{w} - \tilde{w}_r - \tilde{\bf u} \right] +\rho_0 \varphi \left[ \tilde{w}_{tr} - \tilde{ u} \right] += \rho_0 \varphi \left[ \tilde{w} - \tilde{w}_r - \tilde{ u} \right] $$ (vertical-flux) -so that the vertical flux terms correctly account for both the local motion of the fluid and the motion of the interface itself. +so that the vertical flux terms correctly account for both the local motion of the fluid and the motion of the interface itself. Because both terms are scaled by $1/\rho_0$, the full flux is multiplied by $\rho_0$ to recover a physical mass flux. This ensures dimensional consistency and physical equivalence to the traditional form $\rho w - \rho {\bf u} \cdot \nabla z$ expressed in geometric-height coordinates. -The quantity $\tilde{w}$ from equation [](#w-tilde) is the pseudo-velocity. The second term, $\tilde{\bf u} = {\bf u} \cdot \nabla \tilde{z}^{\text{top}}$, captures the component of horizontal velocity advecting material across a sloping pseudo-height interface. Together, the expression in brackets represents the **net vertical transport** through a surface of constant $\tilde{z}$. - -Because both terms are scaled by $1/\rho_0$, the full flux is multiplied by $\rho_0$ to recover a physical mass flux. This ensures dimensional consistency and physical equivalence to the traditional form $\rho w - \rho {\bf u} \cdot \nabla z$ expressed in geometric-height coordinates. +The quantity $\tilde{w}$ from equation [](#w-tilde) is the pseudo-velocity. The second term, $\tilde{ u} = {\bf u} \cdot \nabla \tilde{z}^{\text{top}}$, captures the component of horizontal velocity advecting material across a sloping pseudo-height interface. Together, the expression in brackets represents the **net vertical transport** through a surface of constant $\tilde{z}$. Using this projection, we obtain: $$ \frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \, \varphi \, d\tilde{z} \, dA & + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \varphi \, {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ -& + \int_A \rho_0 \varphi \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} dA \\ -& - \int_A \rho_0 \varphi \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} dA +& + \int_A \rho_0 \varphi \left[ \tilde{w}_{tr} - \tilde{ u} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} dA \\ +& - \int_A \rho_0 \varphi \left[ \tilde{w}_{tr} - \tilde{ u} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} dA = 0 $$ (tr-vh-separation-pseudo) @@ -259,8 +257,8 @@ Similar expressions to [](#tr-vh-separation-pseudo) hold for mass and momentum: $$ \frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \, d\tilde{z} \, dA & + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \, {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ -& + \int_A \rho_0 \left[ \tilde{w}_{tr} - \tilde{\bf u} \right] dA \\ -& - \int_A \rho_0 \left[ \tilde{w}_{tr} - \tilde{\bf u} \right] dA +& + \int_A \rho_0 \left[ \tilde{w}_{tr} - \tilde{ u} \right] dA \\ +& - \int_A \rho_0 \left[ \tilde{w}_{tr} - \tilde{ u} \right] dA = 0 $$ (vh-mass-pseudo) @@ -269,8 +267,8 @@ $$ (vh-mass-pseudo) $$ \frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \varphi \, d\tilde{z} \, dA & + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \varphi \, {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl & \\ -& + \int_A \left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - \tilde{\bf u} \right] \right\}_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA & \\ -& - \int_A \left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - \tilde{\bf u} \right] \right\}_{\tilde{z} = \tilde{z}^{\text{bot}}}\, dA +& + \int_A \left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - \tilde{ u} \right] \right\}_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA & \\ +& - \int_A \left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - \tilde{ u} \right] \right\}_{\tilde{z} = \tilde{z}^{\text{bot}}}\, dA & = 0 $$ (vh-tracer-pseudo) @@ -281,16 +279,16 @@ $$ &+ \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \, {\bf u} \otimes {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ &+ -\int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +\int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - \tilde{ u} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA - -\int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ +\int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - \tilde{ u} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ &= -\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 {\bf b}_{\perp} \, d\tilde{z} \, dA +\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} {\bf b}_{\perp} \, d\tilde{z} \, dA + -\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \frac{\rho_0 {\bf f}}{\rho} \, d\tilde{z} \right) dl \\ +\int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \frac{{\bf \tau}}{\rho} \, d\tilde{z} \right) dl \\ &\quad -+ \int_A \left[ \frac{\rho_0 {\bf f}}{\rho} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA -- \int_A \left[ \frac{\rho_0 {\bf f}}{\rho} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA ++ \int_A \left[ \frac{{\bf \tau}}{\rho} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +- \int_A \left[ \frac{{\bf \tau}}{\rho} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA $$ (vh-momentum-pseudo) These equations express horizontal and vertical fluxes naturally in terms of pseudo-height, enabling fully consistent discretization in the vertical coordinate used for prognostic evolution. @@ -398,8 +396,8 @@ We first Reynolds' average [](#vh-tracer-pseudo) and given the definition of the $$ \frac{d}{dt} \int_A \int_{\tilde{z}_{k+1}^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \left<\varphi\right> \, d\tilde{z} \, dA & + \int_{\partial A} \left( \int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \left<\varphi \, {\bf u} \right> \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl & \\ -& + \int_A \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - \tilde{\bf u} \right] \right\}\right>_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA & \\ -& - \int_A \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - \tilde{\bf u} \right] \right\}\right>_{\tilde{z} = \tilde{z}^{\text{bot}}}\, dA +& + \int_A \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - \tilde{ u} \right] \right\}\right>_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA & \\ +& - \int_A \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - \tilde{ u} \right] \right\}\right>_{\tilde{z} = \tilde{z}^{\text{bot}}}\, dA & = 0. $$ (Aintegral-tracer-reynolds) @@ -409,8 +407,8 @@ $$ \frac{d}{dt} \int_A \int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \left<\varphi \right> \, d\tilde{z} \, dA & + \int_{\partial A} \left( \int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \left(\left<{\varphi}\right>\left<{\bf u}\right> + \left<\varphi^{\prime}{\bf u}^{\prime}\right> \right) d\tilde{z} \right) \, \cdot {\bf n}_\perp \, dl & \\ -& + \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{\bf u}\right> -\left<\varphi^{\prime} \tilde{\bf u}^{\prime}\right> \right] \right\}_{z = z^{\text{top}}} \, dA & \\ -& - \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{\bf u}\right> - \left<\varphi^{\prime} \tilde{\bf u}^{\prime}\right> \right] \right\}_{z = z^{\text{bot}}}\, dA +& + \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> -\left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{z = z^{\text{top}}} \, dA & \\ +& - \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> - \left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{z = z^{\text{bot}}}\, dA & = 0. $$ (Aintegral-tracer-reynolds) @@ -418,9 +416,9 @@ We can rewrite the first two terms in [](#Aintegral-tracer-reynolds) using [](#d $$ \frac{d}{dt} \int_A \tilde{h}_k \, \overline{\left<\varphi\right>}^{\tilde{z}}_k \, dA -& + \int_{\partial A} \left( \tilde{h}_k \, \overline{\left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime}{\bf u}^{\prime}\right>}^{\tilde{z}}_k \right) \cdot {\bf n}_\perp \, dl & \\ -& + \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{\bf u}\right> -\left<\varphi^{\prime} \tilde{\bf u}^{\prime}\right> \right] \right\}_{z = z^{\text{top}}} \, dA & \\ -& - \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{\bf u}\right> - \left<\varphi^{\prime} \tilde{\bf u}^{\prime}\right> \right] \right\}_{z = z^{\text{bot}}}\, dA +& + \int_{\partial A} \left( \tilde{h}_k \, \left[\overline{\left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime}{\bf u}^{\prime}\right>}^{\tilde{z}}_k \right] \right) \cdot {\bf n}_\perp \, dl & \\ +& + \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> -\left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{z = z^{\text{top}}} \, dA & \\ +& - \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> - \left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{z = z^{\text{bot}}}\, dA & = 0. $$ (Aintegral-tracer2) @@ -429,8 +427,8 @@ The second term is expanded utilizing [](#vertical-decomposition) $$ \frac{d}{dt} \int_A \tilde{h}_k \, \overline{\left<\varphi\right>}^{\tilde{z}}_k \, dA & + \int_{\partial A} \left( \tilde{h}_k \, \overline{\left(\overline{\left<\varphi\right>}^{\tilde{z}}_k + \delta \varphi\right)\left(\overline{\left<{\bf u}\right>}^{\tilde{z}}_k + \delta {\bf u}\right)}^{\tilde{z}}_k + \tilde{h}_k \overline{\left<\varphi^{\prime}{\bf u}^{\prime}\right>}^{\tilde{z}}_k \right) \cdot {\bf n}_\perp \, dl & \\ -& + \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{\bf u}\right> -\left<\varphi^{\prime} \tilde{\bf u}^{\prime}\right> \right] \right\}_{z = z^{\text{top}}} \, dA & \\ -& - \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{\bf u}\right> - \left<\varphi^{\prime} \tilde{\bf u}^{\prime}\right> \right] \right\}_{z = z^{\text{bot}}}\, dA +& + \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> -\left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{z = z^{\text{top}}} \, dA & \\ +& - \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> - \left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{z = z^{\text{bot}}}\, dA & = 0. $$ (Aintegral-tracer2) @@ -439,8 +437,8 @@ And then is simplified using [](#delta-vert-average) $$ \frac{d}{dt} \int_A \tilde{h}_k \, \overline{\left<\varphi\right>}^{\tilde{z}}_k \, dA & + \int_{\partial A} \left[ \tilde{h}_k \, \left(\overline{\left<\varphi\right>}^{\tilde{z}}_k \overline{\left<{\bf u}\right>}^{\tilde{z}}_k + \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k + \overline{\left<\varphi^{\prime}{\bf u}^{\prime}\right>}^{\tilde{z}}_k \right)\right] \cdot {\bf n}_\perp \, dl & \\ -& + \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{\bf u}\right> -\left<\varphi^{\prime} \tilde{\bf u}^{\prime}\right> \right] \right\}_{z = z^{\text{top}}} \, dA & \\ -& - \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{\bf u}\right> - \left<\varphi^{\prime} \tilde{\bf u}^{\prime}\right> \right] \right\}_{z = z^{\text{bot}}}\, dA +& + \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> -\left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{z = z^{\text{top}}} \, dA & \\ +& - \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> - \left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{z = z^{\text{bot}}}\, dA & = 0. $$ @@ -449,8 +447,8 @@ Given that the horizontal area is not changing in time, we can move the time der $$ \int_A \bigl\{ \frac{\partial \tilde{h}_k \, \overline{\left<\varphi\right>}^{\tilde{z}}_k}{\partial t} & + \nabla \cdot \left[ \tilde{h}_k \, \left(\overline{\left<\varphi\right>}^{\tilde{z}}_k \overline{\left<{\bf u}\right>}^{\tilde{z}}_k + \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k + \overline{\left<\varphi^{\prime}{\bf u}^{\prime}\right>}^{\tilde{z}}_k \right)\right] & \\ -& + \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{\bf u}\right> - \left<\varphi^{\prime} \tilde{\bf u}^{\prime}\right> \right] \right\}_{z = z^{\text{top}}} & \\ -& - \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{\bf u}\right> - \left<\varphi^{\prime} \tilde{\bf u}^{\prime}\right> \right] \right\}_{z = z^{\text{bot}}} \bigr\} \, dA +& + \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> - \left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{z = z^{\text{top}}} & \\ +& - \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> - \left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{z = z^{\text{bot}}} \bigr\} \, dA & = 0. $$ (reynolds-tracer-final) @@ -463,9 +461,9 @@ Finally, given that the area integral operates on the entire equation, it is val $$ \frac{\partial {\tilde h}_k \overline{\left<\varphi\right>}^{\tilde{z}}_k }{\partial t} & + \nabla \cdot \left({\tilde h}_k \overline{\left<\varphi\right>}^{\tilde{z}}_k \overline{\left<{\bf u}\right>}^{\tilde{z}}_k\right) \\ -& + \rho_0 \left\{ \left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> - \left<\varphi\right>\left<\tilde{\bf u}\right> \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} - \left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> - \left<\varphi\right>\left<\tilde{\bf u}\right> \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} \right\} \\ +& + \rho_0 \left\{ \left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> - \left<\varphi\right>\left<\tilde{ u}\right> \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} - \left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> - \left<\varphi\right>\left<\tilde{ u}\right> \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} \right\} \\ & = - \nabla \cdot \left({\tilde h}_k \overline{\left<\varphi^{\prime} {\bf u}^{\prime}\right>}^{\tilde{z}}_k \, + {\tilde h}_k \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right) \\ -& - \rho_0 \left\{ \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{\bf u}^{\prime}\right> \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{top}}} - \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{\bf u}^{\prime}\right> \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}}\right\}. +& - \rho_0 \left\{ \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{ u}^{\prime}\right> \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{top}}} - \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{ u}^{\prime}\right> \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}}\right\}. $$ (layer-tracer) A few notes on the layer averaged tracer equation. In this complete form, it includes three types of fluctuating quantities that must be dealt with: (1) the layer averaged, Reynolds' averaged horizontal turbulent flux $\left( \overline{\left<\varphi^{\prime} {\bf u}^{\prime}\right>}^{\tilde{z}}_k \right)$, (2) the Reynolds' average vertical turbulent flux $\left( \left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime {\bf u}_{proj}^{\prime}\right> \right)$, and (3) the layer averaged product of deviations from the layer integrated variables $\left(\overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right)$. The details of the first two quantities will be discussed later in this document and follow on design documents. The terms involving perturbations from the layer integrated quantity are necessary to extend beyond piecewise constant represenation of variables. In this equation, variables with no overline are the full field variable at the interfaces. @@ -477,8 +475,8 @@ The mass equation is identical to the tracer equation with $\varphi=1$. $$ \frac{\partial {\tilde h}_k }{\partial t} + \nabla \cdot \left({\tilde h}_k \overline{\left<{\bf u}\right>}^{\tilde{z}}_k\right) -+ \rho_0 \left[ \left<{\tilde w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} -- \rho_0 \left[ \left<{\tilde w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} ++ \rho_0 \left[ \left<{\tilde w}_{tr}\right> - \left<\tilde{ u}\right> \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} +- \rho_0 \left[ \left<{\tilde w}_{tr}\right> - \left<\tilde{ u}\right> \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} = 0. $$ (layer-mass) @@ -486,22 +484,22 @@ $$ (layer-mass) We now derive the horizontal momentum equation in our non-Boussinesq, hydrostatic framework, following the same finite-volume approach used for mass and tracer conservation. We work with a pseudo-height vertical coordinate $\tilde{z}$ as defined in [Pseudo-Height Coordinate Section](pseudo-height). -We begin from [](#vh-momentum-pseudo) and specify the body forces ${\bf b}$ and surface forces ${\bf f}$ +We begin from [](#vh-momentum-pseudo) and specify the body forces ${\bf b}$ and surface forces ${\bf \tau}$ $$ \frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} {\bf u} \, d\tilde{z} \, dA & + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} {\bf u} \otimes {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ -& + \int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA -- \int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ -& = -\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \left({\bf f} \times \mathbf{u} + \nabla \Phi \right) \, d\tilde{z} \, dA -+ \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \frac{\rho_0 p}{\rho} \, d\tilde{z} \right) dl \\ -& + \int_A \left[ \frac{\rho_0 p}{\rho} \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA -- \int_A \left[ \frac{\rho_0 p}{\rho} \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. +& + \int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - \tilde{ u} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +- \int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - \tilde{ u} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ +& = -\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left({\bf f} \times \mathbf{u} + \nabla \Phi \right) \, d\tilde{z} \, dA ++ \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \frac{p}{\rho} \, d\tilde{z} \right) dl \\ +& + \int_A \left[ \frac{p}{\rho} \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +- \int_A \left[ \frac{p}{\rho} \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. $$ (vh-momentum-forces) In this equation: -- The first term on the right hand side is the **Coriolis force**, where $ \mathbf{f} $ is the vector Coriolis parameter (e.g., $ f \hat{\mathbf{z}} $ on the sphere). +- The first term on the right hand side is the **Coriolis force**, where $ \mathbf{f} $ is the vector Coriolis vector (e.g., $ f \hat{\mathbf{z}} $ on the sphere). - The second term on the right hand side represents the **gravitational force**, expressed in terms of the gradient of the gravitational potential $ \Phi(x, y, z, t) $, which may include effects such as tides and self-attraction and loading. - The final terms are the **pressure force**, which acts on the boundary surfaces and is naturally expressed as a surface integral. It gives rise to both horizontal pressure gradients and contributions from sloping surfaces. @@ -510,12 +508,12 @@ As with the tracer derivation, we next Reynolds' average [](#vh-momentum-forces) $$ \frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left< {\bf u} \right> \, d\tilde{z} \, dA & + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left< {\bf u} \otimes {\bf u} \right> \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ -& + \int_A \rho_0 \,\left< {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \right> \, dA -- \int_A \rho_0 \, \left< {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right> \, dA \\ -& = -\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \, \left<\left( {\bf f} \times \mathbf{u} + \nabla \Phi \right) \right> \, d\tilde{z} \, dA -+ \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \left< \frac{p}{\rho} \right> \, d\tilde{z} \right) dl \\ -& + \int_A \rho_0 \left[ \left< \frac{p}{\rho} \nabla \tilde{z}^{\text{top}} \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA -- \int_A \rho_0 \left[ \left< \frac{p}{\rho} \nabla \tilde{z}^{\text{bot}} \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. +& + \int_A \rho_0 \,\left< {\bf u} \left[ \tilde{w}_{tr} - \tilde{ u} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \right> \, dA +- \int_A \rho_0 \, \left< {\bf u} \left[ \tilde{w}_{tr} - \tilde{ u} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right> \, dA \\ +& = -\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \, \left<\left( {\bf f} \times \mathbf{u} + \nabla \Phi \right) \right> \, d\tilde{z} \, dA ++ \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left< \frac{p}{\rho} \right> \, d\tilde{z} \right) dl \\ +& + \int_A \left[ \left< \frac{p}{\rho} \nabla \tilde{z}^{\text{top}} \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +- \int_A \left[ \left< \frac{p}{\rho} \nabla \tilde{z}^{\text{bot}} \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. $$ (vh-momentum-reynolds1) Here we have also moved the Reynolds' average through the spatial integrals given the properties of the averaging. Next we do a Reynolds' decomposition, this yields @@ -523,12 +521,12 @@ Here we have also moved the Reynolds' average through the spatial integrals give $$ \frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left< {\bf u} \right> \, d\tilde{z} \, dA & + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left( \left< {\bf u} \right> \otimes \left< {\bf u} \right> + \left< {\bf u}^\prime \otimes {\bf u}^\prime \right> \right) \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ -& + \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ -& - \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ -& = - \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \, \left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right) \, d\tilde{z} \, dA \\ -& + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \, d\tilde{z} \right) dl \\ -& + \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}}\right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ -& - \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}}\right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. +& + \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{ u}\right> + \left< {\bf u}^\prime \tilde{ u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ +& - \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{ u}\right> + \left< {\bf u}^\prime \tilde{ u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ +& = - \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \, \left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right) \, d\tilde{z} \, dA \\ +& + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \, d\tilde{z} \right) dl \\ +& + \int_A \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}}\right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ +& - \int_A \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}}\right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. $$ (vh-momentum-reynolds2) In [](#vh-momentum-reynolds2) we have also used $\alpha = \frac{1}{\rho}$ for notation conciseness. The definition of the layer average [](#def-layer-average-reynolds) is now utilized on terms with vertical integrals to yield @@ -536,12 +534,12 @@ In [](#vh-momentum-reynolds2) we have also used $\alpha = \frac{1}{\rho}$ for no $$ \frac{d}{dt} \int_A \tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \, dA & + \int_{\partial A} \tilde{h}_k \left( \overline{\left< {\bf u} \right> \otimes \left< {\bf u} \right>}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \cdot {\bf n}_\perp \, dl \\ -& + \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ -& - \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ -& = - \int_A \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \, dA \\ -& + \int_{\partial A} \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right> \left

}^{\tilde{z}}_k + \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) dl \\ -& + \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ -& - \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. +& + \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{ u}\right> + \left< {\bf u}^\prime \tilde{ u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ +& - \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{ u}\right> + \left< {\bf u}^\prime \tilde{ u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ +& = - \int_A \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \, dA \\ +& + \int_{\partial A} \tilde{h}_k \left( \overline{\left< \alpha \right> \left

}^{\tilde{z}}_k + \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) dl \\ +& + \int_A \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ +& - \int_A \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. $$ (vh-momentum-reynolds-lay-avg) The next step is to decompose vertical averages of products. This yields @@ -549,12 +547,12 @@ The next step is to decompose vertical averages of products. This yields $$ \frac{d}{dt} \int_{A} \tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \, dA & + \int_{\partial A} \tilde{h}_k \left( \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \otimes \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \cdot {\bf n}_\perp \, dl \\ -& + \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ -& - \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ -& = - \int_A \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \, dA \\ -& + \int_{\partial A} \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) dl \\ -& + \int_A \rho_0 \left[\left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ -& - \int_A \rho_0 \left[\left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. +& + \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{ u}\right> + \left< {\bf u}^\prime \tilde{ u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ +& - \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{ u}\right> + \left< {\bf u}^\prime \tilde{ u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ +& = - \int_A \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \, dA \\ +& + \int_{\partial A} \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) dl \\ +& + \int_A \left[\left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ +& - \int_A \left[\left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. $$ (vh-momentum-reynolds-lay-avg2) We next use the Divergence theorem on the surface integrals and combine terms into fewer integrals on each side of the equation. @@ -562,12 +560,12 @@ We next use the Divergence theorem on the surface integrals and combine terms in $$ \int_A \bigl\{ \frac{\partial\tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} & + \nabla \cdot \left[ \tilde{h}_k \left(\overline{\left< {\bf u} \right>}^{\tilde{z}}_k \otimes \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ -& + \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ -& - \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \bigr\} \, dA \\ -& = - \int_A \bigl\{ \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ -& + \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ -& + \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ -& - \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}\bigr\} \, dA. +& + \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{ u}\right> + \left< {\bf u}^\prime \tilde{ u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ +& - \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{ u}\right> + \left< {\bf u}^\prime \tilde{ u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \bigr\} \, dA \\ +& = - \int_A \bigl\{\tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ +& + \nabla \left[ \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ +& + \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ +& - \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}\bigr\} \, dA. $$ (vh-momentum-reynolds-lay-avg3) Since the equation is fully inside the integral, the equation is true for any area and therefore we can write the layer averaged momentum equation as @@ -575,12 +573,12 @@ Since the equation is fully inside the integral, the equation is true for any ar $$ \frac{\partial\tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} & + \nabla \cdot \left[ \tilde{h}_k \left( \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \otimes \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ -& + \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ -& - \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \\ -& = - \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ -& + \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ -& + \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \cdot \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ -& - \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \cdot \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. +& + \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{ u}\right> + \left< {\bf u}^\prime \tilde{ u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ +& - \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{ u}\right> + \left< {\bf u}^\prime \tilde{ u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \\ +& = - \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ +& + \nabla \left[ \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ +& + \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \cdot \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ +& - \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \cdot \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. $$ (vh-momentum-v1) The product rule is used on the first two terms of [](#vh-momentum-v1) and then we multiply [](#layer-mass) by $\overline{\mathbf{u}}^{\tilde{z}}_k$ and subtract it from [](#vh-momentum-v1). This yields @@ -588,12 +586,12 @@ The product rule is used on the first two terms of [](#vh-momentum-v1) and then $$ \tilde{h}_k \frac{\partial \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} & + \tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \cdot \nabla \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \nabla \cdot \left[ \tilde{h}_k \left(\overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ -& + \rho_0 \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{ \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ -& + \rho_0 \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ -& = - \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ -& + \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ -& + \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ -& - \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. +& + \rho_0 \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{ \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{ u}\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{ u}\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +& + \rho_0 \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +& = - \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ +& + \nabla \left[ \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ +& + \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ +& - \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. $$ (vh-momentum-v2) The previous equation is divided by $\tilde{h}_k$, @@ -601,12 +599,12 @@ The previous equation is divided by $\tilde{h}_k$, $$ \frac{\partial \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} & + \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \cdot \nabla \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \frac{1}{\tilde{h}_k} \nabla \cdot \left[ \tilde{h}_k \left(\overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ -& + \frac{\rho_0}{\tilde{h}_k} \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{ \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ -& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ -& = - \rho_0 \, \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ -& + \frac{1}{\tilde{h}_k} \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ -& + \frac{\rho_0}{\tilde{h}_k} \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ -& - \frac{\rho_0}{\tilde{h}_k} \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. +& + \frac{\rho_0}{\tilde{h}_k} \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{ \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{ u}\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{ u}\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +& = - \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ +& + \frac{1}{\tilde{h}_k} \nabla \left[ \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ +& + \frac{1}{\tilde{h}_k} \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ +& - \frac{1}{\tilde{h}_k} \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. $$ (vh-momentum-v3) @@ -637,52 +635,111 @@ Defining the absolute vorticity $\zeta_a$ as $\zeta + f$, where $f$ is the Corio $$ \frac{\partial \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} & + \zeta_a {\overline{\left<{\bf u}\right>}^{\tilde{z}}_k}^{\perp} + \nabla K + \frac{1}{\tilde{h}_k} \nabla \cdot \left[ \tilde{h}_k \left(\overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ -& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[\left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{\left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right\} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{\left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right\} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ -& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ -& = - \rho_0 \, \overline{\nabla \left<\Phi\right>}^{\tilde{z}}_k + \frac{1}{\tilde{h}_k} \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ -& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} +& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[\left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{\left<\tilde{w}_{tr}\right> - \left<\tilde{ u}\right> \right\} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{\left<\tilde{w}_{tr}\right> - \left<\tilde{ u}\right> \right\} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +& = - \overline{\nabla \left<\Phi\right>}^{\tilde{z}}_k + \frac{1}{\tilde{h}_k} \nabla \left[\tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ +& + \frac{1}{\tilde{h}_k} \left\{ \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\}. -$$ (layer-momentum-final) +$$ (layer-momentum-prefinal) ### Simplifying Assumptions -In [](#layer-momentum-final), if we assume a piecewise constant representation of variables in Omega, then all the $\deltaX$ variables would be zero. However, in general, piecewise constant representations are not recommended (e.g., [White and Adcroft (2008)](https://www.sciencedirect.com/science/article/pii/S0021999108002593)), thus we keep these terms for Omega. They will be based on the order of reconstruction assumed for the model. More details are given in the following section. In addition to simplifying the product of $\delta$ terms based on reconstruction order in the vertical, we will assume that $\left<\alpha^\prime p^\prime \right>$ is small. We would only expect this term to be large in nonhydrostatic codes in regions of vigorous convection. +In [](#layer-momentum-final), if we assume a piecewise constant representation of variables in Omega, then all the $\delta X$ variables would be zero. However, in general, piecewise constant representations are not recommended (e.g., [White and Adcroft (2008)](https://www.sciencedirect.com/science/article/pii/S0021999108002593)), thus we keep these terms for Omega. They will be based on the order of reconstruction assumed for the model. More details are given in the following section. In addition to simplifying the product of $\delta$ terms based on reconstruction order in the vertical, we will assume that $\left<\alpha^\prime p^\prime \right>$ is small. We would only expect this term to be large in nonhydrostatic codes in regions of vigorous convection. All terms involving $\alpha^\prime$ are neglected. The final momentum equation for Omega is given by -## 10. Discrete Equations +$$ +\frac{\partial \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} +& + \zeta_a {\overline{\left<{\bf u}\right>}^{\tilde{z}}_k}^{\perp} + \nabla K + \frac{1}{\tilde{h}_k} \nabla \cdot \left[ \tilde{h}_k \left(\overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ +& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[\left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{\left<\tilde{w}_{tr}\right> - \left<\tilde{ u}\right> \right\} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{\left<\tilde{w}_{tr}\right> - \left<\tilde{ u}\right> \right\} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +& = - \overline{\nabla \left<\Phi\right>}^{\tilde{z}}_k + \frac{1}{\tilde{h}_k} \nabla \left[\tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k \right) \right] \\ +& + \frac{1}{\tilde{h}_k} \left\{ \left[ \left< \alpha \right> \left

\right]_{\tilde{z} = \tilde{z}^{\text{top}}} +- \left[ \left< \alpha \right> \left

\right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\}. +$$ (layer-momentum-final) + +The $\delta X$ terms in the layered equations are vertical deviations from the vertical layer average of a given quantity $X$. We will assume these deviations are small and products of these deviations are even smaller. Thus we will ignore all of these terms in Omega. We note that these terms could potentially serve as a bridge to multiscale fluxes, as resolution is increased, these $\delta X$ terms would get larger, but likely only for significantly higher resolution (e.g. 10s of meters). However, these terms would have to be further analyzed and developed as these terms are only deviations from layer averages, not temporal averages as in the Reynolds' approach. + +### Notational simplifications + +Throughout the rest of this document, we will -Next things to do -- +1. Drop the $< >$ notation around single variables and note that all variables are assumed to be Reynolds' averaged. Turbulent correlations will retain the angle bracket notation. +2. Change the vertical density weighted average notation from $\overline{\varphi}^{\tilde{z}}_k$ to the more simple $\varphi_k$. Thus, any subscript $k$ implies a vertical average. +3. Define a projected vertical velocity as $\tilde{W}_{tr} \equiv \tilde{w}_{tr} - \tilde{u}$ -1. need to discuss assumptions on terms like $\delta \mathbf{u} \otimes \mathbf{u}$ -2. drop all the $<>$ just for simplicity except on the turbulent fluxes -3. clean the section to be less MPAS-O -4. clearly say what is happening with the fluxes and the projection into the vertical. +With these three simplifications, the final continuous equations become -The horizontally discretized layered equations are as follows. We have dropped the $r$ in $\nabla_r$ for conciseness, and the operator $\nabla$ from here on means within-layer. +**Tracer:** $$ -\frac{\partial u_{e,k}}{\partial t} + \left[ \frac{{\bf k} \cdot \nabla \times u_{e,k} +f_v}{[h_{i,k}]_v}\right]_e\left([h_{i,k}]_e u_{e,k}^{\perp}\right) -+ \frac{ \left[ \omega_{i,k}^{top} \right]_e u_{e,k}^{top} -- \left[ \omega_{i,k+1}^{top} \right]_e u_{e,k+1}^{top}}{ \left[h_{i,k}\right]_e } -= -- \left[ \alpha_{i,k} \right]_e \nabla p_{i,k} - \nabla \Phi_{i,k} -- \nabla K_{i,k} + { \bf D}^u_{e,k} + {\bf F}^u_{e,k} -$$ (discrete-momentum) +\frac{\partial {\tilde h}_k \varphi_k}{\partial t} & + \nabla \cdot \left({\tilde h}_k \varphi_k {\bf u}_k\right) + \rho_0 \left\{ \left[ \varphi \tilde{W}_{tr} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} - \left[ \varphi \tilde{W}_{tr} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} \right\} \\ +& = - \nabla \cdot \left({\tilde h}_k \left<\varphi^{\prime} {\bf u}^{\prime}\right>_k\right) \\ +& - \rho_0 \left\{ \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{ u}^{\prime}\right> \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{top}}} - \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{ u}^{\prime}\right> \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}}\right\}. +$$ (layer-tracer-final-simple) + +**Mass:** + +$$ +\frac{\partial {\tilde h}_k }{\partial t} ++ \nabla \cdot \left({\tilde h}_k {\bf u}_k\right) ++ \rho_0 \left[ \tilde{W}_{tr} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{top}}} +- \rho_0 \left[ \tilde{W}_{tr} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} += 0. +$$ (layer-mass-final-simple) + +**Momentum:** + +$$ +\frac{\partial {\bf u}_k}{\partial t} +& + \zeta_a {{\bf u}_k}^{\perp} + \nabla K + \frac{1}{\tilde{h}_k} \nabla \cdot \left[ \tilde{h}_k \left< {\bf u}^\prime \otimes {\bf u}^\prime \right>_k \right] \\ +& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[\left(\mathbf{u} - \mathbf{u}_k\right) \left\{\tilde{W}_{tr} \right\} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left(\mathbf{u} - \mathbf{u}_k\right) \left\{\tilde{W}_{tr} \right\} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +& = - \left(\nabla \Phi \right)_k + \frac{1}{\tilde{h}_k} \nabla \left[ \tilde{h}_k \alpha_k p_k \right] \\ +& + \frac{1}{\tilde{h}_k} \left\{ \left[ \alpha p \nabla \tilde{z}^{\text{top}}\right]_{\tilde{z} = \tilde{z}^{\text{top}}} +- \left[ \alpha p \nabla \tilde{z}^{\text{bot}}\right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\}. +$$ (layer-momentum-final-simple) + +## 10. Discrete Equations + +In the following equations, the subscripts $i$, $e$, and $v$ indicate cell, edge, and vertex locations and subscript $k$ is the layer. Square brackets $[\cdot]_e$ and $[\cdot]_v$ are quantities that are interpolated to edge and vertex locations. For vector quantities, $u_{e,k}$ denotes the normal component at the center of the edge, while $u_{e,k}^\perp$ denotes the tangential component. We have switched from $\varphi_{i,k}^{bot}$ to the identical $\varphi_{i,k+1}^{top}$ for all variables in order for the notation to match the array names in the code. It is important to note that any term without a subscript $k$ are quantities evaluated at that level and are ***not*** individual layer averages, but will be a function of layer average values. For example, Eq (44) of [White and Adcroft (2008)](https://www.sciencedirect.com/science/article/pii/S0021999108002593) shows a third order reconstruction. Finally, we note that in the equations below, it is assumed that $k$ increases away from the surface. + +**Mass:** $$ -\frac{\partial h_{i,k}}{\partial t} + \nabla \cdot \left([h_{i,k}]_e u_{e,k}\right) -+ \omega_{i,k}^{top} - \omega_{i,k+1}^{top} -= Q^h_{i,k} -$$ (discrete-thickness) +\frac{\partial {\tilde h}_{i,k} }{\partial t} ++ \nabla \cdot \left(\left[{\tilde h}_k\right]_e {\bf u}_{e,k}\right) ++ \rho_0 \left[ \tilde{W}_{tr} \right]_k +- \rho_0 \left[ \tilde{W}_{tr} \right]_{k+1} += Q_{i,k}. +$$ (discrete-mass) + +In this equation, we have added a mass source term ($Q$) that will include sources like river runoff, sea ice freshwater fluxes, precipitation, and evaporation. + +**Tracer:** $$ -\frac{\partial h_{i,k} \varphi_{i,k}}{\partial t} + \nabla \cdot \left(u_{e,k} [h_{i,k} \varphi_{i,k}]_e \right) -+ \varphi_{i,k}^{top} \omega_{i,k}^{top} - \varphi_{i,k+1}^{top}\omega_{i,k+1}^{top} -= D^\varphi_{i,k} + Q^\varphi_{i,k} +\frac{\partial {\tilde h}_{i,k} \varphi_{i,k}}{\partial t} & + \nabla \cdot \left(\left[{\tilde h}_{i,k} \varphi_{i,k}\right]_e {\bf u}_{e,k}\right) + \rho_0 \left\{ \left[ \varphi \tilde{W}_{tr} \right]_k - \left[ \varphi \tilde{W}_{tr} \right]_{k+1} \right\} \\ +& = - \nabla \cdot \left({\tilde h}_k \left<\varphi^{\prime} {\bf u}^{\prime}\right>_k \right) - \rho_0 \left\{ \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{ u}^{\prime}\right> \right]_k - \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{ u}^{\prime}\right> \right]_{k+1}\right\}. $$ (discrete-tracer) +In the tracer equation, we note that surface fluxes (e.g. latent heat fluxes) will appear in the surface value of the vertical turbulent tracer flux (e.g., $\left<\varphi^\prime \tilde{w}_{tr}^\prime\right>_{k=0}$). The terms on the second line represent the small scale turbulence and the form used in Omega to represent these terms will be discussed in the next section. + +**Momentum:** + +Omega will only predict the layer average normal velocity, so we drop the bold face on the $u$ terms except for the product of primes, which is specified in the next section. + $$ -p_{i,k} = p_{i}^{surf} + \sum_{k'=1}^{k-1} g h_{i,k'} + \frac{1}{2} g h_{i,k} -$$ (discrete-pressure) +\frac{\partial u_{e,k}}{\partial t} +& + \left[ {\bf k} \cdot \nabla \times u_{e,k} +f_v\right]_e\left(u_{e,k}^{\perp}\right) + \left[\nabla K\right]_e \\ +& + \frac{\rho_0}{\left[\tilde{h}_{i,k}\right]_e} \left\{ \left[\left(u - u_k\right) \left\{\tilde{W}_{tr} \right\} \right]_{e,k} - \left[ \left(u - u_k\right) \left\{\tilde{W}_{tr} \right\} \right]_{e,k+1} \right\} \\ +& = - \left(\nabla \Phi \right)_{e,k} + \frac{1}{\left[\tilde{h}_k\right]_e} \nabla \left( \tilde{h}_k \alpha_k p_k \right) + \frac{1}{\left[\tilde{h}_k\right]_e} \left\{ \left[ \alpha p \nabla \tilde{z}^{\text{top}}\right]_{e,k} - \left[ \alpha p \nabla \tilde{z}^{\text{bot}}\right]_{e,k+1} \right\} \\ +& + \frac{1}{\left[\tilde{h}_{i,k}\right]_e} \nabla \cdot \left( \tilde{h}_k \left< {\bf u}^\prime \otimes {\bf u}^\prime \right>_k \right) + \frac{\rho_0}{\left[\tilde{h}_{i,k}\right]_e} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{e,k} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{e,k+1} \right\}. +$$ (discrete-momentum) + +**Diagnostic Relations:** + + $$ + p_{i,k} = p_{i}^{surf} + g\rho_0 \sum_{k'=1}^{k-1} \tilde{h}_{i,k'} + \frac{1}{2} g\rho_0 \tilde{h}_{i,k} + $$ (discrete-pressure) $$ \alpha_{i,k} = f_{eos}(p_{i,k},\Theta_{i,k},S_{i,k}) @@ -692,13 +749,13 @@ $$ z_{i,k}^{top} = z_{i}^{floor} + \sum_{k'=k}^{K_{max}} \alpha_{i,k'}h_{i,k'} $$ (discrete-z) -The subscripts $i$, $e$, and $v$ indicate cell, edge, and vertex locations and subscript $k$ is the layer. Square brackets $[\cdot]_e$ and $[\cdot]_v$ are quantities that are interpolated to edge and vertex locations. For vector quantities, $u_{e,k}$ denotes the normal component at the center of the edge, while $u_{e,k}^\perp$ denotes the tangential component. We have switched from $\varphi_{i,k}^{bot}$ to the identical $\varphi_{i,k+1}^{top}$ for all variables in order for the notation to match the array names in the code. The superscripts $surf$ and $floor$ are the surface and floor of the full ocean column. All variables without these superscripts indicate that they are layer-averaged, as defined in [](def-mass-thickness-average), and can be considered to represent a mid-layer value in the vertical. The mid-layer location is equivalently the average in $z$, $p$, or $h$ (mass), since density $\rho_{i,k}$ is considered constant in the cell. - -We refer to these as the discrete equations, but time derivatives remain continuous. The time discretization is described in the [time stepping design document](TimeStepping.md). The velocity, mass-thickness, and tracers are solved prognostically using [](discrete-momentum), [](discrete-thickness), [](discrete-tracer). At the new time, these variables are used to compute pressure [](discrete-pressure), specific volume [](discrete-eos), and z-locations [](discrete-z). Additional variables are computed diagnostically at the new time: $u^{\perp}$, $K$, $\omega$, $z^{mid}$, $\Phi$, etc. The initial geopotential is simply $\Phi=gz$, but additional gravitational terms may be added later. +We refer to these as the discrete equations, but time derivatives remain continuous. The time discretization is described in the [time stepping design document](TimeStepping.md). The velocity, mass-thickness, and tracers are solved prognostically using [](discrete-momentum), [](discrete-mass), [](discrete-tracer). At the new time, these variables are used to compute pressure [](discrete-pressure), specific volume [](discrete-eos), and z-locations [](discrete-z). Additional variables are computed diagnostically at the new time: $\mathbf{u}^{\perp}$, $K$, $\zeta_a$, $z^{mid}$, $\Phi$, etc. The initial geopotential is simply $\Phi=gz$, but additional gravitational terms may be added later. The horizontal operators $\nabla$, $\nabla\cdot$, and $\nabla \times$ are now in their discrete form. In the TRiSK design, gradients ($\nabla$) map cell centers to edges; divergence ($\nabla \cdot$) maps edge quantities to cells; and curl ($\nabla \times$) maps edges to vertices. The exact form of operators and interpolation stencils remain the same as those given in [Omega-0 design document](OmegaV0ShallowWater.md#operator-formulation). The discrete version of terms common with Omega-0, such as advection, potential vorticity, and $\nabla K$, can be found in [Omega-0 Momentum Terms](OmegaV0ShallowWater.md#momentum-terms) and [Omega-0 Thickness and Tracer Terms](OmegaV0ShallowWater.md#thickness-and-tracer-terms). +# 11. Sub gridscale parameterizations + ### Momentum Dissipation The discretized momentum dissipation ${ \bf D}^u_{e,k}$ may include these terms, which are detailed in the subsections below. From b40ad65c891242b3154eb0e7f86e7a7fc0df4dfe Mon Sep 17 00:00:00 2001 From: vanroekel Date: Sun, 13 Jul 2025 21:37:43 -0700 Subject: [PATCH 52/65] first draft of everything but the variable table fix trailing whitespace Fixes broken cross refs --- .../omega/doc/design/OmegaV1GoverningEqns.md | 196 ++++++++---------- 1 file changed, 92 insertions(+), 104 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 688e90feb661..87e336a64b1a 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -33,7 +33,7 @@ This document describes the governing equations for the layered ocean model, whi The requirements in the [Omega-0 design document](OmegaV0ShallowWater) still apply. Additional design requirements for Omega-1 are: ### Omega will be a hydrostatic, non-Boussinesq ocean model. -Omega will adopt a non-Boussinesq formulation, meaning it retains the full, spatially and temporally varying fluid density $\rho({\bf x}, t)$ in all governing equations. This ensures exact mass conservation, as opposed to volume conservation in Boussinesq models that approximate density as a constant reference value $\rho_0$ outside the pressure gradient. The equations are derived in terms of layer-integrated mass per unit area (see [layered equations](#layered-equations)), and no approximation is made that filters out compressibility or density variations. +Omega will adopt a non-Boussinesq formulation, meaning it retains the full, spatially and temporally varying fluid density $\rho({\bf x}, t)$ in all governing equations. This ensures exact mass conservation, as opposed to volume conservation in Boussinesq models that approximate density as a constant reference value $\rho_0$ outside the pressure gradient. The equations are derived in terms of layer-integrated mass per unit area (see [layered equations](#Layer Equations)), and no approximation is made that filters out compressibility or density variations. The model also assumes hydrostatic balance in the vertical momentum equation, which is a standard and well-justified simplification for large-scale geophysical flows. In such regimes, vertical accelerations are typically small compared to the vertical pressure gradient and gravitational forces. This assumption simplifies the dynamics and removes most sound waves while retaining fidelity for the mesoscale to planetary-scale ocean circulation that Omega is designed to simulate. @@ -350,7 +350,7 @@ $$ \varphi = \overline{\varphi}^{\tilde{z}}_k + \delta \varphi $$ (vertical-decomposition) -which is a density weighted vertical integral based upon [](#def-layer-average) and the deviation from this value. +which is a density weighted vertical integral based upon [](#def-layer-average) and the deviation from this value. The second decomposition is @@ -358,17 +358,17 @@ $$ \varphi = \left<\varphi\right> + \varphi^\prime $$ (reynolds-definition) -which is the traditional Reynolds' average and deviation from this value. +which is the traditional Reynolds' average and deviation from this value. The fundamental ocean model equations are most often Reynolds' averaged to derive the sub gridscale stresses. Each variable is decomposed into an average and a fluctuating component [[](#reynolds-definition)]. The averaging operator is defined such that it can be passed through derivatives and integrals without corrections and an average of products with a single perturbation quantity is zero. -The Reynolds' average is most commonly denoted by an overbar. However, to disambiguate from the definition of the bar as the vertical density weighted average, the Reynolds' average herein is denoted by $< . >$. +The Reynolds' average is most commonly denoted by an overbar. However, to disambiguate from the definition of the bar as the vertical density weighted average, the Reynolds' average herein is denoted by $< . >$. The Reynolds' approach is an attractive approach for Boussinesq ocean models since the fundamental equations do not include products of spatially variable density and tracer, pressure, or momentum. When the ocean model is non Boussinesq, products of spatially varying density and other fields (e.g., tracer) arise and create difficulties, producing a term like $\left<\rho^\prime {\mathbf u}^\prime\right>$ which is difficult to parameterize. However, given the definition of our chosen pseudo-height, the density terms are wrapped up in $\tilde{z}$ and once again a Reynolds' approach can be cleanly used. ### Averaging -The quantity being averaged in [](#def-layer-average) is arbitrary. For example, this equation can apply equally to a Reynolds' averaged quantity, e.g., +The quantity being averaged in [](#def-layer-average) is arbitrary. For example, this equation can apply equally to a Reynolds' averaged quantity, e.g., $$ \overline{\left<\varphi\right>}^{\tilde{z}}_k(x,y,t) = @@ -399,7 +399,7 @@ $$ & + \int_A \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - \tilde{ u} \right] \right\}\right>_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA & \\ & - \int_A \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - \tilde{ u} \right] \right\}\right>_{\tilde{z} = \tilde{z}^{\text{bot}}}\, dA & = 0. -$$ (Aintegral-tracer-reynolds) +$$ (Aintegral-tracer-first-reynolds) Next, we use a Reynolds' decomposition on any terms involving products inside a Reynolds' averaged, @@ -420,7 +420,7 @@ $$ & + \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> -\left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{z = z^{\text{top}}} \, dA & \\ & - \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> - \left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{z = z^{\text{bot}}}\, dA & = 0. -$$ (Aintegral-tracer2) +$$ (Aintegral-tracer) The second term is expanded utilizing [](#vertical-decomposition) @@ -445,7 +445,7 @@ $$ Given that the horizontal area is not changing in time, we can move the time derivative through the first integral. We also invoke Green's Theorem for the second integral to convert that from a surface integral to an area integral. With these changes, the equation becomes $$ -\int_A \bigl\{ \frac{\partial \tilde{h}_k \, \overline{\left<\varphi\right>}^{\tilde{z}}_k}{\partial t} +\int_A \bigl\{ \frac{\partial \tilde{h}_k \, \overline{\left<\varphi\right>}^{\tilde{z}}_k}{\partial t} & + \nabla \cdot \left[ \tilde{h}_k \, \left(\overline{\left<\varphi\right>}^{\tilde{z}}_k \overline{\left<{\bf u}\right>}^{\tilde{z}}_k + \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k + \overline{\left<\varphi^{\prime}{\bf u}^{\prime}\right>}^{\tilde{z}}_k \right)\right] & \\ & + \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> - \left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{z = z^{\text{top}}} & \\ & - \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> - \left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{z = z^{\text{bot}}} \bigr\} \, dA @@ -453,7 +453,7 @@ $$ $$ (reynolds-tracer-final) -A few comments on the last two lines of [](#reynolds-tracer-final). If only the first two terms of the integrals are retained, this represents the vertical advective and turbulent fluxes for a finite volume framework. The second two terms represent the projection of the horizontal advective and turbulent fluxes into the direction normal to the sloping surface. When the coordinate surfaces are flat $\nabla \tilde{z}^{\text{top}} = \nabla \tilde{z}^{\text{bot}} = 0$ and the vertical fluxes are aligned with the normal to the coordinate surface reducing the equation to the expected z-coordinate, finite volume, formulation. +A few comments on the last two lines of [](#reynolds-tracer-final). If only the first two terms of the integrals are retained, this represents the vertical advective and turbulent fluxes for a finite volume framework. The second two terms represent the projection of the horizontal advective and turbulent fluxes into the direction normal to the sloping surface. When the coordinate surfaces are flat $\nabla \tilde{z}^{\text{top}} = \nabla \tilde{z}^{\text{bot}} = 0$ and the vertical fluxes are aligned with the normal to the coordinate surface reducing the equation to the expected z-coordinate, finite volume, formulation. Finally, given that the area integral operates on the entire equation, it is valid for any area and we can take the limit as $A \rightarrow 0$ to arrive at the final tracer equation @@ -473,9 +473,9 @@ The mass equation is identical to the tracer equation with $\varphi=1$. **Mass:** $$ -\frac{\partial {\tilde h}_k }{\partial t} -+ \nabla \cdot \left({\tilde h}_k \overline{\left<{\bf u}\right>}^{\tilde{z}}_k\right) -+ \rho_0 \left[ \left<{\tilde w}_{tr}\right> - \left<\tilde{ u}\right> \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} +\frac{\partial {\tilde h}_k }{\partial t} ++ \nabla \cdot \left({\tilde h}_k \overline{\left<{\bf u}\right>}^{\tilde{z}}_k\right) ++ \rho_0 \left[ \left<{\tilde w}_{tr}\right> - \left<\tilde{ u}\right> \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} - \rho_0 \left[ \left<{\tilde w}_{tr}\right> - \left<\tilde{ u}\right> \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} = 0. $$ (layer-mass) @@ -568,7 +568,7 @@ $$ & - \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}\bigr\} \, dA. $$ (vh-momentum-reynolds-lay-avg3) -Since the equation is fully inside the integral, the equation is true for any area and therefore we can write the layer averaged momentum equation as +Since the equation is fully inside the integral, the equation is true for any area and therefore we can write the layer averaged momentum equation as $$ \frac{\partial\tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} @@ -622,7 +622,7 @@ $$ (advection-identity) where $\zeta$ is relative vorticity and $K$ is kinetic energy. This step separates the horizontal advection into non-divergent and non-rotational components, which is useful in the final TRiSK formulation. -The Coriolis term in [](#vh-momentum-v3), when projected into a local coordinate system can be written as +The Coriolis term in [](#vh-momentum-v3), when projected into a local coordinate system can be written as $$ {\bf f} \times \left<\mathbf{u}\right> = f \left<\mathbf{u}\right>^\perp + 2 \Omega \tilde{w}_{tr} \cos \phi @@ -679,9 +679,9 @@ $$ (layer-tracer-final-simple) **Mass:** $$ -\frac{\partial {\tilde h}_k }{\partial t} -+ \nabla \cdot \left({\tilde h}_k {\bf u}_k\right) -+ \rho_0 \left[ \tilde{W}_{tr} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{top}}} +\frac{\partial {\tilde h}_k }{\partial t} ++ \nabla \cdot \left({\tilde h}_k {\bf u}_k\right) ++ \rho_0 \left[ \tilde{W}_{tr} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{top}}} - \rho_0 \left[ \tilde{W}_{tr} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} = 0. $$ (layer-mass-final-simple) @@ -702,12 +702,12 @@ $$ (layer-momentum-final-simple) In the following equations, the subscripts $i$, $e$, and $v$ indicate cell, edge, and vertex locations and subscript $k$ is the layer. Square brackets $[\cdot]_e$ and $[\cdot]_v$ are quantities that are interpolated to edge and vertex locations. For vector quantities, $u_{e,k}$ denotes the normal component at the center of the edge, while $u_{e,k}^\perp$ denotes the tangential component. We have switched from $\varphi_{i,k}^{bot}$ to the identical $\varphi_{i,k+1}^{top}$ for all variables in order for the notation to match the array names in the code. It is important to note that any term without a subscript $k$ are quantities evaluated at that level and are ***not*** individual layer averages, but will be a function of layer average values. For example, Eq (44) of [White and Adcroft (2008)](https://www.sciencedirect.com/science/article/pii/S0021999108002593) shows a third order reconstruction. Finally, we note that in the equations below, it is assumed that $k$ increases away from the surface. -**Mass:** +**Mass:** $$ -\frac{\partial {\tilde h}_{i,k} }{\partial t} -+ \nabla \cdot \left(\left[{\tilde h}_k\right]_e {\bf u}_{e,k}\right) -+ \rho_0 \left[ \tilde{W}_{tr} \right]_k +\frac{\partial {\tilde h}_{i,k} }{\partial t} ++ \nabla \cdot \left(\left[{\tilde h}_k\right]_e {\bf u}_{e,k}\right) ++ \rho_0 \left[ \tilde{W}_{tr} \right]_k - \rho_0 \left[ \tilde{W}_{tr} \right]_{k+1} = Q_{i,k}. $$ (discrete-mass) @@ -732,13 +732,13 @@ $$ & + \left[ {\bf k} \cdot \nabla \times u_{e,k} +f_v\right]_e\left(u_{e,k}^{\perp}\right) + \left[\nabla K\right]_e \\ & + \frac{\rho_0}{\left[\tilde{h}_{i,k}\right]_e} \left\{ \left[\left(u - u_k\right) \left\{\tilde{W}_{tr} \right\} \right]_{e,k} - \left[ \left(u - u_k\right) \left\{\tilde{W}_{tr} \right\} \right]_{e,k+1} \right\} \\ & = - \left(\nabla \Phi \right)_{e,k} + \frac{1}{\left[\tilde{h}_k\right]_e} \nabla \left( \tilde{h}_k \alpha_k p_k \right) + \frac{1}{\left[\tilde{h}_k\right]_e} \left\{ \left[ \alpha p \nabla \tilde{z}^{\text{top}}\right]_{e,k} - \left[ \alpha p \nabla \tilde{z}^{\text{bot}}\right]_{e,k+1} \right\} \\ -& + \frac{1}{\left[\tilde{h}_{i,k}\right]_e} \nabla \cdot \left( \tilde{h}_k \left< {\bf u}^\prime \otimes {\bf u}^\prime \right>_k \right) + \frac{\rho_0}{\left[\tilde{h}_{i,k}\right]_e} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{e,k} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{e,k+1} \right\}. +& - \frac{1}{\left[\tilde{h}_{i,k}\right]_e} \nabla \cdot \left( \tilde{h}_k \left< {\bf u}^\prime \otimes {\bf u}^\prime \right>_k \right) - \frac{\rho_0}{\left[\tilde{h}_{i,k}\right]_e} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{e,k} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{e,k+1} \right\}. $$ (discrete-momentum) **Diagnostic Relations:** - $$ - p_{i,k} = p_{i}^{surf} + g\rho_0 \sum_{k'=1}^{k-1} \tilde{h}_{i,k'} + \frac{1}{2} g\rho_0 \tilde{h}_{i,k} + $$ + p_{i,k} = p_{i}^{surf} + g\rho_0 \sum_{k'=1}^{k-1} \tilde{h}_{i,k'} + \frac{1}{2} g\rho_0 \tilde{h}_{i,k} $$ (discrete-pressure) $$ @@ -751,19 +751,22 @@ $$ (discrete-z) We refer to these as the discrete equations, but time derivatives remain continuous. The time discretization is described in the [time stepping design document](TimeStepping.md). The velocity, mass-thickness, and tracers are solved prognostically using [](discrete-momentum), [](discrete-mass), [](discrete-tracer). At the new time, these variables are used to compute pressure [](discrete-pressure), specific volume [](discrete-eos), and z-locations [](discrete-z). Additional variables are computed diagnostically at the new time: $\mathbf{u}^{\perp}$, $K$, $\zeta_a$, $z^{mid}$, $\Phi$, etc. The initial geopotential is simply $\Phi=gz$, but additional gravitational terms may be added later. -The horizontal operators $\nabla$, $\nabla\cdot$, and $\nabla \times$ are now in their discrete form. In the TRiSK design, gradients ($\nabla$) map cell centers to edges; divergence ($\nabla \cdot$) maps edge quantities to cells; and curl ($\nabla \times$) maps edges to vertices. The exact form of operators and interpolation stencils remain the same as those given in [Omega-0 design document](OmegaV0ShallowWater.md#operator-formulation). The discrete version of terms common with Omega-0, such as advection, potential vorticity, and $\nabla K$, can be found in [Omega-0 Momentum Terms](OmegaV0ShallowWater.md#momentum-terms) and [Omega-0 Thickness and Tracer Terms](OmegaV0ShallowWater.md#thickness-and-tracer-terms). +The horizontal operators $\nabla$, $\nabla\cdot$, and $\nabla \times$ are now in their discrete form. In the TRiSK design, gradients ($\nabla$) map cell centers to edges; divergence ($\nabla \cdot$) maps edge quantities to cells; and curl ($\nabla \times$) maps edges to vertices. The exact form of operators and interpolation stencils remain the same as those given in [Omega-0 design document](OmegaV0ShallowWater.md#Operator Formulation). The discrete version of terms common with Omega-0, such as advection, potential vorticity, and $\nabla K$, can be found in [Omega-0 Momentum Terms](OmegaV0ShallowWater.md#Momentum Terms) and [Omega-0 Thickness and Tracer Terms](OmegaV0ShallowWater.md#Thickness and Tracer Terms). + +## 11. Sub gridscale parameterizations -# 11. Sub gridscale parameterizations +### Horizontal Momentum Dissipation -### Momentum Dissipation +There are two terms related to horizontal momentum dissipation in [](#discrete-momentum) that need to be parameterized, $\left<\mathbf{u}^\prime \tilde{u}^\prime \right>$ and $\frac{1}{\left[\tilde{h}_{i,k}\right]_e} \nabla \cdot \left( \tilde{h}_k \left< {\bf u}^\prime \otimes {\bf u}^\prime \right>_k \right)$. The former only arises from the layer integration in psuedo-height coordinates, we interpret this term as the projection of the horizontal momentum dissipation that crosses $\tilde{z}$ interfaces. Given this, we discuss the form of the horizontal dissipation parameterization first and return to the second term in a later subsection. -The discretized momentum dissipation ${ \bf D}^u_{e,k}$ may include these terms, which are detailed in the subsections below. +As in MPAS-Ocean, parameterizaiton of the horizontal momentum dissipiation is through laplacian or biharmonic dissipation, $$ -{ \bf D}^u_{e,k} = \nu_2 \nabla^2 u_{e,k} - \nu_4 \nabla^4 u_{e,k} + -\frac{\partial }{\partial z} \left( \nu_v \frac{\partial u_{e,k}}{\partial z} \right) -$$ (discrete-mom-del2) +\frac{1}{\left[\tilde{h}_{i,k}\right]_e} \nabla \cdot \left( \tilde{h}_k \left< {\bf u}^\prime \otimes {\bf u}^\prime \right>_k \right) = \nu_2 \nabla^2 u_{e,k} - \nu_4 \nabla^4 u_{e,k}. +$$ (discrete-mom-diss) + +Again, the quantities in [](#discrete-mom-diss) are layer averaged. The gradient of $\tilde{h}$ is assumed to be small relative to the stress tensor to allow the utilization of traditional parameterization of the dissipation. #### Laplacian dissipation (del2) @@ -771,70 +774,57 @@ $$ \nu_2 \nabla^2 u_{e,k} = \nu_2 \left( \nabla D_{i,k} - \nabla^{\perp} \zeta_{v,k} \right) $$ (discrete-mom-del2) -where $D$ is divergence and $\zeta$ is relative vorticity. See [Omega V0 Section 3.3.4](OmegaV0ShallowWater.md#del2-momentum-dissipation) +where $D$ is divergence and $\zeta$ is relative vorticity. See [Omega V0 Section 3.3.4](OmegaV0ShallowWater.md#Del2 momentum dissipation) #### Biharmonic dissipation (del4) -As in [Omega V0 Section 3.3.5](OmegaV0ShallowWater.md#del4-momentum-dissipation), biharmonic momentum dissipation is computed with two applications of the Del2 operator above. +As in [Omega V0 Section 3.3.5](OmegaV0ShallowWater.md#Del4 momentum dissipation), biharmonic momentum dissipation is computed with two applications of the Del2 operator above. $$ - \nu_4 \nabla^4 u_{e,k} = - \nu_4 \nabla^2 \left( \nabla^2 u_{e,k} \right) $$ (discrete-mom-del4) -#### Vertical momentum diffusion -Vertical derivatives may be computed with either $z$ or $p$ as the independent variable, +### Momentum dissipation across a sloping $\tilde{z}$ surface + +We interpret $\left<\mathbf{u}^\prime \tilde{u}^\prime \right>$ as the dissipation of momentum across the sloping $\tilde{z}$ surface. $$ -\frac{\partial }{\partial z} \left( \nu_v \frac{\partial u}{\partial z} \right) -= \frac{\partial }{\partial p}\frac{\partial p}{\partial z} \left( \nu_v \frac{\partial u}{\partial p} \frac{\partial p}{\partial z}\right) -= \rho g^2\frac{\partial }{\partial p} \left( \nu_v \rho \frac{\partial u}{\partial p} \right). -$$ (mom-vert-diff-z-p) +\left<\mathbf{u}^\prime \tilde{u}^\prime \right> = \left\{\left[\nu_2 \left( \nabla \tilde{D}_{i} - \nabla^{\perp} \tilde{\zeta}_{v} \right)\right]_k - \left[\nu_4 \nabla^2 \left( \nabla^2 \tilde{u}_{e,k} \right)\right]_k\right\} +$$ (discrete-mom-flux-sloping) -We choose to use $z$ values for simplicity. A single vertical derivative of an arbitrary variable $\varphi$ at mid-layer is +While whit looks very similar to [](#discrete-mom-del2) - [](#discrete-mom-del4), we not a few critical differences. First, the normal velocities in the divergence and relative vorticity in [](#discrete-mom-flux-sloping) are the reconstructed velocity at the top of the cell along an edge, not the layer average. Second, the velocities in the divergence and relative vorticity are only the projection across the interface (hence the tilde on $D$ and $\zeta$), computed in a discrete sense following $$ -\frac{\partial \varphi_k}{\partial z} -= \frac{\varphi_k^{top} - \varphi_k^{bot} }{z_k^{top} - z_k^{bot}} -$$ (vertderiv1) +\left[\tilde{u}_{e}\right]_k = u_e \nabla \tilde{z}_{e,k} +$$ + +in this relation, we have moved the subscript $k$ off the variable itself to prevent confusion with the layer average. With this definition, [](#discrete-mom-flux-sloping) goes to zero for flat layer surfaces. -and a second derivative is +#### Vertical momentum dissipation +The vertical turbulent momentum stress is most commonly parameterized as a down-gradient process, i.e. $$ -\frac{\partial }{\partial z} \left( -\frac{\partial \varphi_k}{\partial z} \right) -= -\frac{1}{z_{k}^{top} - z_{k+1}^{top}} \left( -\frac{\varphi_{k-1} - \varphi_k }{z_{k-1}^{mid} - z_k^{mid}} - - -\frac{\varphi_{k} - \varphi_{k+1} }{z_{k}^{mid} - z_{k+1}^{mid}} -\right) -$$ (vertderiv2) +\left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> \right]_{e,k} = -\frac{\nu_v \rho}{\rho_0} \left[\frac{\partial u}{\partial \tilde{z}}\right]_{e,k} +$$ -Thus, the vertical momentum diffusion is +Plugging this relation into the last part of [](#discrete-momentum) $$ -\frac{\partial }{\partial z} \left( \nu_v \frac{\partial u_{e,k}}{\partial z} \right) -= -\frac{1}{z_{e,k}^{top} - z_{e,k+1}^{top}} \left( -\nu_{e,k}^{top} -\frac{u_{e,k-1} - u_k }{z_{e,k-1}^{mid} - z_k^{mid}} - - -\nu_{e,k+1}^{top} -\frac{u_{e,k} - u_{e,k+1} }{z_{e,k}^{mid} - z_{e,k+1}^{mid}} -\right) +\frac{1}{\left[\tilde{h}_{i,k}\right]_{e,k}} \left\{ \left[ \nu_v \left[\frac{\partial u}{\partial \tilde{z}}\right]_{e,k} \right]_{e,k} - \left[ \nu_v \left[\frac{\partial u}{\partial \tilde{z}}\right]_{e,k} \right]_{e,k+1} \right\} $$ (discrete-mom-vert-diff) -This stencil is applied as an implicit tri-diagonal solve at the end of the time step. See details in the [tridiagonal solver design document](TridiagonalSolver) and forthcoming vertical mixing design document. +**NOTE: further thought is needed, a standard derivative does not respect finite volume - should probably go back and redirve the heat flux equation** -If [](#discrete-mom-vert-diff) is discretized with a standard centered derivative around the top and bottom of the cell, this stencil is applied as an implicit tri-diagonal solve at the end of the time step. However, this approach to the derivative may not be correct / fully consistent with a finite volume approach + +### Forcing at the top and bottom of the ocean -### Momentum Forcing -The discretized momentum forcing ${ \bf F}^u_{e,k}$ may include: +The discretized momentum and tracer forcing appear as the surface value of the vertical turbulent fluxes of tracer and momentum. Omega also includes a ocean floor vertical turbulent flux of momentum. #### Wind Forcing The wind forcing is applied as a top boundary condition during implicit vertical mixing as $$ -\frac{\tau_{e}}{[ h_{i,k}]_e} +\frac{\tau_{e}}{[ \tilde{h}_{i,k}]_e} $$ where $\tau$ is the wind stress in Pa. Since the mass-thickness $h$ is in kg/s/m$^2$, this results in the desired units of m/s$^2$ for a momentum tendency term. @@ -844,7 +834,7 @@ where $\tau$ is the wind stress in Pa. Since the mass-thickness $h$ is in kg/s/m Bottom Drag is applied as a bottom boundary condition during implicit vertical mixing as $$ -- C_D \frac{u_{e,k}\left|u_{e,k}\right|}{[\alpha_{i,k}h_{i,k}]_e} . +- C_D \frac{u_{e,k}\left|u_{e,k}\right|}{[\alpha_{i,k}\tilde{h}_{i,k}]_e} . $$ (discrete-mom-bottom) The units of specific volume times mass-thickness $\alpha h$ are length (m), so that the full term has units of m/s$^2$. @@ -857,59 +847,61 @@ $$ - Ra \, u_{e,k} $$ (discrete-mom-Ra) -### Tracer Diffusion +#### Temperature, salinity, and freshwater forcing + +Direct forcing of temperature, e.g. from latent or sensible heat fluxes take a form similar to MPAS-Ocean -The discretized tracer diffusion $ D^\varphi_{i,k}$ may include these terms, which are detailed below. Here $\kappa_2$ and $\kappa_4$ are written in front of the operator for simplicity. +$$ +\frac{LHF}{C_p \rho_1} +$$ + +where $\rho_1$ is the density in the top layer of Omega. This gives units of $mK/s$. + +#### Freshwater forcing + +Since Omega is a non-Boussinesq ocean, surface sources of water will be mass fluxes instead of being converted into thickness fluxes. Similar to MPAS-Oceran, Omega will include an ability to spread certain fluxes (e.g., river runoff) over a depth specified in the YAML configuration file. + +### Horizontal Tracer Diffusion + +As with momentum dissipation, the horizontal tracer diffusion arises from the $\left<\mathbf{u}_k^\prime \varphi_k \right>$ and $\left< \tilde{u}^\prime \varphi^\prime \right>$. As in MPAS-Ocean, the former term can be parameterized either as Laplacian or Biharmonic diffusion, $$ -D^\varphi_{i,k} = \kappa_2 \nabla^2 \varphi_{i,k} - \kappa_4 \nabla^4 \varphi_{i,k} + -\frac{\partial }{\partial z} \left( \kappa_v \frac{\partial \varphi_{i,k}}{\partial z} \right) +D^\varphi_{i,k} = \kappa_2 \nabla^2 \varphi_{i,k} - \kappa_4 \nabla^4 \varphi_{i,k}. $$ (discrete-tracer-diff) #### Laplacian diffusion (del2) The Laplacian may be written as the divergence of the gradient, $$ - h_{i,k} \nabla \cdot \left( \kappa_{2,e,k} \nabla \varphi_{i,k} \right). +\nabla \cdot \left(\tilde{h}_k \left<\varphi^\prime u^\prime \right>_k \right) = \nabla \cdot \left( \tilde{h}_{i,k} \kappa_{2,e,k} \nabla \varphi_{i,k} \right). $$ (discrete-tracer-del2) -See [Omega V0 Section 3.3.2](OmegaV0ShallowWater.md#del2-tracer-diffusion) for details of this calculation. +See [Omega V0 Section 3.3.2](OmegaV0ShallowWater.md#Del2 tracer diffusion) for details of this calculation. #### Biharmonic diffusion (del4) The biharmonic is a Laplacian operator applied twice, $$ - - h_{i,k} \nabla \cdot \left( \kappa_{4,e,k} \nabla + - \nabla \cdot \left( \kappa_{4,e,k} \nabla \right[ -\nabla \cdot \left( \nabla \varphi_{i,k} \right) +\nabla \cdot \left( \tilde{h}_{i,k} \nabla \varphi_{i,k} \right) \left] \right). $$ (discrete-tracer-del4) -Each of these operators are written as horizontal stencils in the [Omega V0 Operator Formulation Section](OmegaV0ShallowWater.md#operator-formulation) +Each of these operators are written as horizontal stencils in the [Omega V0 Operator Formulation Section](OmegaV0ShallowWater.md#Operator Formulation). Again we note that the variables in these equations are the layer average. -#### Vertical tracer diffusion -As discussed above in the [momentum section](#vertical-momentum-diffusion), vertical derivatives may be written in terms of $z$ or $p$, +#### Horizontal tracer diffusion across a sloping surface +As with horizontal momentum dissipation, there is a turbulent flux of tracer across a sloping $\tilde{z}$ interface. We interpret the $\left< \tilde{z}^\prime \varphi^\prime \right>$ as the projection of the horizontal turbulent flux across the sloping interface. The form of the diffusion is similar, taking Laplacian diffusion as an example $$ -\frac{\partial }{\partial z} \left( \kappa_v \frac{\partial {\bf \varphi}}{\partial z} \right) -= \rho g^2 \frac{\partial }{\partial p} \left( \kappa_v \rho \frac{\partial {\bf \varphi}}{\partial p} \right) -$$ (discrete-tracer-vertdiff) -and $z$ is chosen. The second derivative stencil is - + \nabla \cdot \left( \tilde{h}_{i} \kappa_{2,e} \nabla \varphi_{i} \right)_k. $$ -h_{i,k} \frac{\partial }{\partial z} \left( \kappa_v \frac{\partial \varphi_{i,k}}{\partial z} \right) -= -\frac{h_{i,k}}{z_{i,k}^{top} - z_{i,k+1}^{top}} \left( -\kappa_{i,k}^{top} -\frac{\varphi_{i,k-1} - \varphi_k }{z_{i,k-1}^{mid} - z_k^{mid}} - - -\kappa_{i,k+1}^{top} -\frac{\varphi_{i,k} - \varphi_{i,k+1} }{z_{i,k}^{mid} - z_{i,k+1}^{mid}} -\right). -$$ (discrete-tracer-vert-diff) - -Like the momentum term, this is applied using a tridiagonal solver in the + +While this is similar in form, this uses the reconstruction at the top of the layer and not the layer averages directly as in [](#discrete-tracer-del2). + +#### Vertical tracer diffusion +The vertical tracer diffusion arises from the $\rho_0\left(\left[\left<\varphi^\prime \tilde{w}_{tr}^\prime \right> \right]_k - \left[\left<\varphi^\prime \tilde{w}_{tr}^\prime \right> \right]_{k+1} \right)$ term. Again, if a traditional down gradient parameterization is used $\kappa \frac{\partial \varphi}{\partial z}$ the vertical turbulent flux can be applied using a tridiagonal solver in the [tridiagonal solver](TridiagonalSolver) in the implicit vertical mixing step. ### MPAS-Ocean Equations of Motion @@ -943,20 +935,17 @@ $$ (mpaso-continuous-tracer) The layer thickness $h$, vertical velocity $w$, pressure $p$, and tracer $\varphi$, are cell-centered quantities, while the horizontal velocity ${\bf u}$ and $e$ superscript are variables interpolated to the cell edges. -## 11. Variable Definitions +## 12. Variable Definitions -Table 1. Definition of variables. Geometric variables may be found in the [Omega V0 design document, Table 1](OmegaV0ShallowWater.md#variable-definitions) +Table 1. Definition of variables. Geometric variables may be found in the [Omega V0 design document, Table 1](OmegaV0ShallowWater.md#Variable Definitions) | symbol | name | units | location | name in code | notes | |---------------------|-----------------------------|----------|-|---------|-------------------------------------------------------| |$D_{i,k}$ | divergence | 1/s | cell | Divergence |$D=\nabla\cdot\bf u$ | -|${\bf D}^u_{k} $, $ D^u_{e,k} $ | momentum dissipation terms | m/s$^2$ | edge | |see [Momentum Dissipation Section](#momentum-dissipation) | -|$ D_{e,k}^\varphi$ | tracer diffusion terms | | cell | |see [Tracer Diffusion Section](#tracer-diffusion) | |$f_v$ | Coriolis parameter| 1/s | vertex | FVertex | $f = 2\Omega sin(\phi)$, $\Omega$ rotation rate, $\phi$ latitude| -|${\bf F}^u_{k} $, $ F^u_{e,k} $ | momentum forcing | m/s$^2$ | edge | | see [Momentum Forcing Section](#momentum-forcing) | |$f_{eos}$ | equation of state | - | any | function call | | |$g$ | gravitational acceleration | m/s$^2$ | constant | Gravity | -|$h_{i,k}$ | layer mass-thickness | kg/m$^2$ | cell | LayerThickness | see [](def-h) | +|$\tilde{h}_{i,k}$ | layer mass-thickness | kg/m$^2$ | cell | LayerThickness | | |$k$ | vertical index | | |${\bf k}$ | vertical unit vector | | |$K_{min}$ | shallowest active layer | | @@ -997,7 +986,7 @@ Table 1. Definition of variables. Geometric variables may be found in the [Omega |$\omega$ | mass transport | kg/s/m^2 | cell | VerticalTransport |$\omega=\rho w$| -## 12. Verification and Testing +## 13. Verification and Testing Capability and testing are similar to [Petersen et al. 2015](http://www.sciencedirect.com/science/article/pii/S1463500314001796). The following tests are in idealized domains and do not require surface fluxes or surface restoring. For the following tests to show results comparable to those published with other models, the full dynamic sequence of density, pressure, momentum, and advection must work correctly. The successful completion of the following tests is a validation of the primitive equation functions in Omega 1.0. All of the following tests may exercise a linear equation of state or the nonlinear TEOS10. The first four tests quantify the anomalous mixing caused by the numerical schemes. The first five are on cartesian planes with regular hexagon meshes. @@ -1036,4 +1025,3 @@ This section is for references without webpage links. These are mostly textbooks - Kundu, P.K., Cohen, I.M., Dowling D.R. (2016) Fluid Mechanics 6th Edition, Academic Press. - Pedlosky, J. (1987). Geophysical Fluid Dynamics (Vol. 710). Springer. - Vallis, G. K. (2017). Atmospheric and oceanic fluid dynamics. Cambridge University Press. - From 456d8fe88dda6ef31416352f522c7856633fa4dd Mon Sep 17 00:00:00 2001 From: vanroekel Date: Tue, 15 Jul 2025 21:14:21 -0700 Subject: [PATCH 53/65] Adds text on vertical discrete derivatives --- .../omega/doc/design/OmegaV1GoverningEqns.md | 68 +++++++++++++++++-- 1 file changed, 63 insertions(+), 5 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 87e336a64b1a..09fcda801dc9 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -686,7 +686,7 @@ $$ = 0. $$ (layer-mass-final-simple) -**Momentum:** +**Velocity:** $$ \frac{\partial {\bf u}_k}{\partial t} @@ -723,7 +723,7 @@ $$ (discrete-tracer) In the tracer equation, we note that surface fluxes (e.g. latent heat fluxes) will appear in the surface value of the vertical turbulent tracer flux (e.g., $\left<\varphi^\prime \tilde{w}_{tr}^\prime\right>_{k=0}$). The terms on the second line represent the small scale turbulence and the form used in Omega to represent these terms will be discussed in the next section. -**Momentum:** +**Velocity:** Omega will only predict the layer average normal velocity, so we drop the bold face on the $u$ terms except for the product of primes, which is specified in the next section. @@ -813,7 +813,53 @@ $$ \frac{1}{\left[\tilde{h}_{i,k}\right]_{e,k}} \left\{ \left[ \nu_v \left[\frac{\partial u}{\partial \tilde{z}}\right]_{e,k} \right]_{e,k} - \left[ \nu_v \left[\frac{\partial u}{\partial \tilde{z}}\right]_{e,k} \right]_{e,k+1} \right\} $$ (discrete-mom-vert-diff) -**NOTE: further thought is needed, a standard derivative does not respect finite volume - should probably go back and redirve the heat flux equation** -If [](#discrete-mom-vert-diff) is discretized with a standard centered derivative around the top and bottom of the cell, this stencil is applied as an implicit tri-diagonal solve at the end of the time step. However, this approach to the derivative may not be correct / fully consistent with a finite volume approach +##### Vertical derivatives in a finte volume framework + +Omega will predict layer average quantities (e.g., $u_k$) as such it's not immediately cleear that a traditional discretization is appropriate as there is a discontinuity in the predicted variables at the layer edge. To circumvent this problem, we turn to weak derivatives instead of traditional pointwise forms. A weak derivative of $\phi$ is defined as + +$$ +\int_{\tilde{z}_{k+1/2}^{\text{top}}}^{\tilde{z}_{k-1/2}^{\text{top}}} \phi^\prime \psi d\tilde{z} = \phi \psi - \int_{\tilde{z}_{k+1/2}^{\text{top}}}^{\tilde{z}_{k-1/2}^{\text{top}}} \phi \psi^\prime d\tilde{z}. +$$ (weak-derivative-defn) + +Here $\psi$ is a smooth test function. If we choose $\psi$ such that it has compact support on the interval $(\tilde{z}_{k+1/2}^{\text{top}},\tilde{z}_{k-1/2}^{\text{top}})$ then the first term on the right hand side of [](#weak-derivative-defn) is zero. Using the fact that Omega predicts layer averages, the integral on the right hand side can be broken into + +$$ +-\int_{\tilde{z}_{k+1/2}^{\text{top}}}^{\tilde{z}_{k-1/2}^{\text{top}}} \phi \psi^\prime d\tilde{z} = - \int_{\tilde{z}_{k+1/2}^{\text{top}}}^{\tilde{z}_{k}^{\text{top}}} \phi_{k+1} \psi(z)^\prime d\tilde{z} - \int_{\tilde{z}_{k}^{\text{top}}}^{\tilde{z}_{k-1/2}^{\text{top}}} \phi_k \psi(z)^\prime d\tilde{z}. +$$ + +Since $\phi$ is constant over the integral domain, it can be pulled outside the integral and we use the fundamental theorem to yield + +$$ +-\phi_{k+1} (\psi(k)-\psi(k+1/2)) - \phi_k (\psi(k-1/2) - \psi(k)). +$$ + +Since we have assumed $\psi$ has compact support within the interval but not including the endpoints, $\psi(k-1/2) = \psi(k+1/2) = 0$ and we are lift with + +$$ +\int_{\tilde{z}_{k+1/2}^{\text{top}}}^{\tilde{z}_{k-1/2}^{\text{top}}} \phi^\prime \psi d\tilde{z} = \psi(k) \left(\phi_k - \phi_{k+1}\right). +$$ + +Since we are able to pick any test function that satisfies our assumptions, we choose the dirac delta function and rewrite the previous equation as + +$$ +\phi^\prime(z) = \left(\phi_k - \phi_{k+1}\right) \delta \left(z-\tilde{z}_{k}^{\text{top}}\right). +$$ (weak-derivative) + +If [](#weak-derivative) is averaged between $\tilde{z}_{k-1/2}^{\text{top}}$ and $\tilde{z}_{k+1/2}^{\text{top}}$, we arrive at the expected form of the gradient + +$$ +\left[\frac{\partial \phi}{\partial z}\right]_{avg} = \frac{\left(\phi_k - \phi_{k+1}\right)}{0.5 \left(\tilde{h}_k + \tilde{h}_{k+1}\right)} +$$ (weak-deriv-final) + +where $0.5 \left(\tilde{h}_k + \tilde{h}_{k+1}\right)$ is the distance between $\tilde{z}_{k-1/2}^{\text{top}}$ and $\tilde{z}_{k+1/2}^{\text{top}}$. A similar derivation can be followed to compute gradients across layer centers. This will form discrete derivatives in Omega. + +With this, we can now fully discretize [](#discrete-mom-vert-diff) as + +$$ +-\frac{\rho_0}{\left[\tilde{h}_k\right]_e} \left\{ \left[\left \right]_{e,k} - \left[\left \right]_{e,k+1} \right\} = -\frac{\rho_0}{\left[\tilde{h}_k\right]_e} \left\{ \frac{\left(u_{e,k-1} - u_{e,k}\right)}{0.5 \left(\tilde{h}_k-1 + \tilde{h}_{k}\right)} - \frac{\left(u_{e,k} - u_{e,k+1}\right)}{0.5 \left(\tilde{h}_k + \tilde{h}_{k+1}\right)} \right\}. +$$ + +This form can be interfaced with the Omega [tridiagongal solver](TridiagonalSolver.md) routine. ### Forcing at the top and bottom of the ocean @@ -901,8 +947,20 @@ $$ While this is similar in form, this uses the reconstruction at the top of the layer and not the layer averages directly as in [](#discrete-tracer-del2). #### Vertical tracer diffusion -The vertical tracer diffusion arises from the $\rho_0\left(\left[\left<\varphi^\prime \tilde{w}_{tr}^\prime \right> \right]_k - \left[\left<\varphi^\prime \tilde{w}_{tr}^\prime \right> \right]_{k+1} \right)$ term. Again, if a traditional down gradient parameterization is used $\kappa \frac{\partial \varphi}{\partial z}$ the vertical turbulent flux can be applied using a tridiagonal solver in the -[tridiagonal solver](TridiagonalSolver) in the implicit vertical mixing step. +The vertical tracer diffusion arises from the $\rho_0\left(\left[\left<\varphi^\prime \tilde{w}_{tr}^\prime \right> \right]_k - \left[\left<\varphi^\prime \tilde{w}_{tr}^\prime \right> \right]_{k+1} \right)$ term. In an equation for $\tilde{h}_k \varphi$, this term is different than in the velocity equation for vertical turbulent diffusion. In Omega, we will follow the same approach as in MPAS-Ocean and solve the tracer diffusion after the main tracer update. Roughly Omega will compute a temporarily updated tracer as + +$$ +\varphi^{new} = \tilde{h}_k^{old} \varphi^{old} + dt \frac{Adv + Hdiff}{\tilde{h}_k^{new}}. +$$ + +The non mass weighted tracer is then used to compute the diffusive tendency and compute the final tracer at the next timestep. Given diffusion is done on the non mass weighted tracer, the diffusive term is written as + +$$ +\frac{rho_0}{\tilde{h}_k} \left\{\left[<\varphi^\prime \tilde{w}_{tr}^\prime \right>\right]_k - \left[<\varphi^\prime \tilde{w}_{tr}^\prime \right>\right]_{k+1} \right\} +$$ + +Taking a traditional down gradient approximation and using [](#weak-deriv-final) the vertical turbulent flux can be applied using a tridiagonal solver in the +[tridiagonal solver](TridiagonalSolver) in the implicit vertical mixing step. Additional enhancements, such as non local tracer fluxes will be discused in future design documents. ### MPAS-Ocean Equations of Motion From c8762e7cbce9e5943f5afc6279de989688977e27 Mon Sep 17 00:00:00 2001 From: vanroekel Date: Mon, 21 Jul 2025 08:47:39 -0700 Subject: [PATCH 54/65] Addresses most review comments --- .../omega/doc/design/OmegaV1GoverningEqns.md | 76 ++++++++++--------- 1 file changed, 40 insertions(+), 36 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 09fcda801dc9..3ee83eebf8d6 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -41,7 +41,7 @@ The model also assumes hydrostatic balance in the vertical momentum equation, wh See additional [EOS design document](EOS) ### Omega-1.0 will add new terms for the pressure gradient, vertical mixing, and vertical advection. -See forthcoming design documents on the pressure gradient, vertical mixing, and vertical advection. +See forthcoming design documents on the pressure gradient, [vertical mixing](VerticalMixingCoeff), and vertical advection. ## 3. Conservation Equations @@ -49,7 +49,7 @@ See forthcoming design documents on the pressure gradient, vertical mixing, and We begin with the continuous, control-volume form of the conservation equations. Consider an arbitrary control volume $V(t)$ with a bounding control surface $\partial V(t)$. The fluid has density $\rho({\bf x},t)$ and velocity ${\bf v}({\bf x},t)$. The control surface is moving at a velocity ${\bf v}_r({\bf x},t)$. The vector ${\bf n}$ denotes the outward-facing unit normal vector on the control surface $\partial V(t)$, and is used in all surface integrals to represent the direction of fluxes across the boundary. The conservation equations are -mass: +**Mass:** $$ \frac{d}{dt} \int_{V(t)} \rho({\bf x},t) \, dV @@ -57,7 +57,7 @@ $$ = 0 $$ (continuous-mass) -tracers: +**Tracers:** $$ \frac{d}{dt} \int_{V(t)} \rho({\bf x},t) \, \varphi({\bf x},t) \, dV @@ -65,7 +65,7 @@ $$ = 0 $$ (continuous-tracer) -momentum: +**Momentum:** $$ &\frac{d}{dt} \int_{V(t)} \rho({\bf x},t)\, {\bf v}({\bf x},t) \, dV @@ -208,7 +208,7 @@ To facilitate integration over a fixed horizontal domain, we introduce the follo - $\partial A$ is the boundary of $A$, and $dl$ is the line element along this boundary. - ${\bf n}_\perp$ is the outward-pointing unit normal vector in the horizontal plane, defined on $\partial A$. It lies in the $x$–$y$ plane and is orthogonal to $dl$. -We now project the tracer equation [](#tr-vh-split-pseudo) onto a horizontal domain $A$ (the footprint of the control volume), over which the top and bottom boundaries vary in height. The side walls remain fixed in time and space. +We now project the tracer equation [](#tr-vh-split-pseudo) onto a horizontal domain $A$ (the footprint of the control volume), over which the top and bottom boundaries vary in height. The side walls remain fixed in time and space, but not vertical extent. The pseudo-height surfaces $\tilde{z}^{\text{top}}(x,y,t)$ and $\tilde{z}^{\text{bot}}(x,y,t)$ are not fixed in time, so their motion must be accounted for when computing vertical fluxes. We define $\tilde{w}_r$ as the pseudo-height velocity of the interface: @@ -295,7 +295,7 @@ These equations express horizontal and vertical fluxes naturally in terms of pse ## 7. Vertical Discretization for the Layered Equations -The previous equation set [](#vh-mass-pseudo) to [](#vh-momentum-pseudo) is for an arbitrary layer bounded by $z^{\text{top}}$ above and $z^{\text{bot}}$ below. We now provide the details of the vertical discretization. The ocean is divided vertically into $K_{max}$ layers, with $k=0$ at the top and increasing downwards (opposite from $z$). Layer $k$ is bounded between $z_k^{\text{top}}$ above and $z_{k+1}^{\text{top}}$ below (i.e. $z_k^{\text{bot}} = z_{k+1}^{\text{top}}$). +The previous equation set [](#vh-mass-pseudo) to [](#vh-momentum-pseudo) is for an arbitrary layer bounded by $\tilde{z}^{\text{top}}$ above and $\tilde{z}^{\text{bot}}$ below. We now provide the details of the vertical discretization. The ocean is divided vertically into $K_{max}$ layers, with $k=0$ at the top and increasing downwards (opposite from $z$). Layer $k$ is bounded between $\tilde{z}_k^{\text{top}}$ above and $\tilde{z}_{k+1}^{\text{top}}$ below (i.e. $\tilde{z}_k^{\text{bot}} = \tilde{z}_{k+1}^{\text{top}}$). The layer thickness of layer $k$, used in MPAS-Ocean, is @@ -331,10 +331,10 @@ $$ \frac{1}{{\tilde h}_k}\int_{{\tilde z}_{k+1}^{\text{top}}}^{{\tilde z}_k^{\text{top}}} \varphi d{\tilde z}. $$ (def-layer-average) -Rearranging, is it useful to note that +Rearranging, it is useful to note that $$ -\int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \rho \varphi d\tilde{z} +\int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \varphi d\tilde{z} = {\tilde h}_k {\overline \varphi}^{\tilde{z}}_k(x,y,t). $$ (h-phi) @@ -466,7 +466,7 @@ $$ & - \rho_0 \left\{ \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{ u}^{\prime}\right> \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{top}}} - \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{ u}^{\prime}\right> \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}}\right\}. $$ (layer-tracer) -A few notes on the layer averaged tracer equation. In this complete form, it includes three types of fluctuating quantities that must be dealt with: (1) the layer averaged, Reynolds' averaged horizontal turbulent flux $\left( \overline{\left<\varphi^{\prime} {\bf u}^{\prime}\right>}^{\tilde{z}}_k \right)$, (2) the Reynolds' average vertical turbulent flux $\left( \left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime {\bf u}_{proj}^{\prime}\right> \right)$, and (3) the layer averaged product of deviations from the layer integrated variables $\left(\overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right)$. The details of the first two quantities will be discussed later in this document and follow on design documents. The terms involving perturbations from the layer integrated quantity are necessary to extend beyond piecewise constant represenation of variables. In this equation, variables with no overline are the full field variable at the interfaces. +A few notes on the layer averaged tracer equation. In this complete form, it includes three types of fluctuating quantities that must be dealt with: (1) the layer averaged, Reynolds' averaged horizontal turbulent flux $\left( \overline{\left<\varphi^{\prime} {\bf u}^{\prime}\right>}^{\tilde{z}}_k \right)$, (2) the Reynolds' average vertical turbulent flux $\left( \left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{u}^{\prime}\right> \right)$, and (3) the layer averaged product of deviations from the layer integrated variables $\left(\overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right)$. The details of the first two quantities will be discussed later in this document and follow on design documents. The terms involving perturbations from the layer integrated quantity are necessary to extend beyond piecewise constant represenation of variables. In this equation, variables with no overline are the full field variable at the interfaces. The mass equation is identical to the tracer equation with $\varphi=1$. @@ -482,7 +482,7 @@ $$ (layer-mass) ### Momentum -We now derive the horizontal momentum equation in our non-Boussinesq, hydrostatic framework, following the same finite-volume approach used for mass and tracer conservation. We work with a pseudo-height vertical coordinate $\tilde{z}$ as defined in [Pseudo-Height Coordinate Section](pseudo-height). +We now derive the horizontal momentum equation in our non-Boussinesq, hydrostatic framework, following the same finite-volume approach used for mass and tracer conservation. We begin from [](#vh-momentum-pseudo) and specify the body forces ${\bf b}$ and surface forces ${\bf \tau}$ @@ -644,7 +644,9 @@ $$ (layer-momentum-prefinal) ### Simplifying Assumptions -In [](#layer-momentum-final), if we assume a piecewise constant representation of variables in Omega, then all the $\delta X$ variables would be zero. However, in general, piecewise constant representations are not recommended (e.g., [White and Adcroft (2008)](https://www.sciencedirect.com/science/article/pii/S0021999108002593)), thus we keep these terms for Omega. They will be based on the order of reconstruction assumed for the model. More details are given in the following section. In addition to simplifying the product of $\delta$ terms based on reconstruction order in the vertical, we will assume that $\left<\alpha^\prime p^\prime \right>$ is small. We would only expect this term to be large in nonhydrostatic codes in regions of vigorous convection. All terms involving $\alpha^\prime$ are neglected. The final momentum equation for Omega is given by +In [](#layer-momentum-final), we will assume that $\left<\alpha^\prime p^\prime \right>$ is small. We would only expect this term to be large in nonhydrostatic codes in regions of vigorous convection. All terms involving $\alpha^\prime$ are neglected. The final momentum equation for Omega is given by + +**Momentum:** $$ \frac{\partial \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} @@ -751,14 +753,14 @@ $$ (discrete-z) We refer to these as the discrete equations, but time derivatives remain continuous. The time discretization is described in the [time stepping design document](TimeStepping.md). The velocity, mass-thickness, and tracers are solved prognostically using [](discrete-momentum), [](discrete-mass), [](discrete-tracer). At the new time, these variables are used to compute pressure [](discrete-pressure), specific volume [](discrete-eos), and z-locations [](discrete-z). Additional variables are computed diagnostically at the new time: $\mathbf{u}^{\perp}$, $K$, $\zeta_a$, $z^{mid}$, $\Phi$, etc. The initial geopotential is simply $\Phi=gz$, but additional gravitational terms may be added later. -The horizontal operators $\nabla$, $\nabla\cdot$, and $\nabla \times$ are now in their discrete form. In the TRiSK design, gradients ($\nabla$) map cell centers to edges; divergence ($\nabla \cdot$) maps edge quantities to cells; and curl ($\nabla \times$) maps edges to vertices. The exact form of operators and interpolation stencils remain the same as those given in [Omega-0 design document](OmegaV0ShallowWater.md#Operator Formulation). The discrete version of terms common with Omega-0, such as advection, potential vorticity, and $\nabla K$, can be found in [Omega-0 Momentum Terms](OmegaV0ShallowWater.md#Momentum Terms) and [Omega-0 Thickness and Tracer Terms](OmegaV0ShallowWater.md#Thickness and Tracer Terms). +The horizontal operators $\nabla$, $\nabla\cdot$, and $\nabla \times$ are now in their discrete form. In the TRiSK design, gradients ($\nabla$) map cell centers to edges; divergence ($\nabla \cdot$) maps edge quantities to cells; and curl ($\nabla \times$) maps edges to vertices. The exact form of operators and interpolation stencils remain the same as those given in [Omega-0 design document](OmegaV0ShallowWater.md#32-operator-formulation). The discrete version of terms common with Omega-0, such as advection, potential vorticity, and $\nabla K$, can be found in [Omega-0 Momentum Terms](OmegaV0ShallowWater.md#33-momentum-terms) and [Omega-0 Thickness and Tracer Terms](OmegaV0ShallowWater.md#34-thickness-and-tracer-terms). ## 11. Sub gridscale parameterizations ### Horizontal Momentum Dissipation -There are two terms related to horizontal momentum dissipation in [](#discrete-momentum) that need to be parameterized, $\left<\mathbf{u}^\prime \tilde{u}^\prime \right>$ and $\frac{1}{\left[\tilde{h}_{i,k}\right]_e} \nabla \cdot \left( \tilde{h}_k \left< {\bf u}^\prime \otimes {\bf u}^\prime \right>_k \right)$. The former only arises from the layer integration in psuedo-height coordinates, we interpret this term as the projection of the horizontal momentum dissipation that crosses $\tilde{z}$ interfaces. Given this, we discuss the form of the horizontal dissipation parameterization first and return to the second term in a later subsection. +There are two terms related to horizontal momentum dissipation in [](#discrete-momentum) that need to be parameterized, $\left<\mathbf{u}^\prime \tilde{u}^\prime \right>_k$ and $\frac{1}{\left[\tilde{h}_{i,k}\right]_e} \nabla \cdot \left( \tilde{h}_k \left< {\bf u}^\prime \otimes {\bf u}^\prime \right>_k \right)$. The former only arises from the layer integration in psuedo-height coordinates, we interpret this term as the projection of the horizontal momentum dissipation that crosses $\tilde{z}$ interfaces. Given this, we discuss the form of the horizontal dissipation parameterization first and return to the second term in a later subsection. As in MPAS-Ocean, parameterizaiton of the horizontal momentum dissipiation is through laplacian or biharmonic dissipation, @@ -766,7 +768,7 @@ $$ \frac{1}{\left[\tilde{h}_{i,k}\right]_e} \nabla \cdot \left( \tilde{h}_k \left< {\bf u}^\prime \otimes {\bf u}^\prime \right>_k \right) = \nu_2 \nabla^2 u_{e,k} - \nu_4 \nabla^4 u_{e,k}. $$ (discrete-mom-diss) -Again, the quantities in [](#discrete-mom-diss) are layer averaged. The gradient of $\tilde{h}$ is assumed to be small relative to the stress tensor to allow the utilization of traditional parameterization of the dissipation. +Again, the quantities in [](#discrete-mom-diss) are layer averaged. The gradient of $\tilde{h}$ is assumed to be small relative to the stress tensor to allow the utilization of traditional parameterization of the dissipation. We note here that while we use $\nu_2$ and $\nu_4$ indicating constant values, which are specified via the YAML configuration file, the viscosities are scaled by the mesh density. For regionally refined meshes the viscosity is not spatially constant. We assume that the spatially gradient of $\nu$ is small and we can treat them as constant and pass them through the gradient operator. #### Laplacian dissipation (del2) @@ -774,10 +776,10 @@ $$ \nu_2 \nabla^2 u_{e,k} = \nu_2 \left( \nabla D_{i,k} - \nabla^{\perp} \zeta_{v,k} \right) $$ (discrete-mom-del2) -where $D$ is divergence and $\zeta$ is relative vorticity. See [Omega V0 Section 3.3.4](OmegaV0ShallowWater.md#Del2 momentum dissipation) +where $D$ is divergence and $\zeta$ is relative vorticity. See [Omega V0 Section 3.3.4](OmegaV0ShallowWater.md#334-del2-momentum-dissipation) for further details. #### Biharmonic dissipation (del4) -As in [Omega V0 Section 3.3.5](OmegaV0ShallowWater.md#Del4 momentum dissipation), biharmonic momentum dissipation is computed with two applications of the Del2 operator above. +As in [Omega V0 Section 3.3.5](OmegaV0ShallowWater.md#335-del4-momentum-dissipation), biharmonic momentum dissipation is computed with two applications of the Del2 operator above. $$ - \nu_4 \nabla^4 u_{e,k} @@ -792,7 +794,7 @@ $$ \left<\mathbf{u}^\prime \tilde{u}^\prime \right> = \left\{\left[\nu_2 \left( \nabla \tilde{D}_{i} - \nabla^{\perp} \tilde{\zeta}_{v} \right)\right]_k - \left[\nu_4 \nabla^2 \left( \nabla^2 \tilde{u}_{e,k} \right)\right]_k\right\} $$ (discrete-mom-flux-sloping) -While whit looks very similar to [](#discrete-mom-del2) - [](#discrete-mom-del4), we not a few critical differences. First, the normal velocities in the divergence and relative vorticity in [](#discrete-mom-flux-sloping) are the reconstructed velocity at the top of the cell along an edge, not the layer average. Second, the velocities in the divergence and relative vorticity are only the projection across the interface (hence the tilde on $D$ and $\zeta$), computed in a discrete sense following +While it looks very similar to [](#discrete-mom-del2) - [](#discrete-mom-del4), there are a few critical differences. First, the normal velocities in the divergence and relative vorticity in [](#discrete-mom-flux-sloping) are the reconstructed velocity at the top of the cell along an edge, not the layer average. Second, the velocities in the divergence and relative vorticity are only the projection across the interface (hence the tilde on $D$ and $\zeta$), computed in a discrete sense following $$ \left[\tilde{u}_{e}\right]_k = u_e \nabla \tilde{z}_{e,k} @@ -801,7 +803,7 @@ $$ in this relation, we have moved the subscript $k$ off the variable itself to prevent confusion with the layer average. With this definition, [](#discrete-mom-flux-sloping) goes to zero for flat layer surfaces. #### Vertical momentum dissipation -The vertical turbulent momentum stress is most commonly parameterized as a down-gradient process, i.e. +The vertical turbulent momentum stress is most commonly parameterized as a down-gradient process, i.e., $$ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> \right]_{e,k} = -\frac{\nu_v \rho}{\rho_0} \left[\frac{\partial u}{\partial \tilde{z}}\right]_{e,k} @@ -815,40 +817,40 @@ $$ (discrete-mom-vert-diff) ##### Vertical derivatives in a finte volume framework -Omega will predict layer average quantities (e.g., $u_k$) as such it's not immediately cleear that a traditional discretization is appropriate as there is a discontinuity in the predicted variables at the layer edge. To circumvent this problem, we turn to weak derivatives instead of traditional pointwise forms. A weak derivative of $\phi$ is defined as +Since, Omega will predict layer average quantities (e.g., $u_k$), it's not immediately clear that a traditional discretization is appropriate as there is a discontinuity in the predicted variables at the layer edge. To circumvent this problem, we turn to weak derivatives instead of traditional pointwise forms. A weak derivative of $\varphi$ is defined as $$ -\int_{\tilde{z}_{k+1/2}^{\text{top}}}^{\tilde{z}_{k-1/2}^{\text{top}}} \phi^\prime \psi d\tilde{z} = \phi \psi - \int_{\tilde{z}_{k+1/2}^{\text{top}}}^{\tilde{z}_{k-1/2}^{\text{top}}} \phi \psi^\prime d\tilde{z}. +\int_{\tilde{z}_{k+1/2}^{\text{top}}}^{\tilde{z}_{k-1/2}^{\text{top}}} \varphi^\prime \psi d\tilde{z} = \varphi \psi - \int_{\tilde{z}_{k+1/2}^{\text{top}}}^{\tilde{z}_{k-1/2}^{\text{top}}} \varphi \psi^\prime d\tilde{z}. $$ (weak-derivative-defn) Here $\psi$ is a smooth test function. If we choose $\psi$ such that it has compact support on the interval $(\tilde{z}_{k+1/2}^{\text{top}},\tilde{z}_{k-1/2}^{\text{top}})$ then the first term on the right hand side of [](#weak-derivative-defn) is zero. Using the fact that Omega predicts layer averages, the integral on the right hand side can be broken into $$ --\int_{\tilde{z}_{k+1/2}^{\text{top}}}^{\tilde{z}_{k-1/2}^{\text{top}}} \phi \psi^\prime d\tilde{z} = - \int_{\tilde{z}_{k+1/2}^{\text{top}}}^{\tilde{z}_{k}^{\text{top}}} \phi_{k+1} \psi(z)^\prime d\tilde{z} - \int_{\tilde{z}_{k}^{\text{top}}}^{\tilde{z}_{k-1/2}^{\text{top}}} \phi_k \psi(z)^\prime d\tilde{z}. +-\int_{\tilde{z}_{k+1/2}^{\text{top}}}^{\tilde{z}_{k-1/2}^{\text{top}}} \varphi \psi^\prime d\tilde{z} = - \int_{\tilde{z}_{k+1/2}^{\text{top}}}^{\tilde{z}_{k}^{\text{top}}} \varphi_{k+1} \psi(z)^\prime d\tilde{z} - \int_{\tilde{z}_{k}^{\text{top}}}^{\tilde{z}_{k-1/2}^{\text{top}}} \varphi_k \psi(z)^\prime d\tilde{z}. $$ -Since $\phi$ is constant over the integral domain, it can be pulled outside the integral and we use the fundamental theorem to yield +Since $\varphi$ is constant over the integral domain, it can be pulled outside the integral and we use the fundamental theorem to yield $$ --\phi_{k+1} (\psi(k)-\psi(k+1/2)) - \phi_k (\psi(k-1/2) - \psi(k)). +-\varphi_{k+1} (\psi(k)-\psi(k+1/2)) - \varphi_k (\psi(k-1/2) - \psi(k)). $$ -Since we have assumed $\psi$ has compact support within the interval but not including the endpoints, $\psi(k-1/2) = \psi(k+1/2) = 0$ and we are lift with +Since we have assumed $\psi$ has compact support within the interval but not including the endpoints, $\psi(k-1/2) = \psi(k+1/2) = 0$ and we are left with $$ -\int_{\tilde{z}_{k+1/2}^{\text{top}}}^{\tilde{z}_{k-1/2}^{\text{top}}} \phi^\prime \psi d\tilde{z} = \psi(k) \left(\phi_k - \phi_{k+1}\right). +\int_{\tilde{z}_{k+1/2}^{\text{top}}}^{\tilde{z}_{k-1/2}^{\text{top}}} \varphi^\prime \psi d\tilde{z} = \psi(k) \left(\varphi_k - \varphi_{k+1}\right). $$ Since we are able to pick any test function that satisfies our assumptions, we choose the dirac delta function and rewrite the previous equation as $$ -\phi^\prime(z) = \left(\phi_k - \phi_{k+1}\right) \delta \left(z-\tilde{z}_{k}^{\text{top}}\right). +\varphi^\prime(z) = \left(\varphi_k - \varphi_{k+1}\right) \delta \left(z-\tilde{z}_{k}^{\text{top}}\right). $$ (weak-derivative) If [](#weak-derivative) is averaged between $\tilde{z}_{k-1/2}^{\text{top}}$ and $\tilde{z}_{k+1/2}^{\text{top}}$, we arrive at the expected form of the gradient $$ -\left[\frac{\partial \phi}{\partial z}\right]_{avg} = \frac{\left(\phi_k - \phi_{k+1}\right)}{0.5 \left(\tilde{h}_k + \tilde{h}_{k+1}\right)} +\left[\frac{\partial \varphi}{\partial z}\right]_{avg} = \frac{\left(\varphi_k - \varphi_{k+1}\right)}{0.5 \left(\tilde{h}_k + \tilde{h}_{k+1}\right)} $$ (weak-deriv-final) where $0.5 \left(\tilde{h}_k + \tilde{h}_{k+1}\right)$ is the distance between $\tilde{z}_{k-1/2}^{\text{top}}$ and $\tilde{z}_{k+1/2}^{\text{top}}$. A similar derivation can be followed to compute gradients across layer centers. This will form discrete derivatives in Omega. @@ -873,14 +875,14 @@ $$ \frac{\tau_{e}}{[ \tilde{h}_{i,k}]_e} $$ -where $\tau$ is the wind stress in Pa. Since the mass-thickness $h$ is in kg/s/m$^2$, this results in the desired units of m/s$^2$ for a momentum tendency term. +where $\tau$ is the wind stress in Pa. Since the mass-thickness $\tilde{h}$ is in kg/s/m$^2$, this results in the desired units of m/s$^2$ for a momentum tendency term. #### Bottom Drag Bottom Drag is applied as a bottom boundary condition during implicit vertical mixing as $$ -- C_D \frac{u_{e,k}\left|u_{e,k}\right|}{[\alpha_{i,k}\tilde{h}_{i,k}]_e} . +- C_D \frac{u_{e,k}\left|u_{e,k}\right|}{[\alpha_{i,k}\tilde{h}_{i,k}]_e}. $$ (discrete-mom-bottom) The units of specific volume times mass-thickness $\alpha h$ are length (m), so that the full term has units of m/s$^2$. @@ -901,7 +903,7 @@ $$ \frac{LHF}{C_p \rho_1} $$ -where $\rho_1$ is the density in the top layer of Omega. This gives units of $mK/s$. +where $\rho_1$ is the density in the top layer of Omega. This gives units of mK/s. #### Freshwater forcing @@ -915,33 +917,35 @@ $$ D^\varphi_{i,k} = \kappa_2 \nabla^2 \varphi_{i,k} - \kappa_4 \nabla^4 \varphi_{i,k}. $$ (discrete-tracer-diff) +As in [](#discrete-mom-diss), we have used $\kappa_2$ and $\kappa_4$ to indicate the constant values specified in the YAML configuration file. These values are also scaled by the mesh density and are thus not exactly constant. We assume that $\varphi_{i,k} \nabla^2 \kappa_2$ is small relative to $\kappa_2 \nabla^2 \varphi_{i,k}$. + #### Laplacian diffusion (del2) The Laplacian may be written as the divergence of the gradient, $$ -\nabla \cdot \left(\tilde{h}_k \left<\varphi^\prime u^\prime \right>_k \right) = \nabla \cdot \left( \tilde{h}_{i,k} \kappa_{2,e,k} \nabla \varphi_{i,k} \right). +\nabla \cdot \left(\tilde{h}_k \left<\varphi^\prime u^\prime \right>_k \right) = \nabla \cdot \left( \tilde{h}_{i,k} \kappa_2 \nabla \varphi_{i,k} \right). $$ (discrete-tracer-del2) -See [Omega V0 Section 3.3.2](OmegaV0ShallowWater.md#Del2 tracer diffusion) for details of this calculation. +See [Omega V0 Section 3.4.2](OmegaV0ShallowWater.md#342-del2-tracer-diffusion) for details of this calculation. #### Biharmonic diffusion (del4) The biharmonic is a Laplacian operator applied twice, $$ - - \nabla \cdot \left( \kappa_{4,e,k} \nabla + - \nabla \cdot \left( \kappa_4 \nabla \right[ \nabla \cdot \left( \tilde{h}_{i,k} \nabla \varphi_{i,k} \right) \left] \right). $$ (discrete-tracer-del4) -Each of these operators are written as horizontal stencils in the [Omega V0 Operator Formulation Section](OmegaV0ShallowWater.md#Operator Formulation). Again we note that the variables in these equations are the layer average. +Each of these operators are written as horizontal stencils in the [Omega V0 Operator Formulation Section](OmegaV0ShallowWater.md#32-operator-formulation). Again we note that the variables in these equations are the layer average. #### Horizontal tracer diffusion across a sloping surface As with horizontal momentum dissipation, there is a turbulent flux of tracer across a sloping $\tilde{z}$ interface. We interpret the $\left< \tilde{z}^\prime \varphi^\prime \right>$ as the projection of the horizontal turbulent flux across the sloping interface. The form of the diffusion is similar, taking Laplacian diffusion as an example $$ - \nabla \cdot \left( \tilde{h}_{i} \kappa_{2,e} \nabla \varphi_{i} \right)_k. + \nabla \cdot \left( \tilde{h}_{i} \kappa_2 \nabla \varphi_{i} \right)_k. $$ While this is similar in form, this uses the reconstruction at the top of the layer and not the layer averages directly as in [](#discrete-tracer-del2). @@ -956,7 +960,7 @@ $$ The non mass weighted tracer is then used to compute the diffusive tendency and compute the final tracer at the next timestep. Given diffusion is done on the non mass weighted tracer, the diffusive term is written as $$ -\frac{rho_0}{\tilde{h}_k} \left\{\left[<\varphi^\prime \tilde{w}_{tr}^\prime \right>\right]_k - \left[<\varphi^\prime \tilde{w}_{tr}^\prime \right>\right]_{k+1} \right\} +\frac{rho_0}{\tilde{h}_k} \left\{\left[\left<\varphi^\prime \tilde{w}_{tr}^\prime \right>\right]_k - \left[\left<\varphi^\prime \tilde{w}_{tr}^\prime \right>\right]_{k+1} \right\} $$ Taking a traditional down gradient approximation and using [](#weak-deriv-final) the vertical turbulent flux can be applied using a tridiagonal solver in the From 1bdc337e43ad0b3acac1120c8224ef9265a42170 Mon Sep 17 00:00:00 2001 From: vanroekel Date: Mon, 21 Jul 2025 11:26:00 -0700 Subject: [PATCH 55/65] updates nu and kappa horizontal --- .../omega/doc/design/OmegaV0ShallowWater.md | 49 +++++++++++-------- .../omega/doc/design/OmegaV1GoverningEqns.md | 49 ++++++++++++------- 2 files changed, 59 insertions(+), 39 deletions(-) diff --git a/components/omega/doc/design/OmegaV0ShallowWater.md b/components/omega/doc/design/OmegaV0ShallowWater.md index eef6b8b6008a..54411e4017e1 100644 --- a/components/omega/doc/design/OmegaV0ShallowWater.md +++ b/components/omega/doc/design/OmegaV0ShallowWater.md @@ -273,11 +273,12 @@ The definitions of geometric variables may be found in [Ringler et al. 2010](https://www.sciencedirect.com/science/article/pii/S0021999109006780), and [Thuburn and Cotter 2012](https://epubs.siam.org/doi/10.1137/110850293). +(32-operator-formulation)= ### 3.2 Operator Formulation The TRiSK formulation of the discrete operators are as follows. See [Bishnu et al. 2023](https://gmd.copernicus.org/articles/16/5539/2023) section 4.1 and Figure 1 for a description and documentation of convergence rates, as well as [Bishnu et al. 2021](https://doi.org/10.5281/zenodo.7439539). All TRiSK spatial operators show second-order convergence on a uniform hexagon grid, except for the curl on vertices, which is first order. The curl interpolated from vertices to cell centers regains second order convergence. The rates of convergence are typically less than second order on nonuniform meshes, including spherical meshes. -#### 3.2.1. Divergence +#### 3.2.1 Divergence The divergence operator maps a vector field's edge normal component $F_e$ to a cell center ([Ringler et al. 2010](https://www.sciencedirect.com/science/article/pii/S0021999109006780) eqn 21), $$ @@ -301,7 +302,7 @@ D_i $$ -#### 3.2.2. Gradient +#### 3.2.2 Gradient The gradient operator maps a cell-centered scalar to an edge-normal vector component ([Ringler et al. 2010](https://www.sciencedirect.com/science/article/pii/S0021999109006780) eqn 22), @@ -321,7 +322,7 @@ $$ $$ where $\left\{i_1, i_2\right\}$ are the cells neighboring edge $e$. The indices $\left\{i_1, i_2\right\}$ are ordered such that the normal vector ${\bf n}$ points from cell $i_1$ to cell $i_2$. In the code ${\bf n}$ points from `CellsOnEdge(IEdge, 0)` to `CellsOnEdge(IEdge, 1)`. -#### 3.2.3. Curl +#### 3.2.3 Curl The curl operator maps a vector's edge normal component $u_e$ to a scalar field at vertex ([Ringler et al. 2010](https://www.sciencedirect.com/science/article/pii/S0021999109006780) eqn 23), @@ -336,7 +337,7 @@ where ${\hat A}_v$ is the area of the dual mesh cell $v$, i.e. the triangle surr ${\bf x}_v$, then $t_{e,v}=1$. The summation is over $e\in EV(v)$, which are the edges that terminate at vertex $v$. There are *always* three edges that terminate at each vertex for Voronoi Tessellations, and four edges on each vertex for quadrilateral meshes, unless neighboring cells are missing for land boundaries. Again, the subscript $v$ is dropped and a vertex is assumed for the location of the curl. -#### 3.2.4. Perpendicular vector component +#### 3.2.4 Perpendicular vector component The perpendicular component a vector field is defined as $$ @@ -369,7 +370,7 @@ u_e^\perp = \sum_{e'\in ECP(e)} {\tilde w}_{e,e'} \, u_{e'}. $$ This simple operation can be seen in MPAS-Ocean in the subroutine `ocn_diagnostic_solve_vortVel` in the file `mpas_ocn_diagnostics.F`. -#### 3.2.5. Perpendicular Gradient +#### 3.2.5 Perpendicular Gradient The gradient of a scalar at the middle of an edge, pointing tangentially along the edge (from one vertex to the other), is sometimes used. For example, the del2 formulation requires the perpendicular gradient of vorticity. This is called the perpendicular gradient because the standard gradient is normal to the edge. The perpendicular gradient maps a scalar at vertices to an edge-tangential vector component, @@ -382,21 +383,21 @@ $$ $$ where the positive vector ${\bf n}^\perp$ is 90$^o$ to the left of ${\bf n}$. The indices are ordered such that ${\bf n}^\perp$ points from $v_1$ to $v_2$, which corresponds to `VerticesOnEdge(IEdge, 0)` and `VerticesOnEdge(IEdge, 1)` in the code. -#### 3.2.6. Cell to Edge Interpolation +#### 3.2.6 Cell to Edge Interpolation The mid-point average of a scalar from cell centers to the adjoining edge is $$ [h_i]_e = \frac{1}{2} \sum_{i\in CE(e)} h_i. $$ In a Voronoi tessellation the edge is defined to be at the mid-point between the two cell centers, so this formula is identical to an area-weighted average using the triangles between edge $e$ and the neighboring cell centers. -#### 3.2.7. Vertex to Edge Interpolation +#### 3.2.7 Vertex to Edge Interpolation The mid-point average of a scalar from vertices to the middle of the connecting edge is $$ [\zeta_v]_e = \frac{1}{2} \sum_{v\in VE(e)} \zeta_v. $$ The is a distance-weighted average, since the edge quantity lives at the mid-point between the vertices. One could alternatively compute an area-weighted average using the dual-mesh cell area ${\hat A}_v$ surrounding each vertex, but that is not done and would result in very small differences. -#### 3.2.8. Cell to Vertex Interpolation +#### 3.2.8 Cell to Vertex Interpolation The area-weighted average of a scalar at a vertex from the three surrounding cells is $$ [h_i]_v = \frac{1}{{\hat A}_v} \sum_{i\in CV(v)} h_i {\tilde A}_{v,i}. @@ -407,21 +408,22 @@ $$ {\hat A}_v = \sum_{i\in CV(v)} {\tilde A}_{v,i}. $$ -#### 3.2.9. Vertex to Cell Interpolation +#### 3.2.9 Vertex to Cell Interpolation The area-weighted average of a scalar at a cell from the surrounding vertices is $$ [h_v]_i = \frac{1}{A_i} \sum_{v\in VC(i)} h_v {\tilde A}_{v,i} $$ -#### 3.2.10. Vector from Edge to Cell +#### 3.2.10 Vector from Edge to Cell The prognostic velocity variable on the edge is the edge normal velocity, $u_e$. The tangential velocity $u_e^\perp$ is computed diagnostically from $u_e$. In addition, the full vector may be computed at the cell center from the edge normal velocities $u_e$ of the edges on that cell. That is done in MPAS with radial basis functions, and is explained in this [previous design document](https://github.com/MPAS-Dev/MPAS-Documents/blob/master/shared/rbf_design/rbf.pdf). +(33-momentum-terms)= ### 3.3 Momentum Terms The computation of each term in (4-6) is now described in detail, along with alternative formulations. -#### 3.3.1. Kinetic energy gradient +#### 3.3.1 Kinetic energy gradient The kinetic energy gradient term is the non-rotational part of the nonlinear advection. Fundamentally, it maps the prognostic edge-normal velocity from edges back to an edge scalar quantity. We use the standard gradient formulation from cell center to edge, @@ -464,7 +466,7 @@ $$ for the final kinetic energy at the cell center. Note that addition of $[K_v]_i$ enlarges the stencil. One could also use $u_e^{\perp}$ and compute the kinetic energy at the edge itself in order to enlarge the stencil, but that method is not used here. See [Calandrini et al. 2021](https://www.sciencedirect.com/science/article/pii/S146350032100161X) section 2.3 for more information. -#### 3.3.2. Potential vorticity term +#### 3.3.2 Potential vorticity term The potential vorticity term, $q\left(h\boldsymbol{u}^{\perp}\right)$, includes the rotational part of the advection. It may be computed in two ways, @@ -478,7 +480,7 @@ $$ The first computes the potential vorticity $q_v$ at the vertex and interpolates that quantity to the edge, which is what is done in MPAS-Ocean. One may also cancel the thickness $h$ (ignoring the interpolated locations) and use option 2. Additional interpolation options and results are presented in [Calandrini et al. 2021](https://www.sciencedirect.com/science/article/pii/S146350032100161X) -#### 3.3.3. Sea surface height gradient +#### 3.3.3 Sea surface height gradient The sea surface height (SSH) gradient uses the standard gradient formulation from cell center to edge, $$ @@ -486,7 +488,8 @@ $$ &= -g\frac{(h_{i2}-b_{i2}) - (h_{i1}-b_{i1}) }{d_e}. $$ -#### 3.3.4. Del2 momentum dissipation +(334-del2-momentum-dissipation)= +#### 3.3.4 Del2 momentum dissipation The Del2, or Laplacian operator, viscous momentum dissipation maps edge-normal velocity back to the edge-normal component of the Laplacian. In TRiSK this is done with the vorticity-divergence formulation, which may be written as $$ @@ -508,37 +511,39 @@ where the ordering of indices $\{i_i, i_2\}$ and $\{v_1, v_2\}$ are explained in An alternative formulation for the Del2 dissipation on an unstructured mesh is presented in section 4.2 and Appendix B of [Gassman 2018](https://onlinelibrary.wiley.com/doi/10.1002/qj.3294). -#### 3.3.5. Del4 momentum dissipation +(335-del4-momentum-dissipation)= +#### 3.3.5 Del4 momentum dissipation The Del4, or biharmonic, momentum dissipation also maps edge-normal velocity back to the edge-normal component of the Laplacian. This is done with two applications of the Del2 operator above. $$ - \nu_4 \nabla^4 u_e = - \nu_4 \nabla^2 \left( \nabla^2 u_e \right) $$ -#### 3.3.6. Rayleigh Drag +#### 3.3.6 Rayleigh Drag Rayleigh drag is simply linear drag, applied to all levels. It is typically only used during the spin-up process to damp large velocities during the initial adjustment. The Rayleigh coefficient $Ra$ is simply a scalar constant, $$ - Ra \: u_e. $$ -#### 3.3.7. Bottom drag +#### 3.3.7 Bottom drag Bottom drag is more relevant to layered models than to shallow water systems, but is included here for completeness. It is a quadratic drag applied to the edge velocity, $$ - C_D \frac{u_e\left|u_e\right|}{[h_i]_e}. $$ -#### 3.3.8. Wind forcing +#### 3.3.8 Wind forcing Wind forcing has the same form as the bottom drag, but the forcing is the difference between the current velocity and the wind $u_W$, interpolated and projected to the edge normal direction, $$ - C_W \frac{(u_W - u_e)\left|u_W - u_e\right|}{[h_i]_e}. $$ +(34-thickness-and-tracer-terms)= ### 3.4 Thickness and Tracer Terms -#### 3.4.1. Tracer advection +#### 3.4.1 Tracer advection There are many schemes available for tracer advection. Simple schemes include centered advection and upstream. MPAS-Ocean uses Flux Corrected Transport, which is fourth order under normal conditions, and reduces to third order to preserve monotonicity. @@ -557,7 +562,8 @@ Note that the thickness advection is identical to the tracer advection when $\ph More details of the tracer advection scheme will be given in a future design document. -#### 3.4.2. Del2 tracer diffusion +(342-del2-tracer-diffusion)= +#### 3.4.2 Del2 tracer diffusion Tracer diffusion is applied with a Laplacian operator on the cell-centered tracer phi, and the product of the operator is also at the cell center. The Laplacian may be written as the divergence of the gradient, $$ @@ -574,7 +580,8 @@ $$ \kappa_2 h_i \left( \nabla \cdot \left( \nabla \phi_i \right)_e \right)_i. $$ -#### 3.4.3. Del4 tracer diffusion +(343-del4-tracer-diffusion)= +#### 3.4.3 Del4 tracer diffusion The del4 tracer diffusion is simply the Laplacian operator applied twice, $$ diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 3ee83eebf8d6..0a3181a7bf80 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -753,7 +753,7 @@ $$ (discrete-z) We refer to these as the discrete equations, but time derivatives remain continuous. The time discretization is described in the [time stepping design document](TimeStepping.md). The velocity, mass-thickness, and tracers are solved prognostically using [](discrete-momentum), [](discrete-mass), [](discrete-tracer). At the new time, these variables are used to compute pressure [](discrete-pressure), specific volume [](discrete-eos), and z-locations [](discrete-z). Additional variables are computed diagnostically at the new time: $\mathbf{u}^{\perp}$, $K$, $\zeta_a$, $z^{mid}$, $\Phi$, etc. The initial geopotential is simply $\Phi=gz$, but additional gravitational terms may be added later. -The horizontal operators $\nabla$, $\nabla\cdot$, and $\nabla \times$ are now in their discrete form. In the TRiSK design, gradients ($\nabla$) map cell centers to edges; divergence ($\nabla \cdot$) maps edge quantities to cells; and curl ($\nabla \times$) maps edges to vertices. The exact form of operators and interpolation stencils remain the same as those given in [Omega-0 design document](OmegaV0ShallowWater.md#32-operator-formulation). The discrete version of terms common with Omega-0, such as advection, potential vorticity, and $\nabla K$, can be found in [Omega-0 Momentum Terms](OmegaV0ShallowWater.md#33-momentum-terms) and [Omega-0 Thickness and Tracer Terms](OmegaV0ShallowWater.md#34-thickness-and-tracer-terms). +The horizontal operators $\nabla$, $\nabla\cdot$, and $\nabla \times$ are now in their discrete form. In the TRiSK design, gradients ($\nabla$) map cell centers to edges; divergence ($\nabla \cdot$) maps edge quantities to cells; and curl ($\nabla \times$) maps edges to vertices. The exact form of operators and interpolation stencils remain the same as those given in {ref}`Omega-0 operator formulation <32-operator-formulation>` The discrete version of terms common with Omega-0, such as advection, potential vorticity, and $\nabla K$, can be found in {ref}`Omega-0 Momentum Terms <33-momentum-terms>` and {ref}`Omega-0 Thickness and Tracer Terms <34-thickness-and-tracer-terms>`. ## 11. Sub gridscale parameterizations @@ -765,25 +765,37 @@ There are two terms related to horizontal momentum dissipation in [](#discrete-m As in MPAS-Ocean, parameterizaiton of the horizontal momentum dissipiation is through laplacian or biharmonic dissipation, $$ -\frac{1}{\left[\tilde{h}_{i,k}\right]_e} \nabla \cdot \left( \tilde{h}_k \left< {\bf u}^\prime \otimes {\bf u}^\prime \right>_k \right) = \nu_2 \nabla^2 u_{e,k} - \nu_4 \nabla^4 u_{e,k}. +\frac{1}{\left[\tilde{h}_{i,k}\right]_e} \nabla \cdot \left( \tilde{h}_k \left< {\bf u}^\prime \otimes {\bf u}^\prime \right>_k \right) = \nu_{2,e} \nabla^2 u_{e,k} - \nu_{4,e} \nabla^4 u_{e,k}. $$ (discrete-mom-diss) -Again, the quantities in [](#discrete-mom-diss) are layer averaged. The gradient of $\tilde{h}$ is assumed to be small relative to the stress tensor to allow the utilization of traditional parameterization of the dissipation. We note here that while we use $\nu_2$ and $\nu_4$ indicating constant values, which are specified via the YAML configuration file, the viscosities are scaled by the mesh density. For regionally refined meshes the viscosity is not spatially constant. We assume that the spatially gradient of $\nu$ is small and we can treat them as constant and pass them through the gradient operator. +Again, the quantities in [](#discrete-mom-diss) are layer averaged. The gradient of $\tilde{h}$ is assumed to be small relative to the stress tensor to allow the utilization of traditional parameterization of the dissipation. In [](#discrete-mom-diss), the viscosities are defined as + +$$ +\nu_{2,e} = \nu_2 \times \text{meshScaling}_{2,e} +$$ + +and + +$$ +\nu_{4,e} = \nu_4 \times \text{meshScaling}_{4,e} +$$ + +Where the $\nu_4$ and $\nu_2$ are the constant biharmonic and laplacian coefficients specified in the YAML configuration file. The meshScaling variable is constructed to appropriately scale the viscosity with changes in mesh spacing (for details, see [Hecht et al 2008](https://www.researchgate.net/profile/Mark-Petersen-2/publication/255570421_Lateral_Mixing_in_the_Eddying_Regime_and_a_New_Broad-Ranging_Formulation/links/55886e1c08ae347f9bda9f04/Lateral-Mixing-in-the-Eddying-Regime-and-a-New-Broad-Ranging-Formulation.pdf)). This formulation implies that for regionally resolved configurations, we cannot strictly pull the $\nu_{2,e}$ and $\nu_{4,e}$ variables through the gradient operator. To do this, we assume that the spatially gradient of $\nu$ is small and we can treat them as constant and pass them through the gradient operator. #### Laplacian dissipation (del2) $$ - \nu_2 \nabla^2 u_{e,k} = \nu_2 \left( \nabla D_{i,k} - \nabla^{\perp} \zeta_{v,k} \right) + \nu_{2,e} \nabla^2 u_{e,k} = \nu_{2,e} \left( \nabla D_{i,k} - \nabla^{\perp} \zeta_{v,k} \right) $$ (discrete-mom-del2) -where $D$ is divergence and $\zeta$ is relative vorticity. See [Omega V0 Section 3.3.4](OmegaV0ShallowWater.md#334-del2-momentum-dissipation) for further details. +where $D$ is divergence and $\zeta$ is relative vorticity. See {ref}`Omega V0 Section 3.3.4 <334-del2-momentum-dissipation>` for further details. #### Biharmonic dissipation (del4) -As in [Omega V0 Section 3.3.5](OmegaV0ShallowWater.md#335-del4-momentum-dissipation), biharmonic momentum dissipation is computed with two applications of the Del2 operator above. +As in {ref}`Omega V0 Section 3.3.5 <335-del4-momentum-dissipation>`, biharmonic momentum dissipation is computed with two applications of the Del2 operator above. $$ - - \nu_4 \nabla^4 u_{e,k} -= - \nu_4 \nabla^2 \left( \nabla^2 u_{e,k} \right) + - \nu_{4,e} \nabla^4 u_{e,k} += - \nu_{4,e} \nabla^2 \left( \nabla^2 u_{e,k} \right) $$ (discrete-mom-del4) ### Momentum dissipation across a sloping $\tilde{z}$ surface @@ -791,7 +803,7 @@ $$ (discrete-mom-del4) We interpret $\left<\mathbf{u}^\prime \tilde{u}^\prime \right>$ as the dissipation of momentum across the sloping $\tilde{z}$ surface. $$ -\left<\mathbf{u}^\prime \tilde{u}^\prime \right> = \left\{\left[\nu_2 \left( \nabla \tilde{D}_{i} - \nabla^{\perp} \tilde{\zeta}_{v} \right)\right]_k - \left[\nu_4 \nabla^2 \left( \nabla^2 \tilde{u}_{e,k} \right)\right]_k\right\} +\left<\mathbf{u}^\prime \tilde{u}^\prime \right> = \left\{\left[\nu_{2,e} \left( \nabla \tilde{D}_{i} - \nabla^{\perp} \tilde{\zeta}_{v} \right)\right]_k - \left[\nu_{4,e} \nabla^2 \left( \nabla^2 \tilde{u}_{e,k} \right)\right]_k\right\} $$ (discrete-mom-flux-sloping) While it looks very similar to [](#discrete-mom-del2) - [](#discrete-mom-del4), there are a few critical differences. First, the normal velocities in the divergence and relative vorticity in [](#discrete-mom-flux-sloping) are the reconstructed velocity at the top of the cell along an edge, not the layer average. Second, the velocities in the divergence and relative vorticity are only the projection across the interface (hence the tilde on $D$ and $\zeta$), computed in a discrete sense following @@ -914,38 +926,38 @@ Since Omega is a non-Boussinesq ocean, surface sources of water will be mass flu As with momentum dissipation, the horizontal tracer diffusion arises from the $\left<\mathbf{u}_k^\prime \varphi_k \right>$ and $\left< \tilde{u}^\prime \varphi^\prime \right>$. As in MPAS-Ocean, the former term can be parameterized either as Laplacian or Biharmonic diffusion, $$ -D^\varphi_{i,k} = \kappa_2 \nabla^2 \varphi_{i,k} - \kappa_4 \nabla^4 \varphi_{i,k}. +D^\varphi_{i,k} = \kappa_{2,e} \nabla^2 \varphi_{i,k} - \kappa_{4,e} \nabla^4 \varphi_{i,k}. $$ (discrete-tracer-diff) -As in [](#discrete-mom-diss), we have used $\kappa_2$ and $\kappa_4$ to indicate the constant values specified in the YAML configuration file. These values are also scaled by the mesh density and are thus not exactly constant. We assume that $\varphi_{i,k} \nabla^2 \kappa_2$ is small relative to $\kappa_2 \nabla^2 \varphi_{i,k}$. +As in [](#discrete-mom-diss), we have defined $\kappa_{2,e} = \kappa_2 \times \text{meshScaling}_{4,e}$ and $\kappa_{2,e} = \kappa_2 \times \text{meshScaling}_{4,e}$, where $\kappa_2$ and $\kappa_4$ are the constant values specified in the YAML configuration file. We also assume that $\varphi_{i,k} \nabla^2 \kappa_{2,e}$ is small relative to $\kappa_{2,e} \nabla^2 \varphi_{i,k}$. #### Laplacian diffusion (del2) The Laplacian may be written as the divergence of the gradient, $$ -\nabla \cdot \left(\tilde{h}_k \left<\varphi^\prime u^\prime \right>_k \right) = \nabla \cdot \left( \tilde{h}_{i,k} \kappa_2 \nabla \varphi_{i,k} \right). +\nabla \cdot \left(\tilde{h}_k \left<\varphi^\prime u^\prime \right>_k \right) = \nabla \cdot \left( \tilde{h}_{i,k} \kappa_{2,e} \nabla \varphi_{i,k} \right). $$ (discrete-tracer-del2) -See [Omega V0 Section 3.4.2](OmegaV0ShallowWater.md#342-del2-tracer-diffusion) for details of this calculation. +See {ref}`Omega V0 Section 3.4.2 <342-del2-tracer-diffusion>` for details of this calculation. #### Biharmonic diffusion (del4) The biharmonic is a Laplacian operator applied twice, $$ - - \nabla \cdot \left( \kappa_4 \nabla + - \nabla \cdot \left( \kappa_{4,e} \nabla \right[ \nabla \cdot \left( \tilde{h}_{i,k} \nabla \varphi_{i,k} \right) \left] \right). $$ (discrete-tracer-del4) -Each of these operators are written as horizontal stencils in the [Omega V0 Operator Formulation Section](OmegaV0ShallowWater.md#32-operator-formulation). Again we note that the variables in these equations are the layer average. +Each of these operators are written as horizontal stencils in the {ref}`Omega V0 Operator Formulation Section <32-operator-formulation>`. Again we note that the variables in these equations are the layer average. #### Horizontal tracer diffusion across a sloping surface As with horizontal momentum dissipation, there is a turbulent flux of tracer across a sloping $\tilde{z}$ interface. We interpret the $\left< \tilde{z}^\prime \varphi^\prime \right>$ as the projection of the horizontal turbulent flux across the sloping interface. The form of the diffusion is similar, taking Laplacian diffusion as an example $$ - \nabla \cdot \left( \tilde{h}_{i} \kappa_2 \nabla \varphi_{i} \right)_k. + \nabla \cdot \left( \tilde{h}_{i} \kappa_{2,e} \nabla \varphi_{i} \right)_k. $$ While this is similar in form, this uses the reconstruction at the top of the layer and not the layer averages directly as in [](#discrete-tracer-del2). @@ -1037,8 +1049,9 @@ Table 1. Definition of variables. Geometric variables may be found in the [Omega |$\kappa_2$| tracer diffusion | m$^2$/s | cell | | | |$\kappa_4$| biharmonic tracer diffusion | m$^4$/s | cell | | | |$\kappa_v$| vertical tracer diffusion | m$^2$/s | cell | | | -|$\nu_2$ | horizontal del2 viscosity | m$^2$/s | edge | | | -|$\nu_4$ | horizontal biharmonic (del4) viscosity | m$^4$/s | edge | | | +|meshScaling | variable that holds the scaling factor for biharmonic and laplacian mixing | unitless | edge | | | +|$\nu_{2,e}$ | horizontal del2 viscosity scaled by mesh resolution | m$^2$/s | edge | | | +|$\nu_{4,e}$ | horizontal biharmonic (del4) viscosity scaled by mesh resolution | m$^4$/s | edge | | | |$\nu_v$| vertical momentum diffusion | m$^2$/s | edge | | | |$\varphi_{i,k}$ | tracer | kg/m$^3$ or similar | cell | | e.g. $\Theta$, $S$ | |$\rho_{i,k}$ | density | kg/m$^3$ | cell | Density | From 43bee92190f729a859f5609fa114c7508fc363f3 Mon Sep 17 00:00:00 2001 From: "Hyun (Hyun-Gyu) Kang" <47987430+hyungyukang@users.noreply.github.com> Date: Tue, 22 Jul 2025 14:50:01 -0400 Subject: [PATCH 56/65] Update the vertical tracer diffusion section of OmegaV1GoverningEqns.md --- .../omega/doc/design/OmegaV1GoverningEqns.md | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 0a3181a7bf80..9cce18536c73 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -963,20 +963,28 @@ $$ While this is similar in form, this uses the reconstruction at the top of the layer and not the layer averages directly as in [](#discrete-tracer-del2). #### Vertical tracer diffusion -The vertical tracer diffusion arises from the $\rho_0\left(\left[\left<\varphi^\prime \tilde{w}_{tr}^\prime \right> \right]_k - \left[\left<\varphi^\prime \tilde{w}_{tr}^\prime \right> \right]_{k+1} \right)$ term. In an equation for $\tilde{h}_k \varphi$, this term is different than in the velocity equation for vertical turbulent diffusion. In Omega, we will follow the same approach as in MPAS-Ocean and solve the tracer diffusion after the main tracer update. Roughly Omega will compute a temporarily updated tracer as +The vertical tracer diffusion arises from the $\rho_0\left(\left[\left<\varphi^\prime \tilde{w}_{tr}^\prime \right> \right]_k - \left[\left<\varphi^\prime \tilde{w}_{tr}^\prime \right> \right]_{k+1} \right)$ term. A treatment of this term differs from the vertical momentum diffusion. In the tracer equation, the quantity being updated is the mass-weighted tracer $\tilde{h}_k \varphi$, while in the momentum equation, the variable is simply the velocity $\bf u$, without multiplication by pseudo-thickness $\tilde{h}_k$. This difference affects how vertical mixing is handled. For the momentum equation, the vertical mixing term includes an explicit $1/\tilde{h}_k$ factor, which makes it easy to rearrange the equation into a standard tridiganal form that can be solved implicitly. However, in the tracer equation [](#layer-tracer-final-simple), because $\tilde{h}_k$ is already included in the prognostic variable $\tilde{h}_k \varphi_k$, isolating $\varphi_k^{n+1}$ becomes more difficult, where $n$ is an index of timestep. In particular, if $\tilde{h}_k^{n+1}$ were treated implicitly, the left-hand side of [](#layer-tracer-final-simple) would involve the product of two unknowns $\tilde{h}_k^{n+1}$ and $\varphi_k^{n+1}$, resulting in a non-linear system. This nonlinearity prevents the formation of the standard tridiagonal matrix for $\varphi_k^{n+1}$, unlike in the vertical momentum diffusion. To address this, Omega follows the approach used in the MPAS-Ocean: the tracer update is split into two steps. First, a provisional tracer field is computed using advection and horizontal diffusion only, excluding vertical mixing. Then, vertical tracer diffusion is applied in a separate implicit step using this provisional field. + +During the tracer update, Omega first computes a provisional tracer field that excludes vertical turbulent mixing to obtain $\varphi^{n+1}$. This temporary tracer update is given by $$ -\varphi^{new} = \tilde{h}_k^{old} \varphi^{old} + dt \frac{Adv + Hdiff}{\tilde{h}_k^{new}}. -$$ +\varphi^{*} = \frac{\tilde{h}_k^{n} \varphi^{n} + \Delta t (\text{Adv} + \text{Diff}_{\text{H}})}{\tilde{h}_k^{n+1}}. +$$ (provision-tracer-update) + +where the term "$\text{Adv}$" represents resolved tracer advection and includes both horizontal transport and resolved vertical transport by the projected vertical velocity $\tilde{W}_{tr}$, and the "$\text{Diff}_{\text{H}}$" term represents horizontal tracer diffusion including the harmonic and biharmonic diffusion. +Once the provisional tracer field is formed, vertical diffusion is applied using an implicit tridiagonal solver. The non mass weighted tracer is used to compute the diffusive tendency and compute the final tracer at the next timestep. Given diffusion is done on the non mass weighted tracer, the diffusive term is written as -The non mass weighted tracer is then used to compute the diffusive tendency and compute the final tracer at the next timestep. Given diffusion is done on the non mass weighted tracer, the diffusive term is written as +$$ +\frac{\rho_0}{\tilde{h}_k} \left\{\left[\left<\varphi^\prime \tilde{w}_{tr}^\prime \right>\right]_k - \left[\left<\varphi^\prime \tilde{w}_{tr}^\prime \right>\right]_{k+1} \right\} +$$ +Taking a traditional down gradient approximation and using [](#weak-deriv-final) the vertical turbulent flux can be applied using a tridiagonal solver ($\mathcal{L}$) in the +[tridiagonal solver](TridiagonalSolver) in the implicit vertical mixing step: $$ -\frac{rho_0}{\tilde{h}_k} \left\{\left[\left<\varphi^\prime \tilde{w}_{tr}^\prime \right>\right]_k - \left[\left<\varphi^\prime \tilde{w}_{tr}^\prime \right>\right]_{k+1} \right\} +\varphi^{n+1}=\mathcal{L}_\varphi^{-1} (\varphi^*) $$ +Additional enhancements, such as non local tracer fluxes will be discussed in future design documents. -Taking a traditional down gradient approximation and using [](#weak-deriv-final) the vertical turbulent flux can be applied using a tridiagonal solver in the -[tridiagonal solver](TridiagonalSolver) in the implicit vertical mixing step. Additional enhancements, such as non local tracer fluxes will be discused in future design documents. ### MPAS-Ocean Equations of Motion From de486b4c9d8fd373e29a13d9a18149efa2677d49 Mon Sep 17 00:00:00 2001 From: vanroekel Date: Tue, 22 Jul 2025 12:08:14 -0700 Subject: [PATCH 57/65] refines vertical tracer diffusion section small change to section formatting Co-authored-by: Hyun (Hyun-Gyu) Kang <47987430+hyungyukang@users.noreply.github.com> --- .../omega/doc/design/OmegaV1GoverningEqns.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index 9cce18536c73..d699565886d1 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -644,9 +644,9 @@ $$ (layer-momentum-prefinal) ### Simplifying Assumptions -In [](#layer-momentum-final), we will assume that $\left<\alpha^\prime p^\prime \right>$ is small. We would only expect this term to be large in nonhydrostatic codes in regions of vigorous convection. All terms involving $\alpha^\prime$ are neglected. The final momentum equation for Omega is given by +In [](#layer-momentum-final), we will assume that $\left<\alpha^\prime p^\prime \right>$ is small. We would only expect this term to be large in nonhydrostatic codes in regions of vigorous convection. All terms involving $\alpha^\prime$ are neglected. The final velocity equation for Omega is given by -**Momentum:** +**Velocity:** $$ \frac{\partial \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} @@ -758,7 +758,7 @@ The horizontal operators $\nabla$, $\nabla\cdot$, and $\nabla \times$ are now in ## 11. Sub gridscale parameterizations -### Horizontal Momentum Dissipation +### Horizontal Velocity Dissipation There are two terms related to horizontal momentum dissipation in [](#discrete-momentum) that need to be parameterized, $\left<\mathbf{u}^\prime \tilde{u}^\prime \right>_k$ and $\frac{1}{\left[\tilde{h}_{i,k}\right]_e} \nabla \cdot \left( \tilde{h}_k \left< {\bf u}^\prime \otimes {\bf u}^\prime \right>_k \right)$. The former only arises from the layer integration in psuedo-height coordinates, we interpret this term as the projection of the horizontal momentum dissipation that crosses $\tilde{z}$ interfaces. Given this, we discuss the form of the horizontal dissipation parameterization first and return to the second term in a later subsection. @@ -798,7 +798,7 @@ $$ = - \nu_{4,e} \nabla^2 \left( \nabla^2 u_{e,k} \right) $$ (discrete-mom-del4) -### Momentum dissipation across a sloping $\tilde{z}$ surface +### Velocity dissipation across a sloping $\tilde{z}$ surface We interpret $\left<\mathbf{u}^\prime \tilde{u}^\prime \right>$ as the dissipation of momentum across the sloping $\tilde{z}$ surface. @@ -814,7 +814,7 @@ $$ in this relation, we have moved the subscript $k$ off the variable itself to prevent confusion with the layer average. With this definition, [](#discrete-mom-flux-sloping) goes to zero for flat layer surfaces. -#### Vertical momentum dissipation +#### Vertical velocity dissipation The vertical turbulent momentum stress is most commonly parameterized as a down-gradient process, i.e., $$ @@ -871,7 +871,7 @@ With this, we can now fully discretize [](#discrete-mom-vert-diff) as $$ -\frac{\rho_0}{\left[\tilde{h}_k\right]_e} \left\{ \left[\left \right]_{e,k} - \left[\left \right]_{e,k+1} \right\} = -\frac{\rho_0}{\left[\tilde{h}_k\right]_e} \left\{ \frac{\left(u_{e,k-1} - u_{e,k}\right)}{0.5 \left(\tilde{h}_k-1 + \tilde{h}_{k}\right)} - \frac{\left(u_{e,k} - u_{e,k+1}\right)}{0.5 \left(\tilde{h}_k + \tilde{h}_{k+1}\right)} \right\}. -$$ +$$ (final-vert-vel-dissipation) This form can be interfaced with the Omega [tridiagongal solver](TridiagonalSolver.md) routine. @@ -962,8 +962,8 @@ $$ While this is similar in form, this uses the reconstruction at the top of the layer and not the layer averages directly as in [](#discrete-tracer-del2). -#### Vertical tracer diffusion -The vertical tracer diffusion arises from the $\rho_0\left(\left[\left<\varphi^\prime \tilde{w}_{tr}^\prime \right> \right]_k - \left[\left<\varphi^\prime \tilde{w}_{tr}^\prime \right> \right]_{k+1} \right)$ term. A treatment of this term differs from the vertical momentum diffusion. In the tracer equation, the quantity being updated is the mass-weighted tracer $\tilde{h}_k \varphi$, while in the momentum equation, the variable is simply the velocity $\bf u$, without multiplication by pseudo-thickness $\tilde{h}_k$. This difference affects how vertical mixing is handled. For the momentum equation, the vertical mixing term includes an explicit $1/\tilde{h}_k$ factor, which makes it easy to rearrange the equation into a standard tridiganal form that can be solved implicitly. However, in the tracer equation [](#layer-tracer-final-simple), because $\tilde{h}_k$ is already included in the prognostic variable $\tilde{h}_k \varphi_k$, isolating $\varphi_k^{n+1}$ becomes more difficult, where $n$ is an index of timestep. In particular, if $\tilde{h}_k^{n+1}$ were treated implicitly, the left-hand side of [](#layer-tracer-final-simple) would involve the product of two unknowns $\tilde{h}_k^{n+1}$ and $\varphi_k^{n+1}$, resulting in a non-linear system. This nonlinearity prevents the formation of the standard tridiagonal matrix for $\varphi_k^{n+1}$, unlike in the vertical momentum diffusion. To address this, Omega follows the approach used in the MPAS-Ocean: the tracer update is split into two steps. First, a provisional tracer field is computed using advection and horizontal diffusion only, excluding vertical mixing. Then, vertical tracer diffusion is applied in a separate implicit step using this provisional field. +### Vertical tracer diffusion +The vertical tracer diffusion arises from the $\rho_0\left(\left[\left<\varphi^\prime \tilde{w}_{tr}^\prime \right> \right]_k - \left[\left<\varphi^\prime \tilde{w}_{tr}^\prime \right> \right]_{k+1} \right)$ term. Discretization of this term differs from the vertical velocity diffusion. In the tracer equation, the quantity being updated is the mass-weighted tracer $\tilde{h}_k \varphi$, while in the momentum equation, the variable is simply the velocity $\bf u$, without multiplication by pseudo-thickness $\tilde{h}_k$. This difference affects how vertical mixing is handled. For the momentum equation, the vertical mixing term includes an explicit $1/\tilde{h}_k$ factor, which makes it easy to rearrange the equation into a standard tridiganal form that can be solved implicitly ([](#final-vert-vel-dissipation)). However, in the tracer equation [](#layer-tracer-final-simple), because $\tilde{h}_k$ is included in the prognostic variable $\tilde{h}_k \varphi_k$ and not divided through as in the velocity equation. Thus isolating $\varphi_k^{n+1}$ becomes more difficult, where $n$ is an index of timestep. In particular, if $\tilde{h}_k^{n+1}$ were treated implicitly, the left-hand side of [](#layer-tracer-final-simple) would involve the product of two unknowns $\tilde{h}_k^{n+1}$ and $\varphi_k^{n+1}$, resulting in a non-linear system. This nonlinearity prevents the formation of the standard tridiagonal matrix for $\varphi_k^{n+1}$, unlike in the vertical momentum diffusion. To address this, Omega follows the approach used in the MPAS-Ocean: the tracer update is split into two steps. First, a provisional tracer field is computed with all processes except vertical mixing (e.g. advection, horizontal mixing). Then, vertical tracer diffusion is applied in a separate implicit step using this provisional field. During the tracer update, Omega first computes a provisional tracer field that excludes vertical turbulent mixing to obtain $\varphi^{n+1}$. This temporary tracer update is given by @@ -972,7 +972,7 @@ $$ $$ (provision-tracer-update) where the term "$\text{Adv}$" represents resolved tracer advection and includes both horizontal transport and resolved vertical transport by the projected vertical velocity $\tilde{W}_{tr}$, and the "$\text{Diff}_{\text{H}}$" term represents horizontal tracer diffusion including the harmonic and biharmonic diffusion. -Once the provisional tracer field is formed, vertical diffusion is applied using an implicit tridiagonal solver. The non mass weighted tracer is used to compute the diffusive tendency and compute the final tracer at the next timestep. Given diffusion is done on the non mass weighted tracer, the diffusive term is written as +Once the provisional tracer field ($\varphi^{*}$) is formed, vertical diffusion is applied using an implicit tridiagonal solver. The non mass weighted tracer can now be used to compute the diffusive tendency and compute the final tracer at the next timestep. Given diffusion is done on the non mass weighted tracer, the diffusive term is written as $$ \frac{\rho_0}{\tilde{h}_k} \left\{\left[\left<\varphi^\prime \tilde{w}_{tr}^\prime \right>\right]_k - \left[\left<\varphi^\prime \tilde{w}_{tr}^\prime \right>\right]_{k+1} \right\} From 01e7334a73bbd22dada533d9c2ee479c947c62b6 Mon Sep 17 00:00:00 2001 From: Luke Van Roekel Date: Wed, 23 Jul 2025 08:24:40 -0600 Subject: [PATCH 58/65] Updates variable table linting fixes updates links --- .../omega/doc/design/OmegaV0ShallowWater.md | 67 ++++++++++--------- .../omega/doc/design/OmegaV1GoverningEqns.md | 33 ++++----- 2 files changed, 51 insertions(+), 49 deletions(-) diff --git a/components/omega/doc/design/OmegaV0ShallowWater.md b/components/omega/doc/design/OmegaV0ShallowWater.md index 54411e4017e1..e9cd85b50a88 100644 --- a/components/omega/doc/design/OmegaV0ShallowWater.md +++ b/components/omega/doc/design/OmegaV0ShallowWater.md @@ -191,6 +191,7 @@ $$ \mathcal{F}_e = C_W \frac{(u_W - u_e)\left|u_W - u_e\right|}{[h_i]_e} $$ +(32-variable-definitions)= ### 3.2 Variable Definitions Table 1. Definition of variables @@ -273,12 +274,12 @@ The definitions of geometric variables may be found in [Ringler et al. 2010](https://www.sciencedirect.com/science/article/pii/S0021999109006780), and [Thuburn and Cotter 2012](https://epubs.siam.org/doi/10.1137/110850293). -(32-operator-formulation)= -### 3.2 Operator Formulation +(33-operator-formulation)= +### 3.3 Operator Formulation The TRiSK formulation of the discrete operators are as follows. See [Bishnu et al. 2023](https://gmd.copernicus.org/articles/16/5539/2023) section 4.1 and Figure 1 for a description and documentation of convergence rates, as well as [Bishnu et al. 2021](https://doi.org/10.5281/zenodo.7439539). All TRiSK spatial operators show second-order convergence on a uniform hexagon grid, except for the curl on vertices, which is first order. The curl interpolated from vertices to cell centers regains second order convergence. The rates of convergence are typically less than second order on nonuniform meshes, including spherical meshes. -#### 3.2.1 Divergence +#### 3.3.1 Divergence The divergence operator maps a vector field's edge normal component $F_e$ to a cell center ([Ringler et al. 2010](https://www.sciencedirect.com/science/article/pii/S0021999109006780) eqn 21), $$ @@ -302,7 +303,7 @@ D_i $$ -#### 3.2.2 Gradient +#### 3.3.2 Gradient The gradient operator maps a cell-centered scalar to an edge-normal vector component ([Ringler et al. 2010](https://www.sciencedirect.com/science/article/pii/S0021999109006780) eqn 22), @@ -322,7 +323,7 @@ $$ $$ where $\left\{i_1, i_2\right\}$ are the cells neighboring edge $e$. The indices $\left\{i_1, i_2\right\}$ are ordered such that the normal vector ${\bf n}$ points from cell $i_1$ to cell $i_2$. In the code ${\bf n}$ points from `CellsOnEdge(IEdge, 0)` to `CellsOnEdge(IEdge, 1)`. -#### 3.2.3 Curl +#### 3.3.3 Curl The curl operator maps a vector's edge normal component $u_e$ to a scalar field at vertex ([Ringler et al. 2010](https://www.sciencedirect.com/science/article/pii/S0021999109006780) eqn 23), @@ -337,7 +338,7 @@ where ${\hat A}_v$ is the area of the dual mesh cell $v$, i.e. the triangle surr ${\bf x}_v$, then $t_{e,v}=1$. The summation is over $e\in EV(v)$, which are the edges that terminate at vertex $v$. There are *always* three edges that terminate at each vertex for Voronoi Tessellations, and four edges on each vertex for quadrilateral meshes, unless neighboring cells are missing for land boundaries. Again, the subscript $v$ is dropped and a vertex is assumed for the location of the curl. -#### 3.2.4 Perpendicular vector component +#### 3.3.4 Perpendicular vector component The perpendicular component a vector field is defined as $$ @@ -370,7 +371,7 @@ u_e^\perp = \sum_{e'\in ECP(e)} {\tilde w}_{e,e'} \, u_{e'}. $$ This simple operation can be seen in MPAS-Ocean in the subroutine `ocn_diagnostic_solve_vortVel` in the file `mpas_ocn_diagnostics.F`. -#### 3.2.5 Perpendicular Gradient +#### 3.3.5 Perpendicular Gradient The gradient of a scalar at the middle of an edge, pointing tangentially along the edge (from one vertex to the other), is sometimes used. For example, the del2 formulation requires the perpendicular gradient of vorticity. This is called the perpendicular gradient because the standard gradient is normal to the edge. The perpendicular gradient maps a scalar at vertices to an edge-tangential vector component, @@ -383,21 +384,21 @@ $$ $$ where the positive vector ${\bf n}^\perp$ is 90$^o$ to the left of ${\bf n}$. The indices are ordered such that ${\bf n}^\perp$ points from $v_1$ to $v_2$, which corresponds to `VerticesOnEdge(IEdge, 0)` and `VerticesOnEdge(IEdge, 1)` in the code. -#### 3.2.6 Cell to Edge Interpolation +#### 3.3.6 Cell to Edge Interpolation The mid-point average of a scalar from cell centers to the adjoining edge is $$ [h_i]_e = \frac{1}{2} \sum_{i\in CE(e)} h_i. $$ In a Voronoi tessellation the edge is defined to be at the mid-point between the two cell centers, so this formula is identical to an area-weighted average using the triangles between edge $e$ and the neighboring cell centers. -#### 3.2.7 Vertex to Edge Interpolation +#### 3.3.7 Vertex to Edge Interpolation The mid-point average of a scalar from vertices to the middle of the connecting edge is $$ [\zeta_v]_e = \frac{1}{2} \sum_{v\in VE(e)} \zeta_v. $$ The is a distance-weighted average, since the edge quantity lives at the mid-point between the vertices. One could alternatively compute an area-weighted average using the dual-mesh cell area ${\hat A}_v$ surrounding each vertex, but that is not done and would result in very small differences. -#### 3.2.8 Cell to Vertex Interpolation +#### 3.3.8 Cell to Vertex Interpolation The area-weighted average of a scalar at a vertex from the three surrounding cells is $$ [h_i]_v = \frac{1}{{\hat A}_v} \sum_{i\in CV(v)} h_i {\tilde A}_{v,i}. @@ -408,22 +409,22 @@ $$ {\hat A}_v = \sum_{i\in CV(v)} {\tilde A}_{v,i}. $$ -#### 3.2.9 Vertex to Cell Interpolation +#### 3.3.9 Vertex to Cell Interpolation The area-weighted average of a scalar at a cell from the surrounding vertices is $$ [h_v]_i = \frac{1}{A_i} \sum_{v\in VC(i)} h_v {\tilde A}_{v,i} $$ -#### 3.2.10 Vector from Edge to Cell +#### 3.3.10 Vector from Edge to Cell The prognostic velocity variable on the edge is the edge normal velocity, $u_e$. The tangential velocity $u_e^\perp$ is computed diagnostically from $u_e$. In addition, the full vector may be computed at the cell center from the edge normal velocities $u_e$ of the edges on that cell. That is done in MPAS with radial basis functions, and is explained in this [previous design document](https://github.com/MPAS-Dev/MPAS-Documents/blob/master/shared/rbf_design/rbf.pdf). -(33-momentum-terms)= -### 3.3 Momentum Terms +(34-momentum-terms)= +### 3.4 Momentum Terms The computation of each term in (4-6) is now described in detail, along with alternative formulations. -#### 3.3.1 Kinetic energy gradient +#### 3.4.1 Kinetic energy gradient The kinetic energy gradient term is the non-rotational part of the nonlinear advection. Fundamentally, it maps the prognostic edge-normal velocity from edges back to an edge scalar quantity. We use the standard gradient formulation from cell center to edge, @@ -466,7 +467,7 @@ $$ for the final kinetic energy at the cell center. Note that addition of $[K_v]_i$ enlarges the stencil. One could also use $u_e^{\perp}$ and compute the kinetic energy at the edge itself in order to enlarge the stencil, but that method is not used here. See [Calandrini et al. 2021](https://www.sciencedirect.com/science/article/pii/S146350032100161X) section 2.3 for more information. -#### 3.3.2 Potential vorticity term +#### 3.4.2 Potential vorticity term The potential vorticity term, $q\left(h\boldsymbol{u}^{\perp}\right)$, includes the rotational part of the advection. It may be computed in two ways, @@ -480,7 +481,7 @@ $$ The first computes the potential vorticity $q_v$ at the vertex and interpolates that quantity to the edge, which is what is done in MPAS-Ocean. One may also cancel the thickness $h$ (ignoring the interpolated locations) and use option 2. Additional interpolation options and results are presented in [Calandrini et al. 2021](https://www.sciencedirect.com/science/article/pii/S146350032100161X) -#### 3.3.3 Sea surface height gradient +#### 3.4.3 Sea surface height gradient The sea surface height (SSH) gradient uses the standard gradient formulation from cell center to edge, $$ @@ -488,8 +489,8 @@ $$ &= -g\frac{(h_{i2}-b_{i2}) - (h_{i1}-b_{i1}) }{d_e}. $$ -(334-del2-momentum-dissipation)= -#### 3.3.4 Del2 momentum dissipation +(344-del2-momentum-dissipation)= +#### 3.4.4 Del2 momentum dissipation The Del2, or Laplacian operator, viscous momentum dissipation maps edge-normal velocity back to the edge-normal component of the Laplacian. In TRiSK this is done with the vorticity-divergence formulation, which may be written as $$ @@ -511,39 +512,39 @@ where the ordering of indices $\{i_i, i_2\}$ and $\{v_1, v_2\}$ are explained in An alternative formulation for the Del2 dissipation on an unstructured mesh is presented in section 4.2 and Appendix B of [Gassman 2018](https://onlinelibrary.wiley.com/doi/10.1002/qj.3294). -(335-del4-momentum-dissipation)= -#### 3.3.5 Del4 momentum dissipation +(345-del4-momentum-dissipation)= +#### 3.4.5 Del4 momentum dissipation The Del4, or biharmonic, momentum dissipation also maps edge-normal velocity back to the edge-normal component of the Laplacian. This is done with two applications of the Del2 operator above. $$ - \nu_4 \nabla^4 u_e = - \nu_4 \nabla^2 \left( \nabla^2 u_e \right) $$ -#### 3.3.6 Rayleigh Drag +#### 3.4.6 Rayleigh Drag Rayleigh drag is simply linear drag, applied to all levels. It is typically only used during the spin-up process to damp large velocities during the initial adjustment. The Rayleigh coefficient $Ra$ is simply a scalar constant, $$ - Ra \: u_e. $$ -#### 3.3.7 Bottom drag +#### 3.4.7 Bottom drag Bottom drag is more relevant to layered models than to shallow water systems, but is included here for completeness. It is a quadratic drag applied to the edge velocity, $$ - C_D \frac{u_e\left|u_e\right|}{[h_i]_e}. $$ -#### 3.3.8 Wind forcing +#### 3.4.8 Wind forcing Wind forcing has the same form as the bottom drag, but the forcing is the difference between the current velocity and the wind $u_W$, interpolated and projected to the edge normal direction, $$ - C_W \frac{(u_W - u_e)\left|u_W - u_e\right|}{[h_i]_e}. $$ -(34-thickness-and-tracer-terms)= -### 3.4 Thickness and Tracer Terms +(35-thickness-and-tracer-terms)= +### 3.5 Thickness and Tracer Terms -#### 3.4.1 Tracer advection +#### 3.5.1 Tracer advection There are many schemes available for tracer advection. Simple schemes include centered advection and upstream. MPAS-Ocean uses Flux Corrected Transport, which is fourth order under normal conditions, and reduces to third order to preserve monotonicity. @@ -562,8 +563,8 @@ Note that the thickness advection is identical to the tracer advection when $\ph More details of the tracer advection scheme will be given in a future design document. -(342-del2-tracer-diffusion)= -#### 3.4.2 Del2 tracer diffusion +(352-del2-tracer-diffusion)= +#### 3.5.2 Del2 tracer diffusion Tracer diffusion is applied with a Laplacian operator on the cell-centered tracer phi, and the product of the operator is also at the cell center. The Laplacian may be written as the divergence of the gradient, $$ @@ -572,7 +573,7 @@ $$ \kappa_2 h_i \nabla \cdot \left( \nabla \phi_i \right). $$ -and the stencils in Section 3.2 are used. Here $\kappa_2$ is the del2 diffusion coefficient, and the operator is thickness-weighted by $h_i$. The position of a gradient is assumed to be at an edge, and a divergence at the cell center. This could be written explicitly as +and the stencils in Section 3.3 are used. Here $\kappa_2$ is the del2 diffusion coefficient, and the operator is thickness-weighted by $h_i$. The position of a gradient is assumed to be at an edge, and a divergence at the cell center. This could be written explicitly as $$ \kappa_2 h_i \left( \nabla^2 \phi_i \right)_i @@ -580,8 +581,8 @@ $$ \kappa_2 h_i \left( \nabla \cdot \left( \nabla \phi_i \right)_e \right)_i. $$ -(343-del4-tracer-diffusion)= -#### 3.4.3 Del4 tracer diffusion +(353-del4-tracer-diffusion)= +#### 3.5.3 Del4 tracer diffusion The del4 tracer diffusion is simply the Laplacian operator applied twice, $$ @@ -589,7 +590,7 @@ $$ = - \kappa_4 h_i \nabla^2 \left( \nabla^2 \phi_i \right). $$ -The del2 operator using the divergence of the gradient in the last section is used, with the simple stencils from Section 3.2. +The del2 operator using the divergence of the gradient in the last section is used, with the simple stencils from Section 3.3. ## 4 Design diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index d699565886d1..a9992bc25c9b 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -753,7 +753,7 @@ $$ (discrete-z) We refer to these as the discrete equations, but time derivatives remain continuous. The time discretization is described in the [time stepping design document](TimeStepping.md). The velocity, mass-thickness, and tracers are solved prognostically using [](discrete-momentum), [](discrete-mass), [](discrete-tracer). At the new time, these variables are used to compute pressure [](discrete-pressure), specific volume [](discrete-eos), and z-locations [](discrete-z). Additional variables are computed diagnostically at the new time: $\mathbf{u}^{\perp}$, $K$, $\zeta_a$, $z^{mid}$, $\Phi$, etc. The initial geopotential is simply $\Phi=gz$, but additional gravitational terms may be added later. -The horizontal operators $\nabla$, $\nabla\cdot$, and $\nabla \times$ are now in their discrete form. In the TRiSK design, gradients ($\nabla$) map cell centers to edges; divergence ($\nabla \cdot$) maps edge quantities to cells; and curl ($\nabla \times$) maps edges to vertices. The exact form of operators and interpolation stencils remain the same as those given in {ref}`Omega-0 operator formulation <32-operator-formulation>` The discrete version of terms common with Omega-0, such as advection, potential vorticity, and $\nabla K$, can be found in {ref}`Omega-0 Momentum Terms <33-momentum-terms>` and {ref}`Omega-0 Thickness and Tracer Terms <34-thickness-and-tracer-terms>`. +The horizontal operators $\nabla$, $\nabla\cdot$, and $\nabla \times$ are now in their discrete form. In the TRiSK design, gradients ($\nabla$) map cell centers to edges; divergence ($\nabla \cdot$) maps edge quantities to cells; and curl ($\nabla \times$) maps edges to vertices. The exact form of operators and interpolation stencils remain the same as those given in {ref}`Omega-0 operator formulation <33-operator-formulation>` The discrete version of terms common with Omega-0, such as advection, potential vorticity, and $\nabla K$, can be found in {ref}`Omega-0 Momentum Terms <34-momentum-terms>` and {ref}`Omega-0 Thickness and Tracer Terms <35-thickness-and-tracer-terms>`. ## 11. Sub gridscale parameterizations @@ -788,10 +788,10 @@ $$ \nu_{2,e} \nabla^2 u_{e,k} = \nu_{2,e} \left( \nabla D_{i,k} - \nabla^{\perp} \zeta_{v,k} \right) $$ (discrete-mom-del2) -where $D$ is divergence and $\zeta$ is relative vorticity. See {ref}`Omega V0 Section 3.3.4 <334-del2-momentum-dissipation>` for further details. +where $D$ is divergence and $\zeta$ is relative vorticity. See {ref}`Omega V0 Section 3.4.4 <344-del2-momentum-dissipation>` for further details. #### Biharmonic dissipation (del4) -As in {ref}`Omega V0 Section 3.3.5 <335-del4-momentum-dissipation>`, biharmonic momentum dissipation is computed with two applications of the Del2 operator above. +As in {ref}`Omega V0 Section 3.4.5 <345-del4-momentum-dissipation>`, biharmonic momentum dissipation is computed with two applications of the Del2 operator above. $$ - \nu_{4,e} \nabla^4 u_{e,k} @@ -938,7 +938,7 @@ $$ \nabla \cdot \left(\tilde{h}_k \left<\varphi^\prime u^\prime \right>_k \right) = \nabla \cdot \left( \tilde{h}_{i,k} \kappa_{2,e} \nabla \varphi_{i,k} \right). $$ (discrete-tracer-del2) -See {ref}`Omega V0 Section 3.4.2 <342-del2-tracer-diffusion>` for details of this calculation. +See {ref}`Omega V0 Section 3.5.2 <352-del2-tracer-diffusion>` for details of this calculation. #### Biharmonic diffusion (del4) The biharmonic is a Laplacian operator applied twice, @@ -951,7 +951,7 @@ $$ \right). $$ (discrete-tracer-del4) -Each of these operators are written as horizontal stencils in the {ref}`Omega V0 Operator Formulation Section <32-operator-formulation>`. Again we note that the variables in these equations are the layer average. +Each of these operators are written as horizontal stencils in the {ref}`Omega V0 Operator Formulation Section <33-operator-formulation>`. Again we note that the variables in these equations are the layer average. #### Horizontal tracer diffusion across a sloping surface As with horizontal momentum dissipation, there is a turbulent flux of tracer across a sloping $\tilde{z}$ interface. We interpret the $\left< \tilde{z}^\prime \varphi^\prime \right>$ as the projection of the horizontal turbulent flux across the sloping interface. The form of the diffusion is similar, taking Laplacian diffusion as an example @@ -1019,7 +1019,7 @@ The layer thickness $h$, vertical velocity $w$, pressure $p$, and tracer $\varph ## 12. Variable Definitions -Table 1. Definition of variables. Geometric variables may be found in the [Omega V0 design document, Table 1](OmegaV0ShallowWater.md#Variable Definitions) +Table 1. Definition of variables. Geometric variables may be found in the {ref}`Omega V0 design document, Table 1 <32-variable-definitions>` | symbol | name | units | location | name in code | notes | |---------------------|-----------------------------|----------|-|---------|-------------------------------------------------------| @@ -1037,8 +1037,6 @@ Table 1. Definition of variables. Geometric variables may be found in the [Omega |$p^{floor}_i$ | bottom pressure | Pa | cell | PFloor | pressure at ocean floor |$p^{surf}_i$ | surface pressure | Pa | cell | PSurface | due to atm. pressure, sea ice, ice shelves |$q_{v,k}$ | potential vorticity | 1/m/s | vertex | PotentialVorticity |$q = \left(\zeta+f\right)/h$ | -|$Q^h_{i,k}$ | mass source and sink terms| kg/s/m$^2$ | cell | | -|$Q^\varphi_{i,k}$ | tracer source and sink terms|kg/s/m$^2$ or similar| cell | | |$Ra$ | Rayleigh drag coefficient | 1/s | constant | | | |$S_{i,k}$ | salinity | PSU | cell | Salinity | a tracer $\varphi$ | |$t$ | time | s | none | | | @@ -1046,13 +1044,16 @@ Table 1. Definition of variables. Geometric variables may be found in the [Omega |$u_{e,k}$ | velocity, normal to edge | m/s | edge | NormalVelocity | | |$u^\perp_{e,k}$ | velocity, tangential to edge | m/s | edge | TangentialVelocity |${\bf u}^\perp = {\bf k} \times {\bf u}$| |$\alpha_{i,k}$ | specific volume | m$^3$/kg | cell | SpecificVolume | $v = 1/\rho$ | -|$w_{i,k}$ | vertical velocity | m/s | cell | VerticalVelocity | volume transport per m$^2$ | -|$z$ | vertical coordinate | m | - | | positive upward | -|$z^{top}_{i,k}$ | layer top z-location | m | cell | ZTop | see [](discrete-z) | -|$z^{mid}_{i,k}$ | layer mid-depth z-location | m | cell | ZMid | -|$z^{surf}_{i}$ | ocean surface, i.e. sea surface height | m | cell | ZSurface | same as SSH in MPAS-Ocean | -|$z^{floor}_{i}$ | ocean floor z-location | m | cell | ZFloor | -bottomDepth from MPAS-Ocean | +|$\tilde{w}_{i,k}$ | vertical velocity across a pseudo height surface | m/s | cell | VerticalVelocity | volume transport per m$^2$ | +|$\tilde{u}_{i,k}$ | projection of normal velocity across a pseudo height surface | m/s | cell | | | +|$\tilde{W}_{i,k}$ | projected velocity $\tilde{W}_{i,k} \equiv $\tilde{w}_{i,k} - \tilde{u}_{i,k} | m/s | cell | | | +|$\tilde{z}$ | vertical coordinate | m | - | | positive upward | +|$\tilde{z}^{top}_{i,k}$ | layer top z-location | m | cell | ZTop | see [](discrete-z) | +|$\tilde{z}^{mid}_{i,k}$ | layer mid-depth z-location | m | cell | ZMid | +|$\tilde{z}^{surf}_{i}$ | ocean surface, i.e. sea surface height | m | cell | ZSurface | same as SSH in MPAS-Ocean | +|$\tilde{z}^{floor}_{i}$ | ocean floor z-location | m | cell | ZFloor | -bottomDepth from MPAS-Ocean | |$\zeta_{v,k}$ | relative vorticity| 1/s | vertex | RelativeVorticity |$\zeta={\bf k} \cdot \left( \nabla \times {\bf u}\right)$ | +|$\zeta_a$ | absolute vorticity ($\zeta + f$) | 1/s | vertex | | |$\Theta_{i,k}$ | conservative temperature | C | cell | Temperature | a tracer $\varphi$ | |$\kappa_2$| tracer diffusion | m$^2$/s | cell | | | |$\kappa_4$| biharmonic tracer diffusion | m$^4$/s | cell | | | @@ -1063,10 +1064,10 @@ Table 1. Definition of variables. Geometric variables may be found in the [Omega |$\nu_v$| vertical momentum diffusion | m$^2$/s | edge | | | |$\varphi_{i,k}$ | tracer | kg/m$^3$ or similar | cell | | e.g. $\Theta$, $S$ | |$\rho_{i,k}$ | density | kg/m$^3$ | cell | Density | -|$\rho_0$ | Boussinesq reference density | kg/m$^3$ | | constant | +|$\rho_0$ | Reference density | kg/m$^3$ | | constant | |$\tau_i$ | wind stress | Pa=N/m$^2$ | edge | SurfaceStress | |$\Phi_{i,k}$ | geopotential| | cell | Geopotential |$\partial \Phi / \partial z = g$ for gravity | -|$\omega$ | mass transport | kg/s/m^2 | cell | VerticalTransport |$\omega=\rho w$| +|$\omega$ | mass transport | kg/s/m^2 | cell | VerticalTransport |$\omega=\rho_0 w$| ## 13. Verification and Testing From 85da7af44bb01321970e37316212ff13084c6e17 Mon Sep 17 00:00:00 2001 From: Luke Van Roekel Date: Wed, 23 Jul 2025 09:34:51 -0600 Subject: [PATCH 59/65] update W_tr descriptions --- components/omega/doc/design/OmegaV1GoverningEqns.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index a9992bc25c9b..fe0831e5bd9a 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -666,7 +666,7 @@ Throughout the rest of this document, we will 1. Drop the $< >$ notation around single variables and note that all variables are assumed to be Reynolds' averaged. Turbulent correlations will retain the angle bracket notation. 2. Change the vertical density weighted average notation from $\overline{\varphi}^{\tilde{z}}_k$ to the more simple $\varphi_k$. Thus, any subscript $k$ implies a vertical average. -3. Define a projected vertical velocity as $\tilde{W}_{tr} \equiv \tilde{w}_{tr} - \tilde{u}$ +3. Define a total vertical velocity across the psuedo height surface as $\tilde{W}_{tr} \equiv \tilde{w}_{tr} - \tilde{u}$. As a reminder $\tilde{u}$ is the projection of the normal velocity onto the normal vector to the pseudo height surface, in many cases this can be a very small correction to $\tilde{w}_{tr}. With these three simplifications, the final continuous equations become @@ -1046,7 +1046,7 @@ Table 1. Definition of variables. Geometric variables may be found in the {ref}` |$\alpha_{i,k}$ | specific volume | m$^3$/kg | cell | SpecificVolume | $v = 1/\rho$ | |$\tilde{w}_{i,k}$ | vertical velocity across a pseudo height surface | m/s | cell | VerticalVelocity | volume transport per m$^2$ | |$\tilde{u}_{i,k}$ | projection of normal velocity across a pseudo height surface | m/s | cell | | | -|$\tilde{W}_{i,k}$ | projected velocity $\tilde{W}_{i,k} \equiv $\tilde{w}_{i,k} - \tilde{u}_{i,k} | m/s | cell | | | +|$\tilde{W}_{i,k}$ | total velocity across a pseudo height surface $\tilde{W}_{i,k} \equiv $\tilde{w}_{i,k} - \tilde{u}_{i,k}$ | m/s | cell | | | |$\tilde{z}$ | vertical coordinate | m | - | | positive upward | |$\tilde{z}^{top}_{i,k}$ | layer top z-location | m | cell | ZTop | see [](discrete-z) | |$\tilde{z}^{mid}_{i,k}$ | layer mid-depth z-location | m | cell | ZMid | From 52aaa7b722720212c33ee173b5174ad156b7efd1 Mon Sep 17 00:00:00 2001 From: Kat Smith Date: Wed, 9 Jul 2025 16:25:31 -0700 Subject: [PATCH 60/65] cleans up design doc from tracers through mom in section 9 --- .../omega/doc/design/OmegaV1GoverningEqns.md | 132 ++++++++---------- 1 file changed, 58 insertions(+), 74 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index fe0831e5bd9a..a43f3b16901d 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -489,12 +489,12 @@ We begin from [](#vh-momentum-pseudo) and specify the body forces ${\bf b}$ and $$ \frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} {\bf u} \, d\tilde{z} \, dA & + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} {\bf u} \otimes {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ -& + \int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - \tilde{ u} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA -- \int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - \tilde{ u} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ -& = -\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left({\bf f} \times \mathbf{u} + \nabla \Phi \right) \, d\tilde{z} \, dA -+ \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \frac{p}{\rho} \, d\tilde{z} \right) dl \\ -& + \int_A \left[ \frac{p}{\rho} \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA -- \int_A \left[ \frac{p}{\rho} \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. +& + \int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +- \int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ +& = -\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \left({\bf f} \times \mathbf{u} + \nabla \Phi \right) \, d\tilde{z} \, dA ++ \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \frac{\rho_0 p}{\rho} \, d\tilde{z} \right) dl \\ +& + \int_A \left[ \frac{\rho_0 p}{\rho} \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +- \int_A \left[ \frac{\rho_0 p}{\rho} \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. $$ (vh-momentum-forces) In this equation: @@ -508,12 +508,12 @@ As with the tracer derivation, we next Reynolds' average [](#vh-momentum-forces) $$ \frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left< {\bf u} \right> \, d\tilde{z} \, dA & + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left< {\bf u} \otimes {\bf u} \right> \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ -& + \int_A \rho_0 \,\left< {\bf u} \left[ \tilde{w}_{tr} - \tilde{ u} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \right> \, dA -- \int_A \rho_0 \, \left< {\bf u} \left[ \tilde{w}_{tr} - \tilde{ u} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right> \, dA \\ -& = -\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \, \left<\left( {\bf f} \times \mathbf{u} + \nabla \Phi \right) \right> \, d\tilde{z} \, dA -+ \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left< \frac{p}{\rho} \right> \, d\tilde{z} \right) dl \\ -& + \int_A \left[ \left< \frac{p}{\rho} \nabla \tilde{z}^{\text{top}} \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA -- \int_A \left[ \left< \frac{p}{\rho} \nabla \tilde{z}^{\text{bot}} \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. +& + \int_A \rho_0 \,\left< {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \right> \, dA +- \int_A \rho_0 \, \left< {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right> \, dA \\ +& = -\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \, \left<\left( {\bf f} \times \mathbf{u} + \nabla \Phi \right) \right> \, d\tilde{z} \, dA ++ \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \left< \frac{p}{\rho} \right> \, d\tilde{z} \right) dl \\ +& + \int_A \rho_0 \left[ \left< \frac{p}{\rho} \nabla \tilde{z}^{\text{top}} \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +- \int_A \rho_0 \left[ \left< \frac{p}{\rho} \nabla \tilde{z}^{\text{bot}} \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. $$ (vh-momentum-reynolds1) Here we have also moved the Reynolds' average through the spatial integrals given the properties of the averaging. Next we do a Reynolds' decomposition, this yields @@ -521,12 +521,12 @@ Here we have also moved the Reynolds' average through the spatial integrals give $$ \frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left< {\bf u} \right> \, d\tilde{z} \, dA & + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left( \left< {\bf u} \right> \otimes \left< {\bf u} \right> + \left< {\bf u}^\prime \otimes {\bf u}^\prime \right> \right) \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ -& + \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{ u}\right> + \left< {\bf u}^\prime \tilde{ u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ -& - \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{ u}\right> + \left< {\bf u}^\prime \tilde{ u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ -& = - \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \, \left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right) \, d\tilde{z} \, dA \\ -& + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \, d\tilde{z} \right) dl \\ -& + \int_A \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}}\right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ -& - \int_A \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}}\right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. +& + \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ +& - \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ +& = - \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \, \left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right) \, d\tilde{z} \, dA \\ +& + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \, d\tilde{z} \right) dl \\ +& + \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}}\right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ +& - \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}}\right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. $$ (vh-momentum-reynolds2) In [](#vh-momentum-reynolds2) we have also used $\alpha = \frac{1}{\rho}$ for notation conciseness. The definition of the layer average [](#def-layer-average-reynolds) is now utilized on terms with vertical integrals to yield @@ -534,12 +534,12 @@ In [](#vh-momentum-reynolds2) we have also used $\alpha = \frac{1}{\rho}$ for no $$ \frac{d}{dt} \int_A \tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \, dA & + \int_{\partial A} \tilde{h}_k \left( \overline{\left< {\bf u} \right> \otimes \left< {\bf u} \right>}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \cdot {\bf n}_\perp \, dl \\ -& + \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{ u}\right> + \left< {\bf u}^\prime \tilde{ u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ -& - \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{ u}\right> + \left< {\bf u}^\prime \tilde{ u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ -& = - \int_A \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \, dA \\ -& + \int_{\partial A} \tilde{h}_k \left( \overline{\left< \alpha \right> \left

}^{\tilde{z}}_k + \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) dl \\ -& + \int_A \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ -& - \int_A \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. +& + \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ +& - \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ +& = - \int_A \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \, dA \\ +& + \int_{\partial A} \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right> \left

}^{\tilde{z}}_k + \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) dl \\ +& + \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ +& - \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. $$ (vh-momentum-reynolds-lay-avg) The next step is to decompose vertical averages of products. This yields @@ -547,12 +547,12 @@ The next step is to decompose vertical averages of products. This yields $$ \frac{d}{dt} \int_{A} \tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \, dA & + \int_{\partial A} \tilde{h}_k \left( \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \otimes \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \cdot {\bf n}_\perp \, dl \\ -& + \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{ u}\right> + \left< {\bf u}^\prime \tilde{ u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ -& - \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{ u}\right> + \left< {\bf u}^\prime \tilde{ u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ -& = - \int_A \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \, dA \\ -& + \int_{\partial A} \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) dl \\ -& + \int_A \left[\left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ -& - \int_A \left[\left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. +& + \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ +& - \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ +& = - \int_A \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \, dA \\ +& + \int_{\partial A} \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) dl \\ +& + \int_A \rho_0 \left[\left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ +& - \int_A \rho_0 \left[\left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. $$ (vh-momentum-reynolds-lay-avg2) We next use the Divergence theorem on the surface integrals and combine terms into fewer integrals on each side of the equation. @@ -560,12 +560,12 @@ We next use the Divergence theorem on the surface integrals and combine terms in $$ \int_A \bigl\{ \frac{\partial\tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} & + \nabla \cdot \left[ \tilde{h}_k \left(\overline{\left< {\bf u} \right>}^{\tilde{z}}_k \otimes \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ -& + \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{ u}\right> + \left< {\bf u}^\prime \tilde{ u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ -& - \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{ u}\right> + \left< {\bf u}^\prime \tilde{ u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \bigr\} \, dA \\ -& = - \int_A \bigl\{\tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ -& + \nabla \left[ \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ -& + \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ -& - \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}\bigr\} \, dA. +& + \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ +& - \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \bigr\} \, dA \\ +& = - \int_A \bigl\{ \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ +& + \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ +& + \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ +& - \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}\bigr\} \, dA. $$ (vh-momentum-reynolds-lay-avg3) Since the equation is fully inside the integral, the equation is true for any area and therefore we can write the layer averaged momentum equation as @@ -573,12 +573,12 @@ Since the equation is fully inside the integral, the equation is true for any ar $$ \frac{\partial\tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} & + \nabla \cdot \left[ \tilde{h}_k \left( \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \otimes \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ -& + \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{ u}\right> + \left< {\bf u}^\prime \tilde{ u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ -& - \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{ u}\right> + \left< {\bf u}^\prime \tilde{ u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \\ -& = - \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ -& + \nabla \left[ \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ -& + \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \cdot \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ -& - \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \cdot \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. +& + \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ +& - \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \\ +& = - \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ +& + \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ +& + \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \cdot \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ +& - \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \cdot \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. $$ (vh-momentum-v1) The product rule is used on the first two terms of [](#vh-momentum-v1) and then we multiply [](#layer-mass) by $\overline{\mathbf{u}}^{\tilde{z}}_k$ and subtract it from [](#vh-momentum-v1). This yields @@ -586,12 +586,12 @@ The product rule is used on the first two terms of [](#vh-momentum-v1) and then $$ \tilde{h}_k \frac{\partial \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} & + \tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \cdot \nabla \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \nabla \cdot \left[ \tilde{h}_k \left(\overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ -& + \rho_0 \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{ \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{ u}\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{ u}\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ -& + \rho_0 \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ -& = - \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ -& + \nabla \left[ \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ -& + \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ -& - \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. +& + \rho_0 \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{ \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +& + \rho_0 \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +& = - \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ +& + \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ +& + \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ +& - \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. $$ (vh-momentum-v2) The previous equation is divided by $\tilde{h}_k$, @@ -599,12 +599,12 @@ The previous equation is divided by $\tilde{h}_k$, $$ \frac{\partial \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} & + \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \cdot \nabla \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \frac{1}{\tilde{h}_k} \nabla \cdot \left[ \tilde{h}_k \left(\overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ -& + \frac{\rho_0}{\tilde{h}_k} \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{ \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{ u}\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{ u}\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ -& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ -& = - \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ -& + \frac{1}{\tilde{h}_k} \nabla \left[ \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ -& + \frac{1}{\tilde{h}_k} \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ -& - \frac{1}{\tilde{h}_k} \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. +& + \frac{\rho_0}{\tilde{h}_k} \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{ \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +& = - \rho_0 \, \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ +& + \frac{1}{\tilde{h}_k} \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ +& + \frac{\rho_0}{\tilde{h}_k} \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ +& - \frac{\rho_0}{\tilde{h}_k} \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. $$ (vh-momentum-v3) @@ -635,27 +635,11 @@ Defining the absolute vorticity $\zeta_a$ as $\zeta + f$, where $f$ is the Corio $$ \frac{\partial \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} & + \zeta_a {\overline{\left<{\bf u}\right>}^{\tilde{z}}_k}^{\perp} + \nabla K + \frac{1}{\tilde{h}_k} \nabla \cdot \left[ \tilde{h}_k \left(\overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ -& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[\left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{\left<\tilde{w}_{tr}\right> - \left<\tilde{ u}\right> \right\} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{\left<\tilde{w}_{tr}\right> - \left<\tilde{ u}\right> \right\} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ -& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ -& = - \overline{\nabla \left<\Phi\right>}^{\tilde{z}}_k + \frac{1}{\tilde{h}_k} \nabla \left[\tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ -& + \frac{1}{\tilde{h}_k} \left\{ \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} +& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[\left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{\left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right\} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{\left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right\} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +& = - \rho_0 \, \overline{\nabla \left<\Phi\right>}^{\tilde{z}}_k + \frac{1}{\tilde{h}_k} \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ +& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\}. -$$ (layer-momentum-prefinal) - -### Simplifying Assumptions - -In [](#layer-momentum-final), we will assume that $\left<\alpha^\prime p^\prime \right>$ is small. We would only expect this term to be large in nonhydrostatic codes in regions of vigorous convection. All terms involving $\alpha^\prime$ are neglected. The final velocity equation for Omega is given by - -**Velocity:** - -$$ -\frac{\partial \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} -& + \zeta_a {\overline{\left<{\bf u}\right>}^{\tilde{z}}_k}^{\perp} + \nabla K + \frac{1}{\tilde{h}_k} \nabla \cdot \left[ \tilde{h}_k \left(\overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ -& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[\left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{\left<\tilde{w}_{tr}\right> - \left<\tilde{ u}\right> \right\} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{\left<\tilde{w}_{tr}\right> - \left<\tilde{ u}\right> \right\} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ -& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ -& = - \overline{\nabla \left<\Phi\right>}^{\tilde{z}}_k + \frac{1}{\tilde{h}_k} \nabla \left[\tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k \right) \right] \\ -& + \frac{1}{\tilde{h}_k} \left\{ \left[ \left< \alpha \right> \left

\right]_{\tilde{z} = \tilde{z}^{\text{top}}} -- \left[ \left< \alpha \right> \left

\right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\}. $$ (layer-momentum-final) The $\delta X$ terms in the layered equations are vertical deviations from the vertical layer average of a given quantity $X$. We will assume these deviations are small and products of these deviations are even smaller. Thus we will ignore all of these terms in Omega. We note that these terms could potentially serve as a bridge to multiscale fluxes, as resolution is increased, these $\delta X$ terms would get larger, but likely only for significantly higher resolution (e.g. 10s of meters). However, these terms would have to be further analyzed and developed as these terms are only deviations from layer averages, not temporal averages as in the Reynolds' approach. From b2183fd6f0c6be63145644e73251eadb6d500eb1 Mon Sep 17 00:00:00 2001 From: Kat Smith Date: Fri, 25 Jul 2025 09:57:01 -0700 Subject: [PATCH 61/65] adds image for relating pseudo-velocities --- .../omega/doc/design/OmegaV1GoverningEqns.md | 12 ++++++++++-- components/omega/doc/design/images/tilde_w.jpeg | Bin 0 -> 20827 bytes 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 components/omega/doc/design/images/tilde_w.jpeg diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index a43f3b16901d..e0cc00c8b531 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -234,9 +234,16 @@ $$ (vertical-flux) so that the vertical flux terms correctly account for both the local motion of the fluid and the motion of the interface itself. Because both terms are scaled by $1/\rho_0$, the full flux is multiplied by $\rho_0$ to recover a physical mass flux. This ensures dimensional consistency and physical equivalence to the traditional form $\rho w - \rho {\bf u} \cdot \nabla z$ expressed in geometric-height coordinates. -The quantity $\tilde{w}$ from equation [](#w-tilde) is the pseudo-velocity. The second term, $\tilde{ u} = {\bf u} \cdot \nabla \tilde{z}^{\text{top}}$, captures the component of horizontal velocity advecting material across a sloping pseudo-height interface. Together, the expression in brackets represents the **net vertical transport** through a surface of constant $\tilde{z}$. +The quantity $\tilde{w}$ from equation [](#w-tilde) is the pseudo-velocity. The second term, $\tilde{ u} = {\bf u} \cdot \nabla \tilde{z}^{\text{top}}$, captures the component of horizontal velocity advecting material across a sloping pseudo-height interface. Together, the expression in brackets represents the **net vertical transport** through a surface of constant $\tilde{z}$. A schematic of how $\tilde{w}$, $\tilde{w}_{tr}$, and $\tilde{u}$ relate to each other: -Using this projection, we obtain: +```{figure} images/tilde_w.jpeg +:align: center +:width: 300 px + +Schematic of pseudo-velocities. +``` + +$\tilde{W}_{tr}$ will be introduced and defined in [](#notational-simplifications). Using this projection, we obtain: $$ \frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \, \varphi \, d\tilde{z} \, dA @@ -644,6 +651,7 @@ $$ (layer-momentum-final) The $\delta X$ terms in the layered equations are vertical deviations from the vertical layer average of a given quantity $X$. We will assume these deviations are small and products of these deviations are even smaller. Thus we will ignore all of these terms in Omega. We note that these terms could potentially serve as a bridge to multiscale fluxes, as resolution is increased, these $\delta X$ terms would get larger, but likely only for significantly higher resolution (e.g. 10s of meters). However, these terms would have to be further analyzed and developed as these terms are only deviations from layer averages, not temporal averages as in the Reynolds' approach. +(notational-simplifications)= ### Notational simplifications Throughout the rest of this document, we will diff --git a/components/omega/doc/design/images/tilde_w.jpeg b/components/omega/doc/design/images/tilde_w.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..8253a7fc71240ff1c3e1448b715680900bc39b5c GIT binary patch literal 20827 zcmdSB2|SeT`Z)dw2_dqJsSsr=S;{t4NRqS=(!7!^V@U`ZGe!2T$dbyGHCZP6ZnBdk zd&V+mwAnI)#*^88kM}+2yyu+XcRA<(`Fy{h-~Z+@*F1C2{oL1mU-z|N*q_+5z^*f9 z7G?m)HV)u4^aHR-z&q1mkDCBsWd$4p0AL5OokIlRgdh&+2jGwfxPONMz?MViZ}2q^ z<-hdV1_0Z3|Jgs<1K|2ge`w6#8}yW|k+z-&z4AN+03Hb9I;^RA+dwT_LJ$I{Z zVY<`R=ki79RTR4R0H**Cz#q5;cmd8p2(TA84;=kZ`fL5(|0LiG^$r1UL*H`)+<^e- zJ0{Sbtr1)y*aGkYTmW@I6@oQ^!_cL5y)$?K zDAxr5zWP7!DIWs>VSWJUslVlX+xhq5wrF$PO^CWy3jsjD9sqWKgudhGfAgs3@1Jw* zJOKdQGi>(S0f?kh0f70C&8FwD+00x3;G6=0w?6E*fbb5EFpk@t9Q%Q7!W^8!9PADN z2CWn~$M5a;fuKJSVRCVA=h?x_#}9R=-UV#q;N;xK#mUXh1<@2V0z|l6!rUVJj+kuU zZR5*_hJDitKTtZSxTJeCA^1(w|+B&+&j_aK~Wol-A z+TzT`OP6i!Aaq@BxZZSg_we)&2)q*%9CA0}L1a{POl(|A>f^NZjLaulIk|cH1%FS8Xg%P8~-#xAd%-jfBE|D`}_iRb#478Z3FzZxrG;W zn*Klw`uhiF|Adz?gx5AME>13Pmv`C87E!2L;>|aAH{QnbXe?#m~ye5H@&Nj3r4$;kl` z6Q?i$2UslSoH*cLy$2KMS!>aaxSoeT?QtyBV!I~ zdE=?3uD)v1Be8rE2f3U0R{K?4y!^WIr(-U2J+phlddCK;cp~AR#0lJ6Ocm~a537$l z7U^92_I|Bo3AOtwrNVJ)A;|7-awJ0+>Fx5`>1zIP&j5_3{cN?>v!_*nQS%Nn z_L&XbVC|r|MYqU;`j!;f19GrdzZ^kD|5A#*lAq`y;h;VhgA^T}_dnjhzkMae;)P&A z++52(uuCI4n{x~mYV`aSk~e3<8a1Y8Re23D6(jGlQ>UhPt>573oo?yXC1Y9S+EJF= zD2ceKJCMW%Kx0q%oH4BAv0XYt0nEWl8i~(iMFW_e4is>7U&zHXRPNOIhG&Yhsji(R z-2tkdw>jl5MSVy9S_P-+b|?|%%d#p=JlX(^r~1!s#H$;rDz)* z4IJ$l>+|(O+-$M7c(1uq?0OtnYz*57{+Ncm;*YK z#VD_@5~tJ%3l`!}T~HafJ}5kzJ{uIjC)-1l*Jktsf0v1ZN7`P}#t&b$2{+l6Zec`yp?q&m0Mw-EhZX+%5 zDW%eynb{=cMrK}gqWIuF3J7O6bNcxA7r>&BR>T8?bblJu8 z;8U74=uK`6u6|{Ag))}$>K9tRf$md=_o`01t?@(8A~1tVy?TK0fWsKzoaa-{x%bZ( zoc;0NJFY6fY$0OIN4I0k2bMY50Czm|VGGA1oS$(-)kq_w+enGpQM2h(UHzfZ+qodu zfqyYZt=GHsCg2-fu8C8UN&S-6NYag>>Trd#CUp zg!;C7FF2^U<$5;2^_7BO#?h_O1Moct-a*nHaIV1SiwVmBJHVWhfea$8sV7 zUw*~$tykVilJB*t9M0WWu|MC}X=23Pw~Z1b4D6`#v;M(6bEU^_VOLJXP?e-|Gecs5@cfy0vH5&b_VS)E5!u{?3h-MOi>3 zpcI_ZDJ{{hu?y7iO5b!#Vkt8&4mJh7@C*_*?8il`X)PnpjQEJ~-;qQXW8WC0a?~9E zY?AG$>S6n;&RMyz1kHt%+pG6O1tGn-)8R;^N2Lsep-i~iH^cO}K zRv`0RMoO!g4qrbE*tjcdnu}F`$+OVZ$Q-Dz-R9z|O>4nZ3Q5UvO@TQmYpQN^)$+*> zv`qNwq{YY&@0|1>U9!ezwXxnui-OZh*ArcLm{DHn7?)zXL5((;AZlMe0}f*H3GR2r zW07J>*upC((rGp6ANM9H?~OWKw8t+e^3-`TV_@fbo=3r0+8JgV${RNwjO)VeY&uxH zknzK{zNvZ8%SZiy|7c$NY5VEqVi9CL=tpsx-DsT*Ew+Au79DI-5nEH4DoA$ryA$5?Jc6fs87xd|Ba!Ne9>DIwctkV5G1LYU zSvpiL5jJplWZK+~?;wjD_9T4s#z&rY9#hft9RJ3}!yfwgCQr2{TqNIx|RqiiR%2d1?dvlB+rWe8`?N<=H2s92DLh57Y`ebt-((p4at z+WT%Q0e03lgRzH$dWx|ZS_N&^$7_e|4Jt!O(Ssa3Tx`JS>dAa>HgG?z7?y~Bz6W_9Uhi@#_ zE;(FHT@e08`0{ubt?FtmPkJv+}+v&FtbtKb3!pj>P8%cUICWh8map$ z6tXTz+M~yX16?)SP6t0O_IY?H^7<{zaY(EVeA?`D0Igu1m?R?uYInj5C%1FduMv3* za(ngiKVUry9nS`QPxvUjXZULDwXbu%&JxdD;ttAsk9imy4wH2mVm!3#pj*zujMA9n zrN*JEew7Y~D&3kpy;{-_(7Ur{hz>~|zh1kgj3FP#{Kl1SJnysGFv~nh;in~2%$Iiy z#ih2{-c5fJI@|32UAj5F*qero4;?6X@Knw}srQhUF}9kZ^MzPGs$gfz;28_Re_AB_ zw&No3d@NxnWcH2`1Aq61(X_(EWev4JHHo(^lH)GpfyMj*j{JR&9&UA&(eE8;#2~)? zeOfuk9;3Th@9=VBP=cX15R6qJj=b!1ko7b%s(K$+#HmoxZ%j3NB3Dg%x)^5m!TE9a*rlukY#{Js8vK5l(wuJx(mDc? z=LSwxPe!tQ8$peQJFwDN(KTZ+Y4quwJ113xC9uH;;=YkqmX+vdE$IWGJsXfSaD6?| zw^-~UY;4~L@>^Svz26(h7_ZAcQck$rE!l2a0(dhGY_a6VB6F^eOF``@+}LFRLwPW@L^% zd9p8Vy6{Qq@=M;GzVcqCGZUL-^~o}ppM#IuVf*VMT+`Y^YLE@2BQmldaUndHWG6*A zR?Qi^8!tz6vVn4;``Rj{Zk;U$lW1+XHlsWEO+3gl`MO6B>ZO$f@^fDkYYx$ z@}1ym&q|Kg#sa~2Fgu+!)kV4OD3# z5B{cksq(@+W*5Zq^W=o%t)jazLa2k}Z{=Vhq(80&`(IA!^hNn?KjTjDx*MY=miUpZ z-;aM{<4YoIKdDSg^Vs*lQPpK5s}@F`M;?m~wQ>~<|~ zfv;u2`y*{nZ^8n|rSn+I1>A&dnRgXldS)S8cmzhmGSvF|to$t-Yf{fq8fqpAn*)T?z^vL%G}JnG?;&n-Ii?wtvj$d1o;(cl2>5;F_E&-`_=WU!D) zbH-K5REr?KPG^_mdzReOCtB%sr|etWtl@5g@;nb;tX&hpVOq5yyS?9R?c!L|kvs(G zXggxGN2x95r@-zDP1RX_ZG$?X>QY9(yZ6lYuLp?JqFE?h4BaL{u$w?6lJQa4I)yTcSU-f}$>M<;Wm} z080Txb_{sWs#vL*R8tS6jFnrF=_uan#51AWTgxy9T*gFJS64iz+&4YjdNzX66V9!Q**q5K;sco6 zIW7F-_}P3!gepwd0Y(SqRG4z*&B@mrmR^9?nFKCVx$2Pd>+)kf2IqO2>{eF_(7nV;1Vhx9#Xm?t?}#2j^A4fHNGlJ}JQVB5Qnl*Pz`D4ZZ+3BE zPTAW+l1z6l*za(zOISmU2vqksf94Hz+utV|C*`!m)z$f-i4@na+d}zh$a-!SuB1xL ztt{8mEqmA4K$|JG{SsvaQf&tut@#M8Zk$Cwu+6{WPZ~>aZZKr5ACni@vZ5Lwhiy`UXR3{q7|`jlYz6~+)_11#R>a|54LSiHH^h`GYH6++*fH!ZTz z-Oak5G7yI{5w9=2W>R7;p6(3~^WF2vbZ-OUO!;rTt^F8RF~%S?u`$+OD)#_GWaAtt zK#J4|rG}CvqEP#!H59Y$KaaQoLGRNK8pFznl(X<1p4R|KIC!H6W_ZUQc8BJpj#HXT z+r;>6-PfPGKDq^bpO9@yOp4 zSlc_eqLVrEb`G5#xBF!CtdA--S!EJ&EV3)X6+J_T%7_DRCe)8(6Y^8=Fuw)Ul|0_p+skYaM`kJLRyrD(aE(XUk!mr z#xNK30KV2do~6&QK}6o|e(M{H74ng{SNG8t5}QxIL%4A#T$9q1F_uw#%TlZ4!cos8 zx5RiU;mf@67ut*u=nibvC~g@tsJRQN@COVS&dC9#3QAGttSH!s^nso(ZKm8dnZ@xZq0I{GiKtqQ)CrgoT`naE2IJbx>2b1O`jtUSWTX-_|c8yB10oz?0xEd8Q=HLI) zf2zcD>e~)!J;zu*H5>PKZmz6zN@>+oebiG}DZj16Fb1~`d`{no?n6jvC5yRZMOd)! zdL`G6y{Q>u7_YeSSr<*%9}Y!^7RQXeQ@bclM~|M3hMR5y0vRUBq30NiCdzQ zgyM~4n9*oe$mM(kyIXFE_Ce{9_B7mhRK(AamFwbxwlvs$($lb3;Mc=jE+&r{_f+Ow znyE@m{te1&s@NHSyhsVKjugoIk*w^u*uGCNNgpvD7fJe`xwu(1TOO zUyk$N%hmp62oXylGXpdG8e6T~N!%8^LBh4O0si3Pw``ztC7Gc%x6E^*X56T?IJm{p zM5_7z%<54$SDHO)xxnt%EatJr-W|kYQ&EmzbgBz&o+{LO0IVzy9-kdg)|TB(N(IAI zaR%^0^Nj@BM`1A{G*7AN4eAdhLjF3KA47OopZoD_?0#v?iw|cfxmDl6s5; zo!o7&DK)jcX|g>UJ7llR<&>bBLk8)OG7ApZ?XinPo&ID0F}w1>*dlvJq>w}ytVmTXQ(?9Q?`X0O6^leiOQgMYKu;@J2pM&U`uyC4!A9=8~dvP4nA)QqTV z_@2ehbCojFPrV(+Pt^?9lx+H>dKh@fR+lcQAK(e~QLM01N<{HOd$@1#3$?72lG{Ba zG^RMpu*#nTeY!jJF41TW@aQ>0Lt0+SmHMn73&v6}(%!vtiHLk5)a?uEnX~v*r~@=p zW`Y|iM%Q+iUdrAJCVCi1*T$Bp`egN;_}JYW(DidyyV&T*1Cm{o!OpLitGbW7=Y&9Q zezI;Wd=d|Fb~60aQQAw&*rT~jBf;P-{Y68SYn4%~X)kTFl+_P50`D3!;;6o6eyh2M z){nt+F_f#aZY;i&b8t{eqkAACn;$eYa8io@`BXz7_yU}#*YB05HHn@kGQFTn%hCC5 zVNk|j^dxYmbW~K3g11;{+$&w%lKHqrdCDpWd9pn#!LR1wfJe!jck{#dLo!!( ze0Ho+l+S_OL&K&R_?B!#Vmv}j+}VJ0a*`^?A-}>2Ig{2sSAX)9!dWmIx)mE3j7Qyu z`UPgN0fqBCD?i0RPBtL)idn!0zIV19$ILeLv4Iq2HV{369>%O+C+@*hoLt#JuP6td zX^MGjz1$1oaR}22Sx>GS;Gyl!WEfYl^;HVy!AeOLwu+$v#(I_Yv`vT=MECe>=U(;S zFR8fWON50?whH|jMALrg35*EFCwZdV8YEFq&ThoE2zW|_n$zrJxs0c_y=Mu;%Hz+_yoJ}I!e zt1zs{8u@ZwvmjZn*lXjWwdxTQ!=-^VMee@Ilh~QPuupbNCn=3rKzaIJls0Hc_IB_N zwWoAPdujFCov*J))|UmUxZCRgQg|{k@oZYPv7)2s9jy}xv-~H=8_!l~;lGt$A<m#+_X8$HP(PIrCW=4u-?V}4O`PX-q%ckG_g9cWSfkyuI!x>F7qhu5MI zWJHzySt0>#R85D){5ax&c>0y&Y{>1M-ZsfUorUhwuj3yHfd`@)VlWoJP#~QTr3WS# zqu*tXcR}pdQx8?qI%ny-XZ|+QZlU(5is6Uneq8>Q#VTe;?pI5c-A2#*g2(vVt^rQi zs_~^x>NgTDgH=PLx2}W~2(5TERb^Yz@21G_InT2$V2YM!K>m}61jqzRz>8>LD!f@b z^P6IuI=$XaC!LGj2X=4Rh0?EF=L*`_vw<7LMq+A+OGxTRb2h+tkvtxOx_Xl&VLtAq zaV0x*lIz3UZwW4Ysd2z2I?mWXTu<8JUyh}2#av&$ns>N{6EP`vG!1yvlalj3j&vj8 zhdIan_Jf~=dko?zFbP%?6ZH?Fp_ty2W5H$%a%1-P;ARSk;4;c^M zwQ}B;e3WHh5l3f1mafszI((vKfcD0B(wdB4DkbNGY8Pv;Iq0ncVtgkXi4W@YWF7g#HEMyJ#-ZaaLA|G|;YctcuBVs@76pCHP81o*$}Cz4Q6hvy7mdLAULD zuUo9CnbS@)Gk)q%^VrmZm=_8x$?+RhqsJdVnFvh;J~0vT6pl$Vu73#2zL@SyKG1Zu z9Z#{+n1H{nHIhgrr9UYGuL<#iUG(mUlO7GFtL;Ih3&!#FxKov9eB>WL`=yGih6fsx z?-_08;N{etlziz2&?E3lHt<%3NHFgl9+B=hn+)Ttb56e; zTB>qZ!usxsjRmee{BjQC{Qd7e#GG3J2bE5Y$8iJP#CZ46uT<08_N*eJkM7yJs*KF; zAlXZI$<42u>}aW}@0ia~VH!`g98t$#Kc~$F^u=3*Bn0`5nwKeau6|<)KzhgHgQ#t6 z;EfuQ_3XzYtqs2$I>b}NUner&YS6b$vw`^!Kk#14obOrkC~@#OHGF`sPbNO7@)ezo zoc!WR6W{2q9ro_kjb^{K z_#;ZHpv|UXW+zuZCASvBDs_`sYAEqbY~WH0FSRAtvs|#1d%kHlG!>#E!F-7AWiyU` zqxmsgP~P66h}*<2mh2G9_6BE;!G_$)gmv}pq!E9_M_Ex021{rMB(&aRcW!>KMcZ~&exE2B_X*I(%puiw4@n;^IsqX`7u~J%LXK# z)R_)e_wj#K8uo7b;lG?PKJ=>>*J~Yzr;M?( z#t@SyW%SdJqlt1yq9j|s)Fv`?^MVWCbLLq19gi}}jvVn>m&%ia45x@EM!PXRuuj-E zBQ<-|4Scm%bt(Ua$3nlp(KN^6x?7f#&j3)g1NUu>B_{=`kQJcgD$0i$g(2;)OlIE9 zpH1H55fljp#SPXMW5zyjCg5uwtic!!QulpK5Z#Ie5vy#AcnljDn}O0#(&wz?3iOMQ z7pwt4PF=qTe{n{IYDvN|_FRTohzp1fWIiuI1q=m*R(q$I;0T`5DyNvElQz}03BprR z@-uidmKbXSR-x2w17jStj?3Of4SD)QK*I42ULpIfR(M* zp?eq)SUi>z$s$1e-rcSNIu6X@z_V^tJxrTu0}m|)>|4_Fv?{N5N@S)opJ1z^rtqHA zU;Gp7h}4}p60XydzYlDPL8;PDJv8M7SC!D^Mpw-Y}NznxJW`za)8KT{aPu*vx}b=48{ zZKqLv@Y(hx+f~=B{XGiDcC{UNT;)|>4lw6HCF%f4X&FXYC6Wi;F5eyRXpw2GZ?256 zsR*N3s$&Dy(s~jpoQJHrVkBL!2)sM<&^npn!E9y&*Rd1b6w{#9>2M{51ss`_gXb6=~0HtSIvq7atY6BBIKLDg$f378cX%mqqM`+wEVA; zA$e93@lE@JUQe9;Exp_RfvL*d1n1q8?S7&cAEqd$E}J70K8Ff*BEUm6#V=WJVWNRV zf<6hNIhG>BfdVBG-Rhb961eYi+TLtJ ziv(yz-A$%d(|u8=KyPd0Pacaq| zOYAZ%UW+FeGIlw#cFa=~AYGmp1920Xix4+ato-h_Aeg53l4t5V{wk!hd|P4d>t-f3 zK}Y&PFI8iXr!~;}r^W1m3~{nsPEXmfHTXBVb1v%L-OX8!Q{n%R?EFC6z17lozxX)uIS$!TxP zhtT@&n^qsaQ%>S05#LK?AO?PhFwG&$yVJZGJu;qxvIIFO@^h!QkIzYj2f)NnwR>2( zSykgN81AS`GKmA`AU5*}R^irtL<&4eJ=u0mW3BuR6sAl3<+aHllBd0Hi(G|mEj66A zV~!frGo#MTW+=J4_PXSls7H?v(+^pmMN8tI!^wLFCgfW&x=Vdj%Q;vpPJ?*~Ektcz z7e1gTkP*J3vXHlWtRKJ_Kek)@1qsf2NUW5hjzFLrW^%G~`;K}?xD4ocnyQh-W18~g z;?BMw@9J~uGAuz?(5gSGngSzFKX5`%`<8y!dsfF&Yuzus_5==K#dzZf$I>bJe0-4k~z1t1)p>PVFxL@~*DA@G?SL zbHz5Hi*?C&nR1{#-I4VUyXS%1Y+=U$UvT>eI`&gme2w<&WXXinfYJQw_? zZ#05?46Yn}vR&FNW*0^X%7C!l%7C!@9Gw84je_q)SVz7~l72BbYt3my zyQ_K)Ub#2rr~0zm_2~DABi>U6B|-aA>;-SV&SZXu62A`Oy)e6okV>QppUuoZLRDHK zsZ4{FCu$P4;uFsuc?F%417oB+wm|z+r^8O)lezk;_p)9#eG2GQ&9{qau@Mpf|-<4p_t;CK0mssgP zv(~?V&)MB_fHeRI(AsTdL@5ISNM4C|^;MNs7dQ}$WDlEmT-a&%ji*xs+zV$2H_l09 z&Zt6%U&Y<^!?{>df}9a{;sU{&aRl)ON}kx#n5Ts%?6x>SFBLhb+uDp>$fYDFt~f^? z8HAEJ1MBt0lpb}tL%J;j+DLnrBnnbQ29_7e7HVXA`ZZlj!6UMUmSDW%T-8O5#zSB6 zFU~+|RE#aPD&k4YZcKMUK1Bv%0+`U{^NU%6Me6XzFFuu5HwG}CaMBzUhqcE<5|z4> zKb@i5Rwb`2810}Iq`v-@-Es}PU-2z%YU(elGKRXVyA}RB69BoXeI$*Hj#{IAl*{e* zLbjIi$K5pdvM46&I5*G*auMx>rYeP2JyS#A>2Bt+%6wib*C_TQ#->5czi4t&c`pU+ z6*|7O96ZpmGSN-D3r_4lNzHhRmZjc4M(8W`xRWuPd_sMHsupzS6W~7Bi4}6jay%U# ztTHRKeDp;#HcpAUzn=sXoFD|J!z98otn3FB$J88LAum|vn{nmN;pLDc0+Xk4V`o^G z;hxE#a%m@-k1(@!m^VQ&7>IL3qhU}Omt1O27V#`>-$dygapFe^6;6zj?q4`kHL&-B zs7r`p@n-Qq=!imF`8of8A=1Am*e#gz7nBPB|=C7RcCVjH3P-g>oavbAmkQnW0 z(PU?khd)10ocjS2h1>EwqwG#don8<`-uy4pV*bcYhGQ|{!GLT8L%fj1J2m5$21N!m zVqK0+KLhVhd3V#Dj!quOeczA&*Sh_~Gh5z*BnOvwP$SllWP8auu`7;H$g!a24plPgE~Z7$d-ch5t6#R%@lbuJkGm> z;XE6tlUrH zCvz6>d{H}zj^~4ag0juGB|8w`d*FK4U<6-sX|5Iyig#h#E%L)&5u z8KP?Y&O>J7yt!7!wJTHK%Vy34Oy8V3A}|eB`0~u#5`}NP@f9_7_6&S5929@K+5Pdr zXVsFSk^@$(^AFP}5>jp>EB=8E{?#=8>#NW=B8$&S35qFj7eS~5=|1^_>F6V0`Jn4& zBv&ir#~MFN`+(fsf%_Nx{lmll2o?V?d&T~lcmDHxPR23JY`zgUwBAru0s%SRxf$n@ zE{%H|_~W#P&kD{vAb;iCw;EJ@NUF%ih`e!b#l<3-&Y0OIIK|g@i3;_XuN=W3H3Wn2 zqh(N5AGK;jnT|_Dk2j-UOV?H7U!5pPQjF7@kbS4~C4np8k?mn@4~!v#WC;W_bKtZ2 zY+xJXAl(s(-BqQ*#ei~#H)6$m%5c>MNo}i+$KMe$Nj2w(TKDJ56m)4`tOmj$iM%}@ z-Rnks0`k*;1AWPIv4W+um|dW4_leb&efG|&wnvD4zN-4IHhwotzpBQsbqwVmJBHtg2Xz_@f)pRofy3^04kK#S@-ipC8WGoJ54_XA zKJfnb)YZAD%5QXYW+cX0W8xc&cbcv}533+9kqWdkqSvR_u3Fzdm64VB`7Q5?h9X~% z#TNp{zRQ=zT%fR-Xh{D!Lu7!ah-bz(sX-@%F@oBg0pn{@^ec37_&#)|(=Fp%qr}TH z?20ulw%xGD=fDi9&c#?RlrF$fqaZrq1SFXaFhp^!gwXkhpe{)*E13Chr*pV`@b*Dc zv{T9fxHA5zSM}W2^4gkA@1qULBb!kK!pw&meaq8h$~os_Vz#}0od5u{z%d}8=+!^( z|KGp=AC{|Ip{Dm}9ZatjHHdlNmkq3EpIKj6gC$~D%}`Ek;5SD$z*I`P2Uo)U#k~vr z)4i)gh5ywT%<*@=;D3-Ff97xgSwsVm!-0CmG>ERlpR!tOH+5ss065tPxsxy_@RR~v z-jv5334WK?k~b_8>=J!xuM)pJYb43}O)7}I0e%wKp_%-qLvmmnESEmAPIT7y0Ye+Q<9~H*1$d2Y!7}5)xww!1G0p{2QouIqPZPucnJg5e119=GZJ$^-QLC7G! z*SQKQ=YTz_#;_DT#mATN(sEXadEW;*6W@XmHDZiFNC}XG&(^>x*2GWNEZ%RFLYe`y zx_UW?gh*d$H@?n6X=L%uL(HZLeD54h zA}({xs`SMt>?plC?p3P(EW3^H^)wVF?^fnqzYy0>*@$h@B~KsG#_=tP6P`b7%A=*^ z4eAbVPYzPbF$JWOqJ1rXLANZf|Dt5;YZmM{TSnbzono-wG@A=k$Cyq!{J(e zVPD>&?cgdLh?3(OGund`3B*$}Vzm?Xoad{J#ufOJKE>F= z7{@v1g4!`N==X>kd^c>T_g8(4uqSQiU`70(OKnrQ>R#5oKlU1OlM8ZPVDX?U6snFU zX)scg30O$fbe>9PUPT|HTp6srtJ3?jXUT8)*5{v#XE2a$3?3trbbG0sG#?N_MZP0F zZIwIx)I?;iLEx^g3fAmzzQ>=Ks&DO>4B8WB6ieG(A3knLvebu5ICdwMxK?HfzX??3 zIX9Z0hiUDDQ_ko+nW^#5X~Y^>P#Q00E<3^{K!p99hq|{0WJ{>(`ad2D-DOfsmJ#Md z+Dttsd8g_q+K^w(X?5WniQT#K+w#Jo2s1yWlEpU+tz!o`bUm7c?_S|ROj&KHA+A-_ zH2CIMca%eRdXn9YgHTMBkm!8*;x);Z+L4kkUzDoT4#Y;&)gKfw1W@p;-GDef*9bVK z=o?GqKykmmYSlNbbKhBPaDZvh$#?GP(oc#HVmI`9j<5B(m>b7rajx~dPtx-{KSoDDJ^&%Mp_!p9v>afA`zBz!OZEUTR;V*syY zdd-LrFB{lAcr@II(&P_&*!Ui)vw|S-7__@F0v)(8%J2s2FnM?8g6;3CCmpL9O_gYJd910t_WO?s_%o z#(2%*D>JX3R+qPT@%!F0Tf{I$DQyvn1wE$jtc@huXbOhgBVgBXZ4uChU!DF>homeWK z;7h9Q3{3u^lw=@HkYfZ05=4{2Dvld&(bIE?p5j=${iwU4>Kb3_RnrZqBI&62E+f5) z1C26oegbQgrO>|r;UcRcR>9gasnEHNY0(9P+(ZUQ&vnK-?>urTHlX=K&tDQ{svu56 zL#D%LQ`#>iw-dz;oN*|v(fniLM(UIgm4)wwZhfdpX{%dlFg9G=sHq6-=R83*dU7D1 z?5M2Ge>_Sd{Hu1l5^PyMypSr&LFsNIf`_^pyHC#9#KEEva*VALx1nZ+cM*V2oW7Oj zS-2>!At21xj4JqC4)?;TJM-&NT4i|oLpD}g^;dw-lWI^huTBI$FxW+q&%x$iC|clT(N8{ zznrq*o*^6F#ZwKSLC9@C0d+oz9>NQ-FcYaXGB{3RVi#UgFaN~Gd*`lSj#`yOn@m^+ ztek=0#Dm8MNJpTe0ESFji2^F zv{tdN=tSqjfS;QI0&)XhTz?@1MSB=xAK|lKARc!rh*bLX6pq!yeKqYkWXzYFmr z!}eoUDPrBI9+ee%B$fiD3V;XjT?6VGkx#639W0{oX%5My^c3(r!*Ea-AW-0&Z2EVt^~{>y*(pz`fB2FV5{^cFkxx+9j2 zl)!V|F74xQ<{R=89Qxy@ugpxHP5(G~^=+lpzATH+r&Dy#_sbu;Uw03s!s3gi8>2tM zD=iyC=meqIGrj4H7@B-egrA zd}4;SN-%`k*H@Z{hBz+!5vH1c%bdt{@95k8Or+%L+u5?)@JARzDvOVo65+s%gS+Ds zu(ft?R{+L2u%0sBO&Dm`H`ETelRbXEoHCvk;$3vMw({!KnNSG|7ns^7U%RF(Tw zzn|v$**i;=3DzeoMU$y+_W~WQke1mNIZ3NsH|p-s%-C(kGgM1l(sj*RNsl9X%5qw` zLF+jvE&w8FU09kWXaTW)fh!DgN^*O%hE0v0frht#zGsGRrHMyjX72t$?*nh{=Z7E5 zwco$mi%GcxiDO7ma9c1V;Lb$3PmIINBG%qkl3LKk;o(a))#=^m>opw=D&AH^SJgZL zG*9lIedC*Ptd;9t7#pzYM_ZsEejmOFQHU~2jd9{5T9ly=HX@6_h>p#~veW_x^^9UO z9}NxHD|=%M($BOY}{+niclgI5lnDE z(#CalGHeO1RT;Xw$YWo}PCe{;kjvxzs0!C#Z)|u50cA`NvE zbtiKyN{BEguT;~y8om{H=RLUzi{qomTa5yML4Z`4mw_p|afAV{)c_8i9&!*X_mZoG+NybI+A)fc^Xu)6=0_Itc9BgNn7xp^edNWmZzK<_0 zzzdjIeGJt=e*Y(bCgiOD&rH6p`@d>w??Cw?^f0Uf)@eP_ZCV%pVWWFy*BC?J+b^)O zC(8Rm8}jt$)ZcD?N>;u};Q#FwFRs_{B5Q{;DKj8>0!bQ=XmSZG2u99cPL3&Qvi6hF zTWC>A?nt+#5fZHY*0fYG3f8n}L4_o7;kWNj7+~-t=Xt(hm-kVH=4zhP16c#u3XP>N zWC4wKIqCZHv8IdUV&VKJpY;yhQ&U|ob$O)z!ZFxK9Y;TsjL%||;IlF5M#>c2^7CTTG6yKpgWyXylNAX~J~rW=KCW}8 z)#jm!X0KnUPwF*;GpLTJiCbO5h>wb*9BUfTY_%ZIDZaH&BihEZ)<|(&NhJgaMlqC| z#a5A$)Wkeudba{%G&j%>fVG~c}qov|D4a$yYiFqaHnoA)6(7AM}^gI&fgaQR{Y~) z;L#^5f7|^#6~FOW>%*5@`8%cBmM>A8z2fGb+R45bxA!1osZ#CvM_pcbXVCe|Tu8q<;7yYZOMiQA@ouY} bcIWi&Q$ofTK6xt7c6;I9n+BiN_ Date: Mon, 28 Jul 2025 08:53:25 -0600 Subject: [PATCH 62/65] updates conf.py for figure numbering enables numfigs package to allow for figure numbering in design docs --- components/omega/doc/conf.py | 2 ++ components/omega/doc/design/OmegaV1GoverningEqns.md | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/components/omega/doc/conf.py b/components/omega/doc/conf.py index b67888d73ca1..9719555b4303 100644 --- a/components/omega/doc/conf.py +++ b/components/omega/doc/conf.py @@ -41,6 +41,7 @@ "sphinx.ext.mathjax", ] +numfig = True # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] @@ -73,6 +74,7 @@ myst_dmath_double_inline = True myst_enable_checkboxes = True suppress_warnings = ['myst.header'] +myst_heading_start_level = 1 # -- HTML output ------------------------------------------------- diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index e0cc00c8b531..d004a54626f8 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -234,9 +234,10 @@ $$ (vertical-flux) so that the vertical flux terms correctly account for both the local motion of the fluid and the motion of the interface itself. Because both terms are scaled by $1/\rho_0$, the full flux is multiplied by $\rho_0$ to recover a physical mass flux. This ensures dimensional consistency and physical equivalence to the traditional form $\rho w - \rho {\bf u} \cdot \nabla z$ expressed in geometric-height coordinates. -The quantity $\tilde{w}$ from equation [](#w-tilde) is the pseudo-velocity. The second term, $\tilde{ u} = {\bf u} \cdot \nabla \tilde{z}^{\text{top}}$, captures the component of horizontal velocity advecting material across a sloping pseudo-height interface. Together, the expression in brackets represents the **net vertical transport** through a surface of constant $\tilde{z}$. A schematic of how $\tilde{w}$, $\tilde{w}_{tr}$, and $\tilde{u}$ relate to each other: +The quantity $\tilde{w}$ from equation [](#w-tilde) is the pseudo-velocity. The second term, $\tilde{ u} = {\bf u} \cdot \nabla \tilde{z}^{\text{top}}$, captures the component of horizontal velocity advecting material across a sloping pseudo-height interface. Together, the expression in brackets represents the **net vertical transport** through a surface of constant $\tilde{z}$. A schematic of how $\tilde{w}$, $\tilde{w}_{tr}$, and $\tilde{u}$ relate to each other {numref}`pseudo-vel-schematic`: ```{figure} images/tilde_w.jpeg +:name: pseudo-vel-schematic :align: center :width: 300 px From 21437c978929e6ecc3c881ec68fba64b04d29971 Mon Sep 17 00:00:00 2001 From: Luke Van Roekel Date: Thu, 31 Jul 2025 14:23:45 -0600 Subject: [PATCH 63/65] addresses many review comments --- .../omega/doc/design/OmegaV1GoverningEqns.md | 305 +++++++++--------- 1 file changed, 154 insertions(+), 151 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index d004a54626f8..d32c1d2443d8 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -47,13 +47,13 @@ See forthcoming design documents on the pressure gradient, [vertical mixing](Ver ### Control Volume Formulation -We begin with the continuous, control-volume form of the conservation equations. Consider an arbitrary control volume $V(t)$ with a bounding control surface $\partial V(t)$. The fluid has density $\rho({\bf x},t)$ and velocity ${\bf v}({\bf x},t)$. The control surface is moving at a velocity ${\bf v}_r({\bf x},t)$. The vector ${\bf n}$ denotes the outward-facing unit normal vector on the control surface $\partial V(t)$, and is used in all surface integrals to represent the direction of fluxes across the boundary. The conservation equations are +We begin with the continuous, control-volume form of the conservation equations. Consider an arbitrary control volume $V(t)$ with a bounding control surface $\partial V(t)$. The fluid has density $\rho({\bf x},t)$ and velocity ${\bf v}({\bf x},t)$, where $\mathbf{x}$ is the three-dimensional position vector. The control surface is moving at a velocity ${\bf v}_r({\bf x},t)$. The vector ${\bf n}$ denotes the outward-facing unit normal vector on the control surface $\partial V(t)$, and is used in all surface integrals to represent the direction of fluxes across the boundary. The conservation equations are **Mass:** $$ \frac{d}{dt} \int_{V(t)} \rho({\bf x},t) \, dV -+ \int_{\partial V(t)}\rho({\bf x},t)\left({\bf v}({\bf x},t) - {\bf v}_r \right) \cdot {\bf n} \, dA ++ \int_{\partial V(t)}\rho({\bf x},t)\left({\bf v}({\bf x},t) - {\bf v}_r({\bf x},t) \right) \cdot {\bf n} \, dA = 0 $$ (continuous-mass) @@ -81,14 +81,14 @@ These equations are taken from [Kundu et al. 2016](https://doi.org/10.1016/C2012 All notation is identical to Kundu, except that we use ${\bf v}$ for the three-dimensional velocity (${\bf u}$ will be used below for horizontal velocities) and ${\bf v}_r$ and $\partial V$ match the notation in [Ringler et al. 2013](https://www.sciencedirect.com/science/article/pii/S1463500313000760) Appendix A.2. -The tracer equation is simply mass conservation, where the conserved quantity is the tracer mass $\rho \varphi$, as $\varphi$ is the tracer concentration per unit mass. +The tracer equation is simply mass conservation, where the conserved quantity is the tracer mass in the control volume $\rho \varphi$, as $\varphi$ is the tracer concentration per unit mass. In all three equations, the first term is the change of the quantity within the control volume; the second term is the flux through the moving boundary. If the control surface moves with the fluid in a Lagrangian fashion, then ${\bf v}_r={\bf v}$ and the second term (flux through the boundary) vanishes---there is no net mass, momentum, or tracer transport across the moving surface. The momentum equation is an expression of Newton's second law and includes two types of external forces. The first is the body force, represented here as ${\bf b}({\bf x}, t)$, which encompasses any volumetric force acting throughout the fluid, such as gravitational acceleration or the Coriolis force. In some contexts, body forces may be expressible as the gradient of a potential, ${\bf b} = -\nabla_{3D} \Phi$, but this is not assumed in general. -The second is the surface force ${\bf f}$, which acts on the boundary of the control volume and includes pressure and viscous stresses. These forces appear as surface integrals over the boundary and drive momentum exchange between adjacent fluid parcels or between the fluid and its environment. +The second is the surface force ${\bf \tau}$, which acts on the boundary of the control volume and includes pressure and viscous stresses. These forces appear as surface integrals over the boundary and drive momentum exchange between adjacent fluid parcels or between the fluid and its environment. The derivation of the momentum equation may also be found in [Leishman 2025](https://eaglepubs.erau.edu/introductiontoaerospaceflightvehicles/chapter/conservation-of-momentum-momentum-equation/#chapter-260-section-2), Chapter 21, equation 10. ## 4. Hydrostatic Approximation @@ -105,7 +105,7 @@ $$ p(x,y,z,t) = p^{\text{surf}}(x,y,t) + \int_{z}^{z^{\text{surf}}} \rho(x,y,z',t) g \, dz' $$ (pressure) -Here, $p^{\text{surf}}$ is the pressure at the free surface $z^{\text{surf}}(x, y, t)$, and $\rho(z')$ is the local fluid density. This relation holds pointwise in space and time and provides a foundation for defining vertical coordinates based on pressure. +Here, $p^{\text{surf}}$ is the pressure at the free surface $z^{\text{surf}}(x, y, t)$, $\rho(z')$ is the local fluid density and $z'$ is a dummy variable of integration. This relation holds pointwise in space and time and provides a foundation for defining vertical coordinates based on pressure. The hydrostatic approximation also simplifies vertical pressure forces in control-volume integrations. For example, in a finite-volume cell bounded above and below by sloping surfaces, the vertical pressure force reduces to: @@ -113,7 +113,7 @@ $$ - p|_{z = z^{\text{top}}} + p|_{z = z^{\text{bot}}} $$ (vert-pressure-balance) -because the area correction from the slope and the projection of the pressure gradient into the vertical direction cancel to leading order. +because the area correction from the slope and the projection of the pressure gradient into the vertical direction cancel to leading order. [](#vert-pressure-balance) allows us to create simpler relations between pressure and pseudo-height in the following section. This hydrostatic balance underlies the definition of **pseudo-height**, introduced next, and ensures consistency between the prognostic vertical coordinate and the model’s vertical force balance. @@ -131,7 +131,7 @@ Here, $\rho_0$ is a constant reference density and $g$ is gravitational accelera The inverse relation, giving $\tilde{z}$ in terms of geometric height, follows from the hydrostatic pressure integral: $$ -\tilde{z}(z) = -\frac{1}{\rho_0 g} \left( p^{\text{surf}} + \int_{z}^{z^{\text{surf}}} \rho(z') g \, dz' \right) +\tilde{z}(x, y, z, t) = -\frac{1}{\rho_0 g} \left( p(x, y, z, t)^{\text{surf}} + \int_{z}^{z^{\text{surf}}} \rho(z') g \, dz' \right) $$ (pseudo-heigh-from-z) This expression shows that pseudo-height varies in space and time like pressure. It also makes clear that $z$ is no longer a prognostic variable but a derived quantity, recoverable via hydrostatic inversion. @@ -150,20 +150,20 @@ $$ (w-tilde) In this formulation: - $\tilde{w}$ is the vertical **mass flux per unit reference density**, a key variable in a non-Boussinesq framework. -- Vertical transport of mass, tracers, and momentum will use $\tilde{w}$ rather than volume flux $w$. +- Vertical transport of mass, tracers, and momentum will use $\tilde{w}$ rather than the vertical velocity in height coordinates, $w$. [Griffies 2018](https://doi.org/10.2307/j.ctv301gzg) p. 37 argues for the use of pseudo-velocities, which he calls the density-weighted velocity, for non-Boussinesq models. Griffies recommends a value of $\rho_0=1035$ kg/m$^3$, following p. 47 of [Gill (1982)](https://doi.org/10.1016/S0074-6142(08)60028-5), because ocean density varies less than 2% from that value. The use of a constant $\rho_0$ in defining pseudo-height does not imply the Boussinesq approximation. In Boussinesq models, $\rho$ is set to $\rho_0$ everywhere except in the buoyancy term (i.e., the vertical pressure gradient or gravitational forcing). Here, by contrast, we retain the full $\rho$ in all terms, and use $\rho_0$ only as a normalization constant—for example, so that $d\tilde{z} \approx dz$ when $\rho \approx \rho_0$. This preserves full mass conservation while making vertical units more intuitive. -This approach ensures consistency with mass conservation and simplifies vertical discretization. +This approach ensures consistency with mass conservation and simplifies the derivation of the discrete equations. > **Note:** This definition does not invoke the Boussinesq approximation. The full, time- and space-dependent density $\rho(x, y, z, t)$ is retained in all conservation laws. The use of $\rho_0$ is solely for normalization. ### 5.1. Justification for Pseudo-Height Definition -Alternative definitions could add an arbitrary offset, e.g., setting $\tilde{z} = 0$ at mean sea level. However, the adopted form: +Alternative definitions of pseudo-height could add an arbitrary offset, e.g., setting $\tilde{z} = 0$ at mean sea level. However, the adopted form: $$ \tilde{z} = -\frac{1}{\rho_0 g} \, p @@ -181,15 +181,15 @@ This makes $\tilde{z}$ a natural coordinate for a mass-conserving hydrostatic mo In geophysical flows, the vertical and horizontal directions are treated differently due to rotation and stratification, which lead to distinct characteristic scales of motion. To reflect this, we separate horizontal and vertical fluxes explicitly in the governing equations. -We partition the control surface of a finite-volume cell into the side walls $\partial V^{\text{side}}$ (which are fixed in space) and the upper and lower pseudo-height surfaces $\partial V^{\text{top}}(t)$ and $\partial V^{\text{bot}}(t)$, which evolve in time. +We partition the control surface of a finite-volume cell into the side walls $\partial V^{\text{side}}$ (which are fixed in space and time) and the upper and lower pseudo-height surfaces $\partial V^{\text{top}}(t)$ and $\partial V^{\text{bot}}(t)$, which evolve in time. As an example, we consider the tracer equation and drop explicit notation for spatial and temporal dependence for clarity. We write the control-volume form as: $$ \frac{d}{dt} \int_{V(t)} \rho \, \varphi \, dV & + \int_{\partial V^{\text{side}}} \rho \varphi ({\bf v} - {\bf v}_r) \cdot {\bf n} \, dA \\ -& + \int_{\partial V^{\text{top}}(t)} \rho \varphi ({\bf v} - {\bf v}_r) \cdot {\bf n} \, dA -+ \int_{\partial V^{\text{bot}}(t)} \rho \varphi ({\bf v} - {\bf v}_r) \cdot {\bf n} \, dA +& + \int_{\partial V^{\text{top}}(t)} \rho \varphi ({\bf v} - {\bf v}_r) \cdot {\bf n}^{\text{top}} \, dA ++ \int_{\partial V^{\text{bot}}(t)} \rho \varphi ({\bf v} - {\bf v}_r) \cdot {\bf n}^{\text{bot}} \, dA = 0 $$ (tr-vh-split-pseudo) @@ -232,9 +232,9 @@ $$ = \rho_0 \varphi \left[ \tilde{w} - \tilde{w}_r - \tilde{ u} \right] $$ (vertical-flux) -so that the vertical flux terms correctly account for both the local motion of the fluid and the motion of the interface itself. Because both terms are scaled by $1/\rho_0$, the full flux is multiplied by $\rho_0$ to recover a physical mass flux. This ensures dimensional consistency and physical equivalence to the traditional form $\rho w - \rho {\bf u} \cdot \nabla z$ expressed in geometric-height coordinates. +so that the vertical flux terms correctly account for both the local motion of the fluid and the motion of the interface itself. -The quantity $\tilde{w}$ from equation [](#w-tilde) is the pseudo-velocity. The second term, $\tilde{ u} = {\bf u} \cdot \nabla \tilde{z}^{\text{top}}$, captures the component of horizontal velocity advecting material across a sloping pseudo-height interface. Together, the expression in brackets represents the **net vertical transport** through a surface of constant $\tilde{z}$. A schematic of how $\tilde{w}$, $\tilde{w}_{tr}$, and $\tilde{u}$ relate to each other {numref}`pseudo-vel-schematic`: +The quantity $\tilde{w}$ in equation [](#w-tilde) is the pseudo-velocity. The second term, $\tilde{ u} = {\bf u} \cdot \nabla \tilde{z}^{\text{top}}$, captures the component of horizontal velocity advecting material across a sloping pseudo-height interface. Together, the expression in brackets represents the **net vertical transport** through a surface of constant $\tilde{z}$. A schematic of how $\tilde{w}$, $\tilde{w}_{tr}$, and $\tilde{u}$ relate to each other is shown in {numref}`pseudo-vel-schematic`: ```{figure} images/tilde_w.jpeg :name: pseudo-vel-schematic @@ -243,14 +243,15 @@ The quantity $\tilde{w}$ from equation [](#w-tilde) is the pseudo-velocity. The Schematic of pseudo-velocities. ``` +Because both terms are scaled by $1/\rho_0$ in [](#vertical-flux), the full flux is multiplied by $\rho_0$ to recover a physical mass flux. This ensures dimensional consistency and physical equivalence to the traditional form $\rho w - \rho {\bf u} \cdot \nabla z$ expressed in geometric-height coordinates. $\tilde{W}_{tr}$ will be introduced and defined in [](#notational-simplifications). Using this projection, we obtain: $$ \frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \, \varphi \, d\tilde{z} \, dA & + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \varphi \, {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ -& + \int_A \rho_0 \varphi \left[ \tilde{w}_{tr} - \tilde{ u} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} dA \\ -& - \int_A \rho_0 \varphi \left[ \tilde{w}_{tr} - \tilde{ u} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} dA +& + \int_A \rho_0 \left\{\varphi \left[ \tilde{w}_{tr} - \tilde{ u} \right]\right\}_{\tilde{z} = \tilde{z}^{\text{top}}} dA \\ +& - \int_A \rho_0 \left\{\varphi \left[ \tilde{w}_{tr} - \tilde{ u} \right]\right\}_{\tilde{z} = \tilde{z}^{\text{bot}}} dA = 0 $$ (tr-vh-separation-pseudo) @@ -265,18 +266,18 @@ Similar expressions to [](#tr-vh-separation-pseudo) hold for mass and momentum: $$ \frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \, d\tilde{z} \, dA & + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \, {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ -& + \int_A \rho_0 \left[ \tilde{w}_{tr} - \tilde{ u} \right] dA \\ -& - \int_A \rho_0 \left[ \tilde{w}_{tr} - \tilde{ u} \right] dA +& + \int_A \rho_0 \left\{\left[ \tilde{w}_{tr} - \tilde{ u} \right]\right\}_{\tilde{z} = \tilde{z}^{\text{top}}} dA \\ +& - \int_A \rho_0 \left\{\left[ \tilde{w}_{tr} - \tilde{ u} \right]\right\}_{\tilde{z} = \tilde{z}^{\text{bot}}} dA = 0 $$ (vh-mass-pseudo) **Tracer:** $$ -\frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \varphi \, d\tilde{z} \, dA -& + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \varphi \, {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl & \\ -& + \int_A \left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - \tilde{ u} \right] \right\}_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA & \\ -& - \int_A \left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - \tilde{ u} \right] \right\}_{\tilde{z} = \tilde{z}^{\text{bot}}}\, dA +\frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \varphi \, d\tilde{z} \, dA +& + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \varphi \, {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl & \\ +& + \int_A \rho_0 \left\{\varphi \left[\tilde{w}_{tr} - \tilde{ u} \right] \right\}_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA & \\ +& - \int_A \rho_0 \left\{\varphi \left[\tilde{w}_{tr} - \tilde{ u} \right] \right\}_{\tilde{z} = \tilde{z}^{\text{bot}}}\, dA & = 0 $$ (vh-tracer-pseudo) @@ -287,9 +288,9 @@ $$ &+ \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \, {\bf u} \otimes {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ &+ -\int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - \tilde{ u} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA +\int_A \rho_0 \, \left\{{\bf u} \left[ \tilde{w}_{tr} - \tilde{ u} \right]\right\}_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA - -\int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - \tilde{ u} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ +\int_A \rho_0 \, \left\{{\bf u} \left[ \tilde{w}_{tr} - \tilde{ u} \right]\right\}_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ &= \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} {\bf b}_{\perp} \, d\tilde{z} \, dA + @@ -299,7 +300,7 @@ $$ - \int_A \left[ \frac{{\bf \tau}}{\rho} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA $$ (vh-momentum-pseudo) -These equations express horizontal and vertical fluxes naturally in terms of pseudo-height, enabling fully consistent discretization in the vertical coordinate used for prognostic evolution. +In [](#vh-momentum-pseudo), $\mathbf{b}_\perp$ is defined similarly to $\mathbf{n}_\perp$, it is the body force normal to $dl$. These equations express horizontal and vertical fluxes naturally in terms of pseudo-height, enabling fully consistent discretization in the vertical coordinate used for prognostic evolution. ## 7. Vertical Discretization for the Layered Equations @@ -308,16 +309,16 @@ The previous equation set [](#vh-mass-pseudo) to [](#vh-momentum-pseudo) is for The layer thickness of layer $k$, used in MPAS-Ocean, is $$ -h_k = \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} dz. +h_k = \int_{z_{k}^{\text{bot}}}^{z_k^{\text{top}}} dz. $$ (def-thickness) In Omega we will use the pseudo-thickness, $$ {\tilde h}_k(x,y,t) -&= \int_{{\tilde z}_{k+1}^{\text{top}}}^{{\tilde z}_k^{\text{top}}} d\tilde{z} \\ -&= \frac{1}{\rho_0} \int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho \, dz \\ -&= \frac{1}{\rho_0 g} \left( \hat{p}_{k+1}^{\text{top}} - \hat{p}_k^{\text{top}} \right) +&= \int_{{\tilde z}_{k}^{\text{bot}}}^{{\tilde z}_k^{\text{top}}} d\tilde{z} \\ +&= \frac{1}{\rho_0} \int_{z_{k}^{\text{bot}}}^{z_k^{\text{top}}} \rho \, dz \\ +&= \frac{1}{\rho_0 g} \left( p_{k}^{\text{bot}} - p_k^{\text{top}} \right) $$ (def-pseudo-thickness) which is the mass per unit area in the layer, normalized by $\rho_0$. This pseudo-thickness and layer-averaging will be used to express conservation laws in a mass-weighted coordinate system. Pseudo-thickness, rather than geometric @@ -327,23 +328,23 @@ The density-weighted average of any variable $\varphi({\bf x},t)$ in layer $k$ i $$ {\overline \varphi}^{\tilde{z}}_k(x,y,t) = -\frac{\int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho \varphi dz} - {\int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho dz} +\frac{\int_{z_{k}^{\text{bot}}}^{z_k^{\text{top}}} \rho \varphi dz} + {\int_{z_{k}^{\text{bot}}}^{z_k^{\text{top}}} \rho dz} = -\frac{\frac{1}{\rho_0}\int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho \varphi dz} - {\frac{1}{\rho_0}\int_{z_{k+1}^{\text{top}}}^{z_k^{\text{top}}} \rho dz} +\frac{\frac{1}{\rho_0}\int_{z_{k}^{\text{bot}}}^{z_k^{\text{top}}} \rho \varphi dz} + {\frac{1}{\rho_0}\int_{z_{k}^{\text{bot}}}^{z_k^{\text{top}}} \rho dz} = -\frac{\int_{{\tilde z}_{k+1}^{\text{top}}}^{{\tilde z}_k^{\text{top}}} \varphi d{\tilde z}} - {\int_{{\tilde z}_{k+1}^{\text{top}}}^{{\tilde z}_k^{\text{top}}} d{\tilde z}} +\frac{\int_{{\tilde z}_{k}^{\text{bot}}}^{{\tilde z}_k^{\text{top}}} \varphi d{\tilde z}} + {\int_{{\tilde z}_{k}^{\text{bot}}}^{{\tilde z}_k^{\text{top}}} d{\tilde z}} = -\frac{1}{{\tilde h}_k}\int_{{\tilde z}_{k+1}^{\text{top}}}^{{\tilde z}_k^{\text{top}}} \varphi d{\tilde z}. +\frac{1}{{\tilde h}_k}\int_{{\tilde z}_{k}^{\text{bot}}}^{{\tilde z}_k^{\text{top}}} \varphi d{\tilde z}. $$ (def-layer-average) Rearranging, it is useful to note that $$ -\int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \varphi d\tilde{z} - = {\tilde h}_k {\overline \varphi}^{\tilde{z}}_k(x,y,t). +\int_{\tilde{z}_{k}^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \varphi d\tilde{z} + = {\tilde h}_k {\overline \varphi}^{\tilde{z}}_k. $$ (h-phi) This relation is frequently used in discretized fluxes and conservation equations to replace integrals with layer-mean quantities. @@ -355,10 +356,10 @@ This relation is frequently used in discretized fluxes and conservation equation In this document, two decompositions will be critical. The first decomposition is $$ -\varphi = \overline{\varphi}^{\tilde{z}}_k + \delta \varphi +\varphi(x,y,z,t) = \overline{\varphi}^{\tilde{z}}_k(x,y,t) + \delta \varphi(x,y,z,t) $$ (vertical-decomposition) -which is a density weighted vertical integral based upon [](#def-layer-average) and the deviation from this value. +which is a density weighted vertical integral based upon [](#def-layer-average) and the deviation from this value within the layer. The second decomposition is @@ -368,7 +369,7 @@ $$ (reynolds-definition) which is the traditional Reynolds' average and deviation from this value. -The fundamental ocean model equations are most often Reynolds' averaged to derive the sub gridscale stresses. Each variable is decomposed into an average and a fluctuating component [[](#reynolds-definition)]. The averaging operator is defined such that it can be passed through derivatives and integrals without corrections and an average of products with a single perturbation quantity is zero. +The fundamental ocean model equations are most often Reynolds' averaged to derive the sub gridscale stresses. Each variable is decomposed into an average over a sufficiently large sample of turbulent processes, which allows for a meaningful fluctuating component [[](#reynolds-definition)]. Commonly, the Reynolds' average is thought of as a time average, but an ensemble average is equally valid. In fact, the ensemble and time averaging can be thought of as equivalent, given that a sufficiently long time average will effectively average over variations in the flow that could be thought of as an ensemble. Given the functions are continuous, the averaging operator can be passed through derivatives and integrals without corrections and an average of products with a single perturbation quantity is zero. The Reynolds' average is most commonly denoted by an overbar. However, to disambiguate from the definition of the bar as the vertical density weighted average, the Reynolds' average herein is denoted by $< . >$. @@ -380,16 +381,16 @@ The quantity being averaged in [](#def-layer-average) is arbitrary. For example, $$ \overline{\left<\varphi\right>}^{\tilde{z}}_k(x,y,t) = -\frac{1}{\tilde{h}_k} \int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \left<\varphi\right> d\tilde{z}. +\frac{1}{\tilde{h}_k} \int_{\tilde{z}_{k}^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \left<\varphi\right> d\tilde{z}. $$ (def-layer-average-reynolds) Additionally, for the decomposition related to vertical averaging, we will encounter terms such as ${\overline \varphi}^{\tilde{z}}_k \delta\varphi$ that need to be vertical averaged. Using [](#def-layer-average) we have $$ -\overline{{\overline \varphi}^{\tilde{z}}_k \delta\varphi}^{\tilde{z}}_k &= \frac{\int_{{\tilde z}_{k+1}^{\text{top}}}^{{\tilde z}_k^{\text{top}}} {\overline \varphi}^{\tilde{z}}_k \delta \varphi d{\tilde z}} - {\int_{{\tilde z}_{k+1}^{\text{top}}}^{{\tilde z}_k^{\text{top}}} d{\tilde z}} \\ - &= {\overline \varphi}^{\tilde{z}}_k \frac{\int_{{\tilde z}_{k+1}^{\text{top}}}^{{\tilde z}_k^{\text{top}}} \delta \varphi d{\tilde z}} - {\int_{{\tilde z}_{k+1}^{\text{top}}}^{{\tilde z}_k^{\text{top}}} d{\tilde z}} \\ +\overline{{\overline \varphi}^{\tilde{z}}_k \delta\varphi}^{\tilde{z}}_k &= \frac{\int_{{\tilde z}_{k}^{\text{bot}}}^{{\tilde z}_k^{\text{top}}} {\overline \varphi}^{\tilde{z}}_k \delta \varphi d{\tilde z}} + {\int_{{\tilde z}_{k}^{\text{bot}}}^{{\tilde z}_k^{\text{top}}} d{\tilde z}} \\ + &= {\overline \varphi}^{\tilde{z}}_k \frac{\int_{{\tilde z}_{k}^{\text{bot}}}^{{\tilde z}_k^{\text{top}}} \delta \varphi d{\tilde z}} + {\int_{{\tilde z}_{k}^{\text{bot}}}^{{\tilde z}_k^{\text{top}}} d{\tilde z}} \\ &= 0, $$ (delta-vert-average) @@ -402,21 +403,21 @@ where the last equality is true by definition. We first Reynolds' average [](#vh-tracer-pseudo) and given the definition of the operator we can move the averaging past the derivatives and integrals without correction terms to yield $$ -\frac{d}{dt} \int_A \int_{\tilde{z}_{k+1}^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \left<\varphi\right> \, d\tilde{z} \, dA -& + \int_{\partial A} \left( \int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \left<\varphi \, {\bf u} \right> \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl & \\ -& + \int_A \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - \tilde{ u} \right] \right\}\right>_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA & \\ -& - \int_A \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - \tilde{ u} \right] \right\}\right>_{\tilde{z} = \tilde{z}^{\text{bot}}}\, dA +\frac{d}{dt} \int_A \int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \left<\varphi\right> \, d\tilde{z} \, dA +& + \int_{\partial A} \left( \int_{\tilde{z}_{k+1}^{\text{bot}}}^{\tilde{z}_k^{\text{bot}}} \left<\varphi \, {\bf u} \right> \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl & \\ +& + \int_A \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - \tilde{ u} \right] \right\}\right>_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA & \\ +& - \int_A \left<\left\{ \rho_0 \varphi \left[\tilde{w}_{tr} - \tilde{ u} \right] \right\}\right>_{\tilde{z} = \tilde{z}_k^{\text{bot}}}\, dA & = 0. $$ (Aintegral-tracer-first-reynolds) -Next, we use a Reynolds' decomposition on any terms involving products inside a Reynolds' averaged, +Next, we use a Reynolds' decomposition on any terms involving products inside a Reynolds' average, $$ -\frac{d}{dt} \int_A \int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \left<\varphi \right> \, d\tilde{z} \, dA +\frac{d}{dt} \int_A \int_{\tilde{z}_{k}^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \left<\varphi \right> \, d\tilde{z} \, dA & + -\int_{\partial A} \left( \int_{\tilde{z}_{k+1}^{\text{top}}}^{\tilde{z}_k^{\text{top}}} \left(\left<{\varphi}\right>\left<{\bf u}\right> + \left<\varphi^{\prime}{\bf u}^{\prime}\right> \right) d\tilde{z} \right) \, \cdot {\bf n}_\perp \, dl & \\ -& + \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> -\left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{z = z^{\text{top}}} \, dA & \\ -& - \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> - \left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{z = z^{\text{bot}}}\, dA +\int_{\partial A} \left( \int_{\tilde{z}_{k}^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \left(\left<{\varphi}\right>\left<{\bf u}\right> + \left<\varphi^{\prime}{\bf u}^{\prime}\right> \right) d\tilde{z} \right) \, \cdot {\bf n}_\perp \, dl & \\ +& + \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> -\left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA & \\ +& - \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> - \left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{\tilde{z} = \tilde{z}_k^{\text{bot}}}\, dA & = 0. $$ (Aintegral-tracer-reynolds) @@ -425,8 +426,8 @@ We can rewrite the first two terms in [](#Aintegral-tracer-reynolds) using [](#d $$ \frac{d}{dt} \int_A \tilde{h}_k \, \overline{\left<\varphi\right>}^{\tilde{z}}_k \, dA & + \int_{\partial A} \left( \tilde{h}_k \, \left[\overline{\left<\varphi\right> \left<{\bf u}\right> + \left<\varphi^{\prime}{\bf u}^{\prime}\right>}^{\tilde{z}}_k \right] \right) \cdot {\bf n}_\perp \, dl & \\ -& + \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> -\left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{z = z^{\text{top}}} \, dA & \\ -& - \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> - \left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{z = z^{\text{bot}}}\, dA +& + \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> -\left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA & \\ +& - \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> - \left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{\tilde{z} = \tilde{z}_k^{\text{bot}}}\, dA & = 0. $$ (Aintegral-tracer) @@ -435,8 +436,8 @@ The second term is expanded utilizing [](#vertical-decomposition) $$ \frac{d}{dt} \int_A \tilde{h}_k \, \overline{\left<\varphi\right>}^{\tilde{z}}_k \, dA & + \int_{\partial A} \left( \tilde{h}_k \, \overline{\left(\overline{\left<\varphi\right>}^{\tilde{z}}_k + \delta \varphi\right)\left(\overline{\left<{\bf u}\right>}^{\tilde{z}}_k + \delta {\bf u}\right)}^{\tilde{z}}_k + \tilde{h}_k \overline{\left<\varphi^{\prime}{\bf u}^{\prime}\right>}^{\tilde{z}}_k \right) \cdot {\bf n}_\perp \, dl & \\ -& + \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> -\left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{z = z^{\text{top}}} \, dA & \\ -& - \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> - \left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{z = z^{\text{bot}}}\, dA +& + \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> -\left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA & \\ +& - \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> - \left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{\tilde{z} = \tilde{z}_k^{\text{bot}}}\, dA & = 0. $$ (Aintegral-tracer2) @@ -445,8 +446,8 @@ And then is simplified using [](#delta-vert-average) $$ \frac{d}{dt} \int_A \tilde{h}_k \, \overline{\left<\varphi\right>}^{\tilde{z}}_k \, dA & + \int_{\partial A} \left[ \tilde{h}_k \, \left(\overline{\left<\varphi\right>}^{\tilde{z}}_k \overline{\left<{\bf u}\right>}^{\tilde{z}}_k + \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k + \overline{\left<\varphi^{\prime}{\bf u}^{\prime}\right>}^{\tilde{z}}_k \right)\right] \cdot {\bf n}_\perp \, dl & \\ -& + \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> -\left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{z = z^{\text{top}}} \, dA & \\ -& - \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> - \left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{z = z^{\text{bot}}}\, dA +& + \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> -\left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA & \\ +& - \int_A \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> - \left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{\tilde{z} = \tilde{z}_k^{\text{bot}}}\, dA & = 0. $$ @@ -455,8 +456,8 @@ Given that the horizontal area is not changing in time, we can move the time der $$ \int_A \bigl\{ \frac{\partial \tilde{h}_k \, \overline{\left<\varphi\right>}^{\tilde{z}}_k}{\partial t} & + \nabla \cdot \left[ \tilde{h}_k \, \left(\overline{\left<\varphi\right>}^{\tilde{z}}_k \overline{\left<{\bf u}\right>}^{\tilde{z}}_k + \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k + \overline{\left<\varphi^{\prime}{\bf u}^{\prime}\right>}^{\tilde{z}}_k \right)\right] & \\ -& + \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> - \left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{z = z^{\text{top}}} & \\ -& - \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> - \left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{z = z^{\text{bot}}} \bigr\} \, dA +& + \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> - \left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{\tilde{z} = \tilde{z}_k^{\text{top}}} & \\ +& - \left\{ \rho_0 \left[ \left<\varphi\right>\left<\tilde{w}_{tr}\right> + \left<\varphi^{\prime} \tilde{w}_{tr}^\prime \right> - \left<\varphi\right> \left<\tilde{ u}\right> - \left<\varphi^{\prime} \tilde{ u}^{\prime}\right> \right] \right\}_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \bigr\} \, dA & = 0. $$ (reynolds-tracer-final) @@ -469,12 +470,12 @@ Finally, given that the area integral operates on the entire equation, it is val $$ \frac{\partial {\tilde h}_k \overline{\left<\varphi\right>}^{\tilde{z}}_k }{\partial t} & + \nabla \cdot \left({\tilde h}_k \overline{\left<\varphi\right>}^{\tilde{z}}_k \overline{\left<{\bf u}\right>}^{\tilde{z}}_k\right) \\ -& + \rho_0 \left\{ \left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> - \left<\varphi\right>\left<\tilde{ u}\right> \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} - \left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> - \left<\varphi\right>\left<\tilde{ u}\right> \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} \right\} \\ +& + \rho_0 \left\{ \left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> - \left<\varphi\right>\left<\tilde{ u}\right> \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} - \left[ \left<\varphi\right> \left<{\tilde w}_{tr}\right> - \left<\varphi\right>\left<\tilde{ u}\right> \right]_{{\tilde z}={\tilde z}_k^{\text{bot}}} \right\} \\ & = - \nabla \cdot \left({\tilde h}_k \overline{\left<\varphi^{\prime} {\bf u}^{\prime}\right>}^{\tilde{z}}_k \, + {\tilde h}_k \overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right) \\ -& - \rho_0 \left\{ \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{ u}^{\prime}\right> \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{top}}} - \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{ u}^{\prime}\right> \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}}\right\}. +& - \rho_0 \left\{ \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{ u}^{\prime}\right> \right]_{{\tilde z}={\tilde z}_{k}^{\text{top}}} - \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{ u}^{\prime}\right> \right]_{{\tilde z}={\tilde z}_{k}^{\text{bot}}}\right\}. $$ (layer-tracer) -A few notes on the layer averaged tracer equation. In this complete form, it includes three types of fluctuating quantities that must be dealt with: (1) the layer averaged, Reynolds' averaged horizontal turbulent flux $\left( \overline{\left<\varphi^{\prime} {\bf u}^{\prime}\right>}^{\tilde{z}}_k \right)$, (2) the Reynolds' average vertical turbulent flux $\left( \left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{u}^{\prime}\right> \right)$, and (3) the layer averaged product of deviations from the layer integrated variables $\left(\overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right)$. The details of the first two quantities will be discussed later in this document and follow on design documents. The terms involving perturbations from the layer integrated quantity are necessary to extend beyond piecewise constant represenation of variables. In this equation, variables with no overline are the full field variable at the interfaces. +A few notes on the layer-averaged tracer equation. In this complete form, it includes three types of fluctuating quantities that must be dealt with: (1) the layer averaged, Reynolds' averaged horizontal turbulent flux $\left( \overline{\left<\varphi^{\prime} {\bf u}^{\prime}\right>}^{\tilde{z}}_k \right)$, (2) the Reynolds' average vertical turbulent flux $\left( \left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{u}^{\prime}\right> \right)$, and (3) the layer-averaged product of deviations from the layer-integrated variables $\left(\overline{\delta \varphi \delta {\bf u}}^{\tilde{z}}_k \right)$. The details of the first two quantities will be discussed later in this document and follow-on design documents. The terms involving perturbations from the layer integrated quantity are necessary to extend beyond piecewise constant represenation of variables. In this equation, variables with no overline are the full field variable at the interfaces. The mass equation is identical to the tracer equation with $\varphi=1$. @@ -484,7 +485,7 @@ $$ \frac{\partial {\tilde h}_k }{\partial t} + \nabla \cdot \left({\tilde h}_k \overline{\left<{\bf u}\right>}^{\tilde{z}}_k\right) + \rho_0 \left[ \left<{\tilde w}_{tr}\right> - \left<\tilde{ u}\right> \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} -- \rho_0 \left[ \left<{\tilde w}_{tr}\right> - \left<\tilde{ u}\right> \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} +- \rho_0 \left[ \left<{\tilde w}_{tr}\right> - \left<\tilde{ u}\right> \right]_{{\tilde z}={\tilde z}_{k}^{\text{bot}}} = 0. $$ (layer-mass) @@ -495,46 +496,46 @@ We now derive the horizontal momentum equation in our non-Boussinesq, hydrostati We begin from [](#vh-momentum-pseudo) and specify the body forces ${\bf b}$ and surface forces ${\bf \tau}$ $$ -\frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} {\bf u} \, d\tilde{z} \, dA -& + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} {\bf u} \otimes {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ -& + \int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA -- \int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ -& = -\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \left({\bf f} \times \mathbf{u} + \nabla \Phi \right) \, d\tilde{z} \, dA -+ \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \frac{\rho_0 p}{\rho} \, d\tilde{z} \right) dl \\ -& + \int_A \left[ \frac{\rho_0 p}{\rho} \nabla \tilde{z}^{\text{top}} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA -- \int_A \left[ \frac{\rho_0 p}{\rho} \nabla \tilde{z}^{\text{bot}} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. +\frac{d}{dt} \int_A \int_{\tilde{z}_k^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} {\bf u} \, d\tilde{z} \, dA +& + \int_{\partial A} \left( \int_{\tilde{z}_k^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} {\bf u} \otimes {\bf u} \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ +& + \int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA +- \int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \, dA \\ +& = -\int_A \int_{\tilde{z}_k^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \rho_0 \left({\bf f} \times \mathbf{u} + \nabla \Phi \right) \, d\tilde{z} \, dA ++ \int_{\partial A} \left( \int_{\tilde{z}_k^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \frac{\rho_0 p}{\rho} \, d\tilde{z} \right) dl \\ +& + \int_A \left[ \frac{\rho_0 p}{\rho} \nabla \tilde{z}_k^{\text{top}} \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA +- \int_A \left[ \frac{\rho_0 p}{\rho} \nabla \tilde{z}_k^{\text{bot}} \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \, dA. $$ (vh-momentum-forces) In this equation: - The first term on the right hand side is the **Coriolis force**, where $ \mathbf{f} $ is the vector Coriolis vector (e.g., $ f \hat{\mathbf{z}} $ on the sphere). -- The second term on the right hand side represents the **gravitational force**, expressed in terms of the gradient of the gravitational potential $ \Phi(x, y, z, t) $, which may include effects such as tides and self-attraction and loading. +- The second term on the right hand side represents the **gravitational force**, expressed in terms of the two-dimensional gradient of the gravitational potential $ \Phi(x, y, z, t) $, which may include effects such as tides and self-attraction and loading. This gradient is along layer (e.g. constant $\tilde{z}$) such that the gradient of $\Phi$ doesn't disappear. - The final terms are the **pressure force**, which acts on the boundary surfaces and is naturally expressed as a surface integral. It gives rise to both horizontal pressure gradients and contributions from sloping surfaces. As with the tracer derivation, we next Reynolds' average [](#vh-momentum-forces), $$ -\frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left< {\bf u} \right> \, d\tilde{z} \, dA -& + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left< {\bf u} \otimes {\bf u} \right> \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ -& + \int_A \rho_0 \,\left< {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \right> \, dA -- \int_A \rho_0 \, \left< {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right> \, dA \\ -& = -\int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \, \left<\left( {\bf f} \times \mathbf{u} + \nabla \Phi \right) \right> \, d\tilde{z} \, dA -+ \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \left< \frac{p}{\rho} \right> \, d\tilde{z} \right) dl \\ -& + \int_A \rho_0 \left[ \left< \frac{p}{\rho} \nabla \tilde{z}^{\text{top}} \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA -- \int_A \rho_0 \left[ \left< \frac{p}{\rho} \nabla \tilde{z}^{\text{bot}} \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. +\frac{d}{dt} \int_A \int_{\tilde{z}_k^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \left< {\bf u} \right> \, d\tilde{z} \, dA +& + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \left< {\bf u} \otimes {\bf u} \right> \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ +& + \int_A \rho_0 \,\left< {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \right> \, dA +- \int_A \rho_0 \, \left< {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \right> \, dA \\ +& = -\int_A \int_{\tilde{z}_k^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \rho_0 \, \left<\left( {\bf f} \times \mathbf{u} + \nabla \Phi \right) \right> \, d\tilde{z} \, dA ++ \int_{\partial A} \left( \int_{\tilde{z}_k^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \rho_0 \left< \frac{p}{\rho} \right> \, d\tilde{z} \right) dl \\ +& + \int_A \rho_0 \left[ \left< \frac{p}{\rho} \nabla \tilde{z}_k^{\text{top}} \right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA +- \int_A \rho_0 \left[ \left< \frac{p}{\rho} \nabla \tilde{z}_k^{\text{bot}} \right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \, dA. $$ (vh-momentum-reynolds1) Here we have also moved the Reynolds' average through the spatial integrals given the properties of the averaging. Next we do a Reynolds' decomposition, this yields $$ -\frac{d}{dt} \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left< {\bf u} \right> \, d\tilde{z} \, dA -& + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left( \left< {\bf u} \right> \otimes \left< {\bf u} \right> + \left< {\bf u}^\prime \otimes {\bf u}^\prime \right> \right) \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ -& + \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ -& - \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ -& = - \int_A \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \, \left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right) \, d\tilde{z} \, dA \\ -& + \int_{\partial A} \left( \int_{\tilde{z}^{\text{bot}}}^{\tilde{z}^{\text{top}}} \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \, d\tilde{z} \right) dl \\ -& + \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}}\right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ -& - \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}}\right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. +\frac{d}{dt} \int_A \int_{\tilde{z}_k^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \left< {\bf u} \right> \, d\tilde{z} \, dA +& + \int_{\partial A} \left( \int_{\tilde{z}_k^{\text{bot}}}^{\tilde{z}^{\text{top}}} \left( \left< {\bf u} \right> \otimes \left< {\bf u} \right> + \left< {\bf u}^\prime \otimes {\bf u}^\prime \right> \right) \, d\tilde{z} \right) \cdot {\bf n}_\perp \, dl \\ +& + \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA \\ +& - \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \, dA \\ +& = - \int_A \int_{\tilde{z}_k^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \rho_0 \, \left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right) \, d\tilde{z} \, dA \\ +& + \int_{\partial A} \left( \int_{\tilde{z}_k^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \, d\tilde{z} \right) dl \\ +& + \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{top}}\right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA \\ +& - \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{bot}}\right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \, dA. $$ (vh-momentum-reynolds2) In [](#vh-momentum-reynolds2) we have also used $\alpha = \frac{1}{\rho}$ for notation conciseness. The definition of the layer average [](#def-layer-average-reynolds) is now utilized on terms with vertical integrals to yield @@ -542,12 +543,12 @@ In [](#vh-momentum-reynolds2) we have also used $\alpha = \frac{1}{\rho}$ for no $$ \frac{d}{dt} \int_A \tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \, dA & + \int_{\partial A} \tilde{h}_k \left( \overline{\left< {\bf u} \right> \otimes \left< {\bf u} \right>}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \cdot {\bf n}_\perp \, dl \\ -& + \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ -& - \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ +& + \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA \\ +& - \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \, dA \\ & = - \int_A \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \, dA \\ & + \int_{\partial A} \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right> \left

}^{\tilde{z}}_k + \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) dl \\ -& + \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ -& - \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. +& + \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA \\ +& - \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \, dA. $$ (vh-momentum-reynolds-lay-avg) The next step is to decompose vertical averages of products. This yields @@ -555,12 +556,12 @@ The next step is to decompose vertical averages of products. This yields $$ \frac{d}{dt} \int_{A} \tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \, dA & + \int_{\partial A} \tilde{h}_k \left( \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \otimes \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \cdot {\bf n}_\perp \, dl \\ -& + \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ -& - \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA \\ +& + \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA \\ +& - \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \, dA \\ & = - \int_A \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \, dA \\ & + \int_{\partial A} \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) dl \\ -& + \int_A \rho_0 \left[\left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \, dA \\ -& - \int_A \rho_0 \left[\left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \, dA. +& + \int_A \rho_0 \left[\left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA \\ +& - \int_A \rho_0 \left[\left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \, dA. $$ (vh-momentum-reynolds-lay-avg2) We next use the Divergence theorem on the surface integrals and combine terms into fewer integrals on each side of the equation. @@ -572,8 +573,8 @@ $$ & - \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \bigr\} \, dA \\ & = - \int_A \bigl\{ \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ & + \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ -& + \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ -& - \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}\bigr\} \, dA. +& + \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \\ +& - \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}}\bigr\} \, dA. $$ (vh-momentum-reynolds-lay-avg3) Since the equation is fully inside the integral, the equation is true for any area and therefore we can write the layer averaged momentum equation as @@ -581,12 +582,12 @@ Since the equation is fully inside the integral, the equation is true for any ar $$ \frac{\partial\tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} & + \nabla \cdot \left[ \tilde{h}_k \left( \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \otimes \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ -& + \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ -& - \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \\ +& + \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \\ +& - \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \\ & = - \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ & + \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ -& + \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \cdot \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ -& - \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \cdot \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. +& + \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \cdot \nabla \tilde{z}_k^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \\ +& - \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \cdot \nabla \tilde{z}_k^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}}. $$ (vh-momentum-v1) The product rule is used on the first two terms of [](#vh-momentum-v1) and then we multiply [](#layer-mass) by $\overline{\mathbf{u}}^{\tilde{z}}_k$ and subtract it from [](#vh-momentum-v1). This yields @@ -594,12 +595,12 @@ The product rule is used on the first two terms of [](#vh-momentum-v1) and then $$ \tilde{h}_k \frac{\partial \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} & + \tilde{h}_k \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \cdot \nabla \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \nabla \cdot \left[ \tilde{h}_k \left(\overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ -& + \rho_0 \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{ \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ -& + \rho_0 \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +& + \rho_0 \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{ \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} - \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \right\} \\ +& + \rho_0 \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \right\} \\ & = - \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ & + \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ -& + \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ -& - \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. +& + \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \\ +& - \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}}. $$ (vh-momentum-v2) The previous equation is divided by $\tilde{h}_k$, @@ -607,12 +608,12 @@ The previous equation is divided by $\tilde{h}_k$, $$ \frac{\partial \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} & + \overline{\left< {\bf u} \right>}^{\tilde{z}}_k \cdot \nabla \overline{\left< {\bf u} \right>}^{\tilde{z}}_k + \frac{1}{\tilde{h}_k} \nabla \cdot \left[ \tilde{h}_k \left(\overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ -& + \frac{\rho_0}{\tilde{h}_k} \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{ \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ -& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +& + \frac{\rho_0}{\tilde{h}_k} \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{ \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} - \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \right\} \\ +& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \right\} \\ & = - \rho_0 \, \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ & + \frac{1}{\tilde{h}_k} \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ -& + \frac{\rho_0}{\tilde{h}_k} \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ -& - \frac{\rho_0}{\tilde{h}_k} \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}}. +& + \frac{\rho_0}{\tilde{h}_k} \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \\ +& - \frac{\rho_0}{\tilde{h}_k} \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}}. $$ (vh-momentum-v3) @@ -643,14 +644,14 @@ Defining the absolute vorticity $\zeta_a$ as $\zeta + f$, where $f$ is the Corio $$ \frac{\partial \overline{\left< {\bf u} \right>}^{\tilde{z}}_k}{\partial t} & + \zeta_a {\overline{\left<{\bf u}\right>}^{\tilde{z}}_k}^{\perp} + \nabla K + \frac{1}{\tilde{h}_k} \nabla \cdot \left[ \tilde{h}_k \left(\overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ -& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[\left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{\left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right\} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{\left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right\} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ -& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[\left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{\left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right\} \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} - \left[ \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{\left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right\} \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \right\} \\ +& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \right\} \\ & = - \rho_0 \, \overline{\nabla \left<\Phi\right>}^{\tilde{z}}_k + \frac{1}{\tilde{h}_k} \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ -& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} -- \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\}. +& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} +- \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \right\}. $$ (layer-momentum-final) -The $\delta X$ terms in the layered equations are vertical deviations from the vertical layer average of a given quantity $X$. We will assume these deviations are small and products of these deviations are even smaller. Thus we will ignore all of these terms in Omega. We note that these terms could potentially serve as a bridge to multiscale fluxes, as resolution is increased, these $\delta X$ terms would get larger, but likely only for significantly higher resolution (e.g. 10s of meters). However, these terms would have to be further analyzed and developed as these terms are only deviations from layer averages, not temporal averages as in the Reynolds' approach. +The $\delta X$ terms in the layered equations are vertical deviations from the vertical layer average of a given quantity $X$. We will assume these deviations are small and products of these deviations are even smaller. Thus we will ignore most of these terms in Omega. The exception is the pressure gradient force. At this time we will assume piecewise constant approximations of the vertically continuous system, which is appropriate for the simple pressure gradient force targeted for early versions of Omega. This assumption will be revisited at a later date. We also note that these terms could potentially serve as a bridge to multiscale fluxes, as resolution is increased, these $\delta X$ terms would get larger, but likely only for significantly higher resolution (e.g. 10s of meters). However, these terms would have to be further analyzed and developed as these terms are only deviations from layer averages, not temporal averages as in the Reynolds' approach. (notational-simplifications)= ### Notational simplifications @@ -658,17 +659,17 @@ The $\delta X$ terms in the layered equations are vertical deviations from the v Throughout the rest of this document, we will 1. Drop the $< >$ notation around single variables and note that all variables are assumed to be Reynolds' averaged. Turbulent correlations will retain the angle bracket notation. -2. Change the vertical density weighted average notation from $\overline{\varphi}^{\tilde{z}}_k$ to the more simple $\varphi_k$. Thus, any subscript $k$ implies a vertical average. -3. Define a total vertical velocity across the psuedo height surface as $\tilde{W}_{tr} \equiv \tilde{w}_{tr} - \tilde{u}$. As a reminder $\tilde{u}$ is the projection of the normal velocity onto the normal vector to the pseudo height surface, in many cases this can be a very small correction to $\tilde{w}_{tr}. +2. Change the vertical density weighted average notation from $\overline{\varphi}^{\tilde{z}}_k$ to the more simple $\varphi_k$. Thus, any subscript $k$ implies a layer average. +3. Define a total vertical velocity across the pseudo height surface as $\tilde{W}_{tr} \equiv \tilde{w}_{tr} - \tilde{u}$. As a reminder $\tilde{u}$ is the projection of the normal velocity onto the normal vector to the pseudo height surface, in many cases this can be a very small correction to $\tilde{w}_{tr}$. With these three simplifications, the final continuous equations become **Tracer:** $$ -\frac{\partial {\tilde h}_k \varphi_k}{\partial t} & + \nabla \cdot \left({\tilde h}_k \varphi_k {\bf u}_k\right) + \rho_0 \left\{ \left[ \varphi \tilde{W}_{tr} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} - \left[ \varphi \tilde{W}_{tr} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} \right\} \\ +\frac{\partial {\tilde h}_k \varphi_k}{\partial t} & + \nabla \cdot \left({\tilde h}_k \varphi_k {\bf u}_k\right) + \rho_0 \left\{ \left[ \varphi \tilde{W}_{tr} \right]_{{\tilde z}={\tilde z}_k^{\text{top}}} - \left[ \varphi \tilde{W}_{tr} \right]_{{\tilde z}={\tilde z}_{k}^{\text{bot}}} \right\} \\ & = - \nabla \cdot \left({\tilde h}_k \left<\varphi^{\prime} {\bf u}^{\prime}\right>_k\right) \\ -& - \rho_0 \left\{ \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{ u}^{\prime}\right> \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{top}}} - \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{ u}^{\prime}\right> \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}}\right\}. +& - \rho_0 \left\{ \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{ u}^{\prime}\right> \right]_{{\tilde z}={\tilde z}_{k}^{\text{top}}} - \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{ u}^{\prime}\right> \right]_{{\tilde z}={\tilde z}_{k}^{\text{bot}}}\right\}. $$ (layer-tracer-final-simple) **Mass:** @@ -676,8 +677,8 @@ $$ (layer-tracer-final-simple) $$ \frac{\partial {\tilde h}_k }{\partial t} + \nabla \cdot \left({\tilde h}_k {\bf u}_k\right) -+ \rho_0 \left[ \tilde{W}_{tr} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{top}}} -- \rho_0 \left[ \tilde{W}_{tr} \right]_{{\tilde z}={\tilde z}_{k+1}^{\text{bot}}} ++ \rho_0 \left[ \tilde{W}_{tr} \right]_{{\tilde z}={\tilde z}_{k}^{\text{top}}} +- \rho_0 \left[ \tilde{W}_{tr} \right]_{{\tilde z}={\tilde z}_{k}^{\text{bot}}} = 0. $$ (layer-mass-final-simple) @@ -686,37 +687,39 @@ $$ (layer-mass-final-simple) $$ \frac{\partial {\bf u}_k}{\partial t} & + \zeta_a {{\bf u}_k}^{\perp} + \nabla K + \frac{1}{\tilde{h}_k} \nabla \cdot \left[ \tilde{h}_k \left< {\bf u}^\prime \otimes {\bf u}^\prime \right>_k \right] \\ -& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[\left(\mathbf{u} - \mathbf{u}_k\right) \left\{\tilde{W}_{tr} \right\} \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left(\mathbf{u} - \mathbf{u}_k\right) \left\{\tilde{W}_{tr} \right\} \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ -& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\} \\ +& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[\left(\mathbf{u} - \mathbf{u}_k\right) \left\{\tilde{W}_{tr} \right\} \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} - \left[ \left(\mathbf{u} - \mathbf{u}_k\right) \left\{\tilde{W}_{tr} \right\} \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \right\} \\ +& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \right\} \\ & = - \left(\nabla \Phi \right)_k + \frac{1}{\tilde{h}_k} \nabla \left[ \tilde{h}_k \alpha_k p_k \right] \\ -& + \frac{1}{\tilde{h}_k} \left\{ \left[ \alpha p \nabla \tilde{z}^{\text{top}}\right]_{\tilde{z} = \tilde{z}^{\text{top}}} -- \left[ \alpha p \nabla \tilde{z}^{\text{bot}}\right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \right\}. +& + \frac{1}{\tilde{h}_k} \left\{ \left[ \alpha p \nabla \tilde{z}^_k{\text{top}}\right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} +- \left[ \alpha p \nabla \tilde{z}_k^{\text{bot}}\right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \right\}. $$ (layer-momentum-final-simple) +In [](#layer-tracer-final-simple) and [](#layer-momentum-final-simple) we have not combined turbulent flux terms (e.g., $\left<\varphi^\prime \tilde{W}_{tr}^\prime \right>$) as the two terms that comprise this term ($\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right>$ and $\left< \varphi^\prime \tilde{ u}^{\prime}\right>$) are fundamentally different processes that must be modeled separately. + ## 10. Discrete Equations -In the following equations, the subscripts $i$, $e$, and $v$ indicate cell, edge, and vertex locations and subscript $k$ is the layer. Square brackets $[\cdot]_e$ and $[\cdot]_v$ are quantities that are interpolated to edge and vertex locations. For vector quantities, $u_{e,k}$ denotes the normal component at the center of the edge, while $u_{e,k}^\perp$ denotes the tangential component. We have switched from $\varphi_{i,k}^{bot}$ to the identical $\varphi_{i,k+1}^{top}$ for all variables in order for the notation to match the array names in the code. It is important to note that any term without a subscript $k$ are quantities evaluated at that level and are ***not*** individual layer averages, but will be a function of layer average values. For example, Eq (44) of [White and Adcroft (2008)](https://www.sciencedirect.com/science/article/pii/S0021999108002593) shows a third order reconstruction. Finally, we note that in the equations below, it is assumed that $k$ increases away from the surface. +In the following equations, the subscripts $i$, $e$, and $v$ indicate cell, edge, and vertex locations and subscript $k$ is the layer. Square brackets $[\cdot]_e$ and $[\cdot]_v$ are quantities that are interpolated to edge and vertex locations. For vector quantities, $u_{e,k}$ denotes the normal component at the center of the edge (where the normal component is the local ${\bf n}_\perp$ described in above sections), while $u_{e,k}^\perp$ denotes the tangential component. We have switched from $\varphi_{i,k}^{bot}$ to the identical $\varphi_{i,k+1}^{top}$ for all variables in order for the notation to match the array names in the code. It is important to note that any term without a subscript $k$ are quantities evaluated at that location and are ***not*** individual layer averages, but will be reconstructed as a function of neighboring layer average values. For example, Eq (44) of [White and Adcroft (2008)](https://www.sciencedirect.com/science/article/pii/S0021999108002593) shows a third order reconstruction. Finally, we note that in the equations below, it is assumed that $k$ increases away from the surface. **Mass:** $$ \frac{\partial {\tilde h}_{i,k} }{\partial t} + \nabla \cdot \left(\left[{\tilde h}_k\right]_e {\bf u}_{e,k}\right) -+ \rho_0 \left[ \tilde{W}_{tr} \right]_k -- \rho_0 \left[ \tilde{W}_{tr} \right]_{k+1} -= Q_{i,k}. ++ \rho_0 \left[ \tilde{W}_{tr} \right]_k^\text{top} +- \rho_0 \left[ \tilde{W}_{tr} \right]_{k+1}^\text{top} += 0. $$ (discrete-mass) -In this equation, we have added a mass source term ($Q$) that will include sources like river runoff, sea ice freshwater fluxes, precipitation, and evaporation. +In this equation, mass source term ($Q$), such as sources like river runoff, sea ice freshwater fluxes, precipitation, and evaporation are bound up in the surface value of $\tilde{W}_tr^{\text{top}}$. The mass sources will be normalized by $\rho_0$ to achieve consistent units. **Tracer:** $$ -\frac{\partial {\tilde h}_{i,k} \varphi_{i,k}}{\partial t} & + \nabla \cdot \left(\left[{\tilde h}_{i,k} \varphi_{i,k}\right]_e {\bf u}_{e,k}\right) + \rho_0 \left\{ \left[ \varphi \tilde{W}_{tr} \right]_k - \left[ \varphi \tilde{W}_{tr} \right]_{k+1} \right\} \\ -& = - \nabla \cdot \left({\tilde h}_k \left<\varphi^{\prime} {\bf u}^{\prime}\right>_k \right) - \rho_0 \left\{ \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{ u}^{\prime}\right> \right]_k - \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{ u}^{\prime}\right> \right]_{k+1}\right\}. +\frac{\partial {\tilde h}_{i,k} \varphi_{i,k}}{\partial t} & + \nabla \cdot \left(\left[{\tilde h}_{i,k} \varphi_{i,k}\right]_e {\bf u}_{e,k}\right) + \rho_0 \left\{ \left[ \varphi \tilde{W}_{tr} \right]_k^\text{top} - \left[ \varphi \tilde{W}_{tr} \right]_{k+1}^\text{top} \right\} \\ +& = - \nabla \cdot \left({\tilde h}_k \left<\varphi^{\prime} {\bf u}^{\prime}\right>_k \right) - \rho_0 \left\{ \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{ u}^{\prime}\right> \right]_k^\text{top} - \left[\left< \varphi^\prime {\tilde w}_{tr}^{\prime} \right> - \left< \varphi^\prime \tilde{ u}^{\prime}\right> \right]_{k+1}^\text{top} \right\}. $$ (discrete-tracer) -In the tracer equation, we note that surface fluxes (e.g. latent heat fluxes) will appear in the surface value of the vertical turbulent tracer flux (e.g., $\left<\varphi^\prime \tilde{w}_{tr}^\prime\right>_{k=0}$). The terms on the second line represent the small scale turbulence and the form used in Omega to represent these terms will be discussed in the next section. +In the tracer equation, we note that surface fluxes (e.g. latent heat fluxes) will appear in the surface value of the vertical turbulent tracer flux (e.g., $\left[\left<\varphi^\prime \tilde{w}_{tr}^\prime\right>\right]_{k=0}^\text{top}$). The surface fluxes will also include effects from volumetric surface fluxes that carry a non zero tracer value. The terms on the second line represent the small scale turbulence and the form used in Omega to represent these terms will be discussed in the next section. **Velocity:** @@ -725,9 +728,9 @@ Omega will only predict the layer average normal velocity, so we drop the bold f $$ \frac{\partial u_{e,k}}{\partial t} & + \left[ {\bf k} \cdot \nabla \times u_{e,k} +f_v\right]_e\left(u_{e,k}^{\perp}\right) + \left[\nabla K\right]_e \\ -& + \frac{\rho_0}{\left[\tilde{h}_{i,k}\right]_e} \left\{ \left[\left(u - u_k\right) \left\{\tilde{W}_{tr} \right\} \right]_{e,k} - \left[ \left(u - u_k\right) \left\{\tilde{W}_{tr} \right\} \right]_{e,k+1} \right\} \\ -& = - \left(\nabla \Phi \right)_{e,k} + \frac{1}{\left[\tilde{h}_k\right]_e} \nabla \left( \tilde{h}_k \alpha_k p_k \right) + \frac{1}{\left[\tilde{h}_k\right]_e} \left\{ \left[ \alpha p \nabla \tilde{z}^{\text{top}}\right]_{e,k} - \left[ \alpha p \nabla \tilde{z}^{\text{bot}}\right]_{e,k+1} \right\} \\ -& - \frac{1}{\left[\tilde{h}_{i,k}\right]_e} \nabla \cdot \left( \tilde{h}_k \left< {\bf u}^\prime \otimes {\bf u}^\prime \right>_k \right) - \frac{\rho_0}{\left[\tilde{h}_{i,k}\right]_e} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{e,k} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{e,k+1} \right\}. +& + \frac{\rho_0}{\left[\tilde{h}_{i,k}\right]_e} \left\{ \left[\left(u - u_k\right) \left\{\tilde{W}_{tr} \right\} \right]_{e,k}^\text{top} - \left[ \left(u - u_k\right) \left\{\tilde{W}_{tr} \right\} \right]_{e,k+1}^\text{top} \right\} \\ +& = - \left(\nabla \Phi \right)_{e,k} + \frac{1}{\left[\tilde{h}_k\right]_e} \nabla \left( \tilde{h}_k \alpha_k p_k \right) + \frac{1}{\left[\tilde{h}_k\right]_e} \left\{ \left[ \alpha p \nabla \tilde{z}^{\text{top}}\right]_{e,k}^\text{top} - \left[ \alpha p \nabla \tilde{z}^{\text{bot}}\right]_{e,k+1}^\text{top} \right\} \\ +& - \frac{1}{\left[\tilde{h}_{i,k}\right]_e} \nabla \cdot \left( \tilde{h}_k \left< {\bf u}^\prime \otimes {\bf u}^\prime \right>_k \right) - \frac{\rho_0}{\left[\tilde{h}_{i,k}\right]_e^\text{top}} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{e,k}^\text{top} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{e,k+1} \right\}. $$ (discrete-momentum) **Diagnostic Relations:** @@ -753,9 +756,9 @@ The horizontal operators $\nabla$, $\nabla\cdot$, and $\nabla \times$ are now in ### Horizontal Velocity Dissipation -There are two terms related to horizontal momentum dissipation in [](#discrete-momentum) that need to be parameterized, $\left<\mathbf{u}^\prime \tilde{u}^\prime \right>_k$ and $\frac{1}{\left[\tilde{h}_{i,k}\right]_e} \nabla \cdot \left( \tilde{h}_k \left< {\bf u}^\prime \otimes {\bf u}^\prime \right>_k \right)$. The former only arises from the layer integration in psuedo-height coordinates, we interpret this term as the projection of the horizontal momentum dissipation that crosses $\tilde{z}$ interfaces. Given this, we discuss the form of the horizontal dissipation parameterization first and return to the second term in a later subsection. +There are two terms related to horizontal momentum dissipation in [](#discrete-momentum) that need to be parameterized, $\left<\mathbf{u}^\prime \tilde{u}^\prime \right>_k$ and $\frac{1}{\left[\tilde{h}_{i,k}\right]_e} \nabla \cdot \left( \tilde{h}_k \left< {\bf u}^\prime \otimes {\bf u}^\prime \right>_k \right)$. The former only arises from the layer integration in pseudo-height coordinates, we interpret this term as the projection of the horizontal momentum dissipation that crosses $\tilde{z}$ interfaces. Given this, we discuss the form of the horizontal dissipation parameterization first and return to the second term in a later subsection. -As in MPAS-Ocean, parameterizaiton of the horizontal momentum dissipiation is through laplacian or biharmonic dissipation, +As in MPAS-Ocean, parameterization of the horizontal momentum dissipation is through Laplacian or Biharmonic dissipation, $$ \frac{1}{\left[\tilde{h}_{i,k}\right]_e} \nabla \cdot \left( \tilde{h}_k \left< {\bf u}^\prime \otimes {\bf u}^\prime \right>_k \right) = \nu_{2,e} \nabla^2 u_{e,k} - \nu_{4,e} \nabla^4 u_{e,k}. @@ -773,7 +776,7 @@ $$ \nu_{4,e} = \nu_4 \times \text{meshScaling}_{4,e} $$ -Where the $\nu_4$ and $\nu_2$ are the constant biharmonic and laplacian coefficients specified in the YAML configuration file. The meshScaling variable is constructed to appropriately scale the viscosity with changes in mesh spacing (for details, see [Hecht et al 2008](https://www.researchgate.net/profile/Mark-Petersen-2/publication/255570421_Lateral_Mixing_in_the_Eddying_Regime_and_a_New_Broad-Ranging_Formulation/links/55886e1c08ae347f9bda9f04/Lateral-Mixing-in-the-Eddying-Regime-and-a-New-Broad-Ranging-Formulation.pdf)). This formulation implies that for regionally resolved configurations, we cannot strictly pull the $\nu_{2,e}$ and $\nu_{4,e}$ variables through the gradient operator. To do this, we assume that the spatially gradient of $\nu$ is small and we can treat them as constant and pass them through the gradient operator. +Where the $\nu_4$ and $\nu_2$ are the constant Biharmonic and Laplacian coefficients specified in the YAML configuration file. The meshScaling variable is constructed to appropriately scale the viscosity with changes in mesh spacing (for details, see [Hecht et al 2008](https://www.researchgate.net/profile/Mark-Petersen-2/publication/255570421_Lateral_Mixing_in_the_Eddying_Regime_and_a_New_Broad-Ranging_Formulation/links/55886e1c08ae347f9bda9f04/Lateral-Mixing-in-the-Eddying-Regime-and-a-New-Broad-Ranging-Formulation.pdf)). This formulation implies that for regionally refined configurations, we cannot strictly pull the $\nu_{2,e}$ and $\nu_{4,e}$ variables through the gradient operator. To do this, we assume that the spatial gradient of $\nu$ is small locally and we can treat them as constant and pass them through the gradient operator. #### Laplacian dissipation (del2) @@ -820,9 +823,9 @@ $$ \frac{1}{\left[\tilde{h}_{i,k}\right]_{e,k}} \left\{ \left[ \nu_v \left[\frac{\partial u}{\partial \tilde{z}}\right]_{e,k} \right]_{e,k} - \left[ \nu_v \left[\frac{\partial u}{\partial \tilde{z}}\right]_{e,k} \right]_{e,k+1} \right\} $$ (discrete-mom-vert-diff) -##### Vertical derivatives in a finte volume framework +##### Vertical derivatives in a finite volume framework -Since, Omega will predict layer average quantities (e.g., $u_k$), it's not immediately clear that a traditional discretization is appropriate as there is a discontinuity in the predicted variables at the layer edge. To circumvent this problem, we turn to weak derivatives instead of traditional pointwise forms. A weak derivative of $\varphi$ is defined as +Since, Omega will predict layer average quantities (e.g., $u_k$), it's not immediately clear that a traditional discretization is appropriate as there is a discontinuity in the predicted variables at layer interfaces. To circumvent this problem, we turn to weak derivatives instead of traditional pointwise forms. A weak derivative of $\varphi$ is defined as $$ \int_{\tilde{z}_{k+1/2}^{\text{top}}}^{\tilde{z}_{k-1/2}^{\text{top}}} \varphi^\prime \psi d\tilde{z} = \varphi \psi - \int_{\tilde{z}_{k+1/2}^{\text{top}}}^{\tilde{z}_{k-1/2}^{\text{top}}} \varphi \psi^\prime d\tilde{z}. @@ -852,7 +855,7 @@ $$ \varphi^\prime(z) = \left(\varphi_k - \varphi_{k+1}\right) \delta \left(z-\tilde{z}_{k}^{\text{top}}\right). $$ (weak-derivative) -If [](#weak-derivative) is averaged between $\tilde{z}_{k-1/2}^{\text{top}}$ and $\tilde{z}_{k+1/2}^{\text{top}}$, we arrive at the expected form of the gradient +If [](#weak-derivative) is averaged between $\tilde{z}_{k-1/2}^{\text{top}}$ and $\tilde{z}_{k+1/2}^{\text{top}}$, we arrive at the expected form of the gradient centered on layer interfaces $$ \left[\frac{\partial \varphi}{\partial z}\right]_{avg} = \frac{\left(\varphi_k - \varphi_{k+1}\right)}{0.5 \left(\tilde{h}_k + \tilde{h}_{k+1}\right)} @@ -863,14 +866,14 @@ where $0.5 \left(\tilde{h}_k + \tilde{h}_{k+1}\right)$ is the distance between $ With this, we can now fully discretize [](#discrete-mom-vert-diff) as $$ --\frac{\rho_0}{\left[\tilde{h}_k\right]_e} \left\{ \left[\left \right]_{e,k} - \left[\left \right]_{e,k+1} \right\} = -\frac{\rho_0}{\left[\tilde{h}_k\right]_e} \left\{ \frac{\left(u_{e,k-1} - u_{e,k}\right)}{0.5 \left(\tilde{h}_k-1 + \tilde{h}_{k}\right)} - \frac{\left(u_{e,k} - u_{e,k+1}\right)}{0.5 \left(\tilde{h}_k + \tilde{h}_{k+1}\right)} \right\}. +-\frac{\rho_0}{\left[\tilde{h}_k\right]_e} \left\{ \left[\left \right]_{e,k} - \left[\left \right]_{e,k+1} \right\} = -\frac{\rho_0}{\left[\tilde{h}_k\right]_e} \left\{ \frac{\left(u_{e,k-1} - u_{e,k}\right)}{0.5 \left(\tilde{h}_{k-1} + \tilde{h}_{k}\right)} - \frac{\left(u_{e,k} - u_{e,k+1}\right)}{0.5 \left(\tilde{h}_k + \tilde{h}_{k+1}\right)} \right\}. $$ (final-vert-vel-dissipation) -This form can be interfaced with the Omega [tridiagongal solver](TridiagonalSolver.md) routine. +This form can be interfaced with the Omega [tridiagonal solver](TridiagonalSolver.md) routine. ### Forcing at the top and bottom of the ocean -The discretized momentum and tracer forcing appear as the surface value of the vertical turbulent fluxes of tracer and momentum. Omega also includes a ocean floor vertical turbulent flux of momentum. +The discretized momentum and tracer forcing appear as the surface value of the vertical turbulent fluxes of tracer and momentum. We note that surface forcings (e.g. river runoff) could also extend beyond the first layer. This will be discussed further in a later design document. Omega also includes a ocean floor vertical turbulent flux of momentum. #### Wind Forcing @@ -912,7 +915,7 @@ where $\rho_1$ is the density in the top layer of Omega. This gives units of mK/ #### Freshwater forcing -Since Omega is a non-Boussinesq ocean, surface sources of water will be mass fluxes instead of being converted into thickness fluxes. Similar to MPAS-Oceran, Omega will include an ability to spread certain fluxes (e.g., river runoff) over a depth specified in the YAML configuration file. +Since Omega is a non-Boussinesq ocean, surface sources of water will be mass fluxes instead of being converted into thickness fluxes. Similar to MPAS-Ocean, Omega will include an ability to spread certain fluxes (e.g., river runoff) over a depth specified in the YAML configuration file. ### Horizontal Tracer Diffusion From 5d872b5992dbddee660b9670405b247c55063f05 Mon Sep 17 00:00:00 2001 From: Kat Smith Date: Fri, 1 Aug 2025 13:20:33 -0700 Subject: [PATCH 64/65] updates tilde w figure --- .../omega/doc/design/images/tilde_w.jpeg | Bin 20827 -> 27875 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/components/omega/doc/design/images/tilde_w.jpeg b/components/omega/doc/design/images/tilde_w.jpeg index 8253a7fc71240ff1c3e1448b715680900bc39b5c..5874922643f9b606a224bbeadf54458935b388d7 100644 GIT binary patch literal 27875 zcmbrm2V7Il);GE-N+%*sYLt$ENLN52DosSh0#c&_(m_EWLP!vlDj*`D@KB^H0@9_1 zj)F)BsVS%^QW8tplJ;$%bDnd~d+vAd?>*;Em}F&V_Uu_RYi6zauQjmVvk1VR)802>?NAOHZ|z;3p^00%^|K`($!64>=84FL9RQvaac*i`;r zh8+Odh5uPT-Us0PdwHnNKNIwn-!=Vy8uZEa006ikiu16xwpKdy{Ws0V&H)tubzST5 z;X<~5)>z2?SB+fJg&cp;oJUG_|Gf-U!QT>##I9m>@+9)yd0TUl4(H-)(}@Rrin^rsvL``Az@z`J4V{qR#xS?4-u;y4D%R zsYmWv^aeC^*hb9n)BI<-|0~7o;Thr%{X&QGVfP!sx1df?hv;+Rw{HBV(GV>X3^fX( zp{@Z$y#7X){HCw{jehlKnTzL7LS^1U^nQ2ms~!-&4$Z@AP6db8wiH(^8&nqThKkG z(3RgcctW%l5D2&fhX8em)&>qkS^IZCL-#_7I{o+lQ~&3+SUdn6!?9SbwtrqbjRSyM z0|4M{`R6s2BLE=82LP{IZd?t%`e${&Wt06nBwgRi0YJbJ0EEY&dz?eA>uCS^I~)HA z0NAz6VtrSFL@EOS7!O!1S`mxIC-0J{(yhY%a94}e2G zwTtb~^k+rT8zh*VyLNMN^YHRP1seAN>}(ty?3^6Cc5y;7#TNBja5;r`?LDAnx?9-p zDwo_%5$!waPr2n!)OL%WA15p5Tnmoj;T03#Cn2e*q^zQPP*+di;K)(Klc&tgEiA20 zU$}V5-T`9Q-NW;`m$#2^$gR+@aMbOH*t_@Q;u8{+9%eks%*uZJB&Vpjq_nKO;@R`M z`i91)=2tDPJ-vPX1B0*M3{6Z*`HmIqf^#A}7+H)^_vA z>zpTxUJD-Q6;se9DpG#4_9timJH}%EE6)DG*gyGN08Tdj^=I1s_r&#Q;{Kg@{*hQvC4bhy&dv$_@$BBU`yapkuL;%?v?%Rk%>(=#Y>+T< z2muIy$y6yy0{-{8y=?_KfQ>7tZ|*?|(Qko+&wGnd$et`=U#GnF)sIQbyVU#GhK~+R znGG8~c+R(no2$Yzq}e!is*#C7lFjj;W>8I}cGf4HL3_K9FnTw|)}K=ex#BvK=a~iquG(mY!p; zeBB!CHaBhT70O z=6gJ2&0z0|I__%uiK~a-FEk|44taE5_}+IHz|@UfAr&!G@Wyw!v_sZKW?1s}V5gDc z`&S3iqC{HW4JSsy@aX(o=@TB`5ut5c8|bLX<8Ws?WKID;j!-5k-nW%ti0FN9!h?1n z!#lR6j)w~Pbvw*BMb$o78EI_^soR%bX>_AF=V#i&Dz&kZk;nqPB1h9AKE+q~?r4-U z^UBv8B>kJlN6UJjyY-e=k)0pBk?YpzF;cN0>~-+gWuxYa(#dE9*hu!GI)QC8v#$t& z&I5E8a0E*`iVEy?n5OI1fa#$EhJH(~n*49dkG;J)d^3En&o{MG+k2hOjN|xF@_DCg zerN^gxHwxF4U9{OXju$=eEn{wTVDQYxBPOna#2goK5(>~1;C88B3FXoYcmmIDP;rK z+i+9LsWUUnhi|w!mU^a$D+KrP{=zb4<)NWs0W6?smAuUYc%#%M@-QYqWLH~?)=&csJ!R6aXl6LmF?A6)X8uX^E-m2vmV znqo{SYEiA?YRg$}&S16LYUe={jR`s%p~`(Qg1F#Wba@fED7_-&Y(CL4N_+0j@ynbA z#Hg}>Zhgd6L@Emq!I&`Lx32cei1BUlGsk52CwCc0`UjPjWtM{x&R4JbuhgRCE$M{y zYxC|3dxlKqaMcItiYy@3kFNOK8&0;s#>r|>_OpP*!IWw}yfD5~>y!1fuj0W2Ea1MZ zgC4E%I6S&_mM)}hkxPi*C?MLv?dwf67|(vXUSq!dwld=9dPwb6U)GJ*4fPVYhK$9A z)7BrkMn0<6l;FHI#GRnl`a`YNy9JNI)(JlIDh6W)0yw(!Wv3b|gPMb;LYGeSN&GZ= z{C4a`##T##-K&T8TAPjv=`!J}4DV{#APeBbNYWi@UrsQUKTBd00vg&tJ?kT(YTld0 zG1RGyU2pvkzH}^7cy#l->QT;fTs-+b*oSJZUS)5ONo0=>gXm{q}s#gazVRC-*XW;t87faC;iC39Z=v(fbj7 zI~r5rKAu%*)7eHDld$_AEJD3*-Xf0*-}3%&{>2fw4qGO#4(*^HylH#ghQdX?NM=40 zOpIKy=3XaE9TLsca6KgV_{=4f>#83&&uL`=9)cDNy63o7wt8zoMWuK$jXD*(Qks^a zkU`wYjz#O0;NnZ(W*ZJBpb-^o+2g)DjlC-0hpaHo$2}TmS-_XQSNiVIv-|PQ+Zz{% zt`|tQDaQMEV95aKKKjiEfC}P7eIWpZ(T6(?gp{-xY*MK=+{dn|aMS2fr z(;>whUSHFt$-874MXcH79VWcsH`}S2WT~#Pa%)y^-)hqL3-%W|-CQg}jDr_p%Z8`d zE>{X27jHjC4B7*JC7v=7VU+yn;JbwDyjL{69v~lCrG)(BL8S~S@YcLYx*TJj=8%i+ z-NWq1|FA@hLXsw61PQIfl*l=*0Yo!)ePtzWUWY0SX3$jW+*2=%l`B!bz2X?@$!f2Z zhwo<8USZyTKEF#n{jo%`l*l^gp7MP)qp-PhCXWSWk}yaYk?(~!%_h-9i}0ppbp1xM z-lsgDtB3W+7hH{N-+z(2tzhlUO-da%9?;ZHk?GyAXbZPpnpa^{_5Q!D9OM7t%JCh^ z-%PrG|I)!;-DP zZbi>~q{yuH<0Mel-Ax}&enl=_TP9{k&1pQ2(m4(<#*=Mq@8QX%2tq!B10!Mu&oqf8 zAYk(@hqRava?rAoLTeM*%8RoLq4onqlQwnnXJ6hoi|Hs1k z?+fL>en+q-{zKM((V?*%StZ$SMACSeZ&?7A=C!gH)lXv5F@i6%D2X!Dm@yuiV}3gv zHLKsLF)Sdt2I_(Rm{B)&7T{zej8>+2rG)+bmf9AaBgO)*b?c9D{ov{su{*x&Kge*_ z9ak_49$*1< z7i0>)3Adr8Jjw!iGzT@@duJwCz^Jn(zq6@V;9BI<@0T^lemCDte{X%^ zZ?+vq@eN!XW@KwBa{Px(_=3LGCOr@|C06)MYm2o!ttb3r#NHr>6Hr-d{E01BZY`EY>S%A-NY$jx(#m zj8#?l7J|-p6O9cmy z)I=6~oVKP2{pxu8iB{WtjZ*ME?fLMy@kZ<(>$Y{thukj7m-i1PYGfSf`f3qNhYYh_ z8sqV?g_NLVI;=_~`(EfiV{7I2ni~1reN_ePwB$=C?4@=QTn@aw>*WbxqV13X>I4=% zC=*XVK&Bs$C6o6J!gz3Z=CwL0x?On$l%^72|nkBKof>(l!o z*+3)qpmz~@aA$aR#ke;n(^;*5xJ62JXX2`x5Co5M!8{NhsvXtW228_zPY9apd;+Aa{j;>n5q)pRK^ z_vsr_8aEPby%1S=O+)3fS6F6+WyZ_+OMmb$%vXf$m;WTfwr!EnxMa|?4DY1qH!5d( zl{*iILOLx>1qx2YcJ$O3jxdOJPDb}JZ*QY`wkenm9*Mfvr0s&{fd%RV;~*rRo9 z`=p4M$xp}*>OPMp)FIfJ!r1O(?WWilV8{SddWNZv)}K9u)^E*@-z*Yy$hOZGYiiml z9{i+npLvu2y!k#iYu=q zs9wGK_>*fMcNA$BOrBNpC^Zp8l!F<4_y)~nW7B7-K$sxtceXLNfBTzl_|1wh`q={2 zU#qkEZSEUP*z#L*+`cS!JuLA|KYj@p1e*`1+A|(w`1`AwGxi$Q-mTMgF|h~*$x}HS z?}~4?jiesY1&baJjjwBG9Ta5`TohdV1%o7l7j4a`MI+rQ^@E){b+u$%FAI=y^L5*e zjhp|my!bP%A4|D_}J&PN5szw#C&lORLHlJK40G^kbpVQ5o}To8qn0}ilF8S3y`3D zkU!<)$WPE#*=O4+_9b;^<#6qj8e;DxRvI2U9%%fPidG))VKyah_uHIDkOqFug7B|>?`j@HlqmJnaUTQw+AN0SrW-uNgSN=a(p6<0HEUv%^PS(0WF6DrejTSpHxPOod{VV$ zJq!1CmdU4Pur5v$1sABIl-YGP%E=zwp7`$MiPjB#{Le}Od#ZB^;zI2-3uw@^e|J02 zjk;z%cNr)3`1yw$h)GFR_k6t^F~L+0HPzSqzj2$yMJp5~sQ`b=Jb=d-n;Ck9jH6C4 z(o77DZ_*{eTEdoCL;JzcJDUaQzMX)W@T1hP$TQcY5u7-}$2>nfET}M;+$rp>eLJG2 zuLIj_vbRqD*+UlK*cg7!XfsY#T=wqlS}6-y_o1n;rGux9@a*2J%ssAGjZZ#(yzvlT z=lcf!NHcqgTar*NAkXgHc|+@$2BZvHAd@SN@|`Nrc(U?~1rX&yXob%rY5w}^Lv(iB zQZ|>F+pb&;($pN{uAdeq_=s3C zPMYwqa@?4|yx{MkVSIOm|7ofvq*kL5CQNb698#i20Ynm!^Ew2tBs32Rn=pxrF?#(% zp=q`uO+YEW)3S7?G1)$KekpXHcvPY3fp8P#GUsd*8BS#Zj5HSDqsa$y^dtFO18sc_zM4=sL=J!I!6-AG4OW}fo-W*MnddCc$CW+GxkqOls zfqRTEocO8`tonIq==95D33`}LfLuctjwc{`!pTm|QG*G6vLgMn$KLeyGqiMP=p;sZ z5ghDm9lcvEe4#$su}*oEOwGHFojkPp!L)NRTFhnRyycNiV;CeM+>A`)tIyw~92_Wc zx?Jb}HZnh4xVj-t=%i9^NEzx{*!!SH@yC3Trotb+tggd^IA8IN08v$D9^SJ1$J!m9 z&VdCz+b?~c0*g7r?X$z`)W=**wd0d6mz=O$2|bWGm3hUKOSI4nlzt=3T}TT|1dLf=duTIc5ymDemOqMO5PDQT@{5g~!)AE?0BEO45-#XsO+H zRx6oyg>DJiSMn>(UA8c6&(K6W)FC|LNgwN(ucvf_HjdIQlI^iC9Tzu()_*z3UM*02 zpud{K019Cv0Wea{MlDSX6=FSs^=1I*i;!}r|tx#!nbUo!EAL`KZpP6&n{Y z{xQe75}TtVr4TvwY=7p3pD+k&n=dA$4Gedv_2!GrJZ++wR1&KY{dn?ye4VpjQ|s9h z#Q5f+hSeYwA>4LQ3&zUCzFQt~%3-*mL45rt&4f9TzlQ>W8Bs+VdH9qckAK)WIFG;o z(mK_2Zb&&!=$W&B%eR$BftQCLeTXS_yaVi{Ceha^ET9*^fFo3*wjj``K0HBpG~uPM zMQ>QA5E+p$eQQ{QcV^hLvsT`BoM%hZv-R%n@n0WL1;_TrT%>YQ8K4faMg)xQ#Yw$r zOpD8!N8Vqj^OUS%4mQwsr6v4yJ;A2;a=hfwMuq_9P01!23X2wrmRDH-L z`1Fa@dG5uMNp9vEtgpTd`t{~0D3Mseg{g7~c%0vV z9Irl+X(q9sKi>-QcmVs(1#J}Gfb}#jYWTA(S6L!SA$zon^xCuzs_hib=mx<14E1OgZJsj}oAL%?*7js1PJ%8X;$qHp@k1;OmzqY8z!b%ImfU@mw-F#W|$DSD{^!Msx+xrJQq7cYLEcs?ypEE8FPd3*~HE6whyV^*Nl2If;< zCXcDK8~g!_U^IgACXMxoNKw>)5~XC!&E?AtU&FAcWkhAmu{W#Me*3&aU(f3k z{+OjcLB6f&N?x*9QKri{P18ADlY878E-%F#vby9xCJ9im z^YPUCvj{I3_Z*nfixfa3DdwA-Vdj&@GClzzq5MJz9{MFpe)}{5JTLY&SJbhQ-<72Q zYv?2WFa>r88-R?JjBBHuB!-n1d%MZSty*T7QD!nlJ2p0RFWye)8RozesWG(3|f6!^W?p z=<-HGo(U;3IWysx*oOKynRH3o7L(iRHfhO^$&*6f9zX~i+ZrUJ-AVV_DDZ@!@>h}B zHYZ(PMV*;{__jyKPvGsjeHTeeCnb1?h5(Z|${<}hnTnd-qFaz^;=X-F3L0M^!8n}h zM#*mEvQoX2PuWi$-+Xd9S!Vvp+4-o(0>dT!xU^Tz32n4H8A;s%Bi*4VQ$xYhQdHI{ za(;FR3enqXFuAa9zcZ3}sbyNv)$MgtF>1D!qeJwZ+P9(tqO6;fqL&h)V`dwNEAJr13&kO?kJYZSFNJ{ssAYu8aL4)Ek}xe&u9odhh@ z&HRWu{q3vmWHm9L)SrInTB=$2y%JM79+ABl>kfMg+<(S-!_3#A2MNI@gg@~07X551 z8|FRuOJqz71#x~{4=MaLUt+5I)`so5g5Gt(d|9Gnl7g?k=zSFr1-R1?rMZg*ECluB zlqVY_$p)nUrqU1+R_ycqACf^yKUjd#*>PRIYw2q_QAu;_`HqL=_$k?;j8&d7eSl*Y_pxz#ZSbd|IV$)~0cX=*%mMcTGbY&O4NeB-0)=l5zQ^Wq!f0L9y~ z@%tk;01-R0|B2hXtp4_`?G>K{z` z{z}Aq_06zmD!MZ5@Mz|5)sKmGScQZ*mLkvGQ;>>hGlo2%d}^o32)crsTGl8{{@ggO zVU;4Q;mGXv3TedEe{{JWhps-pkni_{J(^cd*>$!7!S}ftqd?L7AQ_f-Rd~^5$<^{@ zFTY*PsKUdeya~^Fu3rNbePcGn_5Us*BOxU`~y=$_{{%2L&o zezI9=SD-X8fB5_2TMH8xm5tP!(Ux@V43@Bx25kuvHLAG!UK>053FP&OQ}GM3JkuqY z1NUE55FSi+Jn=>fcq2z2x^eMSM>F*dG>&XYBlU>L%sV)`mD`;bXe71<8As zreop1CFC7(e5C5p&1RKu$LTw$x6Vnk8+ia$P8JT`+llRFV@jjSPq#DjvECh#M8)=e zlTI*}ly?w+f})TP=AN4>`nDxE<Ek**J%z3?^r z&7pTp;h?C!HWF)fDp!9=Cw)(GC&YJS_pH()dn6U9n>g>ujndIs^z~?C1oaZ56X9XI zaDliL$5ddx%Rf39+J+Q!UR?5-2~wU5Roy#;RQeivZ!r5-=c&gIO2)uY*P~n4Y3!Yb z6!G<4H2B(1<90Ir7(qb1XIZsvTu+8wQwYQiEZEFwXy{qqcYt4Si%~><=pI5SN-2b1 zL1VD7h^FxMVd580Mjrh#UKmmzuy~=*ZZhPcB$?fn&r$h9XZoM}x+y-n|1hcyzBB^Q zmcAP8v5;{bUee&uHHqy$ZX!e1Z>5-L(=K}Nr1gMwj>6A|xJ2WVFU&9W)VlbUUUfE- z@$B=77<0+sOs$oR8@Lf%NzF=LLGA`K&UcKr8&x_Ymwk%F+G3VTM?Irm1{9-*68axl zOTc6a2C9qNDjem1?LljXZ9z5sx+2A$$qT0)yiDf-4MjeQ5w?=jD@-FBUlXj}tw9k!x!EqQAZrQDZek%aC-Bx(@$yw;i9xB0W? zvtSay^uQ8gc5DY>Nr)!I##34_-5-o3rNzsWvXg!o1qh#^#63Bb`CKWl#MxEh0O3(s z3`+E^KV{Q}%l|sAZ0%pbD%>y>?;r?0yah9b7se6FP4-eO?*6ce>~`Y?g{sZ4gk0Ba z17B?n^O$)d(iv;tPTojwdof{N+r#}!Bj$tJunJ<$9ogfsAqDM!tUwZu90H>v=sH`8 z?NI^bpkAlhd%9Izy%gP@swwf$86#D{f-CNJA6}4Tf8A+adHeo{0|2v`DTLN%q#%6p zygvA*rdWce;94_I91Zu9c~>7&Ha`-Ded=ppK^j;KyZ=T(Lpb5Xy~OjoXZD@rn!>_N zWFUvW6(P@n*xb`0*xTzSGfotvN?y+nkSWb;IQ~#Rj{A~(O0ZQ=g@nQ^Q9l=IW+tQP zmfyaH5qYX0xZo4Oy&!$~OPET6A@Ncm!14LuHr=F{3Y9As13y9?^Hq~+SqQ_gsgb#u za61}gs*We4gCS!nG@At|K;sIlV3e_d&;6Z8v4qxP$bGNEvAu)agCMlyMKRhSAJvVl z+*>e*8*mzo!5pAp1XGBk9G@NL)ra|qm8x!FCPp8HeVdq3P4rZ&O{xt%jDmqt78?dE zz+8g@Rkv#fNl!=S6*Q-9C{uc&#mJxsFZLB%7rvoJ2slZ!Z!u{uUj&1Ptx|nFTAKAI z*ta!~r1W_tl$q^4<@kg<>O~>E5Xp-RfG6M@)9B&_ml-)GJYW{XM2I%iwSxKF#+)~@Tv+;`>-HF>6{|R6sGxS$7le-04(x44wx0SIM zMaqnkZK6-tpT>H>U!9W?&-J$@OXuYxJ#A1((m(VZ&r#%G~(yg2toZ2 z7GJwUKH8;bm7*8 zC}lDSH4T)aT|^@gqFAp2VMnmOw`b?O4J|ZTEP2CTxUr)Td-%dP%Xls+*RWPGb9Gqx-QR?$r8=1q*} zog6;P8k8Se^Uf%rPVvv;PM&f1H=eJ3(fic-BkYLDqbK2 zQ3btjS`)%Za%yqF^Y@nD%(L}F6v*|x@@5AU<<(0{5?&LeD^)MVa90iekMO6zA~F7J zEpJPU_&p3Pz;g>!M&1c9wxY~l%-KTD!q=HHxURN>Yn~~=h=GI`RGUrkXX;?PUFU=1aa_bFn#KsS&Z+iv zwdgH`uH!i=^K5$h%h#^Qn0{W1*2-`8b_&6-j4hj_J1HQ zvbQN-J^4ZuT(4_Tuba`!$wrNXq=^g1I%@)CKBjY*_S$kjeAZ< zE=toOz3Ch!x}IHmmxT8$8Tqt$2rTZ=T9RV{do}H42K+w2K&7oDEK!eGn$W*Q|=$uk*g0c6pSPltaFuvo3=?gqcJ8b;C9yz zzCXER_qXkHn8{z$jz!$sqo)$8bIW-+|Cl4(hs#mdNawB^aEBi&S~xUuB-r-kU_oR2h9-F#DYGVt z?-IaXnxG>{GRjuu4>^Lxo)t@A420@K=>M*wb^XKdTjVT11+Q1OUy*je|2W6hC94aq z*$>dX;8o2OC9t*_RnsepjiK9>p{#!LF$6y^tU0tc;p?r-Zu6;U+qXTIf44`jDP&M@ zO$)OGuVb4+Un<3;&BlKGG8V2`Ksh@HocQQ}t$rp5@QW17S{+U)f3!!)F8AgUX$sQ8 zAsaPFz(V+LSU@?*0(vBsS^~Gpz9V8!%NJap;u`iZEM;ct!@ciDyJv4brInoHx>}5C z?&*|o$4$}^&*qVfJ|T=8s@m;`4$XfEEMFXYaV97>uPQcmdd#8E1hT+mZZP``_FkF3 zO3}PiHT5-LvzGFyh#D?#9~4fK(Txp=GIF+&$jsQM)p_ma_JdhOHKxnyVx3=jJ_q=8 zWs7eS%ouFSH=a_copEe#e8p}ftC*#~=ZgU^A~HaB!u9~|92fqF!z#0qc8s|Yai+C& zG@5C6yQ-3YvYE0c&3>#(*&4<}KGc5H+wP7!KEh~DM=oD~CC7OI52_Z#D|S3w9`2G= zNZlq~)N)h^M$UDl_0FNPBID4BKPv<+QxESC{oG%{v9+T{;KBLe=C^v&4pXwb)V8e) z65kLu^cwPfhrl;P$N0^5*Rbc}>rF!#NB_r-J?=O6$vwb!pKNCUlOpYc z(6Rla7MH ztauktbuGtx<@PGa%_PO^yA}n*DwJg^IEsooBa!oyRJWY%-ubA4K7^pF4Qa`K<-~Xv z{(MvJ#(Z9(5@`rOoPIZZPc-^{w)*2=(KWK;I6^7BRykn{EnE(U4`%J$Ef6xcz!KrG zTtDYG?rk%-UXI-M_ORqVF?P?tVMJ1EpS^oO5EVe->ROfo3kWhH#Pa)cK0gYCe6|fe z*S$BSjx{dY@IS9E(SDeE{7SH45~XG?glf!q4Eg-ywb06p%yw8QO8$gRDRJ^CpJH!C z*TXepvTewrBj3FqS`126_8SX8){6*;q#UIS81&+HgDVcTl+lErw)|D=hWuZ4XWlH? z{9YY;LDizMK0VvtKuW?j;q%erE(pup;G&4qIc}HHIVk$+XIrH;Ujc0H z3+-N0sYaVlZbi^#w!J+IJxwe5kJz>uS}Rua-XG2lb;WSM-v5)+p$oDO6(D_QZhQr@ z()4U4>AK{>*s3kPDmR$q`$a#E3YWPrhc{ghuG-|xiK&*g7&&==JSTtN!p$4JNq~?u zRaY9_V7gNmHP|gC?Bmo_ubJX+e5~Ac*sszjBgj=wO(Mv7v@vH#U{BCsUU1eW8${m{3q^1=*DhmtYRzg!I1F>_a&dr$3e!+(VmH`(@3K zCTy)&U-kLudfB-hMw7Vuth zn08hQX|xg=8})>^{5|0EWJIUQ@lLNS^V>d|xENdr!W%Z1LA}kWH0IOnMa9&Vg))Qw?Z3j^ZTaEb2T+~|3ZlCNe!0FoPmH@j|A3($J3Hh|3*7sb3+zNCtO~URPf{gZFd29lc-4Sg~ zSe4=5=HrgsI0`dzf8zOQ#prm==Z8f(`vMPmAKGJ?%3Jr6a}R2NZ1?VHV;D7rQHi}i zI{&rn4MmyiPI;HIk|)}<^=jhK%BydVai>BC%HPJ=UjBIL=8{?jxE4nS5N7CfX$ z7oMaRQ@rR0edu;K$-^Ywvo9A>nk0crRJe0o*ca}k^@Qt>SU@mOY2XK5MmU%882h-H z2-_%F7gP^ATzK`psCmvu=XNt+rwaLgxFxPHc{=`P&MyuoPaCNKw836O0$?$7Zvj8J zuo0Fmz-T5cz}J@qw*nTwwhm45eUw{q=jVU@V(IHw79eIr#qzF&%igl5X($Eh6T|yu zg;KwWgXs}3H+7KvvE2sf3y_`-DM()$4jkdgSN2jak z5*Pogcb6 zy1muz&yN;VV~3D;2S$mBEa*G4+Jk7YO{mhi1w{n-nrO}h>gDN=I_7+}Xh~V1vCHqb zt#@1~$PrJJyu{&MGrqG*cMPY(puWTV8DcYhbPIfiew7JS42}qW$9XL;;P(~61`FQv zon}-*(hZ-pCBg?5u=7uu2fjeiy3@x`9bB;i4M@=H2lw1YwpIQ+&p2zjjDht)_Y@C* zwub6`3|nHs`;0+q8Zo&>5* z*%k$E!O1pTiFk6$ZyBINAlbbFg8}S@pLHUFs9SIff;z%%oIMvQzfwy5ZR>tTqVw9! ziBQxPsiyfe2LZ+l%|!#|F4XOIwVN;eOw=f%qcQZW*p&dK6^GeF)r!gIrnF_nJyjIz z@9Q6EdZ4}kXU&sNC2ThbmXHG%YKROl8SdHHy0`gb!)e=XvgQX|#IGq^OtP%_K-Su~ zX`A&27V4>1qmNFcim>%#-r609zZHvx{3ZOqcjq48-4S%*S!#A`eeJlOb6%wFSf?WB zWl6axwC3QEoBX&DuEbYq^-*~{qboloRU%Dqtrfl@1nDm#u2OYZZV$h`)p6DM&8Lvz5~JY3{RD>}5G;$~^hT0zmapp&qprbtFmtj}U@XnZ zFQoZV6Mhd}E6S7qA$C%&(yaAf@iBV~t!I!OS%qN3`org}sil+V&u9j8OY&^$HPw!| z_~%Z`Zy76LHIh^JeQ0mg|;}4!obQ*1vC`bSd>cuY8a=9MZbk#3D+S13x& zo%q95OQtf^L5Bxcj$bPw@jq_^|QnIzJ~8ywW|5qc1~W7I0=cR!9I-` z9rXb9XcpjB&}2Xt30es(fO42Q%=0X*JnQ}(0++oOp{X^`}+AR~r zUx%L!m>5##eEU1r(>K^hGWq0nF9}u9}G7eW1_-hakL7@mmTQ9$Uowp|09E; zc;`PX{tqU$<}`xjPdp~ zU#-HNgxvK-*Z|!7N~RKy3`Hu;8(bW}WgP@T=?G!^=w8&73R)Aj8O0o%e7X<5h8|Qt z8o^A2cCf24Fi<0WFl~<4gS<@_?+i4R{y7h@su4Iga z8!o=a-rOiLi|;1YD)!~>6Jxj2UVq;mavc6LUp;r7DLS?KPd%>CBiw4nRB(G?bbt0W zw1(qFpqb@I+Y55_!^w|8uK~PY!>gbT-0t@*;QHtA$iP+C8T-dbRdK0(SFW2~-$Fjj z*PephW1UFy*-`#U{8sV@WK#00PeGFnLT*n21f|V#H*#uP$W7V+po1tEiW4rEC`+Ws2di-GOcvp!OvJI>-H?|Yn_Qia@>|)Czx7LcL#;ZwioY_PKh#p=c=wvs zUvzxom)h|w2|{wV`?f$AT&-p_MhV+9n!AFaHkS4kkaKK{usudf zRdt&v`oKh!@*KLO^XyXbjWjI9Vc`d0XD0GjX8Q#J(z~>w)jANgg+fe1OV*b6%_x$U z`&j_slIPszcI2g0(5(Qg!`+u_wCCPk)ac_nI2^|job(L`D#7U@$^8Wlm`W1t{VH{6 zoJ59iXppYwm()myyjj>P3rOM$TcNd`&OSZL@U`|QG z;}O2dIoTaeUd#l7t2Ds2+i+_rIigVb=F>HYYy(-|fTc z!Y7%$LWDF>C2gGsIVyQ4Z8Lh9N66EQIpQgF#oLcM$MhClN=IIdzk+?tIzMK4eEAQV zI`xDc#DAw>e*L7ZG7sVC(rIMju7a-)M1vlL2skNo%BFf*>0aCWmuI5Xe$+5|HEB{` z@Z@ud_p<}oT4wDFlRG{uW-sHSP8_*AVJcI_Xk2OVb~JtPf>Y@%$DXst`y&FM&{WZa z6IkCoTk1sZgat3a_>t zjfoiCxB~@7#?`iGoF%9A;MoTWmA2dq&%~N3PQH754I`13m!A|i=*DyijdSURW8kA6W-a(6tquFYm3yiTdqy)|Tj3%4Xg)Dawkl<}Pk)^vU`9 zrrnh1;o%}3{Z*mIB@9%xyd@Yw5a1e&80}+7Su`|K#1jhZ8>fD%kS?{f#oB(yyb+nW z(=q`wL26j_{7Oq}_vUDHxhM5n85cw;9hw+F{*NOj|KZ~Q9~S?IuK4Q!@wc=z?OzBE zw3k7yw2`icS^JypTRzD?CSGo9hUtqAAGqjJrkar7hw~UHxa=QH8g_IYKQt{Bx^yZ) zo;IBFBJ!nj2L?yKo&5&dWgl&SPn>(|tMTbfTk#oZtM7)}c2lV&+hX7lRYSN6CCt z@^mPlH}g}$N*b4s;pk&7Q$-N9DZcpp!|V?pGXRUo$I_)o$&Z-dV9|K79}v2^n(LP% z`0UWJ@W6T(S~#_Y1;j(0)$NMehc0MrkpC{30n9YW)jO~qDz-iWi}zjP;%dlLVtQ@jchh67w`HIlC+J3j%nS1(S>SA zzwV=)sWIgK^o(e|!B=Ax<~H?({vE6&BcX-^ET*Y4hjG&AQP34B(5|rpGuUDQ0iUT( zaqBybG6@}UY}aTUq5;3YM5(o7^3zSpv&mU*=RUVK=7Co?sJA^viEj8D$ZMJh9WDT| z-4Yn}`ZpwGw5&{R_|c^zz2(G)or;OoMh@9tQQ|67Udjhdi!>B}TzFdT7adNv#(`?EUfWzMn$c-|_Db^RJZiQl$0C8=WvI4f zIexlxy)p-~aiQa=PdY`hujTu2Y@KRz7TdT+^`9d!yGO9is0WSDGw|UMC{t(%RSEU< z9c=dvlYKG;5{Rp>(KbHtoe_&}H^Yh5QCd#a)U}WG3!h{kVSAYk(8-5Y>LW&0=P|m` z9J7hK+9QB1)2vLhq4^Wa-LKoLn@*qS#ahr?X`2oDyX9Fx)GP$d3kfmbb;_*}a9yLRc%f!&rHM3I zW^sslS1K_8+}34d0Cvbxs3H?(Dv?q^PshI3B#l4;)<3c2hofa+kV$Umq{0G18uHrs z*MLXhgE-Atth+5QN&>lQ4aIERJ0)<`8~Qw`gl${ML1MtG_KOKA%5bJ&AeaJ$5+EVx zEnZN=gNB=H%HKb|<<3Q80lsR1ePIibO}9A;YQ*<(w2@{vJ|0T(UrNlsj)ao7xnzrF6|DZ4et1R%V{!>@lLlR5<{TzzVv-+hFFrjkP2nwQq> zjb6L^)1Jysu~EY5qDG{xE+nX2vti){*(l+R)J_FZkA5*ZsDyqAjOg4yc_nwiY46LF zLjeKvH%4Dv=HF*|{@Z@O*AA)JnHo?jJIzE2GnTIoR?@Dag`j_&px!P@IlW~*b*n(s zdp_0`2_{~t{q`}yZ7PGx*Cvj*et6HmE1MFcnsGQnTmjiqljnkk|nm{uiupQ z(uZQoe#Rjc@WB;eSFAs;ZZ{HswBu!;4%T$y~^0Xj@Q9_bP ziz247#b7Lvb#5uiIz^$BNwSpe%am>GQb`h%bw;D?%%E{Ii|@zteS2T;^Ys3X?;qda zar}F^0K6*XMJc*L9ue$>axEN+h12lq~nUu+#FINr_?K^;5FPc++&O!nnwk z9;)oif56U57}_J{AZ!ErjJJv0c&1w2Bg~x~52N@O-TK!Rkf%!RJqfjBl|=*=2P-;p z))Sf_Ar9snW?hgV!|-7sHjUbwo0>lS$$7>=$#?o-OS0gNCwF7MD#b@zj@$U7o3e=o z95H4(wcC{VAk{^U6_Ro}%B?sY-}rq=lB*W%X{@>&?NiO%WPgn0)i0S{$)-Sf4P!+#Y?bHDf%@jOe~d!gGc}?Jz056 zkkB9h*}cHwRmODko+6tsmX3$!{kqEG(#a`ISqBUn;VVB~49?~W2Qm~e#mTQOV0Tnx zd~l`sNOr~YY&G0@s^#UB$&!B~elBf5NthpeW>ART%VdG$t0mlnm|7H}N}Y)d;~Yxu(@kgL#QM9fYP`L~UA_9#JJR1K z>1q1g?UW8gRfg);abJRdJ0Xl(Kpr2Wqq=X>P1~*foNBCG%VGwi`FAD%QE+%wfqA=` ziqf7Pmo^%iANz>qq>*tDtOcwrg4xb~?6YMILTm{#%vR*d^Vp`kD#_PawVhpssqVOE zB0fHfo9n}#Tv6V-C0fp0Xv~r$TMpKCKQpf}XI~AGads+%Ed7IVG80TEAUUGU z5i=={h;yk7G{v2`&8}rRE~tpwoao=u?51e*PB@nO-cvg^YubNjD1LXFwkbE;=|$aOS&u=+$g}}2(DjE`-Y!z4 z_`8^nGv%SgtUp>L>rFh}Yv>*uE}T3pboa2_+N&$9mX5$_h+v7f17(;Axi}fEa^wqU zf=|0ns>gW^m)Jnc1sFD<;eV1nHbJy*Q9=o{l>Xkc;(el29W?KE#XOpPR=$V&zOjYc zK)N2l?aZqs!WzH^1;fy%hD>vx_g#5^!SuU^onv`c?uYBs%%bZ|x4wR|Pu4$Vi@)TH z+Yx!yD0maVfidV(3imNJ7Mc~^$mQi#li|&l9N>Y_#C_Zp1I?Z!>Y=LcFH5rjB6O>Q z{Z|P!f5F$0Sr-Nt5$y(C{D|cMjw3n7JDJ9k2Oy#q$$O+WHg|lPDD=P0IJD3TrLFu} zvp1)uq?Ns+v$*YEMjnSK-}1nbq?`-_OBYnS_Dhwn>@%B}dzM$JW323^oTBRP_Q^91 zVa>hto#<=5_j=d-gu%RNERM&FdR;FiN==Q={A~6ls!Lp$qZ22JAV;q z!Igi$7aYi06{7T3d8kGbzfJjuU4qYNwf#0`7Pr@$=!BJ~@jZ-;&0e=-AM0#%0lS1} zaF)kb*u}`a9ppdYW>U>l&nIFe{W-TcGH$U=PZOb-Nka= zLbTUph8rc6e5Ex8Ed~@#_DC831xyoK&dLvcm{FP^>(H*|BUNvY$zVPDsI@_SDEy;= z!}}9mSNJ%gl!g64XBm@G;GS@}Ne~Tm(n!jUZW~QdlJGYANk)IUkF%qF$6&j9&I)gZ z$737k+nZPKynK7*$0jEO(KkhQJP`=onCq||O|2nEnNHwHs5EZ0B-nr2tyo^f$Ow~Y zdEVkFzA|Pi*PVXbI_XS^>1$HV#SkT@=wdhSEshsAscJR8t(zF~(=2-9@zJ3HQp5xY zliE0b)YGNYm!eVHUKWdLmNwh6gLXWNYi=$y&1B%{mW{+UydF%cSv9Jg_Yo})lh9J{C2$e3-2@g|L|n=NrRPaX2|E~b2hDJs;-sq4P~6ZG zB=?XlW#Z>=@*hCb0y{zeD`$ZYc2N>Dj~CHCHusqf=C8Cc%(N!H2gUMMPzTK2gTV;= z!t$Q!KPi>}KkPFVoAybc;Po@cMHR_rk48l{n`8&yKEL5hRswpDjb`ehM6bfZ)u9LS zrU7d?Gz_Xa3(;PoS3|fdQH~b3*r!sh3BQk66U91Mi!qX1=dHgX{jmDpH#|U zf-M9MT5>(q`6HNWG+WRGwcuNs*E7li^Szrm=(`An09q2sENG;gMaKQ^`2O2Ljj4J7 z|1RE!`R6__!>`C+3>wb=g}@q==E!CX=8!n+tZA!#@#pGNd*4i3x=aQeP7oE@JrVtZ zrDg$K7q~zwTeG%xeO>BBBjBz0oS5{u_FM;ASj4&Ht9;UJ=$>^-!;Bc3R%q8j1Bk)dq;O zI|SDCu4}+{;&T=eo3e=ugNuj-k*CN86s$4FGf!k7c{NtyyeD~B7GTOl|5zZie=X48 zsuUH58c+D_B0}-{L;=uC?4e`0;+d4Gbi5!aURRL^-MOXc@gLe)aKKz!KyYW5{lWad zyqNyOQp}8imP9?ANK?B>m4mKOBQO%`fu=%r3ucYh&bXf{^Yqf5=Rg^rB zM$^j61y41rv#A3_aX(yRib5gt`pptiH*4cBPfd~!_3W?+47_8{7k55Ay71uMyJzp; zJ^Xe*-%Jj}InvL_^&MUQplb#PyW$wo&g#tJrqHkUwoI%r~AcSlH;A*cI zxov*Q6Y~1Q=p}u1;9XNZDaf#*w4J9gMwyE@a$CL8=L=zfy)gZ3M8tLFn3q~w6PP$O z!<{`(WEkXiaY@gK%uPv-du}vvKQ-!DrYQ`H>!FJGF9RD(Ma1$iNn$qicIOc94Vo8< zJ(ABcQyo;;_(i$>nRxHk;v5Ns&~T4iFDJEEr|jzvK}-Kyz2(~rK%SdU>cJ+K;855a zv~FVpaa)R;n~yaZVXfX4qmFHf-;AoIF_4==#qd+W;o&bXPna7J<4E4TEZL2~)*@^K z;)*A_TMAyRt95fp3Cz0>K^M%(|w`6AWL+*OJz2-U*VvzWGp+ zaXO}`SZwp#eMX8hUwD)1)p^4fK#t=B;PEJ#VUGKH9^ek}Ru@2wmX{O7x;cO}4V(TL zD-%9klfpg`zcK9A@s(D_`{F$AQO26a)7jT}Z_y;_Tj+rU-1w@^!~F*ek6Nba=+c67 zziJ-#aoYAi*-?vKbTquXDnIWnuA9UY4rcS=zoe)E`b{0MJDeJDs(E<-5$plnp4kl|VK(V*nil1UM=KgM^hcTb^RBVoIU9DD=E<)gIWc=^R7N z{xL4UYMP?utao==Ib5b~eo~@YDtC zkOE^5{Ci!NfT3d2TRL%xN0C@jrYf(_Y9o;H|(NE1&uS)kyIW8nf{{CGpiyt7XV#GUy34L!GzV z$QF1VlR?l3dfe~oG5)DUY6jGS8LH3cp9E%&8hK*k0UgkN8)*$0EZj+0D46fu`Przk zE9RFRd(KwexG^UvtULb{*%P^}d$QcD?a#-p9ppht??uE#Q0g33PrXQu{&{Q`Ei_uz z`_jgBeCTl&?Vg-#Ju-JYKQoahR=J3{zm)^(?)-D9i-=5YH@7OU{@39q{;$LBZ;*Ty zM-=P{(Dv_RyFy(b{3wfvqa#1rBfksz5Onab+11kZSBvr2b1FZm-F7S;ZX(*1D2NIt zmner6W8_Bk{)p5$*Rd_Gmn=AuS^cR01SGecFoiJ&gs6{naHBUuE@odlK9+!cb%Xm% zy_Ij|t~`^Y&16F2u)+OnB$9KK?MPdSrm?u`jz&$sHcOtUBHI$*=(-;Vs|<}#`A5i!N+ zXtPE&p{tryp{lJ%Tegy-t7QAp;p$hvyPt?*nX6{_9@sTqJuMf^d^DfNTbBo`QOEgb zV6$_Kp^1kKUh6%Fm-Bc@W`%j)X2o)wh2SoOk3-4Vrt@XYPXdjW=Kn%(^kM=C7r_y3 zgzip1qXsk|Pe-?at;4ZMG^o1chxvwovW=klp>ujm(r){fC-v^|I=;OX)iDJ#kz;=j z3a9=Y6s~X5*j4hNZ*6y)dwG`FbI9Mbgy1VM_Y~O|@PCTfzo2LebWx}Qn%`Qr6-4FP zA>N$;1SjNoFejTS^xFXbyMxtl0W^NWk_Lz=**wFk9y{JgyGHVYvKi=29$)si{}rq7%gKZjR=T3YgDNU9e>zb6s{pTaP_jB3Gvq*jDU9Y8h|M`d!h zrN~r%vNhL%@}E37&-Or;Kzi5Ag=Xd!5n>U5%fcVDeIBpOdy8KSKahaN+$+}6lY3xf+1o+`A3VvFpguQdG;wfT%xw9QoGZKl=p_E?YVL(6FQNHcj$gE0(#p{ z5)ef-`#WqgUHx?L!L{$IXE((P>psi;K}JlHY2AP}5+0sw3%bq$3R*Dw+93G}jVwLN za?SPcefA?T{d9_lv_gjvN2{Ghg#k3%*24DZod3K6da0m()0CNn(W_;u&JnN!C8qOPHER9YzINDt5#16JN$D7el{YlbA zwdHWkoTRgL8Xhw*3(bWR(_Mzi3@-|2{V5-rSyW{I9tvL8B~DIMP0G*dLjGNafhTTT z!#t^b`SehgUo3}+pw|wom~q6BbhSk3x;z4puj+O3q_u9PotszJEa`QE7Mb~uU0w%R z)YPci`pydFtR9yHui*Dl#&Leh!_0)!^Pg7!^gu~2A_f!SL|%<0abfcq`Nv;NnpwU- zr!@VGhvLMMX043Jj)PG%6_x%f0}c@B_p+=8Pj6!A|ri*rx7VPAe&OwlWkolun3KQKUwztCpl5 zR1<&;a$@I&kPA^0Lf^R5(aAwZNc;Y|*@li53M$eAEIA)o@+sJFh$BU4T0|(&+o_C*G%$6AdR{r`u5eJJq#Y@G-ghJl(foo@~}Efnj@~l z6JdWdgO#Ul;I|C(4#H7rFvVNXF=IBS1H)%);)$Eb)UsUe_B0*L$*Cx;kF=%w37<9O zzI^#|JO6Cqzm2-UV+VHrEf9@r;TsnbC7mVgBYr5}D&+xH@7hwR(4aDG zFwK-H-)rKhZQ??D|+0M0;6*-}}tFS`P(MW)QLGu}T1Nk!W{RM|o)jB^F z78V$OYSw^Bur``)1pBfZDflg&>dop;PBsoZYgmO=<$3zG`uI6UUY!sa2tCqPCv0FC zW65#^&J8I{+?~_4x)NVFmRq0nKPz*1PI2t475BV;;I>BmJ5m_ld25hcj1aKS?*#Og zf!Tf;AdPn7J|i=FTp&6qB_u2xQDBwR(|Htny=n$$9~{LP2y2n#)ZtrfwYVW<2OUjTIyVivOb~&S z8`tAoR!kk+sJ@7Z#7!3G$5~sCZhYy7mp_h8a&7Aui`k;6US}P4E9oIWWb6%7j$5TY$8#Hu8fD98|7vo-6ztQf{(cQB>Nx8J$ME|3Ai*|pX+;>k;-uYDyR=-W# zIHNfYj(jJ|HomPOn$&r|=WALh@|y~fDnEzY*_(J2V7#Tx5djb}!q4P9qcnoOdn5q5 zv%1uFb9t=11#<0?8LLsLdn30$+XcG22}rdSm5WSn+<(qdV4-zfnhCT=wGg=HMH=A@ z(V7&cj#*T9K<89_Kx}31*k`O&X>y=cm>9?HWp96RqI5`&YpLkYy++9R)tB}BK8NVm z!2rz&fRa7bnd3O41V039w}a28hkV}q;cE}25f}U-C6e$+j4&L<6UzcGJ7ViX_@)+) zM|9|-MyD1LYW922EbL__ebQ$7E_tbPtPTr)UdXTl$b-Qw(#`Rjkt<|Mv-ok?x zVOC?t_tNcd&b=GzCZ|3E&1G9|6i^qF86MI=Z2Jdn!aBjwY$Al&A{nhWCw`O^63rOg z$&$cAY=rxT=W$#&x-V75Ze12X|6_ZuKG1)>10SRsZYM?&8RlZwz_ttkN?}?3HeY^@ zinf>WX4Vy;gBJu$E8xjo7p^`fg`c4tO%T{e;rQzd@3Arh346fZ z&O6&~O|~eH*gB(h<_vJeBuTytIsktAOJ4gq%qqyq4!ALGO&~F4S$ErgDg%!&cww)S z>`RMEi#C?rzrK?7`2c--!d>-J`NQvLV@U7#3(l+j90THi)WB4?6HO=va>7WvNH3g= zr{}C^AFeF_JQ%C;)vZKWq2Dpo*zSQ85P3RZ?Oj8o+z&d$jntLkXaQL&AvPg#q3T7h zpMDL27W{{c=DL>E8vFVT{JlN0HXljUL<(&Gp>f_~d))Tah?U#&C%w0~CVbj)6{Di`W0QUIg$?&LRz0>HoZ}n}q|b2`2u(=N>QCr- zQ%o@kj7C7n98UvfTGtJ2y%a6DjSfWte<8;&)j_ z(~;3f*1(%C#W22(Dhs(otHHnQAXdjXVpd~dqi+d`-{dVZz?&o&h(5&*S%gjpV)h-% z6-hZj6Ml6xH&)NU7eiUt&d<=Nsd3g*n^FY8TSWw2WBSpl@jmlT#=r$fpOMd5r)cNp70dA+}1u~8UG1%3RBuDy1&;gkE>?=&DTlk>r z24%STGW)vvj!*-%o<6kFT03{n0-5d$KI~99=b#!-n* z)R=Yk)EG0UG~})QH~~Ljt>>>z_Z==EwZH1TaBT0fO{K@^YX-$yNXnG~B>+Wx(m_L6 zGa3)P>@I0rvaN&kUr+NSF9IW>Lc)m)iVhtW#typA@3wfa-TJ}mqWCUmc9`Lt1QGM1 z9?qjBcKKIJ`rLQ~dkegU&LV^V;Q}WPS$C91rSaIlWpa@2Qs+dwT_LJ$I{Z zVY<`R=ki79RTR4R0H**Cz#q5;cmd8p2(TA84;=kZ`fL5(|0LiG^$r1UL*H`)+<^e- zJ0{Sbtr1)y*aGkYTmW@I6@oQ^!_cL5y)$?K zDAxr5zWP7!DIWs>VSWJUslVlX+xhq5wrF$PO^CWy3jsjD9sqWKgudhGfAgs3@1Jw* zJOKdQGi>(S0f?kh0f70C&8FwD+00x3;G6=0w?6E*fbb5EFpk@t9Q%Q7!W^8!9PADN z2CWn~$M5a;fuKJSVRCVA=h?x_#}9R=-UV#q;N;xK#mUXh1<@2V0z|l6!rUVJj+kuU zZR5*_hJDitKTtZSxTJeCA^1(w|+B&+&j_aK~Wol-A z+TzT`OP6i!Aaq@BxZZSg_we)&2)q*%9CA0}L1a{POl(|A>f^NZjLaulIk|cH1%FS8Xg%P8~-#xAd%-jfBE|D`}_iRb#478Z3FzZxrG;W zn*Klw`uhiF|Adz?gx5AME>13Pmv`C87E!2L;>|aAH{QnbXe?#m~ye5H@&Nj3r4$;kl` z6Q?i$2UslSoH*cLy$2KMS!>aaxSoeT?QtyBV!I~ zdE=?3uD)v1Be8rE2f3U0R{K?4y!^WIr(-U2J+phlddCK;cp~AR#0lJ6Ocm~a537$l z7U^92_I|Bo3AOtwrNVJ)A;|7-awJ0+>Fx5`>1zIP&j5_3{cN?>v!_*nQS%Nn z_L&XbVC|r|MYqU;`j!;f19GrdzZ^kD|5A#*lAq`y;h;VhgA^T}_dnjhzkMae;)P&A z++52(uuCI4n{x~mYV`aSk~e3<8a1Y8Re23D6(jGlQ>UhPt>573oo?yXC1Y9S+EJF= zD2ceKJCMW%Kx0q%oH4BAv0XYt0nEWl8i~(iMFW_e4is>7U&zHXRPNOIhG&Yhsji(R z-2tkdw>jl5MSVy9S_P-+b|?|%%d#p=JlX(^r~1!s#H$;rDz)* z4IJ$l>+|(O+-$M7c(1uq?0OtnYz*57{+Ncm;*YK z#VD_@5~tJ%3l`!}T~HafJ}5kzJ{uIjC)-1l*Jktsf0v1ZN7`P}#t&b$2{+l6Zec`yp?q&m0Mw-EhZX+%5 zDW%eynb{=cMrK}gqWIuF3J7O6bNcxA7r>&BR>T8?bblJu8 z;8U74=uK`6u6|{Ag))}$>K9tRf$md=_o`01t?@(8A~1tVy?TK0fWsKzoaa-{x%bZ( zoc;0NJFY6fY$0OIN4I0k2bMY50Czm|VGGA1oS$(-)kq_w+enGpQM2h(UHzfZ+qodu zfqyYZt=GHsCg2-fu8C8UN&S-6NYag>>Trd#CUp zg!;C7FF2^U<$5;2^_7BO#?h_O1Moct-a*nHaIV1SiwVmBJHVWhfea$8sV7 zUw*~$tykVilJB*t9M0WWu|MC}X=23Pw~Z1b4D6`#v;M(6bEU^_VOLJXP?e-|Gecs5@cfy0vH5&b_VS)E5!u{?3h-MOi>3 zpcI_ZDJ{{hu?y7iO5b!#Vkt8&4mJh7@C*_*?8il`X)PnpjQEJ~-;qQXW8WC0a?~9E zY?AG$>S6n;&RMyz1kHt%+pG6O1tGn-)8R;^N2Lsep-i~iH^cO}K zRv`0RMoO!g4qrbE*tjcdnu}F`$+OVZ$Q-Dz-R9z|O>4nZ3Q5UvO@TQmYpQN^)$+*> zv`qNwq{YY&@0|1>U9!ezwXxnui-OZh*ArcLm{DHn7?)zXL5((;AZlMe0}f*H3GR2r zW07J>*upC((rGp6ANM9H?~OWKw8t+e^3-`TV_@fbo=3r0+8JgV${RNwjO)VeY&uxH zknzK{zNvZ8%SZiy|7c$NY5VEqVi9CL=tpsx-DsT*Ew+Au79DI-5nEH4DoA$ryA$5?Jc6fs87xd|Ba!Ne9>DIwctkV5G1LYU zSvpiL5jJplWZK+~?;wjD_9T4s#z&rY9#hft9RJ3}!yfwgCQr2{TqNIx|RqiiR%2d1?dvlB+rWe8`?N<=H2s92DLh57Y`ebt-((p4at z+WT%Q0e03lgRzH$dWx|ZS_N&^$7_e|4Jt!O(Ssa3Tx`JS>dAa>HgG?z7?y~Bz6W_9Uhi@#_ zE;(FHT@e08`0{ubt?FtmPkJv+}+v&FtbtKb3!pj>P8%cUICWh8map$ z6tXTz+M~yX16?)SP6t0O_IY?H^7<{zaY(EVeA?`D0Igu1m?R?uYInj5C%1FduMv3* za(ngiKVUry9nS`QPxvUjXZULDwXbu%&JxdD;ttAsk9imy4wH2mVm!3#pj*zujMA9n zrN*JEew7Y~D&3kpy;{-_(7Ur{hz>~|zh1kgj3FP#{Kl1SJnysGFv~nh;in~2%$Iiy z#ih2{-c5fJI@|32UAj5F*qero4;?6X@Knw}srQhUF}9kZ^MzPGs$gfz;28_Re_AB_ zw&No3d@NxnWcH2`1Aq61(X_(EWev4JHHo(^lH)GpfyMj*j{JR&9&UA&(eE8;#2~)? zeOfuk9;3Th@9=VBP=cX15R6qJj=b!1ko7b%s(K$+#HmoxZ%j3NB3Dg%x)^5m!TE9a*rlukY#{Js8vK5l(wuJx(mDc? z=LSwxPe!tQ8$peQJFwDN(KTZ+Y4quwJ113xC9uH;;=YkqmX+vdE$IWGJsXfSaD6?| zw^-~UY;4~L@>^Svz26(h7_ZAcQck$rE!l2a0(dhGY_a6VB6F^eOF``@+}LFRLwPW@L^% zd9p8Vy6{Qq@=M;GzVcqCGZUL-^~o}ppM#IuVf*VMT+`Y^YLE@2BQmldaUndHWG6*A zR?Qi^8!tz6vVn4;``Rj{Zk;U$lW1+XHlsWEO+3gl`MO6B>ZO$f@^fDkYYx$ z@}1ym&q|Kg#sa~2Fgu+!)kV4OD3# z5B{cksq(@+W*5Zq^W=o%t)jazLa2k}Z{=Vhq(80&`(IA!^hNn?KjTjDx*MY=miUpZ z-;aM{<4YoIKdDSg^Vs*lQPpK5s}@F`M;?m~wQ>~<|~ zfv;u2`y*{nZ^8n|rSn+I1>A&dnRgXldS)S8cmzhmGSvF|to$t-Yf{fq8fqpAn*)T?z^vL%G}JnG?;&n-Ii?wtvj$d1o;(cl2>5;F_E&-`_=WU!D) zbH-K5REr?KPG^_mdzReOCtB%sr|etWtl@5g@;nb;tX&hpVOq5yyS?9R?c!L|kvs(G zXggxGN2x95r@-zDP1RX_ZG$?X>QY9(yZ6lYuLp?JqFE?h4BaL{u$w?6lJQa4I)yTcSU-f}$>M<;Wm} z080Txb_{sWs#vL*R8tS6jFnrF=_uan#51AWTgxy9T*gFJS64iz+&4YjdNzX66V9!Q**q5K;sco6 zIW7F-_}P3!gepwd0Y(SqRG4z*&B@mrmR^9?nFKCVx$2Pd>+)kf2IqO2>{eF_(7nV;1Vhx9#Xm?t?}#2j^A4fHNGlJ}JQVB5Qnl*Pz`D4ZZ+3BE zPTAW+l1z6l*za(zOISmU2vqksf94Hz+utV|C*`!m)z$f-i4@na+d}zh$a-!SuB1xL ztt{8mEqmA4K$|JG{SsvaQf&tut@#M8Zk$Cwu+6{WPZ~>aZZKr5ACni@vZ5Lwhiy`UXR3{q7|`jlYz6~+)_11#R>a|54LSiHH^h`GYH6++*fH!ZTz z-Oak5G7yI{5w9=2W>R7;p6(3~^WF2vbZ-OUO!;rTt^F8RF~%S?u`$+OD)#_GWaAtt zK#J4|rG}CvqEP#!H59Y$KaaQoLGRNK8pFznl(X<1p4R|KIC!H6W_ZUQc8BJpj#HXT z+r;>6-PfPGKDq^bpO9@yOp4 zSlc_eqLVrEb`G5#xBF!CtdA--S!EJ&EV3)X6+J_T%7_DRCe)8(6Y^8=Fuw)Ul|0_p+skYaM`kJLRyrD(aE(XUk!mr z#xNK30KV2do~6&QK}6o|e(M{H74ng{SNG8t5}QxIL%4A#T$9q1F_uw#%TlZ4!cos8 zx5RiU;mf@67ut*u=nibvC~g@tsJRQN@COVS&dC9#3QAGttSH!s^nso(ZKm8dnZ@xZq0I{GiKtqQ)CrgoT`naE2IJbx>2b1O`jtUSWTX-_|c8yB10oz?0xEd8Q=HLI) zf2zcD>e~)!J;zu*H5>PKZmz6zN@>+oebiG}DZj16Fb1~`d`{no?n6jvC5yRZMOd)! zdL`G6y{Q>u7_YeSSr<*%9}Y!^7RQXeQ@bclM~|M3hMR5y0vRUBq30NiCdzQ zgyM~4n9*oe$mM(kyIXFE_Ce{9_B7mhRK(AamFwbxwlvs$($lb3;Mc=jE+&r{_f+Ow znyE@m{te1&s@NHSyhsVKjugoIk*w^u*uGCNNgpvD7fJe`xwu(1TOO zUyk$N%hmp62oXylGXpdG8e6T~N!%8^LBh4O0si3Pw``ztC7Gc%x6E^*X56T?IJm{p zM5_7z%<54$SDHO)xxnt%EatJr-W|kYQ&EmzbgBz&o+{LO0IVzy9-kdg)|TB(N(IAI zaR%^0^Nj@BM`1A{G*7AN4eAdhLjF3KA47OopZoD_?0#v?iw|cfxmDl6s5; zo!o7&DK)jcX|g>UJ7llR<&>bBLk8)OG7ApZ?XinPo&ID0F}w1>*dlvJq>w}ytVmTXQ(?9Q?`X0O6^leiOQgMYKu;@J2pM&U`uyC4!A9=8~dvP4nA)QqTV z_@2ehbCojFPrV(+Pt^?9lx+H>dKh@fR+lcQAK(e~QLM01N<{HOd$@1#3$?72lG{Ba zG^RMpu*#nTeY!jJF41TW@aQ>0Lt0+SmHMn73&v6}(%!vtiHLk5)a?uEnX~v*r~@=p zW`Y|iM%Q+iUdrAJCVCi1*T$Bp`egN;_}JYW(DidyyV&T*1Cm{o!OpLitGbW7=Y&9Q zezI;Wd=d|Fb~60aQQAw&*rT~jBf;P-{Y68SYn4%~X)kTFl+_P50`D3!;;6o6eyh2M z){nt+F_f#aZY;i&b8t{eqkAACn;$eYa8io@`BXz7_yU}#*YB05HHn@kGQFTn%hCC5 zVNk|j^dxYmbW~K3g11;{+$&w%lKHqrdCDpWd9pn#!LR1wfJe!jck{#dLo!!( ze0Ho+l+S_OL&K&R_?B!#Vmv}j+}VJ0a*`^?A-}>2Ig{2sSAX)9!dWmIx)mE3j7Qyu z`UPgN0fqBCD?i0RPBtL)idn!0zIV19$ILeLv4Iq2HV{369>%O+C+@*hoLt#JuP6td zX^MGjz1$1oaR}22Sx>GS;Gyl!WEfYl^;HVy!AeOLwu+$v#(I_Yv`vT=MECe>=U(;S zFR8fWON50?whH|jMALrg35*EFCwZdV8YEFq&ThoE2zW|_n$zrJxs0c_y=Mu;%Hz+_yoJ}I!e zt1zs{8u@ZwvmjZn*lXjWwdxTQ!=-^VMee@Ilh~QPuupbNCn=3rKzaIJls0Hc_IB_N zwWoAPdujFCov*J))|UmUxZCRgQg|{k@oZYPv7)2s9jy}xv-~H=8_!l~;lGt$A<m#+_X8$HP(PIrCW=4u-?V}4O`PX-q%ckG_g9cWSfkyuI!x>F7qhu5MI zWJHzySt0>#R85D){5ax&c>0y&Y{>1M-ZsfUorUhwuj3yHfd`@)VlWoJP#~QTr3WS# zqu*tXcR}pdQx8?qI%ny-XZ|+QZlU(5is6Uneq8>Q#VTe;?pI5c-A2#*g2(vVt^rQi zs_~^x>NgTDgH=PLx2}W~2(5TERb^Yz@21G_InT2$V2YM!K>m}61jqzRz>8>LD!f@b z^P6IuI=$XaC!LGj2X=4Rh0?EF=L*`_vw<7LMq+A+OGxTRb2h+tkvtxOx_Xl&VLtAq zaV0x*lIz3UZwW4Ysd2z2I?mWXTu<8JUyh}2#av&$ns>N{6EP`vG!1yvlalj3j&vj8 zhdIan_Jf~=dko?zFbP%?6ZH?Fp_ty2W5H$%a%1-P;ARSk;4;c^M zwQ}B;e3WHh5l3f1mafszI((vKfcD0B(wdB4DkbNGY8Pv;Iq0ncVtgkXi4W@YWF7g#HEMyJ#-ZaaLA|G|;YctcuBVs@76pCHP81o*$}Cz4Q6hvy7mdLAULD zuUo9CnbS@)Gk)q%^VrmZm=_8x$?+RhqsJdVnFvh;J~0vT6pl$Vu73#2zL@SyKG1Zu z9Z#{+n1H{nHIhgrr9UYGuL<#iUG(mUlO7GFtL;Ih3&!#FxKov9eB>WL`=yGih6fsx z?-_08;N{etlziz2&?E3lHt<%3NHFgl9+B=hn+)Ttb56e; zTB>qZ!usxsjRmee{BjQC{Qd7e#GG3J2bE5Y$8iJP#CZ46uT<08_N*eJkM7yJs*KF; zAlXZI$<42u>}aW}@0ia~VH!`g98t$#Kc~$F^u=3*Bn0`5nwKeau6|<)KzhgHgQ#t6 z;EfuQ_3XzYtqs2$I>b}NUner&YS6b$vw`^!Kk#14obOrkC~@#OHGF`sPbNO7@)ezo zoc!WR6W{2q9ro_kjb^{K z_#;ZHpv|UXW+zuZCASvBDs_`sYAEqbY~WH0FSRAtvs|#1d%kHlG!>#E!F-7AWiyU` zqxmsgP~P66h}*<2mh2G9_6BE;!G_$)gmv}pq!E9_M_Ex021{rMB(&aRcW!>KMcZ~&exE2B_X*I(%puiw4@n;^IsqX`7u~J%LXK# z)R_)e_wj#K8uo7b;lG?PKJ=>>*J~Yzr;M?( z#t@SyW%SdJqlt1yq9j|s)Fv`?^MVWCbLLq19gi}}jvVn>m&%ia45x@EM!PXRuuj-E zBQ<-|4Scm%bt(Ua$3nlp(KN^6x?7f#&j3)g1NUu>B_{=`kQJcgD$0i$g(2;)OlIE9 zpH1H55fljp#SPXMW5zyjCg5uwtic!!QulpK5Z#Ie5vy#AcnljDn}O0#(&wz?3iOMQ z7pwt4PF=qTe{n{IYDvN|_FRTohzp1fWIiuI1q=m*R(q$I;0T`5DyNvElQz}03BprR z@-uidmKbXSR-x2w17jStj?3Of4SD)QK*I42ULpIfR(M* zp?eq)SUi>z$s$1e-rcSNIu6X@z_V^tJxrTu0}m|)>|4_Fv?{N5N@S)opJ1z^rtqHA zU;Gp7h}4}p60XydzYlDPL8;PDJv8M7SC!D^Mpw-Y}NznxJW`za)8KT{aPu*vx}b=48{ zZKqLv@Y(hx+f~=B{XGiDcC{UNT;)|>4lw6HCF%f4X&FXYC6Wi;F5eyRXpw2GZ?256 zsR*N3s$&Dy(s~jpoQJHrVkBL!2)sM<&^npn!E9y&*Rd1b6w{#9>2M{51ss`_gXb6=~0HtSIvq7atY6BBIKLDg$f378cX%mqqM`+wEVA; zA$e93@lE@JUQe9;Exp_RfvL*d1n1q8?S7&cAEqd$E}J70K8Ff*BEUm6#V=WJVWNRV zf<6hNIhG>BfdVBG-Rhb961eYi+TLtJ ziv(yz-A$%d(|u8=KyPd0Pacaq| zOYAZ%UW+FeGIlw#cFa=~AYGmp1920Xix4+ato-h_Aeg53l4t5V{wk!hd|P4d>t-f3 zK}Y&PFI8iXr!~;}r^W1m3~{nsPEXmfHTXBVb1v%L-OX8!Q{n%R?EFC6z17lozxX)uIS$!TxP zhtT@&n^qsaQ%>S05#LK?AO?PhFwG&$yVJZGJu;qxvIIFO@^h!QkIzYj2f)NnwR>2( zSykgN81AS`GKmA`AU5*}R^irtL<&4eJ=u0mW3BuR6sAl3<+aHllBd0Hi(G|mEj66A zV~!frGo#MTW+=J4_PXSls7H?v(+^pmMN8tI!^wLFCgfW&x=Vdj%Q;vpPJ?*~Ektcz z7e1gTkP*J3vXHlWtRKJ_Kek)@1qsf2NUW5hjzFLrW^%G~`;K}?xD4ocnyQh-W18~g z;?BMw@9J~uGAuz?(5gSGngSzFKX5`%`<8y!dsfF&Yuzus_5==K#dzZf$I>bJe0-4k~z1t1)p>PVFxL@~*DA@G?SL zbHz5Hi*?C&nR1{#-I4VUyXS%1Y+=U$UvT>eI`&gme2w<&WXXinfYJQw_? zZ#05?46Yn}vR&FNW*0^X%7C!l%7C!@9Gw84je_q)SVz7~l72BbYt3my zyQ_K)Ub#2rr~0zm_2~DABi>U6B|-aA>;-SV&SZXu62A`Oy)e6okV>QppUuoZLRDHK zsZ4{FCu$P4;uFsuc?F%417oB+wm|z+r^8O)lezk;_p)9#eG2GQ&9{qau@Mpf|-<4p_t;CK0mssgP zv(~?V&)MB_fHeRI(AsTdL@5ISNM4C|^;MNs7dQ}$WDlEmT-a&%ji*xs+zV$2H_l09 z&Zt6%U&Y<^!?{>df}9a{;sU{&aRl)ON}kx#n5Ts%?6x>SFBLhb+uDp>$fYDFt~f^? z8HAEJ1MBt0lpb}tL%J;j+DLnrBnnbQ29_7e7HVXA`ZZlj!6UMUmSDW%T-8O5#zSB6 zFU~+|RE#aPD&k4YZcKMUK1Bv%0+`U{^NU%6Me6XzFFuu5HwG}CaMBzUhqcE<5|z4> zKb@i5Rwb`2810}Iq`v-@-Es}PU-2z%YU(elGKRXVyA}RB69BoXeI$*Hj#{IAl*{e* zLbjIi$K5pdvM46&I5*G*auMx>rYeP2JyS#A>2Bt+%6wib*C_TQ#->5czi4t&c`pU+ z6*|7O96ZpmGSN-D3r_4lNzHhRmZjc4M(8W`xRWuPd_sMHsupzS6W~7Bi4}6jay%U# ztTHRKeDp;#HcpAUzn=sXoFD|J!z98otn3FB$J88LAum|vn{nmN;pLDc0+Xk4V`o^G z;hxE#a%m@-k1(@!m^VQ&7>IL3qhU}Omt1O27V#`>-$dygapFe^6;6zj?q4`kHL&-B zs7r`p@n-Qq=!imF`8of8A=1Am*e#gz7nBPB|=C7RcCVjH3P-g>oavbAmkQnW0 z(PU?khd)10ocjS2h1>EwqwG#don8<`-uy4pV*bcYhGQ|{!GLT8L%fj1J2m5$21N!m zVqK0+KLhVhd3V#Dj!quOeczA&*Sh_~Gh5z*BnOvwP$SllWP8auu`7;H$g!a24plPgE~Z7$d-ch5t6#R%@lbuJkGm> z;XE6tlUrH zCvz6>d{H}zj^~4ag0juGB|8w`d*FK4U<6-sX|5Iyig#h#E%L)&5u z8KP?Y&O>J7yt!7!wJTHK%Vy34Oy8V3A}|eB`0~u#5`}NP@f9_7_6&S5929@K+5Pdr zXVsFSk^@$(^AFP}5>jp>EB=8E{?#=8>#NW=B8$&S35qFj7eS~5=|1^_>F6V0`Jn4& zBv&ir#~MFN`+(fsf%_Nx{lmll2o?V?d&T~lcmDHxPR23JY`zgUwBAru0s%SRxf$n@ zE{%H|_~W#P&kD{vAb;iCw;EJ@NUF%ih`e!b#l<3-&Y0OIIK|g@i3;_XuN=W3H3Wn2 zqh(N5AGK;jnT|_Dk2j-UOV?H7U!5pPQjF7@kbS4~C4np8k?mn@4~!v#WC;W_bKtZ2 zY+xJXAl(s(-BqQ*#ei~#H)6$m%5c>MNo}i+$KMe$Nj2w(TKDJ56m)4`tOmj$iM%}@ z-Rnks0`k*;1AWPIv4W+um|dW4_leb&efG|&wnvD4zN-4IHhwotzpBQsbqwVmJBHtg2Xz_@f)pRofy3^04kK#S@-ipC8WGoJ54_XA zKJfnb)YZAD%5QXYW+cX0W8xc&cbcv}533+9kqWdkqSvR_u3Fzdm64VB`7Q5?h9X~% z#TNp{zRQ=zT%fR-Xh{D!Lu7!ah-bz(sX-@%F@oBg0pn{@^ec37_&#)|(=Fp%qr}TH z?20ulw%xGD=fDi9&c#?RlrF$fqaZrq1SFXaFhp^!gwXkhpe{)*E13Chr*pV`@b*Dc zv{T9fxHA5zSM}W2^4gkA@1qULBb!kK!pw&meaq8h$~os_Vz#}0od5u{z%d}8=+!^( z|KGp=AC{|Ip{Dm}9ZatjHHdlNmkq3EpIKj6gC$~D%}`Ek;5SD$z*I`P2Uo)U#k~vr z)4i)gh5ywT%<*@=;D3-Ff97xgSwsVm!-0CmG>ERlpR!tOH+5ss065tPxsxy_@RR~v z-jv5334WK?k~b_8>=J!xuM)pJYb43}O)7}I0e%wKp_%-qLvmmnESEmAPIT7y0Ye+Q<9~H*1$d2Y!7}5)xww!1G0p{2QouIqPZPucnJg5e119=GZJ$^-QLC7G! z*SQKQ=YTz_#;_DT#mATN(sEXadEW;*6W@XmHDZiFNC}XG&(^>x*2GWNEZ%RFLYe`y zx_UW?gh*d$H@?n6X=L%uL(HZLeD54h zA}({xs`SMt>?plC?p3P(EW3^H^)wVF?^fnqzYy0>*@$h@B~KsG#_=tP6P`b7%A=*^ z4eAbVPYzPbF$JWOqJ1rXLANZf|Dt5;YZmM{TSnbzono-wG@A=k$Cyq!{J(e zVPD>&?cgdLh?3(OGund`3B*$}Vzm?Xoad{J#ufOJKE>F= z7{@v1g4!`N==X>kd^c>T_g8(4uqSQiU`70(OKnrQ>R#5oKlU1OlM8ZPVDX?U6snFU zX)scg30O$fbe>9PUPT|HTp6srtJ3?jXUT8)*5{v#XE2a$3?3trbbG0sG#?N_MZP0F zZIwIx)I?;iLEx^g3fAmzzQ>=Ks&DO>4B8WB6ieG(A3knLvebu5ICdwMxK?HfzX??3 zIX9Z0hiUDDQ_ko+nW^#5X~Y^>P#Q00E<3^{K!p99hq|{0WJ{>(`ad2D-DOfsmJ#Md z+Dttsd8g_q+K^w(X?5WniQT#K+w#Jo2s1yWlEpU+tz!o`bUm7c?_S|ROj&KHA+A-_ zH2CIMca%eRdXn9YgHTMBkm!8*;x);Z+L4kkUzDoT4#Y;&)gKfw1W@p;-GDef*9bVK z=o?GqKykmmYSlNbbKhBPaDZvh$#?GP(oc#HVmI`9j<5B(m>b7rajx~dPtx-{KSoDDJ^&%Mp_!p9v>afA`zBz!OZEUTR;V*syY zdd-LrFB{lAcr@II(&P_&*!Ui)vw|S-7__@F0v)(8%J2s2FnM?8g6;3CCmpL9O_gYJd910t_WO?s_%o z#(2%*D>JX3R+qPT@%!F0Tf{I$DQyvn1wE$jtc@huXbOhgBVgBXZ4uChU!DF>homeWK z;7h9Q3{3u^lw=@HkYfZ05=4{2Dvld&(bIE?p5j=${iwU4>Kb3_RnrZqBI&62E+f5) z1C26oegbQgrO>|r;UcRcR>9gasnEHNY0(9P+(ZUQ&vnK-?>urTHlX=K&tDQ{svu56 zL#D%LQ`#>iw-dz;oN*|v(fniLM(UIgm4)wwZhfdpX{%dlFg9G=sHq6-=R83*dU7D1 z?5M2Ge>_Sd{Hu1l5^PyMypSr&LFsNIf`_^pyHC#9#KEEva*VALx1nZ+cM*V2oW7Oj zS-2>!At21xj4JqC4)?;TJM-&NT4i|oLpD}g^;dw-lWI^huTBI$FxW+q&%x$iC|clT(N8{ zznrq*o*^6F#ZwKSLC9@C0d+oz9>NQ-FcYaXGB{3RVi#UgFaN~Gd*`lSj#`yOn@m^+ ztek=0#Dm8MNJpTe0ESFji2^F zv{tdN=tSqjfS;QI0&)XhTz?@1MSB=xAK|lKARc!rh*bLX6pq!yeKqYkWXzYFmr z!}eoUDPrBI9+ee%B$fiD3V;XjT?6VGkx#639W0{oX%5My^c3(r!*Ea-AW-0&Z2EVt^~{>y*(pz`fB2FV5{^cFkxx+9j2 zl)!V|F74xQ<{R=89Qxy@ugpxHP5(G~^=+lpzATH+r&Dy#_sbu;Uw03s!s3gi8>2tM zD=iyC=meqIGrj4H7@B-egrA zd}4;SN-%`k*H@Z{hBz+!5vH1c%bdt{@95k8Or+%L+u5?)@JARzDvOVo65+s%gS+Ds zu(ft?R{+L2u%0sBO&Dm`H`ETelRbXEoHCvk;$3vMw({!KnNSG|7ns^7U%RF(Tw zzn|v$**i;=3DzeoMU$y+_W~WQke1mNIZ3NsH|p-s%-C(kGgM1l(sj*RNsl9X%5qw` zLF+jvE&w8FU09kWXaTW)fh!DgN^*O%hE0v0frht#zGsGRrHMyjX72t$?*nh{=Z7E5 zwco$mi%GcxiDO7ma9c1V;Lb$3PmIINBG%qkl3LKk;o(a))#=^m>opw=D&AH^SJgZL zG*9lIedC*Ptd;9t7#pzYM_ZsEejmOFQHU~2jd9{5T9ly=HX@6_h>p#~veW_x^^9UO z9}NxHD|=%M($BOY}{+niclgI5lnDE z(#CalGHeO1RT;Xw$YWo}PCe{;kjvxzs0!C#Z)|u50cA`NvE zbtiKyN{BEguT;~y8om{H=RLUzi{qomTa5yML4Z`4mw_p|afAV{)c_8i9&!*X_mZoG+NybI+A)fc^Xu)6=0_Itc9BgNn7xp^edNWmZzK<_0 zzzdjIeGJt=e*Y(bCgiOD&rH6p`@d>w??Cw?^f0Uf)@eP_ZCV%pVWWFy*BC?J+b^)O zC(8Rm8}jt$)ZcD?N>;u};Q#FwFRs_{B5Q{;DKj8>0!bQ=XmSZG2u99cPL3&Qvi6hF zTWC>A?nt+#5fZHY*0fYG3f8n}L4_o7;kWNj7+~-t=Xt(hm-kVH=4zhP16c#u3XP>N zWC4wKIqCZHv8IdUV&VKJpY;yhQ&U|ob$O)z!ZFxK9Y;TsjL%||;IlF5M#>c2^7CTTG6yKpgWyXylNAX~J~rW=KCW}8 z)#jm!X0KnUPwF*;GpLTJiCbO5h>wb*9BUfTY_%ZIDZaH&BihEZ)<|(&NhJgaMlqC| z#a5A$)Wkeudba{%G&j%>fVG~c}qov|D4a$yYiFqaHnoA)6(7AM}^gI&fgaQR{Y~) z;L#^5f7|^#6~FOW>%*5@`8%cBmM>A8z2fGb+R45bxA!1osZ#CvM_pcbXVCe|Tu8q<;7yYZOMiQA@ouY} bcIWi&Q$ofTK6xt7c6;I9n+BiN_ Date: Wed, 13 Aug 2025 07:43:33 -0700 Subject: [PATCH 65/65] Change sign on pressure gradient terms --- .../omega/doc/design/OmegaV1GoverningEqns.md | 65 ++++++++++--------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/components/omega/doc/design/OmegaV1GoverningEqns.md b/components/omega/doc/design/OmegaV1GoverningEqns.md index d32c1d2443d8..24d148daf4f4 100644 --- a/components/omega/doc/design/OmegaV1GoverningEqns.md +++ b/components/omega/doc/design/OmegaV1GoverningEqns.md @@ -501,9 +501,9 @@ $$ & + \int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA - \int_A \rho_0 \, {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \, dA \\ & = -\int_A \int_{\tilde{z}_k^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \rho_0 \left({\bf f} \times \mathbf{u} + \nabla \Phi \right) \, d\tilde{z} \, dA -+ \int_{\partial A} \left( \int_{\tilde{z}_k^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \frac{\rho_0 p}{\rho} \, d\tilde{z} \right) dl \\ -& + \int_A \left[ \frac{\rho_0 p}{\rho} \nabla \tilde{z}_k^{\text{top}} \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA -- \int_A \left[ \frac{\rho_0 p}{\rho} \nabla \tilde{z}_k^{\text{bot}} \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \, dA. +- \int_{\partial A} \left( \int_{\tilde{z}_k^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \frac{\rho_0 p}{\rho} \, d\tilde{z} \right) dl \\ +& - \int_A \left[ \frac{\rho_0 p}{\rho} \nabla \tilde{z}_k^{\text{top}} \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA ++ \int_A \left[ \frac{\rho_0 p}{\rho} \nabla \tilde{z}_k^{\text{bot}} \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \, dA. $$ (vh-momentum-forces) In this equation: @@ -511,6 +511,7 @@ In this equation: - The first term on the right hand side is the **Coriolis force**, where $ \mathbf{f} $ is the vector Coriolis vector (e.g., $ f \hat{\mathbf{z}} $ on the sphere). - The second term on the right hand side represents the **gravitational force**, expressed in terms of the two-dimensional gradient of the gravitational potential $ \Phi(x, y, z, t) $, which may include effects such as tides and self-attraction and loading. This gradient is along layer (e.g. constant $\tilde{z}$) such that the gradient of $\Phi$ doesn't disappear. - The final terms are the **pressure force**, which acts on the boundary surfaces and is naturally expressed as a surface integral. It gives rise to both horizontal pressure gradients and contributions from sloping surfaces. +- A negative sign is included for the pressure terms derived from the surface force terms. According to [Leishman 2025](https://eaglepubs.erau.edu/introductiontoaerospaceflightvehicles/chapter/conservation-of-momentum-momentum-equation/#chapter-260-section-2), Chapter 21, equation 2, "the negative sign indicates that the force is inward and in the opposite direction to the unit normal vector area, which always points *outward* by convention". Also see discussion in [Kundu et al. 2016](https://doi.org/10.1016/C2012-0-00611-4) page 104 and equation 4.26. As with the tracer derivation, we next Reynolds' average [](#vh-momentum-forces), @@ -520,9 +521,9 @@ $$ & + \int_A \rho_0 \,\left< {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \right> \, dA - \int_A \rho_0 \, \left< {\bf u} \left[ \tilde{w}_{tr} - \tilde{\bf u} \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \right> \, dA \\ & = -\int_A \int_{\tilde{z}_k^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \rho_0 \, \left<\left( {\bf f} \times \mathbf{u} + \nabla \Phi \right) \right> \, d\tilde{z} \, dA -+ \int_{\partial A} \left( \int_{\tilde{z}_k^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \rho_0 \left< \frac{p}{\rho} \right> \, d\tilde{z} \right) dl \\ -& + \int_A \rho_0 \left[ \left< \frac{p}{\rho} \nabla \tilde{z}_k^{\text{top}} \right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA -- \int_A \rho_0 \left[ \left< \frac{p}{\rho} \nabla \tilde{z}_k^{\text{bot}} \right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \, dA. +- \int_{\partial A} \left( \int_{\tilde{z}_k^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \rho_0 \left< \frac{p}{\rho} \right> \, d\tilde{z} \right) dl \\ +& - \int_A \rho_0 \left[ \left< \frac{p}{\rho} \nabla \tilde{z}_k^{\text{top}} \right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA ++ \int_A \rho_0 \left[ \left< \frac{p}{\rho} \nabla \tilde{z}_k^{\text{bot}} \right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \, dA. $$ (vh-momentum-reynolds1) Here we have also moved the Reynolds' average through the spatial integrals given the properties of the averaging. Next we do a Reynolds' decomposition, this yields @@ -533,9 +534,9 @@ $$ & + \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA \\ & - \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \, dA \\ & = - \int_A \int_{\tilde{z}_k^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \rho_0 \, \left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right) \, d\tilde{z} \, dA \\ -& + \int_{\partial A} \left( \int_{\tilde{z}_k^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \, d\tilde{z} \right) dl \\ -& + \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{top}}\right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA \\ -& - \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{bot}}\right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \, dA. +& - \int_{\partial A} \left( \int_{\tilde{z}_k^{\text{bot}}}^{\tilde{z}_k^{\text{top}}} \rho_0 \left(\left< \alpha \right> \left

+ \left<\alpha^\prime p^\prime\right> \right) \, d\tilde{z} \right) dl \\ +& - \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{top}}\right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA \\ +& + \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{bot}}\right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \, dA. $$ (vh-momentum-reynolds2) In [](#vh-momentum-reynolds2) we have also used $\alpha = \frac{1}{\rho}$ for notation conciseness. The definition of the layer average [](#def-layer-average-reynolds) is now utilized on terms with vertical integrals to yield @@ -546,9 +547,9 @@ $$ & + \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA \\ & - \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \, dA \\ & = - \int_A \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \, dA \\ -& + \int_{\partial A} \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right> \left

}^{\tilde{z}}_k + \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) dl \\ -& + \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA \\ -& - \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \, dA. +& - \int_{\partial A} \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right> \left

}^{\tilde{z}}_k + \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) dl \\ +& - \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA \\ +& + \int_A \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \, dA. $$ (vh-momentum-reynolds-lay-avg) The next step is to decompose vertical averages of products. This yields @@ -559,9 +560,9 @@ $$ & + \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA \\ & - \int_A \rho_0 \, \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \, dA \\ & = - \int_A \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \, dA \\ -& + \int_{\partial A} \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) dl \\ -& + \int_A \rho_0 \left[\left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA \\ -& - \int_A \rho_0 \left[\left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \, dA. +& - \int_{\partial A} \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) dl \\ +& - \int_A \rho_0 \left[\left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \, dA \\ +& + \int_A \rho_0 \left[\left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \, dA. $$ (vh-momentum-reynolds-lay-avg2) We next use the Divergence theorem on the surface integrals and combine terms into fewer integrals on each side of the equation. @@ -572,9 +573,9 @@ $$ & + \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{top}}} \\ & - \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}^{\text{bot}}} \bigr\} \, dA \\ & = - \int_A \bigl\{ \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ -& + \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ -& + \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \\ -& - \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}}\bigr\} \, dA. +& - \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ +& - \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \\ +& + \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}}\bigr\} \, dA. $$ (vh-momentum-reynolds-lay-avg3) Since the equation is fully inside the integral, the equation is true for any area and therefore we can write the layer averaged momentum equation as @@ -585,9 +586,9 @@ $$ & + \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \\ & - \rho_0 \left[ \left(\left< {\bf u} \right> \left< \tilde{w}_{tr} \right> + \left<{\bf u}^\prime \tilde{w}_{tr}^\prime \right> \right) - \left(\left<{\bf u}\right> \left<\tilde{\bf u}\right> + \left< {\bf u}^\prime \tilde{\bf u}^\prime \right> \right) \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \\ & = - \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ -& + \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ -& + \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \cdot \nabla \tilde{z}_k^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \\ -& - \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \cdot \nabla \tilde{z}_k^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}}. +& - \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ +& - \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \cdot \nabla \tilde{z}_k^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \\ +& + \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \cdot \nabla \tilde{z}_k^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}}. $$ (vh-momentum-v1) The product rule is used on the first two terms of [](#vh-momentum-v1) and then we multiply [](#layer-mass) by $\overline{\mathbf{u}}^{\tilde{z}}_k$ and subtract it from [](#vh-momentum-v1). This yields @@ -598,9 +599,9 @@ $$ & + \rho_0 \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{ \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} - \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \right\} \\ & + \rho_0 \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \right\} \\ & = - \rho_0 \, \tilde{h}_k \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ -& + \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ -& + \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \\ -& - \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}}. +& - \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ +& - \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \\ +& + \rho_0 \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}}. $$ (vh-momentum-v2) The previous equation is divided by $\tilde{h}_k$, @@ -611,9 +612,9 @@ $$ & + \frac{\rho_0}{\tilde{h}_k} \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{ \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} - \left[ \left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \right\} \\ & + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \right\} \\ & = - \rho_0 \, \overline{\left( {\bf f} \times \left<\mathbf{u}\right> + \nabla \left<\Phi\right> \right)}^{\tilde{z}}_k \\ -& + \frac{1}{\tilde{h}_k} \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ -& + \frac{\rho_0}{\tilde{h}_k} \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \\ -& - \frac{\rho_0}{\tilde{h}_k} \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}}. +& - \frac{1}{\tilde{h}_k} \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ +& - \frac{\rho_0}{\tilde{h}_k} \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} \\ +& + \frac{\rho_0}{\tilde{h}_k} \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}}. $$ (vh-momentum-v3) @@ -646,8 +647,8 @@ $$ & + \zeta_a {\overline{\left<{\bf u}\right>}^{\tilde{z}}_k}^{\perp} + \nabla K + \frac{1}{\tilde{h}_k} \nabla \cdot \left[ \tilde{h}_k \left(\overline{\delta {\bf u} \otimes \delta {\bf u}}^{\tilde{z}}_k + \overline{\left< {\bf u}^\prime \otimes {\bf u}^\prime \right>}^{\tilde{z}}_k \right) \right] \\ & + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[\left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{\left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right\} \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} - \left[ \left(\left<\mathbf{u}\right> - \overline{\left<\mathbf{u}\right>}^{\tilde{z}}_k\right) \left\{\left<\tilde{w}_{tr}\right> - \left<\tilde{\bf u}\right> \right\} \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \right\} \\ & + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{\bf u}^\prime \right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \right\} \\ -& = - \rho_0 \, \overline{\nabla \left<\Phi\right>}^{\tilde{z}}_k + \frac{1}{\tilde{h}_k} \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ -& + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} +& = - \rho_0 \, \overline{\nabla \left<\Phi\right>}^{\tilde{z}}_k - \frac{1}{\tilde{h}_k} \nabla \left[ \rho_0 \tilde{h}_k \left( \overline{\left< \alpha \right>}^{\tilde{z}}_k \overline{\left

}^{\tilde{z}}_k + \overline{\delta \alpha \delta p}^{\tilde{z}}_k+ \overline{\left<\alpha^\prime p^\prime\right>}^{\tilde{z}}_k \right) \right] \\ +& - \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{top}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} - \left[ \left< \alpha \right> \left

+ \left<\alpha^\prime \left(p \nabla \tilde{z}_k^{\text{bot}} \right)^\prime\right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \right\}. $$ (layer-momentum-final) @@ -689,8 +690,8 @@ $$ & + \zeta_a {{\bf u}_k}^{\perp} + \nabla K + \frac{1}{\tilde{h}_k} \nabla \cdot \left[ \tilde{h}_k \left< {\bf u}^\prime \otimes {\bf u}^\prime \right>_k \right] \\ & + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[\left(\mathbf{u} - \mathbf{u}_k\right) \left\{\tilde{W}_{tr} \right\} \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} - \left[ \left(\mathbf{u} - \mathbf{u}_k\right) \left\{\tilde{W}_{tr} \right\} \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \right\} \\ & + \frac{\rho_0}{\tilde{h}_k} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \right\} \\ -& = - \left(\nabla \Phi \right)_k + \frac{1}{\tilde{h}_k} \nabla \left[ \tilde{h}_k \alpha_k p_k \right] \\ -& + \frac{1}{\tilde{h}_k} \left\{ \left[ \alpha p \nabla \tilde{z}^_k{\text{top}}\right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} +& = - \left(\nabla \Phi \right)_k - \frac{1}{\tilde{h}_k} \nabla \left[ \tilde{h}_k \alpha_k p_k \right] \\ +& - \frac{1}{\tilde{h}_k} \left\{ \left[ \alpha p \nabla \tilde{z}_k^{\text{top}}\right]_{\tilde{z} = \tilde{z}_k^{\text{top}}} - \left[ \alpha p \nabla \tilde{z}_k^{\text{bot}}\right]_{\tilde{z} = \tilde{z}_k^{\text{bot}}} \right\}. $$ (layer-momentum-final-simple) @@ -729,7 +730,7 @@ $$ \frac{\partial u_{e,k}}{\partial t} & + \left[ {\bf k} \cdot \nabla \times u_{e,k} +f_v\right]_e\left(u_{e,k}^{\perp}\right) + \left[\nabla K\right]_e \\ & + \frac{\rho_0}{\left[\tilde{h}_{i,k}\right]_e} \left\{ \left[\left(u - u_k\right) \left\{\tilde{W}_{tr} \right\} \right]_{e,k}^\text{top} - \left[ \left(u - u_k\right) \left\{\tilde{W}_{tr} \right\} \right]_{e,k+1}^\text{top} \right\} \\ -& = - \left(\nabla \Phi \right)_{e,k} + \frac{1}{\left[\tilde{h}_k\right]_e} \nabla \left( \tilde{h}_k \alpha_k p_k \right) + \frac{1}{\left[\tilde{h}_k\right]_e} \left\{ \left[ \alpha p \nabla \tilde{z}^{\text{top}}\right]_{e,k}^\text{top} - \left[ \alpha p \nabla \tilde{z}^{\text{bot}}\right]_{e,k+1}^\text{top} \right\} \\ +& = - \left(\nabla \Phi \right)_{e,k} - \frac{1}{\left[\tilde{h}_k\right]_e} \nabla \left( \tilde{h}_k \alpha_k p_k \right) - \frac{1}{\left[\tilde{h}_k\right]_e} \left\{ \left[ \alpha p \nabla \tilde{z}^{\text{top}}\right]_{e,k}^\text{top} - \left[ \alpha p \nabla \tilde{z}^{\text{bot}}\right]_{e,k+1}^\text{top} \right\} \\ & - \frac{1}{\left[\tilde{h}_{i,k}\right]_e} \nabla \cdot \left( \tilde{h}_k \left< {\bf u}^\prime \otimes {\bf u}^\prime \right>_k \right) - \frac{\rho_0}{\left[\tilde{h}_{i,k}\right]_e^\text{top}} \left\{ \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{e,k}^\text{top} - \left[ \left<\mathbf{u}^\prime \tilde{w}_{tr}^\prime \right> - \left< \mathbf{u}^\prime \tilde{ u}^\prime \right> \right]_{e,k+1} \right\}. $$ (discrete-momentum)