<?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-12-1009-2019</article-id><title-group><article-title>FESOM-C v.2: coastal dynamics on hybrid unstructured meshes</article-title><alt-title>FESOM-C: coastal dynamics on hybrid meshes</alt-title>
      </title-group><?xmltex \runningtitle{FESOM-C: coastal dynamics on hybrid meshes}?><?xmltex \runningauthor{A.~Androsov et al.}?>
      <contrib-group>
        <contrib contrib-type="author" corresp="yes" rid="aff1 aff3">
          <name><surname>Androsov</surname><given-names>Alexey</given-names></name>
          <email>alexey.androsov@awi.de</email>
        </contrib>
        <contrib contrib-type="author" corresp="no" rid="aff1">
          <name><surname>Fofonova</surname><given-names>Vera</given-names></name>
          
        <ext-link>https://orcid.org/0000-0002-5956-1844</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff1">
          <name><surname>Kuznetsov</surname><given-names>Ivan</given-names></name>
          
        <ext-link>https://orcid.org/0000-0001-5910-8081</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff1 aff4 aff5">
          <name><surname>Danilov</surname><given-names>Sergey</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" corresp="no" rid="aff1">
          <name><surname>Rakowsky</surname><given-names>Natalja</given-names></name>
          
        <ext-link>https://orcid.org/0000-0001-6101-0526</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff1">
          <name><surname>Harig</surname><given-names>Sven</given-names></name>
          
        <ext-link>https://orcid.org/0000-0001-6948-7409</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff2">
          <name><surname>Brix</surname><given-names>Holger</given-names></name>
          
        <ext-link>https://orcid.org/0000-0003-4229-6164</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff1">
          <name><surname>Wiltshire</surname><given-names>Karen Helen</given-names></name>
          
        </contrib>
        <aff id="aff1"><label>1</label><institution>Alfred Wegener Institute for Polar and Marine Research, Bremerhaven, Germany</institution>
        </aff>
        <aff id="aff2"><label>2</label><institution>Institute of Coastal Research, Helmholtz-Zentrum Geesthacht, Geesthacht, Germany</institution>
        </aff>
        <aff id="aff3"><label>3</label><institution>Shirshov Institute of Oceanology RAS, Moscow, Russia</institution>
        </aff>
        <aff id="aff4"><label>4</label><institution>A. M. Obukhov Institute of Atmospheric Physics RAS, Moscow, Russia</institution>
        </aff>
        <aff id="aff5"><label>5</label><institution>Jacobs University, Bremen, Germany</institution>
        </aff>
      </contrib-group>
      <author-notes><corresp id="corr1">Alexey Androsov (alexey.androsov@awi.de)</corresp></author-notes><pub-date><day>21</day><month>March</month><year>2019</year></pub-date>
      
      <volume>12</volume>
      <issue>3</issue>
      <fpage>1009</fpage><lpage>1028</lpage>
      <history>
        <date date-type="received"><day>23</day><month>April</month><year>2018</year></date>
           <date date-type="rev-request"><day>25</day><month>July</month><year>2018</year></date>
           <date date-type="rev-recd"><day>8</day><month>December</month><year>2018</year></date>
           <date date-type="accepted"><day>15</day><month>February</month><year>2019</year></date>
      </history>
      <permissions>
        <copyright-statement>Copyright: © 2019 Alexey Androsov et al.</copyright-statement>
        <copyright-year>2019</copyright-year>
      <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/12/1009/2019/gmd-12-1009-2019.html">This article is available from https://gmd.copernicus.org/articles/12/1009/2019/gmd-12-1009-2019.html</self-uri><self-uri xlink:href="https://gmd.copernicus.org/articles/12/1009/2019/gmd-12-1009-2019.pdf">The full text article is available as a PDF file from https://gmd.copernicus.org/articles/12/1009/2019/gmd-12-1009-2019.pdf</self-uri>
      <abstract><title>Abstract</title>
    <p id="d1e172">We describe FESOM-C, the
coastal branch of the Finite-volumE Sea ice – Ocean Model (FESOM2), which
shares with FESOM2 many numerical aspects, in particular its finite-volume
cell-vertex discretization. Its dynamical core differs in the implementation
of time stepping, the use of a terrain-following vertical coordinate, and the
formulation for hybrid meshes composed of triangles and quads. The first two
distinctions were critical for coding FESOM-C as an independent branch. The
hybrid mesh capability improves numerical efficiency, since quadrilateral
cells have fewer edges than triangular cells. They do not suffer from
spurious inertial modes of the triangular cell-vertex discretization and need
less dissipation. The hybrid mesh capability allows one to use
quasi-quadrilateral unstructured meshes, with triangular cells included only
to join quadrilateral patches of different resolution or instead of strongly
deformed quadrilateral cells. The description of the model numerical part is
complemented by test cases illustrating the model performance.</p>
  </abstract>
    </article-meta>
  </front>
<body>
      

<sec id="Ch1.S1" sec-type="intro">
  <title>Introduction</title>
      <p id="d1e182">Many practical problems in oceanography require regional focus
on coastal dynamics. Although global ocean circulation models formulated on
unstructured meshes may in principle provide local refinement, such models
are as a rule based on assumptions that are not necessarily valid in coastal
areas. The limitations on dynamics coming from the need to resolve thin
layers, maintain stability for sea surface elevations comparable to water
layer thickness, or simulate the processes of wetting and drying make the
numerical approaches traditionally used in coastal models different from
those used in large-scale models. For this reason, combining coastal and
large-scale functionality in a single unstructured-mesh model, although
possible, would still imply a combination of different algorithms and
physical parameterizations. Furthermore, on unstructured meshes, the numerical
stability of open boundaries, needed in regional configurations, sometimes
requires masking certain terms in motion equations close to open boundaries.
This would be an unnecessary complication for a large-scale unstructured-mesh
model that is as a rule global.</p>
      <p id="d1e185">The main goal of the development described in this paper was to design a
tool, dubbed FESOM-C, that is close to FESOM2 <xref ref-type="bibr" rid="bib1.bibx16" id="paren.1"/> in its basic
principles, but can be used as a coastal model. Its routines handling the
mesh infrastructure are derived from FESOM2. However, the time stepping,
vertical discretization, and particular algorithms, detailed below, are
different. FESOM-C relies on a terrain-following vertical coordinate (vs. the
arbitrary Lagrangian–Eulerian (ALE) vertical coordinate of FESOM2), but
takes
a step further with respect to the mesh structure. It is designed to work on
hybrid meshes composed of triangles and quads. Some decisions, such as the lack of the ALE at the present stage, are only motivated by the
desire to keep the code as simple as possible through the initial phase of
its development and maintenance. The code is based on the cell-vertex
finite-volume discretization, the same as FESOM2 <xref ref-type="bibr" rid="bib1.bibx16" id="paren.2"/> and FVCOM
<xref ref-type="bibr" rid="bib1.bibx12" id="paren.3"/>. It places scalar<?pagebreak page1010?> quantities at mesh vertices and the
horizontal velocities at cell centroids.</p>
      <p id="d1e197">Our special focus is on using hybrid meshes. In essence, the capability of
hybrid meshes is built on the finite-volume method. Indeed, computations of
fluxes are commonly implemented as cycles over edges, and the edge-based
infrastructure is immune to the polygonal type of mesh cells. However,
because of staggering, it is still convenient to keep some computations on
cells, which then depend on the cell type. Furthermore, high-order transport
algorithms might also be sensitive to the cell geometry. We limit the allowed
polygons to triangles and quads. Although there is no principal limitation on
the polygon type, triangles and quads are versatile enough in practice for
the cell-vertex discretization. Our motivation for using quads is twofold
<xref ref-type="bibr" rid="bib1.bibx15" id="paren.4"/>. First, quadrilateral meshes have 1.5 times fewer
edges than triangular meshes, which speeds up computations because cycles
over edges become shorter. The second reason is the intrinsic problem of the
triangular cell-vertex discretization – the presence of spurious inertial
modes (see, e.g., <xref ref-type="bibr" rid="bib1.bibx29" id="altparen.5"/>) and decoupling between the nearest
horizontal velocities. Although both can be controlled by lateral viscosity,
the control leads to higher viscous dissipation over the triangular portions
of the mesh. The hybrid meshes can be designed so that triangular cells are
included only to optimally match the resolution or are even absent altogether.
For example, FESOM-C can be run on curvilinear meshes combining smooth
changes in the shape of quadrilateral cells with smoothly approximated
coastlines. One can also think of meshes for which triangular patches are only
used to provide transitions between quadrilateral parts of different
resolution, implementing an effective nesting approach.</p>
      <p id="d1e206">Many unstructured-mesh coastal ocean models were proposed recently
<xref ref-type="bibr" rid="bib1.bibx10 bib1.bibx12 bib1.bibx20 bib1.bibx56 bib1.bibx57" id="paren.6"><named-content content-type="pre">e.g.,</named-content></xref>. It will take some
time for FESOM-C to catch up in terms of functionality. The decision on
the development of FESOM-C was largely motivated by the desire to fit in the
existing modeling infrastructure (mesh design, analysis tools, input–output
organization), and not by any deficiency in existing models. The real workload was
substantially reduced through the use or modification of the
existing FESOM2 routines.</p>
      <p id="d1e215">We formulate the main equations and their discretization in the three
following sections. Section <xref ref-type="sec" rid="Ch1.S5"/> presents results of test
simulations, followed by a discussion and conclusions.</p>
</sec>
<sec id="Ch1.S2">
  <title>Model formulation</title>
<sec id="Ch1.S2.SS1">
  <title>The governing equations</title>
      <p id="d1e231">We solve standard primitive equations in the Boussinesq, hydrostatic, and
traditional approximations (see, e.g., <xref ref-type="bibr" rid="bib1.bibx33" id="altparen.7"/>). The
solution is sought in the domain <inline-formula><mml:math id="M1" display="inline"><mml:mrow><mml:mover accent="true"><mml:mi>Q</mml:mi><mml:mo stretchy="true" mathvariant="normal">^</mml:mo></mml:mover><mml:mo>=</mml:mo><mml:mi>Q</mml:mi><mml:mo>×</mml:mo><mml:mo>[</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>,</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi mathvariant="normal">f</mml:mi></mml:msub><mml:mo>]</mml:mo></mml:mrow></mml:math></inline-formula>,
where <inline-formula><mml:math id="M2" display="inline"><mml:mrow><mml:msub><mml:mi>t</mml:mi><mml:mi mathvariant="normal">f</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the time interval. The boundary <inline-formula><mml:math id="M3" display="inline"><mml:mrow><mml:mo>∂</mml:mo><mml:mi>Q</mml:mi></mml:mrow></mml:math></inline-formula> of
domain <inline-formula><mml:math id="M4" display="inline"><mml:mi>Q</mml:mi></mml:math></inline-formula> is formed by the free water surface, the bottom boundaries, and
lateral boundaries composed of the solid part <inline-formula><mml:math id="M5" display="inline"><mml:mrow><mml:mo>∂</mml:mo><mml:msub><mml:mi>Q</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> and the open
boundary <inline-formula><mml:math id="M6" display="inline"><mml:mrow><mml:mo>∂</mml:mo><mml:msub><mml:mi>Q</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M7" display="inline"><mml:mrow><mml:mi>Q</mml:mi><mml:mo>=</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>y</mml:mi><mml:mo>,</mml:mo><mml:mi>z</mml:mi><mml:mo>;</mml:mo><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>y</mml:mi><mml:mo>∈</mml:mo><mml:mi mathvariant="normal">Ω</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:mo>,</mml:mo><mml:mi>y</mml:mi><mml:mo>)</mml:mo><mml:mo>≤</mml:mo><mml:mi>z</mml:mi><mml:mo>&lt;</mml:mo><mml:mi mathvariant="italic">ζ</mml:mi><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>y</mml:mi><mml:mo>,</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M8" display="inline"><mml:mrow><mml:mn mathvariant="normal">0</mml:mn><mml:mo>≤</mml:mo><mml:mi>t</mml:mi><mml:mo>≤</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi mathvariant="normal">f</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>. Here <inline-formula><mml:math id="M9" display="inline"><mml:mi mathvariant="italic">ζ</mml:mi></mml:math></inline-formula> is the surface
elevation and <inline-formula><mml:math id="M10" display="inline"><mml:mi>h</mml:mi></mml:math></inline-formula> the bottom topography. We seek the vector of
unknown <inline-formula><mml:math id="M11" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">q</mml:mi><mml:mo>=</mml:mo><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: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:mrow></mml:math></inline-formula>, where <inline-formula><mml:math id="M12" 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:mo>,</mml:mo><mml:mi>v</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> is the horizontal velocity, <inline-formula><mml:math id="M13" display="inline"><mml:mi>w</mml:mi></mml:math></inline-formula> the vertical
velocity, <inline-formula><mml:math id="M14" display="inline"><mml:mi>T</mml:mi></mml:math></inline-formula> the potential temperature, and <inline-formula><mml:math id="M15" display="inline"><mml:mi>S</mml:mi></mml:math></inline-formula> the salinity, satisfying the
equations

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M16" display="block"><mml:mtable displaystyle="true"><mml:mtr><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:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mo>∂</mml:mo><mml:mrow><mml:mo>∂</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:msub><mml:mi>u</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>)</mml:mo><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:mo>(</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>w</mml:mi><mml:mo>)</mml:mo><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:mi mathvariant="normal">∇</mml:mi><mml:mi>p</mml:mi><mml:mo>+</mml:mo><mml:mi>f</mml:mi><mml:mi mathvariant="bold-italic">k</mml:mi><mml:mo>×</mml:mo><mml:mi mathvariant="bold-italic">u</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 class="stylechange" displaystyle="true"/><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mspace linebreak="nobreak" width="0.25em"/><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: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:mo>+</mml:mo><mml:mi mathvariant="normal">∇</mml:mi><mml:mo>⋅</mml:mo><mml:mo>(</mml:mo><mml:mi>K</mml:mi><mml:mi mathvariant="normal">∇</mml:mi><mml:mo>)</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="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:mi mathvariant="normal">∇</mml:mi><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:mo>∂</mml:mo><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mi>w</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E3"><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>p</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:mo>-</mml:mo><mml:mi>g</mml:mi><mml:mi mathvariant="italic">ρ</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mtr><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:msub><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mo>∂</mml:mo><mml:mrow><mml:mo>∂</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>)</mml:mo><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:mo>(</mml:mo><mml:mi>w</mml:mi><mml:msub><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>)</mml:mo><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:msub><mml:mi mathvariant="italic">ϑ</mml:mi><mml:mi mathvariant="normal">Θ</mml:mi></mml:msub><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:msub><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle></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 displaystyle="true" class="stylechange"/><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mo>+</mml:mo><mml:mi mathvariant="normal">∇</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi>K</mml:mi><mml:mi mathvariant="normal">Θ</mml:mi></mml:msub><mml:mi mathvariant="normal">∇</mml:mi><mml:mo>)</mml:mo><mml:msub><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            Here <inline-formula><mml:math id="M17" display="inline"><mml:mrow><mml:mi>i</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:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M18" display="inline"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>=</mml:mo><mml:mi>x</mml:mi></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M19" display="inline"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub><mml:mo>=</mml:mo><mml:mi>y</mml:mi></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M20" display="inline"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>=</mml:mo><mml:mi>u</mml:mi></mml:mrow></mml:math></inline-formula>, and <inline-formula><mml:math id="M21" display="inline"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub><mml:mo>=</mml:mo><mml:mi>v</mml:mi></mml:mrow></mml:math></inline-formula>, and summation is
implied over the repeating indices <inline-formula><mml:math id="M22" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula>; <inline-formula><mml:math id="M23" display="inline"><mml:mi>p</mml:mi></mml:math></inline-formula> is the pressure; and <inline-formula><mml:math id="M24" display="inline"><mml:mrow><mml:mi>j</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:mrow></mml:math></inline-formula> with
<inline-formula><mml:math id="M25" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Θ</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>=</mml:mo><mml:mi>T</mml:mi></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M26" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Θ</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub><mml:mo>=</mml:mo><mml:mi>S</mml:mi></mml:mrow></mml:math></inline-formula> represents the potential temperature and
salinity, respectively. The seawater density is determined by the equation of
state <inline-formula><mml:math id="M27" display="inline"><mml:mrow><mml:mi mathvariant="italic">ρ</mml:mi><mml:mo>=</mml:mo><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:mi>p</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>, 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 the reference density; <inline-formula><mml:math id="M29" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula> is the
Coriolis parameter; <inline-formula><mml:math id="M30" display="inline"><mml:mi mathvariant="bold-italic">k</mml:mi></mml:math></inline-formula> is the vertical unit vector; <inline-formula><mml:math id="M31" display="inline"><mml:mi mathvariant="italic">ϑ</mml:mi></mml:math></inline-formula> and
<inline-formula><mml:math id="M32" display="inline"><mml:mi>K</mml:mi></mml:math></inline-formula> are the coefficients of vertical and horizontal turbulent momentum
exchange, respectively; <inline-formula><mml:math id="M33" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ϑ</mml:mi><mml:mi mathvariant="normal">Θ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M34" display="inline"><mml:mrow><mml:msub><mml:mi>K</mml:mi><mml:mi mathvariant="normal">Θ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> are the
respective diffusion coefficients; and <inline-formula><mml:math id="M35" display="inline"><mml:mi>g</mml:mi></mml:math></inline-formula> is the acceleration due to
gravity.</p>
      <p id="d1e1086">Writing

                <disp-formula id="Ch1.E5" content-type="numbered"><mml:math id="M36" display="block"><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mi mathvariant="italic">ρ</mml:mi><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>y</mml:mi><mml:mo>,</mml:mo><mml:mi>z</mml:mi><mml:mo>,</mml:mo><mml:mi>t</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:msup><mml:mi mathvariant="italic">ρ</mml:mi><mml:mo>′</mml:mo></mml:msup><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>y</mml:mi><mml:mo>,</mml:mo><mml:mi>z</mml:mi><mml:mo>,</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M37" 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 density fluctuation, we obtain, integrating
Eq. (<xref ref-type="disp-formula" rid="Ch1.E3"/>),

                <disp-formula id="Ch1.Ex3"><mml:math id="M38" display="block"><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mi>p</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mi>p</mml:mi><mml:mi mathvariant="normal">atm</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mi>z</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi></mml:munderover><mml:mi mathvariant="italic">ρ</mml:mi><mml:mi>g</mml:mi><mml:mi mathvariant="normal">d</mml:mi><mml:mi>z</mml:mi><mml:mo>=</mml:mo><mml:mi>g</mml:mi><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>(</mml:mo><mml:mi mathvariant="italic">ζ</mml:mi><mml:mo>-</mml:mo><mml:mi>z</mml:mi><mml:mo>)</mml:mo><mml:mo>+</mml:mo><mml:mi>g</mml:mi><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:mi>z</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M39" 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. The horizontal pressure
gradient is then expressed as the sum of barotropic, baroclinic, and
atmospheric pressure gradients:

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M40" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:msubsup><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mi mathvariant="normal">∇</mml:mi><mml:mi>p</mml:mi><mml:mo>=</mml:mo><mml:mi>g</mml:mi><mml:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi><mml:mo>+</mml:mo><mml:mi>g</mml:mi><mml:msubsup><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mi mathvariant="normal">∇</mml:mi><mml:mi>I</mml:mi><mml:mo>+</mml:mo><mml:msubsup><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mi mathvariant="normal">∇</mml:mi><mml:msub><mml:mi>p</mml:mi><mml:mi mathvariant="normal">atm</mml:mi></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr><mml:mlabeledtr id="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:mi>I</mml:mi><mml:mo>=</mml:mo><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:mi>z</mml:mi><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

            Note that horizontal derivatives here are taken at fixed <inline-formula><mml:math id="M41" display="inline"><mml:mi>z</mml:mi></mml:math></inline-formula>.</p>
</sec>
<?pagebreak page1011?><sec id="Ch1.S2.SS2">
  <title>Turbulent closures</title>
      <p id="d1e1369">The default scheme to compute the vertical viscosity and diffusivity in the
system of Eqs. (<xref ref-type="disp-formula" rid="Ch1.E1"/>)–(<xref ref-type="disp-formula" rid="Ch1.E4"/>) is based on the
Prandtl–Kolmogorov hypothesis of incomplete similarity. According to it, the
turbulent kinetic energy <inline-formula><mml:math id="M42" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula>, the coefficient of turbulent mixing
<inline-formula><mml:math id="M43" display="inline"><mml:mi mathvariant="italic">ϑ</mml:mi></mml:math></inline-formula>,
and dissipation of turbulent energy <inline-formula><mml:math id="M44" display="inline"><mml:mi mathvariant="italic">ε</mml:mi></mml:math></inline-formula> are connected as <inline-formula><mml:math id="M45" display="inline"><mml:mrow><mml:mi mathvariant="italic">ϑ</mml:mi><mml:mo>=</mml:mo><mml:mi>l</mml:mi><mml:msqrt><mml:mi>b</mml:mi></mml:msqrt></mml:mrow></mml:math></inline-formula>, where <inline-formula><mml:math id="M46" display="inline"><mml:mi>l</mml:mi></mml:math></inline-formula> is the scale of turbulence,
<inline-formula><mml:math id="M47" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ϑ</mml:mi><mml:mi mathvariant="normal">Θ</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>c</mml:mi><mml:mi mathvariant="italic">ρ</mml:mi></mml:msub><mml:mi mathvariant="italic">ϑ</mml:mi></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M48" display="inline"><mml:mrow><mml:mi mathvariant="italic">ε</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi>c</mml:mi><mml:mi mathvariant="italic">ε</mml:mi></mml:msub><mml:msup><mml:mi>b</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mo>/</mml:mo><mml:mi mathvariant="italic">ϑ</mml:mi></mml:mrow></mml:math></inline-formula>, and <inline-formula><mml:math id="M49" display="inline"><mml:mrow><mml:msub><mml:mi>c</mml:mi><mml:mi mathvariant="italic">ε</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0.046</mml:mn></mml:mrow></mml:math></inline-formula> <xref ref-type="bibr" rid="bib1.bibx11" id="paren.8"/>.
Prandtl's number <inline-formula><mml:math id="M50" display="inline"><mml:mrow><mml:msub><mml:mi>c</mml:mi><mml:mi mathvariant="italic">ρ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is commonly chosen as 0.1 and sets the
relationship between the coefficients of turbulent diffusion and viscosity.
The equation describing the balance of turbulent kinetic energy is obtained
by parameterizing the energy production and dissipation in the equation for
turbulent kinetic energy <inline-formula><mml:math id="M51" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula> as

                <disp-formula id="Ch1.E7" content-type="numbered"><mml:math id="M52" display="block"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi>b</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 mathvariant="italic">ϑ</mml:mi><mml:mfenced close=")" open="("><mml:mrow><mml:msup><mml:mfenced close="|" open="|"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mo>+</mml:mo><mml:msub><mml:mi>c</mml:mi><mml:mi mathvariant="italic">ρ</mml:mi></mml:msub><mml:mi>g</mml:mi><mml:msubsup><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><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:mo>+</mml:mo><mml:msub><mml:mi>c</mml:mi><mml:mi mathvariant="italic">ε</mml:mi></mml:msub><mml:msup><mml:mi>b</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mo>/</mml:mo><mml:mi mathvariant="italic">ϑ</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mi>b</mml:mi></mml:msub><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:mi mathvariant="italic">ϑ</mml:mi><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi>b</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:mrow></mml:math></disp-formula>

          with the boundary conditions

                <disp-formula specific-use="align"><mml:math id="M53" 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>b</mml:mi><mml:msub><mml:mo>|</mml:mo><mml:mi>h</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>B</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>|</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:msup><mml:mo>|</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mo>,</mml:mo></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:mi mathvariant="italic">ϑ</mml:mi><mml:msub><mml:mi>b</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:msub><mml:mo>|</mml:mo><mml:mi mathvariant="italic">ζ</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="italic">γ</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi></mml:msub><mml:msubsup><mml:mi>u</mml:mi><mml:mrow><mml:mo>*</mml:mo><mml:mi mathvariant="italic">ζ</mml:mi></mml:mrow><mml:mn mathvariant="normal">3</mml:mn></mml:msubsup><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>

            where <inline-formula><mml:math id="M54" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mi>b</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0.73</mml:mn></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M55" display="inline"><mml:mrow><mml:msub><mml:mi>B</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">16.6</mml:mn></mml:mrow></mml:math></inline-formula>, and <inline-formula><mml:math id="M56" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">γ</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0.4</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>;
