<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing with OASIS Tables v3.0 20080202//EN" "journalpub-oasis3.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:oasis="http://docs.oasis-open.org/ns/oasis-exchange/table" xml:lang="en" dtd-version="3.0"><?xmltex \hack{\allowdisplaybreaks}?>
  <front>
    <journal-meta><journal-id journal-id-type="publisher">GMD</journal-id><journal-title-group>
    <journal-title>Geoscientific Model Development</journal-title>
    <abbrev-journal-title abbrev-type="publisher">GMD</abbrev-journal-title><abbrev-journal-title abbrev-type="nlm-ta">Geosci. Model Dev.</abbrev-journal-title>
  </journal-title-group><issn pub-type="epub">1991-9603</issn><publisher>
    <publisher-name>Copernicus Publications</publisher-name>
    <publisher-loc>Göttingen, Germany</publisher-loc>
  </publisher></journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.5194/gmd-11-4359-2018</article-id><title-group><article-title><?xmltex \hack{\vspace*{5mm}}?>Thetis coastal ocean model: discontinuous Galerkin discretization for the three-dimensional hydrostatic equations</article-title><alt-title>Thetis: discontinuous Galerkin discretization</alt-title>
      </title-group><?xmltex \runningtitle{Thetis: discontinuous Galerkin discretization}?><?xmltex \runningauthor{T.~K\"{a}rn\"{a} et al.}?>
      <contrib-group>
        <contrib contrib-type="author" corresp="yes" rid="aff1 aff5">
          <name><surname>Kärnä</surname><given-names>Tuomas</given-names></name>
          <email>tuomas.karna@gmail.com</email>
        <ext-link>https://orcid.org/0000-0002-9247-4830</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff3">
          <name><surname>Kramer</surname><given-names>Stephan C.</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" corresp="no" rid="aff2 aff4 aff6">
          <name><surname>Mitchell</surname><given-names>Lawrence</given-names></name>
          
        <ext-link>https://orcid.org/0000-0001-8062-1453</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff2">
          <name><surname>Ham</surname><given-names>David A.</given-names></name>
          
        <ext-link>https://orcid.org/0000-0001-9545-9110</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff3">
          <name><surname>Piggott</surname><given-names>Matthew D.</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" corresp="no" rid="aff1">
          <name><surname>Baptista</surname><given-names>António M.</given-names></name>
          
        <ext-link>https://orcid.org/0000-0002-7641-5937</ext-link></contrib>
        <aff id="aff1"><label>1</label><institution>Center for Coastal Margin Observation &amp; Prediction, Oregon Health &amp; Science University, Portland, OR, USA</institution>
        </aff>
        <aff id="aff2"><label>2</label><institution>Department of Mathematics, Imperial College London, London, UK</institution>
        </aff>
        <aff id="aff3"><label>3</label><institution>Department of Earth Science and Engineering, Imperial College London, London, UK</institution>
        </aff>
        <aff id="aff4"><label>4</label><institution>Department of Computing, Imperial College London, London, UK</institution>
        </aff>
        <aff id="aff5"><label>a</label><institution>present address: Finnish Meteorological Institute, Helsinki, Finland</institution>
        </aff>
        <aff id="aff6"><label>b</label><institution>present address: Department of Computer Science, Durham University, Durham, UK</institution>
        </aff>
      </contrib-group>
      <author-notes><corresp id="corr1">Tuomas Kärnä (tuomas.karna@gmail.com)</corresp></author-notes><pub-date><day>30</day><month>October</month><year>2018</year></pub-date>
      
      <volume>11</volume>
      <issue>11</issue>
      <fpage>4359</fpage><lpage>4382</lpage>
      <history>
        <date date-type="received"><day>16</day><month>November</month><year>2017</year></date>
           <date date-type="rev-request"><day>2</day><month>February</month><year>2018</year></date>
           <date date-type="rev-recd"><day>4</day><month>September</month><year>2018</year></date>
           <date date-type="accepted"><day>9</day><month>October</month><year>2018</year></date>
      </history>
      <permissions>
        
        
      <license license-type="open-access"><license-p>This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this licence, visit <ext-link ext-link-type="uri" xlink:href="https://creativecommons.org/licenses/by/4.0/">https://creativecommons.org/licenses/by/4.0/</ext-link></license-p></license></permissions><self-uri xlink:href="https://gmd.copernicus.org/articles/11/4359/2018/gmd-11-4359-2018.html">This article is available from https://gmd.copernicus.org/articles/11/4359/2018/gmd-11-4359-2018.html</self-uri><self-uri xlink:href="https://gmd.copernicus.org/articles/11/4359/2018/gmd-11-4359-2018.pdf">The full text article is available as a PDF file from https://gmd.copernicus.org/articles/11/4359/2018/gmd-11-4359-2018.pdf</self-uri>
      <abstract>
    <p id="d1e162">Unstructured grid ocean models are advantageous for simulating the coastal
ocean and river–estuary–plume systems. However, unstructured grid models tend
to be diffusive and/or computationally expensive, which limits their
applicability to real-life problems. In this paper, we describe a novel
discontinuous Galerkin (DG) finite element discretization for the hydrostatic
equations. The formulation is fully conservative and second-order accurate in
space and time. Monotonicity of the advection scheme is ensured by using a
strong stability-preserving time integration method and slope limiters.
Compared to previous DG models, advantages include a more accurate mode
splitting method, revised viscosity formulation, and new second-order time
integration scheme. We demonstrate that the model is capable of simulating
baroclinic flows in the eddying regime with a suite of test cases. Numerical
dissipation is well-controlled, being comparable or lower than in existing
state-of-the-art structured grid models.</p>
  </abstract>
    </article-meta>
  </front>
<body>
      

<sec id="Ch1.S1" sec-type="intro">
  <title>Introduction</title>
      <p id="d1e172">Numerical modeling of the coastal ocean is important for many environmental
and industrial applications. Typical scenarios include modeling circulation
at regional scales, coupled river–estuary–plume systems, river networks,
lagoons, and harbors. Length scales range from some tens of meters in rivers
and embayments to tens of kilometers in the coastal ocean; water depth ranges
from less than a meter to kilometer scale at the shelf break. The timescales
of the relevant processes range from minutes to hours, yet typical
simulations span weeks or even decades. The dynamics are highly non-linear,
characterized by local small-scale features such as fronts and density
gradients, internal waves, and baroclinic eddies. These physical
characteristics imply that coastal ocean modeling is intrinsically
multi-scale, which imposes several technical challenges.</p>
      <p id="d1e175">Most coastal ocean models solve the hydrostatic Navier–Stokes equations under
the Boussinesq approximation – a valid approximation for mesoscale and
submesoscale (1 km) processes. Small-scale processes (<inline-formula><mml:math id="M1" display="inline"><mml:mrow><mml:mo>&lt;</mml:mo><mml:mn mathvariant="normal">100</mml:mn></mml:mrow></mml:math></inline-formula> m) are,
however, inherently three-dimensional where non-hydrostatic effects can be
important, especially in areas with pronounced density structure and
stratification <xref ref-type="bibr" rid="bib1.bibx59 bib1.bibx56" id="paren.1"/>. Non-hydrostatic modeling
requires very high horizontal mesh resolution, which is currently only
feasible in relatively small subregions (e.g., at the mouth of an estuary;
<xref ref-type="bibr" rid="bib1.bibx76" id="altparen.2"/>) due to its high computational cost.</p>
      <p id="d1e194">Historically, regional ocean models have used structured, (deformed)
rectilinear lattice grids. Although structured grids offer better
computational performance <xref ref-type="bibr" rid="bib1.bibx22 bib1.bibx21" id="paren.3"/>, unstructured grids
are generally preferred<?pagebreak page4360?> in coastal domains as they can better represent the
complex coastal topography and local features
<xref ref-type="bibr" rid="bib1.bibx25 bib1.bibx21 bib1.bibx67" id="paren.4"/>. Due to the large
geometrical aspect ratio of the oceans (length versus depth), most models
utilize computational grids that are layered in the vertical direction.
Typical approaches include the terrain-following sigma levels
<xref ref-type="bibr" rid="bib1.bibx10" id="paren.5"/>, equipotential <inline-formula><mml:math id="M2" display="inline"><mml:mi>z</mml:mi></mml:math></inline-formula> levels <xref ref-type="bibr" rid="bib1.bibx37" id="paren.6"/>,
isopycnal coordinates <xref ref-type="bibr" rid="bib1.bibx8" id="paren.7"/>, and their generalizations <xref ref-type="bibr" rid="bib1.bibx79 bib1.bibx9" id="paren.8"><named-content content-type="pre">e.g.,</named-content></xref>.</p>
      <p id="d1e225">In this article, we focus on solving the hydrostatic equations on an
unstructured grid. While many unstructured grid models exist, their drawbacks
tend to be excessive numerical diffusion that smooths out important physical
features <xref ref-type="bibr" rid="bib1.bibx51 bib1.bibx47 bib1.bibx68" id="paren.9"/> and/or high computational
cost. To address these issues, we propose a novel finite element solver for
the hydrostatic equations, based on discontinuous Galerkin discretization methods.</p>
      <p id="d1e232">Maintaining high numerical accuracy is crucial in ocean applications. The
ocean is a forced dissipative system where the mixing of water masses only
takes place at the molecular level <xref ref-type="bibr" rid="bib1.bibx34" id="paren.10"/>. In practice,
however, the finite grid resolution and numerical schemes used by the model
introduce mixing rates of tracers and momentum that can be orders of
magnitude larger than physical mixing
<xref ref-type="bibr" rid="bib1.bibx12 bib1.bibx70 bib1.bibx40" id="paren.11"/>. Such spurious, numerical mixing
is often dominated by the discretization of advection
<xref ref-type="bibr" rid="bib1.bibx57 bib1.bibx36" id="paren.12"/>, but it can arise from other
components as well, such as (implicit) time integration methods
<xref ref-type="bibr" rid="bib1.bibx75" id="paren.13"/> or various filters introduced to improve numerical
stability <xref ref-type="bibr" rid="bib1.bibx20 bib1.bibx89" id="paren.14"/>. In addition, wetting and drying
schemes may introduce additional dissipation in order to stabilize the
barotropic equation in the drying regime. We reserve consideration of this
important latter topic for a future publication.</p>
      <p id="d1e250">In global circulation models, numerical mixing is a major bottleneck as
(diapycnal) diffusion is very low in the deep ocean basins and water masses
can remain largely unchanged for hundreds of years
<xref ref-type="bibr" rid="bib1.bibx34 bib1.bibx36" id="paren.15"/>. Numerical mixing can, however, be a
major issue in coastal domains as well: coastal oceans are characterized by
strong density gradients, fronts between water masses (e.g., in river plumes),
small-scale dynamics (e.g., internal waves and hydraulic jumps), and
baroclinic eddies. An overly diffusive model can, therefore, fail to capture
many essential physical features of these domains: it can smear out fronts,
underestimate the intrusion of saline waters into embayments
<xref ref-type="bibr" rid="bib1.bibx12 bib1.bibx42 bib1.bibx51 bib1.bibx68" id="paren.16"/>, or
misrepresent mixing in river plumes.</p>
      <p id="d1e259">The most common spatial discretization scheme is the finite volume (FV)
method, used in the MITgcm <xref ref-type="bibr" rid="bib1.bibx58" id="paren.17"/>, GETM <xref ref-type="bibr" rid="bib1.bibx11" id="paren.18"/>, ROMS
<xref ref-type="bibr" rid="bib1.bibx74 bib1.bibx75" id="paren.19"/>, MPAS-Ocean
<xref ref-type="bibr" rid="bib1.bibx71 bib1.bibx65" id="paren.20"/>, UnTRIM <xref ref-type="bibr" rid="bib1.bibx13" id="paren.21"/>, FVCOM
<xref ref-type="bibr" rid="bib1.bibx14" id="paren.22"/>, SUNTANS <xref ref-type="bibr" rid="bib1.bibx30" id="paren.23"/>, FESOM2 <xref ref-type="bibr" rid="bib1.bibx23" id="paren.24"/>,
and others. The FV method is well suited for advection-dominated problems,
provides strict conservation of volume and mass, and yields good
computational performance. FV methods are nominally only first-order
accurate, but higher-order approximations can be introduced by increasing the
size of the numerical stencil (e.g., in high-order advection schemes; <xref ref-type="bibr" rid="bib1.bibx73" id="altparen.25"/>).</p>
      <p id="d1e290">Some unstructured grid models are based on the continuous Galerkin finite
element (FE) method or hybrid FE–FV formulations. Such models include ADCIRC
<xref ref-type="bibr" rid="bib1.bibx54" id="paren.26"/>, SELFE <xref ref-type="bibr" rid="bib1.bibx88" id="paren.27"/>, and SCHISM <xref ref-type="bibr" rid="bib1.bibx89" id="paren.28"/>,
and the earlier version of FESOM <xref ref-type="bibr" rid="bib1.bibx83" id="paren.29"/>. The continuous FE method
is ideal for solving elliptic equations but requires stabilization for
advection <xref ref-type="bibr" rid="bib1.bibx81" id="paren.30"><named-content content-type="pre">see</named-content><named-content content-type="post">and references therein</named-content></xref>. In addition, these
methods involve solving a fully coupled global system which is less efficient
in parallel applications compared to the FV method <xref ref-type="bibr" rid="bib1.bibx20 bib1.bibx23" id="paren.31"/>.</p>
      <p id="d1e316">In recent years, discontinuous Galerkin (DG) methods have gained attention in
geophysical modeling <xref ref-type="bibr" rid="bib1.bibx24 bib1.bibx1 bib1.bibx7 bib1.bibx16 bib1.bibx49 bib1.bibx50" id="paren.32"/>.
DG discretization resembles the FV method because it is local (i.e., elements
are only connected by inter-element fluxes), fully conservative, and
well-suited for advective problems, yet it offers higher-order accuracy. This
article presents a DG discretization for the hydrostatic equations. Our goal
is to design an efficient unstructured grid solver where numerical accuracy
is not compromised. Specifically, we aim to meet the following design criteria:
<list list-type="bullet"><list-item>
      <p id="d1e324">a vertically extruded, layered mesh;</p></list-item><list-item>
      <p id="d1e328">accurate representation of free surface dynamics;</p></list-item><list-item>
      <p id="d1e332">a second-order accurate, monotone tracer advection scheme;</p></list-item><list-item>
      <p id="d1e336">explicit time integration of 3-D variables (except for vertical
diffusion); and</p></list-item><list-item>
      <p id="d1e340">low numerical mixing.</p></list-item></list>
Based on the advection scheme requirements, we have chosen to use linear
discontinuous Galerkin elements for tracers, combined with a slope limiter
<xref ref-type="bibr" rid="bib1.bibx52" id="paren.33"/> and a strong stability-preserving (SSP) time integration
scheme <xref ref-type="bibr" rid="bib1.bibx77 bib1.bibx78 bib1.bibx32 bib1.bibx31 bib1.bibx33" id="paren.34"/>. This
choice ensures that the scheme is second order in smooth areas, while slope
limitation combined with the SSP time integration scheme ensure monotonicity
(i.e., no overshoots). The movement of the free surface is taken into account
with an arbitrary Lagrangian–Eulerian (ALE) formulation <xref ref-type="bibr" rid="bib1.bibx26" id="paren.35"/>,
where the mesh moves in the vertical direction. The ALE formulation
guarantees strict local and global conservation of volume and tracers and
allows for the use of generic vertical grids <xref ref-type="bibr" rid="bib1.bibx65" id="paren.36"/>.</p>
      <p id="d1e357">All numerical ocean models include some form of friction, either in the form
of a numerical closure or a physical parameterization <xref ref-type="bibr" rid="bib1.bibx35" id="paren.37"/>.
Numerical closure involves adding a sufficient amount of dissipation to
maintain numerical stability. There is a wealth of literature about stable
finite volume <xref ref-type="bibr" rid="bib1.bibx20" id="paren.38"><named-content content-type="pre">e.g.,</named-content></xref> and finite element discretizations
<xref ref-type="bibr" rid="bib1.bibx39 bib1.bibx18 bib1.bibx19 bib1.bibx17 bib1.bibx60" id="paren.39"><named-content content-type="pre">e.g.,</named-content></xref> for
rotational shallow water equations. Most of these schemes are stable for
external gravity waves and hence do not require any additional dissipation.
Solving the 3-D hydrostatic equations under strong baroclinic forcing,
however, generates noise at the grid scale that does require dampening. A
common approach is to add some form of viscosity proportional to the grid
Reynolds number <xref ref-type="bibr" rid="bib1.bibx35 bib1.bibx44" id="paren.40"/>. <xref ref-type="bibr" rid="bib1.bibx35" id="text.41"/> argue
that conventional Laplacian viscosity has too wide a spectrum and tends to
dissipate physically relevant (larger) scales too much. They show that
biharmonic viscosity dissipates smaller scales more and is thus more
appropriate for removing noise at the grid scale. In contrast to numerical
closures, physical parameterizations aim to represent unresolved
subgrid-scale processes, such as strong lateral mixing near coasts or mixing
at the bottom boundary layers. In this article, we focus on numerical
closures; the presented viscosity schemes are mostly motivated by numerical
stability considerations.</p>
      <p id="d1e380">In this article, we present an efficient DG implementation of the
three-dimensional hydrostatic equations. The model is implemented in the
Thetis project – an open-source coastal ocean circulation model
freely available online (see
<uri>http://thetisproject.org</uri>, last access: 25 October 2018). Thetis implements both a
2-D depth-averaged circulation model and a full 3-D hydrostatic model, the
latter of which is discussed herein.</p>
      <p id="d1e386">Thetis is implemented using the Firedrake finite element modeling platform
<xref ref-type="bibr" rid="bib1.bibx69" id="paren.42"><named-content content-type="pre"><uri>https://www.firedrakeproject.org/</uri>, last access: 25 October 2018;</named-content></xref>. We have chosen
Firedrake because of its flexibility and support for extruded meshes
<xref ref-type="bibr" rid="bib1.bibx61 bib1.bibx5" id="paren.43"/>. Firedrake uses high-level abstractions for
describing the weak formulation of partial differential equations,
specifically the Unified Form Language <xref ref-type="bibr" rid="bib1.bibx2" id="paren.44"/>, and automated code
generation to produce efficient C code <xref ref-type="bibr" rid="bib1.bibx43 bib1.bibx55" id="paren.45"/> and
just-in-time compilation. As such, it is an extremely flexible modeling
framework that does not sacrifice computational efficiency; it is also an
ideal platform for experimenting and benchmarking different discretizations.
Automated code generation can also support different target hardware
architectures, making it attractive for current and emerging high-performance
computing platforms. In addition, Firedrake can automatically derive the
adjoint of the forward model <xref ref-type="bibr" rid="bib1.bibx29" id="paren.46"/>, permitting inverse modeling
applications such as parameter optimization and data assimilation.</p>
      <p id="d1e408">The governing equations are presented in Sect. <xref ref-type="sec" rid="Ch1.S2"/>,
followed by their DG finite element discretization in Sect. <xref ref-type="sec" rid="Ch1.S3"/>.
The second-order coupled time integration scheme
is described in Sect. <xref ref-type="sec" rid="Ch1.S4"/>. Numerical tests are
presented in Sect. <xref ref-type="sec" rid="Ch1.S5"/>.</p>
</sec>
<?pagebreak page4361?><sec id="Ch1.S2">
  <title>Governing equations</title>
      <p id="d1e425">Let <inline-formula><mml:math id="M3" display="inline"><mml:mi mathvariant="normal">Ω</mml:mi></mml:math></inline-formula> be the three-dimensional domain that spans from the sea floor
<inline-formula><mml:math id="M4" display="inline"><mml:mrow><mml:mi>z</mml:mi><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mi>h</mml:mi><mml:mo>(</mml:mo><mml:mi>x</mml:mi></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M5" display="inline"><mml:mrow><mml:mi>y</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> to the free surface <inline-formula><mml:math id="M6" display="inline"><mml:mrow><mml:mi>z</mml:mi><mml:mo>=</mml:mo><mml:mi mathvariant="italic">η</mml:mi><mml:mo>(</mml:mo><mml:mi>x</mml:mi></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M7" display="inline"><mml:mrow><mml:mi>y</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>; the bottom and top surfaces
are denoted by <inline-formula><mml:math id="M8" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mi mathvariant="normal">b</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M9" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mi mathvariant="normal">s</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, respectively. Total water column
depth is thus <inline-formula><mml:math id="M10" display="inline"><mml:mrow><mml:mi>H</mml:mi><mml:mo>=</mml:mo><mml:mi mathvariant="italic">η</mml:mi><mml:mo>+</mml:mo><mml:mi>h</mml:mi></mml:mrow></mml:math></inline-formula>. The two-dimensional horizontal domain is
denoted by <inline-formula><mml:math id="M11" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>.</p>
      <p id="d1e539">The horizontal momentum equation reads

              <disp-formula specific-use="align" content-type="numbered"><mml:math id="M12" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>⋅</mml:mo><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>)</mml:mo><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mo>(</mml:mo><mml:mi>w</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:mi>f</mml:mi><mml:msub><mml:mi mathvariant="bold-italic">e</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo>∧</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mi>p</mml:mi></mml:mrow></mml:mtd></mml:mtr><mml:mlabeledtr id="Ch1.E1"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>⋅</mml:mo><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi mathvariant="italic">ν</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow></mml:mfenced><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mo>∂</mml:mo><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mfenced open="(" close=")"><mml:mrow><mml:mi mathvariant="italic">ν</mml:mi><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

          where <inline-formula><mml:math id="M13" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>=</mml:mo><mml:mo>(</mml:mo><mml:mi>u</mml:mi></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M14" display="inline"><mml:mrow><mml:mi>v</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M15" display="inline"><mml:mi>w</mml:mi></mml:math></inline-formula> denote the horizontal and vertical
velocity, respectively; <inline-formula><mml:math id="M16" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the horizontal gradient
operator; <inline-formula><mml:math id="M17" display="inline"><mml:mo>∧</mml:mo></mml:math></inline-formula> denotes the cross product operator; <inline-formula><mml:math id="M18" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula> is the Coriolis
parameter; <inline-formula><mml:math id="M19" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">e</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the vertical unit vector; <inline-formula><mml:math id="M20" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> is the pressure;
and <inline-formula><mml:math id="M21" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ν</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M22" display="inline"><mml:mi mathvariant="italic">ν</mml:mi></mml:math></inline-formula> are the horizontal and vertical diffusivity,
respectively. Water density is defined as <inline-formula><mml:math id="M23" display="inline"><mml:mrow><mml:mi mathvariant="italic">ρ</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>+</mml:mo><mml:msup><mml:mi mathvariant="italic">ρ</mml:mi><mml:mo>′</mml:mo></mml:msup><mml:mo>(</mml:mo><mml:mi>T</mml:mi></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M24" display="inline"><mml:mi>S</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M25" display="inline"><mml:mrow><mml:mi>p</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>,
where <inline-formula><mml:math id="M26" display="inline"><mml:mi>T</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M27" display="inline"><mml:mi>S</mml:mi></mml:math></inline-formula> stand for temperature and salinity, respectively, and <inline-formula><mml:math id="M28" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> is
a constant reference density.</p>
      <p id="d1e857">Under the hydrostatic assumption, the horizontal pressure gradient can be
written as a combination of external, internal, and atmospheric pressure
gradients:

              <disp-formula id="Ch1.E2" content-type="numbered"><mml:math id="M29" display="block"><mml:mstyle displaystyle="true" class="stylechange"/><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mi>p</mml:mi><mml:mo>=</mml:mo><mml:mi>g</mml:mi><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mi mathvariant="italic">η</mml:mi><mml:mo>+</mml:mo><mml:mi>g</mml:mi><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mi>r</mml:mi><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:msub><mml:mi>p</mml:mi><mml:mi mathvariant="normal">atm</mml:mi></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

        where <inline-formula><mml:math id="M30" display="inline"><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mi mathvariant="normal">atm</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the atmospheric pressure acting on the sea surface, and

              <disp-formula id="Ch1.E3" content-type="numbered"><mml:math id="M31" display="block"><mml:mstyle displaystyle="true" class="stylechange"/><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mi>r</mml:mi><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mi>z</mml:mi><mml:mi mathvariant="italic">η</mml:mi></mml:munderover><mml:msup><mml:mi mathvariant="italic">ρ</mml:mi><mml:mo>′</mml:mo></mml:msup><mml:mi mathvariant="normal">d</mml:mi><mml:msup><mml:mi>z</mml:mi><mml:mo>′</mml:mo></mml:msup></mml:mrow></mml:math></disp-formula>

        is the baroclinic head. For brevity, the internal pressure gradient field is
denoted as <inline-formula><mml:math id="M32" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">F</mml:mi><mml:mi mathvariant="normal">pg</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mi>g</mml:mi><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mi>r</mml:mi></mml:mrow></mml:math></inline-formula>.</p>
      <?pagebreak page4362?><p id="d1e1005">Neglecting atmospheric pressure, the full horizontal momentum equation reads

              <disp-formula specific-use="align" content-type="numbered"><mml:math id="M33" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>⋅</mml:mo><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>)</mml:mo><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mo>(</mml:mo><mml:mi>w</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:mi>f</mml:mi><mml:msub><mml:mi mathvariant="bold-italic">e</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo>∧</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>+</mml:mo><mml:mi>g</mml:mi><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mi mathvariant="italic">η</mml:mi><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">F</mml:mi><mml:mi mathvariant="normal">pg</mml:mi></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mlabeledtr id="Ch1.E4"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>⋅</mml:mo><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ν</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow></mml:mfenced><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mo>∂</mml:mo><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mfenced close=")" open="("><mml:mrow><mml:mi mathvariant="italic">ν</mml:mi><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

          Vertical velocity <inline-formula><mml:math id="M34" display="inline"><mml:mi>w</mml:mi></mml:math></inline-formula> is diagnosed from the continuity equation:

              <disp-formula id="Ch1.E5" content-type="numbered"><mml:math id="M35" display="block"><mml:mstyle class="stylechange" displaystyle="true"/><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>⋅</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi>w</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>

        Water temperature and salinity are modeled with an advection–diffusion
equation of the form

              <disp-formula id="Ch1.E6" content-type="numbered"><mml:math id="M36" display="block"><mml:mstyle displaystyle="true" class="stylechange"/><mml:mrow><?xmltex \hack{\hbox\bgroup\fontsize{9}{9}\selectfont$\displaystyle}?><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi>T</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>⋅</mml:mo><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>T</mml:mi><mml:mo>)</mml:mo><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mo>(</mml:mo><mml:mi>w</mml:mi><mml:mi>T</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>⋅</mml:mo><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi mathvariant="italic">μ</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mi>T</mml:mi></mml:mrow></mml:mfenced><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mo>∂</mml:mo><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mfenced close=")" open="("><mml:mrow><mml:mi mathvariant="italic">μ</mml:mi><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi>T</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced><mml:mo>,</mml:mo><?xmltex \hack{$\egroup}?></mml:mrow></mml:math></disp-formula>

        where <inline-formula><mml:math id="M37" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">μ</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M38" display="inline"><mml:mi mathvariant="italic">μ</mml:mi></mml:math></inline-formula> stand for the horizontal and vertical (eddy) diffusivity, respectively.</p>
      <p id="d1e1335">At the bottom boundary, we impose quadratic bottom stress:

              <disp-formula specific-use="align" content-type="numbered"><mml:math id="M39" display="block"><mml:mtable displaystyle="true"><mml:mlabeledtr id="Ch1.E7"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi mathvariant="italic">ν</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>⋅</mml:mo><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>+</mml:mo><mml:mi mathvariant="italic">ν</mml:mi><mml:msub><mml:mi>n</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced><mml:mfenced open="|" close=""><mml:mrow><mml:msub><mml:mi/><mml:mrow><mml:mi>x</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mi mathvariant="normal">b</mml:mi></mml:msub></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">τ</mml:mi><mml:mi mathvariant="normal">b</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>,</mml:mo></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E8"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">τ</mml:mi><mml:mi mathvariant="normal">b</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">d</mml:mi></mml:msub><mml:mo>|</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="normal">bf</mml:mi></mml:msub><mml:mo>|</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="normal">bf</mml:mi></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

          where <inline-formula><mml:math id="M40" display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">d</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the drag coefficient, and <inline-formula><mml:math id="M41" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="normal">bf</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the velocity in
the middle of the bottommost element. <inline-formula><mml:math id="M42" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mo>=</mml:mo><mml:mo>(</mml:mo><mml:msub><mml:mi>n</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M43" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M44" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> is the
outward normal vector, and <inline-formula><mml:math id="M45" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo>(</mml:mo><mml:msub><mml:mi>n</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M46" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, 0) its horizontal
projection. The bottom boundary condition is treated implicitly;
Eq. (<xref ref-type="disp-formula" rid="Ch1.E8"/>) is linearized by keeping the magnitude
<inline-formula><mml:math id="M47" display="inline"><mml:mrow><mml:mo>|</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="normal">bf</mml:mi></mml:msub><mml:mo>|</mml:mo></mml:mrow></mml:math></inline-formula> fixed at the “old” value while solving for <inline-formula><mml:math id="M48" display="inline"><mml:mi mathvariant="bold-italic">u</mml:mi></mml:math></inline-formula>
(and <inline-formula><mml:math id="M49" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="normal">bf</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>). Typically, <inline-formula><mml:math id="M50" display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">d</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is computed from the logarithmic law
of the wall <xref ref-type="bibr" rid="bib1.bibx50" id="paren.47"><named-content content-type="pre">e.g.,</named-content></xref>.</p>
<sec id="Ch1.S2.SS1">
  <title>Mode splitting</title>
      <p id="d1e1620">Following <xref ref-type="bibr" rid="bib1.bibx41" id="text.48"/>, we split the horizontal velocity field into
depth-averaged <inline-formula><mml:math id="M51" display="inline"><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover></mml:math></inline-formula> and deviation <inline-formula><mml:math id="M52" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>′</mml:mo></mml:msup><mml:mo>=</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>-</mml:mo><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover></mml:mrow></mml:math></inline-formula>
components. The depth-averaged momentum equation is then defined as

                <disp-formula id="Ch1.E9" content-type="numbered"><mml:math id="M53" display="block"><mml:mstyle class="stylechange" displaystyle="true"/><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:mi>f</mml:mi><mml:msub><mml:mi mathvariant="bold-italic">e</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo>∧</mml:mo><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mo>+</mml:mo><mml:mi>g</mml:mi><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mi mathvariant="italic">η</mml:mi><mml:mo>=</mml:mo><mml:mi mathvariant="bold-italic">G</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M54" display="inline"><mml:mi mathvariant="bold-italic">G</mml:mi></mml:math></inline-formula> is a forcing term used to couple the 2-D and 3-D modes. This
equation is complemented with the depth-averaged continuity (free surface) equation:

                <disp-formula id="Ch1.E10" content-type="numbered"><mml:math id="M55" display="block"><mml:mstyle displaystyle="true" class="stylechange"/><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi mathvariant="italic">η</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>⋅</mml:mo><mml:mo>(</mml:mo><mml:mi>H</mml:mi><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>

          The 2-D system (Eqs. <xref ref-type="disp-formula" rid="Ch1.E9"/>–<xref ref-type="disp-formula" rid="Ch1.E10"/>) contains the
fast-propagating, rotational surface gravity waves. The corresponding
equation for <inline-formula><mml:math id="M56" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>′</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula> is obtained by subtracting Eq. (<xref ref-type="disp-formula" rid="Ch1.E9"/>) from
Eq. (<xref ref-type="disp-formula" rid="Ch1.E4"/>) <xref ref-type="bibr" rid="bib1.bibx41" id="paren.49"/>:

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M57" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>′</mml:mo></mml:msup></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>⋅</mml:mo><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>)</mml:mo><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mo>(</mml:mo><mml:mi>w</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:mi>f</mml:mi><mml:msub><mml:mi mathvariant="bold-italic">e</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo>∧</mml:mo><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>′</mml:mo></mml:msup><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">F</mml:mi><mml:mi mathvariant="normal">pg</mml:mi></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mlabeledtr id="Ch1.E11"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>⋅</mml:mo><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ν</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow></mml:mfenced><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mo>∂</mml:mo><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mfenced close=")" open="("><mml:mrow><mml:mi mathvariant="italic">ν</mml:mi><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced><mml:mo>-</mml:mo><mml:mi mathvariant="bold-italic">G</mml:mi><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            Note that the advection and viscosity terms are included in Eq. (<xref ref-type="disp-formula" rid="Ch1.E11"/>)
without splitting, based on the assumption that these processes are slow
enough to be captured with long time steps. The Coriolis term, on the other
hand, only contains the slow modes. The vertical velocity <inline-formula><mml:math id="M58" display="inline"><mml:mi>w</mml:mi></mml:math></inline-formula> only appears in
the advection term, which is not split, and thus there is no need to split <inline-formula><mml:math id="M59" display="inline"><mml:mi>w</mml:mi></mml:math></inline-formula>.</p>
</sec>
<sec id="Ch1.S2.SS2">
  <title>Coupling 2-D and 3-D modes</title>
      <p id="d1e1963">The 2-D and 3-D modes are coupled using the additional term <inline-formula><mml:math id="M60" display="inline"><mml:mi mathvariant="bold-italic">G</mml:mi></mml:math></inline-formula>
<xref ref-type="bibr" rid="bib1.bibx41 bib1.bibx71" id="paren.50"/>. First, the 3-D momentum equation
(Eq. <xref ref-type="disp-formula" rid="Ch1.E11"/>) is solved with <inline-formula><mml:math id="M61" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">G</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula>, resulting in a velocity
field <inline-formula><mml:math id="M62" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>′</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula> that has a non-zero depth average, generated by the advection
and viscosity terms (that depend on <inline-formula><mml:math id="M63" display="inline"><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover></mml:math></inline-formula>). We then compute the
depth-averaged <inline-formula><mml:math id="M64" display="inline"><mml:mover accent="true"><mml:mrow><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>′</mml:mo></mml:msup></mml:mrow><mml:mo mathvariant="normal">‾</mml:mo></mml:mover></mml:math></inline-formula> and apply a correction:

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M65" display="block"><mml:mtable displaystyle="true"><mml:mlabeledtr id="Ch1.E12"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mi mathvariant="bold-italic">G</mml:mi><mml:mo>=</mml:mo><mml:mover accent="true"><mml:mrow><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>′</mml:mo></mml:msup></mml:mrow><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mo>/</mml:mo><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>t</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E13"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>′</mml:mo></mml:msup><mml:mo>←</mml:mo><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>′</mml:mo></mml:msup><mml:mo>-</mml:mo><mml:mi mathvariant="bold-italic">G</mml:mi><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            to enforce zero depth average. By definition, the field <inline-formula><mml:math id="M66" display="inline"><mml:mi mathvariant="bold-italic">G</mml:mi></mml:math></inline-formula> is a
constant over the vertical, and it will be used as a forcing term in the 2-D
momentum equation (Eq. <xref ref-type="disp-formula" rid="Ch1.E9"/>) in the subsequent solve. This procedure
ensures that Eqs. (<xref ref-type="disp-formula" rid="Ch1.E9"/>) and (<xref ref-type="disp-formula" rid="Ch1.E11"/>) sum up to
Eq. (<xref ref-type="disp-formula" rid="Ch1.E4"/>) and <inline-formula><mml:math id="M67" display="inline"><mml:mrow><mml:mo>∫</mml:mo><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>′</mml:mo></mml:msup><mml:mi mathvariant="normal">d</mml:mi><mml:mi>z</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula>.</p>
</sec>
<sec id="Ch1.S2.SS3">
  <title>Equation of state</title>
      <p id="d1e2128">In this paper, a linear equation of state is used:

                <disp-formula id="Ch1.E14" content-type="numbered"><mml:math id="M68" display="block"><mml:mstyle displaystyle="true" class="stylechange"/><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mi mathvariant="italic">ρ</mml:mi><mml:mo>(</mml:mo><mml:mi>T</mml:mi><mml:mo>,</mml:mo><mml:mi>S</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mi mathvariant="normal">T</mml:mi></mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:mi>T</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mi>T</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:mfenced><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mi mathvariant="normal">S</mml:mi></mml:msub><mml:mfenced open="(" close=")"><mml:mrow><mml:mi>S</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M69" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mi mathvariant="normal">T</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M70" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mi mathvariant="normal">S</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> are the thermal expansion and saline contraction
coefficients, respectively, and <inline-formula><mml:math id="M71" display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M72" display="inline"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> are reference temperature and
salinity. In all the test cases presented herein, salinity does not contribute
to water density (<inline-formula><mml:math id="M73" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mi mathvariant="normal">S</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula>). Thetis also implements a full non-linear
equation of state <xref ref-type="bibr" rid="bib1.bibx45" id="paren.51"/>.</p>
</sec>
<sec id="Ch1.S2.SS4">
  <title>Viscosity and turbulence closure</title>
      <p id="d1e2266">Baroclinic flows require some form of viscosity to filter out grid-scale
noise. In this paper, we only consider Laplacian horizontal viscosity, set to
a constant <inline-formula><mml:math id="M74" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ν</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mi>U</mml:mi><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>x</mml:mi><mml:mo>/</mml:mo></mml:mrow></mml:math></inline-formula><italic>Re</italic><inline-formula><mml:math id="M75" display="inline"><mml:msub><mml:mi/><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:math></inline-formula> corresponding to the velocity
scale <inline-formula><mml:math id="M76" display="inline"><mml:mi>U</mml:mi></mml:math></inline-formula>, horizontal mesh resolution <inline-formula><mml:math id="M77" display="inline"><mml:mrow><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>x</mml:mi></mml:mrow></mml:math></inline-formula>, and the desired grid
Reynolds number <italic>Re</italic><inline-formula><mml:math id="M78" display="inline"><mml:msub><mml:mi/><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:math></inline-formula>. Here, the velocity scale <inline-formula><mml:math id="M79" display="inline"><mml:mi>U</mml:mi></mml:math></inline-formula> is taken as a
global constant specific to each test case. Unless otherwise specified, the
horizontal diffusivity of tracers is zero.</p>
      <?pagebreak page4363?><p id="d1e2336">In most test cases, vertical viscosity is set to a constant. In certain
cases, we use the gradient Richardson number dependent parameterization by <xref ref-type="bibr" rid="bib1.bibx63" id="text.52"/>:

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M80" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mi mathvariant="italic">ν</mml:mi><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ν</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>+</mml:mo><mml:mi mathvariant="italic">α</mml:mi><mml:mtext mathvariant="italic">Ri</mml:mtext><mml:msup><mml:mo>)</mml:mo><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="italic">ν</mml:mi><mml:mi mathvariant="normal">b</mml:mi></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr><mml:mlabeledtr id="Ch1.E15"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mi mathvariant="italic">μ</mml:mi><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi mathvariant="italic">ν</mml:mi><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>+</mml:mo><mml:mi mathvariant="italic">α</mml:mi><mml:mtext mathvariant="italic">Ri</mml:mtext></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="italic">μ</mml:mi><mml:mi mathvariant="normal">b</mml:mi></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            where <inline-formula><mml:math id="M81" display="inline"><mml:mrow><mml:mtext mathvariant="italic">Ri</mml:mtext><mml:mo>=</mml:mo><mml:msup><mml:mi>N</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mo>/</mml:mo><mml:msup><mml:mi>M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula> is the gradient Richardson number, <inline-formula><mml:math id="M82" display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula> is the
buoyancy frequency, and <inline-formula><mml:math id="M83" display="inline"><mml:mi>M</mml:mi></mml:math></inline-formula> is the vertical shear frequency. The background
values are set to <inline-formula><mml:math id="M84" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ν</mml:mi><mml:mi mathvariant="normal">b</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="italic">μ</mml:mi><mml:mi mathvariant="normal">b</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">5</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> m<inline-formula><mml:math id="M85" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> s<inline-formula><mml:math id="M86" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>, while
maximum viscosity is set to <inline-formula><mml:math id="M87" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ν</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> m<inline-formula><mml:math id="M88" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> s<inline-formula><mml:math id="M89" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>; the
dimensionless parameters are <inline-formula><mml:math id="M90" display="inline"><mml:mrow><mml:mi mathvariant="italic">α</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">10</mml:mn></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M91" display="inline"><mml:mrow><mml:mi>n</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:math></inline-formula> <xref ref-type="bibr" rid="bib1.bibx82" id="paren.53"/>. More
sophisticated turbulence closures will be addressed in future work.</p>
</sec>
</sec>
<sec id="Ch1.S3">
  <title>Finite element discretization</title>
      <p id="d1e2595">This section describes the spatial discretization of the governing equations.
In Sect. <xref ref-type="sec" rid="Ch1.S3.SS1"/>, we define the finite element function
spaces, followed by the weak forms of the underlying equations.</p>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T1"><caption><p id="d1e2603">Prognostic and diagnostic variables and their function spaces.</p></caption><oasis:table frame="topbot"><oasis:tgroup cols="4">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="left"/>
     <oasis:colspec colnum="3" colname="col3" align="center"/>
     <oasis:colspec colnum="4" colname="col4" align="left"/>
     <oasis:thead>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1">Field</oasis:entry>
         <oasis:entry colname="col2">Symbol</oasis:entry>
         <oasis:entry colname="col3">Equation</oasis:entry>
         <oasis:entry colname="col4">Function space</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row rowsep="1">
         <oasis:entry namest="col1" nameend="col4" align="center">Prognostic variables </oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">Water elevation</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M92" display="inline"><mml:mi mathvariant="italic">η</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3">(<xref ref-type="disp-formula" rid="Ch1.E23"/>)</oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M93" display="inline"><mml:mrow><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula></oasis:entry>
       <?xmltex \interline{[2.845276pt]}?></oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">Depth av. velocity</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M94" display="inline"><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3">(<xref ref-type="disp-formula" rid="Ch1.E24"/>)</oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M95" display="inline"><mml:mrow><mml:mo>[</mml:mo><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup><mml:msup><mml:mo>]</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula></oasis:entry>
       <?xmltex \interline{[2.845276pt]}?></oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">Horizontal velocity</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M96" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>′</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3">(<xref ref-type="disp-formula" rid="Ch1.E25"/>)</oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M97" display="inline"><mml:mrow><mml:mo>[</mml:mo><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup><mml:mo>×</mml:mo><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup><mml:msup><mml:mo>]</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula></oasis:entry>
       <?xmltex \interline{[2.845276pt]}?></oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">Water temperature</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M98" display="inline"><mml:mi>T</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3">(<xref ref-type="disp-formula" rid="Ch1.E26"/>)</oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M99" display="inline"><mml:mrow><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup><mml:mo>×</mml:mo><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula></oasis:entry>
       <?xmltex \interline{[2.845276pt]}?></oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1">Water salinity</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M100" display="inline"><mml:mi>S</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3">(<xref ref-type="disp-formula" rid="Ch1.E26"/>)</oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M101" display="inline"><mml:mrow><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup><mml:mo>×</mml:mo><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula></oasis:entry>
       <?xmltex \interline{[2.845276pt]}?></oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry namest="col1" nameend="col4" align="center">Diagnostic variables </oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">Vertical velocity</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M102" display="inline"><mml:mi>w</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3">(<xref ref-type="disp-formula" rid="Ch1.E31"/>)</oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M103" display="inline"><mml:mrow><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup><mml:mo>×</mml:mo><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula></oasis:entry>
       <?xmltex \interline{[2.845276pt]}?></oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">Water density</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M104" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="italic">ρ</mml:mi><mml:mo>′</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3">(<xref ref-type="disp-formula" rid="Ch1.E14"/>)</oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M105" display="inline"><mml:mrow><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup><mml:mo>×</mml:mo><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula></oasis:entry>
       <?xmltex \interline{[2.845276pt]}?></oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">Baroclinic head</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M106" display="inline"><mml:mi>r</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3">(<xref ref-type="disp-formula" rid="Ch1.E32"/>)</oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M107" display="inline"><mml:mrow><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup><mml:mo>×</mml:mo><mml:msub><mml:mi>P</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
       <?xmltex \interline{[2.845276pt]}?></oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">Int. pressure grad.</oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M108" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">F</mml:mi><mml:mi mathvariant="normal">pg</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3">(<xref ref-type="disp-formula" rid="Ch1.E33"/>)</oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M109" display="inline"><mml:mrow><mml:mo>[</mml:mo><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup><mml:mo>×</mml:mo><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup><mml:msup><mml:mo>]</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula></oasis:entry>
       <?xmltex \interline{[2.845276pt]}?></oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table></table-wrap>

<sec id="Ch1.S3.SS1">
  <title>Function spaces</title>
      <p id="d1e3053">The prognostic variables of the coupled 2-D–3-D system
(Eqs. <xref ref-type="disp-formula" rid="Ch1.E9"/>, <xref ref-type="disp-formula" rid="Ch1.E10"/>, <xref ref-type="disp-formula" rid="Ch1.E11"/>, <xref ref-type="disp-formula" rid="Ch1.E6"/>)
are <inline-formula><mml:math id="M110" display="inline"><mml:mi mathvariant="italic">η</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M111" display="inline"><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover></mml:math></inline-formula>, <inline-formula><mml:math id="M112" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>′</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M113" display="inline"><mml:mi>T</mml:mi></mml:math></inline-formula>, and <inline-formula><mml:math id="M114" display="inline"><mml:mi>S</mml:mi></mml:math></inline-formula>. Diagnostic variables include
the vertical velocity <inline-formula><mml:math id="M115" display="inline"><mml:mi>w</mml:mi></mml:math></inline-formula>, water density <inline-formula><mml:math id="M116" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="italic">ρ</mml:mi><mml:mo>′</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula>, baroclinic head <inline-formula><mml:math id="M117" display="inline"><mml:mi>r</mml:mi></mml:math></inline-formula>, and
internal pressure gradient <inline-formula><mml:math id="M118" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">F</mml:mi><mml:mi mathvariant="normal">pg</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>. The choice of function
spaces where these variables reside is crucial for numerical stability and accuracy.</p>
      <p id="d1e3144">Our discretization is based on the linear discontinuous Galerkin function
space, <inline-formula><mml:math id="M119" display="inline"><mml:mrow><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula>. The 2-D system is discretized with a
<inline-formula><mml:math id="M120" display="inline"><mml:mrow><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup><mml:mo>-</mml:mo><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> velocity–pressure finite
element pair: water elevation and both components of the depth-averaged
velocity are approximated in <inline-formula><mml:math id="M121" display="inline"><mml:mrow><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> space,
i.e., <inline-formula><mml:math id="M122" display="inline"><mml:mrow><mml:mi mathvariant="italic">η</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula>,
<inline-formula><mml:math id="M123" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="script">U</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mo>[</mml:mo><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup><mml:msup><mml:mo>]</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula>. When
embedded with appropriate Riemann fluxes at element interfaces, the
<inline-formula><mml:math id="M124" display="inline"><mml:mrow><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup><mml:mo>-</mml:mo><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> element pair is well suited
for rotational shallow water problems <xref ref-type="bibr" rid="bib1.bibx17 bib1.bibx48" id="paren.54"/>.</p>
      <p id="d1e3286"><?xmltex \hack{\newpage}?>Achieving an accurate and monotone 3-D tracer advection scheme is one of our
main design criteria. The tracers, therefore, are also considered within a
discontinuous function space,
<inline-formula><mml:math id="M125" display="inline"><mml:mi>T</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M126" display="inline"><mml:mrow><mml:mi>S</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="script">H</mml:mi><mml:mo>=</mml:mo><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup><mml:mo>×</mml:mo><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> (here,
the <inline-formula><mml:math id="M127" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> operator stands for the Cartesian product of function spaces in
the extruded mesh: horizontal <inline-formula><mml:math id="M128" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> vertical function space). Tracer
consistency (sometimes called local tracer conservation) is a necessary
condition for monotonicity; it ensures that a constant tracer field does not
exhibit spurious local extrema. In practice, it implies that the discrete
tracer equation must reduce to the discrete continuity equation for a
constant tracer. In this work, we satisfy this property by requiring the
vertical velocity to belong to the tracer space <inline-formula><mml:math id="M129" display="inline"><mml:mi mathvariant="script">H</mml:mi></mml:math></inline-formula>
<xref ref-type="bibr" rid="bib1.bibx85" id="paren.55"/>. In addition, compatibility between the 2-D and 3-D momentum
equations requires that the 3-D horizontal velocity must be
<inline-formula><mml:math id="M130" display="inline"><mml:mrow><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> in the horizontal direction. We therefore set
<inline-formula><mml:math id="M131" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>′</mml:mo></mml:msup><mml:mo>∈</mml:mo><mml:mi mathvariant="script">U</mml:mi><mml:mo>=</mml:mo><mml:mo>[</mml:mo><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup><mml:mo>×</mml:mo><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup><mml:msup><mml:mo>]</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula> as well.
The used function spaces are summarized in Table <xref ref-type="table" rid="Ch1.T1"/>.</p>
      <p id="d1e3407">Note that this choice of function spaces is not mimetic
<xref ref-type="bibr" rid="bib1.bibx60 bib1.bibx21" id="paren.56"/>: the discrete system does not preserve all the
properties of the continuous equations; for example, enstrophy is not
conserved exactly. As the coastal ocean is generally very dissipative,
maintaining mimetic properties is, however, not crucial. It is possible to
define a mimetic discretization as well, for example, using Raviart–Thomas
elements for the velocity, i.e., element pair
RT<inline-formula><mml:math id="M132" display="inline"><mml:mrow><mml:msub><mml:mi/><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>-</mml:mo><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> <xref ref-type="bibr" rid="bib1.bibx60" id="paren.57"/>. Our preliminary
experiments, however, indicate that this choice significantly increases the
computational cost of the system, without a corresponding improvement in
accuracy. Formal assessment of the performance of mimetic discretizations in
coastal ocean applications will be investigated in the future.</p>
      <p id="d1e3436">In the weak forms, we use the following notation for volume and interface
integrals:

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M133" display="block"><mml:mtable displaystyle="true"><mml:mlabeledtr id="Ch1.E16"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo>•</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:munder><mml:mo>•</mml:mo><mml:mi mathvariant="normal">d</mml:mi><mml:mi mathvariant="bold">x</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E17"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo>•</mml:mo><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:mo>∂</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mrow><mml:mo>∂</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:mrow></mml:munder><mml:mo>•</mml:mo><mml:mi mathvariant="normal">d</mml:mi><mml:mi>s</mml:mi><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            In interface terms, we additionally use the average <inline-formula><mml:math id="M134" display="inline"><mml:mrow><mml:mo mathvariant="italic">{</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mo>⋅</mml:mo><mml:mo mathvariant="italic">}</mml:mo><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula> and jump <inline-formula><mml:math id="M135" display="inline"><mml:mrow><mml:mo>[</mml:mo><mml:mo>[</mml:mo><mml:mo>⋅</mml:mo><mml:mo>]</mml:mo><mml:mo>]</mml:mo></mml:mrow></mml:math></inline-formula>
operators for scalar <inline-formula><mml:math id="M136" display="inline"><mml:mi>a</mml:mi></mml:math></inline-formula> and vector <inline-formula><mml:math id="M137" display="inline"><mml:mi mathvariant="bold-italic">u</mml:mi></mml:math></inline-formula> fields:

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M138" display="block"><mml:mtable displaystyle="true"><mml:mlabeledtr id="Ch1.E18"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo mathvariant="italic">{</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mi>a</mml:mi><mml:mo mathvariant="italic">}</mml:mo><mml:mo mathvariant="italic">}</mml:mo><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mfenced close=")" open="("><mml:mrow><mml:msup><mml:mi>a</mml:mi><mml:mo>+</mml:mo></mml:msup><mml:mo>+</mml:mo><mml:msup><mml:mi>a</mml:mi><mml:mo>-</mml:mo></mml:msup></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E19"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo mathvariant="italic">{</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="italic">}</mml:mo><mml:mo mathvariant="italic">}</mml:mo><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mfenced close=")" open="("><mml:mrow><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>+</mml:mo></mml:msup><mml:mo>+</mml:mo><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>-</mml:mo></mml:msup></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E20"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo>[</mml:mo><mml:mo>[</mml:mo><mml:mi>a</mml:mi><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mo>]</mml:mo><mml:mo>]</mml:mo><mml:mo>=</mml:mo><mml:msup><mml:mi>a</mml:mi><mml:mo>+</mml:mo></mml:msup><mml:msup><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mo>+</mml:mo></mml:msup><mml:mo>+</mml:mo><mml:msup><mml:mi>a</mml:mi><mml:mo>-</mml:mo></mml:msup><mml:msup><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mo>-</mml:mo></mml:msup><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E21"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo>[</mml:mo><mml:mo>[</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>⋅</mml:mo><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mo>]</mml:mo><mml:mo>]</mml:mo><mml:mo>=</mml:mo><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>+</mml:mo></mml:msup><mml:mo>⋅</mml:mo><mml:msup><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mo>+</mml:mo></mml:msup><mml:mo>+</mml:mo><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>-</mml:mo></mml:msup><mml:mo>⋅</mml:mo><mml:msup><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mo>-</mml:mo></mml:msup><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E22"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>[</mml:mo><mml:mo>[</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mo>]</mml:mo><mml:mo>]</mml:mo><mml:mo>=</mml:mo><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>+</mml:mo></mml:msup><mml:msup><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mo>+</mml:mo></mml:msup><mml:mo>+</mml:mo><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>-</mml:mo></mml:msup><mml:msup><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mo>-</mml:mo></mml:msup><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            where the superscripts “<inline-formula><mml:math id="M139" display="inline"><mml:mo>+</mml:mo></mml:math></inline-formula>” and “<inline-formula><mml:math id="M140" display="inline"><mml:mo>-</mml:mo></mml:math></inline-formula>” arbitrarily label the values on either
side of the interface, and <inline-formula><mml:math id="M141" display="inline"><mml:mi mathvariant="bold-italic">n</mml:mi></mml:math></inline-formula> is the outward unit normal vector of
each element on the interface.</p><?xmltex \hack{\newpage}?>
</sec>
<?pagebreak page4364?><sec id="Ch1.S3.SS2">
  <title>2-D system</title>
      <p id="d1e3825">Let <inline-formula><mml:math id="M142" display="inline"><mml:mi mathvariant="script">T</mml:mi></mml:math></inline-formula> stand for the triangulation of the 2-D domain <inline-formula><mml:math id="M143" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>.
The set of element interfaces is denoted by <inline-formula><mml:math id="M144" display="inline"><mml:mrow><mml:mi mathvariant="script">I</mml:mi><mml:mo>=</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mi>k</mml:mi><mml:mo>∩</mml:mo><mml:msup><mml:mi>k</mml:mi><mml:mo>′</mml:mo></mml:msup><mml:mi mathvariant="normal">|</mml:mi><mml:mi>k</mml:mi><mml:mo>,</mml:mo><mml:msup><mml:mi>k</mml:mi><mml:mo>′</mml:mo></mml:msup><mml:mo>∈</mml:mo><mml:mi mathvariant="script">T</mml:mi><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula>,
and <inline-formula><mml:math id="M145" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mo>=</mml:mo><mml:mo>(</mml:mo><mml:msub><mml:mi>n</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M146" display="inline"><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>y</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> the outward unit normal
vector of an interface <inline-formula><mml:math id="M147" display="inline"><mml:mrow><mml:mi>e</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="script">I</mml:mi></mml:mrow></mml:math></inline-formula>. For brevity, boundary conditions are
omitted from the weak forms.</p>
      <p id="d1e3928">Let <inline-formula><mml:math id="M148" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> and
<inline-formula><mml:math id="M149" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="script">U</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> be test functions
in the 2-D function spaces. The weak formulation of the 2-D system then
reads: find <inline-formula><mml:math id="M150" display="inline"><mml:mrow><mml:mi mathvariant="italic">η</mml:mi><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M151" display="inline"><mml:mrow><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="script">U</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> such that

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M152" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo mathsize="1.5em">〈</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi mathvariant="italic">η</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:msub><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo>+</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mfenced open="(" close=")"><mml:mrow><mml:msup><mml:mi>H</mml:mi><mml:mo>*</mml:mo></mml:msup><mml:msup><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mo>*</mml:mo></mml:msup></mml:mrow></mml:mfenced><mml:mo>⋅</mml:mo><mml:mfenced open="[" close="]"><mml:mfenced close="]" open="["><mml:mrow><mml:msub><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:mi mathvariant="bold-italic">n</mml:mi></mml:mrow></mml:mfenced></mml:mfenced><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mi mathvariant="script">I</mml:mi></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mlabeledtr id="Ch1.E23"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo>-</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo>(</mml:mo><mml:mi>H</mml:mi><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mo>)</mml:mo><mml:mo>⋅</mml:mo><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            <?xmltex \hack{\vspace*{-6mm}}?>

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M153" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo mathsize="1.5em">〈</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>⋅</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>+</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mi>f</mml:mi><mml:msub><mml:mi mathvariant="bold-italic">e</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo>∧</mml:mo><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mo>⋅</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mi>g</mml:mi><mml:msup><mml:mi mathvariant="italic">η</mml:mi><mml:mo>*</mml:mo></mml:msup><mml:mfenced open="[" close="]"><mml:mfenced open="[" close="]"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:mo>⋅</mml:mo><mml:mi mathvariant="bold-italic">n</mml:mi></mml:mrow></mml:mfenced></mml:mfenced><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mi mathvariant="script">I</mml:mi></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>-</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mi>g</mml:mi><mml:mi mathvariant="italic">η</mml:mi><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>⋅</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mi mathvariant="bold-italic">G</mml:mi><mml:mo>⋅</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr><mml:mlabeledtr id="Ch1.E24"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo>∀</mml:mo><mml:msub><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="script">H</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:mo>∈</mml:mo><mml:msub><mml:mi mathvariant="script">U</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            Here, the divergence
<inline-formula><mml:math id="M154" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>⋅</mml:mo><mml:mo>(</mml:mo><mml:mi>H</mml:mi><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> and external
gradient <inline-formula><mml:math id="M155" display="inline"><mml:mrow><mml:mi>g</mml:mi><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mi mathvariant="italic">η</mml:mi></mml:mrow></mml:math></inline-formula> terms have been integrated by parts.
The resulting interface terms are defined on the element edges where the
state variables <inline-formula><mml:math id="M156" display="inline"><mml:mi mathvariant="italic">η</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M157" display="inline"><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover></mml:math></inline-formula> are not uniquely defined. The
values <inline-formula><mml:math id="M158" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="italic">η</mml:mi><mml:mo>*</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M159" display="inline"><mml:mrow><mml:msup><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mo>*</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula> are obtained from an approximate Riemann solver;
here, we use the linear Roe solution <inline-formula><mml:math id="M160" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="italic">η</mml:mi><mml:mo>*</mml:mo></mml:msup><mml:mo mathvariant="italic">{</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mi mathvariant="italic">η</mml:mi><mml:mo mathvariant="italic">}</mml:mo><mml:mo mathvariant="italic">}</mml:mo><mml:mo>+</mml:mo><mml:msqrt><mml:mrow><mml:mi>H</mml:mi><mml:mo>/</mml:mo><mml:mi>g</mml:mi></mml:mrow></mml:msqrt><mml:mo>[</mml:mo><mml:mo>[</mml:mo><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mo>⋅</mml:mo><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mo>]</mml:mo><mml:mo>]</mml:mo></mml:mrow></mml:math></inline-formula>
and <inline-formula><mml:math id="M161" display="inline"><mml:mrow><mml:msup><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mo>*</mml:mo></mml:msup><mml:mo>=</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mo mathvariant="italic">}</mml:mo><mml:mo mathvariant="italic">}</mml:mo><mml:mo>+</mml:mo><mml:msqrt><mml:mrow><mml:mi>g</mml:mi><mml:mo>/</mml:mo><mml:mi>H</mml:mi></mml:mrow></mml:msqrt><mml:mo>[</mml:mo><mml:mo>[</mml:mo><mml:mi mathvariant="italic">η</mml:mi><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mo>]</mml:mo><mml:mo>]</mml:mo></mml:mrow></mml:math></inline-formula> <xref ref-type="bibr" rid="bib1.bibx17" id="paren.58"/>.</p>
</sec>
<sec id="Ch1.S3.SS3">
  <title>Momentum equation</title>
      <p id="d1e4627">Let <inline-formula><mml:math id="M162" display="inline"><mml:mi mathvariant="script">P</mml:mi></mml:math></inline-formula> denote the set of prisms of the 3-D domain <inline-formula><mml:math id="M163" display="inline"><mml:mi mathvariant="normal">Ω</mml:mi></mml:math></inline-formula>,
obtained from a vertical extrusion of <inline-formula><mml:math id="M164" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>. The set of horizontal and
vertical interfaces is denoted by <inline-formula><mml:math id="M165" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M166" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>,
respectively. Let <inline-formula><mml:math id="M167" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="script">U</mml:mi></mml:mrow></mml:math></inline-formula> be a test function. The
weak formulation of the 3-D momentum equation then reads: find <inline-formula><mml:math id="M168" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="script">U</mml:mi></mml:mrow></mml:math></inline-formula> such that

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M169" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo mathsize="1.5em">〈</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>′</mml:mo></mml:msup></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>⋅</mml:mo><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:msub></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>-</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:mo>:</mml:mo><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>)</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="normal">up</mml:mi></mml:msup><mml:mo>⋅</mml:mo><mml:mfenced open="[" close="]"><mml:mfenced open="[" close="]"><mml:mrow><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:msub><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mo>⋅</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="italic">}</mml:mo><mml:mo mathvariant="italic">}</mml:mo><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>∪</mml:mo><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo>-</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo>(</mml:mo><mml:mi>w</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>)</mml:mo><mml:mo>⋅</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi mathvariant="bold-italic">ψ</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="normal">up</mml:mi></mml:msup><mml:mo>⋅</mml:mo><mml:mfenced close="]" open="["><mml:mfenced close="]" open="["><mml:mrow><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:msub><mml:mi>n</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mo mathvariant="italic">{</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mi>w</mml:mi><mml:mo mathvariant="italic">}</mml:mo><mml:mo mathvariant="italic">}</mml:mo><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>+</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mi>f</mml:mi><mml:msub><mml:mi mathvariant="bold-italic">e</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo>∧</mml:mo><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>′</mml:mo></mml:msup><mml:mo>⋅</mml:mo><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">F</mml:mi><mml:mi mathvariant="normal">pg</mml:mi></mml:msub><mml:mo>⋅</mml:mo><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>+</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:msub><mml:mi mathvariant="italic">γ</mml:mi><mml:mi mathvariant="normal">lf</mml:mi></mml:msub><mml:mo>[</mml:mo><mml:mo>[</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>]</mml:mo><mml:mo>]</mml:mo><mml:mo>⋅</mml:mo><mml:mo>[</mml:mo><mml:mo>[</mml:mo><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:mo>]</mml:mo><mml:mo>]</mml:mo><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>∪</mml:mo><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:msub></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>D</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mtd></mml:mtr><mml:mlabeledtr id="Ch1.E25"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo>+</mml:mo><mml:msub><mml:mi>D</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:mo>)</mml:mo><mml:mo>,</mml:mo><mml:mo>∀</mml:mo><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="script">U</mml:mi><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            Here, the advection and viscosity terms have been integrated by parts
<xref ref-type="bibr" rid="bib1.bibx50" id="paren.59"><named-content content-type="pre">see</named-content></xref>; the colon operator is the Frobenius inner product,
<inline-formula><mml:math id="M170" display="inline"><mml:mrow><mml:mi mathvariant="bold">A</mml:mi><mml:mo>:</mml:mo><mml:mi mathvariant="bold">B</mml:mi><mml:mo>=</mml:mo><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:munder><mml:msub><mml:mi>A</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mi>B</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>, and
<inline-formula><mml:math id="M171" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="normal">up</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula> stands for the upwind value at the interface. The
internal pressure gradient term has been augmented with the Lax–Friedrichs
flux with parameter <inline-formula><mml:math id="M172" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">γ</mml:mi><mml:mi mathvariant="normal">lf</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mo>|</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>|</mml:mo><mml:mo mathvariant="italic">}</mml:mo><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula>.
Adding such a flux is required to stabilize the internal pressure gradient:
it reduces noise in the velocity field and decreases spurious numerical
mixing in baroclinic applications. The <inline-formula><mml:math id="M173" display="inline"><mml:mrow><mml:msub><mml:mi>D</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M174" display="inline"><mml:mrow><mml:msub><mml:mi>D</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> terms denote the diffusion
operators introduced later.</p><?xmltex \hack{\newpage}?>
</sec>
<sec id="Ch1.S3.SS4">
  <title>Tracer equation</title>
      <p id="d1e5187">The weak formulation of the tracer equations is derived analogously: find <inline-formula><mml:math id="M175" display="inline"><mml:mrow><mml:mi>T</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="script">H</mml:mi></mml:mrow></mml:math></inline-formula> such that

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M176" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo mathsize="1.5em">〈</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi>T</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mi mathvariant="italic">ϕ</mml:mi><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:msub></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>-</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mi>T</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>⋅</mml:mo><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mi mathvariant="italic">ϕ</mml:mi><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:msup><mml:mi>T</mml:mi><mml:mi mathvariant="normal">up</mml:mi></mml:msup><mml:mfenced open="[" close="]"><mml:mfenced close="]" open="["><mml:mrow><mml:mi mathvariant="italic">ϕ</mml:mi><mml:msub><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mo>⋅</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="italic">}</mml:mo><mml:mo mathvariant="italic">}</mml:mo><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>∪</mml:mo><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo>-</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo>(</mml:mo><mml:mi>T</mml:mi><mml:mi>w</mml:mi><mml:mo>)</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi mathvariant="italic">ϕ</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:msup><mml:mi>T</mml:mi><mml:mi mathvariant="normal">up</mml:mi></mml:msup><mml:mfenced close="]" open="["><mml:mfenced close="]" open="["><mml:mrow><mml:mi mathvariant="italic">ϕ</mml:mi><mml:msub><mml:mi>n</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mo mathvariant="italic">{</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mi>w</mml:mi><mml:mo mathvariant="italic">}</mml:mo><mml:mo mathvariant="italic">}</mml:mo><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mlabeledtr id="Ch1.E26"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>=</mml:mo><mml:msub><mml:mi>D</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>T</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mo>)</mml:mo><mml:mo>+</mml:mo><mml:msub><mml:mi>D</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>T</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mo>)</mml:mo><mml:mo>,</mml:mo><mml:mo>∀</mml:mo><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="script">H</mml:mi><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            Note that we do not employ the Lax–Friedrichs flux in the tracer equation.</p>
</sec>
<sec id="Ch1.S3.SS5">
  <title>Symmetric interior penalty stabilization</title>
      <?pagebreak page4365?><p id="d1e5448">The presented discretization is unstable for elliptic operators, and the
diffusion operators require additional stabilization. Here, we use the
symmetric interior penalty Galerkin (SIPG) method <xref ref-type="bibr" rid="bib1.bibx27" id="paren.60"/>. The
SIPG formulation of the tracer diffusion operators read

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M177" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:msub><mml:mi>D</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>T</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:msub><mml:mi mathvariant="italic">μ</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mi mathvariant="italic">ϕ</mml:mi></mml:mrow></mml:mfenced><mml:mo>⋅</mml:mo><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mi>T</mml:mi></mml:mrow></mml:mfenced><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>+</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mfenced open="{" close="}"><mml:mfenced close="}" open="{"><mml:mrow><mml:msub><mml:mi mathvariant="italic">μ</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mi>T</mml:mi></mml:mrow></mml:mfenced></mml:mfenced><mml:mo>⋅</mml:mo><mml:mfenced open="[" close="]"><mml:mfenced open="[" close="]"><mml:mrow><mml:mi mathvariant="italic">ϕ</mml:mi><mml:msub><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>∪</mml:mo><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>+</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mfenced close="}" open="{"><mml:mfenced close="}" open="{"><mml:mrow><mml:msub><mml:mi mathvariant="italic">μ</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mi mathvariant="italic">ϕ</mml:mi></mml:mrow></mml:mfenced></mml:mfenced><mml:mo>⋅</mml:mo><mml:mfenced close="]" open="["><mml:mfenced close="]" open="["><mml:mrow><mml:mi>T</mml:mi><mml:msub><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>∪</mml:mo><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mlabeledtr id="Ch1.E27"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>-</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mi mathvariant="italic">σ</mml:mi><mml:mo mathvariant="italic">}</mml:mo><mml:mo mathvariant="italic">}</mml:mo><mml:mfenced close="}" open="{"><mml:mfenced close="}" open="{"><mml:mrow><mml:msub><mml:mi mathvariant="italic">μ</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mfenced open="[" close="]"><mml:mfenced close="]" open="["><mml:mrow><mml:mi>T</mml:mi><mml:msub><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mo>⋅</mml:mo><mml:mfenced close="]" open="["><mml:mfenced close="]" open="["><mml:mrow><mml:mi mathvariant="italic">ϕ</mml:mi><mml:msub><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>∪</mml:mo><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:msub></mml:mrow></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            <?xmltex \hack{\vspace*{-6mm}}?>

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M178" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:msub><mml:mi>D</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>T</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mi mathvariant="italic">μ</mml:mi><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi>T</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi mathvariant="italic">ϕ</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mfenced close="}" open="{"><mml:mfenced close="}" open="{"><mml:mrow><mml:mi mathvariant="italic">μ</mml:mi><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi>T</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced></mml:mfenced><mml:mfenced open="[" close="]"><mml:mfenced close="]" open="["><mml:mrow><mml:mi mathvariant="italic">ϕ</mml:mi><mml:msub><mml:mi>n</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>+</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mfenced open="{" close="}"><mml:mfenced close="}" open="{"><mml:mrow><mml:mi mathvariant="italic">μ</mml:mi><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi mathvariant="italic">ϕ</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced></mml:mfenced><mml:mfenced open="[" close="]"><mml:mfenced open="[" close="]"><mml:mrow><mml:mi>T</mml:mi><mml:msub><mml:mi>n</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mlabeledtr id="Ch1.E28"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>-</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mi mathvariant="italic">σ</mml:mi><mml:mo mathvariant="italic">}</mml:mo><mml:mo mathvariant="italic">}</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mi mathvariant="italic">μ</mml:mi><mml:mo mathvariant="italic">}</mml:mo><mml:mo mathvariant="italic">}</mml:mo><mml:mfenced close="]" open="["><mml:mfenced close="]" open="["><mml:mrow><mml:mi>T</mml:mi><mml:msub><mml:mi>n</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mfenced open="[" close="]"><mml:mfenced close="]" open="["><mml:mrow><mml:mi mathvariant="italic">ϕ</mml:mi><mml:msub><mml:mi>n</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:msub><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            For the viscosity terms, we get

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M179" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:msub><mml:mi>D</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:msub><mml:mi mathvariant="italic">ν</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mi mathvariant="bold-italic">ψ</mml:mi></mml:mrow></mml:mfenced><mml:mo>:</mml:mo><mml:msup><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow></mml:mfenced><mml:mi>T</mml:mi></mml:msup><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>+</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mfenced close="]" open="["><mml:mfenced open="[" close="]"><mml:mrow><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:msub><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mo>⋅</mml:mo><mml:mfenced close="}" open="{"><mml:mfenced close="}" open="{"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ν</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow></mml:mfenced></mml:mfenced><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>∪</mml:mo><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>+</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mfenced close="]" open="["><mml:mfenced open="[" close="]"><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:msub><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mo>⋅</mml:mo><mml:mfenced open="{" close="}"><mml:mfenced close="}" open="{"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ν</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mi mathvariant="bold-italic">ψ</mml:mi></mml:mrow></mml:mfenced></mml:mfenced><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>∪</mml:mo><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mlabeledtr id="Ch1.E29"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>-</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mi mathvariant="italic">σ</mml:mi><mml:mo mathvariant="italic">}</mml:mo><mml:mo mathvariant="italic">}</mml:mo><mml:mfenced close="}" open="{"><mml:mfenced open="{" close="}"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ν</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mfenced open="[" close="]"><mml:mfenced close="]" open="["><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:msub><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mfenced close="]" open="["><mml:mfenced close="]" open="["><mml:mrow><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:msub><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>∪</mml:mo><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:msub></mml:mrow></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            <?xmltex \hack{\vspace*{-6mm}}?>

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M180" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:msub><mml:mi>D</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mi mathvariant="italic">ν</mml:mi><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi mathvariant="bold-italic">ψ</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>⋅</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>+</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mfenced close="]" open="["><mml:mfenced open="[" close="]"><mml:mrow><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:msub><mml:mi>n</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mo>⋅</mml:mo><mml:mfenced open="{" close="}"><mml:mfenced open="{" close="}"><mml:mrow><mml:mi mathvariant="italic">ν</mml:mi><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced></mml:mfenced><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo>+</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mfenced close="]" open="["><mml:mfenced open="[" close="]"><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:msub><mml:mi>n</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mo>⋅</mml:mo><mml:mfenced open="{" close="}"><mml:mfenced open="{" close="}"><mml:mrow><mml:mi mathvariant="italic">ν</mml:mi><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi mathvariant="bold-italic">ψ</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mfenced></mml:mfenced><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mlabeledtr id="Ch1.E30"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>-</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mi mathvariant="italic">σ</mml:mi><mml:mo mathvariant="italic">}</mml:mo><mml:mo mathvariant="italic">}</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mi mathvariant="italic">ν</mml:mi><mml:mo mathvariant="italic">}</mml:mo><mml:mo mathvariant="italic">}</mml:mo><mml:mfenced open="[" close="]"><mml:mfenced open="[" close="]"><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:msub><mml:mi>n</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mo>⋅</mml:mo><mml:mfenced open="[" close="]"><mml:mfenced open="[" close="]"><mml:mrow><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:msub><mml:mi>n</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:msub><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            The penalty factor <inline-formula><mml:math id="M181" display="inline"><mml:mi mathvariant="italic">σ</mml:mi></mml:math></inline-formula> is defined as <inline-formula><mml:math id="M182" display="inline"><mml:mrow><mml:mi mathvariant="italic">σ</mml:mi><mml:mo>=</mml:mo><mml:mi mathvariant="italic">γ</mml:mi><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:mi>p</mml:mi><mml:mo>(</mml:mo><mml:mi>p</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo></mml:mrow><mml:mi>L</mml:mi></mml:mfrac></mml:mstyle></mml:mrow></mml:math></inline-formula>
<xref ref-type="bibr" rid="bib1.bibx27" id="paren.61"/>, where <inline-formula><mml:math id="M183" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> is the degree of the basis functions,
<inline-formula><mml:math id="M184" display="inline"><mml:mi mathvariant="italic">γ</mml:mi></mml:math></inline-formula> is a factor depending on mesh quality, and <inline-formula><mml:math id="M185" display="inline"><mml:mi>L</mml:mi></mml:math></inline-formula> is the local element
length scale in the normal direction of the interface. Let <inline-formula><mml:math id="M186" display="inline"><mml:mrow><mml:msub><mml:mi>h</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and
<inline-formula><mml:math id="M187" display="inline"><mml:mrow><mml:msub><mml:mi>h</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> denote the horizontal and vertical element sizes, and
<inline-formula><mml:math id="M188" display="inline"><mml:mrow><mml:mi mathvariant="bold">Δ</mml:mi><mml:mo>=</mml:mo><mml:mi mathvariant="normal">diag</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>h</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M189" display="inline"><mml:mrow><mml:msub><mml:mi>h</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M190" display="inline"><mml:mrow><mml:msub><mml:mi>h</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>. We then define
<inline-formula><mml:math id="M191" display="inline"><mml:mrow><mml:mi>L</mml:mi><mml:mo>=</mml:mo><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mo>⋅</mml:mo><mml:mi mathvariant="bold">Δ</mml:mi><mml:mo>⋅</mml:mo><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi>h</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:msubsup><mml:mi>n</mml:mi><mml:mi>x</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup><mml:mo>+</mml:mo><mml:msubsup><mml:mi>n</mml:mi><mml:mi>y</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup><mml:mo>)</mml:mo><mml:mo>+</mml:mo><mml:msub><mml:mi>h</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:msub><mml:msubsup><mml:mi>n</mml:mi><mml:mi>z</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:math></inline-formula>
<xref ref-type="bibr" rid="bib1.bibx64" id="paren.62"/>. In this paper, we use <inline-formula><mml:math id="M192" display="inline"><mml:mrow><mml:mi mathvariant="italic">γ</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">5</mml:mn></mml:mrow></mml:math></inline-formula>.</p>
</sec>
<sec id="Ch1.S3.SS6">
  <title>Continuity equation</title>
      <p id="d1e6641">The vertical velocity <inline-formula><mml:math id="M193" display="inline"><mml:mi>w</mml:mi></mml:math></inline-formula> is computed diagnostically from the continuity
equation (Eq. <xref ref-type="disp-formula" rid="Ch1.E5"/>) by solving the weak form: find <inline-formula><mml:math id="M194" display="inline"><mml:mrow><mml:mi>w</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="script">H</mml:mi></mml:mrow></mml:math></inline-formula> such that

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M195" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mi>w</mml:mi><mml:msub><mml:mi>n</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mi mathvariant="italic">φ</mml:mi><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mi mathvariant="normal">s</mml:mi></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo>+</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mi>w</mml:mi><mml:mo mathvariant="italic">}</mml:mo><mml:mo mathvariant="italic">}</mml:mo><mml:mfenced open="[" close="]"><mml:mfenced open="[" close="]"><mml:mrow><mml:mi mathvariant="italic">φ</mml:mi><mml:msub><mml:mi>n</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mi>w</mml:mi><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi mathvariant="italic">φ</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo>=</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>⋅</mml:mo><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mi mathvariant="italic">φ</mml:mi><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="italic">}</mml:mo><mml:mo mathvariant="italic">}</mml:mo><mml:mo>⋅</mml:mo><mml:mfenced close="]" open="["><mml:mfenced close="]" open="["><mml:mrow><mml:mi mathvariant="italic">φ</mml:mi><mml:msub><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>∪</mml:mo><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mlabeledtr id="Ch1.E31"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>-</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>⋅</mml:mo><mml:mi mathvariant="italic">φ</mml:mi><mml:msub><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mi mathvariant="normal">s</mml:mi></mml:msub></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>∀</mml:mo><mml:mi mathvariant="italic">φ</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="script">H</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            where both the left- and right-hand sides have been integrated by parts. Note
that the terms on the bottom surface <inline-formula><mml:math id="M196" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mi mathvariant="normal">b</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> vanish due to the
impermeability constraint <inline-formula><mml:math id="M197" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>⋅</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>w</mml:mi><mml:msub><mml:mi>n</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula>.</p>
</sec>
<sec id="Ch1.S3.SS7">
  <title>Computing the internal pressure gradient</title>
      <p id="d1e6930">The water density is computed diagnostically using the equation of state. We
use the same <inline-formula><mml:math id="M198" display="inline"><mml:mrow><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup><mml:mo>×</mml:mo><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> function
space for tracers and water density. In this work, we use a linear equation of
state (Eq. <xref ref-type="disp-formula" rid="Ch1.E14"/>), and consequently density can be computed locally
(at each node of the tracer field). In general, however, the equation of
state is non-linear, and the density is projected on the <inline-formula><mml:math id="M199" display="inline"><mml:mi mathvariant="italic">ρ</mml:mi></mml:math></inline-formula> field.</p>
      <p id="d1e6964">The baroclinic head is computed from Eq. (<xref ref-type="disp-formula" rid="Ch1.E3"/>) by integrating
<inline-formula><mml:math id="M200" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="italic">ρ</mml:mi><mml:mo>′</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula> over the vertical. In practice, we solve equation <inline-formula><mml:math id="M201" display="inline"><mml:mrow><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:mo>∂</mml:mo><mml:mi>r</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:msup><mml:mi mathvariant="italic">ρ</mml:mi><mml:mo>′</mml:mo></mml:msup><mml:mo>/</mml:mo><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>
weakly with the appropriate boundary conditions:

                <disp-formula id="Ch1.E32" content-type="numbered"><mml:math id="M202" display="block"><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mi>r</mml:mi><mml:msub><mml:mi>n</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mi mathvariant="italic">φ</mml:mi><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mi mathvariant="normal">s</mml:mi></mml:msub></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:msub><mml:mi>r</mml:mi><mml:mi mathvariant="normal">up</mml:mi></mml:msub><mml:mfenced close="]" open="["><mml:mfenced open="[" close="]"><mml:mrow><mml:mi mathvariant="italic">φ</mml:mi><mml:msub><mml:mi>n</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mi>r</mml:mi><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi mathvariant="italic">φ</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:msup><mml:mi mathvariant="italic">ρ</mml:mi><mml:mo>′</mml:mo></mml:msup><mml:mi mathvariant="italic">φ</mml:mi><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:msub><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>

          Here, the left-hand side has been integrated by parts, and <inline-formula><mml:math id="M203" display="inline"><mml:mrow><mml:msub><mml:mi>r</mml:mi><mml:mi mathvariant="normal">up</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> denotes
the value on the prism above the interface. Note that the free
surface terms vanish because <inline-formula><mml:math id="M204" display="inline"><mml:mrow><mml:mi>r</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula> on <inline-formula><mml:math id="M205" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mi mathvariant="normal">s</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> by definition. We use
function space <inline-formula><mml:math id="M206" display="inline"><mml:mrow><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup><mml:mo>×</mml:mo><mml:msub><mml:mi>P</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> for <inline-formula><mml:math id="M207" display="inline"><mml:mi>r</mml:mi></mml:math></inline-formula> to alleviate
internal pressure gradient errors <xref ref-type="bibr" rid="bib1.bibx66" id="paren.63"/>.</p>
      <p id="d1e7193">Finally, taking a test function <inline-formula><mml:math id="M208" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="script">U</mml:mi></mml:mrow></mml:math></inline-formula>, we
compute the internal pressure gradient with the weak form

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M209" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo mathsize="1.5em">〈</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">F</mml:mi><mml:mi mathvariant="normal">pg</mml:mi></mml:msub><mml:mo>⋅</mml:mo><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:msub></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mi>g</mml:mi><mml:mi>r</mml:mi><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>⋅</mml:mo><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mi>g</mml:mi><mml:mo mathvariant="italic">{</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mi>r</mml:mi><mml:mo mathvariant="italic">}</mml:mo><mml:mo mathvariant="italic">}</mml:mo><mml:mfenced close="]" open="["><mml:mfenced close="]" open="["><mml:mrow><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:mo>⋅</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>∪</mml:mo><mml:msub><mml:mi mathvariant="script">I</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mlabeledtr id="Ch1.E33"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>+</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:mi>g</mml:mi><mml:mi>r</mml:mi><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:mo>⋅</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mi mathvariant="normal">s</mml:mi></mml:msub><mml:mo>∪</mml:mo><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mi mathvariant="normal">b</mml:mi></mml:msub></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>∀</mml:mo><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="script">U</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            where the right-hand side has been integrated by parts. Usually,
<inline-formula><mml:math id="M210" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">F</mml:mi><mml:mi mathvariant="normal">pg</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> belongs to the same space as the horizontal
velocity, i.e., <inline-formula><mml:math id="M211" display="inline"><mml:mrow><mml:mo>[</mml:mo><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup><mml:mo>×</mml:mo><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup><mml:msup><mml:mo>]</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula>.
However, to reduce bathymetry induced internal pressure gradient errors, it is
possible to use a quadratic horizontal space, i.e., <inline-formula><mml:math id="M212" display="inline"><mml:mrow><mml:mi>r</mml:mi><mml:mo>∈</mml:mo><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup><mml:mo>×</mml:mo><mml:msub><mml:mi>P</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>
and <inline-formula><mml:math id="M213" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">F</mml:mi><mml:mi mathvariant="normal">pg</mml:mi></mml:msub><mml:mo>∈</mml:mo><mml:mo>[</mml:mo><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup><mml:mo>×</mml:mo><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup><mml:msup><mml:mo>]</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula>. In this paper, we use
a linear <inline-formula><mml:math id="M214" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">F</mml:mi><mml:mi mathvariant="normal">pg</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> field unless otherwise specified.</p>
</sec>
<sec id="Ch1.S3.SS8">
  <title>Slope limiters</title>
      <p id="d1e7485">We use vertex-based <inline-formula><mml:math id="M215" display="inline"><mml:mrow><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> slope limiters
<xref ref-type="bibr" rid="bib1.bibx52" id="paren.64"/> for three-dimensional variables to ensure positivity. The
limiter is applied to both tracer and horizontal velocity fields after each
update of the advection operator as discussed in the next section.</p>
</sec>
</sec>
<sec id="Ch1.S4">
  <title>Time integration</title>
      <p id="d1e7511">The coupled 2-D–3-D system is advanced in time with a two-stage ALE time integration scheme. In this section, we present
the ALE formulation and summarize the final time integration scheme.</p>
<sec id="Ch1.S4.SS1">
  <title>ALE mesh formulation</title>
      <p id="d1e7519">To accurately account for the free surface movement, one must move the mesh in
the vertical direction. In this work, we adopt the ALE method
<xref ref-type="bibr" rid="bib1.bibx26" id="paren.65"/>. Here, we describe a mesh update procedure that stretches
(or compresses) the mesh uniformly over the vertical direction. The ALE
formulation, however, allows more complex mesh-moving methods as well, such
as the (approximate) tracking of isopycnals <xref ref-type="bibr" rid="bib1.bibx42" id="paren.66"/>.</p>
      <p id="d1e7528">In three dimensions, an ALE update consists of solving an advection–diffusion
equation between two domains, <inline-formula><mml:math id="M216" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="normal">Ω</mml:mi><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M217" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="normal">Ω</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula>. Here, the
domain is uniquely defined by the surface elevation field, such that for any
time level <inline-formula><mml:math id="M218" display="inline"><mml:mi>n</mml:mi></mml:math></inline-formula> the surface <inline-formula><mml:math id="M219" display="inline"><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">Γ</mml:mi><mml:mi mathvariant="normal">s</mml:mi><mml:mi>n</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> matches <inline-formula><mml:math id="M220" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="italic">η</mml:mi><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula>. Due to the
chosen discretization, the elevation field <inline-formula><mml:math id="M221" display="inline"><mml:mi mathvariant="italic">η</mml:mi></mml:math></inline-formula> is discontinuous, yet we
wish to maintain a conforming mesh, i.e., a continuous coordinate field <inline-formula><mml:math id="M222" display="inline"><mml:mi>z</mml:mi></mml:math></inline-formula>.
This is achieved by projecting the elevation field <inline-formula><mml:math id="M223" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="italic">η</mml:mi><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula> to a continuous
space and updating the geometry with the continuous field <inline-formula><mml:math id="M224" display="inline"><mml:mrow><mml:msubsup><mml:mi mathvariant="italic">η</mml:mi><mml:mi mathvariant="normal">cg</mml:mi><mml:mi>n</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula>.
The projection induces a small discrepancy between the
elevation field and the 3-D domain, but its effect remains negligible in
practical applications because jumps in the elevation field are typically small.</p>
      <?pagebreak page4366?><p id="d1e7628">Let <inline-formula><mml:math id="M225" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="normal">Ω</mml:mi><mml:mi mathvariant="normal">ref</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula> be the reference domain corresponding to
unperturbed elevation field <inline-formula><mml:math id="M226" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">η</mml:mi><mml:mi mathvariant="normal">cg</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula>, and <inline-formula><mml:math id="M227" display="inline"><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi mathvariant="normal">ref</mml:mi></mml:msub><mml:mo>∈</mml:mo><mml:mo>[</mml:mo><mml:mo>-</mml:mo><mml:mi>h</mml:mi></mml:mrow></mml:math></inline-formula>, 0]
its vertical coordinate. Applying a uniform mesh stretching, the
time-dependent mesh coordinates can then be written as

                <disp-formula id="Ch1.E34" content-type="numbered"><mml:math id="M228" display="block"><mml:mstyle class="stylechange" displaystyle="true"/><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:msup><mml:mi>z</mml:mi><mml:mi>n</mml:mi></mml:msup><mml:mo>=</mml:mo><mml:msub><mml:mi>z</mml:mi><mml:mi mathvariant="normal">ref</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msubsup><mml:mi mathvariant="italic">η</mml:mi><mml:mi mathvariant="normal">cg</mml:mi><mml:mi>n</mml:mi></mml:msubsup><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi mathvariant="normal">ref</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>h</mml:mi></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle><mml:mo>∈</mml:mo><mml:mfenced open="[" close="]"><mml:mrow><mml:mo>-</mml:mo><mml:mi>h</mml:mi><mml:mo>,</mml:mo><mml:msubsup><mml:mi mathvariant="italic">η</mml:mi><mml:mi mathvariant="normal">cg</mml:mi><mml:mi>n</mml:mi></mml:msubsup></mml:mrow></mml:mfenced><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>

          The mesh velocity is obtained as <inline-formula><mml:math id="M229" display="inline"><mml:mrow><mml:msub><mml:mi>w</mml:mi><mml:mi mathvariant="normal">m</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:math></inline-formula>. In
practice, the consecutive fields <inline-formula><mml:math id="M230" display="inline"><mml:mrow><mml:msubsup><mml:mi mathvariant="italic">η</mml:mi><mml:mi mathvariant="normal">cg</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M231" display="inline"><mml:mrow><mml:msubsup><mml:mi mathvariant="italic">η</mml:mi><mml:mi mathvariant="normal">cg</mml:mi><mml:mi>n</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula>
are known so we can evaluate

                <disp-formula id="Ch1.E35" content-type="numbered"><mml:math id="M232" display="block"><mml:mstyle class="stylechange" displaystyle="true"/><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:msubsup><mml:mi>w</mml:mi><mml:mi mathvariant="normal">m</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mi mathvariant="italic">η</mml:mi><mml:mi mathvariant="normal">cg</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mo>-</mml:mo><mml:msubsup><mml:mi mathvariant="italic">η</mml:mi><mml:mi mathvariant="normal">cg</mml:mi><mml:mi>n</mml:mi></mml:msubsup></mml:mrow><mml:mrow><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi mathvariant="normal">ref</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>h</mml:mi></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>

          Given the mesh velocity, a conservative ALE update can be written as

                <disp-formula id="Ch1.E36" content-type="numbered"><mml:math id="M233" display="block"><mml:mstyle displaystyle="true" class="stylechange"/><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi mathvariant="normal">d</mml:mi><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mfenced open="(" close=")"><mml:mrow><mml:mo mathsize="1.5em">〈</mml:mo><mml:mi>T</mml:mi><mml:mi mathvariant="italic">ϕ</mml:mi><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mo>=</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:msub><mml:mi>F</mml:mi><mml:mi mathvariant="normal">T</mml:mi></mml:msub><mml:mfenced open="(" close=")"><mml:mrow><mml:mi>T</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>,</mml:mo><mml:mi>w</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mi>w</mml:mi><mml:mi mathvariant="normal">m</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mi mathvariant="italic">ϕ</mml:mi><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          for a generic tracer equation <inline-formula><mml:math id="M234" display="inline"><mml:mrow><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:mo>∂</mml:mo><mml:mi>T</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:msub><mml:mi>F</mml:mi><mml:mi mathvariant="normal">T</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>T</mml:mi></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M235" display="inline"><mml:mi mathvariant="bold-italic">u</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M236" display="inline"><mml:mrow><mml:mi>w</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>.</p>
</sec>
<sec id="Ch1.S4.SS2">
  <title>Coupled time integration scheme</title>
      <p id="d1e7981">The coupled 2-D–3-D system is advanced in time with a two-stage ALE time
integration scheme. For convenience, we rewrite the 3-D momentum and tracer
equations as

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M237" display="block"><mml:mtable displaystyle="true"><mml:mlabeledtr id="Ch1.E37"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi>T</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:msub><mml:mi>F</mml:mi><mml:mi mathvariant="normal">T</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>T</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>,</mml:mo><mml:mi>w</mml:mi><mml:mo>)</mml:mo><mml:mo>+</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mi mathvariant="normal">T</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>T</mml:mi><mml:mo>)</mml:mo><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E38"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:msub><mml:mi>F</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi></mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">F</mml:mi><mml:mi mathvariant="normal">pg</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>,</mml:mo><mml:mi>w</mml:mi></mml:mrow></mml:mfenced><mml:mo>+</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>)</mml:mo><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            where <inline-formula><mml:math id="M238" display="inline"><mml:mrow><mml:msub><mml:mi>F</mml:mi><mml:mi mathvariant="normal">T</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M239" display="inline"><mml:mrow><mml:msub><mml:mi>F</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> denote all the terms that are treated
explicitly, while <inline-formula><mml:math id="M240" display="inline"><mml:mrow><mml:msub><mml:mi>G</mml:mi><mml:mi mathvariant="normal">T</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M241" display="inline"><mml:mrow><mml:msub><mml:mi>G</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> contain all the implicit terms.
In this work, only vertical diffusion (Eq. <xref ref-type="disp-formula" rid="Ch1.E28"/>), vertical
viscosity (Eq. <xref ref-type="disp-formula" rid="Ch1.E30"/>), and bottom friction terms are treated implicitly.</p>
      <p id="d1e8149">The explicit 3-D equations are advanced in time with a second-order SSP Runge–Kutta scheme, SSPRK(2,2)
<xref ref-type="bibr" rid="bib1.bibx78 bib1.bibx32" id="paren.67"/>. For a generic problem (<inline-formula><mml:math id="M242" display="inline"><mml:mrow><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:mo>∂</mml:mo><mml:mi>c</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:mi>F</mml:mi><mml:mo>(</mml:mo><mml:mi>c</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>), the scheme reads

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M243" display="block"><mml:mtable displaystyle="true"><mml:mlabeledtr id="Ch1.E39"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:msup><mml:mi>c</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:msup><mml:mo>=</mml:mo><mml:msup><mml:mi>c</mml:mi><mml:mi>n</mml:mi></mml:msup><mml:mo>+</mml:mo><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>t</mml:mi><mml:mi>F</mml:mi><mml:mfenced close=")" open="("><mml:mrow><mml:msup><mml:mi>c</mml:mi><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E40"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:msup><mml:mi>c</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mo>=</mml:mo><mml:msup><mml:mi>c</mml:mi><mml:mi>n</mml:mi></mml:msup><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>t</mml:mi><mml:mi>F</mml:mi><mml:mfenced open="(" close=")"><mml:mrow><mml:msup><mml:mi>c</mml:mi><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:mfenced><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>t</mml:mi><mml:mi>F</mml:mi><mml:mfenced close=")" open="("><mml:mrow><mml:msup><mml:mi>c</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:msup></mml:mrow></mml:mfenced><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula></p>
      <p id="d1e8303">When applied to the explicit 3-D momentum and tracer equations,
Eqs. (<xref ref-type="disp-formula" rid="Ch1.E25"/>) and (<xref ref-type="disp-formula" rid="Ch1.E26"/>), both of these stages are ALE
updates where the mesh is updated from geometry <inline-formula><mml:math id="M244" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="normal">Ω</mml:mi><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula> to <inline-formula><mml:math id="M245" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="normal">Ω</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula>
and then <inline-formula><mml:math id="M246" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="normal">Ω</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula>. The ALE formulation of the explicit 3-D tracer
equation can then be written as

                <disp-formula id="Ch1.E41" content-type="numbered"><mml:math id="M247" display="block"><mml:mstyle displaystyle="true" class="stylechange"/><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><?xmltex \hack{\hbox\bgroup\fontsize{8.5}{8.5}\selectfont$\displaystyle}?><mml:mo mathsize="1.5em">〈</mml:mo><mml:msup><mml:mi>T</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:msup><mml:mi mathvariant="italic">ϕ</mml:mi><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msup><mml:mi mathvariant="normal">Ω</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:msup></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:msup><mml:mi>T</mml:mi><mml:mi>n</mml:mi></mml:msup><mml:mi mathvariant="italic">ϕ</mml:mi><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msup><mml:mi mathvariant="normal">Ω</mml:mi><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>t</mml:mi><mml:mo mathsize="1.5em">〈</mml:mo><mml:msub><mml:mi>F</mml:mi><mml:mi mathvariant="normal">T</mml:mi></mml:msub><mml:mfenced open="(" close=")"><mml:mrow><mml:msup><mml:mi>T</mml:mi><mml:mi>n</mml:mi></mml:msup><mml:mo>,</mml:mo><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>n</mml:mi></mml:msup><mml:mo>,</mml:mo><mml:msup><mml:mi>w</mml:mi><mml:mi>n</mml:mi></mml:msup><mml:mo>-</mml:mo><mml:msubsup><mml:mi>w</mml:mi><mml:mi mathvariant="normal">m</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:msubsup></mml:mrow></mml:mfenced><mml:mi mathvariant="italic">ϕ</mml:mi><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msup><mml:mi mathvariant="normal">Ω</mml:mi><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:msub><?xmltex \hack{$\egroup}?><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          <?xmltex \hack{\vspace*{-6mm}}?>

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M248" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><?xmltex \hack{\hbox\bgroup\fontsize{8.8}{9.5}\selectfont$\displaystyle}?><mml:mo mathsize="1.5em">〈</mml:mo><mml:msup><mml:mover accent="true"><mml:mi>T</mml:mi><mml:mo mathvariant="normal">̃</mml:mo></mml:mover><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mi mathvariant="italic">ϕ</mml:mi><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msup><mml:mi mathvariant="normal">Ω</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:msub><?xmltex \hack{$\egroup}?></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><?xmltex \hack{\hbox\bgroup\fontsize{8.5}{8.5}\selectfont$\displaystyle}?><mml:mo>=</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:msup><mml:mi>T</mml:mi><mml:mi>n</mml:mi></mml:msup><mml:mi mathvariant="italic">ϕ</mml:mi><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msup><mml:mi mathvariant="normal">Ω</mml:mi><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>t</mml:mi><mml:mo mathsize="1.5em">〈</mml:mo><mml:msub><mml:mi>F</mml:mi><mml:mi mathvariant="normal">T</mml:mi></mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:msup><mml:mi>T</mml:mi><mml:mi>n</mml:mi></mml:msup><mml:mo>,</mml:mo><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>n</mml:mi></mml:msup><mml:mo>,</mml:mo><mml:msup><mml:mi>w</mml:mi><mml:mi>n</mml:mi></mml:msup><mml:mo>-</mml:mo><mml:msubsup><mml:mi>w</mml:mi><mml:mi mathvariant="normal">m</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:msubsup></mml:mrow></mml:mfenced><mml:mi mathvariant="italic">ϕ</mml:mi><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msup><mml:mi mathvariant="normal">Ω</mml:mi><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:msub><?xmltex \hack{$\egroup}?></mml:mrow></mml:mtd></mml:mtr><mml:mlabeledtr id="Ch1.E42"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><?xmltex \hack{\hbox\bgroup\fontsize{8.5}{8.5}\selectfont$\displaystyle}?><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>t</mml:mi><mml:mo mathsize="1.5em">〈</mml:mo><mml:msub><mml:mi>F</mml:mi><mml:mi mathvariant="normal">T</mml:mi></mml:msub><mml:mfenced open="(" close=")"><mml:mrow><mml:msup><mml:mi>T</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:msup><mml:mo>,</mml:mo><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:msup><mml:mo>,</mml:mo><mml:msup><mml:mi>w</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:msup><mml:mo>-</mml:mo><mml:msubsup><mml:mi>w</mml:mi><mml:mi mathvariant="normal">m</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup></mml:mrow></mml:mfenced><mml:mi mathvariant="italic">ϕ</mml:mi><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msup><mml:mi mathvariant="normal">Ω</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:msup></mml:mrow></mml:msub><mml:mo>,</mml:mo><?xmltex \hack{$\egroup}?></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            where the vertical velocity is adjusted by the mesh velocity <inline-formula><mml:math id="M249" display="inline"><mml:mrow><mml:msub><mml:mi>w</mml:mi><mml:mi mathvariant="normal">m</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>.</p>
      <p id="d1e8718">After the SSPRK update, the implicit terms are advanced with the backward
Euler method. This step is computed in domain <inline-formula><mml:math id="M250" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="normal">Ω</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula>:

                <disp-formula id="Ch1.E43" content-type="numbered"><mml:math id="M251" display="block"><mml:mstyle class="stylechange" displaystyle="true"/><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><?xmltex \hack{\hbox\bgroup\fontsize{9.5}{9.5}\selectfont$\displaystyle}?><mml:mo mathsize="1.5em">〈</mml:mo><mml:msup><mml:mi>T</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mi mathvariant="italic">ϕ</mml:mi><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msup><mml:mi mathvariant="normal">Ω</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:msup><mml:mover accent="true"><mml:mi>T</mml:mi><mml:mo mathvariant="normal">̃</mml:mo></mml:mover><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mi mathvariant="italic">ϕ</mml:mi><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msup><mml:mi mathvariant="normal">Ω</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>t</mml:mi><mml:mo mathsize="1.5em">〈</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mi mathvariant="normal">T</mml:mi></mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:msup><mml:mi>T</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:mfenced><mml:mi mathvariant="italic">ϕ</mml:mi><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msup><mml:mi mathvariant="normal">Ω</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:msub><mml:mo>.</mml:mo><?xmltex \hack{$\egroup}?></mml:mrow></mml:math></disp-formula>

          The 3-D momentum equation is treated analogously.</p>
      <p id="d1e8853">The 2-D equations are advanced in time with an implicit scheme to circumvent
the strict time step constraint imposed by surface gravity waves. To ensure
consistency between the movement of the 3-D mesh and the 2-D mode, the 2-D time
integration scheme must be compatible with the aforementioned SSPRK(2,2)
method. Here, we use a combination of a forward Euler and trapezoidal steps:

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M252" display="block"><mml:mtable displaystyle="true"><mml:mlabeledtr id="Ch1.E44"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:msup><mml:mi>c</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:msup><mml:mo>=</mml:mo><mml:msup><mml:mi>c</mml:mi><mml:mi>n</mml:mi></mml:msup><mml:mo>+</mml:mo><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>t</mml:mi><mml:mi>F</mml:mi><mml:mfenced close=")" open="("><mml:mrow><mml:msup><mml:mi>c</mml:mi><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E45"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:msup><mml:mi>c</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mo>=</mml:mo><mml:msup><mml:mi>c</mml:mi><mml:mi>n</mml:mi></mml:msup><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>t</mml:mi><mml:mfenced open="(" close=")"><mml:mrow><mml:mi>F</mml:mi><mml:mfenced close=")" open="("><mml:mrow><mml:msup><mml:mi>c</mml:mi><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:mfenced><mml:mo>+</mml:mo><mml:mi>F</mml:mi><mml:mfenced close=")" open="("><mml:mrow><mml:msup><mml:mi>c</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            Denoting the tendencies of the 2-D system (Eqs. <xref ref-type="disp-formula" rid="Ch1.E23"/>–<xref ref-type="disp-formula" rid="Ch1.E24"/>)
by <inline-formula><mml:math id="M253" display="inline"><mml:mrow><mml:msub><mml:mi>F</mml:mi><mml:mi mathvariant="italic">η</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M254" display="inline"><mml:mrow><mml:msub><mml:mi>F</mml:mi><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover></mml:msub></mml:mrow></mml:math></inline-formula>, respectively, we can write the 2-D solver as

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M255" display="block"><mml:mtable displaystyle="true"><mml:mlabeledtr id="Ch1.E46"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo mathsize="1.5em">〈</mml:mo><mml:msup><mml:mi mathvariant="italic">η</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:msup><mml:msub><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:msup><mml:mi mathvariant="italic">η</mml:mi><mml:mi>n</mml:mi></mml:msup><mml:msub><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>t</mml:mi><mml:mo mathsize="1.5em">〈</mml:mo><mml:msub><mml:mi>F</mml:mi><mml:mi mathvariant="italic">η</mml:mi></mml:msub><mml:mfenced open="(" close=")"><mml:mrow><mml:msup><mml:mi mathvariant="italic">η</mml:mi><mml:mi>n</mml:mi></mml:msup><mml:mo>,</mml:mo><mml:msup><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:mfenced><mml:msub><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E47"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><?xmltex \hack{\hbox\bgroup\fontsize{8.5}{8.5}\selectfont$\displaystyle}?><mml:mo mathsize="1.5em">〈</mml:mo><mml:msup><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mrow><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:msup><mml:mo>⋅</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:msup><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mi>n</mml:mi></mml:msup><mml:mo>⋅</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>t</mml:mi><mml:mo mathsize="1.5em">〈</mml:mo><mml:msub><mml:mi>F</mml:mi><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover></mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:msup><mml:mi mathvariant="italic">η</mml:mi><mml:mi>n</mml:mi></mml:msup><mml:mo>,</mml:mo><mml:msup><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:mfenced><mml:mo>⋅</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:msub><mml:mo>,</mml:mo><?xmltex \hack{$\egroup}?></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            <?xmltex \hack{\vspace*{-6mm}}?>

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M256" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo mathsize="1.5em">〈</mml:mo><mml:msup><mml:mi mathvariant="italic">η</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:msub><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo>=</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:msup><mml:mi mathvariant="italic">η</mml:mi><mml:mi>n</mml:mi></mml:msup><mml:msub><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>t</mml:mi></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mo mathsize="1.5em">〈</mml:mo><mml:mfenced open="(" close=""><mml:mrow><mml:msub><mml:mi>F</mml:mi><mml:mi mathvariant="italic">η</mml:mi></mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:msup><mml:mi mathvariant="italic">η</mml:mi><mml:mi>n</mml:mi></mml:msup><mml:mo>,</mml:mo><mml:msup><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mlabeledtr id="Ch1.E48"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mfenced open="." close=")"><mml:mrow><mml:mo>+</mml:mo><mml:msub><mml:mi>F</mml:mi><mml:mi mathvariant="italic">η</mml:mi></mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:msup><mml:mi>H</mml:mi><mml:mi>n</mml:mi></mml:msup><mml:mo>,</mml:mo><mml:msup><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced><mml:msub><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:mi mathvariant="normal">Γ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            <?xmltex \hack{\vspace*{-6mm}}?>

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M257" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo mathsize="1.5em">〈</mml:mo><mml:msup><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mo>⋅</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:msub></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo>=</mml:mo><mml:mo mathsize="1.5em">〈</mml:mo><mml:msup><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mi>n</mml:mi></mml:msup><mml:mo>⋅</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>t</mml:mi></mml:mrow><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mo mathsize="1.5em">〈</mml:mo><mml:mfenced open="(" close=""><mml:mrow><mml:msub><mml:mi>F</mml:mi><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover></mml:msub><mml:mfenced open="(" close=")"><mml:mrow><mml:msup><mml:mi mathvariant="italic">η</mml:mi><mml:mi>n</mml:mi></mml:msup><mml:mo>,</mml:mo><mml:msup><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mlabeledtr id="Ch1.E49"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mfenced close=")" open="."><mml:mrow><mml:mo>+</mml:mo><mml:msub><mml:mi>F</mml:mi><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover></mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:msup><mml:mi mathvariant="italic">η</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mo>,</mml:mo><mml:msup><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced><mml:mo>⋅</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">ψ</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mo mathsize="1.5em">〉</mml:mo><mml:mrow><mml:msub><mml:mi mathvariant="normal">Γ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:msub><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            The second implicit stage is linearized by treating the total depth <inline-formula><mml:math id="M258" display="inline"><mml:mi>H</mml:mi></mml:math></inline-formula>
explicitly in Eq. (<xref ref-type="disp-formula" rid="Ch1.E48"/>).</p>
      <p id="d1e9630">The 2-D system is solved first, resulting in an updated elevation field
(<inline-formula><mml:math id="M259" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="italic">η</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M260" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="italic">η</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> for the two stages, respectively) and
consequently mesh geometry (<inline-formula><mml:math id="M261" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="normal">Ω</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M262" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="normal">Ω</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula>). Once the mesh
geometry is known, it is straightforward to compute the corresponding mesh
velocity <inline-formula><mml:math id="M263" display="inline"><mml:mrow><mml:msub><mml:mi>w</mml:mi><mml:mi mathvariant="normal">m</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and perform a 3-D ALE update.</p>
      <p id="d1e9708">The time integration method is second order for all the terms. The whole
algorithm is summarized in Algorithm 1.</p>
</sec>
<sec id="Ch1.S4.SS3">
  <title>Choosing the time step</title>
      <p id="d1e9717">The maximal admissible time step is constrained by the stability of the
coupled time integrator. The presented SSPRK(2,2) scheme has a CFL
(Courant–Friedrichs–Lewy) factor 1. The 2-D scheme
(Eq. <xref ref-type="disp-formula" rid="Ch1.E45"/>) and the implicit vertical solver
(Eq. <xref ref-type="disp-formula" rid="Ch1.E43"/>), on the other hand, are unconditionally
stable. This implies that the coupled system is stable under the same
conditions as the explicit SSP scheme on its own.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F1"><caption><p id="d1e9726"> </p></caption>
          <?xmltex \igopts{width=236.157874pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/11/4359/2018/gmd-11-4359-2018-g01.pdf"/>
          <?xmltex \hack{\def\figurename{Algorithm}\setcounter{figure}{0}}?>

        </fig>

      <?pagebreak page4367?><p id="d1e9737"><?xmltex \hack{\setcounter{figure}{0}}?>The horizontal advection term imposes a constraint:

                <disp-formula id="Ch1.E50" content-type="numbered"><mml:math id="M264" display="block"><mml:mstyle displaystyle="true" class="stylechange"/><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mi mathvariant="normal">Δ</mml:mi><mml:msub><mml:mi>t</mml:mi><mml:mi mathvariant="normal">adv</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:msub><mml:mi>L</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow><mml:mi>U</mml:mi></mml:mfrac></mml:mstyle><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M265" display="inline"><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the horizontal element size, <inline-formula><mml:math id="M266" display="inline"><mml:mi>U</mml:mi></mml:math></inline-formula> is the maximal horizontal
velocity scale, and <inline-formula><mml:math id="M267" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is a length scaling factor. For the presented
<inline-formula><mml:math id="M268" display="inline"><mml:mrow><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> discretization, we take <inline-formula><mml:math id="M269" display="inline"><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> as the square root of
the triangle area. For rectangular <inline-formula><mml:math id="M270" display="inline"><mml:mrow><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> elements and
second-order RK schemes, the scaling factor is approximately <inline-formula><mml:math id="M271" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0.33</mml:mn></mml:mrow></mml:math></inline-formula>
<xref ref-type="bibr" rid="bib1.bibx15" id="paren.68"/>. In this work, we use <inline-formula><mml:math id="M272" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0.05</mml:mn></mml:mrow></mml:math></inline-formula> for all the
diagnostic test cases. In strongly stratified flows, internal waves may impose
a stricter constraint:

                <disp-formula id="Ch1.E51" content-type="numbered"><mml:math id="M273" display="block"><mml:mstyle displaystyle="true" class="stylechange"/><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mi mathvariant="normal">Δ</mml:mi><mml:msub><mml:mi>t</mml:mi><mml:mi mathvariant="normal">iw</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:msub><mml:mi>L</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">iw</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>U</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M274" display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">iw</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the speed of the internal waves.</p>
      <p id="d1e9929">Analogously, the time step constraint for vertical advection is

                <disp-formula id="Ch1.E52" content-type="numbered"><mml:math id="M275" display="block"><mml:mstyle class="stylechange" displaystyle="true"/><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mi mathvariant="normal">Δ</mml:mi><mml:msub><mml:mi>t</mml:mi><mml:mi mathvariant="normal">w</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:msub><mml:msub><mml:mi>L</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow><mml:mi>W</mml:mi></mml:mfrac></mml:mstyle><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M276" display="inline"><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the element height, <inline-formula><mml:math id="M277" display="inline"><mml:mi>W</mml:mi></mml:math></inline-formula> is the vertical velocity scale, and
<inline-formula><mml:math id="M278" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="normal">v</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0.125</mml:mn></mml:mrow></mml:math></inline-formula> is the scaling factor.</p>
      <p id="d1e10000">Given a horizontal viscosity scale <inline-formula><mml:math id="M279" display="inline"><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, the explicit viscosity
operator imposes a constraint:

                <disp-formula id="Ch1.E53" content-type="numbered"><mml:math id="M280" display="block"><mml:mstyle class="stylechange" displaystyle="true"/><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mi mathvariant="normal">Δ</mml:mi><mml:msub><mml:mi>t</mml:mi><mml:mi mathvariant="normal">visc</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="normal">visc</mml:mi></mml:msub><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msup><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:msub><mml:mi>L</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow><mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          which may become stringent for small elements and large viscosity values. The
scaling factor <inline-formula><mml:math id="M281" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="normal">visc</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> depends on the used stabilization
scheme; here, a value of <inline-formula><mml:math id="M282" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi mathvariant="normal">visc</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:math></inline-formula> is used. The constraint for
horizontal diffusivity is analogous.</p>
      <p id="d1e10088">In the simulations presented herein, the minimal admissible time step is
evaluated on the mesh based on constant a-priori velocity and
viscosity scales. The time step is kept constant throughout the simulation.</p><?xmltex \hack{\newpage}?>
</sec>
</sec>
<?pagebreak page4368?><sec id="Ch1.S5">
  <title>Test cases</title>
      <p id="d1e10100">We demonstrate the performance of the proposed discretization with a suite of
test cases of increasing complexity. We first evaluate the conservation and
convergence of the solver in a barotropic standing wave test case. The
convergence of baroclinic terms is then examined in a specific steady-state
test case. The baroclinic solver and its numerical mixing are then evaluated
with a non-rotating lock exchange test case and a rotating baroclinic eddy
test, followed by the Dynamics of Overflow Mixing and Entrainment (DOME) overflow test.</p>
<sec id="Ch1.S5.SS1">
  <title>Standing wave</title>
      <p id="d1e10108">We first evaluate the performance of the solver in a barotropic standing wave
test case. The domain is a <inline-formula><mml:math id="M283" display="inline"><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">60</mml:mn></mml:mrow></mml:math></inline-formula> km long rectangular channel, 625 m
wide, and 100 m deep. All lateral boundaries are closed.
Initially, the water is at rest. A 10 m tall sinusoidal elevation
perturbation is prescribed along the channel (<inline-formula><mml:math id="M284" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">η</mml:mi><mml:mi mathvariant="normal">a</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="italic">η</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mi>cos⁡</mml:mi><mml:mo>(</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="italic">π</mml:mi><mml:mi>x</mml:mi><mml:mo>/</mml:mo><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>,
<inline-formula><mml:math id="M285" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">η</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">10</mml:mn></mml:mrow></mml:math></inline-formula> m), leading to a non-linear wave as the simulation progresses.</p>
      <p id="d1e10181">The simulation is run for two full wave periods, approximately 3831.31 s.
To investigate tracer conservation and consistency properties, two
passive tracers are included: salinity is set to a constant 4.5 psu,
while temperature varies between 5.0 and 15.0 <inline-formula><mml:math id="M286" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>C along the
channel (<inline-formula><mml:math id="M287" display="inline"><mml:mrow><mml:mi>T</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">5</mml:mn><mml:mi>sin⁡</mml:mi><mml:mo>(</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="italic">π</mml:mi><mml:mi>x</mml:mi><mml:mo>/</mml:mo><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>+</mml:mo><mml:mn mathvariant="normal">10</mml:mn></mml:mrow></mml:math></inline-formula> <inline-formula><mml:math id="M288" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>C).</p>
      <p id="d1e10238">The domain was discretized with a split-quad mesh using 40 elements along the
channel (1500 m edge length) and four vertical layers. The time step is
<inline-formula><mml:math id="M289" display="inline"><mml:mrow><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>t</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">95.78</mml:mn></mml:mrow></mml:math></inline-formula> s, chosen to meet the horizontal advection condition.</p>
      <p id="d1e10255">During the simulation, the volume of the 3-D domain was conserved to accuracy
<inline-formula><mml:math id="M290" display="inline"><mml:mrow><mml:mi mathvariant="script">O</mml:mi><mml:mo>(</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">15</mml:mn></mml:mrow></mml:msup><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>. The “2-D volume”, i.e., the integral of the
elevation field, was conserved to accuracy <inline-formula><mml:math id="M291" display="inline"><mml:mrow><mml:mi mathvariant="script">O</mml:mi><mml:mo>(</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">16</mml:mn></mml:mrow></mml:msup><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>. Salinity
remained at constant 4.5 psu with a small <inline-formula><mml:math id="M292" display="inline"><mml:mrow><mml:mi mathvariant="script">O</mml:mi><mml:mo>(</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">9</mml:mn></mml:mrow></mml:msup><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>
deviation. The total mass of salinity and temperature were both conserved to
accuracy <inline-formula><mml:math id="M293" display="inline"><mml:mrow><mml:mi mathvariant="script">O</mml:mi><mml:mo>(</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">12</mml:mn></mml:mrow></mml:msup><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>. Over- and undershoots in the temperature
field were negligible due to the slope limiters. Without the limiter,
temperature overshoots were <inline-formula><mml:math id="M294" display="inline"><mml:mrow><mml:mi mathvariant="script">O</mml:mi><mml:mo>(</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msup><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>. These results show that
the model indeed fully conserves volume and tracers and does not exhibit
overshoots. Moreover, the tracer consistency property is satisfied, verifying
the integrity of the ALE formulation.</p>
      <p id="d1e10359">To investigate the order of convergence of the solver, we used a smaller
initial elevation perturbation (<inline-formula><mml:math id="M295" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">η</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> cm). In this case, the
resulting standing wave is close to linear. At the end of the simulation, the
solution was compared to the analytical solution of the linear wave equation
(which coincides with the initial condition) by computing the <inline-formula><mml:math id="M296" display="inline"><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> error,
<inline-formula><mml:math id="M297" display="inline"><mml:mrow><mml:mi mathvariant="script">E</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">η</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mo>(</mml:mo><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:munder><mml:mo>(</mml:mo><mml:mi mathvariant="italic">η</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="italic">η</mml:mi><mml:mi mathvariant="normal">a</mml:mi></mml:msub><mml:msup><mml:mo>)</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mi mathvariant="normal">d</mml:mi><mml:mi mathvariant="bold">x</mml:mi><mml:msup><mml:mo>)</mml:mo><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>/</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula>.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F2" specific-use="star"><caption><p id="d1e10444">Convergence of the <inline-formula><mml:math id="M298" display="inline"><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> error in the standing wave test case.
Tested element sizes were 3000, 1500, 1000, 750, 500, 375, and 300 m. The
number indicates the slope of the least-squares best-fit line (dashed
line).</p></caption>
          <?xmltex \igopts{width=341.433071pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/11/4359/2018/gmd-11-4359-2018-f01.pdf"/>

        </fig>

      <p id="d1e10464">We ran the simulation, varying the horizontal mesh resolution between
3 km and 300 m; the number of vertical levels varied between 2
and 20. In each case, the channel was made one element wide, and the time step
was chosen to meet the CFL criterion for horizontal advection. At the end of
the simulation, the <inline-formula><mml:math id="M299" display="inline"><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> error was computed for water elevation and velocity
(see Fig. <xref ref-type="fig" rid="Ch1.F2"/>). The velocity field shows the
expected second-order convergence, whereas elevation converges at a rate of 3.2.
It is known that <inline-formula><mml:math id="M300" display="inline"><mml:mrow><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> shallow water equations models
may exhibit superconvergence properties, especially for the elevation field
<xref ref-type="bibr" rid="bib1.bibx6 bib1.bibx17" id="paren.69"/>. Here, our results verify that the solver
behaves as expected and yields second-order accuracy under barotropic forcing.</p>
</sec>
<sec id="Ch1.S5.SS2">
  <title>Baroclinic MMS test</title>
      <p id="d1e10502">Verifying model accuracy under baroclinic forcing is more challenging as no
analytical solutions are available. Here, we use the method of manufactured
solutions <xref ref-type="bibr" rid="bib1.bibx72" id="paren.70"><named-content content-type="pre">MMS;</named-content></xref> to construct a steady-state test case
that allows us to verify the correctness of the discrete baroclinic
operators. The domain is a <inline-formula><mml:math id="M301" display="inline"><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">15</mml:mn></mml:mrow></mml:math></inline-formula> by <inline-formula><mml:math id="M302" display="inline"><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">10</mml:mn></mml:mrow></mml:math></inline-formula> km large and <inline-formula><mml:math id="M303" display="inline"><mml:mrow><mml:mi>h</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">40</mml:mn></mml:mrow></mml:math></inline-formula> m
deep rectangular box. All lateral boundaries are closed. We
prescribe initial velocity and temperature fields:

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M304" display="block"><mml:mtable displaystyle="true"><mml:mlabeledtr id="Ch1.E54"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:msub><mml:mi>u</mml:mi><mml:mi mathvariant="normal">a</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mi>sin⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="italic">π</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mi>x</mml:mi></mml:mrow></mml:mfenced><mml:mi>cos⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:mi>z</mml:mi></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E55"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:msub><mml:mi>v</mml:mi><mml:mi mathvariant="normal">a</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">3</mml:mn></mml:mfrac></mml:mstyle><mml:mi>cos⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mi>sin⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>z</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi>h</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E56"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:msub><mml:mi>T</mml:mi><mml:mi mathvariant="normal">a</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">15</mml:mn><mml:mi>sin⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mi>sin⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mi>cos⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>z</mml:mi><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>+</mml:mo><mml:mn mathvariant="normal">15</mml:mn><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            These functions were chosen to be analytic (infinitely differentiable) and
fully three-dimensional to better quantify the spatial discretization error.</p>
      <p id="d1e10725">Salinity is set to a constant 35 psu. We use the linear equation of
state (Eq. <xref ref-type="disp-formula" rid="Ch1.E14"/>) with <inline-formula><mml:math id="M305" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1000</mml:mn></mml:mrow></mml:math></inline-formula> kg m<inline-formula><mml:math id="M306" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>,
<inline-formula><mml:math id="M307" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mi mathvariant="normal">T</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0.2</mml:mn></mml:mrow></mml:math></inline-formula> kg m<inline-formula><mml:math id="M308" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> <inline-formula><mml:math id="M309" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>C<inline-formula><mml:math id="M310" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>, and <inline-formula><mml:math id="M311" display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">5</mml:mn></mml:mrow></mml:math></inline-formula> <inline-formula><mml:math id="M312" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>C<inline-formula><mml:math id="M313" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>.
For the sake of simplicity, bathymetry is constant
and elevation is set to zero initially. Coriolis frequency was set to a
constant <inline-formula><mml:math id="M314" display="inline"><mml:mrow><mml:mi>f</mml:mi><mml:mo>=</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">4</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> s<inline-formula><mml:math id="M315" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>. Bottom friction, viscosity, and diffusivity are omitted.</p>
      <?pagebreak page4369?><p id="d1e10873"><?xmltex \hack{\newpage}?>Without any additional forcing, the initial conditions lead to a
time-dependent solution. Following the MMS strategy, we add analytical source
terms in the dynamic equations that cancel all the active terms in the
equations, leading to a steady-state solution. The remaining error is purely
the discretization error of the advection, pressure gradient, and Coriolis
operators. The source terms are derived analytically and projected to the
corresponding function space. The analytical formulae are given in
Appendix <xref ref-type="sec" rid="App1.Ch1.S1"/>.</p>
      <p id="d1e10879">The coarsest mesh contains four elements both in <inline-formula><mml:math id="M316" display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M317" display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula> directions and
two vertical levels. We refine the mesh up to 10 times (40 elements and
20 vertical levels) and compute the <inline-formula><mml:math id="M318" display="inline"><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> error of the prognostic fields against
the exact solutions. In each case, the model is run for 50 iterations with a
time step chosen to meet the CFL condition.</p>
      <p id="d1e10908">The variation of the <inline-formula><mml:math id="M319" display="inline"><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> errors with resolution is shown in
Fig. <xref ref-type="fig" rid="Ch1.F3"/>. All the prognostic variables exhibit
the correct second-order convergence rate. The diagnostic vertical velocity
field (which depends on the divergence of <inline-formula><mml:math id="M320" display="inline"><mml:mi mathvariant="bold-italic">u</mml:mi></mml:math></inline-formula>) converges linearly as
expected. Therefore, we conclude that advection, pressure gradient, and
Coriolis terms are discretized correctly. We have also developed similar MMS
tests for the diffusivity/viscosity operators and the bottom friction term,
all of which show second-order convergence as well (not shown).</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F3" specific-use="star"><caption><p id="d1e10933">Convergence of the <inline-formula><mml:math id="M321" display="inline"><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> error in the baroclinic MMS test case.
The mesh was refined 1, 2, 4, 6, 8, and 10 times, resulting in
resolutions of 2500, 1250, 625, 416.67, 312.5, and 250 m (shortest edge of the
triangle). The time steps were 25.0, 12.5, 6.25, 4.167, 3.125, and 2.5 s,
respectively. The number indicates the slope of the least-squares best-fit
line (dashed line).</p></caption>
          <?xmltex \igopts{width=341.433071pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/11/4359/2018/gmd-11-4359-2018-f02.pdf"/>

        </fig>

</sec>
<sec id="Ch1.S5.SS3">
  <title>Lock exchange</title>
      <p id="d1e10959">The validity of the baroclinic solver and its level of spurious mixing is
investigated with the standard lock exchange test case
<xref ref-type="bibr" rid="bib1.bibx80 bib1.bibx38 bib1.bibx46 bib1.bibx44 bib1.bibx50 bib1.bibx65" id="paren.71"/>.
Here, we follow the setup of <xref ref-type="bibr" rid="bib1.bibx44" id="text.72"/> and <xref ref-type="bibr" rid="bib1.bibx65" id="text.73"/>: The
domain is a 64 km long and 1 km wide rectangular channel. Water
depth is 20 m. Initially, the left-hand side of the domain is filled with
dense water mass (<inline-formula><mml:math id="M322" display="inline"><mml:mrow><mml:mi>T</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">5.0</mml:mn></mml:mrow></mml:math></inline-formula> <inline-formula><mml:math id="M323" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>C) compared to the water on the right
(<inline-formula><mml:math id="M324" display="inline"><mml:mrow><mml:mi>T</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">30.0</mml:mn></mml:mrow></mml:math></inline-formula> <inline-formula><mml:math id="M325" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>C). Salinity is kept at constant 35 psu. We
use the same linear equation of state as in Sect. <xref ref-type="sec" rid="Ch1.S5.SS2"/>,
resulting in a density difference of <inline-formula><mml:math id="M326" display="inline"><mml:mrow><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi mathvariant="italic">ρ</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">5.0</mml:mn></mml:mrow></mml:math></inline-formula> kg m<inline-formula><mml:math id="M327" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>. The
domain is discretized with a regular split-quad mesh. The triangle edge
length is 500 m and 20 equidistant <inline-formula><mml:math id="M328" display="inline"><mml:mi mathvariant="italic">σ</mml:mi></mml:math></inline-formula> levels are used in the
vertical direction.</p>
      <p id="d1e11049">Stabilizing the internal pressure gradient requires some form of friction. To
this end, we apply a constant Laplacian horizontal viscosity, using values
<inline-formula><mml:math id="M329" display="inline"><mml:mrow><mml:mi mathvariant="italic">ν</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1.0</mml:mn></mml:mrow></mml:math></inline-formula>, 10.0, 100.0, and 200.0 m<inline-formula><mml:math id="M330" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> s<inline-formula><mml:math id="M331" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>. These
values correspond to grid Reynolds numbers <italic>Re</italic><inline-formula><mml:math id="M332" display="inline"><mml:mrow><mml:msub><mml:mi/><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mi>U</mml:mi><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>x</mml:mi><mml:mo>/</mml:mo><mml:mi mathvariant="italic">ν</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">250.0</mml:mn></mml:mrow></mml:math></inline-formula>, 25.0, 2.5, and 1.25, respectively, where the
characteristic velocity scale of the exchange flow is <inline-formula><mml:math id="M333" display="inline"><mml:mrow><mml:mi>U</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0.5</mml:mn></mml:mrow></mml:math></inline-formula> m s<inline-formula><mml:math id="M334" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>.
Vertical viscosity is set to a constant 10<inline-formula><mml:math id="M335" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">4</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> m<inline-formula><mml:math id="M336" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> s<inline-formula><mml:math id="M337" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>. Bottom friction is omitted.</p>
      <p id="d1e11171">Figure <xref ref-type="fig" rid="Ch1.F4"/> shows the initial density field and
solution after 17 h of simulation for the three cases. Higher background
viscosity leads to a less noisy velocity field and therefore sharper density
front. The sharpness and shape of the fronts are similar to results presented
in the literature <xref ref-type="bibr" rid="bib1.bibx44" id="paren.74"><named-content content-type="pre">e.g., Fig. 5 in</named-content></xref>. The low viscosity
cases (<italic>Re</italic><inline-formula><mml:math id="M338" display="inline"><mml:mrow><mml:msub><mml:mi/><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">25</mml:mn><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mn mathvariant="normal">250</mml:mn></mml:mrow></mml:math></inline-formula>) exhibit an internal wave at the front which
significantly increases the overall mixing.</p>
      <p id="d1e11200">Assuming that, in the absence of bottom friction, all available potential
energy is transformed into kinetic energy, the maximum front propagation
speed can be estimated as <inline-formula><mml:math id="M339" display="inline"><mml:mrow><mml:mi>c</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>/</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:msqrt><mml:mrow><mml:mi>g</mml:mi><mml:mi>H</mml:mi><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi mathvariant="italic">ρ</mml:mi><mml:mo>/</mml:mo><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:msqrt></mml:mrow></mml:math></inline-formula>
<xref ref-type="bibr" rid="bib1.bibx4 bib1.bibx46" id="paren.75"/>. Figure <xref ref-type="fig" rid="Ch1.F5"/>a
shows the propagation of the front location at the bottom of the domain
(the front at the surface behaves comparably). All three simulations are in
good agreement with the theoretical propagation speed. The simulated front
propagation speed is underestimated by roughly 5 %, indicating loss of energy
due to mixing. These results are similar to results reported in the
literature; e.g., <xref ref-type="bibr" rid="bib1.bibx44" id="text.76"/> show similar performance for ROMS, MITgcm, and MOM.</p>
      <?pagebreak page4370?><p id="d1e11245">Figure <xref ref-type="fig" rid="Ch1.F5"/>b shows the maximum over- and
undershoots in the temperature field during the simulation. Even in the low
viscosity case (<italic>Re</italic><inline-formula><mml:math id="M340" display="inline"><mml:mrow><mml:msub><mml:mi/><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">250</mml:mn></mml:mrow></mml:math></inline-formula>), the overshoots are of order
10<inline-formula><mml:math id="M341" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">5</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> <inline-formula><mml:math id="M342" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>C, indicating that the tracer advection scheme is indeed close
to monotone, due to the SSP time integration method and slope limiters. Note
that, if the slope limiter is omitted, the overshoots can reach 30 <inline-formula><mml:math id="M343" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>C.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F4" specific-use="star"><caption><p id="d1e11298">Water density in the lock exchange test case in the center of the
domain (<inline-formula><mml:math id="M344" display="inline"><mml:mrow><mml:mi>y</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula> km). <bold>(a)</bold> Initial condition. Solution after 17 h of
simulation with <italic>Re</italic><inline-formula><mml:math id="M345" display="inline"><mml:msub><mml:mi/><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:math></inline-formula> <bold>(b)</bold> 1.25, <bold>(c)</bold> 2.5,
<bold>(d)</bold> 25.0, and <bold>(e)</bold> 250.0.</p></caption>
          <?xmltex \igopts{width=284.527559pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/11/4359/2018/gmd-11-4359-2018-f03.pdf"/>

        </fig>

      <?xmltex \floatpos{t}?><fig id="Ch1.F5" specific-use="star"><caption><p id="d1e11348">Diagnostics of the lock exchange test. <bold>(a)</bold> Location of the
density front at the bottom of the domain, <bold>(b)</bold> over- and undershoots
in the temperature field (with regard to to 30.0 and 5.0 <inline-formula><mml:math id="M346" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>C, respectively),
and <bold>(c)</bold> normalized reference potential energy (RPE) versus simulation
time.</p></caption>
          <?xmltex \igopts{width=398.338583pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/11/4359/2018/gmd-11-4359-2018-f04.pdf"/>

        </fig>

      <p id="d1e11375">To diagnose the role of spurious mixing, we use the reference potential energy
(RPE; <xref ref-type="bibr" rid="bib1.bibx44 bib1.bibx65" id="altparen.77"/>). RPE is computed as the vertical
center of mass of a sorted density field <inline-formula><mml:math id="M347" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="italic">ρ</mml:mi><mml:mo>*</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula>: RPE <inline-formula><mml:math id="M348" display="inline"><mml:mo>=</mml:mo></mml:math></inline-formula> <inline-formula><mml:math id="M349" display="inline"><mml:mrow><mml:mi>g</mml:mi><mml:mo>∫</mml:mo><mml:msup><mml:mi mathvariant="italic">ρ</mml:mi><mml:mo>*</mml:mo></mml:msup><mml:mo>(</mml:mo><mml:mi>z</mml:mi><mml:mo>+</mml:mo><mml:mi>h</mml:mi><mml:mo>)</mml:mo><mml:mi mathvariant="normal">d</mml:mi><mml:mi mathvariant="bold">x</mml:mi></mml:mrow></mml:math></inline-formula>.
The <inline-formula><mml:math id="M350" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="italic">ρ</mml:mi><mml:mo>*</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula> field is defined as the unique, stratified density
field where the densest water parcels are distributed over the bottom, and
density increases monotonically over the water column. As such, <inline-formula><mml:math id="M351" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="italic">ρ</mml:mi><mml:mo>*</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula> is
the steady-state density distribution, and RPE represents the portion of
potential energy that cannot be transformed into kinetic energy. Mixing the
two water masses increases RPE (the center of mass), and thus the amount of
unavailable potential energy increases. Figure <xref ref-type="fig" rid="Ch1.F5"/>c
shows the evolution of normalized RPE,
<inline-formula><mml:math id="M352" display="inline"><mml:mrow><mml:mover accent="true"><mml:mi mathvariant="normal">RPE</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mo>(</mml:mo><mml:mi mathvariant="normal">RPE</mml:mi><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>-</mml:mo><mml:mi mathvariant="normal">RPE</mml:mi><mml:mo>(</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>)</mml:mo><mml:mo>)</mml:mo><mml:mo>/</mml:mo><mml:mi mathvariant="normal">RPE</mml:mi><mml:mo>(</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>, during the simulation. At
<inline-formula><mml:math id="M353" display="inline"><mml:mrow><mml:mi>t</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">17</mml:mn></mml:mrow></mml:math></inline-formula> h, the values are 0.612, 1.13, 2.35, <inline-formula><mml:math id="M354" display="inline"><mml:mrow><mml:mn mathvariant="normal">3.11</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">5</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> for the
four simulations. These results are in good agreement with those reported
with MPAS-Ocean model <xref ref-type="bibr" rid="bib1.bibx65" id="paren.78"/>: with the same mesh resolution,
MPAS-Ocean shows slightly larger normalized RPE, for example, at <inline-formula><mml:math id="M355" display="inline"><mml:mrow><mml:mi>t</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">17</mml:mn></mml:mrow></mml:math></inline-formula> h
<inline-formula><mml:math id="M356" display="inline"><mml:mrow><mml:mover accent="true"><mml:mi mathvariant="normal">RPE</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mo>≈</mml:mo><mml:mn mathvariant="normal">3.5</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">5</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> in the case of
<italic>Re</italic><inline-formula><mml:math id="M357" display="inline"><mml:mrow><mml:msub><mml:mi/><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">25</mml:mn></mml:mrow></mml:math></inline-formula>. The difference is likely due to the different spatial
discretization (<inline-formula><mml:math id="M358" display="inline"><mml:mrow><mml:msubsup><mml:mi>P</mml:mi><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="normal">DG</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> instead of finite volumes) or
differences in the numerical viscosity operator. Applying slope limiters to
the velocity field is not necessary for numerical stability, but it reduces
high-frequency noise in the velocity field and hence results in lower RPE values.</p>
      <p id="d1e11605">In order to investigate the role of the Lax–Friedrichs flux on numerical
mixing, we ran the lock exchange test case with zero viscosity. After 17 h of
simulation, the RPE value was approximately <inline-formula><mml:math id="M359" display="inline"><mml:mrow><mml:mn mathvariant="normal">3.2</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">5</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula>. When the
Lax–Friedrichs flux was omitted, a similar RPE value was obtained with
viscosity <inline-formula><mml:math id="M360" display="inline"><mml:mrow><mml:mi mathvariant="italic">ν</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">3.125</mml:mn></mml:mrow></mml:math></inline-formula> m<inline-formula><mml:math id="M361" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> s<inline-formula><mml:math id="M362" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>. Therefore, in this particular
test case, the Lax–Friedrichs flux introduces mixing that is roughly
equivalent to 3 m<inline-formula><mml:math id="M363" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> s<inline-formula><mml:math id="M364" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> viscosity, corresponding to <italic>Re</italic><inline-formula><mml:math id="M365" display="inline"><mml:mrow><mml:msub><mml:mi/><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">80</mml:mn></mml:mrow></mml:math></inline-formula>.
When viscosity was non-zero, it was evident from the numerical
simulations that the Lax–Friedrichs flux has a negligible impact on
numerical mixing if <italic>Re</italic> <inline-formula><mml:math id="M366" display="inline"><mml:mo>&lt;</mml:mo></mml:math></inline-formula> 10 (not shown).</p>
</sec>
<sec id="Ch1.S5.SS4">
  <title>Baroclinic eddies</title>
      <p id="d1e11714">We investigate the model's ability to generate baroclinic eddies with the
eddying channel test case of <xref ref-type="bibr" rid="bib1.bibx44" id="text.79"/>. This test case is an
idealization of the Antarctic Circumpolar Current, the domain spanning
500 and 160 km in the meridional and zonal directions,
respectively. The domain is 1000 m deep. At the zonal boundaries,
periodic boundary conditions are applied; northern and southern boundaries
are closed. The Coriolis parameter is taken as a constant <inline-formula><mml:math id="M367" display="inline"><mml:mrow><mml:mn mathvariant="normal">1.2</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">4</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> s<inline-formula><mml:math id="M368" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>.</p>
      <?pagebreak page4372?><p id="d1e11750">Initially, the domain is linearly stratified with warmer water at the
surface. In addition, the northern half of the domain is warmer, with a
narrow sinusoidal transition band separating the warm (northern) and cold
(southern) water masses (Fig. <xref ref-type="fig" rid="Ch1.F6"/>; see
<xref ref-type="bibr" rid="bib1.bibx65" id="altparen.80"/> for the definition of the initial temperature field).
Water temperature ranges between 10 and 20 <inline-formula><mml:math id="M369" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>C. A
linear equation of state is used with <inline-formula><mml:math id="M370" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1000</mml:mn></mml:mrow></mml:math></inline-formula> kg m<inline-formula><mml:math id="M371" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>,
<inline-formula><mml:math id="M372" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mi mathvariant="normal">T</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0.2</mml:mn></mml:mrow></mml:math></inline-formula> kg m<inline-formula><mml:math id="M373" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> <inline-formula><mml:math id="M374" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>C<inline-formula><mml:math id="M375" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> and <inline-formula><mml:math id="M376" display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">5</mml:mn></mml:mrow></mml:math></inline-formula> <inline-formula><mml:math id="M377" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>C.
Salinity is kept at constant 35 psu and it does not affect
density (<inline-formula><mml:math id="M378" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mi mathvariant="normal">S</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula>). Bottom friction is parameterized by a constant drag
coefficient of <inline-formula><mml:math id="M379" display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">D</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0.01</mml:mn></mml:mrow></mml:math></inline-formula>.</p>
      <p id="d1e11898">The baroclinic Rossby radius of deformation is 20 km
<xref ref-type="bibr" rid="bib1.bibx44" id="paren.81"/>. Horizontal mesh resolution is constant in space. We use a
regular split-quad mesh with two different mesh resolutions: eddy-permitting
10 km and a finer 4 km resolution. In the vertical direction,
26 and 40 equidistant sigma levels are used in the two cases, respectively.
Simulations are carried out with different values of horizontal viscosity,
with the grid Reynolds number ranging from 2 to 100. The different setups are
summarized in Table <xref ref-type="table" rid="Ch1.T2"/>. Vertical viscosity is set to a
constant 10<inline-formula><mml:math id="M380" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">4</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> m<inline-formula><mml:math id="M381" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> s<inline-formula><mml:math id="M382" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>.</p>
      <p id="d1e11939">As the simulation progresses, baroclinic eddies develop at the center of the
domain, quickly propagating elsewhere. This is a spin-down experiment,
i.e., the domain is a closed system with no forcing at the boundaries.
Therefore, all the energy in the system originates from the initial potential energy,
which is being dissipated during the simulation; again, the RPE is used as a
metric for the energy transfer or the loss of energy due to mixing.</p>

<?xmltex \floatpos{t}?><table-wrap id="Ch1.T2"><caption><p id="d1e11946">Experimental setup for baroclinic eddy test case. Listed are the
horizontal mesh resolution (min. triangle edge length), number of vertical
levels, time step, horizontal viscosity, and the approximate grid Reynolds number.</p></caption><oasis:table frame="topbot"><oasis:tgroup cols="6">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="center"/>
     <oasis:colspec colnum="3" colname="col3" align="center"/>
     <oasis:colspec colnum="4" colname="col4" align="center"/>
     <oasis:colspec colnum="5" colname="col5" align="right"/>
     <oasis:colspec colnum="6" colname="col6" align="left"/>
     <oasis:thead>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M383" display="inline"><mml:mrow><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>x</mml:mi></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2"><inline-formula><mml:math id="M384" display="inline"><mml:mrow><mml:mi>n</mml:mi><mml:mi>z</mml:mi></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col3"><inline-formula><mml:math id="M385" display="inline"><mml:mrow><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M386" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ν</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col5"><italic>Re</italic><inline-formula><mml:math id="M387" display="inline"><mml:msub><mml:mi/><mml:mi mathvariant="normal">h</mml:mi></mml:msub></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1">(km)</oasis:entry>
         <oasis:entry colname="col2"/>
         <oasis:entry colname="col3">(s)</oasis:entry>
         <oasis:entry colname="col4">(m<inline-formula><mml:math id="M388" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> s<inline-formula><mml:math id="M389" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>)</oasis:entry>
         <oasis:entry colname="col5"/>
         <oasis:entry colname="col6"/>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row>
         <oasis:entry colname="col1">10</oasis:entry>
         <oasis:entry colname="col2">26</oasis:entry>
         <oasis:entry colname="col3">348.39</oasis:entry>
         <oasis:entry colname="col4">10.0</oasis:entry>
         <oasis:entry colname="col5">100</oasis:entry>
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">10</oasis:entry>
         <oasis:entry colname="col2">26</oasis:entry>
         <oasis:entry colname="col3">348.39</oasis:entry>
         <oasis:entry colname="col4">20.0</oasis:entry>
         <oasis:entry colname="col5">50</oasis:entry>
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">10</oasis:entry>
         <oasis:entry colname="col2">26</oasis:entry>
         <oasis:entry colname="col3">348.39</oasis:entry>
         <oasis:entry colname="col4">50.0</oasis:entry>
         <oasis:entry colname="col5">20</oasis:entry>
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">10</oasis:entry>
         <oasis:entry colname="col2">26</oasis:entry>
         <oasis:entry colname="col3">348.39</oasis:entry>
         <oasis:entry colname="col4">125.0</oasis:entry>
         <oasis:entry colname="col5">8</oasis:entry>
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">10</oasis:entry>
         <oasis:entry colname="col2">26</oasis:entry>
         <oasis:entry colname="col3">348.39</oasis:entry>
         <oasis:entry colname="col4">200.0</oasis:entry>
         <oasis:entry colname="col5">5</oasis:entry>
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">10</oasis:entry>
         <oasis:entry colname="col2">26</oasis:entry>
         <oasis:entry colname="col3">348.39</oasis:entry>
         <oasis:entry colname="col4">500.0</oasis:entry>
         <oasis:entry colname="col5">2</oasis:entry>
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">4</oasis:entry>
         <oasis:entry colname="col2">40</oasis:entry>
         <oasis:entry colname="col3">140.26</oasis:entry>
         <oasis:entry colname="col4">4.0</oasis:entry>
         <oasis:entry colname="col5">100</oasis:entry>
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">4</oasis:entry>
         <oasis:entry colname="col2">40</oasis:entry>
         <oasis:entry colname="col3">140.26</oasis:entry>
         <oasis:entry colname="col4">8.0</oasis:entry>
         <oasis:entry colname="col5">50</oasis:entry>
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">4</oasis:entry>
         <oasis:entry colname="col2">40</oasis:entry>
         <oasis:entry colname="col3">140.26</oasis:entry>
         <oasis:entry colname="col4">20.0</oasis:entry>
         <oasis:entry colname="col5">20</oasis:entry>
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">4</oasis:entry>
         <oasis:entry colname="col2">40</oasis:entry>
         <oasis:entry colname="col3">140.26</oasis:entry>
         <oasis:entry colname="col4">50.0</oasis:entry>
         <oasis:entry colname="col5">8</oasis:entry>
         <oasis:entry colname="col6"/>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">4</oasis:entry>
         <oasis:entry colname="col2">40</oasis:entry>
         <oasis:entry colname="col3">140.26</oasis:entry>
         <oasis:entry colname="col4">200.0</oasis:entry>
         <oasis:entry colname="col5">2</oasis:entry>
         <oasis:entry colname="col6"/>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table></table-wrap>

      <p id="d1e12308">Figure <xref ref-type="fig" rid="Ch1.F6"/> shows the surface temperature fields at
various time intervals up to 200 days after the initialization for different
values of horizontal viscosity. As expected, the model captures more
mesoscale features as viscosity is decreased. Qualitatively, the results are
in agreement with ROMS and MITgcm results <xref ref-type="bibr" rid="bib1.bibx44" id="paren.82"/>, as well as
MPAS-Ocean <xref ref-type="bibr" rid="bib1.bibx65" id="paren.83"/>, all of which use a comparable Laplacian
scheme for horizontal viscosity.</p>
      <p id="d1e12319">The evolution of the normalized RPE during the simulation is shown in
Fig. <xref ref-type="fig" rid="Ch1.F7"/>a for the 4 km mesh resolution. The amount
of mixing clearly depends on the grid Reynolds number, with RPE being roughly
twice as high for <italic>Re</italic><inline-formula><mml:math id="M390" display="inline"><mml:mrow><mml:msub><mml:mi/><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">20</mml:mn></mml:mrow></mml:math></inline-formula> compared to <italic>Re</italic><inline-formula><mml:math id="M391" display="inline"><mml:mrow><mml:msub><mml:mi/><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:math></inline-formula>. The average
rate of change of RPE, averaged over days 3 to 319, is shown in
Fig. <xref ref-type="fig" rid="Ch1.F7"/>b for all the simulations. As expected, the rate of
change increases with larger grid Reynolds number and with a coarser mesh.
These RPE metrics are in good agreement with results in the literature. At
<italic>Re</italic><inline-formula><mml:math id="M392" display="inline"><mml:mrow><mml:msub><mml:mi/><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">20</mml:mn></mml:mrow></mml:math></inline-formula> Thetis <inline-formula><mml:math id="M393" display="inline"><mml:mrow><mml:mi mathvariant="normal">dRPE</mml:mi><mml:mo>/</mml:mo><mml:mi mathvariant="normal">d</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:math></inline-formula>, values are <inline-formula><mml:math id="M394" display="inline"><mml:mrow><mml:mn mathvariant="normal">4.3</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">4</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> and
<inline-formula><mml:math id="M395" display="inline"><mml:mrow><mml:mn mathvariant="normal">2.2</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">4</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> W m<inline-formula><mml:math id="M396" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>, for the 10 and 4 km resolutions.
The corresponding values for MITgcm, Modular Ocean Model (MOM), and Parallel Ocean Program (POP) (averaged over days 3 to 319) are larger: at least <inline-formula><mml:math id="M397" display="inline"><mml:mrow><mml:mn mathvariant="normal">8</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">4</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M398" display="inline"><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">4</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> W m<inline-formula><mml:math id="M399" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>,
respectively <xref ref-type="bibr" rid="bib1.bibx65" id="paren.84"><named-content content-type="post">Fig. 12</named-content></xref>. <xref ref-type="bibr" rid="bib1.bibx44" id="text.85"/>
reported similar values for MITgcm and MOM. On a hexagonal mesh, MPAS-Ocean
yields smaller <inline-formula><mml:math id="M400" display="inline"><mml:mrow><mml:mi mathvariant="normal">dRPE</mml:mi><mml:mo>/</mml:mo><mml:mi mathvariant="normal">d</mml:mi><mml:mi>t</mml:mi></mml:mrow></mml:math></inline-formula> values: approximately <inline-formula><mml:math id="M401" display="inline"><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">4</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> and
<inline-formula><mml:math id="M402" display="inline"><mml:mrow><mml:mn mathvariant="normal">7</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">5</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> W m<inline-formula><mml:math id="M403" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> for the two resolutions, respectively
<xref ref-type="bibr" rid="bib1.bibx65" id="paren.86"><named-content content-type="pre">values averaged over days 1–320; see Fig. 12 in</named-content></xref>.
With a quad mesh, however, MPAS-Ocean values are approximately
<inline-formula><mml:math id="M404" display="inline"><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">4</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> W m<inline-formula><mml:math id="M405" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> for both resolutions and therefore close to Thetis performance.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F6" specific-use="star"><caption><p id="d1e12594">Sea surface temperature fields for the eddying channel test case at
4 km horizontal mesh resolution. Horizontal viscosity is 200 <bold>(a)</bold>,
50 <bold>(b)</bold>, and 20 m<inline-formula><mml:math id="M406" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> s<inline-formula><mml:math id="M407" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> <bold>(c)</bold>. These values
correspond to mesh Reynolds numbers 2, 8, and 20, respectively.</p></caption>
          <?xmltex \igopts{width=341.433071pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/11/4359/2018/gmd-11-4359-2018-f05.png"/>

        </fig>

      <?pagebreak page4373?><p id="d1e12633"><?xmltex \hack{\newpage}?>The test cases were run on a Linux cluster with 16-core Intel Xeon E5620
processors and Mellanox Infiniband interconnect. The 320-day simulation took
roughly 42 h to run on 96 cores with the 4 km resolution mesh and
140.26 s time step. It should be noted, however, that the time step
employed here is smaller than the maximal allowed time step. We also carried
out a strong scaling test with the 4 km mesh. In the scaling test, the
simulation was run for 40 time steps, recording the total elapsed wall-clock
time and time spent in different parts of the solver. Figure <xref ref-type="fig" rid="Ch1.F8"/>a
shows the overall speed-up up to 96 processors.
The scaling efficiency drops to roughly 50 % at 96 cores, when the local
degree of freedom count for the tracer field is 25 000 (see black line
in Fig. <xref ref-type="fig" rid="Ch1.F8"/>b). This scaling efficiency is close to
typical Firedrake performance <xref ref-type="bibr" rid="bib1.bibx69" id="paren.87"/>.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F7" specific-use="star"><caption><p id="d1e12647">Diagnostics of the eddying channel test case. <bold>(a)</bold> Evolution
of normalized RPE over time in the eddying channel test case for 4 km mesh
resolution. <bold>(b)</bold> Rate of change of RPE for different grid resolutions
and grid Reynolds numbers. The rate of change was evaluated by computing the
average RPE change from days 3 to 319.</p></caption>
          <?xmltex \igopts{width=341.433071pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/11/4359/2018/gmd-11-4359-2018-f06.pdf"/>

        </fig>

      <?xmltex \floatpos{t}?><fig id="Ch1.F8" specific-use="star"><caption><p id="d1e12664">Strong parallel scaling for the baroclinic eddies test case on a
4 km mesh (<inline-formula><mml:math id="M408" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ν</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">20</mml:mn></mml:mrow></mml:math></inline-formula> m<inline-formula><mml:math id="M409" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> s<inline-formula><mml:math id="M410" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>): <bold>(a)</bold> speed-up in
wall-clock time versus number of processes; <bold>(b)</bold> parallel efficiency
versus the local number of degrees of freedom (DOFs) in the 3-D tracer field
(top axis) and the 2-D (<inline-formula><mml:math id="M411" display="inline"><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover></mml:math></inline-formula>, <inline-formula><mml:math id="M412" display="inline"><mml:mi mathvariant="italic">η</mml:mi></mml:math></inline-formula>) mixed system (bottom
axis). The black line is the wall-clock time; colored lines stand for the
time spent in different implicit or explicit solvers. The vertical dashed
lines indicate 20 000 DOFs per process for the 2-D and 3-D problems,
respectively. The mesh consisted of 10 000 triangles, 40 vertical levels, and
400 000 prisms.</p></caption>
          <?xmltex \igopts{width=398.338583pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/11/4359/2018/gmd-11-4359-2018-f07.pdf"/>

        </fig>

      <p id="d1e12733">The scaling efficiency of the separate solvers is plotted with colored lines
in Fig. <xref ref-type="fig" rid="Ch1.F8"/>b. The implicit vertical
diffusion/viscosity solvers perform best due to the fact that the problem is
purely local without any horizontal dependencies. The explicit momentum
solver scales almost as well, whereas the explicit tracer solver scales
worse. The implicit 2-D solver (assembly and linear solve) scales the poorest
because the problem is relatively small; at 96 cores, there are only around
940 degrees of freedom in the (<inline-formula><mml:math id="M413" display="inline"><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover></mml:math></inline-formula>, <inline-formula><mml:math id="M414" display="inline"><mml:mi mathvariant="italic">η</mml:mi></mml:math></inline-formula>) system per core. We
have also experimented with explicit 2-D solvers,<?pagebreak page4374?> but they do not scale
significantly better compared to the two-stage implicit scheme used herein.</p>
      <p id="d1e12755">To further assess the CPU cost, we compared Thetis timing against the SLIM
3-D model <xref ref-type="bibr" rid="bib1.bibx84 bib1.bibx7 bib1.bibx16 bib1.bibx50" id="paren.88"/> which uses a
similar DG formulation but is implemented in C/C<inline-formula><mml:math id="M415" display="inline"><mml:mrow><mml:mo>+</mml:mo><mml:mo>+</mml:mo></mml:mrow></mml:math></inline-formula>. The wall-clock time, and
parallel efficiency used by both Thetis and SLIM 3-D are presented in
Appendix <xref ref-type="sec" rid="App1.Ch1.S2"/>. The setup, mesh, and time step were identical
for the two models. On a single core, Thetis runs 3.3 times faster. On
24 cores, the ratio is 4.0, and on 144 cores Thetis is still
2.2 times faster than SLIM 3-D. This highlights the fact that Firedrake can deliver good
parallel performance compared to models written in lower level languages.</p>
      <p id="d1e12773">It should be noted, however, that Thetis performance is currently not fully
optimized. We expect that the performance can be significantly improved both in
terms of serial and strong scaling performance. These will be addressed in future work.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F9" specific-use="star"><caption><p id="d1e12779">Horizontal mesh and bathymetry for the DOME test case. The domain is
extended 120 km further to the west to avoid boundary effects (shaded
region). Horizontal element size ranges from 6 to 22 km. There are
<inline-formula><mml:math id="M416" display="inline"><mml:mrow><mml:mn mathvariant="normal">18.8</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mn mathvariant="normal">3</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula> triangles in the horizontal mesh and 24 uniformly
distributed vertical levels resulting in <inline-formula><mml:math id="M417" display="inline"><mml:mrow><mml:mn mathvariant="normal">450</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mn mathvariant="normal">3</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula> prisms and
<inline-formula><mml:math id="M418" display="inline"><mml:mrow><mml:mn mathvariant="normal">2.7</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mn mathvariant="normal">6</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula> tracer degrees of freedom.</p></caption>
          <?xmltex \igopts{width=284.527559pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/11/4359/2018/gmd-11-4359-2018-f08.pdf"/>

        </fig>

</sec>
<sec id="Ch1.S5.SS5">
  <title>DOME</title>
      <?pagebreak page4375?><p id="d1e12839">Next, we investigate the model's ability to simulate density-driven overflows
with the DOME benchmark
<xref ref-type="bibr" rid="bib1.bibx28 bib1.bibx53 bib1.bibx82 bib1.bibx12" id="paren.89"/>. The domain is a
1100 by 600 km large basin, whose depth varies linearly from 600 m
at the northern boundary to 3600 m in the middle of the
domain (see Fig. <xref ref-type="fig" rid="Ch1.F9"/>). To avoid boundary condition issues,
we have extended the domain to the west by 120 km. At the northern
boundary, there is a 100 km wide and 200 km long inlet.
Initially, the basin is stably stratified with a linear temperature variation
from 10 <inline-formula><mml:math id="M419" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>C in the deepest part of the basin to 20 <inline-formula><mml:math id="M420" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>C
at the surface. We use the linear equation of state with
<inline-formula><mml:math id="M421" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1000</mml:mn></mml:mrow></mml:math></inline-formula> kg m<inline-formula><mml:math id="M422" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>,
<inline-formula><mml:math id="M423" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mi mathvariant="normal">T</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0.2</mml:mn></mml:mrow></mml:math></inline-formula> kg m<inline-formula><mml:math id="M424" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> <inline-formula><mml:math id="M425" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>C<inline-formula><mml:math id="M426" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>,
and <inline-formula><mml:math id="M427" display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">10</mml:mn></mml:mrow></mml:math></inline-formula> <inline-formula><mml:math id="M428" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>C, resulting in a <inline-formula><mml:math id="M429" display="inline"><mml:mrow><mml:mi mathvariant="normal">Δ</mml:mi><mml:mi mathvariant="italic">ρ</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">2.0</mml:mn></mml:mrow></mml:math></inline-formula> kg m<inline-formula><mml:math id="M430" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> density difference.</p>
      <p id="d1e12992">At the inlet, a dense inflow (temperature 10 <inline-formula><mml:math id="M431" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>C) is prescribed
in the bottom layer, with the surface layer being at 20 <inline-formula><mml:math id="M432" display="inline"><mml:msup><mml:mi/><mml:mo>∘</mml:mo></mml:msup></mml:math></inline-formula>C.
The inflow is in geostrophic balance, the thickness of the bottom layer being
roughly 300 m on the eastern end of the boundary diminishing
exponentially westward <xref ref-type="bibr" rid="bib1.bibx53" id="paren.90"/>. The total inflow in the bottom layer
is 5 Sv (<inline-formula><mml:math id="M433" display="inline"><mml:mrow><mml:mn mathvariant="normal">5</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mn mathvariant="normal">6</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula> m<inline-formula><mml:math id="M434" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">3</mml:mn></mml:msup></mml:math></inline-formula> s<inline-formula><mml:math id="M435" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>), the surface layer being
static. During the simulation, the fate of the inflowing waters is tracked
with a passive tracer that is initially zero in the basin and unity at the
inlet. Initially, the tracer field is set to the inflow conditions in the
northern part of the basin (<inline-formula><mml:math id="M436" display="inline"><mml:mrow><mml:mi>y</mml:mi><mml:mo>&gt;</mml:mo><mml:mn mathvariant="normal">650</mml:mn></mml:mrow></mml:math></inline-formula> km). Velocity is set to zero
everywhere. The eastern and southern boundaries of the basin are closed. The
western boundary is open with radiation boundary conditions and a 100 km
wide band where the temperature is relaxed to the initial condition.</p>
      <p id="d1e13065">The domain is discretized with an unstructured grid (Fig. <xref ref-type="fig" rid="Ch1.F9"/>).
Horizontal mesh resolution is 6 km near the
northern boundary, increasing southward. Overall, 24 vertical sigma levels are used.
Over the slope, the mesh resolution was designed to result in a hydrostatic
consistency metric (<inline-formula><mml:math id="M437" display="inline"><mml:mrow><mml:mi>r</mml:mi><mml:mo>&lt;</mml:mo><mml:mn mathvariant="normal">1.5</mml:mn></mml:mrow></mml:math></inline-formula>) <xref ref-type="bibr" rid="bib1.bibx3" id="paren.91"/>. Horizontal viscosity is set
to a constant 50 m<inline-formula><mml:math id="M438" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> s<inline-formula><mml:math id="M439" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>, which corresponds to
<italic>Re</italic><inline-formula><mml:math id="M440" display="inline"><mml:mrow><mml:msub><mml:mi/><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>≈</mml:mo><mml:mn mathvariant="normal">200</mml:mn></mml:mrow></mml:math></inline-formula> at the inlet. Horizontal diffusivity is constant at
10 m<inline-formula><mml:math id="M441" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> s<inline-formula><mml:math id="M442" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>. Vertical viscosity and diffusivity are parameterized
by the Pacanowski–Philander scheme as described in Sect. <xref ref-type="sec" rid="Ch1.S2.SS4"/>.
Bottom friction is parameterized with a quadratic drag
coefficient <inline-formula><mml:math id="M443" display="inline"><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">d</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mo>×</mml:mo><mml:msup><mml:mn mathvariant="normal">10</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> <xref ref-type="bibr" rid="bib1.bibx53 bib1.bibx82" id="paren.92"/>. A quadratic
function space is used for the baroclinic head and internal pressure gradient
as discussed in Sect. <xref ref-type="sec" rid="Ch1.S3.SS7"/>.</p>
      <p id="d1e13177">As the inflowing current reaches the basin, it turns to the west and forms a
coastal plume that is approximately 150 km wide
(Fig. <xref ref-type="fig" rid="Ch1.F10"/>). The plume detaches from the lateral boundary
as it flows westward and along the bottom slope. As the dense water mass
meets the stratified ocean, the plume becomes unstable and starts to generate
eddies and internal waves. The most vigorous eddies are found in the first
300 km after the inlet (<inline-formula><mml:math id="M444" display="inline"><mml:mrow><mml:mi>x</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">500</mml:mn></mml:mrow></mml:math></inline-formula>–800 km), after which
the plume is more mixed and quiescent. Overall, the plume is shallow; most of
the passive tracer is concentrated within 200 m of the bottom.
Qualitatively, the extent and propagation of the plume, and its eddy
structure are in good agreement with the literature
<xref ref-type="bibr" rid="bib1.bibx12 bib1.bibx82" id="paren.93"><named-content content-type="pre">e.g.,</named-content></xref>. The results show that Thetis is
able to represent eddying flows over sloping bathymetry, generating and
maintaining strong gradients between water masses. The sharpest fronts in the
simulation encompass only one or two elements.</p>
      <p id="d1e13200">Figure <xref ref-type="fig" rid="Ch1.F11"/> shows the distribution of the
inflowing tracer concentration as a function of water density and the
<inline-formula><mml:math id="M445" display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> axis. The inflowing waters are initially very dense but get mixed to
lower density as the plume advances along the coast. The histogram shows that
the plume volume is low in the first 150 km after the inlet
(<inline-formula><mml:math id="M446" display="inline"><mml:mrow><mml:mi>x</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">650</mml:mn></mml:mrow></mml:math></inline-formula>–800 km) where the plume accelerates. After <inline-formula><mml:math id="M447" display="inline"><mml:mrow><mml:mi>x</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">650</mml:mn></mml:mrow></mml:math></inline-formula> km,
the plume slows down and starts to accumulate in volume. The
density of the main plume occupies ranges from 0.8 to 1.5 kg m<inline-formula><mml:math id="M448" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>,
the peak being around 1.28 kg m<inline-formula><mml:math id="M449" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>. The rate of
entrainment can be used as a metric for mixing. Results herein are similar to
those presented in literature: <xref ref-type="bibr" rid="bib1.bibx82" id="text.94"/> present a mean density
anomaly of 1.5 kg m<inline-formula><mml:math id="M450" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> for their terrain-following FESOM model configuration.</p>
      <p id="d1e13276">The 47-day simulation took roughly 42 h to run on 90 cores with a 39.65 s
time step on the same Linux cluster.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F10" specific-use="star"><caption><p id="d1e13281">Bottom tracer concentration in the DOME test case after
10 <bold>(a)</bold>, 20 <bold>(b)</bold>, and 40 days <bold>(c)</bold>.</p></caption>
          <?xmltex \igopts{width=341.433071pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/11/4359/2018/gmd-11-4359-2018-f09.png"/>

        </fig>

      <?xmltex \floatpos{t}?><fig id="Ch1.F11"><caption><p id="d1e13301">Histogram of tracer in the DOME test case versus the <inline-formula><mml:math id="M451" display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> coordinate
and density class. At the mouth of the inlet (<inline-formula><mml:math id="M452" display="inline"><mml:mrow><mml:mi>x</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">800</mml:mn></mml:mrow></mml:math></inline-formula> km), the inflowing
waters are dense; they get entrained higher up in the density spectrum as
they are being transported downstream. The data are averaged over 1 week
after day 40.</p></caption>
          <?xmltex \igopts{width=236.157874pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/11/4359/2018/gmd-11-4359-2018-f10.pdf"/>

        </fig>

<?xmltex \hack{\newpage}?>
</sec>
</sec>
<?pagebreak page4376?><sec id="Ch1.S6" sec-type="conclusions">
  <title>Conclusions</title>
      <p id="d1e13338">This paper describes a DG implementation of an eddy-permitting, unstructured
grid coastal ocean model. The solver is second-order accurate in space and
time. We have demonstrated that the formulation is fully conservative and
preserves monotonicity. The test cases indicate that the model is capable of
reproducing the expected physical behavior, including baroclinic eddies.
Moreover, numerical mixing is well-controlled and comparable to other
established structured grid models, such as MITgcm and ROMS, and the
large-scale finite volume model MPAS-Ocean. Finding an accurate formulation
is important, as commonly used unstructured grid models tend to be overly
diffusive, preventing accurate modeling of certain coastal domains
<xref ref-type="bibr" rid="bib1.bibx51" id="paren.95"><named-content content-type="pre">e.g.,</named-content></xref>. The formulation presented herein thus contributes
to the development of more accurate next-generation coastal ocean models.</p>
      <?pagebreak page4377?><p id="d1e13346"><?xmltex \hack{\newpage}?>Future work will include solving the equations on a sphere, DG implementation
of a biharmonic viscosity operator, two-equation turbulence closure models,
wetting–drying treatment, and development of an adjoint solver, as well as
improving the computational efficiency and parallel scaling of the solver.</p><?xmltex \hack{\newpage}?>
</sec>

      
      </body>
    <back><notes notes-type="codeavailability">

      <p id="d1e13355">All code used to perform the experiments in this papers is
publicly available. Firedrake, and its components, may be obtained from
<uri>https://www.firedrakeproject.org/</uri> (last access: 25 October 2018); Thetis from <uri>http://thetisproject.org/</uri> (last access: 25 October 2018).</p>

      <p id="d1e13364">For reproducibility, we also cite archives of the exact software versions
used to produce the results in this paper. All major Firedrake components
have been archived on Zenodo <xref ref-type="bibr" rid="bib1.bibx86" id="paren.96"/>. This record collates
DOIs for the components and can be installed following the instructions at
<uri>https://www.firedrakeproject.org/download.html</uri> (last access: 25 October 2018).
Thetis itself has been archived at <xref ref-type="bibr" rid="bib1.bibx87" id="text.97"/>.</p>
  </notes><notes notes-type="dataavailability">

      <p id="d1e13379">No external data were used in this paper.</p>
  </notes><?xmltex \hack{\clearpage}?><app-group>

<?pagebreak page4378?><app id="App1.Ch1.S1">
  <title>Source terms for the baroclinic MMS test</title>
      <p id="d1e13391">Using the analytical velocity and temperature fields, we can derive the steady-state solution for the remaining
fields:

              <disp-formula specific-use="align" content-type="numbered"><mml:math id="M453" display="block"><mml:mtable displaystyle="true"><mml:mlabeledtr id="App1.Ch1.E1"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:msub><mml:mi mathvariant="italic">η</mml:mi><mml:mi mathvariant="normal">a</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="App1.Ch1.E2"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:msub><mml:mover accent="true"><mml:mi>u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mi mathvariant="normal">a</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">6</mml:mn></mml:mfrac></mml:mstyle><mml:mi>sin⁡</mml:mi><mml:mo>(</mml:mo><mml:mn mathvariant="normal">3</mml:mn><mml:mo>)</mml:mo><mml:mi>sin⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="italic">π</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mi>x</mml:mi></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="App1.Ch1.E3"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:msub><mml:mover accent="true"><mml:mi>v</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mi mathvariant="normal">a</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">3</mml:mn></mml:mfrac></mml:mstyle><mml:mi>sin⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>z</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi>h</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mi>cos⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="App1.Ch1.E4"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:msubsup><mml:mi>u</mml:mi><mml:mi mathvariant="normal">a</mml:mi><mml:mo>′</mml:mo></mml:msubsup><mml:mo>=</mml:mo><mml:msub><mml:mi>u</mml:mi><mml:mi mathvariant="normal">a</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mi mathvariant="normal">a</mml:mi></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="App1.Ch1.E5"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:msubsup><mml:mi>v</mml:mi><mml:mi mathvariant="normal">a</mml:mi><mml:mo>′</mml:mo></mml:msubsup><mml:mo>=</mml:mo><mml:msub><mml:mi>v</mml:mi><mml:mi mathvariant="normal">a</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>v</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mi mathvariant="normal">a</mml:mi></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

          <?xmltex \hack{\vspace*{-6mm}}?>

              <disp-formula specific-use="align" content-type="numbered"><mml:math id="M454" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:msub><mml:mi>w</mml:mi><mml:mi mathvariant="normal">a</mml:mi></mml:msub></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>h</mml:mi></mml:mrow><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mfenced open="(" close=""><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub><mml:mfenced open="(" close=")"><mml:mrow><mml:mo>-</mml:mo><mml:mi>cos⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>z</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi>h</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>+</mml:mo><mml:mi>cos⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle></mml:mfenced></mml:mrow></mml:mfenced><mml:mi>sin⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mlabeledtr id="App1.Ch1.E6"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mfenced close=")" open="."><mml:mrow><mml:mo>-</mml:mo><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:mi>sin⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:mi>z</mml:mi></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>+</mml:mo><mml:mi>sin⁡</mml:mi><mml:mo>(</mml:mo><mml:mn mathvariant="normal">3</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:mfenced><mml:mi>cos⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="italic">π</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mi>x</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

          <?xmltex \hack{\vspace*{-6mm}}?>

              <disp-formula id="App1.Ch1.E7" content-type="numbered"><mml:math id="M455" display="block"><mml:mstyle displaystyle="true" class="stylechange"/><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><?xmltex \hack{\hbox\bgroup\fontsize{9}{9}\selectfont$\displaystyle}?><mml:msub><mml:mi>r</mml:mi><mml:mi mathvariant="normal">a</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mi mathvariant="normal">T</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mi>z</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">15</mml:mn><mml:mi>h</mml:mi><mml:mi>sin⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>z</mml:mi><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle></mml:mfenced><mml:mi>sin⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mi>sin⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>-</mml:mo><mml:mn mathvariant="normal">15</mml:mn><mml:mi>z</mml:mi></mml:mrow></mml:mfenced><mml:mo>.</mml:mo><?xmltex \hack{$\egroup}?></mml:mrow></mml:math></disp-formula></p>
      <p id="d1e13841">Now, we can evaluate the different terms that appear in the momentum and
tracer equations:

              <disp-formula specific-use="align" content-type="numbered"><mml:math id="M456" display="block"><mml:mtable displaystyle="true"><mml:mlabeledtr id="App1.Ch1.E8"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mi>f</mml:mi><mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">e</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo>∧</mml:mo><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover></mml:mrow></mml:mfenced><mml:mi>x</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:msub><mml:mi>f</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow><mml:mn mathvariant="normal">3</mml:mn></mml:mfrac></mml:mstyle><mml:mfenced open="(" close=")"><mml:mrow><mml:mo>-</mml:mo><mml:mi>cos⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:mfenced><mml:mi>cos⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="App1.Ch1.E9"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mi>f</mml:mi><mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">e</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo>∧</mml:mo><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover></mml:mrow></mml:mfenced><mml:mi>y</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>f</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow><mml:mn mathvariant="normal">6</mml:mn></mml:mfrac></mml:mstyle><mml:mi>sin⁡</mml:mi><mml:mo>(</mml:mo><mml:mn mathvariant="normal">3</mml:mn><mml:mo>)</mml:mo><mml:mi>sin⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="italic">π</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mi>x</mml:mi></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

          <?xmltex \hack{\vspace*{-6mm}}?>

              <disp-formula specific-use="align" content-type="numbered"><mml:math id="M457" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>⋅</mml:mo><mml:mfenced open="(" close=")"><mml:mrow><mml:mi>H</mml:mi><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover></mml:mrow></mml:mfenced></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>h</mml:mi></mml:mrow><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mfenced open="(" close=""><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub><mml:mfenced close="" open="("><mml:mrow><mml:mo>-</mml:mo><mml:mi>cos⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mlabeledtr id="App1.Ch1.E10"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mfenced open="." close=")"><mml:mrow><mml:mfenced close=")" open="."><mml:mrow><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:mfenced><mml:mi>sin⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>+</mml:mo><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub><mml:mi>sin⁡</mml:mi><mml:mo>(</mml:mo><mml:mn mathvariant="normal">3</mml:mn><mml:mo>)</mml:mo><mml:mi>cos⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="italic">π</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mi>x</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

          <?xmltex \hack{\vspace*{-6mm}}?>

              <disp-formula specific-use="align" content-type="numbered"><mml:math id="M458" display="block"><mml:mtable displaystyle="true"><mml:mlabeledtr id="App1.Ch1.E11"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">F</mml:mi><mml:mi mathvariant="normal">pg</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mi>x</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">15</mml:mn><mml:mi mathvariant="italic">π</mml:mi><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mi mathvariant="normal">T</mml:mi></mml:msub><mml:mi>h</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mi>g</mml:mi><mml:mi>sin⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>z</mml:mi><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle></mml:mfenced><mml:mi>sin⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mi>cos⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="App1.Ch1.E12"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:msub><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">F</mml:mi><mml:mi mathvariant="normal">pg</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mi>y</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">15</mml:mn><mml:mi mathvariant="italic">π</mml:mi><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mi mathvariant="normal">T</mml:mi></mml:msub><mml:mi>h</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mi>g</mml:mi><mml:mi>sin⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>z</mml:mi><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle></mml:mfenced><mml:mi>sin⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mi>cos⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="App1.Ch1.E13"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><?xmltex \hack{\hbox\bgroup\fontsize{9}{9}\selectfont$\displaystyle}?><mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>⋅</mml:mo><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mfenced><mml:mi>x</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi mathvariant="italic">π</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mi>sin⁡</mml:mi><mml:mfenced close=")" open="("><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="italic">π</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mi>x</mml:mi></mml:mrow></mml:mfenced><mml:msup><mml:mi>cos⁡</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:mi>z</mml:mi></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle></mml:mfenced><mml:mi>cos⁡</mml:mi><mml:mfenced close=")" open="("><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="italic">π</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mi>x</mml:mi></mml:mrow></mml:mfenced><mml:mo>,</mml:mo><?xmltex \hack{$\egroup}?></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mtr><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><?xmltex \hack{\hbox\bgroup\fontsize{9.5}{9.5}\selectfont$\displaystyle}?><mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>⋅</mml:mo><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mfenced><mml:mi>y</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi mathvariant="italic">π</mml:mi><mml:mrow><mml:mn mathvariant="normal">9</mml:mn><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:msup><mml:mi>sin⁡</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>z</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi>h</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><?xmltex \hack{$\egroup}?></mml:mrow></mml:mtd></mml:mtr><mml:mlabeledtr id="App1.Ch1.E14"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mi>sin⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mi>cos⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

          <?xmltex \hack{\vspace*{-6mm}}?>

              <disp-formula specific-use="align" content-type="numbered"><mml:math id="M459" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mo>(</mml:mo><mml:mi>w</mml:mi><mml:mi>u</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>sin⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:mi>z</mml:mi></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle></mml:mfenced></mml:mrow><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mfenced close="" open="("><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub><mml:mfenced open="(" close=")"><mml:mrow><mml:mi>cos⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>z</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi>h</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>-</mml:mo><mml:mi>cos⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mfenced close="" open="."><mml:mrow><mml:mi>sin⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>+</mml:mo><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub><mml:mfenced open="(" close=")"><mml:mrow><mml:mi>sin⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:mi>z</mml:mi></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>+</mml:mo><mml:mi>sin⁡</mml:mi><mml:mo>(</mml:mo><mml:mn mathvariant="normal">3</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mlabeledtr id="App1.Ch1.E15"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mfenced open="." close=")"><mml:mrow><mml:mi>cos⁡</mml:mi><mml:mfenced close=")" open="("><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="italic">π</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mi>x</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced><mml:mi>sin⁡</mml:mi><mml:mfenced close=")" open="("><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="italic">π</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mi>x</mml:mi></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

          <?xmltex \hack{\vspace*{-6mm}}?>

              <disp-formula specific-use="align" content-type="numbered"><mml:math id="M460" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mo>(</mml:mo><mml:mi>w</mml:mi><mml:mi>v</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>cos⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mi>z</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi>h</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced></mml:mrow><mml:mrow><mml:mn mathvariant="normal">18</mml:mn><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mfenced close="" open="("><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub><mml:mfenced open="(" close=")"><mml:mrow><mml:mi>cos⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>z</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi>h</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>-</mml:mo><mml:mi>cos⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mfenced close="" open="."><mml:mrow><mml:mi>sin⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>+</mml:mo><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub><mml:mfenced open="(" close=")"><mml:mrow><mml:mi>sin⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:mi>z</mml:mi></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>+</mml:mo><mml:mi>sin⁡</mml:mi><mml:mo>(</mml:mo><mml:mn mathvariant="normal">3</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mlabeledtr id="App1.Ch1.E16"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mfenced close=")" open="."><mml:mrow><mml:mi>cos⁡</mml:mi><mml:mfenced close=")" open="("><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="italic">π</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mi>x</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced><mml:mi>cos⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

          <?xmltex \hack{\vspace*{-6mm}}?>

              <disp-formula specific-use="align" content-type="numbered"><mml:math id="M461" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mi>f</mml:mi><mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">e</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo>∧</mml:mo><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>′</mml:mo></mml:msup></mml:mrow></mml:mfenced><mml:mi>x</mml:mi></mml:msub><mml:mo>=</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>f</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow><mml:mn mathvariant="normal">3</mml:mn></mml:mfrac></mml:mstyle><mml:mfenced open="(" close=")"><mml:mrow><mml:mo>-</mml:mo><mml:mi>sin⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>z</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi>h</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mo>+</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mi>cos⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mlabeledtr id="App1.Ch1.E17"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mi>cos⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

          <?xmltex \hack{\vspace*{-6mm}}?>

              <disp-formula id="App1.Ch1.E18" content-type="numbered"><mml:math id="M462" display="block"><mml:mstyle class="stylechange" displaystyle="true"/><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><?xmltex \hack{\hbox\bgroup\fontsize{9.5}{9.5}\selectfont$\displaystyle}?><mml:mi>f</mml:mi><mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">e</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo>∧</mml:mo><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>′</mml:mo></mml:msup></mml:mrow></mml:mfenced><mml:mi>y</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msub><mml:mi>f</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub></mml:mrow><mml:mn mathvariant="normal">6</mml:mn></mml:mfrac></mml:mstyle><mml:mfenced open="(" close=")"><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:mi>cos⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:mi>z</mml:mi></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>-</mml:mo><mml:mi>sin⁡</mml:mi><mml:mo>(</mml:mo><mml:mn mathvariant="normal">3</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:mfenced><mml:mi>sin⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="italic">π</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mi>x</mml:mi></mml:mrow></mml:mfenced><mml:mo>,</mml:mo><?xmltex \hack{$\egroup}?></mml:mrow></mml:math></disp-formula>

        <?xmltex \hack{\vspace*{-6mm}}?>

              <disp-formula specific-use="align" content-type="numbered"><mml:math id="M463" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:msub><mml:mi mathvariant="bold">∇</mml:mi><mml:mi mathvariant="normal">h</mml:mi></mml:msub><mml:mo>⋅</mml:mo><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>T</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">5</mml:mn><mml:mi mathvariant="italic">π</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mfenced close="" open="("><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub><mml:mi>sin⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>z</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi>h</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:msup><mml:mi>cos⁡</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mfenced close=")" open="."><mml:mrow><mml:mo>+</mml:mo><mml:mn mathvariant="normal">3</mml:mn><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub><mml:mi>sin⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mi>cos⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:mi>z</mml:mi></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle></mml:mfenced><mml:msup><mml:mi>cos⁡</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mlabeledtr id="App1.Ch1.E19"><mml:mtd/><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mi>sin⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mi>cos⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>z</mml:mi><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

          <?xmltex \hack{\vspace*{-6mm}}?>

              <disp-formula specific-use="align" content-type="numbered"><mml:math id="M464" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mo>(</mml:mo><mml:mi>w</mml:mi><mml:mi>T</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">5</mml:mn><mml:mi mathvariant="italic">π</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mfenced open="[" close=""><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:mi>cos⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>z</mml:mi><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi>h</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>-</mml:mo><mml:mi>cos⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mfenced close="" open="."><mml:mrow><mml:mi>sin⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:mi>sin⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:mi>z</mml:mi></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>+</mml:mo><mml:mi>sin⁡</mml:mi><mml:mo>(</mml:mo><mml:mn mathvariant="normal">3</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:mtd></mml:mtr><mml:mlabeledtr id="App1.Ch1.E20"><mml:mtd/><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><?xmltex \hack{\hbox\bgroup\fontsize{9.5}{9.5}\selectfont$\displaystyle}?><mml:mfenced close="]" open="."><mml:mrow><mml:mi>cos⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="italic">π</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mi>x</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced><mml:mi>sin⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>z</mml:mi><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle></mml:mfenced><mml:mi>sin⁡</mml:mi><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>x</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mi>sin⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi mathvariant="italic">π</mml:mi><mml:mi>y</mml:mi></mml:mrow><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mo>.</mml:mo><?xmltex \hack{$\egroup}?></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

          These terms are added as source terms to the right-hand side of
Eqs. (<xref ref-type="disp-formula" rid="Ch1.E9"/>), (<xref ref-type="disp-formula" rid="Ch1.E10"/>), (<xref ref-type="disp-formula" rid="Ch1.E11"/>), and (<xref ref-type="disp-formula" rid="Ch1.E6"/>).
In the weak form, this corresponds to multiplying the
analytical function by the test function and integrating over the domain. The
solutions were derived using the SymPy symbolic mathematics Python library <xref ref-type="bibr" rid="bib1.bibx62" id="paren.98"/>.</p>
</app>

<app id="App1.Ch1.S2">
  <title>CPU cost comparison against SLIM</title>
      <p id="d1e15535">A strong scaling test was carried out with both Thetis and the SLIM 3-D model
<xref ref-type="bibr" rid="bib1.bibx84 bib1.bibx7 bib1.bibx16 bib1.bibx50" id="paren.99"/> using the baroclinic
eddies test case. These tests were carried out on a Linux cluster with
16-core Intel Xeon E5620 processors and Mellanox Infiniband interconnect. The
total time spent to run 40 time steps is presented in Table <xref ref-type="table" rid="App1.Ch1.T1"/>.
The table also lists the speed-up <inline-formula><mml:math id="M465" display="inline"><mml:mrow><mml:msub><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>T</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>/</mml:mo><mml:msub><mml:mi>T</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>,
where <inline-formula><mml:math id="M466" display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> stands for the wall-clock time for <inline-formula><mml:math id="M467" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> cores, and the parallel
efficiency <inline-formula><mml:math id="M468" display="inline"><mml:mrow><mml:mi>p</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi>s</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>/</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:math></inline-formula>. For an ideal model, the parallel efficiency remains at
unity. The results show that on a single core Thetis runs approximately
3.3 times faster than SLIM. On 24 cores, the ratio is 4.0, and on
144 cores, Thetis is still 2.2 times faster.</p><?xmltex \hack{\clearpage}?><?xmltex \floatpos{h!}?><table-wrap id="App1.Ch1.T1"><?xmltex \hack{\hsize\textwidth}?><caption><p id="d1e15610">CPU time in the baroclinic eddies test case for Thetis and the SLIM
3-D model. Both models ran on identical triangular mesh (4 km resolution,
40 vertical levels) using <inline-formula><mml:math id="M469" display="inline"><mml:mrow><mml:mi mathvariant="italic">ν</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">20</mml:mn></mml:mrow></mml:math></inline-formula> m<inline-formula><mml:math id="M470" display="inline"><mml:msup><mml:mi/><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:math></inline-formula> s<inline-formula><mml:math id="M471" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> and a 140 s time step.
The wall-clock time was recorded over 40 iterations.</p></caption><oasis:table frame="topbot"><oasis:tgroup cols="9">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="right"/>
     <oasis:colspec colnum="3" colname="col3" align="right"/>
     <oasis:colspec colnum="4" colname="col4" align="center"/>
     <oasis:colspec colnum="5" colname="col5" align="right"/>
     <oasis:colspec colnum="6" colname="col6" align="right"/>
     <oasis:colspec colnum="7" colname="col7" align="left"/>
     <oasis:colspec colnum="8" colname="col8" align="center"/>
     <oasis:colspec colnum="9" colname="col9" align="center"/>
     <oasis:thead>
       <oasis:row>
         <oasis:entry colname="col1">No. of</oasis:entry>
         <oasis:entry rowsep="1" namest="col2" nameend="col3" align="center">Wall-clock time (s) </oasis:entry>
         <oasis:entry colname="col4">Ratio</oasis:entry>
         <oasis:entry rowsep="1" namest="col5" nameend="col6" align="center">Speed-up </oasis:entry>
         <oasis:entry colname="col7"/>
         <oasis:entry rowsep="1" namest="col8" nameend="col9">Efficiency </oasis:entry>
       </oasis:row>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1">cores</oasis:entry>
         <oasis:entry colname="col2">Thetis</oasis:entry>
         <oasis:entry colname="col3">SLIM</oasis:entry>
         <oasis:entry colname="col4"><inline-formula><mml:math id="M472" display="inline"><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mi mathvariant="normal">SLIM</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mi mathvariant="normal">Thetis</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col5">Thetis</oasis:entry>
         <oasis:entry colname="col6">SLIM</oasis:entry>
         <oasis:entry colname="col7"/>
         <oasis:entry colname="col8">Thetis</oasis:entry>
         <oasis:entry colname="col9">SLIM</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row>
         <oasis:entry colname="col1">1</oasis:entry>
         <oasis:entry colname="col2">1778.71</oasis:entry>
         <oasis:entry colname="col3">5928.32</oasis:entry>
         <oasis:entry colname="col4">3.33</oasis:entry>
         <oasis:entry colname="col5">1.00</oasis:entry>
         <oasis:entry colname="col6">1.00</oasis:entry>
         <oasis:entry colname="col7"/>
         <oasis:entry colname="col8">1.00</oasis:entry>
         <oasis:entry colname="col9">1.00</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">2</oasis:entry>
         <oasis:entry colname="col2">1034.64</oasis:entry>
         <oasis:entry colname="col3">4802.34</oasis:entry>
         <oasis:entry colname="col4">4.64</oasis:entry>
         <oasis:entry colname="col5">1.72</oasis:entry>
         <oasis:entry colname="col6">1.23</oasis:entry>
         <oasis:entry colname="col7"/>
         <oasis:entry colname="col8">0.86</oasis:entry>
         <oasis:entry colname="col9">0.62</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">4</oasis:entry>
         <oasis:entry colname="col2">500.11</oasis:entry>
         <oasis:entry colname="col3">2380.74</oasis:entry>
         <oasis:entry colname="col4">4.76</oasis:entry>
         <oasis:entry colname="col5">3.56</oasis:entry>
         <oasis:entry colname="col6">2.49</oasis:entry>
         <oasis:entry colname="col7"/>
         <oasis:entry colname="col8">0.89</oasis:entry>
         <oasis:entry colname="col9">0.62</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">8</oasis:entry>
         <oasis:entry colname="col2">290.61</oasis:entry>
         <oasis:entry colname="col3">1284.08</oasis:entry>
         <oasis:entry colname="col4">4.42</oasis:entry>
         <oasis:entry colname="col5">6.12</oasis:entry>
         <oasis:entry colname="col6">4.62</oasis:entry>
         <oasis:entry colname="col7"/>
         <oasis:entry colname="col8">0.77</oasis:entry>
         <oasis:entry colname="col9">0.58</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">16</oasis:entry>
         <oasis:entry colname="col2">206.97</oasis:entry>
         <oasis:entry colname="col3">675.14</oasis:entry>
         <oasis:entry colname="col4">3.26</oasis:entry>
         <oasis:entry colname="col5">8.59</oasis:entry>
         <oasis:entry colname="col6">8.78</oasis:entry>
         <oasis:entry colname="col7"/>
         <oasis:entry colname="col8">0.54</oasis:entry>
         <oasis:entry colname="col9">0.55</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">20</oasis:entry>
         <oasis:entry colname="col2">141.17</oasis:entry>
         <oasis:entry colname="col3">524.61</oasis:entry>
         <oasis:entry colname="col4">3.72</oasis:entry>
         <oasis:entry colname="col5">12.60</oasis:entry>
         <oasis:entry colname="col6">11.30</oasis:entry>
         <oasis:entry colname="col7"/>
         <oasis:entry colname="col8">0.63</oasis:entry>
         <oasis:entry colname="col9">0.57</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">24</oasis:entry>
         <oasis:entry colname="col2">110.83</oasis:entry>
         <oasis:entry colname="col3">440.09</oasis:entry>
         <oasis:entry colname="col4">3.97</oasis:entry>
         <oasis:entry colname="col5">16.05</oasis:entry>
         <oasis:entry colname="col6">13.47</oasis:entry>
         <oasis:entry colname="col7"/>
         <oasis:entry colname="col8">0.67</oasis:entry>
         <oasis:entry colname="col9">0.56</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">32</oasis:entry>
         <oasis:entry colname="col2">88.03</oasis:entry>
         <oasis:entry colname="col3">330.00</oasis:entry>
         <oasis:entry colname="col4">3.75</oasis:entry>
         <oasis:entry colname="col5">20.21</oasis:entry>
         <oasis:entry colname="col6">17.96</oasis:entry>
         <oasis:entry colname="col7"/>
         <oasis:entry colname="col8">0.63</oasis:entry>
         <oasis:entry colname="col9">0.56</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">40</oasis:entry>
         <oasis:entry colname="col2">73.17</oasis:entry>
         <oasis:entry colname="col3">260.47</oasis:entry>
         <oasis:entry colname="col4">3.56</oasis:entry>
         <oasis:entry colname="col5">24.31</oasis:entry>
         <oasis:entry colname="col6">22.76</oasis:entry>
         <oasis:entry colname="col7"/>
         <oasis:entry colname="col8">0.61</oasis:entry>
         <oasis:entry colname="col9">0.57</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">48</oasis:entry>
         <oasis:entry colname="col2">64.16</oasis:entry>
         <oasis:entry colname="col3">222.79</oasis:entry>
         <oasis:entry colname="col4">3.47</oasis:entry>
         <oasis:entry colname="col5">27.72</oasis:entry>
         <oasis:entry colname="col6">26.61</oasis:entry>
         <oasis:entry colname="col7"/>
         <oasis:entry colname="col8">0.58</oasis:entry>
         <oasis:entry colname="col9">0.55</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">64</oasis:entry>
         <oasis:entry colname="col2">56.62</oasis:entry>
         <oasis:entry colname="col3">158.31</oasis:entry>
         <oasis:entry colname="col4">2.80</oasis:entry>
         <oasis:entry colname="col5">31.41</oasis:entry>
         <oasis:entry colname="col6">37.45</oasis:entry>
         <oasis:entry colname="col7"/>
         <oasis:entry colname="col8">0.49</oasis:entry>
         <oasis:entry colname="col9">0.59</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">80</oasis:entry>
         <oasis:entry colname="col2">49.48</oasis:entry>
         <oasis:entry colname="col3">127.95</oasis:entry>
         <oasis:entry colname="col4">2.59</oasis:entry>
         <oasis:entry colname="col5">35.95</oasis:entry>
         <oasis:entry colname="col6">46.33</oasis:entry>
         <oasis:entry colname="col7"/>
         <oasis:entry colname="col8">0.45</oasis:entry>
         <oasis:entry colname="col9">0.58</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">96</oasis:entry>
         <oasis:entry colname="col2">43.64</oasis:entry>
         <oasis:entry colname="col3">109.10</oasis:entry>
         <oasis:entry colname="col4">2.50</oasis:entry>
         <oasis:entry colname="col5">40.76</oasis:entry>
         <oasis:entry colname="col6">54.34</oasis:entry>
         <oasis:entry colname="col7"/>
         <oasis:entry colname="col8">0.42</oasis:entry>
         <oasis:entry colname="col9">0.57</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">112</oasis:entry>
         <oasis:entry colname="col2">39.68</oasis:entry>
         <oasis:entry colname="col3">95.24</oasis:entry>
         <oasis:entry colname="col4">2.40</oasis:entry>
         <oasis:entry colname="col5">44.83</oasis:entry>
         <oasis:entry colname="col6">62.25</oasis:entry>
         <oasis:entry colname="col7"/>
         <oasis:entry colname="col8">0.40</oasis:entry>
         <oasis:entry colname="col9">0.56</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">128</oasis:entry>
         <oasis:entry colname="col2">36.91</oasis:entry>
         <oasis:entry colname="col3">83.37</oasis:entry>
         <oasis:entry colname="col4">2.26</oasis:entry>
         <oasis:entry colname="col5">48.19</oasis:entry>
         <oasis:entry colname="col6">71.11</oasis:entry>
         <oasis:entry colname="col7"/>
         <oasis:entry colname="col8">0.38</oasis:entry>
         <oasis:entry colname="col9">0.56</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1">144</oasis:entry>
         <oasis:entry colname="col2">35.76</oasis:entry>
         <oasis:entry colname="col3">78.05</oasis:entry>
         <oasis:entry colname="col4">2.18</oasis:entry>
         <oasis:entry colname="col5">49.74</oasis:entry>
         <oasis:entry colname="col6">75.96</oasis:entry>
         <oasis:entry colname="col7"/>
         <oasis:entry colname="col8">0.35</oasis:entry>
         <oasis:entry colname="col9">0.53</oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table></table-wrap>

<?xmltex \hack{\clearpage}?>
</app>
  </app-group><notes notes-type="authorcontribution">

      <p id="d1e16233">TK designed and implemented most of the solver and carried
out the numerical simulations. SK and LM contributed to the design and
implementation of the model. AB, DH, and MP supervised the work and guided the
implementation of the model and the manuscript.</p>
  </notes><notes notes-type="competinginterests">

      <p id="d1e16239">The authors declare that they have no conflict of interest.</p>
  </notes><ack><title>Acknowledgements</title><p id="d1e16245">The National Science Foundation partially supported this research through
cooperative agreement OCE-0424602. The National Oceanic and Atmospheric
Administration (NA11NOS0120036 and AB-133F-12-SE-2046), Bonneville Power
Administration (00062251), and Corps of Engineers (W9127N-12-2-007 and
G13PX01212) provided partial motivation and additional support. This
work was supported by the UK's Engineering and Physical Science Research
Council (grant numbers EP/M011054/1, EP/L000407/1) and the Natural
Environment Research Council (grant number NE/K008951/1). This work used
the Extreme Science and Engineering Discovery Environment (XSEDE), which is
supported by National Science Foundation grant number ACI-1053575. The authors
acknowledge the Texas Advanced Computing Center (TACC) at the University of
Texas at Austin for providing HPC resources that have contributed to the
research results reported within this paper. <?xmltex \hack{\newline}?><?xmltex \hack{\newline}?>
Edited by: James Annan <?xmltex \hack{\newline}?>
Reviewed by: James Annan and one anonymous referee</p></ack><ref-list>
    <title>References</title>

      <ref id="bib1.bibx1"><label>Aizinger and Dawson(2007)</label><mixed-citation>Aizinger, V. and Dawson, C.: The local discontinuous Galerkin method for
three-dimensional shallow water flow, Comput. Meth. Appl. Mech. Eng., 196,
734–746, <ext-link xlink:href="https://doi.org/10.1016/j.cma.2006.04.010" ext-link-type="DOI">10.1016/j.cma.2006.04.010</ext-link>, 2007.</mixed-citation></ref>
      <ref id="bib1.bibx2"><label>Alnæs et al.(2014)Alnæs, Logg, Ølgaard, Rognes, and Wells</label><mixed-citation>Alnæs, M. S., Logg, A., Ølgaard, K. B., Rognes, M. E., and Wells, G. N.:
Unified Form Language: A Domain-specific Language for Weak Formulations of
Partial Differential Equations, ACM Trans. Math. Softw., 40, 9:1–9:37, <ext-link xlink:href="https://doi.org/10.1145/2566630" ext-link-type="DOI">10.1145/2566630</ext-link>, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx3"><label>Beckmann and Haidvogel(1993)</label><mixed-citation>Beckmann, A. and Haidvogel, D. B.: Numerical Simulation of Flow around a Tall
Isolated Seamount. Part I: Problem Formulation and Model Accuracy, J. Phys.
Oceanogr., 23, 1736–1753, <ext-link xlink:href="https://doi.org/10.1175/1520-0485(1993)023&lt;1736:NSOFAA&gt;2.0.CO;2" ext-link-type="DOI">10.1175/1520-0485(1993)023&lt;1736:NSOFAA&gt;2.0.CO;2</ext-link>, 1993.</mixed-citation></ref>
      <ref id="bib1.bibx4"><label>Benjamin(1968)</label><mixed-citation>Benjamin, T. B.: Gravity currents and related phenomena, J. Fluid Mech., 31,
209–248, <ext-link xlink:href="https://doi.org/10.1017/S0022112068000133" ext-link-type="DOI">10.1017/S0022112068000133</ext-link>, 1968.</mixed-citation></ref>
      <ref id="bib1.bibx5"><label>Bercea et al.(2016)Bercea, McRae, Ham, Mitchell, Rathgeber, Nardi,
Luporini, and Kelly</label><mixed-citation>Bercea, G.-T., McRae, A. T. T., Ham, D. A., Mitchell, L., Rathgeber, F., Nardi,
L., Luporini, F., and Kelly, P. H. J.: A structure-exploiting numbering algorithm
for finite elements on extruded meshes, and its performance evaluation in
Firedrake, Geosci. Model Dev., 9, 3803–3815, <ext-link xlink:href="https://doi.org/10.5194/gmd-9-3803-2016" ext-link-type="DOI">10.5194/gmd-9-3803-2016</ext-link>, 2016.</mixed-citation></ref>
      <ref id="bib1.bibx6"><label>Bernard et al.(2008)Bernard, Deleersnijder, Legat, and Remacle</label><mixed-citation>Bernard, P.-E., Deleersnijder, E., Legat, V., and Remacle, J.-F.: Dispersion
Analysis of Discontinuous Galerkin Schemes Applied to Poincaré, Kelvin and
Rossby Waves, J. Scient. Comput., 34, 26–47, <ext-link xlink:href="https://doi.org/10.1007/s10915-007-9156-6" ext-link-type="DOI">10.1007/s10915-007-9156-6</ext-link>, 2008.</mixed-citation></ref>
      <ref id="bib1.bibx7"><label>Blaise et al.(2010)Blaise, Comblen, Legat, Remacle, Deleersnijder,
and Lambrechts</label><mixed-citation>Blaise, S., Comblen, R., Legat, V., Remacle, J.-F., Deleersnijder, E., and
Lambrechts, J.: A discontinuous finite element baroclinic marine model on
unstructured prismatic meshes. Part I: space discretization, Ocean Dynam., 60,
1371–1393, <ext-link xlink:href="https://doi.org/10.1007/s10236-010-0358-3" ext-link-type="DOI">10.1007/s10236-010-0358-3</ext-link>, 2010.</mixed-citation></ref>
      <ref id="bib1.bibx8"><label>Bleck(1978)</label><mixed-citation>Bleck, R.: On the Use of Hybrid Vertical Coordinates in Numerical Weather
Prediction Models, Mon. Weather Rev., 106, 1233–1244, <ext-link xlink:href="https://doi.org/10.1175/1520-0493(1978)106&lt;1233:OTUOHV&gt;2.0.CO;2" ext-link-type="DOI">10.1175/1520-0493(1978)106&lt;1233:OTUOHV&gt;2.0.CO;2</ext-link>, 1978.</mixed-citation></ref>
      <ref id="bib1.bibx9"><label>Bleck(2002)</label><mixed-citation>Bleck, R.: An oceanic general circulation model framed in hybrid isopycnic-Cartesian
coordinates, Ocean Model., 4, 55–88, <ext-link xlink:href="https://doi.org/10.1016/S1463-5003(01)00012-9" ext-link-type="DOI">10.1016/S1463-5003(01)00012-9</ext-link>, 2002.</mixed-citation></ref>
      <ref id="bib1.bibx10"><label>Blumberg and Mellor(1987)</label><mixed-citation>Blumberg, A. F. and Mellor, G. L.: A description of a three-dimensional coastal
ocean model, in: Three Dimensional Coastal Ocean Models, chap. 1–16, edited by:
Heaps, N. S., American Geophysical Union, Washington, D.C., <ext-link xlink:href="https://doi.org/10.1029/CO004p0001" ext-link-type="DOI">10.1029/CO004p0001</ext-link>, 1987.</mixed-citation></ref>
      <ref id="bib1.bibx11"><label>Burchard and Bolding(2002)</label><mixed-citation>
Burchard, H. and Bolding, K.: GETM – a general estuarine transport model,
Scientific documentation, Tech. Rep. EUR 20253 EN, European Commission, Ispra, Italy, 2002.</mixed-citation></ref>
      <ref id="bib1.bibx12"><label>Burchard and Rennau(2008)</label><mixed-citation>Burchard, H. and Rennau, H.: Comparative quantification of physically and
numerically induced mixing in ocean models, Ocean Model., 20, 293–311,
<ext-link xlink:href="https://doi.org/10.1016/j.ocemod.2007.10.003" ext-link-type="DOI">10.1016/j.ocemod.2007.10.003</ext-link>, 2008.</mixed-citation></ref>
      <ref id="bib1.bibx13"><label>Casulli and Walters(2000)</label><mixed-citation>Casulli, V. and Walters, R. A.: An unstructured grid, three-dimensional model
based on the shallow water equations, Int. J. Numer. Meth. Fluids, 32, 331–348,
<ext-link xlink:href="https://doi.org/10.1002/(SICI)1097-0363(20000215)32:3&lt;331::AID-FLD941&gt;3.0.CO;2-C" ext-link-type="DOI">10.1002/(SICI)1097-0363(20000215)32:3&lt;331::AID-FLD941&gt;3.0.CO;2-C</ext-link>, 2000.</mixed-citation></ref>
      <ref id="bib1.bibx14"><label>Chen et al.(2003)Chen, Liu, and Beardsley</label><mixed-citation>Chen, C., Liu, H., and Beardsley, R. C.: An Unstructured Grid, Finite-Volume,
Three-Dimensional, Primitive Equations Ocean Model: Application to Coastal
Ocean and Estuaries, J. Atmos. Ocean. Tech., 20, 159–186, <ext-link xlink:href="https://doi.org/10.1175/1520-0426(2003)020&lt;0159:AUGFVT&gt;2.0.CO;2" ext-link-type="DOI">10.1175/1520-0426(2003)020&lt;0159:AUGFVT&gt;2.0.CO;2</ext-link>, 2003.</mixed-citation></ref>
      <ref id="bib1.bibx15"><label>Cockburn and Shu(2001)</label><mixed-citation>
Cockburn, B. and Shu, C.-W.: Runge–Kutta Discontinuous Galerkin Methods for
convection-dominated problems, J. Scient. Comput., 16, 173–261, 2001.</mixed-citation></ref>
      <ref id="bib1.bibx16"><label>Comblen et al.(2010a)Comblen, Blaise, Legat, Remacle,
Deleersnijder, and Lambrechts</label><mixed-citation>Comblen, R., Blaise, S., Legat, V., Remacle, J.-F., Deleersnijder, E., and
Lambrechts, J.: A discontinuous finite element baroclinic marine model on
unstructured prismatic meshes. Part II: implicit/explicit time discretization,
Ocean Dynam., 60, 1395–1414, <ext-link xlink:href="https://doi.org/10.1007/s10236-010-0357-4" ext-link-type="DOI">10.1007/s10236-010-0357-4</ext-link>, 2010a.</mixed-citation></ref>
      <ref id="bib1.bibx17"><label>Comblen et al.(2010b)Comblen, Lambrechts, Remacle, and Legat</label><mixed-citation>Comblen, R., Lambrechts, J., Remacle, J.-F., and Legat, V.: Practical evaluation
of five partly discontinuous finite element pairs for the non-conservative
shallow water equations, Int. J. Numer. Meth. Fluids, 63, 701–724, <ext-link xlink:href="https://doi.org/10.1002/fld.2094" ext-link-type="DOI">10.1002/fld.2094</ext-link>, 2010b.</mixed-citation></ref>
      <ref id="bib1.bibx18"><label>Cotter et al.(2009a)Cotter, Ham, and Pain</label><mixed-citation>Cotter, C. J., Ham, D. A., and Pain, C. C.: A mixed discontinuous/continuous
finite element pair for shallow-water ocean modelling, Ocean Model., 26, 86–90,
<ext-link xlink:href="https://doi.org/10.1016/j.ocemod.2008.09.002" ext-link-type="DOI">10.1016/j.ocemod.2008.09.002</ext-link>, 2009a.</mixed-citation></ref>
      <ref id="bib1.bibx19"><label>Cotter et al.(2009b)Cotter, Ham, Pain, and Reich</label><mixed-citation>Cotter, C. J., Ham, D. A., Pain, C. C., and Reich, S.: LBB stability of a
mixed Galerkin finite element pair for fluid flow simulations, J. Comput. Phys.,
228, 336–348, <ext-link xlink:href="https://doi.org/10.1016/j.jcp.2008.09.014" ext-link-type="DOI">10.1016/j.jcp.2008.09.014</ext-link>, 2009b.</mixed-citation></ref>
      <?pagebreak page4381?><ref id="bib1.bibx20"><label>Danilov(2012)</label><mixed-citation>Danilov, S.: Two finite-volume unstructured mesh models for large-scale ocean
modeling, Ocean Model., 47, 14–25, <ext-link xlink:href="https://doi.org/10.1016/j.ocemod.2012.01.004" ext-link-type="DOI">10.1016/j.ocemod.2012.01.004</ext-link>, 2012.</mixed-citation></ref>
      <ref id="bib1.bibx21"><label>Danilov(2013)</label><mixed-citation>Danilov, S.: Ocean modeling on unstructured meshes, Ocean Model., 69, 195–210,
<ext-link xlink:href="https://doi.org/10.1016/j.ocemod.2013.05.005" ext-link-type="DOI">10.1016/j.ocemod.2013.05.005</ext-link>, 2013.</mixed-citation></ref>
      <ref id="bib1.bibx22"><label>Danilov et al.(2008)Danilov, Wang, Losch, Sidorenko, and Schrter</label><mixed-citation>Danilov, S., Wang, Q., Losch, M., Sidorenko, D., and Schröter, J.: Modeling
ocean circulation on unstructured meshes: comparison of two horizontal
discretizations, Ocean Dynam., 58, 365–374, <ext-link xlink:href="https://doi.org/10.1007/s10236-008-0138-5" ext-link-type="DOI">10.1007/s10236-008-0138-5</ext-link>, 2008.</mixed-citation></ref>
      <ref id="bib1.bibx23"><label>Danilov et al.(2017)Danilov, Sidorenko, Wang, and Jung</label><mixed-citation>Danilov, S., Sidorenko, D., Wang, Q., and Jung, T.: The Finite-volumE Sea
ice–Ocean Model (FESOM2), Geosci. Model Dev., 10, 765–789, <ext-link xlink:href="https://doi.org/10.5194/gmd-10-765-2017" ext-link-type="DOI">10.5194/gmd-10-765-2017</ext-link>, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx24"><label>Dawson and Aizinger(2005)</label><mixed-citation>
Dawson, C. and Aizinger, V.: A discontinuous Galerkin method for three-dimensional
shallow water equations, J. Scient. Comput., 22–23, 245–267, 2005.</mixed-citation></ref>
      <ref id="bib1.bibx25"><label>Deleersnijder and Lermusiaux(2008)</label><mixed-citation>Deleersnijder, E. and Lermusiaux, P. F. J.: Multi-scale modeling: nested-grid
and unstructured-mesh approaches, Ocean Dynam., 58, 335–336, <ext-link xlink:href="https://doi.org/10.1007/s10236-008-0170-5" ext-link-type="DOI">10.1007/s10236-008-0170-5</ext-link>, 2008.</mixed-citation></ref>
      <ref id="bib1.bibx26"><label>Donea et al.(2004)Donea, Huerta, Ponthot, and Rodrguez-Ferran</label><mixed-citation>Donea, J., Huerta, A., Ponthot, J.-P., and Rodríguez-Ferran, A.: Arbitrary
Lagrangian–Eulerian Methods, in: Encyclopedia of Computational Mechanics,
chap. 14, John Wiley &amp; Sons, Chichester, West Sussex, 413–437,
<ext-link xlink:href="https://doi.org/10.1002/0470091355.ecm009" ext-link-type="DOI">10.1002/0470091355.ecm009</ext-link>, 2004.</mixed-citation></ref>
      <ref id="bib1.bibx27"><label>Epshteyn and Rivière(2007)</label><mixed-citation>Epshteyn, Y. and Rivière, B.: Estimation of penalty parameters for symmetric
interior penalty Galerkin methods, J. Comput. Appl. Math., 206, 843–872,
<ext-link xlink:href="https://doi.org/10.1016/j.cam.2006.08.029" ext-link-type="DOI">10.1016/j.cam.2006.08.029</ext-link>, 2007.</mixed-citation></ref>
      <ref id="bib1.bibx28"><label>Ezer and Mellor(2004)</label><mixed-citation>Ezer, T. and Mellor, G. L.: A generalized coordinate ocean model and a comparison
of the bottom boundary layer dynamics in terrain-following and in <inline-formula><mml:math id="M473" display="inline"><mml:mi>z</mml:mi></mml:math></inline-formula>-level grids,
Ocean Model., 6, 379–403, <ext-link xlink:href="https://doi.org/10.1016/S1463-5003(03)00026-X" ext-link-type="DOI">10.1016/S1463-5003(03)00026-X</ext-link>, 2004.</mixed-citation></ref>
      <ref id="bib1.bibx29"><label>Farrell et al.(2013)Farrell, Ham, Funke, and Rognes</label><mixed-citation>Farrell, P. E., Ham, D. A., Funke, S. W., and Rognes, M. E.: Automated Derivation
of the Adjoint of High-Level Transient Finite Element Programs, SIAM J. Scient.
Comput., 35, C369–C393, <ext-link xlink:href="https://doi.org/10.1137/120873558" ext-link-type="DOI">10.1137/120873558</ext-link>, 2013.</mixed-citation></ref>
      <ref id="bib1.bibx30"><label>Fringer et al.(2006)Fringer, Gerritsen, and Street</label><mixed-citation>Fringer, O., Gerritsen, M., and Street, R. L.: An unstructured-grid, finite-volume,
nonhydrostatic, parallel coastal ocean simulator, Ocean Model., 14, 139–173,
<ext-link xlink:href="https://doi.org/10.1016/j.ocemod.2006.03.006" ext-link-type="DOI">10.1016/j.ocemod.2006.03.006</ext-link>, 2006.</mixed-citation></ref>
      <ref id="bib1.bibx31"><label>Gottlieb(2005)</label><mixed-citation>Gottlieb, S.: On high order strong stability preserving runge-kutta and multi
step time discretizations, J. Scient. Comput., 25, 105–128, <ext-link xlink:href="https://doi.org/10.1007/BF02728985" ext-link-type="DOI">10.1007/BF02728985</ext-link>, 2005.</mixed-citation></ref>
      <ref id="bib1.bibx32"><label>Gottlieb and Shu(1998)</label><mixed-citation>Gottlieb, S. and Shu, C.-W.: Total Variation Diminishing Runge–Kutta Schemes,
Math. Comput., 67, 73–85, <ext-link xlink:href="https://doi.org/10.1090/S0025-5718-98-00913-2" ext-link-type="DOI">10.1090/S0025-5718-98-00913-2</ext-link>, 1998.</mixed-citation></ref>
      <ref id="bib1.bibx33"><label>Gottlieb et al.(2009)Gottlieb, Ketcheson, and Shu</label><mixed-citation>Gottlieb, S., Ketcheson, D. I., and Shu, C.-W.: High Order Strong Stability
Preserving Time Discretizations, J. Scient. Comput., 38, 251–289,
<ext-link xlink:href="https://doi.org/10.1007/s10915-008-9239-z" ext-link-type="DOI">10.1007/s10915-008-9239-z</ext-link>, 2009.</mixed-citation></ref>
      <ref id="bib1.bibx34"><label>Griffies(2004)</label><mixed-citation>
Griffies, S. M.: Fundamentals of ocean climate models, Princeton University
Press, Princeton, 2004.</mixed-citation></ref>
      <ref id="bib1.bibx35"><label>Griffies and Hallberg(2000)</label><mixed-citation>Griffies, S. M. and Hallberg, R.: Biharmonic friction with a Smagorinsky-like
viscosity for use in large-scale eddy-permitting ocean models, Mon. Weather Rev.,
128, 2935–2946, <ext-link xlink:href="https://doi.org/10.1175/1520-0493(2000)128&lt;2935:BFWASL&gt;2.0.CO;2" ext-link-type="DOI">10.1175/1520-0493(2000)128&lt;2935:BFWASL&gt;2.0.CO;2</ext-link>, 2000.</mixed-citation></ref>
      <ref id="bib1.bibx36"><label>Griffies et al.(2000)Griffies, Pacanowski, and Hallberg</label><mixed-citation>Griffies, S. M., Pacanowski, R. C., and Hallberg, R. W.: Spurious Diapycnal
Mixing Associated with Advection in a <inline-formula><mml:math id="M474" display="inline"><mml:mi>z</mml:mi></mml:math></inline-formula>-Coordinate Ocean Model, Mon. Weather
Rev., 128, 538–564, <ext-link xlink:href="https://doi.org/10.1175/1520-0493(2000)128&lt;0538:SDMAWA&gt;2.0.CO;2" ext-link-type="DOI">10.1175/1520-0493(2000)128&lt;0538:SDMAWA&gt;2.0.CO;2</ext-link>, 2000.</mixed-citation></ref>
      <ref id="bib1.bibx37"><label>Griffies et al.(2005)Griffies, Gnanadesikan, Dixon, Dunne, Gerdes,
Harrison, Rosati, Russell, Samuels, Spelman, Winton, and Zhang</label><mixed-citation>Griffies, S. M., Gnanadesikan, A., Dixon, K. W., Dunne, J. P., Gerdes, R.,
Harrison, M. J., Rosati, A., Russell, J. L., Samuels, B. L., Spelman, M. J.,
Winton, M., and Zhang, R.: Formulation of an ocean model for global climate
simulations, Ocean Sci., 1, 45–79, <ext-link xlink:href="https://doi.org/10.5194/os-1-45-2005" ext-link-type="DOI">10.5194/os-1-45-2005</ext-link>, 2005.</mixed-citation></ref>
      <ref id="bib1.bibx38"><label>Haidvogel and Beckmann(1999)</label><mixed-citation>
Haidvogel, D. and Beckmann, A.: Numerical Ocean Circulation Modeling, in:
Environmental Science and Management, 4th Edn., Imperial College Press, London, 1999.</mixed-citation></ref>
      <ref id="bib1.bibx39"><label>Hanert et al.(2003)Hanert, Legat, and Deleersnijder</label><mixed-citation>
Hanert, E., Legat, V., and Deleersnijder, E.: A comparison of three finite
elements to solve the linear shallow water equations, Ocean Model., 5, 17–35, 2003.</mixed-citation></ref>
      <ref id="bib1.bibx40"><label>Hiester et al.(2014)Hiester, Piggott, Farrell, and Allison</label><mixed-citation>Hiester, H., Piggott, M., Farrell, P., and Allison, P.: Assessment of spurious
mixing in adaptive mesh simulations of the two-dimensional lock-exchange,
Ocean Model., 73, 30–44, <ext-link xlink:href="https://doi.org/10.1016/j.ocemod.2013.10.003" ext-link-type="DOI">10.1016/j.ocemod.2013.10.003</ext-link>, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx41"><label>Higdon and de Szoeke(1997)</label><mixed-citation>Higdon, R. L. and de Szoeke, R. A.: Barotropic-Baroclinic Time Splitting for
Ocean Circulation Modeling, J. Comput. Phys., 135, 30–53, <ext-link xlink:href="https://doi.org/10.1006/jcph.1997.5733" ext-link-type="DOI">10.1006/jcph.1997.5733</ext-link>, 1997.</mixed-citation></ref>
      <ref id="bib1.bibx42"><label>Hofmeister et al.(2010)Hofmeister, Burchard, and Beckers</label><mixed-citation>Hofmeister, R., Burchard, H., and Beckers, J.-M.: Non-uniform adaptive vertical
grids for 3D numerical ocean models, Ocean Model., 33, 70–86, <ext-link xlink:href="https://doi.org/10.1016/j.ocemod.2009.12.003" ext-link-type="DOI">10.1016/j.ocemod.2009.12.003</ext-link>, 2010.</mixed-citation></ref>
      <ref id="bib1.bibx43"><label>Homolya et al.(2018)Homolya, Mitchell, Luporini, and Ham</label><mixed-citation>Homolya, M., Mitchell, L., Luporini, F., and Ham, D. A.: TSFC: a
structure-preserving form compiler, SIAM J. Scient. Comput., 40, C401–C428,
<ext-link xlink:href="https://doi.org/10.1137/17M1130642" ext-link-type="DOI">10.1137/17M1130642</ext-link>, 2018.</mixed-citation></ref>
      <ref id="bib1.bibx44"><label>Ilıcak et al.(2012)Ilcak, Adcroft, Griffies, and Hallberg</label><mixed-citation>Ilıcak, M., Adcroft, A. J., Griffies, S. M., and Hallberg, R. W.: Spurious
dianeutral mixing and the role of momentum closure, Ocean Model., 45–46, 37–58,
<ext-link xlink:href="https://doi.org/10.1016/j.ocemod.2011.10.003" ext-link-type="DOI">10.1016/j.ocemod.2011.10.003</ext-link>, 2012.</mixed-citation></ref>
      <ref id="bib1.bibx45"><label>Jackett et al.(2006)Jackett, McDougall, Feistel, Wright, and Griffies</label><mixed-citation>Jackett, D. R., McDougall, T. J., Feistel, R., Wright, D. G., and Griffies, S.
M.: Algorithms for Density, Potential Temperature, Conservative Temperature,
and the Freezing Temperature of Seawater, J. Atmos. Ocean. Tech., 23, 1709–1728,
<ext-link xlink:href="https://doi.org/10.1175/JTECH1946.1" ext-link-type="DOI">10.1175/JTECH1946.1</ext-link>, 2006.</mixed-citation></ref>
      <ref id="bib1.bibx46"><label>Jankowski(1999)</label><mixed-citation>
Jankowski, J. A.: A non-hydrostatic model for free surface flows, PhD thesis,
Institut für Ströungsmechanik und ERiB, Universität Hannover, Hannover, 1999.</mixed-citation></ref>
      <ref id="bib1.bibx47"><label>Kärnä and Baptista(2016)</label><mixed-citation>Kärnä, T. and Baptista, A. M.: Evaluation of a long-term hindcast
simulation for the Columbia River estuary, Ocean Model., 99, 1–14, <ext-link xlink:href="https://doi.org/10.1016/j.ocemod.2015.12.007" ext-link-type="DOI">10.1016/j.ocemod.2015.12.007</ext-link>, 2016.</mixed-citation></ref>
      <ref id="bib1.bibx48"><label>Kärnä et al.(2011)Krn, de Brye, Gourgue, Lambrechts, Comblen,
Legat, and Deleersnijder</label><mixed-citation>Kärnä, T., de Brye, B., Gourgue, O., Lambrechts, J., Comblen, R., Legat,
V., and Deleersnijder, E.: A fully implicit wetting-drying method for DG-FEM
shallow water models, with an application to the Scheldt Estuary, Comput. Meth.
Appl. Mech. Eng., 200, 509–524, <ext-link xlink:href="https://doi.org/10.1016/j.cma.2010.07.001" ext-link-type="DOI">10.1016/j.cma.2010.07.001</ext-link>, 2011.</mixed-citation></ref>
      <ref id="bib1.bibx49"><label>Kärnä et al.(2012)Krn, Legat, Deleersnijder, and Burchard</label><mixed-citation>Kärnä, T., Legat, V., Deleersnijder, E., and Burchard, H.: Coupling of
a discontinuous Galerkin finite element marine model with a finite difference
turbulence closure model, Ocean Model., 47, 55–64, <ext-link xlink:href="https://doi.org/10.1016/j.ocemod.2012.01.001" ext-link-type="DOI">10.1016/j.ocemod.2012.01.001</ext-link>, 2012.</mixed-citation></ref>
      <ref id="bib1.bibx50"><label>Kärnä et al.(2013)Krn, Legat, and Deleersnijder</label><mixed-citation>Kärnä, T., Legat, V., and Deleersnijder, E.: A baroclinic discontinuous
Galerkin finite element model for coastal flows, Ocean Model., 61, 1–20,
<ext-link xlink:href="https://doi.org/10.1016/j.ocemod.2012.09.009" ext-link-type="DOI">10.1016/j.ocemod.2012.09.009</ext-link>, 2013.</mixed-citation></ref>
      <ref id="bib1.bibx51"><label>Kärnä et al.(2015)Krn, Baptista, Lopez, Turner, McNeil, and Sanford</label><mixed-citation>Kärnä, T., Baptista, A. M., Lopez, J. ., Turner, P. J., McNeil, C., and
Sanford, T. B.: Numerical modeling of circulation in high-energy estuaries: A
Columbia River estuary benchmark, Ocean Model., 88, 54–71, <ext-link xlink:href="https://doi.org/10.1016/j.ocemod.2015.01.001" ext-link-type="DOI">10.1016/j.ocemod.2015.01.001</ext-link>, 2015.</mixed-citation></ref>
      <?pagebreak page4382?><ref id="bib1.bibx52"><label>Kuzmin(2010)</label><mixed-citation>Kuzmin, D.: A vertex-based hierarchical slope limiter for hp-adaptive
discontinuous Galerkin methods, J. Comput. Appl. Math., 233, 3077–3085,
<ext-link xlink:href="https://doi.org/10.1016/j.cam.2009.05.028" ext-link-type="DOI">10.1016/j.cam.2009.05.028</ext-link>, 2010.</mixed-citation></ref>
      <ref id="bib1.bibx53"><label>Legg et al.(2006)Legg, Hallberg, and Girton</label><mixed-citation>Legg, S., Hallberg, R. W., and Girton, J. B.: Comparison of entrainment in
overflows simulated by <inline-formula><mml:math id="M475" display="inline"><mml:mi>z</mml:mi></mml:math></inline-formula>-coordinate, isopycnal and non-hydrostatic models,
Ocean Model., 11, 69–97, <ext-link xlink:href="https://doi.org/10.1016/j.ocemod.2004.11.006" ext-link-type="DOI">10.1016/j.ocemod.2004.11.006</ext-link>, 2006.</mixed-citation></ref>
      <ref id="bib1.bibx54"><label>Luettich and Westerink(2004)</label><mixed-citation>
Luettich, R. A. and Westerink, J. J.: Formulation and numerical implementation
of the 2D/3D ADCIRC finite element model version 44. XX, University of Notre
Dame, Notre Dame, Illinois, 2004.</mixed-citation></ref>
      <ref id="bib1.bibx55"><label>Luporini et al.(2017)Luporini, Ham, and Kelly</label><mixed-citation>Luporini, F., Ham, D. A., and Kelly, P. H. J.: An Algorithm for the Optimization
of Finite Element Integration Loops, ACM Trans. Math. Softw., 44, 3:1–3:26,
<ext-link xlink:href="https://doi.org/10.1145/3054944" ext-link-type="DOI">10.1145/3054944</ext-link>, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx56"><label>Mahadevan(2006)</label><mixed-citation>Mahadevan, A.: Modeling vertical motion at ocean fronts: Are nonhydrostatic
effects relevant at submesoscales?, Ocean Model., 14, 222–240, <ext-link xlink:href="https://doi.org/10.1016/j.ocemod.2006.05.005" ext-link-type="DOI">10.1016/j.ocemod.2006.05.005</ext-link>, 2006.</mixed-citation></ref>
      <ref id="bib1.bibx57"><label>Marchesiello et al.(2009)Marchesiello, Debreu, and Couvelard</label><mixed-citation>Marchesiello, P., Debreu, L., and Couvelard, X.: Spurious diapycnal mixing in
terrain-following coordinate models: The problem and a solution, Ocean Model.,
26, 156–169, <ext-link xlink:href="https://doi.org/10.1016/j.ocemod.2008.09.004" ext-link-type="DOI">10.1016/j.ocemod.2008.09.004</ext-link>, 2009.</mixed-citation></ref>
      <ref id="bib1.bibx58"><label>Marshall et al.(1997a)Marshall, Adcroft, Hill, Perelman, and Heisey</label><mixed-citation>Marshall, J., Adcroft, A., Hill, C., Perelman, L., and Heisey, C.: A finite-volume,
incompressible Navier Stokes model for studies of the ocean on parallel computers,
J. Geophys. Res., 102, 5753–5766, <ext-link xlink:href="https://doi.org/10.1029/96JC02775" ext-link-type="DOI">10.1029/96JC02775</ext-link>, 1997a.</mixed-citation></ref>
      <ref id="bib1.bibx59"><label>Marshall et al.(1997b)Marshall, Hill, Perelman, and Adcroft</label><mixed-citation>Marshall, J., Hill, C., Perelman, L., and Adcroft, A.: Hydrostatic, quasi-hydrostatic,
and nonhydrostatic ocean modeling, J. Geophys. Res., 102, 5733–5752,
<ext-link xlink:href="https://doi.org/10.1029/96JC02776" ext-link-type="DOI">10.1029/96JC02776</ext-link>, 1997b.</mixed-citation></ref>
      <ref id="bib1.bibx60"><label>McRae and Cotter(2014)</label><mixed-citation>McRae, A. T. T. and Cotter, C. J.: Energy- and enstrophy-conserving schemes
for the shallow-water equations, based on mimetic finite elements, Q. J. Roy.
Meteorol. Soc., 140, 2223–2234, <ext-link xlink:href="https://doi.org/10.1002/qj.2291" ext-link-type="DOI">10.1002/qj.2291</ext-link>, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx61"><label>McRae et al.(2016)McRae, Bercea, Mitchell, Ham, and Cotter</label><mixed-citation>McRae, A. T. T., Bercea, G.-T., Mitchell, L., Ham, D. A., and Cotter, C. J.:
Automated generation and symbolic manipulation of tensor product finite elements,
SIAM J. Scient. Comput., 38, S25–S47, <ext-link xlink:href="https://doi.org/10.1137/15M1021167" ext-link-type="DOI">10.1137/15M1021167</ext-link>, 2016.</mixed-citation></ref>
      <ref id="bib1.bibx62"><label>Meurer et al.(2017)Meurer, Smith, Paprocki, ert, Kirpichev,
Rocklin, Kumar, Ivanov, Moore, Singh, Rathnayake, Vig, Granger, Muller,
Bonazzi, Gupta, Vats, Johansson, Pedregosa, Curry, Terrel, Roučka, Saboo,
Fernando, Kulal, Cimrman, and Scopatz</label><mixed-citation>Meurer, A., Smith, C. P., Paprocki, M., Čertík, O., Kirpichev, S. B.,
Rocklin, M., Kumar, A., Ivanov, S., Moore, J. K., Singh, S., Rathnayake, T.,
Vig, S., Granger, B. E., Muller, R. P., Bonazzi, F., Gupta, H., Vats, S.,
Johansson, F., Pedregosa, F., Curry, M. J., Terrel, A. R., Roučka, S.,
Saboo, A., Fernando, I., Kulal, S., Cimrman, R., and Scopatz, A.: SymPy:
symbolic computing in Python, PeerJ Comp. Sci., 3, e103, <ext-link xlink:href="https://doi.org/10.7717/peerj-cs.103" ext-link-type="DOI">10.7717/peerj-cs.103</ext-link>, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx63"><label>Pacanowski and Philander(1981)</label><mixed-citation>Pacanowski, R. C. and Philander, S. G. H.: Parameterization of vertical mixing
in numerical models of tropical oceans, J. Phys. Oceanogr., 11, 1443–1451,
<ext-link xlink:href="https://doi.org/10.1175/1520-0485(1981)011&lt;1443:POVMIN&gt;2.0.CO;2" ext-link-type="DOI">10.1175/1520-0485(1981)011&lt;1443:POVMIN&gt;2.0.CO;2</ext-link>, 1981.</mixed-citation></ref>
      <ref id="bib1.bibx64"><label>Pestiaux et al.(2014)Pestiaux, Melchior, Remacle, Krn, Fichefet,
and Lambrechts</label><mixed-citation>Pestiaux, A., Melchior, S., Remacle, J., Kärnä, T., Fichefet, T., and
Lambrechts, J.: Discontinuous Galerkin finite element discretization of a
strongly anisotropic diffusion operator, Int. J. Numer. Meth. Fluids, 75,
365–384, <ext-link xlink:href="https://doi.org/10.1002/fld.3900" ext-link-type="DOI">10.1002/fld.3900</ext-link>, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx65"><label>Petersen et al.(2015)Petersen, Jacobsen, Ringler, Hecht, and Maltrud</label><mixed-citation>Petersen, M. R., Jacobsen, D. W., Ringler, T. D., Hecht, M. W., and Maltrud, M.
E.: Evaluation of the arbitrary Lagrangian–Eulerian vertical coordinate
method in the MPAS-Ocean model, Ocean Model., 86, 93–113, <ext-link xlink:href="https://doi.org/10.1016/j.ocemod.2014.12.004" ext-link-type="DOI">10.1016/j.ocemod.2014.12.004</ext-link>, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx66"><label>Piggott et al.(2008)Piggott, Gorman, Pain, Allison, Candy, Martin, and Wells</label><mixed-citation>Piggott, M. D., Gorman, G. J., Pain, C. C., Allison, P. A., Candy, A. S., Martin,
B. T., and Wells, M. R.: A new computational framework for multi-scale ocean
modelling based on adapting unstructured meshes, Int. J. Numer. Meth. Fluids,
56, 1003–1015, <ext-link xlink:href="https://doi.org/10.1002/fld.1663" ext-link-type="DOI">10.1002/fld.1663</ext-link>, 2008.</mixed-citation></ref>
      <ref id="bib1.bibx67"><label>Piggott et al.(2013)Piggott, Pain, Gorman, Marshall, and Killworth</label><mixed-citation>Piggott, M. D., Pain, C. C., Gorman, G. J., Marshall, D. P., and Killworth, P.
D.: Unstructured Adaptive Meshes for Ocean Modeling, in: Ocean Modeling in an
Eddying Regime, American Geophysical Union, Washington, D.C., 383–408, <ext-link xlink:href="https://doi.org/10.1029/177GM22" ext-link-type="DOI">10.1029/177GM22</ext-link>, 2013.</mixed-citation></ref>
      <ref id="bib1.bibx68"><label>Ralston et al.(2017)Ralston, Cowles, Geyer, and Holleman</label><mixed-citation>Ralston, D. K., Cowles, G. W., Geyer, W. R., and Holleman, R. C.: Turbulent
and numerical mixing in a salt wedge estuary: Dependence on grid resolution,
bottom roughness, and turbulence closure, J. Geophys. Res.-Oceans, 122, 692–712,
<ext-link xlink:href="https://doi.org/10.1002/2016JC011738" ext-link-type="DOI">10.1002/2016JC011738</ext-link>, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx69"><label>Rathgeber et al.(2016)Rathgeber, Ham, Mitchell, Lange, Luporini,
McRae, Bercea, Markall, and Kelly</label><mixed-citation>Rathgeber, F., Ham, D. A., Mitchell, L., Lange, M., Luporini, F., McRae, A.
T. T., Bercea, G.-T., Markall, G. R., and Kelly, P. H. J.: Firedrake: automating
the finite element method by composing abstractions, ACM Trans. Math. Soft.,
43, 24:1–24:27, <ext-link xlink:href="https://doi.org/10.1145/2998441" ext-link-type="DOI">10.1145/2998441</ext-link>, 2016.</mixed-citation></ref>
      <ref id="bib1.bibx70"><label>Rennau and Burchard(2009)</label><mixed-citation>Rennau, H. and Burchard, H.: Quantitative analysis of numerically induced
mixing in a coastal model application, Ocean Dynam., 59, 671–687, <ext-link xlink:href="https://doi.org/10.1007/s10236-009-0201-x" ext-link-type="DOI">10.1007/s10236-009-0201-x</ext-link>, 2009.</mixed-citation></ref>
      <ref id="bib1.bibx71"><label>Ringler et al.(2013)Ringler, Petersen, Higdon, Jacobsen, Jones, and Maltrud</label><mixed-citation>Ringler, T., Petersen, M., Higdon, R. L., Jacobsen, D., Jones, P. W., and
Maltrud, M.: A multi-resolution approach to global ocean modeling, Ocean Model.,
69, 211–232, <ext-link xlink:href="https://doi.org/10.1016/j.ocemod.2013.04.010" ext-link-type="DOI">10.1016/j.ocemod.2013.04.010</ext-link>, 2013.</mixed-citation></ref>
      <ref id="bib1.bibx72"><label>Salari and Knupp(2000)</label><mixed-citation>Salari, K. and Knupp, P.: Code Verification by the Method of Manufactured
Solutions, Sandia National Laboratories, Albuquerque, New Mexico, <ext-link xlink:href="https://doi.org/10.2172/759450" ext-link-type="DOI">10.2172/759450</ext-link>, 2000.</mixed-citation></ref>
      <ref id="bib1.bibx73"><label>Shchepetkin and McWilliams(1998)</label><mixed-citation>Shchepetkin, A. F. and McWilliams, J. C.: Quasi-Monotone Advection Schemes
Based on Explicit Locally Adaptive Dissipation, Mon. Weather Rev., 126, 1541–1580,
<ext-link xlink:href="https://doi.org/10.1175/1520-0493(1998)126&lt;1541:QMASBO&gt;2.0.CO;2" ext-link-type="DOI">10.1175/1520-0493(1998)126&lt;1541:QMASBO&gt;2.0.CO;2</ext-link>, 1998.</mixed-citation></ref>
      <ref id="bib1.bibx74"><label>Shchepetkin and McWilliams(2003)</label><mixed-citation>Shchepetkin, A. F. and McWilliams, J. C.: A method for computing horizontal
pressure-gradient force in an oceanic model with a nonaligned vertical coordinate,
J. Geophys. Res.-Oceans, 108, 35:1–35:34, <ext-link xlink:href="https://doi.org/10.1029/2001JC001047" ext-link-type="DOI">10.1029/2001JC001047</ext-link>, 2003.</mixed-citation></ref>
      <ref id="bib1.bibx75"><label>Shchepetkin and McWilliams(2005)</label><mixed-citation>Shchepetkin, A. F. and McWilliams, J. C.: The regional oceanic modeling system (ROMS):
a split-explicit, free-surface, topography-following-coordinate oceanic model,
Ocean Model., 9, 347–404, <ext-link xlink:href="https://doi.org/10.1016/j.ocemod.2004.08.002" ext-link-type="DOI">10.1016/j.ocemod.2004.08.002</ext-link>, 2005.</mixed-citation></ref>
      <ref id="bib1.bibx76"><label>Shi et al.(2017)Shi, Chickadel, Hsu, Kirby, Farquharson, and Ma</label><mixed-citation>Shi, F., Chickadel, C. C., Hsu, T.-J., Kirby, J. T., Farquharson, G., and Ma,
G.: High-Resolution Non-Hydrostatic Modeling of Frontal Features in the Mouth
of the Columbia River, Estuar. Coasts, 40, 296–309, <ext-link xlink:href="https://doi.org/10.1007/s12237-016-0132-y" ext-link-type="DOI">10.1007/s12237-016-0132-y</ext-link>, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx77"><label>Shu(1988)</label><mixed-citation>Shu, C.-W.: Total-Variation-Diminishing Time Discretizations, SIAM J. Scient.
Stat. Comput. 9, 1073–1084, <ext-link xlink:href="https://doi.org/10.1137/0909073" ext-link-type="DOI">10.1137/0909073</ext-link>, 1988.</mixed-citation></ref>
      <ref id="bib1.bibx78"><label>Shu and Osher(1988)</label><mixed-citation>Shu, C.-W. and Osher, S.: Efficient implementation of essentially non-oscillatory
shock-capturing schemes, J. Comput. Phys., 77, 439–471, <ext-link xlink:href="https://doi.org/10.1016/0021-9991(88)90177-5" ext-link-type="DOI">10.1016/0021-9991(88)90177-5</ext-link>, 1988.</mixed-citation></ref>
      <?pagebreak page4383?><ref id="bib1.bibx79"><label>Song and Haidvogel(1994)</label><mixed-citation>Song, Y. and Haidvogel, D.: A Semi-implicit Ocean Circulation Model Using a
Generalized Topography-Following Coordinate System, J. Comput. Phys., 115,
228–244, <ext-link xlink:href="https://doi.org/10.1006/jcph.1994.1189" ext-link-type="DOI">10.1006/jcph.1994.1189</ext-link>, 1994.</mixed-citation></ref>
      <ref id="bib1.bibx80"><label>Wang(1984)</label><mixed-citation>Wang, D.-P.: Mutual intrusion of a gravity current and density front formation,
J. Phys. Oceanogr., 14, 1191–1199, <ext-link xlink:href="https://doi.org/10.1175/1520-0485(1984)014&lt;1191:MIOAGC&gt;2.0.CO;2" ext-link-type="DOI">10.1175/1520-0485(1984)014&lt;1191:MIOAGC&gt;2.0.CO;2</ext-link>, 1984.</mixed-citation></ref>
      <ref id="bib1.bibx81"><label>Wang et al.(2008a)Wang, Danilov, and Schrter</label><mixed-citation>Wang, Q., Danilov, S., and Schröter, J.: Finite element ocean circulation
model based on triangular prismatic elements, with application in studying the
effect of topography representation, J. Geophys. Res.-Oceans, 113, 1–21,
<ext-link xlink:href="https://doi.org/10.1029/2007JC004482" ext-link-type="DOI">10.1029/2007JC004482</ext-link>, 2008a.</mixed-citation></ref>
      <ref id="bib1.bibx82"><label>Wang et al.(2008b)Wang, Danilov, and Schrter</label><mixed-citation>Wang, Q., Danilov, S., and Schröer, J.: Comparison of overflow simulations
on different vertical grids using the Finite Element Ocean circulation Model,
Ocean Model., 20, 313–335, <ext-link xlink:href="https://doi.org/10.1016/j.ocemod.2007.10.005" ext-link-type="DOI">10.1016/j.ocemod.2007.10.005</ext-link>, 2008b.</mixed-citation></ref>
      <ref id="bib1.bibx83"><label>Wang et al.(2014)Wang, Danilov, Sidorenko, Timmermann, Wekerle, Wang,
Jung, and Schrter</label><mixed-citation>Wang, Q., Danilov, S., Sidorenko, D., Timmermann, R., Wekerle, C., Wang, X.,
Jung, T., and Schröter, J.: The Finite Element Sea Ice-Ocean Model (FESOM)
v.1.4: formulation of an ocean general circulation model, Geosci. Model Dev.,
7, 663–693, <ext-link xlink:href="https://doi.org/10.5194/gmd-7-663-2014" ext-link-type="DOI">10.5194/gmd-7-663-2014</ext-link>, 2014.
</mixed-citation></ref><?xmltex \hack{\newpage}?>
      <ref id="bib1.bibx84"><label>White et al.(2008a)White, Deleersnijder, and Legat</label><mixed-citation>
White, L., Deleersnijder, E., and Legat, V.: A three-dimensional unstructured
mesh finite element shallow-water model, with application to the flows around
an island and in a wind-driven, elongated basin, Ocean Model., 22, 26–47, 2008a.</mixed-citation></ref>
      <ref id="bib1.bibx85"><label>White et al.(2008b)White, Legat, and Deleersnijder</label><mixed-citation>White, L., Legat, V., and Deleersnijder, E.: Tracer Conservation for
Three-Dimensional, Finite-Element, Free-Surface, Ocean Modeling on Moving
Prismatic Meshes, Mon. Weather Rev., 136, 420–442, <ext-link xlink:href="https://doi.org/10.1175/2007MWR2137.1" ext-link-type="DOI">10.1175/2007MWR2137.1</ext-link>, 2008b.</mixed-citation></ref>
      <ref id="bib1.bibx86"><label>zenodo/Firedrake(2018)</label><mixed-citation>zenodo/Firedrake: Software used in `Thetis coastal ocean model: discontinuous
Galerkin discretization for the three-dimensional hydrostatic equations',
<ext-link xlink:href="https://doi.org/10.5281/zenodo.1407898" ext-link-type="DOI">10.5281/zenodo.1407898</ext-link>, 2018.</mixed-citation></ref>
      <ref id="bib1.bibx87"><label>zenodo/Thetis(2018)</label><mixed-citation>zenodo/Thetis: The Thetis coastal ocean model, <ext-link xlink:href="https://doi.org/10.5281/zenodo.1407181" ext-link-type="DOI">10.5281/zenodo.1407181</ext-link>, 2018.</mixed-citation></ref>
      <ref id="bib1.bibx88"><label>Zhang and Baptista(2008)</label><mixed-citation>Zhang, Y. and Baptista, A. M.: SELFE: A semi-implicit Eulerian–Lagrangian
finite-element model for cross-scale ocean circulation, Ocean Model., 21,
71–96, <ext-link xlink:href="https://doi.org/10.1016/j.ocemod.2007.11.005" ext-link-type="DOI">10.1016/j.ocemod.2007.11.005</ext-link>, 2008.</mixed-citation></ref>
      <ref id="bib1.bibx89"><label>Zhang et al.(2016)Zhang, Ye, Stanev, and Grashorn</label><mixed-citation>Zhang, Y. J., Ye, F., Stanev, E. V., and Grashorn, S.: Seamless cross-scale
modeling with SCHISM, Ocean Model., 102, 64–81, <ext-link xlink:href="https://doi.org/10.1016/j.ocemod.2016.05.002" ext-link-type="DOI">10.1016/j.ocemod.2016.05.002</ext-link>, 2016.</mixed-citation></ref>

  </ref-list></back>
    <!--<article-title-html>Thetis coastal ocean model: discontinuous Galerkin discretization for the three-dimensional hydrostatic equations</article-title-html>
<abstract-html><p>Unstructured grid ocean models are advantageous for simulating the coastal
ocean and river–estuary–plume systems. However, unstructured grid models tend
to be diffusive and/or computationally expensive, which limits their
applicability to real-life problems. In this paper, we describe a novel
discontinuous Galerkin (DG) finite element discretization for the hydrostatic
equations. The formulation is fully conservative and second-order accurate in
space and time. Monotonicity of the advection scheme is ensured by using a
strong stability-preserving time integration method and slope limiters.
Compared to previous DG models, advantages include a more accurate mode
splitting method, revised viscosity formulation, and new second-order time
integration scheme. We demonstrate that the model is capable of simulating
baroclinic flows in the eddying regime with a suite of test cases. Numerical
dissipation is well-controlled, being comparable or lower than in existing
state-of-the-art structured grid models.</p></abstract-html>
<ref-html id="bib1.bib1"><label>Aizinger and Dawson(2007)</label><mixed-citation>
Aizinger, V. and Dawson, C.: The local discontinuous Galerkin method for
three-dimensional shallow water flow, Comput. Meth. Appl. Mech. Eng., 196,
734–746, <a href="https://doi.org/10.1016/j.cma.2006.04.010" target="_blank">https://doi.org/10.1016/j.cma.2006.04.010</a>, 2007.
</mixed-citation></ref-html>
<ref-html id="bib1.bib2"><label>Alnæs et al.(2014)Alnæs, Logg, Ølgaard, Rognes, and Wells</label><mixed-citation>
Alnæs, M. S., Logg, A., Ølgaard, K. B., Rognes, M. E., and Wells, G. N.:
Unified Form Language: A Domain-specific Language for Weak Formulations of
Partial Differential Equations, ACM Trans. Math. Softw., 40, 9:1–9:37, <a href="https://doi.org/10.1145/2566630" target="_blank">https://doi.org/10.1145/2566630</a>, 2014.
</mixed-citation></ref-html>
<ref-html id="bib1.bib3"><label>Beckmann and Haidvogel(1993)</label><mixed-citation>
Beckmann, A. and Haidvogel, D. B.: Numerical Simulation of Flow around a Tall
Isolated Seamount. Part I: Problem Formulation and Model Accuracy, J. Phys.
Oceanogr., 23, 1736–1753, <a href="https://doi.org/10.1175/1520-0485(1993)023&lt;1736:NSOFAA&gt;2.0.CO;2" target="_blank">https://doi.org/10.1175/1520-0485(1993)023&lt;1736:NSOFAA&gt;2.0.CO;2</a>, 1993.
</mixed-citation></ref-html>
<ref-html id="bib1.bib4"><label>Benjamin(1968)</label><mixed-citation>
Benjamin, T. B.: Gravity currents and related phenomena, J. Fluid Mech., 31,
209–248, <a href="https://doi.org/10.1017/S0022112068000133" target="_blank">https://doi.org/10.1017/S0022112068000133</a>, 1968.
</mixed-citation></ref-html>
<ref-html id="bib1.bib5"><label>Bercea et al.(2016)Bercea, McRae, Ham, Mitchell, Rathgeber, Nardi,
Luporini, and Kelly</label><mixed-citation>
Bercea, G.-T., McRae, A. T. T., Ham, D. A., Mitchell, L., Rathgeber, F., Nardi,
L., Luporini, F., and Kelly, P. H. J.: A structure-exploiting numbering algorithm
for finite elements on extruded meshes, and its performance evaluation in
Firedrake, Geosci. Model Dev., 9, 3803–3815, <a href="https://doi.org/10.5194/gmd-9-3803-2016" target="_blank">https://doi.org/10.5194/gmd-9-3803-2016</a>, 2016.
</mixed-citation></ref-html>
<ref-html id="bib1.bib6"><label>Bernard et al.(2008)Bernard, Deleersnijder, Legat, and Remacle</label><mixed-citation>
Bernard, P.-E., Deleersnijder, E., Legat, V., and Remacle, J.-F.: Dispersion
Analysis of Discontinuous Galerkin Schemes Applied to Poincaré, Kelvin and
Rossby Waves, J. Scient. Comput., 34, 26–47, <a href="https://doi.org/10.1007/s10915-007-9156-6" target="_blank">https://doi.org/10.1007/s10915-007-9156-6</a>, 2008.
</mixed-citation></ref-html>
<ref-html id="bib1.bib7"><label>Blaise et al.(2010)Blaise, Comblen, Legat, Remacle, Deleersnijder,
and Lambrechts</label><mixed-citation>
Blaise, S., Comblen, R., Legat, V., Remacle, J.-F., Deleersnijder, E., and
Lambrechts, J.: A discontinuous finite element baroclinic marine model on
unstructured prismatic meshes. Part I: space discretization, Ocean Dynam., 60,
1371–1393, <a href="https://doi.org/10.1007/s10236-010-0358-3" target="_blank">https://doi.org/10.1007/s10236-010-0358-3</a>, 2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib8"><label>Bleck(1978)</label><mixed-citation>
Bleck, R.: On the Use of Hybrid Vertical Coordinates in Numerical Weather
Prediction Models, Mon. Weather Rev., 106, 1233–1244, <a href="https://doi.org/10.1175/1520-0493(1978)106&lt;1233:OTUOHV&gt;2.0.CO;2" target="_blank">https://doi.org/10.1175/1520-0493(1978)106&lt;1233:OTUOHV&gt;2.0.CO;2</a>, 1978.
</mixed-citation></ref-html>
<ref-html id="bib1.bib9"><label>Bleck(2002)</label><mixed-citation>
Bleck, R.: An oceanic general circulation model framed in hybrid isopycnic-Cartesian
coordinates, Ocean Model., 4, 55–88, <a href="https://doi.org/10.1016/S1463-5003(01)00012-9" target="_blank">https://doi.org/10.1016/S1463-5003(01)00012-9</a>, 2002.
</mixed-citation></ref-html>
<ref-html id="bib1.bib10"><label>Blumberg and Mellor(1987)</label><mixed-citation>
Blumberg, A. F. and Mellor, G. L.: A description of a three-dimensional coastal
ocean model, in: Three Dimensional Coastal Ocean Models, chap. 1–16, edited by:
Heaps, N. S., American Geophysical Union, Washington, D.C., <a href="https://doi.org/10.1029/CO004p0001" target="_blank">https://doi.org/10.1029/CO004p0001</a>, 1987.
</mixed-citation></ref-html>
<ref-html id="bib1.bib11"><label>Burchard and Bolding(2002)</label><mixed-citation>
Burchard, H. and Bolding, K.: GETM – a general estuarine transport model,
Scientific documentation, Tech. Rep. EUR 20253 EN, European Commission, Ispra, Italy, 2002.
</mixed-citation></ref-html>
<ref-html id="bib1.bib12"><label>Burchard and Rennau(2008)</label><mixed-citation>
Burchard, H. and Rennau, H.: Comparative quantification of physically and
numerically induced mixing in ocean models, Ocean Model., 20, 293–311,
<a href="https://doi.org/10.1016/j.ocemod.2007.10.003" target="_blank">https://doi.org/10.1016/j.ocemod.2007.10.003</a>, 2008.
</mixed-citation></ref-html>
<ref-html id="bib1.bib13"><label>Casulli and Walters(2000)</label><mixed-citation>
Casulli, V. and Walters, R. A.: An unstructured grid, three-dimensional model
based on the shallow water equations, Int. J. Numer. Meth. Fluids, 32, 331–348,
<a href="https://doi.org/10.1002/(SICI)1097-0363(20000215)32:3&lt;331::AID-FLD941&gt;3.0.CO;2-C" target="_blank">https://doi.org/10.1002/(SICI)1097-0363(20000215)32:3&lt;331::AID-FLD941&gt;3.0.CO;2-C</a>, 2000.
</mixed-citation></ref-html>
<ref-html id="bib1.bib14"><label>Chen et al.(2003)Chen, Liu, and Beardsley</label><mixed-citation>
Chen, C., Liu, H., and Beardsley, R. C.: An Unstructured Grid, Finite-Volume,
Three-Dimensional, Primitive Equations Ocean Model: Application to Coastal
Ocean and Estuaries, J. Atmos. Ocean. Tech., 20, 159–186, <a href="https://doi.org/10.1175/1520-0426(2003)020&lt;0159:AUGFVT&gt;2.0.CO;2" target="_blank">https://doi.org/10.1175/1520-0426(2003)020&lt;0159:AUGFVT&gt;2.0.CO;2</a>, 2003.
</mixed-citation></ref-html>
<ref-html id="bib1.bib15"><label>Cockburn and Shu(2001)</label><mixed-citation>
Cockburn, B. and Shu, C.-W.: Runge–Kutta Discontinuous Galerkin Methods for
convection-dominated problems, J. Scient. Comput., 16, 173–261, 2001.
</mixed-citation></ref-html>
<ref-html id="bib1.bib16"><label>Comblen et al.(2010a)Comblen, Blaise, Legat, Remacle,
Deleersnijder, and Lambrechts</label><mixed-citation>
Comblen, R., Blaise, S., Legat, V., Remacle, J.-F., Deleersnijder, E., and
Lambrechts, J.: A discontinuous finite element baroclinic marine model on
unstructured prismatic meshes. Part II: implicit/explicit time discretization,
Ocean Dynam., 60, 1395–1414, <a href="https://doi.org/10.1007/s10236-010-0357-4" target="_blank">https://doi.org/10.1007/s10236-010-0357-4</a>, 2010a.
</mixed-citation></ref-html>
<ref-html id="bib1.bib17"><label>Comblen et al.(2010b)Comblen, Lambrechts, Remacle, and Legat</label><mixed-citation>
Comblen, R., Lambrechts, J., Remacle, J.-F., and Legat, V.: Practical evaluation
of five partly discontinuous finite element pairs for the non-conservative
shallow water equations, Int. J. Numer. Meth. Fluids, 63, 701–724, <a href="https://doi.org/10.1002/fld.2094" target="_blank">https://doi.org/10.1002/fld.2094</a>, 2010b.
</mixed-citation></ref-html>
<ref-html id="bib1.bib18"><label>Cotter et al.(2009a)Cotter, Ham, and Pain</label><mixed-citation>
Cotter, C. J., Ham, D. A., and Pain, C. C.: A mixed discontinuous/continuous
finite element pair for shallow-water ocean modelling, Ocean Model., 26, 86–90,
<a href="https://doi.org/10.1016/j.ocemod.2008.09.002" target="_blank">https://doi.org/10.1016/j.ocemod.2008.09.002</a>, 2009a.
</mixed-citation></ref-html>
<ref-html id="bib1.bib19"><label>Cotter et al.(2009b)Cotter, Ham, Pain, and Reich</label><mixed-citation>
Cotter, C. J., Ham, D. A., Pain, C. C., and Reich, S.: LBB stability of a
mixed Galerkin finite element pair for fluid flow simulations, J. Comput. Phys.,
228, 336–348, <a href="https://doi.org/10.1016/j.jcp.2008.09.014" target="_blank">https://doi.org/10.1016/j.jcp.2008.09.014</a>, 2009b.
</mixed-citation></ref-html>
<ref-html id="bib1.bib20"><label>Danilov(2012)</label><mixed-citation>
Danilov, S.: Two finite-volume unstructured mesh models for large-scale ocean
modeling, Ocean Model., 47, 14–25, <a href="https://doi.org/10.1016/j.ocemod.2012.01.004" target="_blank">https://doi.org/10.1016/j.ocemod.2012.01.004</a>, 2012.
</mixed-citation></ref-html>
<ref-html id="bib1.bib21"><label>Danilov(2013)</label><mixed-citation>
Danilov, S.: Ocean modeling on unstructured meshes, Ocean Model., 69, 195–210,
<a href="https://doi.org/10.1016/j.ocemod.2013.05.005" target="_blank">https://doi.org/10.1016/j.ocemod.2013.05.005</a>, 2013.
</mixed-citation></ref-html>
<ref-html id="bib1.bib22"><label>Danilov et al.(2008)Danilov, Wang, Losch, Sidorenko, and Schrter</label><mixed-citation>
Danilov, S., Wang, Q., Losch, M., Sidorenko, D., and Schröter, J.: Modeling
ocean circulation on unstructured meshes: comparison of two horizontal
discretizations, Ocean Dynam., 58, 365–374, <a href="https://doi.org/10.1007/s10236-008-0138-5" target="_blank">https://doi.org/10.1007/s10236-008-0138-5</a>, 2008.
</mixed-citation></ref-html>
<ref-html id="bib1.bib23"><label>Danilov et al.(2017)Danilov, Sidorenko, Wang, and Jung</label><mixed-citation>
Danilov, S., Sidorenko, D., Wang, Q., and Jung, T.: The Finite-volumE Sea
ice–Ocean Model (FESOM2), Geosci. Model Dev., 10, 765–789, <a href="https://doi.org/10.5194/gmd-10-765-2017" target="_blank">https://doi.org/10.5194/gmd-10-765-2017</a>, 2017.
</mixed-citation></ref-html>
<ref-html id="bib1.bib24"><label>Dawson and Aizinger(2005)</label><mixed-citation>
Dawson, C. and Aizinger, V.: A discontinuous Galerkin method for three-dimensional
shallow water equations, J. Scient. Comput., 22–23, 245–267, 2005.
</mixed-citation></ref-html>
<ref-html id="bib1.bib25"><label>Deleersnijder and Lermusiaux(2008)</label><mixed-citation>
Deleersnijder, E. and Lermusiaux, P. F. J.: Multi-scale modeling: nested-grid
and unstructured-mesh approaches, Ocean Dynam., 58, 335–336, <a href="https://doi.org/10.1007/s10236-008-0170-5" target="_blank">https://doi.org/10.1007/s10236-008-0170-5</a>, 2008.
</mixed-citation></ref-html>
<ref-html id="bib1.bib26"><label>Donea et al.(2004)Donea, Huerta, Ponthot, and Rodrguez-Ferran</label><mixed-citation>
Donea, J., Huerta, A., Ponthot, J.-P., and Rodríguez-Ferran, A.: Arbitrary
Lagrangian–Eulerian Methods, in: Encyclopedia of Computational Mechanics,
chap. 14, John Wiley &amp; Sons, Chichester, West Sussex, 413–437,
<a href="https://doi.org/10.1002/0470091355.ecm009" target="_blank">https://doi.org/10.1002/0470091355.ecm009</a>, 2004.
</mixed-citation></ref-html>
<ref-html id="bib1.bib27"><label>Epshteyn and Rivière(2007)</label><mixed-citation>
Epshteyn, Y. and Rivière, B.: Estimation of penalty parameters for symmetric
interior penalty Galerkin methods, J. Comput. Appl. Math., 206, 843–872,
<a href="https://doi.org/10.1016/j.cam.2006.08.029" target="_blank">https://doi.org/10.1016/j.cam.2006.08.029</a>, 2007.
</mixed-citation></ref-html>
<ref-html id="bib1.bib28"><label>Ezer and Mellor(2004)</label><mixed-citation>
Ezer, T. and Mellor, G. L.: A generalized coordinate ocean model and a comparison
of the bottom boundary layer dynamics in terrain-following and in <i>z</i>-level grids,
Ocean Model., 6, 379–403, <a href="https://doi.org/10.1016/S1463-5003(03)00026-X" target="_blank">https://doi.org/10.1016/S1463-5003(03)00026-X</a>, 2004.
</mixed-citation></ref-html>
<ref-html id="bib1.bib29"><label>Farrell et al.(2013)Farrell, Ham, Funke, and Rognes</label><mixed-citation>
Farrell, P. E., Ham, D. A., Funke, S. W., and Rognes, M. E.: Automated Derivation
of the Adjoint of High-Level Transient Finite Element Programs, SIAM J. Scient.
Comput., 35, C369–C393, <a href="https://doi.org/10.1137/120873558" target="_blank">https://doi.org/10.1137/120873558</a>, 2013.
</mixed-citation></ref-html>
<ref-html id="bib1.bib30"><label>Fringer et al.(2006)Fringer, Gerritsen, and Street</label><mixed-citation>
Fringer, O., Gerritsen, M., and Street, R. L.: An unstructured-grid, finite-volume,
nonhydrostatic, parallel coastal ocean simulator, Ocean Model., 14, 139–173,
<a href="https://doi.org/10.1016/j.ocemod.2006.03.006" target="_blank">https://doi.org/10.1016/j.ocemod.2006.03.006</a>, 2006.
</mixed-citation></ref-html>
<ref-html id="bib1.bib31"><label>Gottlieb(2005)</label><mixed-citation>
Gottlieb, S.: On high order strong stability preserving runge-kutta and multi
step time discretizations, J. Scient. Comput., 25, 105–128, <a href="https://doi.org/10.1007/BF02728985" target="_blank">https://doi.org/10.1007/BF02728985</a>, 2005.
</mixed-citation></ref-html>
<ref-html id="bib1.bib32"><label>Gottlieb and Shu(1998)</label><mixed-citation>
Gottlieb, S. and Shu, C.-W.: Total Variation Diminishing Runge–Kutta Schemes,
Math. Comput., 67, 73–85, <a href="https://doi.org/10.1090/S0025-5718-98-00913-2" target="_blank">https://doi.org/10.1090/S0025-5718-98-00913-2</a>, 1998.
</mixed-citation></ref-html>
<ref-html id="bib1.bib33"><label>Gottlieb et al.(2009)Gottlieb, Ketcheson, and Shu</label><mixed-citation>
Gottlieb, S., Ketcheson, D. I., and Shu, C.-W.: High Order Strong Stability
Preserving Time Discretizations, J. Scient. Comput., 38, 251–289,
<a href="https://doi.org/10.1007/s10915-008-9239-z" target="_blank">https://doi.org/10.1007/s10915-008-9239-z</a>, 2009.
</mixed-citation></ref-html>
<ref-html id="bib1.bib34"><label>Griffies(2004)</label><mixed-citation>
Griffies, S. M.: Fundamentals of ocean climate models, Princeton University
Press, Princeton, 2004.
</mixed-citation></ref-html>
<ref-html id="bib1.bib35"><label>Griffies and Hallberg(2000)</label><mixed-citation>
Griffies, S. M. and Hallberg, R.: Biharmonic friction with a Smagorinsky-like
viscosity for use in large-scale eddy-permitting ocean models, Mon. Weather Rev.,
128, 2935–2946, <a href="https://doi.org/10.1175/1520-0493(2000)128&lt;2935:BFWASL&gt;2.0.CO;2" target="_blank">https://doi.org/10.1175/1520-0493(2000)128&lt;2935:BFWASL&gt;2.0.CO;2</a>, 2000.
</mixed-citation></ref-html>
<ref-html id="bib1.bib36"><label>Griffies et al.(2000)Griffies, Pacanowski, and Hallberg</label><mixed-citation>
Griffies, S. M., Pacanowski, R. C., and Hallberg, R. W.: Spurious Diapycnal
Mixing Associated with Advection in a <i>z</i>-Coordinate Ocean Model, Mon. Weather
Rev., 128, 538–564, <a href="https://doi.org/10.1175/1520-0493(2000)128&lt;0538:SDMAWA&gt;2.0.CO;2" target="_blank">https://doi.org/10.1175/1520-0493(2000)128&lt;0538:SDMAWA&gt;2.0.CO;2</a>, 2000.
</mixed-citation></ref-html>
<ref-html id="bib1.bib37"><label>Griffies et al.(2005)Griffies, Gnanadesikan, Dixon, Dunne, Gerdes,
Harrison, Rosati, Russell, Samuels, Spelman, Winton, and Zhang</label><mixed-citation>
Griffies, S. M., Gnanadesikan, A., Dixon, K. W., Dunne, J. P., Gerdes, R.,
Harrison, M. J., Rosati, A., Russell, J. L., Samuels, B. L., Spelman, M. J.,
Winton, M., and Zhang, R.: Formulation of an ocean model for global climate
simulations, Ocean Sci., 1, 45–79, <a href="https://doi.org/10.5194/os-1-45-2005" target="_blank">https://doi.org/10.5194/os-1-45-2005</a>, 2005.
</mixed-citation></ref-html>
<ref-html id="bib1.bib38"><label>Haidvogel and Beckmann(1999)</label><mixed-citation>
Haidvogel, D. and Beckmann, A.: Numerical Ocean Circulation Modeling, in:
Environmental Science and Management, 4th Edn., Imperial College Press, London, 1999.
</mixed-citation></ref-html>
<ref-html id="bib1.bib39"><label>Hanert et al.(2003)Hanert, Legat, and Deleersnijder</label><mixed-citation>
Hanert, E., Legat, V., and Deleersnijder, E.: A comparison of three finite
elements to solve the linear shallow water equations, Ocean Model., 5, 17–35, 2003.
</mixed-citation></ref-html>
<ref-html id="bib1.bib40"><label>Hiester et al.(2014)Hiester, Piggott, Farrell, and Allison</label><mixed-citation>
Hiester, H., Piggott, M., Farrell, P., and Allison, P.: Assessment of spurious
mixing in adaptive mesh simulations of the two-dimensional lock-exchange,
Ocean Model., 73, 30–44, <a href="https://doi.org/10.1016/j.ocemod.2013.10.003" target="_blank">https://doi.org/10.1016/j.ocemod.2013.10.003</a>, 2014.
</mixed-citation></ref-html>
<ref-html id="bib1.bib41"><label>Higdon and de Szoeke(1997)</label><mixed-citation>
Higdon, R. L. and de Szoeke, R. A.: Barotropic-Baroclinic Time Splitting for
Ocean Circulation Modeling, J. Comput. Phys., 135, 30–53, <a href="https://doi.org/10.1006/jcph.1997.5733" target="_blank">https://doi.org/10.1006/jcph.1997.5733</a>, 1997.
</mixed-citation></ref-html>
<ref-html id="bib1.bib42"><label>Hofmeister et al.(2010)Hofmeister, Burchard, and Beckers</label><mixed-citation>
Hofmeister, R., Burchard, H., and Beckers, J.-M.: Non-uniform adaptive vertical
grids for 3D numerical ocean models, Ocean Model., 33, 70–86, <a href="https://doi.org/10.1016/j.ocemod.2009.12.003" target="_blank">https://doi.org/10.1016/j.ocemod.2009.12.003</a>, 2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib43"><label>Homolya et al.(2018)Homolya, Mitchell, Luporini, and Ham</label><mixed-citation>
Homolya, M., Mitchell, L., Luporini, F., and Ham, D. A.: TSFC: a
structure-preserving form compiler, SIAM J. Scient. Comput., 40, C401–C428,
<a href="https://doi.org/10.1137/17M1130642" target="_blank">https://doi.org/10.1137/17M1130642</a>, 2018.
</mixed-citation></ref-html>
<ref-html id="bib1.bib44"><label>Ilıcak et al.(2012)Ilcak, Adcroft, Griffies, and Hallberg</label><mixed-citation>
Ilıcak, M., Adcroft, A. J., Griffies, S. M., and Hallberg, R. W.: Spurious
dianeutral mixing and the role of momentum closure, Ocean Model., 45–46, 37–58,
<a href="https://doi.org/10.1016/j.ocemod.2011.10.003" target="_blank">https://doi.org/10.1016/j.ocemod.2011.10.003</a>, 2012.
</mixed-citation></ref-html>
<ref-html id="bib1.bib45"><label>Jackett et al.(2006)Jackett, McDougall, Feistel, Wright, and Griffies</label><mixed-citation>
Jackett, D. R., McDougall, T. J., Feistel, R., Wright, D. G., and Griffies, S.
M.: Algorithms for Density, Potential Temperature, Conservative Temperature,
and the Freezing Temperature of Seawater, J. Atmos. Ocean. Tech., 23, 1709–1728,
<a href="https://doi.org/10.1175/JTECH1946.1" target="_blank">https://doi.org/10.1175/JTECH1946.1</a>, 2006.
</mixed-citation></ref-html>
<ref-html id="bib1.bib46"><label>Jankowski(1999)</label><mixed-citation>
Jankowski, J. A.: A non-hydrostatic model for free surface flows, PhD thesis,
Institut für Ströungsmechanik und ERiB, Universität Hannover, Hannover, 1999.
</mixed-citation></ref-html>
<ref-html id="bib1.bib47"><label>Kärnä and Baptista(2016)</label><mixed-citation>
Kärnä, T. and Baptista, A. M.: Evaluation of a long-term hindcast
simulation for the Columbia River estuary, Ocean Model., 99, 1–14, <a href="https://doi.org/10.1016/j.ocemod.2015.12.007" target="_blank">https://doi.org/10.1016/j.ocemod.2015.12.007</a>, 2016.
</mixed-citation></ref-html>
<ref-html id="bib1.bib48"><label>Kärnä et al.(2011)Krn, de Brye, Gourgue, Lambrechts, Comblen,
Legat, and Deleersnijder</label><mixed-citation>
Kärnä, T., de Brye, B., Gourgue, O., Lambrechts, J., Comblen, R., Legat,
V., and Deleersnijder, E.: A fully implicit wetting-drying method for DG-FEM
shallow water models, with an application to the Scheldt Estuary, Comput. Meth.
Appl. Mech. Eng., 200, 509–524, <a href="https://doi.org/10.1016/j.cma.2010.07.001" target="_blank">https://doi.org/10.1016/j.cma.2010.07.001</a>, 2011.
</mixed-citation></ref-html>
<ref-html id="bib1.bib49"><label>Kärnä et al.(2012)Krn, Legat, Deleersnijder, and Burchard</label><mixed-citation>
Kärnä, T., Legat, V., Deleersnijder, E., and Burchard, H.: Coupling of
a discontinuous Galerkin finite element marine model with a finite difference
turbulence closure model, Ocean Model., 47, 55–64, <a href="https://doi.org/10.1016/j.ocemod.2012.01.001" target="_blank">https://doi.org/10.1016/j.ocemod.2012.01.001</a>, 2012.
</mixed-citation></ref-html>
<ref-html id="bib1.bib50"><label>Kärnä et al.(2013)Krn, Legat, and Deleersnijder</label><mixed-citation>
Kärnä, T., Legat, V., and Deleersnijder, E.: A baroclinic discontinuous
Galerkin finite element model for coastal flows, Ocean Model., 61, 1–20,
<a href="https://doi.org/10.1016/j.ocemod.2012.09.009" target="_blank">https://doi.org/10.1016/j.ocemod.2012.09.009</a>, 2013.
</mixed-citation></ref-html>
<ref-html id="bib1.bib51"><label>Kärnä et al.(2015)Krn, Baptista, Lopez, Turner, McNeil, and Sanford</label><mixed-citation>
Kärnä, T., Baptista, A. M., Lopez, J. ., Turner, P. J., McNeil, C., and
Sanford, T. B.: Numerical modeling of circulation in high-energy estuaries: A
Columbia River estuary benchmark, Ocean Model., 88, 54–71, <a href="https://doi.org/10.1016/j.ocemod.2015.01.001" target="_blank">https://doi.org/10.1016/j.ocemod.2015.01.001</a>, 2015.
</mixed-citation></ref-html>
<ref-html id="bib1.bib52"><label>Kuzmin(2010)</label><mixed-citation>
Kuzmin, D.: A vertex-based hierarchical slope limiter for hp-adaptive
discontinuous Galerkin methods, J. Comput. Appl. Math., 233, 3077–3085,
<a href="https://doi.org/10.1016/j.cam.2009.05.028" target="_blank">https://doi.org/10.1016/j.cam.2009.05.028</a>, 2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib53"><label>Legg et al.(2006)Legg, Hallberg, and Girton</label><mixed-citation>
Legg, S., Hallberg, R. W., and Girton, J. B.: Comparison of entrainment in
overflows simulated by <i>z</i>-coordinate, isopycnal and non-hydrostatic models,
Ocean Model., 11, 69–97, <a href="https://doi.org/10.1016/j.ocemod.2004.11.006" target="_blank">https://doi.org/10.1016/j.ocemod.2004.11.006</a>, 2006.
</mixed-citation></ref-html>
<ref-html id="bib1.bib54"><label>Luettich and Westerink(2004)</label><mixed-citation>
Luettich, R. A. and Westerink, J. J.: Formulation and numerical implementation
of the 2D/3D ADCIRC finite element model version 44. XX, University of Notre
Dame, Notre Dame, Illinois, 2004.
</mixed-citation></ref-html>
<ref-html id="bib1.bib55"><label>Luporini et al.(2017)Luporini, Ham, and Kelly</label><mixed-citation>
Luporini, F., Ham, D. A., and Kelly, P. H. J.: An Algorithm for the Optimization
of Finite Element Integration Loops, ACM Trans. Math. Softw., 44, 3:1–3:26,
<a href="https://doi.org/10.1145/3054944" target="_blank">https://doi.org/10.1145/3054944</a>, 2017.
</mixed-citation></ref-html>
<ref-html id="bib1.bib56"><label>Mahadevan(2006)</label><mixed-citation>
Mahadevan, A.: Modeling vertical motion at ocean fronts: Are nonhydrostatic
effects relevant at submesoscales?, Ocean Model., 14, 222–240, <a href="https://doi.org/10.1016/j.ocemod.2006.05.005" target="_blank">https://doi.org/10.1016/j.ocemod.2006.05.005</a>, 2006.
</mixed-citation></ref-html>
<ref-html id="bib1.bib57"><label>Marchesiello et al.(2009)Marchesiello, Debreu, and Couvelard</label><mixed-citation>
Marchesiello, P., Debreu, L., and Couvelard, X.: Spurious diapycnal mixing in
terrain-following coordinate models: The problem and a solution, Ocean Model.,
26, 156–169, <a href="https://doi.org/10.1016/j.ocemod.2008.09.004" target="_blank">https://doi.org/10.1016/j.ocemod.2008.09.004</a>, 2009.
</mixed-citation></ref-html>
<ref-html id="bib1.bib58"><label>Marshall et al.(1997a)Marshall, Adcroft, Hill, Perelman, and Heisey</label><mixed-citation>
Marshall, J., Adcroft, A., Hill, C., Perelman, L., and Heisey, C.: A finite-volume,
incompressible Navier Stokes model for studies of the ocean on parallel computers,
J. Geophys. Res., 102, 5753–5766, <a href="https://doi.org/10.1029/96JC02775" target="_blank">https://doi.org/10.1029/96JC02775</a>, 1997a.
</mixed-citation></ref-html>
<ref-html id="bib1.bib59"><label>Marshall et al.(1997b)Marshall, Hill, Perelman, and Adcroft</label><mixed-citation>
Marshall, J., Hill, C., Perelman, L., and Adcroft, A.: Hydrostatic, quasi-hydrostatic,
and nonhydrostatic ocean modeling, J. Geophys. Res., 102, 5733–5752,
<a href="https://doi.org/10.1029/96JC02776" target="_blank">https://doi.org/10.1029/96JC02776</a>, 1997b.
</mixed-citation></ref-html>
<ref-html id="bib1.bib60"><label>McRae and Cotter(2014)</label><mixed-citation>
McRae, A. T. T. and Cotter, C. J.: Energy- and enstrophy-conserving schemes
for the shallow-water equations, based on mimetic finite elements, Q. J. Roy.
Meteorol. Soc., 140, 2223–2234, <a href="https://doi.org/10.1002/qj.2291" target="_blank">https://doi.org/10.1002/qj.2291</a>, 2014.
</mixed-citation></ref-html>
<ref-html id="bib1.bib61"><label>McRae et al.(2016)McRae, Bercea, Mitchell, Ham, and Cotter</label><mixed-citation>
McRae, A. T. T., Bercea, G.-T., Mitchell, L., Ham, D. A., and Cotter, C. J.:
Automated generation and symbolic manipulation of tensor product finite elements,
SIAM J. Scient. Comput., 38, S25–S47, <a href="https://doi.org/10.1137/15M1021167" target="_blank">https://doi.org/10.1137/15M1021167</a>, 2016.
</mixed-citation></ref-html>
<ref-html id="bib1.bib62"><label>Meurer et al.(2017)Meurer, Smith, Paprocki, ert, Kirpichev,
Rocklin, Kumar, Ivanov, Moore, Singh, Rathnayake, Vig, Granger, Muller,
Bonazzi, Gupta, Vats, Johansson, Pedregosa, Curry, Terrel, Roučka, Saboo,
Fernando, Kulal, Cimrman, and Scopatz</label><mixed-citation>
Meurer, A., Smith, C. P., Paprocki, M., Čertík, O., Kirpichev, S. B.,
Rocklin, M., Kumar, A., Ivanov, S., Moore, J. K., Singh, S., Rathnayake, T.,
Vig, S., Granger, B. E., Muller, R. P., Bonazzi, F., Gupta, H., Vats, S.,
Johansson, F., Pedregosa, F., Curry, M. J., Terrel, A. R., Roučka, S.,
Saboo, A., Fernando, I., Kulal, S., Cimrman, R., and Scopatz, A.: SymPy:
symbolic computing in Python, PeerJ Comp. Sci., 3, e103, <a href="https://doi.org/10.7717/peerj-cs.103" target="_blank">https://doi.org/10.7717/peerj-cs.103</a>, 2017.
</mixed-citation></ref-html>
<ref-html id="bib1.bib63"><label>Pacanowski and Philander(1981)</label><mixed-citation>
Pacanowski, R. C. and Philander, S. G. H.: Parameterization of vertical mixing
in numerical models of tropical oceans, J. Phys. Oceanogr., 11, 1443–1451,
<a href="https://doi.org/10.1175/1520-0485(1981)011&lt;1443:POVMIN&gt;2.0.CO;2" target="_blank">https://doi.org/10.1175/1520-0485(1981)011&lt;1443:POVMIN&gt;2.0.CO;2</a>, 1981.
</mixed-citation></ref-html>
<ref-html id="bib1.bib64"><label>Pestiaux et al.(2014)Pestiaux, Melchior, Remacle, Krn, Fichefet,
and Lambrechts</label><mixed-citation>
Pestiaux, A., Melchior, S., Remacle, J., Kärnä, T., Fichefet, T., and
Lambrechts, J.: Discontinuous Galerkin finite element discretization of a
strongly anisotropic diffusion operator, Int. J. Numer. Meth. Fluids, 75,
365–384, <a href="https://doi.org/10.1002/fld.3900" target="_blank">https://doi.org/10.1002/fld.3900</a>, 2014.
</mixed-citation></ref-html>
<ref-html id="bib1.bib65"><label>Petersen et al.(2015)Petersen, Jacobsen, Ringler, Hecht, and Maltrud</label><mixed-citation>
Petersen, M. R., Jacobsen, D. W., Ringler, T. D., Hecht, M. W., and Maltrud, M.
E.: Evaluation of the arbitrary Lagrangian–Eulerian vertical coordinate
method in the MPAS-Ocean model, Ocean Model., 86, 93–113, <a href="https://doi.org/10.1016/j.ocemod.2014.12.004" target="_blank">https://doi.org/10.1016/j.ocemod.2014.12.004</a>, 2015.
</mixed-citation></ref-html>
<ref-html id="bib1.bib66"><label>Piggott et al.(2008)Piggott, Gorman, Pain, Allison, Candy, Martin, and Wells</label><mixed-citation>
Piggott, M. D., Gorman, G. J., Pain, C. C., Allison, P. A., Candy, A. S., Martin,
B. T., and Wells, M. R.: A new computational framework for multi-scale ocean
modelling based on adapting unstructured meshes, Int. J. Numer. Meth. Fluids,
56, 1003–1015, <a href="https://doi.org/10.1002/fld.1663" target="_blank">https://doi.org/10.1002/fld.1663</a>, 2008.
</mixed-citation></ref-html>
<ref-html id="bib1.bib67"><label>Piggott et al.(2013)Piggott, Pain, Gorman, Marshall, and Killworth</label><mixed-citation>
Piggott, M. D., Pain, C. C., Gorman, G. J., Marshall, D. P., and Killworth, P.
D.: Unstructured Adaptive Meshes for Ocean Modeling, in: Ocean Modeling in an
Eddying Regime, American Geophysical Union, Washington, D.C., 383–408, <a href="https://doi.org/10.1029/177GM22" target="_blank">https://doi.org/10.1029/177GM22</a>, 2013.
</mixed-citation></ref-html>
<ref-html id="bib1.bib68"><label>Ralston et al.(2017)Ralston, Cowles, Geyer, and Holleman</label><mixed-citation>
Ralston, D. K., Cowles, G. W., Geyer, W. R., and Holleman, R. C.: Turbulent
and numerical mixing in a salt wedge estuary: Dependence on grid resolution,
bottom roughness, and turbulence closure, J. Geophys. Res.-Oceans, 122, 692–712,
<a href="https://doi.org/10.1002/2016JC011738" target="_blank">https://doi.org/10.1002/2016JC011738</a>, 2017.
</mixed-citation></ref-html>
<ref-html id="bib1.bib69"><label>Rathgeber et al.(2016)Rathgeber, Ham, Mitchell, Lange, Luporini,
McRae, Bercea, Markall, and Kelly</label><mixed-citation>
Rathgeber, F., Ham, D. A., Mitchell, L., Lange, M., Luporini, F., McRae, A.
T. T., Bercea, G.-T., Markall, G. R., and Kelly, P. H. J.: Firedrake: automating
the finite element method by composing abstractions, ACM Trans. Math. Soft.,
43, 24:1–24:27, <a href="https://doi.org/10.1145/2998441" target="_blank">https://doi.org/10.1145/2998441</a>, 2016.
</mixed-citation></ref-html>
<ref-html id="bib1.bib70"><label>Rennau and Burchard(2009)</label><mixed-citation>
Rennau, H. and Burchard, H.: Quantitative analysis of numerically induced
mixing in a coastal model application, Ocean Dynam., 59, 671–687, <a href="https://doi.org/10.1007/s10236-009-0201-x" target="_blank">https://doi.org/10.1007/s10236-009-0201-x</a>, 2009.
</mixed-citation></ref-html>
<ref-html id="bib1.bib71"><label>Ringler et al.(2013)Ringler, Petersen, Higdon, Jacobsen, Jones, and Maltrud</label><mixed-citation>
Ringler, T., Petersen, M., Higdon, R. L., Jacobsen, D., Jones, P. W., and
Maltrud, M.: A multi-resolution approach to global ocean modeling, Ocean Model.,
69, 211–232, <a href="https://doi.org/10.1016/j.ocemod.2013.04.010" target="_blank">https://doi.org/10.1016/j.ocemod.2013.04.010</a>, 2013.
</mixed-citation></ref-html>
<ref-html id="bib1.bib72"><label>Salari and Knupp(2000)</label><mixed-citation>
Salari, K. and Knupp, P.: Code Verification by the Method of Manufactured
Solutions, Sandia National Laboratories, Albuquerque, New Mexico, <a href="https://doi.org/10.2172/759450" target="_blank">https://doi.org/10.2172/759450</a>, 2000.
</mixed-citation></ref-html>
<ref-html id="bib1.bib73"><label>Shchepetkin and McWilliams(1998)</label><mixed-citation>
Shchepetkin, A. F. and McWilliams, J. C.: Quasi-Monotone Advection Schemes
Based on Explicit Locally Adaptive Dissipation, Mon. Weather Rev., 126, 1541–1580,
<a href="https://doi.org/10.1175/1520-0493(1998)126&lt;1541:QMASBO&gt;2.0.CO;2" target="_blank">https://doi.org/10.1175/1520-0493(1998)126&lt;1541:QMASBO&gt;2.0.CO;2</a>, 1998.
</mixed-citation></ref-html>
<ref-html id="bib1.bib74"><label>Shchepetkin and McWilliams(2003)</label><mixed-citation>
Shchepetkin, A. F. and McWilliams, J. C.: A method for computing horizontal
pressure-gradient force in an oceanic model with a nonaligned vertical coordinate,
J. Geophys. Res.-Oceans, 108, 35:1–35:34, <a href="https://doi.org/10.1029/2001JC001047" target="_blank">https://doi.org/10.1029/2001JC001047</a>, 2003.
</mixed-citation></ref-html>
<ref-html id="bib1.bib75"><label>Shchepetkin and McWilliams(2005)</label><mixed-citation>
Shchepetkin, A. F. and McWilliams, J. C.: The regional oceanic modeling system (ROMS):
a split-explicit, free-surface, topography-following-coordinate oceanic model,
Ocean Model., 9, 347–404, <a href="https://doi.org/10.1016/j.ocemod.2004.08.002" target="_blank">https://doi.org/10.1016/j.ocemod.2004.08.002</a>, 2005.
</mixed-citation></ref-html>
<ref-html id="bib1.bib76"><label>Shi et al.(2017)Shi, Chickadel, Hsu, Kirby, Farquharson, and Ma</label><mixed-citation>
Shi, F., Chickadel, C. C., Hsu, T.-J., Kirby, J. T., Farquharson, G., and Ma,
G.: High-Resolution Non-Hydrostatic Modeling of Frontal Features in the Mouth
of the Columbia River, Estuar. Coasts, 40, 296–309, <a href="https://doi.org/10.1007/s12237-016-0132-y" target="_blank">https://doi.org/10.1007/s12237-016-0132-y</a>, 2017.
</mixed-citation></ref-html>
<ref-html id="bib1.bib77"><label>Shu(1988)</label><mixed-citation>
Shu, C.-W.: Total-Variation-Diminishing Time Discretizations, SIAM J. Scient.
Stat. Comput. 9, 1073–1084, <a href="https://doi.org/10.1137/0909073" target="_blank">https://doi.org/10.1137/0909073</a>, 1988.
</mixed-citation></ref-html>
<ref-html id="bib1.bib78"><label>Shu and Osher(1988)</label><mixed-citation>
Shu, C.-W. and Osher, S.: Efficient implementation of essentially non-oscillatory
shock-capturing schemes, J. Comput. Phys., 77, 439–471, <a href="https://doi.org/10.1016/0021-9991(88)90177-5" target="_blank">https://doi.org/10.1016/0021-9991(88)90177-5</a>, 1988.
</mixed-citation></ref-html>
<ref-html id="bib1.bib79"><label>Song and Haidvogel(1994)</label><mixed-citation>
Song, Y. and Haidvogel, D.: A Semi-implicit Ocean Circulation Model Using a
Generalized Topography-Following Coordinate System, J. Comput. Phys., 115,
228–244, <a href="https://doi.org/10.1006/jcph.1994.1189" target="_blank">https://doi.org/10.1006/jcph.1994.1189</a>, 1994.
</mixed-citation></ref-html>
<ref-html id="bib1.bib80"><label>Wang(1984)</label><mixed-citation>
Wang, D.-P.: Mutual intrusion of a gravity current and density front formation,
J. Phys. Oceanogr., 14, 1191–1199, <a href="https://doi.org/10.1175/1520-0485(1984)014&lt;1191:MIOAGC&gt;2.0.CO;2" target="_blank">https://doi.org/10.1175/1520-0485(1984)014&lt;1191:MIOAGC&gt;2.0.CO;2</a>, 1984.
</mixed-citation></ref-html>
<ref-html id="bib1.bib81"><label>Wang et al.(2008a)Wang, Danilov, and Schrter</label><mixed-citation>
Wang, Q., Danilov, S., and Schröter, J.: Finite element ocean circulation
model based on triangular prismatic elements, with application in studying the
effect of topography representation, J. Geophys. Res.-Oceans, 113, 1–21,
<a href="https://doi.org/10.1029/2007JC004482" target="_blank">https://doi.org/10.1029/2007JC004482</a>, 2008a.
</mixed-citation></ref-html>
<ref-html id="bib1.bib82"><label>Wang et al.(2008b)Wang, Danilov, and Schrter</label><mixed-citation>
Wang, Q., Danilov, S., and Schröer, J.: Comparison of overflow simulations
on different vertical grids using the Finite Element Ocean circulation Model,
Ocean Model., 20, 313–335, <a href="https://doi.org/10.1016/j.ocemod.2007.10.005" target="_blank">https://doi.org/10.1016/j.ocemod.2007.10.005</a>, 2008b.
</mixed-citation></ref-html>
<ref-html id="bib1.bib83"><label>Wang et al.(2014)Wang, Danilov, Sidorenko, Timmermann, Wekerle, Wang,
Jung, and Schrter</label><mixed-citation>
Wang, Q., Danilov, S., Sidorenko, D., Timmermann, R., Wekerle, C., Wang, X.,
Jung, T., and Schröter, J.: The Finite Element Sea Ice-Ocean Model (FESOM)
v.1.4: formulation of an ocean general circulation model, Geosci. Model Dev.,
7, 663–693, <a href="https://doi.org/10.5194/gmd-7-663-2014" target="_blank">https://doi.org/10.5194/gmd-7-663-2014</a>, 2014.

</mixed-citation></ref-html>
<ref-html id="bib1.bib84"><label>White et al.(2008a)White, Deleersnijder, and Legat</label><mixed-citation>
White, L., Deleersnijder, E., and Legat, V.: A three-dimensional unstructured
mesh finite element shallow-water model, with application to the flows around
an island and in a wind-driven, elongated basin, Ocean Model., 22, 26–47, 2008a.
</mixed-citation></ref-html>
<ref-html id="bib1.bib85"><label>White et al.(2008b)White, Legat, and Deleersnijder</label><mixed-citation>
White, L., Legat, V., and Deleersnijder, E.: Tracer Conservation for
Three-Dimensional, Finite-Element, Free-Surface, Ocean Modeling on Moving
Prismatic Meshes, Mon. Weather Rev., 136, 420–442, <a href="https://doi.org/10.1175/2007MWR2137.1" target="_blank">https://doi.org/10.1175/2007MWR2137.1</a>, 2008b.
</mixed-citation></ref-html>
<ref-html id="bib1.bib86"><label>zenodo/Firedrake(2018)</label><mixed-citation>
zenodo/Firedrake: Software used in `Thetis coastal ocean model: discontinuous
Galerkin discretization for the three-dimensional hydrostatic equations',
<a href="https://doi.org/10.5281/zenodo.1407898" target="_blank">https://doi.org/10.5281/zenodo.1407898</a>, 2018.
</mixed-citation></ref-html>
<ref-html id="bib1.bib87"><label>zenodo/Thetis(2018)</label><mixed-citation>
zenodo/Thetis: The Thetis coastal ocean model, <a href="https://doi.org/10.5281/zenodo.1407181" target="_blank">https://doi.org/10.5281/zenodo.1407181</a>, 2018.
</mixed-citation></ref-html>
<ref-html id="bib1.bib88"><label>Zhang and Baptista(2008)</label><mixed-citation>
Zhang, Y. and Baptista, A. M.: SELFE: A semi-implicit Eulerian–Lagrangian
finite-element model for cross-scale ocean circulation, Ocean Model., 21,
71–96, <a href="https://doi.org/10.1016/j.ocemod.2007.11.005" target="_blank">https://doi.org/10.1016/j.ocemod.2007.11.005</a>, 2008.
</mixed-citation></ref-html>
<ref-html id="bib1.bib89"><label>Zhang et al.(2016)Zhang, Ye, Stanev, and Grashorn</label><mixed-citation>
Zhang, Y. J., Ye, F., Stanev, E. V., and Grashorn, S.: Seamless cross-scale
modeling with SCHISM, Ocean Model., 102, 64–81, <a href="https://doi.org/10.1016/j.ocemod.2016.05.002" target="_blank">https://doi.org/10.1016/j.ocemod.2016.05.002</a>, 2016.
</mixed-citation></ref-html>--></article>