<inline-formula><mml:math id="M57" display="inline"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mrow><mml:mo>*</mml:mo><mml:mi mathvariant="italic">ζ</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><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:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>/</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msup><mml:msub><mml:mi>u</mml:mi><mml:mo>*</mml:mo></mml:msub></mml:mrow></mml:math></inline-formula> is the dynamical velocity in
water near the surface, <inline-formula><mml:math id="M58" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mi mathvariant="normal">a</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> the air density, and <inline-formula><mml:math id="M59" display="inline"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mo>*</mml:mo></mml:msub></mml:mrow></mml:math></inline-formula> the dynamic
velocity of water on the interface between air and water.</p>
      <p id="d1e1809">Dissipative term is written as

                <disp-formula id="Ch1.Ex7"><mml:math id="M60" display="block"><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:msup><mml:mi>b</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mo>/</mml:mo><mml:mi mathvariant="italic">ϑ</mml:mi><mml:mo>=</mml:mo><mml:mfenced open="(" close=")"><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:msup><mml:mi>b</mml:mi><mml:mrow><mml:mi mathvariant="italic">ν</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:msup><mml:mi>b</mml:mi><mml:mi mathvariant="italic">ν</mml:mi></mml:msup><mml:mo>-</mml:mo><mml:mo>(</mml:mo><mml:msup><mml:mi>b</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:msup><mml:mo>)</mml:mo><mml:mi mathvariant="italic">ν</mml:mi></mml:msup></mml:mrow></mml:mfenced><mml:mo>/</mml:mo><mml:msup><mml:mi mathvariant="italic">ϑ</mml:mi><mml:mi mathvariant="italic">ν</mml:mi></mml:msup><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M61" display="inline"><mml:mi mathvariant="italic">ν</mml:mi></mml:math></inline-formula> is the index of iterations. Equation (<xref ref-type="disp-formula" rid="Ch1.E7"/>) is solved by
a three-point Thomas scheme in the vertical direction with the boundary
conditions given above. Iterations are carried out until convergence
determined by the condition

                <disp-formula id="Ch1.Ex8"><mml:math id="M62" display="block"><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mo movablelimits="false">max⁡</mml:mo><mml:mfenced close="|" open="|"><mml:mrow><mml:mfenced close=")" open="("><mml:mrow><mml:msup><mml:mi>b</mml:mi><mml:mrow><mml:mi mathvariant="italic">ν</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>b</mml:mi><mml:mi mathvariant="italic">ν</mml:mi></mml:msup></mml:mrow></mml:mfenced><mml:mo>/</mml:mo><mml:msup><mml:mi>b</mml:mi><mml:mi mathvariant="italic">ν</mml:mi></mml:msup></mml:mrow></mml:mfenced><mml:mo>&lt;</mml:mo><mml:mi mathvariant="italic">ϖ</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M63" display="inline"><mml:mi mathvariant="italic">ϖ</mml:mi></mml:math></inline-formula> is a small value <inline-formula><mml:math id="M64" display="inline"><mml:mrow><mml:mi>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">6</mml:mn></mml:mrow></mml:msup><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>. More details on the solution of
this equation are given in <xref ref-type="bibr" rid="bib1.bibx52" id="text.9"/>.</p>
      <p id="d1e1955">To determine the turbulence scale <inline-formula><mml:math id="M65" display="inline"><mml:mi>l</mml:mi></mml:math></inline-formula> in the presence of surface and bottom
boundary layers we use the Montgomery formula <xref ref-type="bibr" rid="bib1.bibx43" id="paren.10"/>:

                <disp-formula id="Ch1.Ex9"><mml:math id="M66" display="block"><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mi>l</mml:mi><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi mathvariant="italic">κ</mml:mi><mml:mi>H</mml:mi></mml:mfrac></mml:mstyle><mml:msub><mml:mi>Z</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:msub><mml:mi>Z</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M67" display="inline"><mml:mrow><mml:mi>H</mml:mi><mml:mo>=</mml:mo><mml:mi>h</mml:mi><mml:mo>+</mml:mo><mml:mi mathvariant="italic">ζ</mml:mi></mml:mrow></mml:math></inline-formula> is the full water depth, <inline-formula><mml:math id="M68" display="inline"><mml:mrow><mml:msub><mml:mi>Z</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mi>z</mml:mi><mml:mo>+</mml:mo><mml:mi>h</mml:mi><mml:mo>+</mml:mo><mml:msub><mml:mi>z</mml:mi><mml:mi>h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>,
<inline-formula><mml:math id="M69" display="inline"><mml:mrow><mml:msub><mml:mi>Z</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mi>z</mml:mi><mml:mo>+</mml:mo><mml:mi mathvariant="italic">ζ</mml:mi><mml:mo>+</mml:mo><mml:msub><mml:mi>z</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M70" display="inline"><mml:mrow><mml:mi mathvariant="italic">κ</mml:mi><mml:mo>≃</mml:mo><mml:mn mathvariant="normal">0.4</mml:mn></mml:mrow></mml:math></inline-formula> is the von Kármán
constant, <inline-formula><mml:math id="M71" display="inline"><mml:mi>z</mml:mi></mml:math></inline-formula> the layer depth, and <inline-formula><mml:math id="M72" display="inline"><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M73" display="inline"><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> are the roughness
parameters for the bottom and free surface, respectively. To remove turbulent
mixing in layers that are distant from interfaces we modify the Montgomery
formula by introducing the cutoff function <inline-formula><mml:math id="M74" display="inline"><mml:mrow><mml:msub><mml:mi>Z</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:msup><mml:mi>H</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msup><mml:msub><mml:mi>Z</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:msub><mml:mi>Z</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M75" display="inline"><mml:mrow><mml:mn mathvariant="normal">0</mml:mn><mml:mo>≤</mml:mo><mml:msub><mml:mi mathvariant="italic">β</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub><mml:mo>≤</mml:mo><mml:mn mathvariant="normal">4</mml:mn></mml:mrow></mml:math></inline-formula> <xref ref-type="bibr" rid="bib1.bibx51" id="paren.11"/>:

                <disp-formula id="Ch1.Ex10"><mml:math id="M76" display="block"><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mi>l</mml:mi><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi mathvariant="italic">κ</mml:mi><mml:mi>H</mml:mi></mml:mfrac></mml:mstyle><mml:msub><mml:mi>Z</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:msub><mml:mi>Z</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi></mml:msub><mml:msub><mml:mi>Z</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <p id="d1e2205">In addition to the default scheme, one may select a scheme provided by the
General Ocean Turbulence Model (GOTM) <xref ref-type="bibr" rid="bib1.bibx7" id="paren.12"/> implemented into the
FESOM-C code for computing vertical eddy viscosity and diffusion for momentum
and tracer equations. GOTM includes large number of well-tested turbulence
models with at least one member of every relevant model family (empirical
models, energy models, two-equation models, algebraic stress models,
K-profile parameterizations, etc.) and treats every single water column
independently. An essential part of GOTM includes one-point second-order
schemes <xref ref-type="bibr" rid="bib1.bibx48 bib1.bibx49 bib1.bibx50" id="paren.13"/>.</p>
</sec>
<sec id="Ch1.S2.SS3">
  <title>Bottom friction parameterization</title>
      <p id="d1e2220">The model uses either a constant bottom friction coefficient <inline-formula><mml:math id="M77" 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>,
or it is computed through the specified bottom roughness height <inline-formula><mml:math id="M78" display="inline"><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>. The
first option is preferable if the vertical resolution everywhere in the
domain does not resolve the logarithmic layer or when the vertically averaged
equations are solved. In the second option the bottom friction coefficient is
computed according to <xref ref-type="bibr" rid="bib1.bibx6" id="text.14"/> and has the following form:

                <disp-formula id="Ch1.Ex11"><mml:math id="M79" display="block"><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">d</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msup><mml:mfenced open="(" close=")"><mml:mrow><mml:mi>ln⁡</mml:mi><mml:mfenced open="(" close=")"><mml:mrow><mml:mfenced open="(" close=")"><mml:mrow><mml:mn mathvariant="normal">0.5</mml:mn><mml:msub><mml:mi>h</mml:mi><mml:mi mathvariant="normal">b</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>z</mml:mi><mml:mi>h</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mo>/</mml:mo><mml:msub><mml:mi>z</mml:mi><mml:mi>h</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mo>/</mml:mo><mml:mi mathvariant="italic">κ</mml:mi></mml:mrow></mml:mfenced><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></disp-formula>

          where <inline-formula><mml:math id="M80" display="inline"><mml:mrow><mml:msub><mml:mi>h</mml:mi><mml:mi mathvariant="normal">b</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the thickness of the bottom layer. It is also
possible to prescribe <inline-formula><mml:math id="M81" 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> or <inline-formula><mml:math id="M82" display="inline"><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> as a function of the horizontal
coordinate at the initialization step.</p>
</sec>
<sec id="Ch1.S2.SS4">
  <title>Boundary conditions</title>
      <p id="d1e2343">The boundary conditions for the dynamical Eqs. (<xref ref-type="disp-formula" rid="Ch1.E1"/>)–(<xref ref-type="disp-formula" rid="Ch1.E2"/>)
are those of no-slip on the solid boundary <inline-formula><mml:math id="M83" display="inline"><mml:mrow><mml:mo>∂</mml:mo><mml:msub><mml:mi>Q</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>,

                <disp-formula id="Ch1.Ex12"><mml:math id="M84" display="block"><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mfenced open="|" close=""><mml:msub><mml:mi/><mml:mrow><mml:mo>∂</mml:mo><mml:msub><mml:mi>Q</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:msub></mml:mfenced><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>

          As is well known, the formulation of open boundary conditions faces difficulties.
They are related to either the lack or incompleteness of information demanded
by the theory, for example on velocity components at the open boundary.
Furthermore, whatever the external information, it may contradict the
solution inside the computational domain, leading to instabilities that are
frequently expressed as small-scale vortex structures forming near the open
boundary. The procedure reconciling the external information with the
solution inside the domain becomes of paramount importance. We use two
approaches. The first one is to use a function whereby advection and
horizontal diffusion are smoothly tapered to zero in the close vicinity of
open boundary <inline-formula><mml:math id="M85" display="inline"><mml:mrow><mml:mo>∂</mml:mo><mml:msub><mml:mi>Q</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>. Such tapering makes the equations
quasi-hyperbolic at the open boundary so that the formulation of one
condition (for example, for the elevation, <inline-formula><mml:math id="M86" display="inline"><mml:mrow><mml:mi mathvariant="italic">ζ</mml:mi><mml:mfenced close="" open="|"><mml:msub><mml:mi/><mml:mrow><mml:mo>∂</mml:mo><mml:msub><mml:mi>Q</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:msub></mml:mfenced><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="italic">ζ</mml:mi><mml:mi mathvariant="normal">Γ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>) is possible <xref ref-type="bibr" rid="bib1.bibx1" id="paren.15"/>.</p>
      <p id="d1e2432">The other approach is to adapt the external information. It is applied to
scalar fields and will be explained further.</p>
      <?pagebreak page1012?><p id="d1e2435">Note that despite simplifications, barotropic and baroclinic perturbations
may still disagree at the open boundary, leading to instabilities in its
vicinity. In this case an additional buffer zone is introduced with locally
increased horizontal diffusion and bottom friction.</p>
      <p id="d1e2438">Dynamic boundary conditions on the top and bottom specify the momentum fluxes
entering the ocean. Neglecting the contributions from horizontal viscosities,
we write

                <disp-formula specific-use="align"><mml:math id="M87" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><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:mfenced close="" open="|"><mml:msub><mml:mi/><mml:mi mathvariant="italic">ζ</mml:mi></mml:msub></mml:mfenced><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi></mml:msub><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: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: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:mfenced close="" open="|"><mml:msub><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mi>h</mml:mi></mml:mrow></mml:msub></mml:mfenced><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mi>h</mml:mi></mml:msub><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>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>h</mml:mi></mml:msub><mml:mo>|</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>

            The first one sets the surface momentum flux to the wind stress at the
surface (<inline-formula><mml:math id="M88" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>), and the second one sets the bottom momentum flux
to the frictional flux at the bottom (<inline-formula><mml:math id="M89" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mi>h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>), with <inline-formula><mml:math id="M90" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> the
bottom velocity.</p>
      <p id="d1e2588">Now we turn to the boundary conditions for the scalar quantities obeying
Eq. (<xref ref-type="disp-formula" rid="Ch1.E4"/>). This is a three-dimensional parabolic equation and the
boundary conditions are determined by its leading (diffusive) terms. We
impose the no-flux condition on the solid boundary <inline-formula><mml:math id="M91" display="inline"><mml:mrow><mml:mo>∂</mml:mo><mml:msub><mml:mi>Q</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> and the
bottom <inline-formula><mml:math id="M92" display="inline"><mml:mrow><mml:mi>z</mml:mi><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mi>h</mml:mi></mml:mrow></mml:math></inline-formula>.</p>
      <p id="d1e2620">The conditions at the open boundary <inline-formula><mml:math id="M93" display="inline"><mml:mrow><mml:mo>∂</mml:mo><mml:msub><mml:mi>Q</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> are given for outflow and
inflow; see, e.g., <xref ref-type="bibr" rid="bib1.bibx2" id="text.16"/> and <xref ref-type="bibr" rid="bib1.bibx32" id="text.17"/>:

                <disp-formula id="Ch1.Ex15"><mml:math id="M94" display="block"><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:msub><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>a</mml:mi><mml:msub><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi>x</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>b</mml:mi><mml:msub><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi>y</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mi mathvariant="italic">τ</mml:mi></mml:mfrac></mml:mstyle><mml:mfenced open="(" close=")"><mml:mrow><mml:mi mathvariant="normal">Θ</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi mathvariant="normal">Γ</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M95" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi mathvariant="normal">Γ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the given field value, usually a climatological
one or relying on data from a global numerical model or observations. If the
phase velocity components and <inline-formula><mml:math id="M96" display="inline"><mml:mrow><mml:mi>a</mml:mi><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi>x</mml:mi></mml:msub><mml:mo>/</mml:mo><mml:mi>G</mml:mi></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M97" display="inline"><mml:mrow><mml:mi>b</mml:mi><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi>y</mml:mi></mml:msub><mml:mo>/</mml:mo><mml:mi>G</mml:mi></mml:mrow></mml:math></inline-formula>, and <inline-formula><mml:math id="M98" display="inline"><mml:mrow><mml:mi>G</mml:mi><mml:mo>=</mml:mo><mml:mo>[</mml:mo><mml:mo>(</mml:mo><mml:mo>∂</mml:mo><mml:mi mathvariant="normal">Θ</mml:mi><mml:mo>/</mml:mo><mml:mo>∂</mml:mo><mml:mi>x</mml:mi><mml:msup><mml:mo>)</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mo>+</mml:mo><mml:mo>(</mml:mo><mml:mo>∂</mml:mo><mml:mi mathvariant="normal">Θ</mml:mi><mml:mo>/</mml:mo><mml:mo>∂</mml:mo><mml:mi>y</mml:mi><mml:msup><mml:mo>)</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:msup><mml:mo>]</mml:mo><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> <xref ref-type="bibr" rid="bib1.bibx42" id="paren.18"/>, <inline-formula><mml:math id="M99" display="inline"><mml:mi mathvariant="normal">Θ</mml:mi></mml:math></inline-formula> propagates out of the domain,
and one sets <inline-formula><mml:math id="M100" 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:mrow></mml:math></inline-formula>. If it propagates into the domain, <inline-formula><mml:math id="M101" display="inline"><mml:mi>a</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M102" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula>
are set to zero and <inline-formula><mml:math id="M103" display="inline"><mml:mrow><mml:mi mathvariant="italic">τ</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mi mathvariant="normal">Γ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, with <inline-formula><mml:math id="M104" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mi mathvariant="normal">Γ</mml:mi></mml:msub><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>.
The parameter <inline-formula><mml:math id="M105" display="inline"><mml:mi mathvariant="italic">τ</mml:mi></mml:math></inline-formula> is determined experimentally and commonly is from hours
to days. In the FESOM-C such an adaptive boundary condition is routinely
applied for temperature and salinity, yet it can also be used for any
components of a solution.</p>
      <p id="d1e2897">At the surface the fluxes are due to the interaction with the atmosphere:

                <disp-formula specific-use="align" content-type="numbered"><mml:math id="M106" display="block"><mml:mtable displaystyle="true"><mml:mlabeledtr id="Ch1.E8"><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 mathvariant="italic">ϑ</mml:mi><mml:mi mathvariant="normal">Θ</mml:mi></mml:msub><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:mfenced open="|" close=""><mml:msub><mml:mi/><mml:mi mathvariant="italic">ζ</mml:mi></mml:msub></mml:mfenced><mml:mo>=</mml:mo><mml:mover accent="true"><mml:mi>Q</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>y</mml:mi><mml:mo>,</mml:mo><mml:mi>t</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:msub><mml:mi>c</mml:mi><mml:mi>p</mml:mi></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="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:msub><mml:mi mathvariant="italic">ϑ</mml:mi><mml:mi mathvariant="normal">Θ</mml:mi></mml:msub><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi>S</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mfenced open="|" close=""><mml:msub><mml:mi/><mml:mi mathvariant="italic">ζ</mml:mi></mml:msub></mml:mfenced><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>

            where <inline-formula><mml:math id="M107" display="inline"><mml:mover accent="true"><mml:mi>Q</mml:mi><mml:mo stretchy="false" mathvariant="normal">^</mml:mo></mml:mover></mml:math></inline-formula> is the heat flux excluding shortwave radiation, which has
been included as a volume heat source in the temperature equation, with <inline-formula><mml:math id="M108" display="inline"><mml:mrow><mml:msub><mml:mi>c</mml:mi><mml:mi>p</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>
the specific heat of seawater. The impact of the precipitation–evaporation
has been included as a volume source in the continuity equation. In the
presence of rivers, their discharge is added either as a prescribed inflow at
the open boundary in the river mouth or as volume sources of mass, heat, and
momentum distributed in the vicinity of the open boundary. In the first case
it might create an initial shock in elevation, so the second method is safer.</p>
</sec>
</sec>
<sec id="Ch1.S3">
  <title>Temporal discretization</title>
      <p id="d1e3034">As is common in coastal models, we split the fast and slow motions into,
respectively, barotropic and baroclinic subsystems
<xref ref-type="bibr" rid="bib1.bibx28 bib1.bibx23 bib1.bibx21 bib1.bibx6 bib1.bibx17" id="paren.19"/>.
The reason for this splitting is that surface gravity waves (external mode)
are fast and impose severe limitations on the time step, whereas the internal
dynamics can be computed with a much larger time step. The time step for the
external mode <inline-formula><mml:math id="M109" 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:mrow></mml:math></inline-formula> is limited by the speed of surface gravity waves, and that for the internal
mode, <inline-formula><mml:math id="M110" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>, by the speed of internal waves or advection. The
ratio <inline-formula><mml:math id="M111" display="inline"><mml:mrow><mml:msub><mml:mi>M</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mrow><mml:mn mathvariant="normal">3</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="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:mrow></mml:math></inline-formula> depends on applications,
but is commonly between 10 and 30. In practice, additional limitations are
due to vertical advection or wetting and drying processes. We will further
use the indices <inline-formula><mml:math id="M112" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M113" display="inline"><mml:mi>n</mml:mi></mml:math></inline-formula> to enumerate the internal and external time
steps, respectively.</p>
      <p id="d1e3122">The numerical algorithm passes through several stages. In the first stage,
based on the current temperature and salinity fields (time step <inline-formula><mml:math id="M114" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula>), the
pressure is computed from hydrostatic equilibrium Eq. (<xref ref-type="disp-formula" rid="Ch1.E6"/>) and then
used to compute the baroclinic pressure gradient <inline-formula><mml:math id="M115" display="inline"><mml:mrow><mml:msubsup><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mi mathvariant="normal">∇</mml:mi><mml:mi>p</mml:mi><mml:mo>=</mml:mo><mml:mi>g</mml:mi><mml:mi mathvariant="normal">∇</mml:mi><mml:msup><mml:mi mathvariant="italic">ζ</mml:mi><mml:mi>k</mml:mi></mml:msup><mml:mo>+</mml:mo><mml:mi>g</mml:mi><mml:msubsup><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mi mathvariant="normal">∇</mml:mi><mml:msup><mml:mi>I</mml:mi><mml:mi>k</mml:mi></mml:msup><mml:mo>+</mml:mo><mml:msubsup><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mi mathvariant="normal">∇</mml:mi><mml:msub><mml:mi>p</mml:mi><mml:mi mathvariant="normal">atm</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>. We use an asynchronous time stepping, assuming that
integration of temperature and salinity is half-step shifted with respect to
momentum. The index <inline-formula><mml:math id="M116" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula> on <inline-formula><mml:math id="M117" display="inline"><mml:mi>I</mml:mi></mml:math></inline-formula> implies that it is centered between <inline-formula><mml:math id="M118" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula> and
<inline-formula><mml:math id="M119" display="inline"><mml:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> of momentum integration. The elevation in the expression above is taken
at time step <inline-formula><mml:math id="M120" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula>, which makes the entire estimate for <inline-formula><mml:math id="M121" display="inline"><mml:mrow><mml:mi mathvariant="normal">∇</mml:mi><mml:mi>p</mml:mi></mml:mrow></mml:math></inline-formula> only
first-order accurate with respect to time.</p>
      <p id="d1e3257">At the second stage, the predictor values of the three-dimensional horizontal
velocity are determined as

              <disp-formula specific-use="align"><mml:math id="M122" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><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>k</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 mathvariant="bold-italic">u</mml:mi><mml:mi>k</mml:mi></mml:msup><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:msup><mml:mfenced close=")" open="("><mml:mrow><mml:mo>-</mml:mo><mml:mi>f</mml:mi><mml:mi mathvariant="bold-italic">k</mml:mi><mml:mo>×</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>-</mml:mo><mml:mi mathvariant="normal">∇</mml:mi><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:mi mathvariant="normal">∇</mml:mi><mml:mo>⋅</mml:mo><mml:mfenced open="(" close=")"><mml:mrow><mml:mi>K</mml:mi><mml:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced><mml:mrow><mml:mi mathvariant="normal">AB</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:msup></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:mspace linebreak="nobreak" width="0.25em"/><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:msubsup><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mi mathvariant="normal">∇</mml:mi><mml:mi>p</mml:mi><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:msub><mml:mi mathvariant="italic">ϑ</mml:mi><mml:msub><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:msub><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>k</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="italic">τ</mml:mi><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:msub><mml:msup><mml:mfenced open="(" close=")"><mml:mrow><mml:mi>w</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow></mml:mfenced><mml:mrow><mml:mi mathvariant="normal">AB</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:msup><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>

          Here <inline-formula><mml:math id="M123" display="inline"><mml:mi>K</mml:mi></mml:math></inline-formula> is the coefficient of horizontal viscosity, and AB3 implies the
third-order Adams–Bashforth estimate. The horizontal viscosity operator can
be made biharmonic or replaced with filtering as discussed in the next
chapter.</p>
      <?pagebreak page1013?><p id="d1e3459">To carry out mode splitting, we write the horizontal velocity as the sum of
the vertically averaged one <inline-formula><mml:math id="M124" 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 the deviation thereof
(pulsation) <inline-formula><mml:math id="M125" 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>:

              <disp-formula specific-use="align"><mml:math id="M126" 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="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:mo>+</mml:mo><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>′</mml:mo></mml:msup><mml:mo>,</mml:mo></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:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mi>H</mml:mi></mml:mfrac></mml:mstyle><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mrow><mml:mo>-</mml:mo><mml:mi>h</mml:mi></mml:mrow><mml:mi mathvariant="italic">ζ</mml:mi></mml:munderover><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="normal">d</mml:mi><mml:mi>z</mml:mi><mml:mo>,</mml:mo></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:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mrow><mml:mo>-</mml:mo><mml:mi>h</mml:mi></mml:mrow><mml:mi mathvariant="italic">ζ</mml:mi></mml:munderover><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>′</mml:mo></mml:msup><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>

          By integrating the system in Eqs. (<xref ref-type="disp-formula" rid="Ch1.E1"/>)–(<xref ref-type="disp-formula" rid="Ch1.E3"/>) vertically between
the bottom and surface, with regard for the kinematic boundary conditions
<inline-formula><mml:math id="M127" display="inline"><mml:mrow><mml:msub><mml:mo>∂</mml:mo><mml:mi>t</mml:mi></mml:msub><mml:mi mathvariant="italic">ζ</mml:mi><mml:mo>+</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi><mml:mo>=</mml:mo><mml:mi>w</mml:mi></mml:mrow></mml:math></inline-formula> on the surface,
<inline-formula><mml:math id="M128" display="inline"><mml:mrow><mml:mo>-</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="normal">∇</mml:mi><mml:mi>h</mml:mi><mml:mo>=</mml:mo><mml:mi>w</mml:mi></mml:mrow></mml:math></inline-formula> at the bottom, and time discretization, we get

              <disp-formula specific-use="align"><mml:math id="M129" display="block"><mml:mtable displaystyle="true"><mml:mtr><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: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:mi mathvariant="italic">ζ</mml:mi><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:mfenced><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:mi mathvariant="normal">∇</mml:mi><mml:msup><mml:mfenced close=")" open="("><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:mi mathvariant="normal">AB</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:msup><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>,</mml:mo></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: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: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="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:msup><mml:mfenced open="(" close=")"><mml:mrow><mml:mo>-</mml:mo><mml:mi>f</mml:mi><mml:mi mathvariant="bold-italic">k</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:mo>-</mml:mo><mml:mi mathvariant="normal">∇</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:mspace width="0.125em" linebreak="nobreak"/><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="normal">∇</mml:mi><mml:mo>⋅</mml:mo><mml:mfenced open="(" close=")"><mml:mrow><mml:mi>K</mml:mi><mml:mi mathvariant="normal">∇</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:mfenced><mml:mrow><mml:mi mathvariant="normal">AB</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:msup></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:mspace linebreak="nobreak" width="0.25em"/><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mspace width="0.25em" linebreak="nobreak"/><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:mi>g</mml:mi><mml:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi><mml:msup><mml:mo>)</mml:mo><mml:mrow><mml:mi mathvariant="normal">AM</mml:mi><mml:mn mathvariant="normal">4</mml:mn></mml:mrow></mml:msup><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:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi></mml:msub><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>h</mml:mi></mml:msub></mml:mrow></mml:mfenced><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:msubsup><mml:mi>R</mml:mi><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow><mml:mo>′</mml:mo></mml:msubsup></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:mspace linebreak="nobreak" width="0.25em"/><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mspace width="0.25em" linebreak="nobreak"/><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:mi>g</mml:mi><mml:msubsup><mml:mi mathvariant="italic">ρ</mml:mi><mml:mn mathvariant="normal">0</mml:mn><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mi mathvariant="normal">∇</mml:mi><mml:msup><mml:mover accent="true"><mml:mi>I</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover><mml:mi>k</mml:mi></mml:msup><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>

          Here a specific version of AB3 is used: <inline-formula><mml:math id="M130" 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:mrow><mml:mi mathvariant="normal">AB</mml:mi><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:msup><mml:mo>=</mml:mo><mml:mo>(</mml:mo><mml:mn mathvariant="normal">3</mml:mn><mml:mo>/</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mo>+</mml:mo><mml:mi mathvariant="italic">β</mml:mi><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>k</mml:mi></mml:msup><mml:mo>-</mml:mo><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>/</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mo>+</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="italic">β</mml:mi><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>k</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mo>+</mml:mo><mml:mi mathvariant="italic">β</mml:mi><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>k</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula>, with <inline-formula><mml:math id="M131" display="inline"><mml:mrow><mml:mi mathvariant="italic">β</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0.281105</mml:mn></mml:mrow></mml:math></inline-formula> for stability reasons
<xref ref-type="bibr" rid="bib1.bibx46" id="paren.20"/>; AM4 implies the Adams–Multon estimate
<inline-formula><mml:math id="M132" display="inline"><mml:mrow><mml:msup><mml:mi mathvariant="italic">ζ</mml:mi><mml:mrow><mml:mi mathvariant="normal">AM</mml:mi><mml:mn mathvariant="normal">4</mml:mn></mml:mrow></mml:msup><mml:mo>=</mml:mo><mml:mi mathvariant="italic">δ</mml:mi><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:mfenced open="(" close=")"><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:mi mathvariant="italic">δ</mml:mi><mml:mo>-</mml:mo><mml:mi mathvariant="italic">γ</mml:mi><mml:mo>-</mml:mo><mml:mi mathvariant="italic">ϵ</mml:mi></mml:mrow></mml:mfenced><mml:msup><mml:mi mathvariant="italic">ζ</mml:mi><mml:mi>n</mml:mi></mml:msup><mml:mo>+</mml:mo><mml:mi mathvariant="italic">γ</mml:mi><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:mi mathvariant="italic">ϵ</mml:mi><mml:msup><mml:mi mathvariant="italic">ζ</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula>, taken with
<inline-formula><mml:math id="M133" display="inline"><mml:mrow><mml:mi mathvariant="italic">δ</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0.614</mml:mn></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M134" display="inline"><mml:mrow><mml:mi mathvariant="italic">γ</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0.088</mml:mn></mml:mrow></mml:math></inline-formula>, and <inline-formula><mml:math id="M135" display="inline"><mml:mrow><mml:mi mathvariant="italic">ϵ</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0.013</mml:mn></mml:mrow></mml:math></inline-formula>
<xref ref-type="bibr" rid="bib1.bibx46" id="paren.21"/>. In the equations above <inline-formula><mml:math id="M136" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and
<inline-formula><mml:math id="M137" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mi>h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> are the surface (wind) and bottom stresses, respectively, and
<inline-formula><mml:math id="M138" display="inline"><mml:mrow><mml:mi mathvariant="normal">∇</mml:mi><mml:mover accent="true"><mml:mi>I</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover></mml:mrow></mml:math></inline-formula> is the vertically integrated gradient of baroclinic
pressure. The term <inline-formula><mml:math id="M139" display="inline"><mml:mrow><mml:msubsup><mml:mi>R</mml:mi><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow><mml:mo>′</mml:mo></mml:msubsup></mml:mrow></mml:math></inline-formula> contains momentum advection and
horizontal dissipation of the pulsation velocity integrated vertically:

              <disp-formula id="Ch1.Ex25"><mml:math id="M140" display="block"><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:msubsup><mml:mi>R</mml:mi><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow><mml:mo>′</mml:mo></mml:msubsup><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msup><mml:mi>H</mml:mi><mml:mi>k</mml:mi></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:msup><mml:mfenced close="]" open="["><mml:mrow><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mrow><mml:mo>-</mml:mo><mml:mi>h</mml:mi></mml:mrow><mml:mi mathvariant="italic">ζ</mml:mi></mml:munderover><mml:mi mathvariant="normal">∇</mml:mi><mml:mo>⋅</mml:mo><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="bold">′</mml:mo></mml:msup><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="bold">′</mml:mo></mml:msup><mml:mo>-</mml:mo><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mrow><mml:mo>-</mml:mo><mml:mi>h</mml:mi></mml:mrow><mml:mi mathvariant="italic">ζ</mml:mi></mml:munderover><mml:mi mathvariant="normal">∇</mml:mi><mml:mo>⋅</mml:mo><mml:mfenced open="(" close=")"><mml:mrow><mml:mi>K</mml:mi><mml:mi mathvariant="normal">∇</mml:mi><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="bold">′</mml:mo></mml:msup></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced><mml:mi>k</mml:mi></mml:msup><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>

        In this expression <inline-formula><mml:math id="M141" display="inline"><mml:mrow><mml:msup><mml:mi>H</mml:mi><mml:mi>k</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula> is the total fluid depth at time step <inline-formula><mml:math id="M142" display="inline"><mml:mi>k</mml:mi></mml:math></inline-formula>,
<inline-formula><mml:math id="M143" display="inline"><mml:mrow><mml:msup><mml:mi>H</mml:mi><mml:mi>k</mml:mi></mml:msup><mml:mo>=</mml:mo><mml:mi>h</mml:mi><mml:mo>+</mml:mo><mml:msup><mml:mi mathvariant="italic">ζ</mml:mi><mml:mi>k</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula>. This term is computed only on the baroclinic time step and
kept constant through the integration of the internal mode.</p>
      <p id="d1e4342">The bottom friction is taken as

              <disp-formula id="Ch1.Ex26"><mml:math id="M144" display="block"><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">d</mml:mi></mml:msub><mml:msup><mml:mfenced close="|" open="|"><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">‾</mml:mo></mml:mover></mml:mfenced><mml:mi>n</mml:mi></mml:msup><mml:mfenced open="(" close=")"><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: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:mi>n</mml:mi></mml:msup></mml:mrow></mml:mfenced><mml:mo>/</mml:mo><mml:msup><mml:mi>H</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:msub><mml:mi>C</mml:mi><mml:mi mathvariant="normal">d</mml:mi></mml:msub><mml:mo>|</mml:mo><mml:msub><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">̃</mml:mo></mml:mover><mml:mi>h</mml:mi></mml:msub><mml:msup><mml:mo>|</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:msubsup><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">̃</mml:mo></mml:mover><mml:mi>h</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mo>/</mml:mo><mml:msup><mml:mi>H</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:mrow></mml:math></disp-formula>

        The first part of bottom friction is needed to increase stability, while the
second part estimates the correct friction, with <inline-formula><mml:math id="M145" display="inline"><mml:mrow><mml:msubsup><mml:mover accent="true"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo mathvariant="normal">̃</mml:mo></mml:mover><mml:mi>h</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup></mml:mrow></mml:math></inline-formula>
the horizontal velocity vector in the bottom cell on the predictor time step.</p>
      <p id="d1e4488">The system of vertically averaged equations is stepped explicitly (except
for the bottom friction) through <inline-formula><mml:math id="M146" display="inline"><mml:mrow><mml:msub><mml:mi>M</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> time steps of duration
<inline-formula><mml:math id="M147" 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:mrow></mml:math></inline-formula> (index <inline-formula><mml:math id="M148" display="inline"><mml:mi>n</mml:mi></mml:math></inline-formula>) to “catch up” the <inline-formula><mml:math id="M149" display="inline"><mml:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> baroclinic time
step. The update of elevation is made first, followed by the update of
vertically integrated momentum equations.</p>
      <p id="d1e4537">At the “corrector” step, the 3-D velocities are corrected to the surface
elevation at <inline-formula><mml:math id="M150" display="inline"><mml:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula>:
          <disp-formula id="Ch1.Ex27"><mml:math id="M151" display="block"><mml:mrow><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">△</mml:mi><mml:mi>i</mml:mi><mml:mi>k</mml:mi></mml:msubsup></mml:mrow><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">△</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle><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>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mo>+</mml:mo><mml:mfenced open="(" close=")"><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:mrow><mml:mi>k</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:mi>P</mml:mi></mml:msup></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
        with <inline-formula><mml:math id="M152" 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:mi>P</mml:mi></mml:msup><mml:mo>=</mml:mo><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msup><mml:mi>H</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:msubsup><mml:mo>∑</mml:mo><mml:mrow><mml:mo>-</mml:mo><mml:mi>h</mml:mi></mml:mrow><mml:mi mathvariant="italic">ζ</mml:mi></mml:msubsup><mml:mfenced open="(" close=")"><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:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:msubsup><mml:mi mathvariant="normal">△</mml:mi><mml:mi>i</mml:mi><mml:mi>k</mml:mi></mml:msubsup></mml:mrow></mml:mfenced></mml:mrow></mml:math></inline-formula>, where <inline-formula><mml:math id="M153" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> is the vertical
index. Here <inline-formula><mml:math id="M154" display="inline"><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">△</mml:mi><mml:mi>i</mml:mi><mml:mi>k</mml:mi></mml:msubsup></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M155" display="inline"><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">△</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup></mml:mrow></mml:math></inline-formula> are the thicknesses of
the <inline-formula><mml:math id="M156" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula>th layer calculated on respective baroclinic time steps. The layer
thickness is <inline-formula><mml:math id="M157" display="inline"><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">△</mml:mi><mml:mi>i</mml:mi><mml:mi>k</mml:mi></mml:msubsup><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="normal">△</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:msup><mml:mi>H</mml:mi><mml:mi>k</mml:mi></mml:msup></mml:mrow></mml:math></inline-formula>, where <inline-formula><mml:math id="M158" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">△</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the
unperturbed vertical grid spacing. This correction removes the barotropic
component of the predicted velocity and combines the result with the computed
barotropic velocity. We will suppress the layer index <inline-formula><mml:math id="M159" display="inline"><mml:mi>i</mml:mi></mml:math></inline-formula> where it is
unambiguous.</p>
      <p id="d1e4787">The final step in the dynamical part calculates the transformed vertical
velocity <inline-formula><mml:math id="M160" display="inline"><mml:mrow><mml:msup><mml:mi>w</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:math></inline-formula> from 3-D continuity Eq. (<xref ref-type="disp-formula" rid="Ch1.E2"/>). It is used in the
next predictor step. Note that in the predictor step the computations of
vertical viscosity are implicit.</p>
      <p id="d1e4808">New horizontal velocities, the so-called “filtered” ones, are used for
advection of a tracer. They are given by the sum of the filtered depth mean
and the baroclinic part of the “predicted” velocities
<xref ref-type="bibr" rid="bib1.bibx18" id="paren.22"/>,

              <disp-formula id="Ch1.Ex28"><mml:math id="M161" display="block"><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:msubsup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>F</mml:mi><mml:mrow><mml:mi>k</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="normal">△</mml:mi><mml:mi>i</mml:mi><mml:mi>k</mml:mi></mml:msubsup></mml:mrow><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">△</mml:mi><mml:mi>i</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup></mml:mrow></mml:mfrac></mml:mstyle><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>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mo>+</mml:mo><mml:mfenced open="(" close=")"><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:mi>F</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>P</mml:mi></mml:msup></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

        with <inline-formula><mml:math id="M162" 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:mi>F</mml:mi></mml:msup><mml:mo>=</mml:mo><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mn mathvariant="normal">1</mml:mn><mml:mrow><mml:msub><mml:mi>M</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:msup><mml:mi>H</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:msubsup><mml:mo>∑</mml:mo><mml:mrow><mml:mi>n</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi>M</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:mrow></mml:msubsup><mml:mfenced close=")" open="("><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:mi>n</mml:mi></mml:msup><mml:msup><mml:mi>H</mml:mi><mml:mi>n</mml:mi></mml:msup></mml:mrow></mml:mfenced></mml:mrow></mml:math></inline-formula>. The
procedure of “filtering” removes possible high-frequency components in the
barotropic velocity. It also improves accuracy because it in essence works toward
centering the contribution of the elevation gradient. Once the filtered
velocity is computed, the vertical velocity is updated to match it.</p>
      <p id="d1e4966">The equation for temperature is taken in the conservation form

              <disp-formula specific-use="align"><mml:math id="M163" display="block"><mml:mtable displaystyle="true"><mml:mtr><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:msup><mml:mi mathvariant="normal">△</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:msup><mml:mi>T</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></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:mspace linebreak="nobreak" width="0.25em"/><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mo>=</mml:mo><mml:msup><mml:mi mathvariant="normal">△</mml:mi><mml:mi>k</mml:mi></mml:msup><mml:msup><mml:mi>T</mml:mi><mml:mi>k</mml:mi></mml:msup><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:mfenced open="[" close="]"><mml:mrow><mml:mi mathvariant="normal">∇</mml:mi><mml:mo>⋅</mml:mo><mml:mfenced open="(" close=")"><mml:mrow><mml:msubsup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>F</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:msup><mml:mi mathvariant="normal">△</mml:mi><mml:mi>k</mml:mi></mml:msup><mml:msup><mml:mi>T</mml:mi><mml:mo>*</mml:mo></mml:msup></mml:mrow></mml:mfenced><mml:mo>+</mml:mo><mml:msub><mml:mi>w</mml:mi><mml:mi mathvariant="normal">Ft</mml:mi></mml:msub><mml:msubsup><mml:mi>T</mml:mi><mml:mi mathvariant="normal">t</mml:mi><mml:mo>*</mml:mo></mml:msubsup><mml:mo>-</mml:mo><mml:msub><mml:mi>w</mml:mi><mml:mi mathvariant="normal">Fb</mml:mi></mml:msub><mml:msubsup><mml:mi>T</mml:mi><mml:mi mathvariant="normal">b</mml:mi><mml:mo>*</mml:mo></mml:msubsup></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:mspace width="0.25em" linebreak="nobreak"/><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mo>+</mml:mo><mml:mi>D</mml:mi><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:mi>R</mml:mi><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:mi>C</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>

          where <inline-formula><mml:math id="M164" display="inline"><mml:mi>D</mml:mi></mml:math></inline-formula> combines the terms related to diffusion, <inline-formula><mml:math id="M165" display="inline"><mml:mrow><mml:msub><mml:mi>w</mml:mi><mml:mi mathvariant="normal">Ft</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>w</mml:mi><mml:mi mathvariant="normal">Fb</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M166" display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mi mathvariant="normal">t</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, and <inline-formula><mml:math id="M167" display="inline"><mml:mrow><mml:msub><mml:mi>T</mml:mi><mml:mi mathvariant="normal">b</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> are the vertical transport
velocity and temperature on top and bottom of the layer, and <inline-formula><mml:math id="M168" display="inline"><mml:mrow><mml:msup><mml:mi>T</mml:mi><mml:mo>*</mml:mo></mml:msup></mml:mrow></mml:math></inline-formula> is computed
through the second-order Adams–Bashforth estimate. <inline-formula><mml:math id="M169" display="inline"><mml:mi>R</mml:mi></mml:math></inline-formula> is the boundary
thermal flux (either from the surface or due to river discharge). The last term
in the equation above is

              <disp-formula id="Ch1.Ex32"><mml:math id="M170" display="block"><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mi>C</mml:mi><mml:mo>=</mml:mo><mml:mi>T</mml:mi><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:msub><mml:mi mathvariant="normal">△</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mi>T</mml:mi><mml:mfenced open="(" close=")"><mml:mrow><mml:mi mathvariant="normal">∇</mml:mi><mml:msup><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi mathvariant="normal">△</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>F</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mo>+</mml:mo><mml:msub><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:msub><mml:msup><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi mathvariant="normal">△</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:msub><mml:mi>w</mml:mi><mml:mi>F</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mrow><mml:mi>k</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:mfenced><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>

        Its two constituents combine to zero because of continuity. Keeping this term
makes sense if computations of advection are split into horizontal and
vertical substeps. The salinity is treated similarly.</p>
      <p id="d1e5292">In simulations of coastal dynamics it is often necessary to simulate flooding
and drying events. Explicit time stepping methods of solving the external
mode are well suited for this
<xref ref-type="bibr" rid="bib1.bibx31 bib1.bibx6 bib1.bibx46" id="paren.23"/>. The algorithm
to account for wetting and drying will be presented in the next section. We
only note that computations are performed on each time step of the external
mode.</p>
</sec>
<?pagebreak page1014?><sec id="Ch1.S4">
  <title>Spatial discretization</title>
      <p id="d1e5304">In the finite-volume method, the governing equations are integrated over
control volumes, and the divergence terms, by virtue of the Gauss theorem, are
expressed as the sums of respective fluxes through the boundaries of control
volumes. For the cell-vertex discretization the scalar control volumes are
formed by connecting cell centroids with the centers of edges, which gives
the so-called median-dual control volumes around mesh vertices. The vector
control volumes are the mesh cells (triangles or quads) themselves, as
schematically shown in Fig. <xref ref-type="fig" rid="Ch1.F1"/>.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F1"><label>Figure 1</label><caption><p id="d1e5311">Schematic of mesh structure. Velocities are located at centroids
(red circles) and elevation at vertices (blue circles). A scalar control
volume associated with vertex <inline-formula><mml:math id="M171" display="inline"><mml:mrow><mml:msub><mml:mi>v</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> is formed by connecting neighboring
centroids to edge centers. The control volumes for velocity are the
triangles and quads themselves. The lines passing through two neighboring
centroids (e.g., <inline-formula><mml:math id="M172" display="inline"><mml:mrow><mml:msub><mml:mi>c</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M173" display="inline"><mml:mrow><mml:msub><mml:mi>c</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>) are broken in a general case at edge
centers. Their fragments are described by the left and right vectors directed
to centroids (<inline-formula><mml:math id="M174" display="inline"><mml:mrow><mml:msub><mml:mi>s</mml:mi><mml:mi mathvariant="normal">l</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M175" display="inline"><mml:mrow><mml:msub><mml:mi>s</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> for edge <inline-formula><mml:math id="M176" display="inline"><mml:mi>e</mml:mi></mml:math></inline-formula>). Edge <inline-formula><mml:math id="M177" display="inline"><mml:mi>e</mml:mi></mml:math></inline-formula> is defined by its two
vertices <inline-formula><mml:math id="M178" display="inline"><mml:mrow><mml:msub><mml:mi>v</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M179" display="inline"><mml:mrow><mml:msub><mml:mi>v</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> and is considered to be directed to the second
vertex. It is also characterized by two elements <inline-formula><mml:math id="M180" display="inline"><mml:mrow><mml:msub><mml:mi>c</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M181" display="inline"><mml:mrow><mml:msub><mml:mi>c</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> to the left
and to the right, respectively.</p></caption>
        <?xmltex \igopts{width=142.26378pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/12/1009/2019/gmd-12-1009-2019-f01.png"/>

      </fig>

      <p id="d1e5434">The basic structure to describe the mesh is the array of edges given by their
vertices <inline-formula><mml:math id="M182" display="inline"><mml:mrow><mml:msub><mml:mi>v</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M183" display="inline"><mml:mrow><mml:msub><mml:mi>v</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>, and the array of two pointers <inline-formula><mml:math id="M184" display="inline"><mml:mrow><mml:msub><mml:mi>c</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M185" display="inline"><mml:mrow><mml:msub><mml:mi>c</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> to
the cells on the left and on the right of the edge. There is no difference
between triangles, quads, or hybrid meshes in the cycles that assemble
fluxes. Quads and triangles are described through four indices to the vertices
forming them; in the case of triangles the fourth index equals the first one.
The treatment of triangles and quads differs slightly in computations of
gradients as detailed below. We will use symbolic notation <inline-formula><mml:math id="M186" display="inline"><mml:mrow><mml:mi>e</mml:mi><mml:mo>(</mml:mo><mml:mi>c</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> for the
list of edges forming cell <inline-formula><mml:math id="M187" display="inline"><mml:mi>c</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M188" display="inline"><mml:mrow><mml:mi>e</mml:mi><mml:mo>(</mml:mo><mml:mi>v</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> for the list of edges connected to
vertex <inline-formula><mml:math id="M189" display="inline"><mml:mi>v</mml:mi></mml:math></inline-formula>, and <inline-formula><mml:math id="M190" display="inline"><mml:mrow><mml:mi>v</mml:mi><mml:mo>(</mml:mo><mml:mi>c</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> for the list of vertices defining cell of element <inline-formula><mml:math id="M191" display="inline"><mml:mi>c</mml:mi></mml:math></inline-formula>.</p>
      <p id="d1e5545">In the vertical direction we introduce a <inline-formula><mml:math id="M192" display="inline"><mml:mi mathvariant="italic">σ</mml:mi></mml:math></inline-formula> coordinate
<xref ref-type="bibr" rid="bib1.bibx39" id="paren.24"/>:

              <disp-formula id="Ch1.Ex33"><mml:math id="M193" display="block"><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:mi>z</mml:mi><mml:mo>+</mml:mo><mml:mi>h</mml:mi></mml:mrow><mml:mrow><mml:mi>h</mml:mi><mml:mo>+</mml:mo><mml:mi mathvariant="italic">ζ</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>,</mml:mo><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mn mathvariant="normal">1</mml:mn><mml:mo>≤</mml:mo><mml:mi mathvariant="italic">σ</mml:mi><mml:mo>≤</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <p id="d1e5603">The lower and upper horizontal faces correspond to the planes <inline-formula><mml:math id="M194" display="inline"><mml:mrow><mml:mi mathvariant="italic">σ</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula> and
<inline-formula><mml:math id="M195" display="inline"><mml:mrow><mml:mi mathvariant="italic">σ</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula>, respectively. The vertical grid spacing is defined by the
selected set of <inline-formula><mml:math id="M196" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>. The spacing of <inline-formula><mml:math id="M197" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is horizontally uniform
in the present implementation (but it can be varying) and can be selected as
equidistant or based on a parabolic function with high vertical resolution
near the surface and bottom in the vertical,

              <disp-formula id="Ch1.Ex34"><mml:math id="M198" display="block"><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:msup><mml:mfenced open="(" close=")"><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi>i</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mrow><mml:mi>N</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mi mathvariant="italic">ϱ</mml:mi></mml:msup><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

        where <inline-formula><mml:math id="M199" display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula> is the number of vertical layers. Here <inline-formula><mml:math id="M200" display="inline"><mml:mrow><mml:mi mathvariant="italic">ϱ</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:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> gives the
uniform (parabolic) distribution of vertical layers. One more possibility to
use refined resolution near the bottom or surface is implemented through the
formula by <xref ref-type="bibr" rid="bib1.bibx8" id="text.25"/>:

              <disp-formula id="Ch1.Ex35"><mml:math id="M201" display="block"><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:msub><mml:mi mathvariant="italic">σ</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi>tanh⁡</mml:mi><mml:mfenced close="]" open="["><mml:mrow><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>L</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mrow><mml:mo>(</mml:mo><mml:mi>N</mml:mi><mml:mo>-</mml:mo><mml:mi>i</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>N</mml:mi><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>-</mml:mo><mml:msub><mml:mi>L</mml:mi><mml:mi>h</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mo>+</mml:mo><mml:mi>tanh⁡</mml:mi><mml:msub><mml:mi>L</mml:mi><mml:mi>h</mml:mi></mml:msub></mml:mrow><mml:mrow><mml:mi>tanh⁡</mml:mi><mml:msub><mml:mi>L</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>tanh⁡</mml:mi><mml:msub><mml:mi>L</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

        where <inline-formula><mml:math id="M202" display="inline"><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi>h</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M203" display="inline"><mml:mrow><mml:msub><mml:mi>L</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> are the number of layers near the bottom and
surface, respectively.</p>
      <p id="d1e5843">The vertical grid spacing is recalculated on each baroclinic time step for
the vertices where <inline-formula><mml:math id="M204" display="inline"><mml:mi mathvariant="italic">ζ</mml:mi></mml:math></inline-formula> is defined. It is interpolated from vertices to
cells and to edges. The vectors of horizontal velocity and tracers are located
in the middle of vertical layers (index <inline-formula><mml:math id="M205" display="inline"><mml:mrow><mml:mi>i</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:mrow></mml:math></inline-formula>), but the vertical velocity
is at full layers.</p>
<sec id="Ch1.S4.SS1">
  <title>Divergence and gradients</title>
      <p id="d1e5874">The <italic>divergence operator</italic> on scalar control volumes is computed as
            <disp-formula id="Ch1.Ex36"><mml:math id="M206" display="block"><mml:mrow><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi>v</mml:mi></mml:munder><mml:mi mathvariant="normal">∇</mml:mi><mml:mo>⋅</mml:mo><mml:mfenced open="(" close=")"><mml:mrow><mml:mi mathvariant="normal">△</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow></mml:mfenced><mml:mi mathvariant="normal">d</mml:mi><mml:mi>S</mml:mi><mml:mo>=</mml:mo><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>e</mml:mi><mml:mo>=</mml:mo><mml:mi>e</mml:mi><mml:mo>(</mml:mo><mml:mi>v</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:munder><mml:mfenced open="[" close="]"><mml:mrow><mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:mi mathvariant="normal">△</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">ℓ</mml:mi></mml:mrow></mml:mfenced><mml:mi mathvariant="normal">l</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:mi mathvariant="normal">△</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">ℓ</mml:mi></mml:mrow></mml:mfenced><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where the cycle is over edges containing vertex <inline-formula><mml:math id="M207" display="inline"><mml:mi>v</mml:mi></mml:math></inline-formula>, the indices l and r
imply that the estimates are made on the left and right segments of the
control volume boundary attached to the center of edge <inline-formula><mml:math id="M208" display="inline"><mml:mi>e</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M209" display="inline"><mml:mi mathvariant="bold-italic">n</mml:mi></mml:math></inline-formula> is
the outer normal, and <inline-formula><mml:math id="M210" display="inline"><mml:mi mathvariant="normal">ℓ</mml:mi></mml:math></inline-formula> the length of the segment (see
Fig. <xref ref-type="fig" rid="Ch1.F1"/>). With vectors <inline-formula><mml:math id="M211" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">s</mml:mi><mml:mi mathvariant="normal">l</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and
<inline-formula><mml:math id="M212" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">s</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> connecting the midpoint of edge <inline-formula><mml:math id="M213" display="inline"><mml:mi>e</mml:mi></mml:math></inline-formula> with the cell
centers on the left and on the right, we get <inline-formula><mml:math id="M214" display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">ℓ</mml:mi><mml:msub><mml:mo>)</mml:mo><mml:mi mathvariant="normal">l</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mi mathvariant="bold-italic">k</mml:mi><mml:mo>×</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">s</mml:mi><mml:mi mathvariant="normal">l</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and similar, but with the minus sign for
the right element (<inline-formula><mml:math id="M215" display="inline"><mml:mi mathvariant="bold-italic">k</mml:mi></mml:math></inline-formula> is a unit vertical vector). The mean cell
values, for example layer thickness on the cell, can be defined as
<inline-formula><mml:math id="M216" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">△</mml:mi><mml:mi mathvariant="normal">c</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mo>∑</mml:mo><mml:mrow><mml:mi>v</mml:mi><mml:mo>=</mml:mo><mml:mi>v</mml:mi><mml:mo>(</mml:mo><mml:mi>c</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msub><mml:msub><mml:mi mathvariant="normal">△</mml:mi><mml:mi>v</mml:mi></mml:msub><mml:msub><mml:mi>w</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, where
<inline-formula><mml:math id="M217" display="inline"><mml:mrow><mml:msub><mml:mi>w</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>/</mml:mo><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:math></inline-formula> on triangles and
<inline-formula><mml:math id="M218" display="inline"><mml:mrow><mml:msub><mml:mi>w</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>S</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub><mml:mo>/</mml:mo><mml:msub><mml:mi>S</mml:mi><mml:mi mathvariant="normal">c</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> for quads (<inline-formula><mml:math id="M219" display="inline"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mi mathvariant="normal">c</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> cell
area and <inline-formula><mml:math id="M220" display="inline"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mi mathvariant="normal">cv</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, the part of it in the scalar control volume around
the vertex).</p>
      <p id="d1e6156"><italic>Gradients of scalar</italic> quantities are needed on cells and are computed
as

                <disp-formula id="Ch1.Ex37"><mml:math id="M221" display="block"><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi>c</mml:mi></mml:munder><mml:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi><mml:mi mathvariant="normal">d</mml:mi><mml:mi>S</mml:mi><mml:mo>=</mml:mo><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>e</mml:mi><mml:mo>=</mml:mo><mml:mi>e</mml:mi><mml:mo>(</mml:mo><mml:mi>c</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:munder><mml:msub><mml:mfenced open="(" close=")"><mml:mrow><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">ℓ</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi></mml:mrow></mml:mfenced><mml:mi>e</mml:mi></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          where summation is over the edges of cell <inline-formula><mml:math id="M222" display="inline"><mml:mi>c</mml:mi></mml:math></inline-formula>, the normal and length are
related to the edges, and <inline-formula><mml:math id="M223" display="inline"><mml:mi mathvariant="italic">ζ</mml:mi></mml:math></inline-formula> is estimated as the mean over edge
vertices.</p>
      <?pagebreak page1015?><p id="d1e6226">The <italic>gradients of velocities</italic> on cells can be needed for the
computation of viscosity and the momentum advection term. They are computed
through the least squares fit based on the velocities on neighboring cells:
            <disp-formula id="Ch1.Ex38"><mml:math id="M224" display="block"><mml:mrow><mml:mi mathvariant="fraktur">L</mml:mi><mml:mo>=</mml:mo><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>n</mml:mi><mml:mo>=</mml:mo><mml:mi>n</mml:mi><mml:mo>(</mml:mo><mml:mi>c</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:munder><mml:msup><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>c</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>n</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mi>x</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:msub><mml:mi mathvariant="bold-italic">r</mml:mi><mml:mi mathvariant="normal">cn</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mo>=</mml:mo><mml:mo movablelimits="false">min⁡</mml:mo><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
          Here <inline-formula><mml:math id="M225" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">r</mml:mi><mml:mi mathvariant="normal">cn</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi mathvariant="normal">cn</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>y</mml:mi><mml:mi mathvariant="normal">cn</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:math></inline-formula> is
the vector connecting the center of <inline-formula><mml:math id="M226" display="inline"><mml:mi>c</mml:mi></mml:math></inline-formula> to that of its neighbor <inline-formula><mml:math id="M227" display="inline"><mml:mi>n</mml:mi></mml:math></inline-formula>. Their
solution can be reformulated in terms of two matrices (computed once and
stored) with coefficients <inline-formula><mml:math id="M228" display="inline"><mml:mrow><mml:msubsup><mml:mi>a</mml:mi><mml:mi mathvariant="normal">cn</mml:mi><mml:mi>x</mml:mi></mml:msubsup><mml:mo>=</mml:mo><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi mathvariant="normal">cn</mml:mi></mml:msub><mml:msup><mml:mi>Y</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mo>-</mml:mo><mml:msub><mml:mi>y</mml:mi><mml:mi mathvariant="normal">cn</mml:mi></mml:msub><mml:mi>X</mml:mi><mml:mi>Y</mml:mi></mml:mrow></mml:mfenced><mml:mo>/</mml:mo><mml:mi>d</mml:mi></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M229" display="inline"><mml:mrow><mml:msubsup><mml:mi>a</mml:mi><mml:mi mathvariant="normal">cn</mml:mi><mml:mi>y</mml:mi></mml:msubsup><mml:mo>=</mml:mo><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi>y</mml:mi><mml:mi mathvariant="normal">cn</mml:mi></mml:msub><mml:msup><mml:mi>X</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mo>-</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi mathvariant="normal">cn</mml:mi></mml:msub><mml:mi>X</mml:mi><mml:mi>Y</mml:mi></mml:mrow></mml:mfenced><mml:mo>/</mml:mo><mml:mi>d</mml:mi></mml:mrow></mml:math></inline-formula>, acting on velocity differences and returning
the derivatives. Here <inline-formula><mml:math id="M230" display="inline"><mml:mrow><mml:mi>d</mml:mi><mml:mo>=</mml:mo><mml:msup><mml:mi>X</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:msup><mml:mi>Y</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mo>-</mml:mo><mml:mo>(</mml:mo><mml:mi>X</mml:mi><mml:mi>Y</mml:mi><mml:msup><mml:mo>)</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M231" display="inline"><mml:mrow><mml:msup><mml:mi>X</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mo>=</mml:mo><mml:msub><mml:mo>∑</mml:mo><mml:mrow><mml:mi>n</mml:mi><mml:mo>=</mml:mo><mml:mi>n</mml:mi><mml:mo>(</mml:mo><mml:mi>c</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msub><mml:msubsup><mml:mi>x</mml:mi><mml:mi mathvariant="normal">cn</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:math></inline-formula>,
<inline-formula><mml:math id="M232" display="inline"><mml:mrow><mml:msup><mml:mi>Y</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mo>=</mml:mo><mml:msub><mml:mo>∑</mml:mo><mml:mrow><mml:mi>n</mml:mi><mml:mo>=</mml:mo><mml:mi>n</mml:mi><mml:mo>(</mml:mo><mml:mi>c</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msub><mml:msubsup><mml:mi>y</mml:mi><mml:mi mathvariant="normal">cn</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msubsup></mml:mrow></mml:math></inline-formula>, and
<inline-formula><mml:math id="M233" display="inline"><mml:mrow><mml:mi>X</mml:mi><mml:mi>Y</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mo>∑</mml:mo><mml:mrow><mml:mi>n</mml:mi><mml:mo>=</mml:mo><mml:mi>n</mml:mi><mml:mo>(</mml:mo><mml:mi>c</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msub><mml:msub><mml:mi>x</mml:mi><mml:mi mathvariant="normal">cn</mml:mi></mml:msub><mml:msub><mml:mi>y</mml:mi><mml:mi mathvariant="normal">cn</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>.</p>
</sec>
<sec id="Ch1.S4.SS2">
  <title>Momentum advection</title>
      <p id="d1e6577">We implemented two options for horizontal momentum advection in the flux
form. The first one is linear reconstruction upwind based on cell
control volumes (see Fig. <xref ref-type="fig" rid="Ch1.F1"/>). The second one is central and
is based on scalar control volumes, with subsequent averaging to cells. In
the upwind implementation we write

                <disp-formula id="Ch1.Ex39"><mml:math id="M234" display="block"><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi>c</mml:mi></mml:munder><mml:mi mathvariant="normal">∇</mml:mi><mml:mo>⋅</mml:mo><mml:mfenced close=")" open="("><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="normal">△</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow></mml:mfenced><mml:mi mathvariant="normal">d</mml:mi><mml:mi>S</mml:mi><mml:mo>=</mml:mo><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>e</mml:mi><mml:mo>=</mml:mo><mml:mi>e</mml:mi><mml:mo>(</mml:mo><mml:mi>c</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:munder><mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">ℓ</mml:mi><mml:mi mathvariant="normal">△</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow></mml:mfenced><mml:mi>e</mml:mi></mml:msub><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <p id="d1e6644">For edge <inline-formula><mml:math id="M235" display="inline"><mml:mi>e</mml:mi></mml:math></inline-formula>, linear velocity reconstructions on the elements on its two
sides are estimated at the edge center. One of the cells is <inline-formula><mml:math id="M236" display="inline"><mml:mi>c</mml:mi></mml:math></inline-formula>, and let <inline-formula><mml:math id="M237" display="inline"><mml:mi>n</mml:mi></mml:math></inline-formula>
be its neighbor across <inline-formula><mml:math id="M238" display="inline"><mml:mi>e</mml:mi></mml:math></inline-formula>. The respective velocity estimates will be denoted
as <inline-formula><mml:math id="M239" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="normal">ce</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M240" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="normal">ne</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, and upwind will be
written in the form <inline-formula><mml:math id="M241" display="inline"><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="normal">ce</mml:mi></mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>+</mml:mo><mml:mtext>sgn</mml:mtext><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:mrow></mml:mfenced><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="normal">ne</mml:mi></mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:mtext>sgn</mml:mtext><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:mrow></mml:mfenced></mml:mrow></mml:math></inline-formula>, where <inline-formula><mml:math id="M242" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mo>=</mml:mo><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mfenced close=")" open="("><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="normal">ce</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="normal">ne</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mo>/</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:math></inline-formula>.</p>
      <p id="d1e6787">The other form is adapted from <xref ref-type="bibr" rid="bib1.bibx14" id="text.26"/>. It provides additional
smoothing for momentum advection by computing flux divergence for larger
control volumes. In this case we first estimate the momentum flux term on
scalar control volumes:

                <disp-formula id="Ch1.Ex40"><mml:math id="M243" display="block"><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi>v</mml:mi></mml:munder><mml:mi mathvariant="normal">∇</mml:mi><mml:mo>⋅</mml:mo><mml:mfenced close=")" open="("><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="normal">△</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow></mml:mfenced><mml:mi mathvariant="normal">d</mml:mi><mml:mi>S</mml:mi><mml:mo>=</mml:mo><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>e</mml:mi><mml:mo>=</mml:mo><mml:mi>e</mml:mi><mml:mo>(</mml:mo><mml:mi>v</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:munder><mml:mfenced open="[" close="]"><mml:mrow><mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">ℓ</mml:mi><mml:mi mathvariant="normal">△</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow></mml:mfenced><mml:mi mathvariant="normal">l</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">ℓ</mml:mi><mml:mi mathvariant="normal">△</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow></mml:mfenced><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <p id="d1e6874">The notation here follows that for the divergence. No velocity reconstruction
is involved. These estimates are then averaged to the centers of cells. In
both variants of advection form the fluid thickness is estimated at cell
centers.</p>
</sec>
<sec id="Ch1.S4.SS3">
  <title>Tracer advection</title>
      <p id="d1e6883">Horizontal advection and diffusion terms are discretized explicitly in time.
Three advection schemes have been implemented. The first two are based on
linear reconstruction for control volume and are therefore second order. The
linear reconstruction upwind scheme and the Miura scheme <xref ref-type="bibr" rid="bib1.bibx35" id="paren.27"/> differ
in the implementation of time stepping. The first needs the
Adams–Bashforth method to be second order with respect to time. The
scheme by Miura reaches this by estimating the tracer at a point displaced by
<inline-formula><mml:math id="M244" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:mo>/</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:math></inline-formula>. In both cases a linear reconstruction of
the tracer field for each scalar control volume is performed:

                <disp-formula id="Ch1.Ex41"><mml:math id="M245" display="block"><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:msub><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi>R</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>y</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="normal">Θ</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>v</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>y</mml:mi><mml:mi>v</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi>x</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>v</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi>y</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi>y</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mi>y</mml:mi><mml:mi>v</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M246" 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> is the tracer value at vertex, <inline-formula><mml:math id="M247" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi>x</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M248" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi>y</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>
are the gradients averaged to vertex locations, and <inline-formula><mml:math id="M249" display="inline"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>v</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M250" display="inline"><mml:mrow><mml:msub><mml:mi>y</mml:mi><mml:mi>v</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> the
coordinates of vertex <inline-formula><mml:math id="M251" display="inline"><mml:mi>v</mml:mi></mml:math></inline-formula>. The fluxes for scalar control volume faces
associated with edge <inline-formula><mml:math id="M252" display="inline"><mml:mi>e</mml:mi></mml:math></inline-formula> are computed as

                <disp-formula id="Ch1.Ex42"><mml:math id="M253" display="block"><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>e</mml:mi><mml:mo>=</mml:mo><mml:mi>e</mml:mi><mml:mo>(</mml:mo><mml:mi>v</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:munder><mml:mfenced open="(" close=")"><mml:mfenced open="[" close="]"><mml:mrow><mml:msub><mml:mfenced open="(" close=")"><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">ℓ</mml:mi><mml:mi mathvariant="normal">△</mml:mi><mml:msub><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi>R</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mi mathvariant="normal">l</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mfenced open="(" close=")"><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">ℓ</mml:mi><mml:mi mathvariant="normal">△</mml:mi><mml:msub><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi>R</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mfenced><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula></p>
      <p id="d1e7135">The estimate of the tracer is made at the midpoints of the left and right
segments and at points displaced by <inline-formula><mml:math id="M254" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mrow><mml:mn mathvariant="normal">3</mml:mn><mml:mtext>-</mml:mtext><mml:mi mathvariant="normal">D</mml:mi></mml:mrow></mml:msub><mml:mo>/</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:math></inline-formula> from
them,
respectively.</p>
      <p id="d1e7160">The third approach used in the model is based on the gradient reconstruction.
The idea of this approach is to estimate the tracer at mid-edge locations
with
a linear reconstruction using the combination of centered and upwind
gradients: <inline-formula><mml:math id="M255" display="inline"><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi>e</mml:mi><mml:mo>±</mml:mo></mml:msubsup><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="normal">Θ</mml:mi><mml:mrow><mml:msub><mml:mi>v</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:msub><mml:mo>±</mml:mo><mml:msub><mml:mi mathvariant="normal">ℓ</mml:mi><mml:mi>e</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="normal">Θ</mml:mi><mml:msubsup><mml:mo>)</mml:mo><mml:mi>e</mml:mi><mml:mo>±</mml:mo></mml:msubsup><mml:mo>/</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:math></inline-formula>, where <inline-formula><mml:math id="M256" display="inline"><mml:mrow><mml:mi>i</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:mrow></mml:math></inline-formula> are the indices of edge vertices, and gradients
are computed as

                <disp-formula specific-use="align"><mml:math id="M257" display="block"><mml:mtable displaystyle="true"><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:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="normal">Θ</mml:mi><mml:msubsup><mml:mo>)</mml:mo><mml:mi>e</mml:mi><mml:mo>+</mml:mo></mml:msubsup><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">2</mml:mn><mml:mn mathvariant="normal">3</mml:mn></mml:mfrac></mml:mstyle><mml:mo>(</mml:mo><mml:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="normal">Θ</mml:mi><mml:msup><mml:mo>)</mml:mo><mml:mi mathvariant="normal">c</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">3</mml:mn></mml:mfrac></mml:mstyle><mml:mo>(</mml:mo><mml:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="normal">Θ</mml:mi><mml:msup><mml:mo>)</mml:mo><mml:mi mathvariant="normal">u</mml:mi></mml:msup><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mtext>and</mml:mtext></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:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="normal">Θ</mml:mi><mml:msubsup><mml:mo>)</mml:mo><mml:mi>e</mml:mi><mml:mo>-</mml:mo></mml:msubsup><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">2</mml:mn><mml:mn mathvariant="normal">3</mml:mn></mml:mfrac></mml:mstyle><mml:mo>(</mml:mo><mml:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="normal">Θ</mml:mi><mml:msup><mml:mo>)</mml:mo><mml:mi mathvariant="normal">c</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">3</mml:mn></mml:mfrac></mml:mstyle><mml:mo>(</mml:mo><mml:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="normal">Θ</mml:mi><mml:msup><mml:mo>)</mml:mo><mml:mi mathvariant="normal">d</mml:mi></mml:msup><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>

            Here, the upper index c means centered estimates, and u and d imply the
estimates on the up- and down-edge cells.</p>
      <p id="d1e7356">The advective flux of scalar quantity <inline-formula><mml:math id="M258" display="inline"><mml:mi mathvariant="normal">Θ</mml:mi></mml:math></inline-formula> through the face of the scalar
volume <inline-formula><mml:math id="M259" display="inline"><mml:mrow><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi>Q</mml:mi><mml:mi>e</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mfenced open="[" close="]"><mml:mrow><mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">ℓ</mml:mi><mml:mi mathvariant="normal">△</mml:mi></mml:mrow></mml:mfenced><mml:mi mathvariant="normal">l</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">ℓ</mml:mi><mml:mi mathvariant="normal">△</mml:mi></mml:mrow></mml:mfenced><mml:mi mathvariant="normal">r</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced></mml:mrow></mml:math></inline-formula> associated
with edge <inline-formula><mml:math id="M260" display="inline"><mml:mi>e</mml:mi></mml:math></inline-formula>, which leaves the control volume <inline-formula><mml:math id="M261" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ν</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> (see
Fig. <xref ref-type="fig" rid="Ch1.F1"/>), is

                <disp-formula id="Ch1.Ex45"><mml:math id="M262" display="block"><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:msub><mml:mi>Q</mml:mi><mml:mi>e</mml:mi></mml:msub><mml:msub><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi>e</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:msub><mml:mi>Q</mml:mi><mml:mi>e</mml:mi></mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi>e</mml:mi><mml:mo>+</mml:mo></mml:msubsup><mml:mo>+</mml:mo><mml:msubsup><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi>e</mml:mi><mml:mo>-</mml:mo></mml:msubsup></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:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:mi mathvariant="italic">γ</mml:mi><mml:mo>)</mml:mo><mml:mfenced open="|" close="|"><mml:mrow><mml:msub><mml:mi>Q</mml:mi><mml:mi>e</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mfenced open="(" close=")"><mml:mrow><mml:msubsup><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi>e</mml:mi><mml:mo>+</mml:mo></mml:msubsup><mml:mo>+</mml:mo><mml:msubsup><mml:mi mathvariant="normal">Θ</mml:mi><mml:mi>e</mml:mi><mml:mo>-</mml:mo></mml:msubsup></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M263" display="inline"><mml:mi mathvariant="italic">γ</mml:mi></mml:math></inline-formula> is the parameter controlling the upwind dissipation. Taking
<inline-formula><mml:math id="M264" display="inline"><mml:mrow><mml:mi mathvariant="italic">γ</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula> gives the third-order upwind method, whereas <inline-formula><mml:math id="M265" display="inline"><mml:mrow><mml:mi mathvariant="italic">γ</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> gives the
centered fourth-order estimate.</p>
      <p id="d1e7558">A quadratic upwind reconstruction is used in the vertical with the flux
boundary conditions on surface (Eqs. <xref ref-type="disp-formula" rid="Ch1.E8"/> and <xref ref-type="disp-formula" rid="Ch1.E9"/>) and zero flux at the bottom.
Other options for horizontal and vertical advection, including limiters, will
be introduced in the future.</p>
      <p id="d1e7565">The advection schemes are coded so that their order can be reduced toward the
first-order upwind for a very thin water layer to increase stability in the
presence of wetting and drying.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F2" specific-use="star"><label>Figure 2</label><caption><p id="d1e7570"><bold>(a)</bold> The bathymetry of the Sylt–Rømø Bight (provided
by Hans Burchard, personal communication, 2015) with the location of station
List-auf-Sylt; <bold>(b)</bold> the regular quasi-quadrilateral MESH-1 (200 m;
16 089 vertices, 15 578 quads, and 176 triangles); <bold>(c)</bold> the
triangular MESH-2 (14 193 vertices and 27 548 triangles); and
<bold>(d)</bold> the irregular quadrilateral MESH-3 (35 639 vertices, 34 820
quads, and 31 triangles).</p></caption>
          <?xmltex \igopts{width=341.433071pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/12/1009/2019/gmd-12-1009-2019-f02.jpg"/>

        </fig>

      <?xmltex \floatpos{t}?><fig id="Ch1.F3" specific-use="star"><label>Figure 3</label><caption><p id="d1e7592">Potential and kinetic energy. Panels <bold>(a, c)</bold> are for the
total area; panels <bold>(b, d)</bold> are for the area where the full depth exceeds
1 m.</p></caption>
          <?xmltex \igopts{width=369.885827pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/12/1009/2019/gmd-12-1009-2019-f03.png"/>

        </fig>

</sec>
<sec id="Ch1.S4.SS4">
  <title>Viscosity and filtering</title>
      <?pagebreak page1016?><p id="d1e7613">Consider the operator <inline-formula><mml:math id="M266" display="inline"><mml:mrow><mml:mi mathvariant="normal">∇</mml:mi><mml:mi>A</mml:mi><mml:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow></mml:math></inline-formula>. Its computation follows
the rule
            <disp-formula id="Ch1.Ex46"><mml:math id="M267" display="block"><mml:mrow><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi>c</mml:mi></mml:munder><mml:mi mathvariant="normal">∇</mml:mi><mml:mi>A</mml:mi><mml:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi mathvariant="normal">d</mml:mi><mml:mi>S</mml:mi><mml:mo>=</mml:mo><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>e</mml:mi><mml:mo>=</mml:mo><mml:mi>e</mml:mi><mml:mo>(</mml:mo><mml:mi>c</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:munder><mml:mi>A</mml:mi><mml:mi mathvariant="normal">ℓ</mml:mi><mml:msub><mml:mfenced close=")" open="("><mml:mrow><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow></mml:mfenced><mml:mi>e</mml:mi></mml:msub><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
          The estimate of velocity gradient on edge <inline-formula><mml:math id="M268" display="inline"><mml:mi>e</mml:mi></mml:math></inline-formula> is symmetrized following the
standard practice <xref ref-type="bibr" rid="bib1.bibx14" id="paren.28"/> over the values on neighboring cells.
“Symmetrized” means that the estimate on edge <inline-formula><mml:math id="M269" display="inline"><mml:mi>e</mml:mi></mml:math></inline-formula> is the mean of horizontal
velocity gradients computed on elements <inline-formula><mml:math id="M270" display="inline"><mml:mi>c</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M271" display="inline"><mml:mi>n</mml:mi></mml:math></inline-formula> (notation from article)
with the common edge <inline-formula><mml:math id="M272" display="inline"><mml:mi>e</mml:mi></mml:math></inline-formula>: <inline-formula><mml:math id="M273" display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi><mml:msub><mml:mo>)</mml:mo><mml:mi>e</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo>(</mml:mo><mml:mo>(</mml:mo><mml:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi><mml:msub><mml:mo>)</mml:mo><mml:mi>c</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mo>(</mml:mo><mml:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi><mml:msub><mml:mo>)</mml:mo><mml:mi>n</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>/</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:math></inline-formula>. The consequence of this symmetrization is that on regular
meshes (formed of equilateral triangles or rectangular quads) the information
from the nearest neighbors is lost. Any irregularity in velocity on the
nearest cells will not be penalized. Although unfavorable for both quads and
triangles, it has far-reaching implications for the latter: it cannot
efficiently remove the decoupling between the nearest velocities, which may
occur for triangular cells. This fact is well known, and the modification of
the scheme above that improves coupling between the nearest neighbors
consists of using the identity
            <disp-formula id="Ch1.Ex47"><mml:math id="M274" display="block"><mml:mrow><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">r</mml:mi><mml:mi mathvariant="normal">cn</mml:mi></mml:msub><mml:mo>/</mml:mo><mml:mfenced open="|" close="|"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">r</mml:mi><mml:mi mathvariant="normal">cn</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mo>+</mml:mo><mml:mfenced open="(" close=")"><mml:mrow><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">r</mml:mi><mml:mi mathvariant="normal">cn</mml:mi></mml:msub><mml:mo>/</mml:mo><mml:mfenced close="|" open="|"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">r</mml:mi><mml:mi mathvariant="normal">cn</mml:mi></mml:msub></mml:mrow></mml:mfenced></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M275" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">r</mml:mi><mml:mi mathvariant="normal">cn</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the vector connecting the centroid of cells
<inline-formula><mml:math id="M276" display="inline"><mml:mi>c</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M277" display="inline"><mml:mi>n</mml:mi></mml:math></inline-formula>. The derivative in the direction of <inline-formula><mml:math id="M278" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">r</mml:mi><mml:mi mathvariant="normal">cn</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is just
the difference between the neighboring velocities divided by the distance,
which is explicitly used to correct  <inline-formula><mml:math id="M279" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">n</mml:mi><mml:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow></mml:math></inline-formula>. It is
easy to show that on rectangular quads or equilateral triangles (<inline-formula><mml:math id="M280" display="inline"><mml:mi mathvariant="bold-italic">n</mml:mi></mml:math></inline-formula>
and <inline-formula><mml:math id="M281" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">r</mml:mi><mml:mrow><mml:mi>c</mml:mi><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> are collinear) the second term of the expression above
will disappear. This is the harmonic discretization and a biharmonic version
is obtained by applying the procedure twice.</p>
      <p id="d1e7898">A simpler algorithm is implemented to control grid-scale noise in the
horizontal velocity. It consists of adding to the right hand for the momentum
equation (2-D and 3-D flow) a term coupling the nearest velocities,
            <disp-formula id="Ch1.Ex48"><mml:math id="M282" display="block"><mml:mrow><mml:msub><mml:mi>F</mml:mi><mml:mi>c</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mfenced close=")" open="("><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:mi mathvariant="normal">f</mml:mi></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:munder><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>n</mml:mi><mml:mo>(</mml:mo><mml:mi>c</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:munder><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>n</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>c</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M283" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mi mathvariant="normal">f</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is a timescale selected experimentally. On regular<?pagebreak page1017?> meshes this
term is equivalent to the Laplacian operator. On general meshes it deviates
from the Laplacian, yet after some trivial adjustments it warrants momentum
conservation and energy dissipation <xref ref-type="bibr" rid="bib1.bibx15" id="paren.29"/>.</p>
</sec>
<sec id="Ch1.S4.SS5">
  <title>Wetting and drying algorithm</title>
      <p id="d1e7976">For modeling wetting and drying we use the method proposed by
<xref ref-type="bibr" rid="bib1.bibx47" id="text.30"/>. The idea of this method is to accurately
track the moving shoreline by employing the upwind water depth in the flux
computations. The criterion for a vertex to be wet or dry is taken as

                <disp-formula id="Ch1.Ex49"><mml:math id="M284" display="block"><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mfenced close="" open="{"><mml:mtable class="array" columnalign="left center left"><mml:mtr><mml:mtd><mml:mrow><mml:mtext>wet</mml:mtext><mml:mo>,</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mtext>if</mml:mtext></mml:mtd><mml:mtd><mml:mrow><mml:msub><mml:mi>D</mml:mi><mml:mi mathvariant="normal">wd</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mi>h</mml:mi><mml:mo>+</mml:mo><mml:mi mathvariant="italic">ζ</mml:mi><mml:mo>+</mml:mo><mml:msub><mml:mi>h</mml:mi><mml:mi>l</mml:mi></mml:msub><mml:mo>&gt;</mml:mo><mml:msub><mml:mi>D</mml:mi><mml:mo>min⁡</mml:mo></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mrow><mml:mtext>dry</mml:mtext><mml:mo>,</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mtext>if</mml:mtext></mml:mtd><mml:mtd><mml:mrow><mml:msub><mml:mi>D</mml:mi><mml:mi mathvariant="normal">wd</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mi>h</mml:mi><mml:mo>+</mml:mo><mml:mi mathvariant="italic">ζ</mml:mi><mml:mo>+</mml:mo><mml:msub><mml:mi>h</mml:mi><mml:mi>l</mml:mi></mml:msub><mml:mo>≤</mml:mo><mml:msub><mml:mi>D</mml:mi><mml:mo>min⁡</mml:mo></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mfenced></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M285" display="inline"><mml:mrow><mml:msub><mml:mi>D</mml:mi><mml:mo>min⁡</mml:mo></mml:msub></mml:mrow></mml:math></inline-formula> is the critical depth and <inline-formula><mml:math id="M286" display="inline"><mml:mrow><mml:msub><mml:mi>h</mml:mi><mml:mi>l</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the topography. Each cell
is treated as

                <disp-formula id="Ch1.Ex50"><mml:math id="M287" display="block"><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mfenced open="{" close=""><mml:mtable class="array" columnalign="left center left"><mml:mtr><mml:mtd><mml:mrow><mml:mtext>wet</mml:mtext><mml:mo>,</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mtext>if</mml:mtext></mml:mtd><mml:mtd><mml:mrow><mml:msub><mml:mi>D</mml:mi><mml:mi mathvariant="normal">wd</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo movablelimits="false">min⁡</mml:mo><mml:mspace linebreak="nobreak" width="0.125em"/><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mo>(</mml:mo><mml:mi>c</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mo movablelimits="false">max⁡</mml:mo><mml:msub><mml:mi mathvariant="italic">ζ</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mo>(</mml:mo><mml:mi>c</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msub><mml:mo>&gt;</mml:mo><mml:msub><mml:mi>D</mml:mi><mml:mo>min⁡</mml:mo></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mrow><mml:mtext>dry</mml:mtext><mml:mo>,</mml:mo></mml:mrow></mml:mtd><mml:mtd><mml:mtext>if</mml:mtext></mml:mtd><mml:mtd><mml:mrow><mml:msub><mml:mi>D</mml:mi><mml:mi mathvariant="normal">wd</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo movablelimits="false">min⁡</mml:mo><mml:mspace linebreak="nobreak" width="0.125em"/><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mo>(</mml:mo><mml:mi>c</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mo movablelimits="false">max⁡</mml:mo><mml:msub><mml:mi mathvariant="italic">ζ</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mo>(</mml:mo><mml:mi>c</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:msub><mml:mo>≤</mml:mo><mml:msub><mml:mi>D</mml:mi><mml:mo>min⁡</mml:mo></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mfenced></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M288" display="inline"><mml:mrow><mml:msub><mml:mi>h</mml:mi><mml:mi>v</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M289" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ζ</mml:mi><mml:mi>v</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> are the depth and sea surface height at the
vertices <inline-formula><mml:math id="M290" display="inline"><mml:mrow><mml:mi>v</mml:mi><mml:mo>(</mml:mo><mml:mi>c</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> of the cell <inline-formula><mml:math id="M291" display="inline"><mml:mi>c</mml:mi></mml:math></inline-formula>. When a cell is treated as dry, the velocity
at its center is set to zero and no volume flux passes through the boundaries
of scalar control volumes inside this cell.</p>
</sec>
</sec>
<sec id="Ch1.S5">
  <title>Numerical simulations</title>
      <p id="d1e8270">In this section we present the results of two model experiments. The first
considers tidal circulation in the Sylt–Rømø Bight. This area has
a complex morphometry with big zones of wetting–drying and large incoming
tidal waves. In this case our intention is to test the functioning of meshes of
various kinds. The second experiment simulates the southeast part of the North
Sea. For this area, an annual simulation of barotropic–baroclinic dynamics with
realistic boundary conditions on open and surface boundaries is carried out
and compared to observations. We note that a large number of simpler
experiments, including those in which analytical solutions are known, were
carried out in the course of model development to test and tune the model
accuracy and stability. Lessons learned from these were taken into account. We
omit their discussion in favor of realistic simulations.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F4" specific-use="star"><label>Figure 4</label><caption><p id="d1e8275"><bold>(a)</bold> Full ebb; <bold>(b)</bold> low water; <bold>(c)</bold> the
residual circulation. Simulation was performed on
MESH-1.</p></caption>
        <?xmltex \igopts{width=497.923228pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/12/1009/2019/gmd-12-1009-2019-f04.jpg"/>

      </fig>

      <?xmltex \floatpos{t}?><fig id="Ch1.F5" specific-use="star"><label>Figure 5</label><caption><p id="d1e8294"><bold>(a)</bold> Sea surface height (SSH)
for one tidal period in the station List-auf-Sylt (see
Fig. <xref ref-type="fig" rid="Ch1.F2"/>); <bold>(b)</bold> spectrum of the computed <inline-formula><mml:math id="M292" display="inline"><mml:mrow><mml:msub><mml:mi>M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> tidal
sea level at station List-auf-Sylt on MESH-1; <bold>(c)</bold> spectrum on
MESH-2; and <bold>(d)</bold> spectrum on MESH-3.</p></caption>
        <?xmltex \igopts{width=369.885827pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/12/1009/2019/gmd-12-1009-2019-f05.png"/>

      </fig>

<sec id="Ch1.S5.SS1">
  <?xmltex \opttitle{Sylt--R{\o}m{\o} experiment}?><title>Sylt–Rømø experiment</title>
      <p id="d1e8334">To test the code sensitivity to the type of grid and grid quality, we computed
barotropic tidally driven circulation in the Sylt–Rømø Bight in the
Wadden Sea.</p>
      <p id="d1e8337">It is a popular area for experiments and test cases
<xref ref-type="bibr" rid="bib1.bibx30 bib1.bibx45 bib1.bibx9 bib1.bibx40" id="paren.31"><named-content content-type="pre">e.g.,</named-content></xref>.
The Sylt and Rømø islands are connected to the mainland by artificial
dams, creating a relatively small semi-enclosed bight with a circulation
pattern well known from observations and modeling
<xref ref-type="bibr" rid="bib1.bibx4 bib1.bibx40" id="paren.32"><named-content content-type="pre">e.g.,</named-content></xref>. It is a tidally energetic region
with a water depth down to 30 m, characterized by wide intertidal flats and
a rugged coastline. Water is exchanged with the open sea through a relatively
narrow (up to 1.5 km wide) and deep (up to 30 m) tidal inlet, Lister Dyb.
The bathymetry data for the area were provided by Hans<?pagebreak page1019?> Burchard (personal
communication, 2015) and are presented in Fig. <xref ref-type="fig" rid="Ch1.F2"/>.</p>
      <p id="d1e8352">We constructed three different meshes (Fig. <xref ref-type="fig" rid="Ch1.F2"/>) for our
experiments. The first one is a nearly regular quadrilateral mesh,
complemented by triangles that straighten the coastline (MESH-1). Its spatial
resolution is 200 m. The second mesh is purely triangular (MESH-2) with
resolution varying from <inline-formula><mml:math id="M293" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">820</mml:mn></mml:mrow></mml:math></inline-formula> to <inline-formula><mml:math id="M294" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">90</mml:mn></mml:mrow></mml:math></inline-formula> m. The third mesh was
generated by the Gmsh mesh generator <xref ref-type="bibr" rid="bib1.bibx22" id="paren.33"/> and includes 34 820 quads
and 31 triangles with a minimum cell size of 30 m and maximum size of <inline-formula><mml:math id="M295" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">260</mml:mn></mml:mrow></mml:math></inline-formula> m (MESH-3). All meshes have 21 nonuniform sigma layers in the vertical
direction (refined near the surface and bottom). The wetting–drying option
is turned on. We apply the <inline-formula><mml:math id="M296" display="inline"><mml:mrow><mml:mi>k</mml:mi><mml:mo>-</mml:mo><mml:mi mathvariant="italic">ϵ</mml:mi></mml:mrow></mml:math></inline-formula> turbulence closure model with
transport equations for the turbulent kinetic energy and the turbulence
dissipation rate using the GOTM library. The second-moment closure is
represented by algebraic relations suggested by <xref ref-type="bibr" rid="bib1.bibx13" id="text.34"/>. The
experiment is forced by prescribing elevation due to an <inline-formula><mml:math id="M297" display="inline"><mml:mrow><mml:msub><mml:mi>M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> tidal wave at
the open boundary (western and northern boundaries of the domain) provided by
Hans Burchard (personal communication, 2015).</p>
      <p id="d1e8417">Simulations on each mesh were continued until reaching the steady state in
the tidal cycle of the <inline-formula><mml:math id="M298" display="inline"><mml:mrow><mml:msub><mml:mi>M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> wave. The last tidal period was analyzed.
Quasi-stationary behavior is already established in the second tidal period.
The simulated <inline-formula><mml:math id="M299" display="inline"><mml:mrow><mml:msub><mml:mi>M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> wave is essentially nonlinear during the tidal cycle
judged by the difference in amplitude of two tidal half-cycles.</p>
      <p id="d1e8443">Figure <xref ref-type="fig" rid="Ch1.F3"/> shows the behavior of potential and kinetic energies
in the entire domain, and the right panels show the energies computed
over the areas deeper than 1 m. The results are sensitive to the meshes,
which is explained further. The smallest tidal energy is simulated on the
triangular mesh (MESH-2). The reason is that with the same value of the
timescale <inline-formula><mml:math id="M300" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mi mathvariant="normal">f</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> in the filter used by us in these simulations, the
effective viscous dissipation is much higher on a triangular mesh than on
quadrilateral meshes of similar resolution. However, the solutions on
quadrilateral meshes are also different, and this time the reason is the
difference in the details of representing very shallow areas on meshes of
various resolution (MESH-3 is finer than MESH-1). The difference between the
simulations on two quadrilateral meshes is related to the potential energy
and comes from the difference in the elevation simulated in the areas subject
to wetting and drying (see Fig. <xref ref-type="fig" rid="Ch1.F8"/>). Note that the
velocities and layer thickness are small in these areas, so the difference
between kinetic energies in
Fig. <xref ref-type="fig" rid="Ch1.F3"/>c and d is small.</p>
      <p id="d1e8463">The average currents, sea level, and residual circulation simulated on MESH-1
are presented in Fig. <xref ref-type="fig" rid="Ch1.F4"/>. The results of this experiment
show good agreement with the previously published results of
<xref ref-type="bibr" rid="bib1.bibx45" id="text.35"/>.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F6" specific-use="star"><label>Figure 6</label><caption><p id="d1e8473"><bold>(a)</bold> Spectrum of the observation tidal sea level at station
List-auf-Sylt (see Fig. <xref ref-type="fig" rid="Ch1.F2"/>) from 1 to 15 January 2018;
<bold>(b)</bold> spectrum of the observation SSH for one tidal period with strong
wind (1 January 2018); and <bold>(c)</bold> spectrum of the observation SSH for
one tidal period with no wind (14 January 2018).</p></caption>
          <?xmltex \igopts{width=341.433071pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/12/1009/2019/gmd-12-1009-2019-f06.png"/>

        </fig>

      <p id="d1e8492">An example spectrum of level oscillations on station List-auf-Sylt from model
results is presented in Fig. <xref ref-type="fig" rid="Ch1.F5"/>. The amplitude of the
<inline-formula><mml:math id="M301" display="inline"><mml:mrow><mml:msub><mml:mi>M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> wave on quad meshes (MESH-1 and MESH-3) slightly exceeds 80 cm and is
a bit smaller on MESH-2. Similar behavior is seen for the second harmonics
(<inline-formula><mml:math id="M302" display="inline"><mml:mrow><mml:msub><mml:mi>M</mml:mi><mml:mn mathvariant="normal">4</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>) expressing nonlinear effects in this region. We tried to compare
model simulation with the observations
(<uri>https://www.pegelonline.wsv.de/gast/start</uri>, last access: 28 February
2019). For comparison, the observations were taken for the first half of
January 2018. Figure <xref ref-type="fig" rid="Ch1.F6"/> presents the range of
fluctuations for the whole period. As is seen, the main tidal wave <inline-formula><mml:math id="M303" display="inline"><mml:mrow><mml:msub><mml:mi>M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> has
a smaller amplitude (about 70 cm) than in simulations. However, the
high-frequency part of the spectrum is very noisy because of atmospheric
loading and winds. If the analysis is performed for separate tidal cycles in
cases of strong wind and no wind, the correspondence with observations is
recovered in the second case.</p>
      <?pagebreak page1020?><p id="d1e8536">Of particular interest is the convergence of the solution on different meshes.
For comparison the solutions simulated on MESH-2 and MESH-3 were interpolated to
MESH-1. The comparison was performed for the full tidal cycle and is
shown in Fig. <xref ref-type="fig" rid="Ch1.F7"/>, which presents histograms of the
differences.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F7" specific-use="star"><label>Figure 7</label><caption><p id="d1e8544">Histograms of the difference between solutions for the tidal cycle
of the <inline-formula><mml:math id="M304" display="inline"><mml:mrow><mml:msub><mml:mi>M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> wave on MESH-1 and MESH-2 <bold>(a, c, e)</bold> and on MESH-1 and
MESH-3 <bold>(b, d, f)</bold>. Top, middle, and bottom rows correspond to the
difference in elevation and the <inline-formula><mml:math id="M305" display="inline"><mml:mi>u</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M306" display="inline"><mml:mi>v</mml:mi></mml:math></inline-formula> components of velocity,
respectively.</p></caption>
          <?xmltex \igopts{width=341.433071pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/12/1009/2019/gmd-12-1009-2019-f07.png"/>

        </fig>

      <?xmltex \floatpos{t}?><fig id="Ch1.F8" specific-use="star"><label>Figure 8</label><caption><p id="d1e8586">Spatial distribution of the elevation differences for a full tidal
period for MESH-1 and MESH-2 <bold>(a)</bold> and for MESH-1 and
MESH-3 <bold>(b)</bold>.</p></caption>
          <?xmltex \igopts{width=341.433071pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/12/1009/2019/gmd-12-1009-2019-f08.png"/>

        </fig>

      <p id="d1e8601">For the solutions on MESH-1 and MESH-3 values at more than 80 % of points
agree within the range of <inline-formula><mml:math id="M307" display="inline"><mml:mrow><mml:mo>±</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> cm for the elevation (the maximum tidal
wave exceeds 1 m) and within the range of <inline-formula><mml:math id="M308" display="inline"><mml:mrow><mml:mo>±</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> cm s<inline-formula><mml:math id="M309" 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
velocity (the maximum horizontal velocity is about 120 cm s<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>). Thus,
the agreement between simulations on quadrilateral MESH-1 and MESH-3 is also
maintained on a local level. The agreement becomes worse when comparing
solutions on triangular MESH-2 and quadrilateral MESH-1. Here the share of
points with larger deviations is noticeably larger.</p>
      <p id="d1e8648">Spatial patterns of the differences for elevations and velocities simulated
on different meshes are presented in Figs. <xref ref-type="fig" rid="Ch1.F8"/>
and <xref ref-type="fig" rid="Ch1.F9"/>, respectively. Substantial differences for the
elevation are located in wetting and drying zones. This is related to<?pagebreak page1021?> the
sensitivity of the wetting and drying algorithm to the cell geometry. For the
horizontal velocity the difference between the solutions is defined by the
resolution of bottom topography in the most energetically active zone on the
quadrilateral meshes (see residual circulation in
Fig. <xref ref-type="fig" rid="Ch1.F4"/>). The difference between the triangular grid and
quadrilateral grid has a noisy character and is seen in the regions of
strongest depth gradients.</p>

      <?xmltex \floatpos{p}?><fig id="Ch1.F9"><label>Figure 9</label><caption><p id="d1e8659">Spatial distribution of the difference between the horizontal
velocities for the full tidal period of an <inline-formula><mml:math id="M311" display="inline"><mml:mrow><mml:msub><mml:mi>M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> wave:
<inline-formula><mml:math id="M312" display="inline"><mml:mi>u</mml:mi></mml:math></inline-formula> component <bold>(a, b)</bold>; <inline-formula><mml:math id="M313" display="inline"><mml:mi>v</mml:mi></mml:math></inline-formula> component <bold>(c, d)</bold>. The differences
are between MESH-1 and MESH-2 <bold>(a, c)</bold> and MESH-1 and
MESH-3 <bold>(b, d)</bold>.</p></caption>
          <?xmltex \igopts{width=241.848425pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/12/1009/2019/gmd-12-1009-2019-f09.png"/>

        </fig>

      <?xmltex \floatpos{t}?><fig id="Ch1.F10"><label>Figure 10</label><caption><p id="d1e8709">The area of the southeast North Sea experiment with mesh (black lines).
The red dot indicates the position of the Cuxhaven station. This mesh includes 31 406
quads and 32 triangles.</p></caption>
          <?xmltex \igopts{width=184.942913pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/12/1009/2019/gmd-12-1009-2019-f10.png"/>

        </fig>

      <?xmltex \floatpos{t}?><fig id="Ch1.F11" specific-use="star"><label>Figure 11</label><caption><p id="d1e8720">The simulated <inline-formula><mml:math id="M314" display="inline"><mml:mrow><mml:msub><mml:mi>M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> tidal map in the south North Sea experiment
compared to observations. The amplitude is in meters <bold>(a, c)</bold> and
phase <bold>(b, d)</bold> in degrees. <bold>(a, b)</bold> Model-to-observation
graphs; the numbers correspond to station numbers shown in <bold>(c, d)</bold>.
The color shows the amplitude in <bold>(a)</bold> and phase in <bold>(b)</bold>, and the
filled circles show the observational data. The red circle indicates the
position of Cuxhaven station. The total vector error is 0.24 m for 53
stations.</p></caption>
          <?xmltex \igopts{width=426.791339pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/12/1009/2019/gmd-12-1009-2019-f11.png"/>

        </fig>

      <?xmltex \floatpos{t}?><fig id="Ch1.F12" specific-use="star"><label>Figure 12</label><caption><p id="d1e8761">Modeled (blue line) and observed (gray dots and dashed black lines)
sea surface salinity (SSS) at the Cuxhaven station. The station is positioned
at the mouth of the Elbe River between stations 9 and 13 in
Fig. <xref ref-type="fig" rid="Ch1.F11"/>. Panel <bold>(a)</bold> shows 9 months of simulations, and
panel
<bold>(b)</bold> shows results from two selected days in May. The blue (modeled
with the Miura advection scheme) and thick dashed black (observation) lines
in <bold>(a)</bold> show running-mean SSS with a time window of 10 periods for the <inline-formula><mml:math id="M315" display="inline"><mml:mrow><mml:msub><mml:mi>M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula>
tidal wave. Thin dashed black lines are 1 standard deviation bounds of
the running-mean observed SSS in <bold>(a)</bold>.</p></caption>
          <?xmltex \igopts{width=312.980315pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/12/1009/2019/gmd-12-1009-2019-f12.png"/>

        </fig>

</sec>
<sec id="Ch1.S5.SS2">
  <title>Southeast North Sea circulation</title>
      <?pagebreak page1022?><p id="d1e8802">Here we present the results of realistic simulations of circulation in the
southeastern part of the North Sea. The area of simulations is limited by the
Dogger Bank and Horns Rev (Denmark) on the north and the border between Belgium
and the Netherlands on the west. It is characterized by complex bathymetry
with strong tidal dynamics <xref ref-type="bibr" rid="bib1.bibx34 bib1.bibx24" id="paren.36"/>. The related
estuarine circulation <xref ref-type="bibr" rid="bib1.bibx9 bib1.bibx19" id="paren.37"/>, strong lateral
salinity, and nutrient gradients and river plumes
<xref ref-type="bibr" rid="bib1.bibx53 bib1.bibx27" id="paren.38"/> are important aspects of this area. In our
simulations, the mesh consists of mainly quadrilateral cells. The mesh is
constructed with Gmsh <xref ref-type="bibr" rid="bib1.bibx22" id="paren.39"/> using the Blossom-Quad method
<xref ref-type="bibr" rid="bib1.bibx44" id="paren.40"/>. It includes 31 406 quads and only 32 triangles. The
mesh resolution (defined as the distance between vertices) varies between 0.5
and 1 km in the area close to the coast and Elbe estuary, coarsening to and
4–5 km at the open boundary (Fig. <xref ref-type="fig" rid="Ch1.F10"/>). The mesh contains
five
sigma layers in the vertical.</p>

      <?xmltex \floatpos{p}?><fig id="Ch1.F13"><label>Figure 13</label><caption><p id="d1e8825">Sea surface salinity on 26 June 2013. Filled contours are model
results, and colored lines are observational data from FerryBox (FunnyGirl)
<xref ref-type="bibr" rid="bib1.bibx38" id="paren.41"/>.</p></caption>
          <?xmltex \igopts{width=241.848425pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/12/1009/2019/gmd-12-1009-2019-f13.jpg"/>

        </fig>

      <p id="d1e8837">Bathymetry from the EMODnet Bathymetry Consortium (2016) has been used.
Model runs were forced by 6-hourly atmospheric data from NCEP/NCAR Reanalysis
<xref ref-type="bibr" rid="bib1.bibx25" id="paren.42"/> and daily resolved observed river runoff
<xref ref-type="bibr" rid="bib1.bibx41 bib1.bibx36" id="paren.43"/>. Salinity and temperature data on
the open boundary were extracted from hindcast simulations based on TRIM-NP
<xref ref-type="bibr" rid="bib1.bibx54" id="paren.44"/>. The sea surface elevation at the open boundary was
prescribed in terms of amplitudes and phase for <inline-formula><mml:math id="M316" display="inline"><mml:mrow><mml:msub><mml:mi>M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M317" display="inline"><mml:mrow><mml:msub><mml:mi>M</mml:mi><mml:mn mathvariant="normal">4</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> tidal waves
derived from the previous simulations of the North Sea
<xref ref-type="bibr" rid="bib1.bibx34 bib1.bibx15" id="paren.45"/>. Data for temperature and salinity
from the TRIM-NP model were used to initialize model runs for 1 year.<?pagebreak page1023?> The
results of these runs were used as initial conditions for a 10-month final
simulation.</p>
      <p id="d1e8875">The validation of simulated amplitudes and phases of the <inline-formula><mml:math id="M318" display="inline"><mml:mrow><mml:msub><mml:mi>M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> tidal wave is
presented in Fig. <xref ref-type="fig" rid="Ch1.F11"/>. This wave is the main tidal constituent
in this region. It enters the domain at the western boundary and propagates
along the coast as a Kelvin wave. The phase field is characterized by two
amphidromic points. We used the observed values from Ole Baltazar Andersen
(personal communication, 2008). for the comparison. The simulated amplitudes
are generally slightly smaller than the observed ones
(Fig. <xref ref-type="fig" rid="Ch1.F11"/>). The deviations in amplitudes can be explained by
uncertainty in model bathymetry and the use of a constant bottom friction
coefficient. The phases of the <inline-formula><mml:math id="M319" display="inline"><mml:mrow><mml:msub><mml:mi>M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> wave are well reproduced by the model.
We characterize its accuracy by the total vector error:

                <disp-formula id="Ch1.Ex51"><mml:math id="M320" display="block"><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><?xmltex \hack{\hbox\bgroup\fontsize{8.8}{8.8}\selectfont$\displaystyle}?><mml:mi mathvariant="italic">μ</mml:mi><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mi>N</mml:mi></mml:mfrac></mml:mstyle><mml:munderover><mml:mo movablelimits="false">∑</mml:mo><mml:mrow><mml:mi>n</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mi>N</mml:mi></mml:munderover><mml:msubsup><mml:mfenced open="(" close=")"><mml:mrow><mml:msup><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mo>*</mml:mo></mml:msub><mml:mi>cos⁡</mml:mi><mml:msub><mml:mi mathvariant="italic">φ</mml:mi><mml:mo>*</mml:mo></mml:msub><mml:mo>-</mml:mo><mml:mi>A</mml:mi><mml:mi>cos⁡</mml:mi><mml:mi mathvariant="italic">φ</mml:mi></mml:mrow></mml:mfenced><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mo>+</mml:mo><mml:msup><mml:mfenced open="(" close=")"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mo>*</mml:mo></mml:msub><mml:mi>sin⁡</mml:mi><mml:msub><mml:mi mathvariant="italic">φ</mml:mi><mml:mo>*</mml:mo></mml:msub><mml:mo>-</mml:mo><mml:mi>A</mml:mi><mml:mi>sin⁡</mml:mi><mml:mi mathvariant="italic">φ</mml:mi></mml:mrow></mml:mfenced><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mfenced><mml:mi>n</mml:mi><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>/</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:msubsup><mml:mo>,</mml:mo><?xmltex \hack{$\egroup}?></mml:mrow></mml:math></disp-formula>

          where <inline-formula><mml:math id="M321" display="inline"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mo>*</mml:mo></mml:msub></mml:mrow></mml:math></inline-formula>, <inline-formula><mml:math id="M322" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">φ</mml:mi><mml:mo>*</mml:mo></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M323" display="inline"><mml:mi>A</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math id="M324" display="inline"><mml:mi mathvariant="italic">φ</mml:mi></mml:math></inline-formula> are the observed and
computed amplitudes and phases, respectively, at <inline-formula><mml:math id="M325" display="inline"><mml:mi>N</mml:mi></mml:math></inline-formula> stations. The total
vector error is 0.24 m for 53 stations in the entire simulated domain, which
presents a reasonably good result for this region given the domain size. From
the results of comparison it is seen that observations at some stations, such
as station 7 in the open sea, differ considerably from the amplitude and
phase at the close stations. The comparison will improve if such outlier
stations are excluded.</p>
      <p id="d1e9046">To validate the simulated temperature and salinity we used data from the
COSYNA database <xref ref-type="bibr" rid="bib1.bibx3" id="paren.46"/> and ICES database
(<uri>http://www.ices.dk</uri>, last access: 28 February 2019). Comparisons of
modeled surface temperature and salinity show good Pearson correlation
coefficients of 0.98 and 0.9 with RMSD values of 1.24 and
0.98, respectively. The model can represent both seasonal changes in sea
surface temperature (SST) and salinity (SSS), as well as lateral gradients
(not shown) reasonably well. The modeled and observed SSS for Cuxhaven
station is presented in Fig. <xref ref-type="fig" rid="Ch1.F12"/> for simulations with the Miura
advection scheme.</p>
      <p id="d1e9057">The observations are from the station located in the mouth of the Elbe River
near the coast. They are characterized by a tidal amplitude in excess of
1.5 m, a horizontal salinity gradient of 0.35 PSU km<inline-formula><mml:math id="M326" 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> (during spring
tide up to 0.45 PSU km<inline-formula><mml:math id="M327" 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>) (<uri>https://www.portal-tideelbe.de</uri>, last
access: 28 February 2019, and <xref ref-type="bibr" rid="bib1.bibx26" id="altparen.47"/>), and an<?pagebreak page1024?> extended
wetting and drying area around this station. The simulation is in good
agreement with tidal filtered mean SSS (Fig. <xref ref-type="fig" rid="Ch1.F12"/>). The model
represents the summer flood event during June–July well.</p>
      <p id="d1e9092">Figure <xref ref-type="fig" rid="Ch1.F13"/> shows the calculated surface salinity field in
part of the simulated domain on 26 June 2013 in comparison with
the observational data from FerryBox (FunnyGirl) <xref ref-type="bibr" rid="bib1.bibx38" id="paren.48"/>. As can be
seen from the plot, there is a high consistency of the simulated results with
observational data.</p>
</sec>
</sec>
<sec id="Ch1.S6">
  <title>Discussion</title>
<sec id="Ch1.S6.SS1">
  <title>Triangles vs. quads: numerical performance</title>
      <p id="d1e9112">We examine the computational efficiency by comparing the CPU time needed to
simulate five tidal periods of an <inline-formula><mml:math id="M328" display="inline"><mml:mrow><mml:msub><mml:mi>M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> wave on MESH-1 and MESH-2 in the
Sylt–Rømø experiment, as presented in Fig. <xref ref-type="fig" rid="Ch1.F14"/>. The
number of vertices of the quadrilateral MESH-1 is approximately <inline-formula><mml:math id="M329" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">1.13</mml:mn></mml:mrow></mml:math></inline-formula>
that of triangular MESH-2, but the numbers of elements relate as <inline-formula><mml:math id="M330" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">0.57</mml:mn></mml:mrow></mml:math></inline-formula>. We have found that the total CPU times are in an approximate ratio of 1.62
(triangles <inline-formula><mml:math id="M331" display="inline"><mml:mo>/</mml:mo></mml:math></inline-formula> quads). The simulations were performed with the same time steps.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F14" specific-use="star"><label>Figure 14</label><caption><p id="d1e9157">CPU time on two meshes,
MESH-1 (black line) and MESH-2 (red line), for the Sylt–Rømø
experiment. The CPU time for 3-D velocity <bold>(a)</bold>, external
mode <bold>(b)</bold>, and the total CPU time <bold>(c)</bold>.</p></caption>
          <?xmltex \igopts{width=369.885827pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/12/1009/2019/gmd-12-1009-2019-f14.png"/>

        </fig>

      <?xmltex \floatpos{t}?><fig id="Ch1.F15" specific-use="star"><label>Figure 15</label><caption><p id="d1e9177">Temperature section along the channel as simulated on the
quadrilateral mesh <bold>(a)</bold>. The two inserts show the area adjacent to
the open boundary on the purely triangular mesh <bold>(a)</bold> and the mesh for
which the vicinity of the open boundary is rendered with quads <bold>(c)</bold>.
The dashed rectangle shows the area of the inserts. Numerical instability
evolves on a purely triangular mesh (blue ellipse).</p></caption>
          <?xmltex \igopts{width=341.433071pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/12/1009/2019/gmd-12-1009-2019-f15.png"/>

        </fig>

      <p id="d1e9196">The 3-D velocity part takes approximately the same CPU time as the
computation of vertically averaged velocity and<?pagebreak page1025?> elevation (external mode).
Operations on elements, which include the Coriolis and bottom friction terms
as well as computations of the gradients of velocity and scalars, are
approximately twice as cheap on quadrilateral meshes as expected.
Computations of viscosity and momentum transport are carried out in a cycle
over edges, which is 1.5 times shorter for meshes made of quadrilateral
elements and warrants a similar gain of <inline-formula><mml:math id="M332" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">1.5</mml:mn></mml:mrow></mml:math></inline-formula> in performance on
quadrilateral meshes. In our simulation, the net gain was <inline-formula><mml:math id="M333" display="inline"><mml:mrow><mml:mo>∼</mml:mo><mml:mn mathvariant="normal">1.62</mml:mn></mml:mrow></mml:math></inline-formula> times
on MESH-1 compared to MESH-2, despite the fact that the number of
vertices is 13 % larger than on MESH-2. The model is stable on the
quadrilateral meshes with smaller horizontal viscosity, which is also an
advantage.</p>
</sec>
<sec id="Ch1.S6.SS2">
  <title>Triangles vs. quads: open boundaries</title>
      <p id="d1e9225">The presence of open boundaries is a distinctive feature of regional models.
The implementation of robust algorithms for the open boundary is more
complicated on unstructured triangular meshes than on structured
quadrilateral meshes. For example, it is more difficult to cleanly assess the
propagation of perturbations toward the boundary in this case. In addition,
spurious inertial modes can be excited on triangular meshes in the case of
the cell-vertex discretization used by us, which in practice leads to additional
instabilities in the vicinity of the open boundary. The ability to use hybrid
meshes is very helpful in this case. Indeed, even if the mesh is
predominantly triangular, the vicinity of the open boundary can be constructed of
quadrilateral elements.</p>
      <p id="d1e9228">We illustrate improvements of the dynamics in the vicinity of the open
boundary by simulating baroclinic tidal dynamics in an idealized channel with
an underwater sill. The channel is 12 km in length and 3 km in width, with
a maximum depth of 200 m near the open boundary. The sill, with a height
of 150 m, is located in the central part of the channel. The flow is forced
at the open boundaries by a tide with the period of an <inline-formula><mml:math id="M334" display="inline"><mml:mrow><mml:msub><mml:mi>M</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msub></mml:mrow></mml:math></inline-formula> wave and amplitude
of 1 cm, applied in antiphase. The left part of the channel contains denser
waters than the right one.</p>
      <p id="d1e9242">Three meshes were used for these simulations. The first one is a
quadrilateral mesh with a horizontal resolution of 200 m refined to 20 m
in the vicinity of the underwater sill. The second one is a purely triangular
mesh obtained from the quadrilateral mesh by splitting quads into triangles.
The third mesh is predominantly triangular, but for the zones close to the
open boundary it is also quadrilateral.</p>
      <p id="d1e9245">Figure <xref ref-type="fig" rid="Ch1.F15"/> illustrates that at times close to the maximum
inflow (8 h 20 m), a strong computational instability due to the
interaction between baroclinic and barotropic flow components evolves on the
right open boundary on the triangular mesh, eventually leading to the blowup
of the solution (see the left insert). However, by replacing triangles in a
small domain adjacent to the open boundary with quadrilateral cells we
stabilize the numerical solution (see the right<?pagebreak page1026?> insert), which allows us to
cleanly handle the directions normal and tangent to the boundary.</p>
</sec>
</sec>
<sec id="Ch1.S7" sec-type="conclusions">
  <title>Conclusions</title>
      <p id="d1e9257">We described the numerical implementation of the three-dimensional
unstructured-mesh model FESOM-C, relying on FESOM2 and intended for coastal
simulations. The model is based on a finite-volume cell-vertex discretization
and works on hybrid unstructured meshes composed of triangles and quads.</p>
      <p id="d1e9260">We illustrated the model performance with two test simulations.</p>
      <p id="d1e9263">Sylt–Rømø Bight is a closed Wadden Sea basin characterized by a
complex morphometry and high tidal activity. A sensitivity study was carried
out to elucidate the dependence of simulated surface elevation and horizontal
velocity on mesh type and quality. The elevation simulated in zones of
wetting and drying may depend on the mesh structure, which may lead to
distinctions in the simulated energy on different meshes. The total energy
comparison shows that on the triangular MESH-2, having approximately the same
number of vertices as MESH-1, the solution is more dissipative; higher
dissipation is generally needed to stabilize it against spurious inertial
modes.</p>
      <p id="d1e9266">The second experiment deals with the southeastern part of the North Sea.
Computation relied on the boundary information from hindcast simulations by
the TRIM-NP and realistic atmospheric forcing from NCEP/NCAR. Modeling
results agree both qualitatively and quantitatively with observations for the
full period of simulation.</p>
      <p id="d1e9270">Future development of the FESOM-C will include coupling with the global
FESOM2 <xref ref-type="bibr" rid="bib1.bibx16" id="paren.49"/>, the addition of monotonic high-order schemes and sea
ice from FESOM2, and various modules that would increase the functionality of
FESOM-C.</p>
</sec>

      
      </body>
    <back><notes notes-type="codedataavailability"><title>Code and data availability</title>

      <p id="d1e9280">The version of FESOM-C v.2 used to carry out
simulations reported here can be accessed from <ext-link xlink:href="https://doi.org/10.5281/zenodo.2085177" ext-link-type="DOI">10.5281/zenodo.2085177</ext-link>.
The General Ocean Turbulence Model (GOTM) <xref ref-type="bibr" rid="bib1.bibx7" id="paren.50"/> implemented into the
FESOM-C code is published under the GNU Public License and can be freely
used. The meshes are constructed with the Gmsh software <xref ref-type="bibr" rid="bib1.bibx22" id="paren.51"/>.
Bathymetry used in the model simulation (Southeast North
Sea experiment) is received from the EMODnet Bathymetry Consortium (2016)
database (<ext-link xlink:href="https://doi.org/10.12770/c7b53704-999d-4721-b1a3-04ec60c87238" ext-link-type="DOI">10.12770/c7b53704-999d-4721-b1a3-04ec60c87238</ext-link>) and is freely
available online. The TRIM-NP model is used to initialize runs for 1 year
<xref ref-type="bibr" rid="bib1.bibx54" id="paren.52"/>. NCEP/NCAR reanalysis atmospheric forcing data
<xref ref-type="bibr" rid="bib1.bibx25" id="paren.53"/> used in the model are freely available online.</p>
  </notes><notes notes-type="authorcontribution"><title>Author contributions</title>

      <p id="d1e9305">AA is the developer of the FESOM-C model with support from VF,
IK, and SD. VF, IK, and AA carried out the experiment. AA wrote the paper
with support from SD, VF, and IK. SH and NR carried out the code optimization
and parallelization. KHW and HB contributed with discussions of
many preliminary results. KHW helped supervise the project. All authors
discussed the results and commented on the paper at all stages.</p>
  </notes><notes notes-type="competinginterests"><title>Competing interests</title>

      <p id="d1e9311">The authors declare that they have no conflict of
interest.</p>
  </notes><ack><title>Acknowledgements</title><p id="d1e9317">We are grateful to Jens Schröter, Wolfgang  Hiller, Peter Lemke, and Thomas
Jung for supporting our
work.<?xmltex \hack{\newline}?><?xmltex \hack{\newline}?>
The article processing charges for this open-access <?xmltex \hack{\newline}?>
publication were covered by a Research <?xmltex \hack{\newline}?> Centre of the
Helmholtz Association. <?xmltex \hack{\newline}?><?xmltex \hack{\newline}?>
Edited by: Robert Marsh <?xmltex \hack{\newline}?>
Reviewed by: two anonymous referee</p></ack><ref-list>
    <title>References</title>

      <ref id="bib1.bibx1"><label>Androsov et al.(1995)</label><mixed-citation>Androsov, A. A., Klevanny, K. A., Salusti, E. S., and Voltzinger, N. E.: Open
boundary conditions for horizontal 2-D curvilinear-grid long-wave dynamics of
a strait, Adv. Water Resour., 18, 267–276,
<ext-link xlink:href="https://doi.org/10.1016/0309-1708(95)00017-D" ext-link-type="DOI">10.1016/0309-1708(95)00017-D</ext-link>, 1995.</mixed-citation></ref>
      <ref id="bib1.bibx2"><label>Barnier et al.(1995)</label><mixed-citation>Barnier, B., Siefridt, L., and Marchesiello, P.: Thermal forcing for a global
ocean circulation model using a three-year climatology of ECMWF analyses, J.
Marine Syst., 6, 363–380, <ext-link xlink:href="https://doi.org/10.1016/0924-7963(94)00034-9" ext-link-type="DOI">10.1016/0924-7963(94)00034-9</ext-link>, 1995.</mixed-citation></ref>
      <ref id="bib1.bibx3"><label>Baschek et al.(2017)</label><mixed-citation>Baschek, B., Schroeder, F., Brix, H., Riethmüller, R., Badewien, T. H.,
Breitbach, G., Brügge, B., Colijn, F., Doerffer, R., Eschenbach, C.,
Friedrich, J., Fischer, P., Garthe, S., Horstmann, J., Krasemann, H.,
Metfies, K., Merckelbach, L., Ohle, N., Petersen, W., Pröfrock, D.,
Röttgers, R., Schlüter, M., Schulz, J., Schulz-Stellenfleth, J.,
Stanev, E., Staneva, J., Winter, C., Wirtz, K., Wollschläger, J.,
Zielinski, O., and Ziemer, F.: The Coastal Observing System for Northern and
Arctic Seas (COSYNA), Ocean Sci., 13, 379–410, <ext-link xlink:href="https://doi.org/10.5194/os-13-379-2017" ext-link-type="DOI">10.5194/os-13-379-2017</ext-link>,
2017.</mixed-citation></ref>
      <ref id="bib1.bibx4"><label>Becherer et al.(2011)</label><mixed-citation>Becherer, J., Burchard, H., Floeser, G., Mohrholz, V., and Umlauf, L.:
Evidence of tidal straining in well-mixed channel flow from micro-structure
observations, Geophys. Res. Lett., 38, L17611, <ext-link xlink:href="https://doi.org/10.1029/2011GL049005" ext-link-type="DOI">10.1029/2011GL049005</ext-link>,
2011.</mixed-citation></ref>
      <ref id="bib1.bibx5"><label>Benjamin(1968)</label><mixed-citation>
Benjamin, T. B.: Gravity currents and related phenomena, J. Fluid Mech., 31,
209–248, 1968.</mixed-citation></ref>
      <ref id="bib1.bibx6"><label>Blumberg and Mellor(1987)</label><mixed-citation>
Blumberg, A. F. and Mellor, G. L.: A Description of a three-dimensional
coastal ocean circulation model, in: Three-dimensional Coastal Ocean Models,
edited by: Mooers, C. N. K., Coast. Est. S., 4, 1–16, 1987.</mixed-citation></ref>
      <ref id="bib1.bibx7"><label>Burchard et al.(1999)</label><mixed-citation>
Burchard, H., Bolding, K., and Ruiz-Villarreal, M.,: GOTM, a general ocean
turbulence model. Theory, implementation and test cases, European Commission,
Tech. Rep. EUR 18745 EN, 1999.</mixed-citation></ref>
      <?pagebreak page1027?><ref id="bib1.bibx8"><label>Burchard and Bolding(2002)</label><mixed-citation>
Burchard, H. and Bolding, K.: GETM, a general estuarine transport model.
Scientific documentation, European Commission,  Tech. Rep. EUR 20253 EN, 2002.</mixed-citation></ref>
      <ref id="bib1.bibx9"><label>Burchard et al.(2008)</label><mixed-citation>Burchard, H., Flöser, G., Staneva, J. V., Badewien, T. H., and
Riethmüller, R.: Impact of Density Gradients on Net Sediment Transport
into the Wadden Sea, J. Phys. Oceanogr., 38, 566–587,
<ext-link xlink:href="https://doi.org/10.1175/2007JPO3796.1" ext-link-type="DOI">10.1175/2007JPO3796.1</ext-link>, 2008.</mixed-citation></ref>
      <ref id="bib1.bibx10"><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. Fl., 32, 331–348,
2000.</mixed-citation></ref>
      <ref id="bib1.bibx11"><label>Cebeci and Smith(1974)</label><mixed-citation>
Cebeci, T. and Smith, A. M. O.: Analysis of Turbulent Boundary Layers,
Academic Press, New York, 1974.</mixed-citation></ref>
      <ref id="bib1.bibx12"><label>Chen et al.(2003)</label><mixed-citation>
Chen, C., Liu, H., and Beardsley, R. C.: An unstructured, finite volume,
three-dimensional, primitive equation ocean model: application to coastal
ocean and estuaries, J. Atmos. Ocean. Tech., 20, 159–186, 2003.</mixed-citation></ref>
      <ref id="bib1.bibx13"><label>Cheng et al.(2002)</label><mixed-citation>
Cheng, Y., Canuto, V. M., and Howard, A. M.: An improved model for the
turbulent PBL, J. Atmos. Sci., 59, 1550–1565, 2002.</mixed-citation></ref>
      <ref id="bib1.bibx14"><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.bibx15"><label>Danilov and Androsov(2015)</label><mixed-citation>Danilov, S. and Androsov, A.: Cell-vertex discretization of shallow water
equations on mixed unstructured meshes, Ocean Dynam., 65, 33–47,
<ext-link xlink:href="https://doi.org/10.1007/s10236-014-0790-x" ext-link-type="DOI">10.1007/s10236-014-0790-x</ext-link>, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx16"><label>Danilov et al.(2017)</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.bibx17"><label>Deleersnijder and Roland(1993)</label><mixed-citation>
Deleersnijder, E. and Roland, M.: Preliminary tests of a hybrid
numerical-asymptotic method for solving nonlinear advection-diffusion
equations in a domain limited by a selfadjusting boundary, Math. Comput.
Model., 17, 35–47, 1993.</mixed-citation></ref>
      <ref id="bib1.bibx18"><label>Deleersnijder(1993)</label><mixed-citation>
Deleersnijder, E.: Numerical mass conservation in a free-surface sigma
coordinate marine model with mode splitting, J. Marine Syst., 4, 365–370,
1993.</mixed-citation></ref>
      <ref id="bib1.bibx19"><?xmltex \def\ref@label{Fl\"{o}ser et al.(2011)}?><label>Flöser et al.(2011)</label><mixed-citation>
Flöser, G., Burchard, H., and Riethmüller, R.: Observational evidence
for estuarine circulation in the German Wadden Sea, Cont. Shelf Res., 31,
1633–1639, 2011.</mixed-citation></ref>
      <ref id="bib1.bibx20"><label>Fringer et al.(2006)</label><mixed-citation>
Fringer, O. B., Gerritsen, M., and Street, R. L.: An unstructured-grid,
finite-volume, nonhydrostatic, parallel coastal ocean simulator, Ocean
Model., 14, 139–173, 2006.</mixed-citation></ref>
      <ref id="bib1.bibx21"><label>Gadd(1978)</label><mixed-citation>Gadd, A. J.: A split explicit integration scheme for numerical weather
prediction, Q. J. Roy. Meteor. Soc., 104, 569–582,
<ext-link xlink:href="https://doi.org/10.1002/qj.49710444103" ext-link-type="DOI">10.1002/qj.49710444103</ext-link>, 1978.</mixed-citation></ref>
      <ref id="bib1.bibx22"><label>Geuzaine and Remacle(2009)</label><mixed-citation>
Geuzaine, C. and Remacle, J.-F.: Gmsh: a three-dimensional finite element
mesh generator with built-in pre- and post-processing facilities, Int. J.
Numer. Meth. Eng., 79, 1309–1331, 2009.</mixed-citation></ref>
      <ref id="bib1.bibx23"><label>Higdon(2008)</label><mixed-citation>
Higdon, R. L.: A comparison of two formulations of barotropic-baroclinic
splitting for layered models of ocean circulation, Ocean Model., 24, 29–45,
2008.</mixed-citation></ref>
      <ref id="bib1.bibx24"><label>Idier et al.(2017)</label><mixed-citation>
Idier, D., Paris, F., Cozannet, G. L., Boulahya, F., and Dumas, F.: Sea-level
rise impacts on the tides of the European Shelf, Cont. Shelf Res., 137,
56–71, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx25"><label>Kalnay et al.(1996)</label><mixed-citation>
Kalnay, E., Kanamitsu, M., Kistler, R., Collins, W., Deaven, D., Gandin, L.,
Iredell, M., Saha, S., White, G., Woollen, J., Zhu, Y., Leetmaa, A.,
Reynolds, B., Chelliah, M., Ebisuzaki, W., Higgins, W., Janowiak, J., Mo, K.
C., Ropelewski, C., Wang, J., Jenne, R., and Joseph, D.: The NCEP/NCAR
40-Year Reanalysis Project. B. Am. Meteorol. Soc., 77, 437–472, 1996.</mixed-citation></ref>
      <ref id="bib1.bibx26"><label>Kappenberg et al.(2018)</label><mixed-citation>Kappenberg, J., Berendt, M., Ohle, N., Riethmuller, R., Schuster, D., and
Strotmann, T.: Variation of Hydrodynamics and Water Constituents in the Mouth
of the Elbe Estuary, Germany, Civil Eng. Res. J., 4, 555643,
<ext-link xlink:href="https://doi.org/10.19080/CERJ.2018.04.555643" ext-link-type="DOI">10.19080/CERJ.2018.04.555643</ext-link>, 2018.</mixed-citation></ref>
      <ref id="bib1.bibx27"><label>Kerimoglu et al.(2017)</label><mixed-citation>Kerimoglu, O., Hofmeister, R., Maerz, J., Riethmüller, R., and Wirtz, K.
W.: The acclimative biogeochemical model of the southern North Sea,
Biogeosciences, 14, 4499–4531, <ext-link xlink:href="https://doi.org/10.5194/bg-14-4499-2017" ext-link-type="DOI">10.5194/bg-14-4499-2017</ext-link>, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx28"><label>Lazure and Dumas(2008)</label><mixed-citation>
Lazure, P. and Dumas F.: An external–internal mode coupling for a 3D
hydrodynamical model for applications at regional scale (MARS), Adv. Water
Resour., 31, 233–250, 2008.</mixed-citation></ref>
      <ref id="bib1.bibx29"><label>Le Roux(2012)</label><mixed-citation>
Le Roux, D. Y.: Spurious inertial oscillations in shallow-water models, J.
Comput. Phys., 231, 7959–7987, 2012.</mixed-citation></ref>
      <ref id="bib1.bibx30"><label>Lumborg and Pejrup(2005)</label><mixed-citation>
Lumborg, U. and Pejrup, M.: Modelling of cohesive sediment transport in a
tidal lagoon an annual budget, Mar. Geol., 218, 1–16, 2005.</mixed-citation></ref>
      <ref id="bib1.bibx31"><label>Luyten et al.(1999)</label><mixed-citation>
Luyten, P. J., Jones, J. E., Proctor, R., Tabor, A., Tett P., and Wild-Allen,
K., COHERENS – A coupled hydrodynamical-ecological model for regional and
shelf seas: User Documentation. MUMM Report, Management Unit of the
Mathematical Models of the north Sea, Belgium, 911 pp., 1999.</mixed-citation></ref>
      <ref id="bib1.bibx32"><label>Marchesiello et al.(2001)</label><mixed-citation>Marchesiello, P., McWilliams J. C., and Shchepetkin, A.: Open boundary
conditions for long-term integration of regional oceanic models, Ocean
Model., 3, 1–20, <ext-link xlink:href="https://doi.org/10.1016/S1463-5003(00)00013-5" ext-link-type="DOI">10.1016/S1463-5003(00)00013-5</ext-link>, 2001.</mixed-citation></ref>
      <ref id="bib1.bibx33"><label>Marshall et al.(1997)</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>, 1997.</mixed-citation></ref>
      <ref id="bib1.bibx34"><?xmltex \def\ref@label{Ma{\ss}mann et al.(2010)}?><label>Maßmann et al.(2010)</label><mixed-citation>Maßmann, S., Androsov, A., and Danilov, S.: Intercomparison between
finite element and finite volume approaches to model North Sea tides, Cont.
Shelf Res., 30, 680–691, <ext-link xlink:href="https://doi.org/10.1016/j.csr.2009.07.004" ext-link-type="DOI">10.1016/j.csr.2009.07.004</ext-link>, 2010.</mixed-citation></ref>
      <ref id="bib1.bibx35"><label>Miura(2007)</label><mixed-citation>
Miura, H.: An upwind-biased conservative advection scheme for spherical
hexagonal-pentagonal grids, Mon. Weather Rev., 135, 4038–4044, 2007.</mixed-citation></ref>
      <ref id="bib1.bibx36"><?xmltex \def\ref@label{P\"{a}tsch and Lenhart(2011)}?><label>Pätsch and Lenhart(2011)</label><mixed-citation>
Pätsch, J. and Lenhart, H. J.: Daily Loads of Nutrients, Total
Alkalinity, Dissolved Inorganic Carbon and Dissolved Organic Carbon of the
European Continental Rivers for the Years 1977–2002, Berichte aus dem
Zentrum für Meeres- und Klimaforschung/B: Ozeanographie/Institut für
Meereskunde, Inst. für Meereskunde, Universität Hamburg, Germany,
2011.</mixed-citation></ref>
      <ref id="bib1.bibx37"><?xmltex \def\ref@label{P\"{a}tsch and Lenhart(2004)}?><label>Pätsch and Lenhart(2004)</label><mixed-citation>
Pätsch, J. and Lenhart, H. J.: Daily Loads of Nutrients, Total
Alkalinity, Dissolved Inorganic Carbon and Dissolved Organic Carbon of the
European Continental Rivers for the Years 1977–2002, Berichte aus dem
Zentrum für Meeres- und Klimaforschung; Reihe B: Ozeanographie, 48,
159 pp., 2004.</mixed-citation></ref>
      <ref id="bib1.bibx38"><label>Petersen(2014)</label><mixed-citation>
Peterson, W.: FerryBox systems: State-of-the-art in Europe and future
development, J. Marine Syst., 140, 4–12, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx39"><label>Phillips(1957)</label><mixed-citation>
Phillips, N. A.: A coordinate system having some special advantages for
numerical forecasting, J. Meteorol., 14, 184–185, 1957.</mixed-citation></ref>
      <ref id="bib1.bibx40"><label>Purkiani et al.(2014)</label><mixed-citation>Purkiani, K., Becherer, J., Flöser, G., Gräwe, U., Mohrholz, V.,
Schuttelaars, H. M., and Burchard, H.: Numerical analysis of stratification
and destratification processes in a tidally energetic inlet with an ebb tidal
delta, J. Geophys. Res.-Oceans, 120, 225–243, <ext-link xlink:href="https://doi.org/10.1002/2014JC010325" ext-link-type="DOI">10.1002/2014JC010325</ext-link>,
2014.</mixed-citation></ref>
      <ref id="bib1.bibx41"><?xmltex \def\ref@label{Radach and P\"{a}tsch(2007)}?><label>Radach and Pätsch(2007)</label><mixed-citation>
Radach, G. and Pätsch, J.: Variability of continental riverine freshwater
and nutri<?pagebreak page1028?>ent inputs into the North Sea for the years 1977–2000 and its
consequences for the assessment of eutrophication, Estuar. Coast., 30,
66–81, 2007.</mixed-citation></ref>
      <ref id="bib1.bibx42"><label>Raymond and Kuo(1984)</label><mixed-citation>Raymond, H. W. and Kuo, L. H.: A radiation boundary condition for
multi-dimensional flows, Q. J. Roy. Meteor. Soc., 110, 535–551,
<ext-link xlink:href="https://doi.org/10.1002/qj.49711046414" ext-link-type="DOI">10.1002/qj.49711046414</ext-link>, 1984.</mixed-citation></ref>
      <ref id="bib1.bibx43"><label>Reid(1957)</label><mixed-citation>
Reid, R. O.: Modification of the quadratic bottom-stress law for turbulent
channel flow in the presence of surface wind-stress, U.S. Army Corps of
Engineers, Beach Erosion Board. Tech. Memo., 3, 33 pp., 1957.</mixed-citation></ref>
      <ref id="bib1.bibx44"><label>Remacle et al.(2012)</label><mixed-citation>
Remacle, J.-F., Lambrechts, J., Seny, B., Marchandise, E., Johnen A., and
Geuzainet, C.: Blossom-Quad: A non-uniform quadrilateral mesh generator using
a minimum-cost perfect-matching algorithm, Int. J. Numer. Meth. Eng., 89,
1102–1119, 2012.</mixed-citation></ref>
      <ref id="bib1.bibx45"><label>Ruiz-Villarreal et al.(2005)</label><mixed-citation>
Ruiz-Villarreal, M., Bolding, K., Burchard, H., and Demirov, E.: Coupling of
the GOTM turbulence module to some three-dimensional ocean models, Marine
Turbulence: Theories, Observations, and Models Results of the CARTUM Project,
225–237, 2005.</mixed-citation></ref>
      <ref id="bib1.bibx46"><label>Shchepetkin and McWilliams(2005)</label><mixed-citation>
Shchepetkin, A. F. and McWilliams, J. C.: The Regional Ocean Modeling System:
A split-explicit, free-surface, topography following coordinates ocean model,
Ocean Model., 9, 347–404, 2005.</mixed-citation></ref>
      <ref id="bib1.bibx47"><label>Stelling and Duinmeijer(2003)</label><mixed-citation>Stelling, G. S. and Duinmeijer, S. P. A.: A staggered conservative scheme for
every Froude number in rapidly varied shallow water flows, Int. J. Numer.
Meth. Fl., 43, 1329–1354, <ext-link xlink:href="https://doi.org/10.1002/fld.537" ext-link-type="DOI">10.1002/fld.537</ext-link>, 2003.</mixed-citation></ref>
      <ref id="bib1.bibx48"><label>Umlauf and Burchard(2005)</label><mixed-citation>
Umlauf, L. and Burchard, H.: Second-order turbulence closure models for
geophysical boundary layers. A review of recent work, Cont. Shelf Res., 25,
795–827, 2005.</mixed-citation></ref>
      <ref id="bib1.bibx49"><label>Umlauf et al.(2005)</label><mixed-citation>
Umlauf, L., Burchard, H., and Bolding, K.: General Ocean Turbulence Model.
Scientific documentation, v3.2, Marine Science Reports 63, 274 pp., 2005.</mixed-citation></ref>
      <ref id="bib1.bibx50"><label>Umlauf et al.(2007)</label><mixed-citation>Umlauf, L., Burchard, H., and Bolding, K.: GOTM, Sourcecode and Test Case
Documentation, Version 4.0, available at:
<uri>https://gotm.net/manual/stable/pdf/a4.pdf</uri> (last access: 1 March 2019),
2007.
</mixed-citation></ref><?xmltex \hack{\newpage}?>
      <ref id="bib1.bibx51"><label>Voltzinger(1985)</label><mixed-citation>
Voltzinger, N. E.: Long Waves on Shallow Water, Gidrometioizdat, Leningrad,
160 pp., 1985 (in Russian).</mixed-citation></ref>
      <ref id="bib1.bibx52"><label>Voltzinger et al.(1989)</label><mixed-citation>
Voltzinger, N. E., Klevanny, K. A., and Pelinovsky, E. N.: Long-Wave Dynamics
of the Coastal Zone, Gidrometioizdat, Leningrad, 272 pp., 1989 (in Russian).</mixed-citation></ref>
      <ref id="bib1.bibx53"><label>Voynova et al.(2017)</label><mixed-citation>Voynova, Y. G., Brix, H., Petersen, W., Weigelt-Krenz, S., and Scharfe, M.:
Extreme flood impact on estuarine and coastal biogeochemistry: the 2013 Elbe
flood, Biogeosciences, 14, 541–557, <ext-link xlink:href="https://doi.org/10.5194/bg-14-541-2017" ext-link-type="DOI">10.5194/bg-14-541-2017</ext-link>, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx54"><label>Weisse et al.(2015)</label><mixed-citation>Weisse, R., Bisling, P., Gaslikova, L., Geyer, B., Groll, N., Hortamani, M.,
Matthias, V., Maneke, M., Meinke, I., Meyer, E., Schwichtenberg, F., Stempinski,
F., Wiese, F., and Wöckner-Kluwe, K.: Climate services for marine applications
in Europe, Earth Perspectives, 2, 3, <ext-link xlink:href="https://doi.org/10.1186/s40322-015-0029-0" ext-link-type="DOI">10.1186/s40322-015-0029-0</ext-link>, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx55"><label>Wang et al.(2014)</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>
      <ref id="bib1.bibx56"><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, 2008.</mixed-citation></ref>
      <ref id="bib1.bibx57"><label>Zhang et al.(2016)</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>FESOM-C v.2: coastal dynamics on hybrid unstructured meshes</article-title-html>
<abstract-html><p>We describe FESOM-C, the
coastal branch of the Finite-volumE Sea ice – Ocean Model (FESOM2), which
shares with FESOM2 many numerical aspects, in particular its finite-volume
cell-vertex discretization. Its dynamical core differs in the implementation
of time stepping, the use of a terrain-following vertical coordinate, and the
formulation for hybrid meshes composed of triangles and quads. The first two
distinctions were critical for coding FESOM-C as an independent branch. The
hybrid mesh capability improves numerical efficiency, since quadrilateral
cells have fewer edges than triangular cells. They do not suffer from
spurious inertial modes of the triangular cell-vertex discretization and need
less dissipation. The hybrid mesh capability allows one to use
quasi-quadrilateral unstructured meshes, with triangular cells included only
to join quadrilateral patches of different resolution or instead of strongly
deformed quadrilateral cells. The description of the model numerical part is
complemented by test cases illustrating the model performance.</p></abstract-html>
<ref-html id="bib1.bib1"><label>Androsov et al.(1995)</label><mixed-citation>
Androsov, A. A., Klevanny, K. A., Salusti, E. S., and Voltzinger, N. E.: Open
boundary conditions for horizontal 2-D curvilinear-grid long-wave dynamics of
a strait, Adv. Water Resour., 18, 267–276,
<a href="https://doi.org/10.1016/0309-1708(95)00017-D" target="_blank">https://doi.org/10.1016/0309-1708(95)00017-D</a>, 1995.
</mixed-citation></ref-html>
<ref-html id="bib1.bib2"><label>Barnier et al.(1995)</label><mixed-citation>
Barnier, B., Siefridt, L., and Marchesiello, P.: Thermal forcing for a global
ocean circulation model using a three-year climatology of ECMWF analyses, J.
Marine Syst., 6, 363–380, <a href="https://doi.org/10.1016/0924-7963(94)00034-9" target="_blank">https://doi.org/10.1016/0924-7963(94)00034-9</a>, 1995.
</mixed-citation></ref-html>
<ref-html id="bib1.bib3"><label>Baschek et al.(2017)</label><mixed-citation>
Baschek, B., Schroeder, F., Brix, H., Riethmüller, R., Badewien, T. H.,
Breitbach, G., Brügge, B., Colijn, F., Doerffer, R., Eschenbach, C.,
Friedrich, J., Fischer, P., Garthe, S., Horstmann, J., Krasemann, H.,
Metfies, K., Merckelbach, L., Ohle, N., Petersen, W., Pröfrock, D.,
Röttgers, R., Schlüter, M., Schulz, J., Schulz-Stellenfleth, J.,
Stanev, E., Staneva, J., Winter, C., Wirtz, K., Wollschläger, J.,
Zielinski, O., and Ziemer, F.: The Coastal Observing System for Northern and
Arctic Seas (COSYNA), Ocean Sci., 13, 379–410, <a href="https://doi.org/10.5194/os-13-379-2017" target="_blank">https://doi.org/10.5194/os-13-379-2017</a>,
2017.
</mixed-citation></ref-html>
<ref-html id="bib1.bib4"><label>Becherer et al.(2011)</label><mixed-citation>
Becherer, J., Burchard, H., Floeser, G., Mohrholz, V., and Umlauf, L.:
Evidence of tidal straining in well-mixed channel flow from micro-structure
observations, Geophys. Res. Lett., 38, L17611, <a href="https://doi.org/10.1029/2011GL049005" target="_blank">https://doi.org/10.1029/2011GL049005</a>,
2011.
</mixed-citation></ref-html>
<ref-html id="bib1.bib5"><label>Benjamin(1968)</label><mixed-citation>
Benjamin, T. B.: Gravity currents and related phenomena, J. Fluid Mech., 31,
209–248, 1968.
</mixed-citation></ref-html>
<ref-html id="bib1.bib6"><label>Blumberg and Mellor(1987)</label><mixed-citation>
Blumberg, A. F. and Mellor, G. L.: A Description of a three-dimensional
coastal ocean circulation model, in: Three-dimensional Coastal Ocean Models,
edited by: Mooers, C. N. K., Coast. Est. S., 4, 1–16, 1987.
</mixed-citation></ref-html>
<ref-html id="bib1.bib7"><label>Burchard et al.(1999)</label><mixed-citation>
Burchard, H., Bolding, K., and Ruiz-Villarreal, M.,: GOTM, a general ocean
turbulence model. Theory, implementation and test cases, European Commission,
Tech. Rep. EUR 18745 EN, 1999.
</mixed-citation></ref-html>
<ref-html id="bib1.bib8"><label>Burchard and Bolding(2002)</label><mixed-citation>
Burchard, H. and Bolding, K.: GETM, a general estuarine transport model.
Scientific documentation, European Commission,  Tech. Rep. EUR 20253 EN, 2002.
</mixed-citation></ref-html>
<ref-html id="bib1.bib9"><label>Burchard et al.(2008)</label><mixed-citation>
Burchard, H., Flöser, G., Staneva, J. V., Badewien, T. H., and
Riethmüller, R.: Impact of Density Gradients on Net Sediment Transport
into the Wadden Sea, J. Phys. Oceanogr., 38, 566–587,
<a href="https://doi.org/10.1175/2007JPO3796.1" target="_blank">https://doi.org/10.1175/2007JPO3796.1</a>, 2008.
</mixed-citation></ref-html>
<ref-html id="bib1.bib10"><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. Fl., 32, 331–348,
2000.
</mixed-citation></ref-html>
<ref-html id="bib1.bib11"><label>Cebeci and Smith(1974)</label><mixed-citation>
Cebeci, T. and Smith, A. M. O.: Analysis of Turbulent Boundary Layers,
Academic Press, New York, 1974.
</mixed-citation></ref-html>
<ref-html id="bib1.bib12"><label>Chen et al.(2003)</label><mixed-citation>
Chen, C., Liu, H., and Beardsley, R. C.: An unstructured, finite volume,
three-dimensional, primitive equation ocean model: application to coastal
ocean and estuaries, J. Atmos. Ocean. Tech., 20, 159–186, 2003.
</mixed-citation></ref-html>
<ref-html id="bib1.bib13"><label>Cheng et al.(2002)</label><mixed-citation>
Cheng, Y., Canuto, V. M., and Howard, A. M.: An improved model for the
turbulent PBL, J. Atmos. Sci., 59, 1550–1565, 2002.
</mixed-citation></ref-html>
<ref-html id="bib1.bib14"><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.bib15"><label>Danilov and Androsov(2015)</label><mixed-citation>
Danilov, S. and Androsov, A.: Cell-vertex discretization of shallow water
equations on mixed unstructured meshes, Ocean Dynam., 65, 33–47,
<a href="https://doi.org/10.1007/s10236-014-0790-x" target="_blank">https://doi.org/10.1007/s10236-014-0790-x</a>, 2015.
</mixed-citation></ref-html>
<ref-html id="bib1.bib16"><label>Danilov et al.(2017)</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.bib17"><label>Deleersnijder and Roland(1993)</label><mixed-citation>
Deleersnijder, E. and Roland, M.: Preliminary tests of a hybrid
numerical-asymptotic method for solving nonlinear advection-diffusion
equations in a domain limited by a selfadjusting boundary, Math. Comput.
Model., 17, 35–47, 1993.
</mixed-citation></ref-html>
<ref-html id="bib1.bib18"><label>Deleersnijder(1993)</label><mixed-citation>
Deleersnijder, E.: Numerical mass conservation in a free-surface sigma
coordinate marine model with mode splitting, J. Marine Syst., 4, 365–370,
1993.
</mixed-citation></ref-html>
<ref-html id="bib1.bib19"><label>Flöser et al.(2011)</label><mixed-citation>
Flöser, G., Burchard, H., and Riethmüller, R.: Observational evidence
for estuarine circulation in the German Wadden Sea, Cont. Shelf Res., 31,
1633–1639, 2011.
</mixed-citation></ref-html>
<ref-html id="bib1.bib20"><label>Fringer et al.(2006)</label><mixed-citation>
Fringer, O. B., Gerritsen, M., and Street, R. L.: An unstructured-grid,
finite-volume, nonhydrostatic, parallel coastal ocean simulator, Ocean
Model., 14, 139–173, 2006.
</mixed-citation></ref-html>
<ref-html id="bib1.bib21"><label>Gadd(1978)</label><mixed-citation>
Gadd, A. J.: A split explicit integration scheme for numerical weather
prediction, Q. J. Roy. Meteor. Soc., 104, 569–582,
<a href="https://doi.org/10.1002/qj.49710444103" target="_blank">https://doi.org/10.1002/qj.49710444103</a>, 1978.
</mixed-citation></ref-html>
<ref-html id="bib1.bib22"><label>Geuzaine and Remacle(2009)</label><mixed-citation>
Geuzaine, C. and Remacle, J.-F.: Gmsh: a three-dimensional finite element
mesh generator with built-in pre- and post-processing facilities, Int. J.
Numer. Meth. Eng., 79, 1309–1331, 2009.
</mixed-citation></ref-html>
<ref-html id="bib1.bib23"><label>Higdon(2008)</label><mixed-citation>
Higdon, R. L.: A comparison of two formulations of barotropic-baroclinic
splitting for layered models of ocean circulation, Ocean Model., 24, 29–45,
2008.
</mixed-citation></ref-html>
<ref-html id="bib1.bib24"><label>Idier et al.(2017)</label><mixed-citation>
Idier, D., Paris, F., Cozannet, G. L., Boulahya, F., and Dumas, F.: Sea-level
rise impacts on the tides of the European Shelf, Cont. Shelf Res., 137,
56–71, 2017.
</mixed-citation></ref-html>
<ref-html id="bib1.bib25"><label>Kalnay et al.(1996)</label><mixed-citation>
Kalnay, E., Kanamitsu, M., Kistler, R., Collins, W., Deaven, D., Gandin, L.,
Iredell, M., Saha, S., White, G., Woollen, J., Zhu, Y., Leetmaa, A.,
Reynolds, B., Chelliah, M., Ebisuzaki, W., Higgins, W., Janowiak, J., Mo, K.
C., Ropelewski, C., Wang, J., Jenne, R., and Joseph, D.: The NCEP/NCAR
40-Year Reanalysis Project. B. Am. Meteorol. Soc., 77, 437–472, 1996.
</mixed-citation></ref-html>
<ref-html id="bib1.bib26"><label>Kappenberg et al.(2018)</label><mixed-citation>
Kappenberg, J., Berendt, M., Ohle, N., Riethmuller, R., Schuster, D., and
Strotmann, T.: Variation of Hydrodynamics and Water Constituents in the Mouth
of the Elbe Estuary, Germany, Civil Eng. Res. J., 4, 555643,
<a href="https://doi.org/10.19080/CERJ.2018.04.555643" target="_blank">https://doi.org/10.19080/CERJ.2018.04.555643</a>, 2018.
</mixed-citation></ref-html>
<ref-html id="bib1.bib27"><label>Kerimoglu et al.(2017)</label><mixed-citation>
Kerimoglu, O., Hofmeister, R., Maerz, J., Riethmüller, R., and Wirtz, K.
W.: The acclimative biogeochemical model of the southern North Sea,
Biogeosciences, 14, 4499–4531, <a href="https://doi.org/10.5194/bg-14-4499-2017" target="_blank">https://doi.org/10.5194/bg-14-4499-2017</a>, 2017.
</mixed-citation></ref-html>
<ref-html id="bib1.bib28"><label>Lazure and Dumas(2008)</label><mixed-citation>
Lazure, P. and Dumas F.: An external–internal mode coupling for a 3D
hydrodynamical model for applications at regional scale (MARS), Adv. Water
Resour., 31, 233–250, 2008.
</mixed-citation></ref-html>
<ref-html id="bib1.bib29"><label>Le Roux(2012)</label><mixed-citation>
Le Roux, D. Y.: Spurious inertial oscillations in shallow-water models, J.
Comput. Phys., 231, 7959–7987, 2012.
</mixed-citation></ref-html>
<ref-html id="bib1.bib30"><label>Lumborg and Pejrup(2005)</label><mixed-citation>
Lumborg, U. and Pejrup, M.: Modelling of cohesive sediment transport in a
tidal lagoon an annual budget, Mar. Geol., 218, 1–16, 2005.
</mixed-citation></ref-html>
<ref-html id="bib1.bib31"><label>Luyten et al.(1999)</label><mixed-citation>
Luyten, P. J., Jones, J. E., Proctor, R., Tabor, A., Tett P., and Wild-Allen,
K., COHERENS – A coupled hydrodynamical-ecological model for regional and
shelf seas: User Documentation. MUMM Report, Management Unit of the
Mathematical Models of the north Sea, Belgium, 911 pp., 1999.
</mixed-citation></ref-html>
<ref-html id="bib1.bib32"><label>Marchesiello et al.(2001)</label><mixed-citation>
Marchesiello, P., McWilliams J. C., and Shchepetkin, A.: Open boundary
conditions for long-term integration of regional oceanic models, Ocean
Model., 3, 1–20, <a href="https://doi.org/10.1016/S1463-5003(00)00013-5" target="_blank">https://doi.org/10.1016/S1463-5003(00)00013-5</a>, 2001.
</mixed-citation></ref-html>
<ref-html id="bib1.bib33"><label>Marshall et al.(1997)</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>, 1997.
</mixed-citation></ref-html>
<ref-html id="bib1.bib34"><label>Maßmann et al.(2010)</label><mixed-citation>
Maßmann, S., Androsov, A., and Danilov, S.: Intercomparison between
finite element and finite volume approaches to model North Sea tides, Cont.
Shelf Res., 30, 680–691, <a href="https://doi.org/10.1016/j.csr.2009.07.004" target="_blank">https://doi.org/10.1016/j.csr.2009.07.004</a>, 2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib35"><label>Miura(2007)</label><mixed-citation>
Miura, H.: An upwind-biased conservative advection scheme for spherical
hexagonal-pentagonal grids, Mon. Weather Rev., 135, 4038–4044, 2007.
</mixed-citation></ref-html>
<ref-html id="bib1.bib36"><label>Pätsch and Lenhart(2011)</label><mixed-citation>
Pätsch, J. and Lenhart, H. J.: Daily Loads of Nutrients, Total
Alkalinity, Dissolved Inorganic Carbon and Dissolved Organic Carbon of the
European Continental Rivers for the Years 1977–2002, Berichte aus dem
Zentrum für Meeres- und Klimaforschung/B: Ozeanographie/Institut für
Meereskunde, Inst. für Meereskunde, Universität Hamburg, Germany,
2011.
</mixed-citation></ref-html>
<ref-html id="bib1.bib37"><label>Pätsch and Lenhart(2004)</label><mixed-citation>
Pätsch, J. and Lenhart, H. J.: Daily Loads of Nutrients, Total
Alkalinity, Dissolved Inorganic Carbon and Dissolved Organic Carbon of the
European Continental Rivers for the Years 1977–2002, Berichte aus dem
Zentrum für Meeres- und Klimaforschung; Reihe B: Ozeanographie, 48,
159 pp., 2004.
</mixed-citation></ref-html>
<ref-html id="bib1.bib38"><label>Petersen(2014)</label><mixed-citation>
Peterson, W.: FerryBox systems: State-of-the-art in Europe and future
development, J. Marine Syst., 140, 4–12, 2014.
</mixed-citation></ref-html>
<ref-html id="bib1.bib39"><label>Phillips(1957)</label><mixed-citation>
Phillips, N. A.: A coordinate system having some special advantages for
numerical forecasting, J. Meteorol., 14, 184–185, 1957.
</mixed-citation></ref-html>
<ref-html id="bib1.bib40"><label>Purkiani et al.(2014)</label><mixed-citation>
Purkiani, K., Becherer, J., Flöser, G., Gräwe, U., Mohrholz, V.,
Schuttelaars, H. M., and Burchard, H.: Numerical analysis of stratification
and destratification processes in a tidally energetic inlet with an ebb tidal
delta, J. Geophys. Res.-Oceans, 120, 225–243, <a href="https://doi.org/10.1002/2014JC010325" target="_blank">https://doi.org/10.1002/2014JC010325</a>,
2014.
</mixed-citation></ref-html>
<ref-html id="bib1.bib41"><label>Radach and Pätsch(2007)</label><mixed-citation>
Radach, G. and Pätsch, J.: Variability of continental riverine freshwater
and nutrient inputs into the North Sea for the years 1977–2000 and its
consequences for the assessment of eutrophication, Estuar. Coast., 30,
66–81, 2007.
</mixed-citation></ref-html>
<ref-html id="bib1.bib42"><label>Raymond and Kuo(1984)</label><mixed-citation>
Raymond, H. W. and Kuo, L. H.: A radiation boundary condition for
multi-dimensional flows, Q. J. Roy. Meteor. Soc., 110, 535–551,
<a href="https://doi.org/10.1002/qj.49711046414" target="_blank">https://doi.org/10.1002/qj.49711046414</a>, 1984.
</mixed-citation></ref-html>
<ref-html id="bib1.bib43"><label>Reid(1957)</label><mixed-citation>
Reid, R. O.: Modification of the quadratic bottom-stress law for turbulent
channel flow in the presence of surface wind-stress, U.S. Army Corps of
Engineers, Beach Erosion Board. Tech. Memo., 3, 33 pp., 1957.
</mixed-citation></ref-html>
<ref-html id="bib1.bib44"><label>Remacle et al.(2012)</label><mixed-citation>
Remacle, J.-F., Lambrechts, J., Seny, B., Marchandise, E., Johnen A., and
Geuzainet, C.: Blossom-Quad: A non-uniform quadrilateral mesh generator using
a minimum-cost perfect-matching algorithm, Int. J. Numer. Meth. Eng., 89,
1102–1119, 2012.
</mixed-citation></ref-html>
<ref-html id="bib1.bib45"><label>Ruiz-Villarreal et al.(2005)</label><mixed-citation>
Ruiz-Villarreal, M., Bolding, K., Burchard, H., and Demirov, E.: Coupling of
the GOTM turbulence module to some three-dimensional ocean models, Marine
Turbulence: Theories, Observations, and Models Results of the CARTUM Project,
225–237, 2005.
</mixed-citation></ref-html>
<ref-html id="bib1.bib46"><label>Shchepetkin and McWilliams(2005)</label><mixed-citation>
Shchepetkin, A. F. and McWilliams, J. C.: The Regional Ocean Modeling System:
A split-explicit, free-surface, topography following coordinates ocean model,
Ocean Model., 9, 347–404, 2005.
</mixed-citation></ref-html>
<ref-html id="bib1.bib47"><label>Stelling and Duinmeijer(2003)</label><mixed-citation>
Stelling, G. S. and Duinmeijer, S. P. A.: A staggered conservative scheme for
every Froude number in rapidly varied shallow water flows, Int. J. Numer.
Meth. Fl., 43, 1329–1354, <a href="https://doi.org/10.1002/fld.537" target="_blank">https://doi.org/10.1002/fld.537</a>, 2003.
</mixed-citation></ref-html>
<ref-html id="bib1.bib48"><label>Umlauf and Burchard(2005)</label><mixed-citation>
Umlauf, L. and Burchard, H.: Second-order turbulence closure models for
geophysical boundary layers. A review of recent work, Cont. Shelf Res., 25,
795–827, 2005.
</mixed-citation></ref-html>
<ref-html id="bib1.bib49"><label>Umlauf et al.(2005)</label><mixed-citation>
Umlauf, L., Burchard, H., and Bolding, K.: General Ocean Turbulence Model.
Scientific documentation, v3.2, Marine Science Reports 63, 274 pp., 2005.
</mixed-citation></ref-html>
<ref-html id="bib1.bib50"><label>Umlauf et al.(2007)</label><mixed-citation>
Umlauf, L., Burchard, H., and Bolding, K.: GOTM, Sourcecode and Test Case
Documentation, Version 4.0, available at:
<a href="https://gotm.net/manual/stable/pdf/a4.pdf" target="_blank">https://gotm.net/manual/stable/pdf/a4.pdf</a> (last access: 1 March 2019),
2007.

</mixed-citation></ref-html>
<ref-html id="bib1.bib51"><label>Voltzinger(1985)</label><mixed-citation>
Voltzinger, N. E.: Long Waves on Shallow Water, Gidrometioizdat, Leningrad,
160 pp., 1985 (in Russian).
</mixed-citation></ref-html>
<ref-html id="bib1.bib52"><label>Voltzinger et al.(1989)</label><mixed-citation>
Voltzinger, N. E., Klevanny, K. A., and Pelinovsky, E. N.: Long-Wave Dynamics
of the Coastal Zone, Gidrometioizdat, Leningrad, 272 pp., 1989 (in Russian).
</mixed-citation></ref-html>
<ref-html id="bib1.bib53"><label>Voynova et al.(2017)</label><mixed-citation>
Voynova, Y. G., Brix, H., Petersen, W., Weigelt-Krenz, S., and Scharfe, M.:
Extreme flood impact on estuarine and coastal biogeochemistry: the 2013 Elbe
flood, Biogeosciences, 14, 541–557, <a href="https://doi.org/10.5194/bg-14-541-2017" target="_blank">https://doi.org/10.5194/bg-14-541-2017</a>, 2017.
</mixed-citation></ref-html>
<ref-html id="bib1.bib54"><label>Weisse et al.(2015)</label><mixed-citation>
Weisse, R., Bisling, P., Gaslikova, L., Geyer, B., Groll, N., Hortamani, M.,
Matthias, V., Maneke, M., Meinke, I., Meyer, E., Schwichtenberg, F., Stempinski,
F., Wiese, F., and Wöckner-Kluwe, K.: Climate services for marine applications
in Europe, Earth Perspectives, 2, 3, <a href="https://doi.org/10.1186/s40322-015-0029-0" target="_blank">https://doi.org/10.1186/s40322-015-0029-0</a>, 2015.
</mixed-citation></ref-html>
<ref-html id="bib1.bib55"><label>Wang et al.(2014)</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.bib56"><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, 2008.
</mixed-citation></ref-html>
<ref-html id="bib1.bib57"><label>Zhang et al.(2016)</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>
