<?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" article-type="research-article">
  <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-14-4593-2021</article-id><title-group><article-title>icepack: a new glacier flow modeling package in Python, version 1.0</article-title><alt-title>icepack</alt-title>
      </title-group><?xmltex \runningtitle{icepack}?><?xmltex \runningauthor{D. R. Shapero et al.}?>
      <contrib-group>
        <contrib contrib-type="author" corresp="yes" rid="aff1">
          <name><surname>Shapero</surname><given-names>Daniel R.</given-names></name>
          <email>shapero@uw.edu</email>
        <ext-link>https://orcid.org/0000-0002-3651-0649</ext-link></contrib>
        <contrib contrib-type="author" corresp="no" rid="aff2">
          <name><surname>Badgeley</surname><given-names>Jessica A.</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" corresp="no" rid="aff2">
          <name><surname>Hoffman</surname><given-names>Andrew O.</given-names></name>
          
        </contrib>
        <contrib contrib-type="author" corresp="no" rid="aff1">
          <name><surname>Joughin</surname><given-names>Ian R.</given-names></name>
          
        </contrib>
        <aff id="aff1"><label>1</label><institution>Polar Science Center, Applied Physics Laboratory, University of Washington, Seattle, WA, USA</institution>
        </aff>
        <aff id="aff2"><label>2</label><institution>Department of Earth and Space Sciences, University of Washington, Seattle, WA, USA</institution>
        </aff>
      </contrib-group>
      <author-notes><corresp id="corr1">Daniel R. Shapero (shapero@uw.edu)</corresp></author-notes><pub-date><day>26</day><month>July</month><year>2021</year></pub-date>
      
      <volume>14</volume>
      <issue>7</issue>
      <fpage>4593</fpage><lpage>4616</lpage>
      <history>
        <date date-type="received"><day>12</day><month>December</month><year>2020</year></date>
           <date date-type="rev-request"><day>12</day><month>January</month><year>2021</year></date>
           <date date-type="rev-recd"><day>2</day><month>May</month><year>2021</year></date>
           <date date-type="accepted"><day>27</day><month>May</month><year>2021</year></date>
      </history>
      <permissions>
        <copyright-statement>Copyright: © 2021 Daniel R. Shapero et al.</copyright-statement>
        <copyright-year>2021</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/14/4593/2021/gmd-14-4593-2021.html">This article is available from https://gmd.copernicus.org/articles/14/4593/2021/gmd-14-4593-2021.html</self-uri><self-uri xlink:href="https://gmd.copernicus.org/articles/14/4593/2021/gmd-14-4593-2021.pdf">The full text article is available as a PDF file from https://gmd.copernicus.org/articles/14/4593/2021/gmd-14-4593-2021.pdf</self-uri>
      <abstract><title>Abstract</title>
    <p id="d1e114">We introduce a new software package called “icepack” for modeling the flow of glaciers and ice sheets.
The icepack package is built on the finite element modeling library Firedrake, which uses the Unified Form Language (UFL), a domain-specific language embedded into Python for describing weak forms of partial differential equations.
The diagnostic models in icepack are formulated through action principles that are specified in UFL.
The components of each action functional can be substituted for different forms of the user's choosing, which makes it easy to experiment with the model physics.
The action functional itself can be used to define a solver convergence criterion that is independent of the mesh and requires little tuning on the part of the user. The
icepack package includes the 2D shallow ice and shallow stream models.
We have also defined a 3D hybrid model based on spectral semi-discretization of the Blatter–Pattyn equations.
Finally, icepack includes a Gauss–Newton solver for inverse problems that runs substantially faster than the Broyden–Fletcher–Goldfarb–Shanno (BFGS) method often used in the glaciological literature.
The overall design philosophy of icepack is to be as usable as possible for a wide a swath of the glaciological community, including both experts and novices in computational science.</p>
  </abstract>
    </article-meta>
  </front>
<body>
      

<sec id="Ch1.S1" sec-type="intro">
  <label>1</label><title>Introduction</title>
      <p id="d1e126">Nearly all glaciologists, from graduate students to senior researchers, need to use numerical models at some point in their career.
Several software packages for glacier flow modeling already exist and are effective in the hands of experts.
We highlight four main uses of glacier models in the literature:
<list list-type="order"><list-item>
      <p id="d1e131">projecting future glacier extent and estimating the sea level rise contribution from glacier dynamics <xref ref-type="bibr" rid="bib1.bibx41" id="paren.1"/>;</p></list-item><list-item>
      <p id="d1e138">exploring aspects of glacier physics, such as hydrology and calving, that are not completely understood <xref ref-type="bibr" rid="bib1.bibx67 bib1.bibx90" id="paren.2"/>;</p></list-item><list-item>
      <p id="d1e145">estimating unobservable quantities, such as bed friction or rheology, from observational data <xref ref-type="bibr" rid="bib1.bibx88 bib1.bibx80" id="paren.3"/>; and</p></list-item><list-item>
      <p id="d1e152">reconstructing what glaciers of the near- or distant-past may have looked like <xref ref-type="bibr" rid="bib1.bibx38" id="paren.4"/>.</p></list-item></list>
To accomplish these tasks, modeling tools are usually written in compiled programming languages such as C, C++, and Fortran for reasons of computational efficiency.
Many glaciologists receive little or no formal programming training, much less in these languages, and are instead self-taught in either Python or MATLAB.
The ubiquity of C, C++, and Fortran in scientific computing can create a barrier to entry for glaciologists who are not experts in high-performance computing.
In this paper, we introduce a new Python software package for glacier flow modeling called “icepack”.
Our goal is to make a tool that will be both accessible to novices and more productive for experts. Thus far,
we have focused efforts on process studies of individual glaciers or drainage basins (use cases 2 and 3 of the list above).
The development of icepack is ongoing, and we will broaden our efforts to encompass more use cases in future.</p>
      <p id="d1e159">The glacier flow modeling package closest in spirit to icepack is VarGlaS <xref ref-type="bibr" rid="bib1.bibx17" id="paren.5"/>.
VarGlaS is implemented using the finite element modeling (FEM) package FEniCS <xref ref-type="bibr" rid="bib1.bibx55" id="paren.6"/>, whereas icepack is built on top of Firedrake, which began as an outgrowth<?pagebreak page4594?> of FEniCS.
Both packages share a similar goal of saving users from manually writing low-level code for assembling the systems of equations that discretize their model physics.
Instead, users describe the weak form of the partial differential equations they wish to solve using a high-level domain-specific language (DSL) called the Unified Form Language or UFL <xref ref-type="bibr" rid="bib1.bibx2" id="paren.7"/>.
This DSL is embedded entirely into Python (i.e., the complete syntax of UFL can be mapped directly onto overloaded operators in the Python programming language).
Both FEniCS and Firedrake then generate optimized C or C++ code to assemble the discretized system of equations from this symbolic description of the problem <xref ref-type="bibr" rid="bib1.bibx47 bib1.bibx75" id="paren.8"/>.
Combining a DSL and a code generator frees users from the very error-prone process of writing these assembly kernels themselves and also makes the syntax of the code align more closely with the syntax of written mathematical expressions.
Additionally, having a high-level symbolic description of the problem makes it possible to automatically derive tangent linear models and adjoints <xref ref-type="bibr" rid="bib1.bibx61" id="paren.9"/>.</p>
      <p id="d1e177">The icepack package improves upon the groundwork laid in VarGlaS in three main respects.
First, icepack includes a simple 3D flow model that uses several features only available in Firedrake: extruded meshes and tensor product finite elements (Sect. <xref ref-type="sec" rid="Ch1.S2.SS2.SSS3"/>; <xref ref-type="bibr" rid="bib1.bibx12 bib1.bibx59" id="altparen.10"/>).
Second, icepack's architecture is designed to make it easy for users to alter the various physics components, such as the rheology and basal friction, of any of its constituent models (see Sect. <xref ref-type="sec" rid="Ch1.S2.SS4"/>).
Finally, the inverse solver in icepack uses the Gauss–Newton method, which converges faster and more reliably than the Broyden–Fletcher–Goldfarb–Shanno (BFGS) method used in VarGlaS (see Sect. <xref ref-type="sec" rid="Ch1.S4.SS4"/>).</p>
</sec>
<sec id="Ch1.S2">
  <label>2</label><title>Physics</title>
      <p id="d1e197">The two main components of a glacier flow model are a diagnostic and a prognostic equation.
The diagnostic equation prescribes the ice velocity through a time-independent, nonlinear, elliptic partial differential equation (PDE).
The prognostic equation prescribes how the ice thickness evolves through conservation of mass.
Mathematically, these two coupled PDEs can be thought of as a differential-algebraic equation (see <xref ref-type="bibr" rid="bib1.bibx4" id="altparen.11"/>).</p>
      <p id="d1e203">The evolution equations for ice thickness and velocity are necessary for any simulation, but other fields with their own dynamics can be a part of the problem as well.
For example, the rheology and friction are the main coefficients in the diagnostic equation.
These coefficients are functions of other fields that have their own evolution equations.
The rheology is a function of temperature, englacial water content, and damage from crevassing.
Likewise, the friction coefficient can be described in terms of the subglacial water pressure and a roughness factor for the underlying bedrock <xref ref-type="bibr" rid="bib1.bibx22" id="paren.12"/>.
The diagnostic and prognostic equations can then be supplemented with evolution equations for these fields, for example the heat equation for temperature, or a hydrology model for subglacial water pressure.</p>
      <p id="d1e209">In this section, we will describe the mathematical formulation of each of the models implemented in icepack.
See Table <xref ref-type="table" rid="App1.Ch1.S1.T1"/> for definitions of all mathematical symbols and Table <xref ref-type="table" rid="App1.Ch1.S1.T2"/> for physical constants.</p>
<sec id="Ch1.S2.SS1">
  <label>2.1</label><title>Prognostic model</title>
      <p id="d1e223">The prognostic model or mass transport equation (the two terms are synonymous) describes how the ice thickness changes in time.
The prognostic model is
            <disp-formula id="Ch1.E1" content-type="numbered"><label>1</label><mml:math id="M1" display="block"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi>h</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="normal">∇</mml:mi><mml:mo>⋅</mml:mo><mml:mi>h</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>a</mml:mi><mml:mo mathvariant="normal">˙</mml:mo></mml:mover><mml:mtext>s</mml:mtext></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>a</mml:mi><mml:mo mathvariant="normal">˙</mml:mo></mml:mover><mml:mtext>b</mml:mtext></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M2" display="inline"><mml:mrow><mml:msub><mml:mover accent="true"><mml:mi>a</mml:mi><mml:mo mathvariant="normal">˙</mml:mo></mml:mover><mml:mtext>s</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M3" display="inline"><mml:mrow><mml:msub><mml:mover accent="true"><mml:mi>a</mml:mi><mml:mo mathvariant="normal">˙</mml:mo></mml:mover><mml:mtext>b</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> are the surface and basal mass balance, respectively.
This problem has the apparent form of a conservative advection equation, but the velocity <inline-formula><mml:math id="M4" display="inline"><mml:mi mathvariant="bold-italic">u</mml:mi></mml:math></inline-formula> is coupled to the thickness and surface slope in such a way that the whole problem is not hyperbolic.
For the specific case of the shallow ice approximation (see section Sect. <xref ref-type="sec" rid="Ch1.S2.SS2.SSS1"/>), the coupled system is parabolic.
In all other cases, the problem does not have a PDE “type” in the usual sense because the velocity is found through solving an elliptic PDE where the thickness and surface slope are coefficients.</p>
      <p id="d1e313">The icepack package represents the thickness using continuous, piecewise polynomial basis functions in each cell of the mesh.
In the examples, we use up to degree 2, and the unit tests use up to degree 4.
We have not yet implemented a formulation that works with discontinuous basis functions, but this extension is completely feasible within our framework.</p>
      <p id="d1e316">The surface elevation is calculated as
            <disp-formula id="Ch1.E2" content-type="numbered"><label>2</label><mml:math id="M5" display="block"><mml:mrow><mml:mi>s</mml:mi><mml:mo>=</mml:mo><mml:mo movablelimits="false">max⁡</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mi>b</mml:mi><mml:mo>+</mml:mo><mml:mi>h</mml:mi><mml:mo>,</mml:mo><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mtext>I</mml:mtext></mml:msub><mml:mo>/</mml:mo><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mtext>W</mml:mtext></mml:msub><mml:mo>)</mml:mo><mml:mi>h</mml:mi><mml:mo mathvariant="italic">}</mml:mo><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          with the first case corresponding to grounded ice and the second case corresponding to floating ice.
In the immediate vicinity of the grounding line, the assumption that the floating ice is in hydrostatic equilibrium with the ocean fails.
Most models assume hydrostasy, and icepack does as well.
Elmer/Ice, on the other hand, solves a contact problem for the moving upper and lower ice surfaces and, thus, can accurately model non-hydrostatic ice shelves <xref ref-type="bibr" rid="bib1.bibx27" id="paren.13"/>.</p>
      <p id="d1e371">We implement two types of boundary conditions for the prognostic equation.
First, users can specify an inflow flux value, and this value becomes a source of thickness at any point along the domain boundary where the ice velocity is pointing in to the domain.
The flux at the inflow boundary can change in time.
Second, we impose outflow boundary conditions on any part of the domain where the ice velocity is pointing outwards.
The segments of the boundary that are inflow or outflow are diagnosed automatically by calculating the sign of the dot product between the velocity and the unit outward normal vector.</p>
      <?pagebreak page4595?><p id="d1e375">The mass transport equation for ice thickness is a free boundary problem, where the free boundary is the contour between ice-covered and ice-free regions <xref ref-type="bibr" rid="bib1.bibx79" id="paren.14"/>.
Where there is ablation in ice-free regions, a correctly implemented prognostic solver will compute a negative thickness, which is unphysical and requires correction.
The prognostic solver in icepack truncates the thickness to zero, which approximates the free boundary, where there is ablation in ice-free regions.
An implicit approach would instead treat the free boundary problem directly as a variational inequality <xref ref-type="bibr" rid="bib1.bibx44" id="paren.15"/>.
The icepack package currently lacks such a scheme, and this will be the subject of future development.
The Portable Extensible Tookit for Scientific Computation (PETSc) includes scalable solvers for variational inequalities <xref ref-type="bibr" rid="bib1.bibx20" id="paren.16"/> that are also available through Firedrake.</p>
</sec>
<sec id="Ch1.S2.SS2">
  <label>2.2</label><title>Diagnostic model</title>
      <p id="d1e396">There are four diagnostic or stress balance models implemented in icepack.
For each of the diagnostic models, we use a formulation of the physics based on a minimization or action principle <xref ref-type="bibr" rid="bib1.bibx25" id="paren.17"/>.
Action principles are completely equivalent to the usual weak form of a partial differential equation but have certain numerical advantages, as described below.</p>
      <p id="d1e402">The most complex and most physically accurate model that we implement is the first-order or Blatter–Pattyn approximation, a 3D system describing the horizontal velocity <xref ref-type="bibr" rid="bib1.bibx13 bib1.bibx70" id="paren.18"/>.
(In icepack, we refer to our implementation of this equation as a “hybrid model” as it includes both shear and plug flow modes, as described below.)
The first-order model is based on an asymptotic expansion of the Stokes equations with respect to the ratio of the ice thickness to a typical horizontal length scale.
The aspect ratio of most glacier flows is on the order of 1/20 or less, although there are some exceptions –
for example, the main trunk of Jakobshavn Glacier in Greenland flows through a very deep and narrow trough with an aspect ratio closer to <inline-formula><mml:math id="M6" display="inline"><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>/</mml:mo><mml:mn mathvariant="normal">5</mml:mn></mml:mrow></mml:math></inline-formula>.</p>
      <p id="d1e420">From the first-order model, two approximations are possible.
First, the shallow ice approximation (SIA) comes from assuming that vertical shear is the dominant mode of ice flow.
The SIA model <xref ref-type="bibr" rid="bib1.bibx37" id="paren.19"/> describes the interior of ice sheets well, where flow can be simply described as bed-parallel shear and surface and basal slopes are small.
This approximation breaks down near ice margins, where basal sliding can be a large fraction of the surface speed and where membrane stresses are substantial.
Second, one could assume that ice flow is purely by horizontal extension and that the surface and bed velocities are practically the same, which is called the shallow stream approximation (SSA).
The SSA model describes the fast-flowing margins of the ice sheet best, encompassing grounded ice streams or floating ice shelves <xref ref-type="bibr" rid="bib1.bibx56" id="paren.20"/>.</p>
      <p id="d1e429"><?xmltex \hack{\newpage}?>All of the diagnostic models inherit a fundamental nonlinearity in the mechanics of ice flow.
For a Newtonian viscous fluid, the stress tensor <inline-formula><mml:math id="M7" display="inline"><mml:mi mathvariant="italic">τ</mml:mi></mml:math></inline-formula> and the strain rate tensor <inline-formula><mml:math id="M8" display="inline"><mml:mover accent="true"><mml:mi mathvariant="italic">ε</mml:mi><mml:mo mathvariant="normal">˙</mml:mo></mml:mover></mml:math></inline-formula> are linearly proportional to each other.
Glaciers, however, have a nonlinear constitutive relation:
            <disp-formula id="Ch1.E3" content-type="numbered"><label>3</label><mml:math id="M9" display="block"><mml:mrow><mml:mover accent="true"><mml:mi mathvariant="italic">ε</mml:mi><mml:mo mathvariant="normal">˙</mml:mo></mml:mover><mml:mo>=</mml:mo><mml:mi>A</mml:mi><mml:mo>|</mml:mo><mml:mi mathvariant="italic">τ</mml:mi><mml:msup><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:msup><mml:mi mathvariant="italic">τ</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M10" display="inline"><mml:mi>A</mml:mi></mml:math></inline-formula> is the fluidity, and <inline-formula><mml:math id="M11" display="inline"><mml:mi>n</mml:mi></mml:math></inline-formula> is the Glen flow law exponent <xref ref-type="bibr" rid="bib1.bibx22" id="paren.21"/>.
The most commonly used value of the flow law exponent is <inline-formula><mml:math id="M12" display="inline"><mml:mrow><mml:mi>n</mml:mi><mml:mo>≈</mml:mo><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:math></inline-formula>, as determined from laboratory experiments.
Strictly speaking, the fluidity should be a tensor field but is almost universally treated as a scalar <xref ref-type="bibr" rid="bib1.bibx28" id="paren.22"/>.</p>
      <p id="d1e517">All of the diagnostic models in icepack are described through variational or action principles <xref ref-type="bibr" rid="bib1.bibx25" id="paren.23"/>.
Rather than describe the velocity as the weak solution of a nonlinear PDE, an action principle instead states that the velocity minimizes a functional called the action.
The action consists of four terms:
            <disp-formula id="Ch1.E4" content-type="numbered"><label>4</label><mml:math id="M13" display="block"><mml:mtable class="split" rowspacing="0.2ex" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd><mml:mrow><mml:mtext>action</mml:mtext></mml:mrow></mml:mtd><mml:mtd><mml:mrow><mml:mo>=</mml:mo><mml:mo movablelimits="false">∬</mml:mo><mml:mtext>stress</mml:mtext><mml:mo>×</mml:mo><mml:mtext>strain rate</mml:mtext><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mtext>d</mml:mtext><mml:mi>z</mml:mi><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mtext>d</mml:mtext><mml:mi>x</mml:mi></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>-</mml:mo><mml:mo movablelimits="false">∫</mml:mo><mml:mtext>basal friction</mml:mtext><mml:mo>×</mml:mo><mml:mtext>sliding velocity</mml:mtext><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mtext>d</mml:mtext><mml:mi>x</mml:mi></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>-</mml:mo><mml:mo movablelimits="false">∬</mml:mo><mml:mtext>surface slope</mml:mtext><mml:mo>×</mml:mo><mml:mtext>velocity</mml:mtext><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mtext>d</mml:mtext><mml:mi>z</mml:mi><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mtext>d</mml:mtext><mml:mi>x</mml:mi></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:mo>-</mml:mo><mml:mo movablelimits="false">∬</mml:mo><mml:mtext>ocean pressure</mml:mtext><mml:mo>×</mml:mo><mml:mtext>velocity</mml:mtext><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mtext>d</mml:mtext><mml:mi>z</mml:mi><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mtext>d</mml:mtext><mml:mi mathvariant="italic">γ</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
          where <inline-formula><mml:math id="M14" display="inline"><mml:mrow><mml:mtext>d</mml:mtext><mml:mi>z</mml:mi><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mtext>d</mml:mtext><mml:mi>x</mml:mi></mml:mrow></mml:math></inline-formula> denotes integration over the entire glacier, <inline-formula><mml:math id="M15" display="inline"><mml:mrow><mml:mtext>d</mml:mtext><mml:mi>x</mml:mi></mml:mrow></mml:math></inline-formula> denotes integration over the glacier footprint, and <inline-formula><mml:math id="M16" display="inline"><mml:mrow><mml:mtext>d</mml:mtext><mml:mi>z</mml:mi><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mtext>d</mml:mtext><mml:mi mathvariant="italic">γ</mml:mi></mml:mrow></mml:math></inline-formula> denotes integration over the side wall boundary.
The action has units of power (energy/time) and can be related to the rate of decrease of the thermodynamic free energy <xref ref-type="bibr" rid="bib1.bibx23" id="paren.24"/>.</p>
      <p id="d1e670">Every diagnostic model in icepack is encapsulated in its own Python class.
The key responsibility of the model classes is to take in the input fields – the ice thickness, velocity, etc. – and return a symbolic description of the action functional in UFL.</p>
      <p id="d1e673">The action principle is especially useful for designing a robust numerical solver, the implementation of which will be described in Sect. <xref ref-type="sec" rid="Ch1.S4.SS2"/>.
For viscous flow problems near to steady state, the action is convex as a function of the ice velocity (i.e., its second derivative is positive-definite).
Convexity implies that the action functional has a unique minimizer and that, with an appropriate line search strategy, Newton's method will converge from any initial guess.
Algorithms for minimizing convex functionals have better convergence guarantees than algorithms for solving general nonlinear systems of equations while having no additional computational cost <xref ref-type="bibr" rid="bib1.bibx69" id="paren.25"/>.
Both formulations are mathematically equivalent.</p>
<?pagebreak page4596?><sec id="Ch1.S2.SS2.SSS1">
  <label>2.2.1</label><title>Shallow ice approximation</title>
      <p id="d1e688">The shallow ice model can be derived from the Blatter–Pattyn approximation by assuming that ice flow is dominated by bed-parallel shear and that surface and basal slopes are small (i.e., <inline-formula><mml:math id="M17" display="inline"><mml:mrow><mml:mo>∂</mml:mo><mml:mi>u</mml:mi><mml:mo>/</mml:mo><mml:mo>∂</mml:mo><mml:mi>x</mml:mi><mml:mo>≪</mml:mo><mml:mo>∂</mml:mo><mml:mi>u</mml:mi><mml:mo>/</mml:mo><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:math></inline-formula>).
The result is a 2D system of equations for depth-averaged horizontal velocity.
The class in icepack that represents this physics model is called <monospace>ShallowIce</monospace>.
The terms in the action functional are

                  <disp-formula specific-use="align" content-type="numbered"><mml:math id="M18" display="block"><mml:mtable displaystyle="true"><mml:mlabeledtr id="Ch1.E5"><mml:mtd><mml:mtext>5</mml:mtext></mml:mtd><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mtext>localization</mml:mtext><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:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:munder><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>⋅</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mtext>d</mml:mtext><mml:mi>x</mml:mi><mml:mo>;</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E6"><mml:mtd><mml:mtext>6</mml:mtext></mml:mtd><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mtext>gravity</mml:mtext><mml:mo>=</mml:mo><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:munder><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mn mathvariant="normal">2</mml:mn><mml:mi>A</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mtext>I</mml:mtext></mml:msub><mml:mi>g</mml:mi><mml:msup><mml:mo>)</mml:mo><mml:mi>n</mml:mi></mml:msup></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:mrow></mml:mfrac></mml:mstyle><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:mi mathvariant="normal">∇</mml:mi><mml:mi>s</mml:mi><mml:msup><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:msup><mml:mi mathvariant="normal">∇</mml:mi><mml:mi>s</mml:mi><mml:mo>⋅</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mtext>d</mml:mtext><mml:mi>x</mml:mi><mml:mo>;</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E7"><mml:mtd><mml:mtext>7</mml:mtext></mml:mtd><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mtext>penalty</mml:mtext><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:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:munder><mml:msup><mml:mi mathvariant="normal">ℓ</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>⋅</mml:mo><mml:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mtext>d</mml:mtext><mml:mi>x</mml:mi><mml:mo>;</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

              and the action functional is
              <disp-formula id="Ch1.E8" content-type="numbered"><label>8</label><mml:math id="M19" display="block"><mml:mrow><mml:mi>J</mml:mi><mml:mo>=</mml:mo><mml:mtext>localization</mml:mtext><mml:mo>+</mml:mo><mml:mtext>gravity</mml:mtext><mml:mo>+</mml:mo><mml:mtext>penalty</mml:mtext><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
            The default value of the length scale <inline-formula><mml:math id="M20" display="inline"><mml:mi mathvariant="normal">ℓ</mml:mi></mml:math></inline-formula> in the penalty term is defined as follows:
              <disp-formula id="Ch1.E9" content-type="numbered"><label>9</label><mml:math id="M21" display="block"><mml:mrow><mml:mi mathvariant="normal">ℓ</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">2</mml:mn><mml:mo movablelimits="false">max⁡</mml:mo><mml:mo mathvariant="italic">{</mml:mo><mml:mtext>cell diameter</mml:mtext><mml:mo>,</mml:mo><mml:mn mathvariant="normal">5</mml:mn><mml:mi>h</mml:mi><mml:mo mathvariant="italic">}</mml:mo><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
            but users can adjust this to the value of their choice.
This penalty term smooths over numerical artifacts, especially near the ice margins and termini.
In these regions, the shallow ice approximation is less applicable, so the error in solving a different set of equations is small compared with the inherent modeling error in using these equations in the first place.</p>
      <p id="d1e959">We verified the correctness of our implementation by checking that numerical results converge at the expected rate to the analytical Bueler profile for a circular symmetric ice sheet <xref ref-type="bibr" rid="bib1.bibx30" id="paren.26"/>.</p>
      <p id="d1e965">The shallow ice approximation applies well in ice sheet interiors.
For this reason, and because the equations are particularly simple to solve, this approximation has been a common choice for ice sheet modeling <xref ref-type="bibr" rid="bib1.bibx22 bib1.bibx49" id="paren.27"/>.
This approximation does not work well in areas of the ice sheet where the flow has substantial membrane stresses, like fast outlet glaciers.</p>
</sec>
<sec id="Ch1.S2.SS2.SSS2">
  <label>2.2.2</label><title>Shallow stream and shelf approximations</title>
      <p id="d1e979">The shallow stream model can be derived from the Blatter–Pattyn approximation by assuming nearly plug flow (i.e., <inline-formula><mml:math id="M22" display="inline"><mml:mrow><mml:mo>∂</mml:mo><mml:mi>u</mml:mi><mml:mo>/</mml:mo><mml:mo>∂</mml:mo><mml:mi>z</mml:mi><mml:mo>≪</mml:mo><mml:mo>∂</mml:mo><mml:mi>u</mml:mi><mml:mo>/</mml:mo><mml:mo>∂</mml:mo><mml:mi>x</mml:mi></mml:mrow></mml:math></inline-formula>).
The momentum equations can, again, be vertically integrated to obtain a 2D system of equations.
The class in icepack that represents this physics model is called <monospace>IceStream</monospace>.
The terms in the action functional are

                  <disp-formula specific-use="align" content-type="numbered"><mml:math id="M23" display="block"><mml:mtable displaystyle="true"><mml:mlabeledtr id="Ch1.E10"><mml:mtd><mml:mtext>10</mml:mtext></mml:mtd><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mtext>viscosity</mml:mtext><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>n</mml:mi><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:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:munder><mml:mi>h</mml:mi><mml:msup><mml:mi>A</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mfrac><mml:mn mathvariant="normal">1</mml:mn><mml:mi>n</mml:mi></mml:mfrac></mml:mrow></mml:msup><mml:mo>|</mml:mo><mml:mover accent="true"><mml:mi mathvariant="italic">ε</mml:mi><mml:mo mathvariant="normal">˙</mml:mo></mml:mover><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>)</mml:mo><mml:msup><mml:mo>|</mml:mo><mml:mrow><mml:mfrac><mml:mn mathvariant="normal">1</mml:mn><mml:mi>n</mml:mi></mml:mfrac><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mtext>d</mml:mtext><mml:mi>x</mml:mi><mml:mo>;</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E11"><mml:mtd><mml:mtext>11</mml:mtext></mml:mtd><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mtext>friction</mml:mtext><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>m</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:mfrac></mml:mstyle><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:munder><mml:mi>C</mml:mi><mml:mo>|</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:msup><mml:mo>|</mml:mo><mml:mrow><mml:mfrac><mml:mn mathvariant="normal">1</mml:mn><mml:mi>m</mml:mi></mml:mfrac><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mtext>d</mml:mtext><mml:mi>x</mml:mi><mml:mo>;</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E12"><mml:mtd><mml:mtext>12</mml:mtext></mml:mtd><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mtext>gravity</mml:mtext><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:munder><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mtext>I</mml:mtext></mml:msub><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mi mathvariant="normal">∇</mml:mi><mml:mi>s</mml:mi><mml:mo>⋅</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mtext>d</mml:mtext><mml:mi>x</mml:mi><mml:mo>;</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E13"><mml:mtd><mml:mtext>13</mml:mtext></mml:mtd><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mtext>terminus</mml:mtext><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:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi mathvariant="normal">Γ</mml:mi></mml:munder><mml:mfenced close=")" open="("><mml:mrow><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mtext>I</mml:mtext></mml:msub><mml:mi>g</mml:mi><mml:msup><mml:mi>h</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mtext>W</mml:mtext></mml:msub><mml:mi>g</mml:mi><mml:msup><mml:mi>d</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mfenced><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>⋅</mml:mo><mml:mi mathvariant="bold-italic">ν</mml:mi><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mtext>d</mml:mtext><mml:mi mathvariant="italic">γ</mml:mi><mml:mo>;</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

              and the action functional is
              <disp-formula id="Ch1.E14" content-type="numbered"><label>14</label><mml:math id="M24" display="block"><mml:mrow><mml:mi>J</mml:mi><mml:mo>=</mml:mo><mml:mtext>viscosity</mml:mtext><mml:mo>+</mml:mo><mml:mtext>friction</mml:mtext><mml:mo>-</mml:mo><mml:mtext>gravity</mml:mtext><mml:mo>-</mml:mo><mml:mtext>terminus</mml:mtext><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
            When the ice is floating, there are two simplifications: the friction coefficient <inline-formula><mml:math id="M25" display="inline"><mml:mi>C</mml:mi></mml:math></inline-formula> is zero, and the surface elevation <inline-formula><mml:math id="M26" display="inline"><mml:mi>s</mml:mi></mml:math></inline-formula> can be written in terms of the thickness <inline-formula><mml:math id="M27" display="inline"><mml:mi>h</mml:mi></mml:math></inline-formula> as
              <disp-formula id="Ch1.E15" content-type="numbered"><label>15</label><mml:math id="M28" display="block"><mml:mrow><mml:mi>s</mml:mi><mml:mo>=</mml:mo><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mtext>I</mml:mtext></mml:msub><mml:mo>/</mml:mo><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mtext>W</mml:mtext></mml:msub><mml:mo>)</mml:mo><mml:mi>h</mml:mi><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
            Additionally, the terminal stress term of the action disappears after applying integration by parts to the gravity term to shift the gradient of the surface elevation over onto the velocity.
As the action functional for ice shelves has fewer terms than for grounded ice streams, we have defined a separate <monospace>IceShelf</monospace> model class.
The ice shelf and ice stream models share common components (i.e., the viscosity and side wall stress).</p>
      <p id="d1e1345">We verified the correctness of our implementation of the ice shelf model by checking that numerical results converge at the expected rate to an analytical solution for the velocity with a linearly sloping thickness in a rectangular domain <xref ref-type="bibr" rid="bib1.bibx30" id="paren.28"/>.
There are analytical solutions to the shallow stream equations with basal friction <xref ref-type="bibr" rid="bib1.bibx15 bib1.bibx19" id="paren.29"/>; these solutions are more complex algebraically than those for the case without basal friction.
To get an exact solution, we chose the ice velocity and thickness a priori and used the computer algebra system SymPy <xref ref-type="bibr" rid="bib1.bibx60" id="paren.30"/> to generate a friction coefficient that makes these fields an exact solution.
We hand-tuned the input parameters so that the values of the manufactured friction coefficient were within reasonable bounds.
We then checked that numerical results converge to this manufactured solution at the expected rate <xref ref-type="bibr" rid="bib1.bibx76" id="paren.31"/>.</p>
      <p id="d1e1360">Several studies have compared the shallow stream approximation to 3D models such as Blatter–Pattyn or full Stokes <xref ref-type="bibr" rid="bib1.bibx71" id="paren.32"/>.
The most appreciable difference between lower- and higher-order models occurs near the glacier grounding line, where the full Stokes equations can represent bridging stresses <xref ref-type="bibr" rid="bib1.bibx87" id="paren.33"/>.
The lack of vertical strain rates in the ice viscosity in 2D models can also lead to different equilibrium grounding line positions under the same external forcing.
The advantage of the SSA is<?pagebreak page4597?> that it can capture most of the overall flow features of fast-flowing glaciers but at much lower computational cost than the Stokes equations.</p>
</sec>
<sec id="Ch1.S2.SS2.SSS3">
  <label>2.2.3</label><title>Hybrid model</title>
      <p id="d1e1377">The first-order model in icepack is described in the class <monospace>HybridModel</monospace>.
The shallow ice and shallow stream models follow directly from the variational principles described above.
The hybrid flow model, while also based on a variational principle, uses two more advanced mathematical techniques: terrain-following coordinates and spectral discretization in the vertical dimension.</p>
      <p id="d1e1383">Each of these techniques has appeared in the literature on glacier modeling before but rarely all in the same place for a 3D model.
<xref ref-type="bibr" rid="bib1.bibx53" id="text.34"/> and <xref ref-type="bibr" rid="bib1.bibx10" id="text.35"/> used variational principles and vertical spectral methods, but these works considered only flow-band models.
<xref ref-type="bibr" rid="bib1.bibx50" id="text.36"/> used terrain-following coordinates for 3D glacier flow modeling, but they discretized the problem with finite difference methods in every direction and did not take the variational formulation of the diagnostic model into account.
<xref ref-type="bibr" rid="bib1.bibx43" id="text.37"/> used vertical semi-discretization of the variational problem, but this model used a finite difference discretization in the vertical direction.
The model used in <xref ref-type="bibr" rid="bib1.bibx16" id="text.38"/> is the closest to the one we present below.
This work used both terrain-following coordinates and a tensor product basis of Lagrange finite elements in the horizontal and higher-degree polynomials in a single vertical layer.
For the vertical basis functions, they used a plug flow mode and one shear mode.</p>
</sec>
<sec id="Ch1.S2.SS2.SSSx1" specific-use="unnumbered">
  <title>Terrain-following coordinates</title>
      <p id="d1e1408">Rather than the usual Cartesian coordinate system, the hybrid flow model uses terrain-following coordinates.
The terrain-following vertical coordinate <inline-formula><mml:math id="M29" display="inline"><mml:mi mathvariant="italic">ζ</mml:mi></mml:math></inline-formula> is
              <disp-formula id="Ch1.E16" content-type="numbered"><label>16</label><mml:math id="M30" display="block"><mml:mrow><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>b</mml:mi></mml:mrow><mml:mi>h</mml:mi></mml:mfrac></mml:mstyle><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
            where <inline-formula><mml:math id="M31" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula> is the ice base.
We can then think of the computational domain as the Cartesian product of a 2D footprint domain <inline-formula><mml:math id="M32" display="inline"><mml:mi mathvariant="normal">Ω</mml:mi></mml:math></inline-formula> and the unit interval <inline-formula><mml:math id="M33" display="inline"><mml:mrow><mml:mo>[</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>]</mml:mo></mml:mrow></mml:math></inline-formula>.</p>
      <p id="d1e1471">Both the bed elevation and thickness depend on <inline-formula><mml:math id="M34" display="inline"><mml:mi>x</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M35" display="inline"><mml:mi>y</mml:mi></mml:math></inline-formula>.
As a result, the formula for the horizontal gradient of a field in terrain-following coordinates includes an additional geometric correction factor.
Letting <inline-formula><mml:math id="M36" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">∇</mml:mi><mml:mi>z</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> and <inline-formula><mml:math id="M37" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> denote the horizontal gradient with the respective <inline-formula><mml:math id="M38" display="inline"><mml:mi>z</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M39" display="inline"><mml:mi mathvariant="italic">ζ</mml:mi></mml:math></inline-formula> terms held constant, the chain rule gives us
              <disp-formula id="Ch1.E17" content-type="numbered"><label>17</label><mml:math id="M40" display="block"><mml:mrow><mml:msub><mml:mi mathvariant="normal">∇</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mi>q</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi></mml:msub><mml:mi>q</mml:mi><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi>q</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi mathvariant="italic">ζ</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
            where we can calculate the spatial gradient of <inline-formula><mml:math id="M41" display="inline"><mml:mi mathvariant="italic">ζ</mml:mi></mml:math></inline-formula> as
              <disp-formula id="Ch1.E18" content-type="numbered"><label>18</label><mml:math id="M42" display="block"><mml:mrow><mml:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:msup><mml:mi>h</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mfenced close="}" open="{"><mml:mrow><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:mi mathvariant="normal">∇</mml:mi><mml:mi>b</mml:mi><mml:mo>+</mml:mo><mml:mi mathvariant="italic">ζ</mml:mi><mml:mi mathvariant="normal">∇</mml:mi><mml:mi>s</mml:mi></mml:mrow></mml:mfenced><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
            Likewise, the strain rate of a vector field can be expressed as
              <disp-formula id="Ch1.E19" content-type="numbered"><label>19</label><mml:math id="M43" display="block"><mml:mrow><mml:msub><mml:mover accent="true"><mml:mi mathvariant="italic">ε</mml:mi><mml:mo mathvariant="normal">˙</mml:mo></mml:mover><mml:mi>z</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:msub><mml:mover accent="true"><mml:mi mathvariant="italic">ε</mml:mi><mml:mo mathvariant="normal">˙</mml:mo></mml:mover><mml:mi mathvariant="italic">ζ</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>)</mml:mo><mml:mo>+</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mfenced open="(" close=")"><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>⊗</mml:mo><mml:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi><mml:mo>+</mml:mo><mml:mi mathvariant="normal">∇</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi><mml:mo>⊗</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow></mml:mfenced><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
            where <inline-formula><mml:math id="M44" display="inline"><mml:mo>⊗</mml:mo></mml:math></inline-formula> is the tensor product of two vectors.</p>
      <p id="d1e1696">For the Stokes equations, this alternative coordinate system also helps avoid the problem of how to enforce the condition <inline-formula><mml:math id="M45" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>⋅</mml:mo><mml:mi mathvariant="bold-italic">ν</mml:mi><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>a</mml:mi><mml:mo mathvariant="normal">˙</mml:mo></mml:mover><mml:mtext>b</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> at the ice base, where <inline-formula><mml:math id="M46" display="inline"><mml:mi mathvariant="bold-italic">ν</mml:mi></mml:math></inline-formula> is the unit outward normal vector, and <inline-formula><mml:math id="M47" display="inline"><mml:mrow><mml:msub><mml:mover accent="true"><mml:mi>a</mml:mi><mml:mo mathvariant="normal">˙</mml:mo></mml:mover><mml:mtext>b</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> is the basal mass balance.
This boundary condition is difficult to impose exactly because the unit outward normal vector <inline-formula><mml:math id="M48" display="inline"><mml:mi mathvariant="bold-italic">ν</mml:mi></mml:math></inline-formula> is defined on mesh faces whereas the velocity is defined at mesh vertices.
Elmer/Ice uses an ad hoc procedure to define the unit normal vectors at mesh nodes <xref ref-type="bibr" rid="bib1.bibx27" id="paren.39"/>.
This procedure is nearly always effective in practice.
But with a transformation to terrain-following coordinates, we can set the terrain-following vertical velocity <inline-formula><mml:math id="M49" display="inline"><mml:mi mathvariant="italic">ω</mml:mi></mml:math></inline-formula> to be <inline-formula><mml:math id="M50" display="inline"><mml:mrow><mml:mo>-</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>a</mml:mi><mml:mo mathvariant="normal">˙</mml:mo></mml:mover><mml:mtext>b</mml:mtext></mml:msub><mml:mo>/</mml:mo><mml:mi>h</mml:mi></mml:mrow></mml:math></inline-formula> at the ice base to impose this boundary condition with no additional intervention.</p>
      <p id="d1e1782">We also argue that answers expressed in terrain-following coordinates are more intuitive in some respects than in Cartesian coordinates.
At the bed of a grounded glacier, the vertical velocity in Cartesian coordinates is
              <disp-formula id="Ch1.E20" content-type="numbered"><label>20</label><mml:math id="M51" display="block"><mml:mrow><mml:mi>w</mml:mi><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>a</mml:mi><mml:mo mathvariant="normal">˙</mml:mo></mml:mover><mml:mtext>b</mml:mtext></mml:msub><mml:mo>+</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>⋅</mml:mo><mml:mi mathvariant="normal">∇</mml:mi><mml:mi>b</mml:mi><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
            Knowing that a model gives a vertical velocity at the base of a glacier of, say, 10 cm yr<inline-formula><mml:math id="M52" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula>, the modeler needs to also know the bed slope and sliding velocity.
In other words, it is not immediately clear whether the vertical velocity is a result of basal mass balance or of geometry without additional information.
By contrast, the vertical velocity <inline-formula><mml:math id="M53" display="inline"><mml:mi mathvariant="italic">ω</mml:mi></mml:math></inline-formula> in terrain-following coordinates evaluated at <inline-formula><mml:math id="M54" 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> is completely determined by basal mass balance and ice thickness.</p>
</sec>
<sec id="Ch1.S2.SS2.SSSx2" specific-use="unnumbered">
  <title>Spectral discretization</title>
      <p id="d1e1854">Terrain-following coordinates open up several choices for how to describe the vertical variation of the velocity field.
In Elmer/Ice, for example, the user can extend the finite element discretization into a number of vertical layers.
The number of vertical layers is a user-tuneable parameter, depending on the desired resolution along this axis <xref ref-type="bibr" rid="bib1.bibx27" id="paren.40"/>.</p>
      <p id="d1e1860">The horizontal velocity for many realistic flows is very smooth as a function of depth, and this suggests a different approach.
For example, under the plug flow approximation, the horizontal velocity is constant with depth.
Under the shallow ice approximation, the horizontal velocity varies with depth as <inline-formula><mml:math id="M55" display="inline"><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:mo>(</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>-</mml:mo><mml:mi mathvariant="italic">ζ</mml:mi><mml:msup><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:msup></mml:mrow></mml:math></inline-formula>, where <inline-formula><mml:math id="M56" display="inline"><mml:mrow><mml:mi>n</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:math></inline-formula> is the Glen flow law exponent.
This extra information about our solution suggests a modal rather than a nodal discretization strategy.</p>
      <?pagebreak page4598?><p id="d1e1903">Rather than divide the spatial domain into many vertical layers, we can instead use only one vertical layer and increase the polynomial degree in the vertical direction to obtain higher resolution.
This type of basis, in which different shape functions are used in different dimensions, is called a tensor product element <xref ref-type="bibr" rid="bib1.bibx59" id="paren.41"/>.
Given a set of finite element basis functions <inline-formula><mml:math id="M57" display="inline"><mml:mrow><mml:mo mathvariant="italic">{</mml:mo><mml:msub><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mi>k</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 mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula> defined on the 2D domain <inline-formula><mml:math id="M58" display="inline"><mml:mi mathvariant="normal">Ω</mml:mi></mml:math></inline-formula> and a set of basis functions <inline-formula><mml:math id="M59" display="inline"><mml:mrow><mml:mo mathvariant="italic">{</mml:mo><mml:msub><mml:mi mathvariant="italic">ψ</mml:mi><mml:mi>l</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi mathvariant="italic">ζ</mml:mi><mml:mo>)</mml:mo><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula> defined on the unit interval <inline-formula><mml:math id="M60" display="inline"><mml:mrow><mml:mo>[</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>,</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>]</mml:mo></mml:mrow></mml:math></inline-formula>, the tensor product finite element basis <inline-formula><mml:math id="M61" display="inline"><mml:mrow><mml:mo mathvariant="italic">{</mml:mo><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mi>l</mml:mi></mml:mrow></mml:msub><mml:mo mathvariant="italic">}</mml:mo></mml:mrow></mml:math></inline-formula> on the extruded domain is defined as
              <disp-formula id="Ch1.E21" content-type="numbered"><label>21</label><mml:math id="M62" display="block"><mml:mrow><mml:msub><mml:mi mathvariant="normal">Φ</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mi>l</mml:mi></mml:mrow></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:mi mathvariant="italic">ζ</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mi>k</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:msub><mml:mi mathvariant="italic">ψ</mml:mi><mml:mi>l</mml:mi></mml:msub><mml:mo>(</mml:mo><mml:mi mathvariant="italic">ζ</mml:mi><mml:mo>)</mml:mo><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
            For example, we can use piecewise linear or quadratic elements on (horizontal) triangles and use quintic or higher degree polynomials in the vertical.
Rather than use the usual Lagrange elements in the vertical dimension, we can instead use the Legendre polynomial basis.
The Legendre polynomials are mutually orthogonal, which makes the mass matrix block-diagonal, and provide better approximation properties <xref ref-type="bibr" rid="bib1.bibx85" id="paren.42"/>.
Our main reason for choosing to build icepack using the Firedrake package was because it natively supports tensor product elements.</p>
      <p id="d1e2059">The combination of using extruded meshes and tensor product elements in the vertical direction can be thought of merely as a way to discretize a PDE that has special structure.
Alternatively, we can view discretization in the vertical as defining a family of models indexed by the number of vertical basis functions.
The order-<inline-formula><mml:math id="M63" display="inline"><mml:mi>d</mml:mi></mml:math></inline-formula> model defines a coupled system of PDEs for <inline-formula><mml:math id="M64" display="inline"><mml:mi>d</mml:mi></mml:math></inline-formula> vector fields.
Each vector field represents one mode of vertical variability, similar to the distinction between barotropic and baroclinic modes in atmospheric physics and oceanography.
The system is then discretized in the horizontal and solved numerically.
In any case, the code is the same regardless of how one views the underlying mathematics.</p>
      <p id="d1e2077">The user then has to decide how many vertical modes are sufficient.
Using only degree 0 is exactly equivalent to the shallow stream approximation, and we use this fact as a sanity test for the hybrid model.
The degree-2 model is the minimal model that still exhibits vertical shear and can satisfy the zero-stress boundary condition at the ice surface.
Going up to a degree-4 model is sufficient to capture the exact solution for the shallow ice approximation.
In the tutorial notebooks for icepack, we use up to degrees 2 and 4, but the test suite checks up to degree 8.</p>
      <p id="d1e2080"><xref ref-type="bibr" rid="bib1.bibx16" id="text.43"/> used a similar approach to the one described above, with one vertical basis function for plug flow and one for shear flow.
The shear flow basis function is exact assuming the SIA balance when the ice is cold. When the ice is polythermal, they use a heuristic approximation.
By contrast, our approach allows for an arbitrary number of shear modes.</p><?xmltex \hack{\newpage}?>
</sec>
<sec id="Ch1.S2.SS2.SSSx3" specific-use="unnumbered">
  <title>Action functional</title>
      <p id="d1e2092">We can now describe all of the terms in the action functional for this model:

                  <disp-formula specific-use="align" content-type="numbered"><mml:math id="M65" display="block"><mml:mtable displaystyle="true"><mml:mlabeledtr id="Ch1.E22"><mml:mtd><mml:mtext>22</mml:mtext></mml:mtd><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><?xmltex \hack{\hbox\bgroup\fontsize{9.5}{9.5}\selectfont$\displaystyle}?><mml:mtext mathvariant="normal">viscosity</mml:mtext><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>n</mml:mi><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:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:munder><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mn mathvariant="normal">1</mml:mn></mml:munderover><mml:mi>h</mml:mi><mml:msup><mml:mi>A</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mfrac><mml:mn mathvariant="normal">1</mml:mn><mml:mi>n</mml:mi></mml:mfrac></mml:mrow></mml:msup><mml:msup><mml:msqrt><mml:mrow><mml:mo>|</mml:mo><mml:mover accent="true"><mml:mi mathvariant="italic">ε</mml:mi><mml:mo mathvariant="normal">˙</mml:mo></mml:mover><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>)</mml:mo><mml:msup><mml:mo>|</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mo>+</mml:mo><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:mo>|</mml:mo><mml:msub><mml:mo>∂</mml:mo><mml:mi mathvariant="italic">ζ</mml:mi></mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:msup><mml:mo>|</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:msqrt><mml:mrow><mml:mfrac><mml:mn mathvariant="normal">1</mml:mn><mml:mi>n</mml:mi></mml:mfrac><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mtext>d</mml:mtext><mml:mi mathvariant="italic">ζ</mml:mi><mml:mspace linebreak="nobreak" width="0.125em"/><mml:mtext>d</mml:mtext><mml:mi>x</mml:mi><mml:mo>;</mml:mo><?xmltex \hack{$\egroup}?></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E23"><mml:mtd><mml:mtext>23</mml:mtext></mml:mtd><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mtext>friction</mml:mtext><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi>m</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:mfrac></mml:mstyle><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:munder><mml:mi>C</mml:mi><mml:mo>|</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><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:msup><mml:mo>|</mml:mo><mml:mrow><mml:mfrac><mml:mn mathvariant="normal">1</mml:mn><mml:mi>m</mml:mi></mml:mfrac><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mtext>d</mml:mtext><mml:mi>x</mml:mi><mml:mo>;</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E24"><mml:mtd><mml:mtext>24</mml:mtext></mml:mtd><mml:mtd><mml:mstyle displaystyle="true" class="stylechange"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle class="stylechange" displaystyle="true"/><mml:mtext>gravity</mml:mtext><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:munder><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mn mathvariant="normal">1</mml:mn></mml:munderover><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mtext>I</mml:mtext></mml:msub><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mi mathvariant="normal">∇</mml:mi><mml:mi>s</mml:mi><mml:mo>⋅</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mtext>d</mml:mtext><mml:mi mathvariant="italic">ζ</mml:mi><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mtext>d</mml:mtext><mml:mi>x</mml:mi><mml:mo>;</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr><mml:mlabeledtr id="Ch1.E25"><mml:mtd><mml:mtext>25</mml:mtext></mml:mtd><mml:mtd><mml:mstyle class="stylechange" displaystyle="true"/></mml:mtd><mml:mtd><mml:mrow><mml:mstyle displaystyle="true" class="stylechange"/><mml:mtext>terminus</mml:mtext><mml:mo>=</mml:mo><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi mathvariant="normal">Γ</mml:mi></mml:munder><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mn mathvariant="normal">1</mml:mn></mml:munderover><mml:mo>(</mml:mo><mml:msub><mml:mi>p</mml:mi><mml:mtext>I</mml:mtext></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>p</mml:mi><mml:mtext>W</mml:mtext></mml:msub><mml:mo>)</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>⋅</mml:mo><mml:mi mathvariant="bold-italic">ν</mml:mi><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mtext>d</mml:mtext><mml:mi mathvariant="italic">ζ</mml:mi><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mtext>d</mml:mtext><mml:mi mathvariant="italic">γ</mml:mi><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mlabeledtr></mml:mtable></mml:math></disp-formula>

              Here, <inline-formula><mml:math id="M66" display="inline"><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mtext>I</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> is the ice overburden pressure, and <inline-formula><mml:math id="M67" display="inline"><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mtext>W</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> is the water pressure (if any) at the calving terminus from the ocean or a proglacial lake.
The full action functional is exactly analogous to that of the shallow stream model:
              <disp-formula id="Ch1.E26" content-type="numbered"><label>26</label><mml:math id="M68" display="block"><mml:mrow><mml:mi>J</mml:mi><mml:mo>=</mml:mo><mml:mtext>viscosity</mml:mtext><mml:mo>+</mml:mo><mml:mtext>friction</mml:mtext><mml:mo>-</mml:mo><mml:mtext>gravity</mml:mtext><mml:mo>-</mml:mo><mml:mtext>terminus</mml:mtext><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
            Again, we note that the expression for the horizontal strain rate in terrain-following coordinates comes from Eq. (<xref ref-type="disp-formula" rid="Ch1.E19"/>), which includes the additional geometric correction factor.</p>
      <p id="d1e2453">In terrain-following coordinates, the ice overburden pressure at relative depth <inline-formula><mml:math id="M69" display="inline"><mml:mi mathvariant="italic">ζ</mml:mi></mml:math></inline-formula> is <inline-formula><mml:math id="M70" display="inline"><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mtext>I</mml:mtext></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mtext>I</mml:mtext></mml:msub><mml:mi>g</mml:mi><mml:mi>h</mml:mi><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:mrow></mml:math></inline-formula>.
The water pressure is zero above the waterline and increases linearly below it.
Letting <inline-formula><mml:math id="M71" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ζ</mml:mi><mml:mtext>sl</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> denote the relative depth to the waterline, the water pressure is
              <disp-formula id="Ch1.E27" content-type="numbered"><label>27</label><mml:math id="M72" display="block"><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mtext>W</mml:mtext></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mtext>W</mml:mtext></mml:msub><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="italic">ζ</mml:mi><mml:mtext>sl</mml:mtext></mml:msub><mml:mo>-</mml:mo><mml:mi mathvariant="italic">ζ</mml:mi><mml:msub><mml:mo>)</mml:mo><mml:mo>+</mml:mo></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
            where <inline-formula><mml:math id="M73" display="inline"><mml:mrow><mml:mo mathvariant="italic">{</mml:mo><mml:mspace width="0.25em" linebreak="nobreak"/><mml:msub><mml:mo mathvariant="italic">}</mml:mo><mml:mo>+</mml:mo></mml:msub></mml:mrow></mml:math></inline-formula> denotes the positive part of a real number.
This quantity is continuous but only piecewise linear.
Integrating it correctly requires more work above and beyond the usual symbolic approach (see section Sect. <xref ref-type="sec" rid="Ch1.S4.SS5.SSS2"/> for details).</p>
</sec>
</sec>
<sec id="Ch1.S2.SS3">
  <label>2.3</label><title>Boundary conditions</title>
      <p id="d1e2572">The shallow shelf, shallow stream, and hybrid models require boundary conditions to be well posed.
We implement three different types that are largely the same for each physics model:
<list list-type="order"><list-item>
      <p id="d1e2577">Users can specify the velocity on segments of the domain boundary where ice is flowing in; this is a Dirichlet condition which is eliminated from the system at the level of the solver.
Supplying inflow boundary conditions for the hybrid model necessarily requires more information, namely the variation of the horizontal velocity with depth.</p></list-item><list-item>
      <p id="d1e2581">The Neumann condition at the ice terminus (Eq. <xref ref-type="disp-formula" rid="Ch1.E13"/>) is a natural boundary condition which is imposed by adding the relevant term to the action functional.</p></list-item><list-item>
      <p id="d1e2587">We allow for side wall boundary conditions where the ice has nonzero thickness but abuts, say, a fjord wall or an ice shelf embayment that exerts resistive stresses.
In the normal direction, the boundary condition is that <inline-formula><mml:math id="M74" display="inline"><mml:mrow><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>⋅</mml:mo><mml:mi mathvariant="bold-italic">ν</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">0</mml:mn></mml:mrow></mml:math></inline-formula>, where <inline-formula><mml:math id="M75" display="inline"><mml:mi mathvariant="bold-italic">ν</mml:mi></mml:math></inline-formula> is the unit outward normal vector.
In the tangential direction, the boundary condition is <inline-formula><mml:math id="M76" display="inline"><mml:mrow><mml:mi>h</mml:mi><mml:mi mathvariant="bold">M</mml:mi><mml:mo>⋅</mml:mo><mml:mi mathvariant="bold-italic">ν</mml:mi><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mi>C</mml:mi><mml:mo>|</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:msup><mml:mo>|</mml:mo><mml:mrow><mml:mfrac><mml:mn mathvariant="normal">1</mml:mn><mml:mi>m</mml:mi></mml:mfrac><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow></mml:math></inline-formula>, where <inline-formula><mml:math id="M77" display="inline"><mml:mi>C</mml:mi></mml:math></inline-formula> is a side wall friction coefficient and <inline-formula><mml:math id="M78" display="inline"><mml:mi mathvariant="bold">M</mml:mi></mml:math></inline-formula> is the membrane stress tensor.
Putting these together gives a mixed Dirichlet–Robin boundary condition.
The side wall friction (Robin) boundary condition is natural and, thus, can be added directly to the action functional.
The constraint of no normal flow is harder to impose directly for a curved boundary; we used the penalty method.</p></list-item></list>
Future versions of the code will use Nitsche's method <xref ref-type="bibr" rid="bib1.bibx68" id="paren.44"/> instead of the penalty method to enforce the no normal flow constraint.
Nitsche's method dramatically improves the conditioning of the associated optimization problem.
Our implementation of the hybrid model requires special care to handle the terminus boundary condition as a consequence of our choice of vertical basis functions (see section Sect. <xref ref-type="sec" rid="Ch1.S4.SS5.SSS2"/>).</p>
      <p id="d1e2672">The shallow ice model alone is able to cope with ice-free regions in the domain, albeit with truncation at zero thickness.
All of the remaining models and their boundary conditions assume that the entire spatial domain is ice covered.
We will improve the solvers to address ice-free areas in future versions.</p>
</sec>
<?pagebreak page4599?><sec id="Ch1.S2.SS4">
  <label>2.4</label><title>Substituting model components</title>
      <p id="d1e2683">Many aspects of glacier physics are not completely understood.
For example, the most commonly used sliding law is the power law
            <disp-formula id="Ch1.E28" content-type="numbered"><label>28</label><mml:math id="M79" display="block"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">τ</mml:mi><mml:mi>b</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mi>C</mml:mi><mml:mo>|</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:msup><mml:mo>|</mml:mo><mml:mrow><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mn mathvariant="normal">1</mml:mn><mml:mi>m</mml:mi></mml:mfrac></mml:mstyle><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow></mml:math></disp-formula>
          for some exponent <inline-formula><mml:math id="M80" display="inline"><mml:mi>m</mml:mi></mml:math></inline-formula>. Older research assumed <inline-formula><mml:math id="M81" display="inline"><mml:mrow><mml:mi>m</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:math></inline-formula> based on the theory of regelation <xref ref-type="bibr" rid="bib1.bibx89" id="paren.45"/>, which has since been referred to as the Weertman sliding law.
When <inline-formula><mml:math id="M82" display="inline"><mml:mrow><mml:mi>m</mml:mi><mml:mo>=</mml:mo><mml:mi mathvariant="normal">∞</mml:mi></mml:mrow></mml:math></inline-formula>, the basal shear stress is independent of the sliding speed; this is referred to as perfect plasticity.
More recently, <xref ref-type="bibr" rid="bib1.bibx78" id="text.46"/> proposed an alternative form that acts like the Weertman law when <inline-formula><mml:math id="M83" display="inline"><mml:mrow><mml:mo>|</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>|</mml:mo><mml:mo>≪</mml:mo><mml:msub><mml:mi>u</mml:mi><mml:mtext>c</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> and like the plastic law when <inline-formula><mml:math id="M84" display="inline"><mml:mrow><mml:mo>|</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>|</mml:mo><mml:mo>≫</mml:mo><mml:msub><mml:mi>u</mml:mi><mml:mtext>c</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula>.
A simplified form of this model can be expressed as
            <disp-formula id="Ch1.E29" content-type="numbered"><label>29</label><mml:math id="M85" display="block"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">τ</mml:mi><mml:mi>b</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mi>C</mml:mi><mml:msup><mml:mfenced close=")" open="("><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>|</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>|</mml:mo></mml:mrow><mml:mrow><mml:mo>|</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>|</mml:mo><mml:mo>+</mml:mo><mml:msub><mml:mi>u</mml:mi><mml:mtext>c</mml:mtext></mml:msub></mml:mrow></mml:mfrac></mml:mstyle></mml:mfenced><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mn mathvariant="normal">1</mml:mn><mml:mi>m</mml:mi></mml:mfrac></mml:mstyle></mml:msup><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mrow><mml:mo>|</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>|</mml:mo></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M86" display="inline"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mtext>c</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> is some critical speed. This latter equation has been found to agree best with laboratory experiments on till <xref ref-type="bibr" rid="bib1.bibx91" id="paren.47"/> and in reproducing observed velocity variations <xref ref-type="bibr" rid="bib1.bibx42" id="paren.48"/>.</p>
      <p id="d1e2878">The Weertman and plastic sliding laws possess the same functional form but differ only in the value of a single scalar parameter <inline-formula><mml:math id="M87" display="inline"><mml:mi>m</mml:mi></mml:math></inline-formula>.
The Schoof sliding law, on the other hand, has a totally different functional dependence on the velocity.
Several authors, including Schoof, have proposed that the basal shear stress is also a function of the effective pressure <inline-formula><mml:math id="M88" display="inline"><mml:mrow><mml:mi>N</mml:mi><mml:mo>=</mml:mo><mml:mi mathvariant="italic">ρ</mml:mi><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mi>p</mml:mi><mml:mtext>w</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> within the subglacial hydrological system <xref ref-type="bibr" rid="bib1.bibx18 bib1.bibx78" id="paren.49"/>.
Implementing these more sophisticated mathematical models would require adding an extra argument to the procedure for solving the diagnostic equation.</p>
      <p id="d1e2914">One of our goals with icepack is to facilitate experimentation with the model physics, even for novice users.
Of the programming languages that are commonly used for scientific computing, only Python and possibly Julia would appear to meet these needs.
To support use cases like implementing the Schoof sliding law, it must be possible not just to change the value of a single parameter but also to completely alter the functional form of a given model component.
For uses cases like explicitly adding the dependence of basal shear stress on hydrology, it must also be possible to add entirely new fields to a given model component.
In programming terms, this amounts to changing the number of arguments to the function that calculates basal shear stress, which Python accommodates easily.
For a library developed in C or Fortran, the user would then also have to change the signature of the diagnostic solve function, which is undesirable.
In C++, one could avoid changing the signature of the diagnostic solve routine by (1) using variadic templates, (2) wrapping the inputs in a class, or (3) passing all arguments in a dictionary.
Using variadic templates or wrapping the inputs in a class would require users to know more about generic or object-oriented programming than a novice might.
Using a dictionary data structure to pass arguments is relatively easier but would be more idiomatic in Python than in C++.
Some of the difficulty associated with changing the model physics in a C++ code can be alleviated with automatic differentiation tools, which have been used successfully in Albany/FELIX <xref ref-type="bibr" rid="bib1.bibx86" id="paren.50"/> and ISSM <xref ref-type="bibr" rid="bib1.bibx36" id="paren.51"/>.
Nonetheless, C++ or any language with a stronger type discipline will be much more restrictive about changing function signatures.</p>
      <p id="d1e2923">In icepack, users can substitute any diagnostic model component for the parameterization of their choosing, including adding new fields.
From the user's perspective, substituting model physics components does not require any advanced language features beyond keyword arguments.
To understand how this is possible, we will briefly describe the path that the input fields take through the program:
<list list-type="order"><list-item>
      <p id="d1e2928">The user passes all arguments to the diagnostic solve procedure by keyword.</p></list-item><list-item>
      <p id="d1e2932">The diagnostic solve procedure creates a symbolic representation of the action functional by summing up<?pagebreak page4600?> several terms, such as the viscosity and basal friction.
Calculating these terms is delegated to specialized procedures for each term.
Each term procedure gets the entire collection of fields.</p></list-item><list-item>
      <p id="d1e2936">The routine that calculates the terms of the action selects which fields it actually needs from the argument dictionary and then creates the symbolic representation of that term.</p></list-item><list-item>
      <p id="d1e2940">Finally, once the symbolic representation of the action functional has been created, all the responsibility passes to the nonlinear solver.</p></list-item></list>
To substitute different model components, the user intervenes at step 3.
Each model object – shallow ice, shallow stream, etc. – is initialized with a default set of routines to calculate the terms of that model's action functional.
The user can replace these default routines with one of their own choosing by passing the function of their choice when that model object is initialized.</p>
      <p id="d1e2945">In step 3, any fields that were unnecessary for calculating a given component are ignored.
For example, the gravitational driving power routine will pull out the velocity, thickness, and surface elevation.
While the routine will not use them, it also has access to other fields, such as the ice fluidity.</p>
      <p id="d1e2948">In adopting this approach, we are restricted to using keyword arguments instead of positional arguments.
We argue that employing only keyword arguments is a strength rather than a weakness because it enhances readability and comprehensibility for the particular use case of calling a physics solver.
The user only needs to know the argument names, which are chosen to agree with the English name most commonly used in the literature – “friction”, “rheology”, “velocity”, etc.
The order of the arguments is arbitrary and immaterial.
The preference for argument passing by name is specific to this use case, however, and is not universal.</p>
</sec>
<sec id="Ch1.S2.SS5">
  <label>2.5</label><title>Heat transport</title>
      <p id="d1e2959">We implemented the enthalpy transport model described in <xref ref-type="bibr" rid="bib1.bibx5" id="text.52"/>.
The enthalpy density <inline-formula><mml:math id="M89" display="inline"><mml:mi>E</mml:mi></mml:math></inline-formula> describes the heat content of the material in a way that incorporates both temperature <inline-formula><mml:math id="M90" display="inline"><mml:mi>T</mml:mi></mml:math></inline-formula> and latent heat stored in meltwater:
            <disp-formula id="Ch1.E30" content-type="numbered"><label>30</label><mml:math id="M91" display="block"><mml:mrow><mml:mi>E</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mtext>I</mml:mtext></mml:msub><mml:mo>(</mml:mo><mml:mi>c</mml:mi><mml:mi>T</mml:mi><mml:mo>+</mml:mo><mml:mi>L</mml:mi><mml:mi>f</mml:mi><mml:mo>)</mml:mo><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M92" display="inline"><mml:mi>L</mml:mi></mml:math></inline-formula> is the latent heat of melting of ice, and <inline-formula><mml:math id="M93" display="inline"><mml:mi>f</mml:mi></mml:math></inline-formula> is the melt fraction.
The melt fraction can only be positive when the ice as at the pressure-melting point.
The temperature and meltwater fraction can be uniquely calculated at any point from the value of the enthalpy, so nothing is sacrificed in describing heat content one way or the other.
Using the enthalpy has the advantage of circumventing many of the difficulties associated with tracking the interface between cold and temperate ice.
Our implementation of the model uses all of the simplifying assumptions described in <xref ref-type="bibr" rid="bib1.bibx5" id="text.53"/> – for example, that horizontal diffusion is negligible and that heat capacity and conductivity are not temperature-dependent within each phase.
The resulting PDE is
            <disp-formula id="Ch1.E31" content-type="numbered"><label>31</label><mml:math id="M94" display="block"><mml:mrow><mml:mfenced open="(" close=")"><mml:mrow><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mo>∂</mml:mo><mml:mrow><mml:mo>∂</mml:mo><mml:mi>t</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:mi mathvariant="normal">∇</mml:mi><mml:mo>⋅</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi></mml:mrow></mml:mfenced><mml:mi>E</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 mathvariant="italic">α</mml:mi><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi>E</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>q</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M95" display="inline"><mml:mi>u</mml:mi></mml:math></inline-formula> is the full 3D velocity, <inline-formula><mml:math id="M96" display="inline"><mml:mi mathvariant="italic">α</mml:mi></mml:math></inline-formula> is the (temperature-dependent) thermal diffusivity, and <inline-formula><mml:math id="M97" display="inline"><mml:mi>q</mml:mi></mml:math></inline-formula> represents the volumetric heat sources.
This form assumes some amount of vertical diffusion of water at the melting point.
A realistic treatment would require treating the ice as a porous medium and modeling englacial water transport explicitly, which we have not done.
The boundary condition at the ice base is a fixed flux of heat from geothermal sources or from the oceans.
We depart from <xref ref-type="bibr" rid="bib1.bibx5" id="text.54"/> in one respect.
Rather than fix the ice surface temperature to the atmospheric temperature, we instead use a Robin boundary condition that makes the ice temperature adjust to the external temperature:
            <disp-formula id="Ch1.E32" content-type="numbered"><label>32</label><mml:math id="M98" display="block"><mml:mrow><mml:mo>-</mml:mo><mml:mi mathvariant="italic">α</mml:mi><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mo>∂</mml:mo><mml:mi>E</mml:mi></mml:mrow><mml:mrow><mml:mo>∂</mml:mo><mml:mi>z</mml:mi></mml:mrow></mml:mfrac></mml:mstyle><mml:msub><mml:mo mathsize="1.5em">|</mml:mo><mml:mrow><mml:mi>z</mml:mi><mml:mo>=</mml:mo><mml:mi>s</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mi mathvariant="italic">κ</mml:mi><mml:mo>(</mml:mo><mml:mi>E</mml:mi><mml:mo>-</mml:mo><mml:msub><mml:mi>E</mml:mi><mml:mtext>s</mml:mtext></mml:msub><mml:mo>)</mml:mo><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M99" display="inline"><mml:mi mathvariant="italic">κ</mml:mi></mml:math></inline-formula> is a surface exchange coefficient, and <inline-formula><mml:math id="M100" display="inline"><mml:mrow><mml:msub><mml:mi>E</mml:mi><mml:mtext>s</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> is the temperature-equivalent enthalpy that forces the surface.
Using a Robin instead of a Dirichlet boundary condition at the surface allows for more gradual adjustment to above-freezing temperatures that might otherwise create areas of unrealistically high melt fraction.
Except in blue ice areas, the thermal contact between ice and the atmosphere is mediated by firn, which we do not model explicitly.
The Robin boundary condition is a compromise to work around this missing component of the system.
Finally, if there is an upstream boundary, the user must provide the inflow values of the enthalpy with depth, while outflow boundary conditions are applied at the glacier terminus.</p>
      <p id="d1e3181">The heat transport model assumes that the user will supply a volumetric heating rate, but the model itself does not calculate the heating rate from other fields. The simplest description for the shear heating rate is
            <disp-formula id="Ch1.E33" content-type="numbered"><label>33</label><mml:math id="M101" display="block"><mml:mrow><mml:mi>q</mml:mi><mml:mo>=</mml:mo><mml:mi mathvariant="italic">τ</mml:mi><mml:mo>:</mml:mo><mml:mover accent="true"><mml:mi mathvariant="italic">ε</mml:mi><mml:mo mathvariant="normal">˙</mml:mo></mml:mover><mml:mo>=</mml:mo><mml:msup><mml:mi>A</mml:mi><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow><mml:mi>n</mml:mi></mml:mfrac></mml:mstyle></mml:msup><mml:mo>|</mml:mo><mml:mover accent="true"><mml:mi mathvariant="italic">ε</mml:mi><mml:mo mathvariant="normal">˙</mml:mo></mml:mover><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>)</mml:mo><mml:msup><mml:mo>|</mml:mo><mml:mrow><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mn mathvariant="normal">1</mml:mn><mml:mi>n</mml:mi></mml:mfrac></mml:mstyle><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 fluidity factor <inline-formula><mml:math id="M102" display="inline"><mml:mi>A</mml:mi></mml:math></inline-formula> in Glen's law is roughly a known function of both temperature and melt fraction, and we have included this function in the package. However,
parameterizing fluidity is not sufficient by itself.
While the dependence of fluidity on temperature is known fairly well from laboratory experiments, the dependence on melt fraction is known with much less certainty <xref ref-type="bibr" rid="bib1.bibx22" id="paren.55"/>.
Some users of this module may want to substitute in their own parameterization for melt fraction dependence.
Other processes such as damage, fabric development, and impurities can affect the fluidity as well.
Moreover, there may be other volumetric heat sources that users wish to account for, such as cryo-hydrologic warming <xref ref-type="bibr" rid="bib1.bibx73" id="paren.56"/>.
These considerations defy any attempt to have one function that calculates<?pagebreak page4601?> the volumetric heating rate from the other state variables.
Instead, we opted for an interface where users calculate this rate themselves, with tutorials and examples that show how to do so for simple scenarios, leaving the freedom to alter the thermal feedbacks as they see fit.
Our general design principle is that icepack will solve differential equations for the various prognostic fields, but it is up to users to decide how these fields are coupled.</p>
      <p id="d1e3260">We have not implemented a model for the surface or englacial transport of meltwater, although it would be possible to include this process.
Instead, we rely on an external scheme to act as a sink of enthalpy for meltwater fraction values above some user-defined critical value.
A common choice for this critical value is 1 % <xref ref-type="bibr" rid="bib1.bibx5" id="paren.57"/>.</p>
</sec>
<sec id="Ch1.S2.SS6">
  <label>2.6</label><title>Damage transport</title>
      <p id="d1e3274">Other physical fields besides temperature can influence ice fluidity.
At large spatial scales (<inline-formula><mml:math id="M103" display="inline"><mml:mo lspace="0mm">&gt;</mml:mo></mml:math></inline-formula> 5 km), crevasse fields affect ice flow by reducing the lateral area over which stress can be transmitted.
Modeling individual fractures is not computationally feasible for large-scale simulations.
Instead, we have implemented the phenomenological model described in <xref ref-type="bibr" rid="bib1.bibx1" id="text.58"/>, which is based on the theory of continuum damage mechanics.
This model is defined in the class <monospace>DamageTransport</monospace>.
Prognostic damage models can be broken down into three parts: (1) evolve the damage field based on the membrane stress of the glacier, (2) advect the damage field with flow, and (3) feed the damage field back into the fluidity of the glacier.
Changes in fluidity, in turn, affect the membrane stress; the coupling between bulk damage and ice flow goes both ways.
The model from <xref ref-type="bibr" rid="bib1.bibx1" id="text.59"/> adds sources of damage where the membrane stress exceeds a critical value and sinks of damage when the principal strain rate is less than a critical value.</p>
</sec>
</sec>
<sec id="Ch1.S3">
  <label>3</label><title>Data assimilation</title>
      <p id="d1e3302">The icepack package includes a set of routines for estimating the basal friction or rheology coefficients from observational data.
Mathematically, this inverse problem amounts to finding a critical point of the functional
          <disp-formula id="Ch1.E34" content-type="numbered"><label>34</label><mml:math id="M104" display="block"><mml:mrow><mml:mi>L</mml:mi><mml:mo>(</mml:mo><mml:mi>u</mml:mi><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:mo>=</mml:mo><mml:mi>J</mml:mi><mml:mo>(</mml:mo><mml:mi>u</mml:mi><mml:mo>)</mml:mo><mml:mo>+</mml:mo><mml:mi>R</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>)</mml:mo><mml:mo>+</mml:mo><mml:mo>〈</mml:mo><mml:mi>F</mml:mi><mml:mo>(</mml:mo><mml:mi>u</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="italic">θ</mml:mi><mml:mo>)</mml:mo><mml:mo>,</mml:mo><mml:mi mathvariant="italic">λ</mml:mi><mml:mo>〉</mml:mo><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
        where <inline-formula><mml:math id="M105" display="inline"><mml:mi>J</mml:mi></mml:math></inline-formula> is the misfit between the computed velocity <inline-formula><mml:math id="M106" display="inline"><mml:mi>u</mml:mi></mml:math></inline-formula> and observations, <inline-formula><mml:math id="M107" display="inline"><mml:mi mathvariant="italic">θ</mml:mi></mml:math></inline-formula> is the field to be inferred and <inline-formula><mml:math id="M108" display="inline"><mml:mi>R</mml:mi></mml:math></inline-formula> a regularization functional that measures the spatial variability of this field, <inline-formula><mml:math id="M109" display="inline"><mml:mi>F</mml:mi></mml:math></inline-formula> is the diagnostic physics, and <inline-formula><mml:math id="M110" display="inline"><mml:mi mathvariant="italic">λ</mml:mi></mml:math></inline-formula> is a Lagrange multiplier to enforce the physics <xref ref-type="bibr" rid="bib1.bibx57 bib1.bibx39 bib1.bibx54 bib1.bibx80" id="paren.60"/>.
The optimal value <inline-formula><mml:math id="M111" display="inline"><mml:mi mathvariant="italic">θ</mml:mi></mml:math></inline-formula> gives the best fit to observations subject to the constraints of the physics and that it should not overfit to noise in the data.
The class <monospace>InverseProblem</monospace> represents the specification of an inverse problem, which requires
<list list-type="bullet"><list-item>
      <p id="d1e3431">the model object and the method that solves the diagnostic equation,</p></list-item><list-item>
      <p id="d1e3435">the objective and regularization functionals,</p></list-item><list-item>
      <p id="d1e3439">the observed field and the name of the argument to the diagnostic solver,</p></list-item><list-item>
      <p id="d1e3443">an initial guess for the field to be estimated and the name of the argument to the diagnostic solver, and</p></list-item><list-item>
      <p id="d1e3447">extra data passed to the diagnostic solver such as boundary conditions.</p></list-item></list>
This class currently assumes that the observed state is always the ice velocity.
The state to be estimated can be any single input field to the diagnostic model – basal friction, rheology, or another field that the user has added by customizing the model.
In principle the same design would suffice for more complicated inverse problems, and this is an area of active development.</p>
      <p id="d1e3451">The <monospace>InverseProblem</monospace> class is flexible enough to account for users defining their own parameterization for the rheology or friction coefficient as described in Sect. <xref ref-type="sec" rid="Ch1.S2.SS4"/>.
This flexibility with respect to parameterization is not just convenient but essential for common data assimilation workflows.
Nearly all studies in the literature introduce a parameterization of the field to be estimated in terms of some auxiliary field in order to guarantee positivity <xref ref-type="bibr" rid="bib1.bibx57 bib1.bibx40" id="paren.61"/>.
For example, one could define the friction coefficient <inline-formula><mml:math id="M112" display="inline"><mml:mi>C</mml:mi></mml:math></inline-formula> in terms of an auxiliary variable <inline-formula><mml:math id="M113" display="inline"><mml:mi mathvariant="italic">β</mml:mi></mml:math></inline-formula> as <inline-formula><mml:math id="M114" display="inline"><mml:mrow><mml:mi>C</mml:mi><mml:mo>=</mml:mo><mml:msup><mml:mi mathvariant="italic">β</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula> to guarantee positivity.
One could also just as easily use <inline-formula><mml:math id="M115" display="inline"><mml:mrow><mml:mi>C</mml:mi><mml:mo>∝</mml:mo><mml:mi>exp⁡</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="italic">β</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula>.
The data assimilation routines in icepack can work the same way for any parameterization of the physics because Firedrake provides a rich set of routines for symbolically calculating functional derivatives.
The <monospace>InverseProblem</monospace> class only needs to know which functional needs to be differentiated with respect to which field.</p>
      <p id="d1e3513">The <monospace>InverseSolver</monospace> class is responsible for actually solving the inverse problem.
This class will be described further in section Sect. <xref ref-type="sec" rid="Ch1.S4.SS4"/>.</p>
</sec>
<sec id="Ch1.S4">
  <label>4</label><title>Numerics</title>
      <p id="d1e3529">In the previous sections we described <italic>what</italic> problems icepack can solve (i.e., various physics models and data assimilation problems).
In this section, we will describe <italic>how</italic> these problems are solved.
This separation between the two questions parallels the broader design of the software package.</p>
      <p id="d1e3538">The key classes that users interact with are flow models and solvers.
The role of the model classes is to describe what problem is being solved.
These classes describe the diagnostic model by taking in the input fields<?pagebreak page4602?> – ice velocity, thickness, surface elevation, etc. – and returning a symbolic representation of the action functional.
There are several model classes, one for each set of physics equations: <monospace>ShallowIce</monospace>, <monospace>IceShelf</monospace>, <monospace>IceStream</monospace>, and <monospace>HybridModel</monospace>.
The model classes do not dictate how that problem should be solved numerically; this is the realm of a separate class called <monospace>FlowSolver</monospace>.
This <monospace>FlowSolver</monospace> class has methods for computing the solutions of the diagnostic and prognostic equations and works the same regardless of which model is being solved.
The diagnostic solve method amounts to invoking an external Newton solve procedure on the symbolic action functional that the model object creates.
The Newton solver itself is completely standard, but the convergence criterion is not (see section Sect. <xref ref-type="sec" rid="Ch1.S4.SS3"/>).
Finally, the flow solver has a method to update the ice thickness from the current value, the ice velocity, and the mass balance rates.</p>
      <p id="d1e3562">The Unified Form Language for specifying weak forms of PDEs contains all of the primitives necessary to express individual terms of the action functional.
These primitives consist of the basic vector calculus operators, like the gradient of a field; tensor calculus operations, like taking the dot product of two vectors or tensors; scalar functions, like the square root or exponential; and symbolic integration over the mesh or its boundary.
For example, the strain rate for a given velocity field <inline-formula><mml:math id="M116" display="inline"><mml:mi>u</mml:mi></mml:math></inline-formula> can be written as <monospace>sym(grad(u))</monospace>, where the function <monospace>grad</monospace> represents the symbolic gradient of a field, and <monospace>sym</monospace> represents the symmetrization of a rank-2 tensor.</p>
<sec id="Ch1.S4.SS1">
  <label>4.1</label><title>Advective transport</title>
      <p id="d1e3588">The icepack package offers two time-stepping schemes for solving the prognostic model (Eq. <xref ref-type="disp-formula" rid="Ch1.E1"/>).
For testing purposes, we include the implicit Euler scheme, which is first-order accurate and unconditionally stable for the advection equation.
The default is a second-order accurate scheme based on an implicit version of the Lax–Wendroff method, which is also unconditionally stable for the advection equation <xref ref-type="bibr" rid="bib1.bibx24" id="paren.62"/>.
Explicit schemes all require a time step that satisfies the Courant–Friedrichs–Lewy (CFL) stability condition, which many glaciologists may be unfamiliar with.
With an unconditionally stable scheme, users will get an answer, rather than a runtime error, should they try to use a larger time step.
The extra computational cost of using an implicit time discretization for the prognostic equation is dwarfed by the cost of the diagnostic solve.
Advanced users who are interested in maximizing performance can subclass the solver to implement a faster explicit scheme.
We note that, while the stability properties of different schemes for the linear advection equation guided our choice of method, the coupled system for both thickness and velocity is not linear and not hyperbolic.</p>
      <p id="d1e3596">The implicit Euler and Lax–Wendroff schemes tend to diffuse out sharp discontinuities that may be present in the true solution <xref ref-type="bibr" rid="bib1.bibx24" id="paren.63"/>.
As the ice thickness does not possess shock waves or propagating discontinuities, this error mode is tolerable.
The coupling of ice thickness to velocity makes the whole system more closely resemble a parabolic problem than a hyperbolic one, and under the shallow ice approximation, the system is truly parabolic.</p>
      <p id="d1e3602">Other problems in glaciology have more of a hyperbolic character.
For example, the thresholding behavior of the source terms for the damage model (see Sect. <xref ref-type="sec" rid="Ch1.S2.SS6"/>) can create sharp discontinuities.
The implicit Euler scheme would obscure this important feature.
For the damage solver, we have instead used a strong stability-preserving Runge–Kutta method in time, a discontinuous Galerkin basis in space, and a flux limiter to best capture these sharp interfaces <xref ref-type="bibr" rid="bib1.bibx84" id="paren.64"/>.</p>
      <p id="d1e3610">The icepack package currently lacks an adaptive time-stepping scheme.
Implicit schemes allow for longer time steps to be taken than explicit ones, but taking very long time steps will give inaccurate solutions and, in the presence of ablation, may yield negative thickness values.
At present, users are still responsible for checking the accuracy of their results – for example, by running at more than one resolution.
Adaptive time-stepping will be added in a future release.</p>
</sec>
<sec id="Ch1.S4.SS2">
  <label>4.2</label><title>Convex optimization</title>
      <p id="d1e3622">The action functional for each diagnostic model is convex (i.e., the second derivative is strictly positive-definite).
From a theoretical perspective, convexity guarantees that the problem has a unique solution.
This property is also especially advantageous for implementing numerical solvers.
We use a damped Newton method to solve the diagnostic equations.
Starting from a guess <inline-formula><mml:math id="M117" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> for the velocity, the search direction <inline-formula><mml:math id="M118" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">v</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> is the unique solution of the linear system
            <disp-formula id="Ch1.E35" content-type="numbered"><label>35</label><mml:math id="M119" display="block"><mml:mrow><mml:msup><mml:mi>d</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mi>J</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>⋅</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">v</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mi>d</mml:mi><mml:mi>J</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
          The next approximation for the velocity minimizes <inline-formula><mml:math id="M120" display="inline"><mml:mi>J</mml:mi></mml:math></inline-formula> along the search direction <inline-formula><mml:math id="M121" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">v</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> starting from <inline-formula><mml:math id="M122" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>, i.e.,
            <disp-formula id="Ch1.E36" content-type="numbered"><label>36</label><mml:math id="M123" display="block"><mml:mtable rowspacing="0.2ex" class="split" displaystyle="true" columnalign="right left"><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:msub><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:msub><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>⋅</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">v</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd/><mml:mtd><mml:mrow><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mtext>argmin</mml:mtext><mml:mi mathvariant="italic">α</mml:mi></mml:msub><mml:mspace linebreak="nobreak" width="0.25em"/><mml:mspace width="0.25em" linebreak="nobreak"/><mml:mi>J</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi mathvariant="italic">α</mml:mi><mml:msub><mml:mi mathvariant="bold-italic">v</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>.</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
          For an initial guess sufficiently close to the exact solution, the undamped Newton method (<inline-formula><mml:math id="M124" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">α</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:math></inline-formula> at every step) converges quadratically.
The line search step ensures that the method can converge even from a poor initial guess, provided that the line search method satisfies the Armijo–Wolfe criteria <xref ref-type="bibr" rid="bib1.bibx69" id="paren.65"/>.</p>
      <p id="d1e3828">For a convex problem, <inline-formula><mml:math id="M125" display="inline"><mml:mrow><mml:msup><mml:mi>d</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mi>J</mml:mi></mml:mrow></mml:math></inline-formula> is a symmetric and positive-definite matrix.
This has two advantages.
First, the search direction is always a descent direction for <inline-formula><mml:math id="M126" display="inline"><mml:mi>J</mml:mi></mml:math></inline-formula>, which is not always the case for non-convex problems.
Second, symmetry and positivity enable the use of specialized linear solvers, such as the Cholesky decomposition or the conjugate gradient algorithm, that are superior to their more general counterparts in many respects.</p>
      <?pagebreak page4603?><p id="d1e3851">Other software packages that treat diagnostic models as nonlinear systems of equations tend to rely on ad hoc procedures for initializing the numerical solution process.
For example, without a damping procedure in Newton's method, the iteration can prove unstable if initialized far away from the true solution.
Some packages combat this problem by using a few iterations of the more robust but slower Picard method first <xref ref-type="bibr" rid="bib1.bibx27" id="paren.66"/>.
While this approach can be effective, it requires the number of Picard iterations to be tuned.
There is no guarantee that an adequate amount for one problem will work well on another.
This issue rarely appears on realistic input data, but when solving inverse problems, the intermediate guesses for the inferred field can be wildly unrealistic before converging.
A forward model solver that is not sufficiently robust can crash in these extreme scenarios.
By contrast, a damped Newton procedure using a line search that satisfies the Armijo–Wolfe criteria is guaranteed to converge on nondegenerate, if unrealistic, input data.
The line search method that we used here is one way to achieve global convergence of Newton's method, but there are other approaches to achieve global convergence – for example, homotopy continuation <xref ref-type="bibr" rid="bib1.bibx86" id="paren.67"/> or the trust region method <xref ref-type="bibr" rid="bib1.bibx11" id="paren.68"/>.</p>
</sec>
<sec id="Ch1.S4.SS3">
  <label>4.3</label><title>Convergence metrics</title>
      <p id="d1e3871">Several works in the literature have weighed the relative merits of different iterative methods for solving the nonlinear diagnostic equation <xref ref-type="bibr" rid="bib1.bibx72" id="paren.69"/>.
Few have considered the problem of when to stop iterating.
The most common stopping criteria are when (1) the 2-norm of the residual is sufficiently small or (2) the relative change in the iterates is sufficiently small.
Each of these approaches has problems.
The residual norm depends on the discretization and does not weight all degrees of freedom proportionally (e.g., vertex and edge degrees of freedom in higher-order finite element methods).
The relative change criterion, on the other hand, can suggest convergence when, in fact, the method has stagnated.</p>
      <p id="d1e3877">We can devise a convergence criterion that works equally well, independently of the discretization and the quality of the initial guess, based on the Newton decrement <xref ref-type="bibr" rid="bib1.bibx69" id="paren.70"/>.
As the second derivative operator <inline-formula><mml:math id="M127" display="inline"><mml:mrow><mml:msup><mml:mi>d</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup><mml:mi>J</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula> is positive-definite, the Newton search direction <inline-formula><mml:math id="M128" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">v</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> computed from Eq. (<xref ref-type="disp-formula" rid="Ch1.E35"/>) is a descent direction for <inline-formula><mml:math id="M129" display="inline"><mml:mi>J</mml:mi></mml:math></inline-formula>:
            <disp-formula id="Ch1.E37" content-type="numbered"><label>37</label><mml:math id="M130" display="block"><mml:mrow><mml:mi>d</mml:mi><mml:mi>J</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>⋅</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">v</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>&lt;</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
          The absolute value of the quantity in the last equation is defined as the Newton decrement.
For <inline-formula><mml:math id="M131" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula> sufficiently close to the true solution <inline-formula><mml:math id="M132" display="inline"><mml:mi mathvariant="bold-italic">u</mml:mi></mml:math></inline-formula>, the Newton decrement roughly tells us how much we can expect the action to decrease:
            <disp-formula id="Ch1.E38" content-type="numbered"><label>38</label><mml:math id="M133" display="block"><mml:mrow><mml:mi>J</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>-</mml:mo><mml:mi>J</mml:mi><mml:mo>(</mml:mo><mml:mi>u</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:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mfenced open="|" close="|"><mml:mrow><mml:mi>d</mml:mi><mml:mi>J</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>⋅</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">v</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:mfenced><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
          We can then use the Newton decrement to decide when to stop the iteration, as described below.</p>
      <p id="d1e4036">As shown in Eq. (<xref ref-type="disp-formula" rid="Ch1.E4"/>), the action for most models has units of power and is the sum of dissipation due to viscosity, friction, gravitational driving, and ocean back-pressure at the terminus.
The viscous and frictional terms are convex, positive functions of the velocity.
The gravitational and terminus stress terms are linear in the velocity and can be of either sign.
If we define the scale functional
            <disp-formula id="Ch1.E39" content-type="numbered"><label>39</label><mml:math id="M134" display="block"><mml:mrow><mml:mi>K</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:mtext>viscous dissipation</mml:mtext><mml:mo>+</mml:mo><mml:mtext>frictional dissipation</mml:mtext></mml:mrow></mml:math></disp-formula>
          as only the positive parts of the action, the convergence criterion
            <disp-formula id="Ch1.E40" content-type="numbered"><label>40</label><mml:math id="M135" display="block"><mml:mrow><mml:mo>|</mml:mo><mml:mi>d</mml:mi><mml:mi>J</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>⋅</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">v</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>|</mml:mo><mml:mo>&lt;</mml:mo><mml:mi mathvariant="italic">ϵ</mml:mi><mml:mi>K</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></disp-formula>
          is then independent of the discretization.
The intuition behind this criterion is that the iteration is halted when the expected decrease in the action functional is much smaller than the positive part of the action itself.</p>
      <p id="d1e4109">We have found empirically that, with this criterion and the Newton solver implementation in icepack, the iteration usually converges to machine precision in around eight steps.
The iteration count can reach as high as 20 for exceptionally bad initial guesses for the velocity or with unphysical fluidity or friction values.
We also observe the expected doubling of the number of accurate digits in the value of the action once the velocity guesses are within the convergence basin of the true solution.
Other convergence criteria, such as using relative change in the velocity guesses, can terminate prematurely when the initial guess is very far outside the quadratic convergence basin.</p>
      <p id="d1e4113">The numerical solvers in icepack have been designed so that users who are not familiar with numerical optimization need not be confronted with a possibly bewildering array of algorithmic parameters.
Consequently, sensible defaults have been chosen for the Armijo and Wolfe criteria <xref ref-type="bibr" rid="bib1.bibx69" id="paren.71"/>, and the tolerance for the line search is chosen based on that of the outer-level Newton iteration.
The Newton search direction is calculated using a direct factorization solver rather than, say, the conjugate gradient algorithm, as the use of another iterative method would introduce yet another algorithmic parameter.
Advanced users who are interested in performance optimization can change these algorithmic parameters by passing extra arguments to the solve procedure.</p>
</sec>
<sec id="Ch1.S4.SS4">
  <label>4.4</label><title>Inverse solvers</title>
      <p id="d1e4127">The <monospace>InverseProblem</monospace> class describes what problem is being solved, whereas the <monospace>InverseSolver</monospace> class is responsible for carrying out the numerical optimization.
There are three inverse solvers in icepack: a simple gradient descent solver, a quasi-Newton solver based on the BFGS approximation to the Hessian, and a Gauss–Newton solver.
All of these classes are based around the general idea of first computing a search direction and then performing a line search.
They differ in how the search direction is computed.</p>
      <?pagebreak page4604?><p id="d1e4136">The gradient descent solver uses the search direction
            <disp-formula id="Ch1.E41" content-type="numbered"><label>41</label><mml:math id="M136" display="block"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ϕ</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:msup><mml:mi mathvariant="bold">M</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup><mml:mi>d</mml:mi><mml:mi>J</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="italic">θ</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>)</mml:mo><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where <inline-formula><mml:math id="M137" display="inline"><mml:mi mathvariant="bold">M</mml:mi></mml:math></inline-formula> is the finite element mass matrix.
Gradient descent is a popular choice because the objective functional is always decreasing along this search direction.
However, the search direction can be poorly scaled to the physical dimensions of the problem at hand.
This method can be very expensive and brittle in the initial iterations and often takes many steps to converge.</p>
      <p id="d1e4184">The BFGS method uses the past <inline-formula><mml:math id="M138" display="inline"><mml:mi>m</mml:mi></mml:math></inline-formula> iterations of the algorithm to compute a low-rank approximation to the inverse of the objective functional's Hessian matrix (see <xref ref-type="bibr" rid="bib1.bibx69" id="altparen.72"/>, for a more in-depth discussion).
The BFGS method converges faster than gradient descent.
However, it suffers from many of the same brittleness issues in the initial iterations before it has built up enough history to approximate the Hessian inverse.</p>
      <p id="d1e4197">Finally, the Gauss–Newton solver defines an approximation to the “first-order” part of the objective functional Hessian <xref ref-type="bibr" rid="bib1.bibx74 bib1.bibx31" id="paren.73"/>.
Each iteration of Gauss–Newton is more expensive than that of BFGS or gradient descent because it requires the solution of a more complex linear system than just the mass matrix.
The Gauss–Newton method converges fastest by far in virtually every test case we have found, in some instances by up to factor of 50.</p>
      <p id="d1e4204">The derivative of the objective functional with respect to the unknown parameter is calculated using the adjoint method and the symbolic differentiation features of Firedrake.
The user does not need to provide any routines for the derivatives, only the symbolic form of the error metric and the regularization functional.
The model object is responsible for providing the symbolic form of the action functional.</p>
</sec>
<sec id="Ch1.S4.SS5">
  <label>4.5</label><title>Hybrid model</title>
      <p id="d1e4215">The hybrid flow model uses several features that are available in Firedrake to better exploit the special structure of the problem.
Implementing this model also required some mathematical sleight of hand related to the terminus boundary condition that has not appeared in the literature before.
Additionally, the hierarchical structure of spectral basis functions presents an opportunity for developing fast algorithms.
In all other respects, the implementation of the hybrid flow model using convex optimization follows the techniques described above.</p>
<sec id="Ch1.S4.SS5.SSS1">
  <label>4.5.1</label><title>Discretization</title>
      <p id="d1e4225">In order to use terrain-following coordinates, the hybrid model assumes that the geometry of the domain is an extruded mesh, where a 2D footprint mesh is lifted into 3D.
Firedrake includes support for creating extruded meshes by calling the function <monospace>ExtrudedMesh</monospace> on the 2D footprint <xref ref-type="bibr" rid="bib1.bibx12 bib1.bibx59" id="paren.74"/>.
The cells of an extruded mesh are triangular prisms instead of the more common tetrahedra used for general 3D meshes.
Not every 3D domain can be described by extruding a 2D domain, but the geometry of most glacier flow problems can.</p>
      <p id="d1e4234">The geometric correction factor in Eq. (<xref ref-type="disp-formula" rid="Ch1.E19"/>) for gradients in terrain-following coordinates can easily be represented in UFL.
By defining a wrapper around the UFL <monospace>grad</monospace> function, the code to define the action functional in terrain-following coordinates is only slightly more complex than in Cartesian coordinates.</p>
      <p id="d1e4242">For problems defined on extruded geometries, Firedrake includes support for tensor product elements, which includes using different bases in the horizontal and vertical directions <xref ref-type="bibr" rid="bib1.bibx59" id="paren.75"/>.
Tensor product elements are defined in Firedrake by passing the extra keyword arguments <monospace>vfamily</monospace>, <monospace>vdegree</monospace> to the constructor for a function space.
In our case, we used the usual continuous Galerkin basis in the horizontal and Gauss–Legendre elements in the vertical.
To select the Legendre polynomial basis, the user passes the keyword argument <monospace>vfamily=`Gauss--Legendre'</monospace> or <monospace>`GL'</monospace> for short to the constructor for the function space.</p>
      <p id="d1e4260">Extruded meshes and tensor product elements are available in Firedrake but not in FEniCS.
Other general-purpose finite element modeling packages that support tensor product elements include deal.II and nektar++ <xref ref-type="bibr" rid="bib1.bibx7 bib1.bibx21" id="paren.76"/>.
Like most other packages in this domain, deal.II and nektar++ are written in C++, whereas our goal for icepack was to have both the core and the user interface in Python.</p>
</sec>
<sec id="Ch1.S4.SS5.SSS2">
  <label>4.5.2</label><title>Ocean boundary condition</title>
      <p id="d1e4274">Our approach for implementing a hybrid flow model works completely seamlessly except for one important detail.
The back-pressure from ocean water at the calving front of a marine-terminating glacier is not a smooth function of depth.
The pressure is zero above the water line and linearly increasing below it:
              <disp-formula id="Ch1.E42" content-type="numbered"><label>42</label><mml:math id="M139" display="block"><mml:mrow><mml:mtext>back-pressure power</mml:mtext><mml:mo>=</mml:mo><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi mathvariant="normal">Γ</mml:mi></mml:munder><mml:munderover><mml:mo movablelimits="false">∫</mml:mo><mml:mn mathvariant="normal">0</mml:mn><mml:mn mathvariant="normal">1</mml:mn></mml:munderover><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mi>W</mml:mi></mml:msub><mml:mi>g</mml:mi><mml:mi>h</mml:mi><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="italic">ζ</mml:mi><mml:mtext>sl</mml:mtext></mml:msub><mml:mo>-</mml:mo><mml:mi mathvariant="italic">ζ</mml:mi><mml:msub><mml:mo>)</mml:mo><mml:mo>+</mml:mo></mml:msub><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>⋅</mml:mo><mml:mi mathvariant="bold-italic">ν</mml:mi><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mi mathvariant="normal">d</mml:mi><mml:mi mathvariant="italic">ζ</mml:mi><mml:mspace width="0.125em" linebreak="nobreak"/><mml:mi mathvariant="normal">d</mml:mi><mml:mi mathvariant="italic">γ</mml:mi><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
            where <inline-formula><mml:math id="M140" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ζ</mml:mi><mml:mtext>sl</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> denotes the relative depth to the water line, and the subscript <inline-formula><mml:math id="M141" display="inline"><mml:mo>+</mml:mo></mml:math></inline-formula> denotes the positive part of a real number.
Were we to use the standard assembly procedure in Firedrake to evaluate this integral, we would get an inaccurate result due to an insufficient number of integration points.
The resulting velocity solutions are then wildly inaccurate due to the mis-specification of the Neumann boundary condition.
A blunt solution to this problem would be to pass an extra argument to the Firedrake form compiler that specifies a much greater integration accuracy in the vertical for this term.
This fix<?pagebreak page4605?> reduces the errors in the velocities, but it does not eliminate them completely, and it incurs a large computational cost.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F1"><?xmltex \currentcnt{1}?><?xmltex \def\figurename{Figure}?><label>Figure 1</label><caption><p id="d1e4363"><bold>(a)</bold> The normalized ocean pressure (<inline-formula><mml:math id="M142" display="inline"><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mtext>w</mml:mtext></mml:msub><mml:mo>/</mml:mo><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mtext>W</mml:mtext></mml:msub><mml:mi>g</mml:mi></mml:mrow></mml:math></inline-formula>) and Legendre polynomial approximations of several degrees, and <bold>(b)</bold> the residuals of the approximation.
For this particular example, the waterline is at <inline-formula><mml:math id="M143" 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">3</mml:mn></mml:mrow></mml:math></inline-formula>, which would be representative of a glacier grounded on a higher moraine.
The moments of each of the residuals up to the approximation degree are all zero.</p></caption>
            <?xmltex \igopts{width=227.622047pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/14/4593/2021/gmd-14-4593-2021-f01.png"/>

          </fig>

      <p id="d1e4413">We instead implemented a routine that symbolically calculates the Legendre polynomial expansion of the function <inline-formula><mml:math id="M144" display="inline"><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi mathvariant="italic">ζ</mml:mi><mml:mtext>sl</mml:mtext></mml:msub><mml:mo>-</mml:mo><mml:mi mathvariant="italic">ζ</mml:mi><mml:msub><mml:mo>)</mml:mo><mml:mo>+</mml:mo></mml:msub></mml:mrow></mml:math></inline-formula> with respect to the parameter <inline-formula><mml:math id="M145" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ζ</mml:mi><mml:mtext>sl</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> using the package SymPy <xref ref-type="bibr" rid="bib1.bibx60" id="paren.77"/>.
The symbolic variables for <inline-formula><mml:math id="M146" display="inline"><mml:mi mathvariant="italic">ζ</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math id="M147" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ζ</mml:mi><mml:mtext>sl</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> used in the SymPy representation of the polynomial expansion are then substituted for equivalent symbolic variables in Firedrake/UFL using the SymPy object's <monospace>subs</monospace> method.
The Legendre polynomial approximation to this function only converges linearly as the number of coefficients is increased, as the function is continuous but not smooth, and the approximation exhibits noticeable ringing artifacts at a high degree.
While the approximation itself is not very accurate, the calculated value of the integral in Eq. (<xref ref-type="disp-formula" rid="Ch1.E42"/>) is exact because of the orthogonality property of Legendre polynomials.
Stated another way, the residuals in the approximation are large, but they integrate to zero when multiplied by any Legendre polynomial up to the number of vertical modes.
An example of the pressure approximations using linear, quadratic, and cubic Legendre polynomials are shown in Fig. <xref ref-type="fig" rid="Ch1.F1"/>.</p>
      <p id="d1e4479">The exact symbolic integration approach is both faster and more accurate than using a large number of quadrature points.
The same technique could be used to exactly calculate the ocean back-pressure for any model, such as the full Stokes equations, using terrain-following coordinates and a Legendre polynomial expansion in the vertical.</p><?xmltex \hack{\newpage}?>
</sec>
</sec>
<sec id="Ch1.S4.SS6">
  <label>4.6</label><title>Performance</title>
      <p id="d1e4492">The icepack package largely inherits the performance capabilities of the Firedrake package, for which we refer to the benchmarks in <xref ref-type="bibr" rid="bib1.bibx75" id="text.78"/>.
Firedrake is, in turn, built on PETSc, which includes a rich suite of nonlinear solvers and preconditioners that have been demonstrated to scale up to hundreds of processors <xref ref-type="bibr" rid="bib1.bibx6" id="paren.79"/>.
Firedrake also includes special features for defining sophisticated solvers and preconditioners that take advantage of problem-specific structure <xref ref-type="bibr" rid="bib1.bibx48" id="paren.80"/>.
The icepack package exposes these tools through the interface of the flow solver objects, so users can select any solver and preconditioner from PETSc.</p>
      <p id="d1e4504">We have mainly developed icepack for process-scale studies of individual glaciers or drainage basins.
For the demonstrations presented below, nearly all simulations run in a matter of minutes to hours on a single core.
We have used sparse LU factorization to solve linear systems for many problem instances in order to eliminate the linear solver as a possible failure mode.
Defaulting to a robust solution method is especially important for onboarding novice users who may not be familiar with different iterative linear solvers and preconditioners.
Larger problems, such as continental-scale modeling, will require solving the diagnostic equations using the conjugate gradient method with an appropriate preconditioner to achieve parallel scalability.
The particular structure of the problems that we solve may be useful in choosing a preconditioner.
For example, a rudimentary preconditioner for the hybrid model system could use the degree-0 model as the coarse space in a multigrid-type approach.
These optimizations will be the subject of future work.</p>
</sec>
</sec>
<sec id="Ch1.S5">
  <label>5</label><title>Demonstrations</title>
      <p id="d1e4517">The following demonstrations aim to show the capabilities of icepack on both synthetic and real problems.
The key features of icepack that these demonstrations aim to highlight are the variety of different physics models implemented and the flexibility of the components of these physics models.</p>
<sec id="Ch1.S5.SS1">
  <label>5.1</label><title>MISMIP+</title>
      <p id="d1e4527">As a first test case for icepack, we ran the first experiment from the Marine Ice Sheet Model Intercomparison Project version 3 (MISMIP+).
The parameters and geometry for this experiment can be found in <xref ref-type="bibr" rid="bib1.bibx3" id="text.81"/>.
The MISMIP+ experiment has three phases.
First, the model must find a steady-state marine ice sheet with a fixed accumulation rate and no submarine melting.
Next, submarine melting with a given depth-dependent parameterization is applied for 100 years.
The increased melt thins the ice shelf and initiates a retreat of the glacier grounding line.
Finally, submarine melting is turned off for at least 100 years, optionally<?pagebreak page4606?> longer.
The grounding line then readvances, although not as far as its original position.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F2" specific-use="star"><?xmltex \currentcnt{2}?><?xmltex \def\figurename{Figure}?><label>Figure 2</label><caption><p id="d1e4535">The Weertman, Schoof, and modified Schoof sliding law of Eq. (<xref ref-type="disp-formula" rid="Ch1.E45"/>).
The critical speed and shear stress are <inline-formula><mml:math id="M148" display="inline"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mtext>c</mml:mtext></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">250</mml:mn></mml:mrow></mml:math></inline-formula> m yr<inline-formula><mml:math id="M149" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:math></inline-formula> and <inline-formula><mml:math id="M150" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mtext>c</mml:mtext></mml:msub><mml:mo>=</mml:mo><mml:mn mathvariant="normal">100</mml:mn></mml:mrow></mml:math></inline-formula> kPa.</p></caption>
          <?xmltex \igopts{width=341.433071pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/14/4593/2021/gmd-14-4593-2021-f02.png"/>

        </fig>

      <p id="d1e4588">The original intercomparison project specified that participants could use the Weertman sliding law (Eq. <xref ref-type="disp-formula" rid="Ch1.E28"/>) as well as two other sliding laws that transition to a more plastic rheology at high sliding speeds.
The first alternative sliding law consists of Weertman sliding until the stress reaches a critical value, at which point the constitutive relation transitions to perfect plasticity.
The second alternative is the Schoof sliding law <xref ref-type="bibr" rid="bib1.bibx78" id="paren.82"/>:
            <disp-formula id="Ch1.E43" content-type="numbered"><label>43</label><mml:math id="M151" display="block"><mml:mrow><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mi>b</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mo>-</mml:mo><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mrow><mml:mi>C</mml:mi><mml:mo>|</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:msup><mml:mo>|</mml:mo><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>/</mml:mo><mml:mi>m</mml:mi></mml:mrow></mml:msup><mml:mo>⋅</mml:mo><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mtext>c</mml:mtext></mml:msub></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:msup><mml:mi>C</mml:mi><mml:mi>m</mml:mi></mml:msup><mml:mo>|</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>|</mml:mo><mml:mo>+</mml:mo><mml:msubsup><mml:mi mathvariant="italic">τ</mml:mi><mml:mtext>c</mml:mtext><mml:mi>m</mml:mi></mml:msubsup><mml:msup><mml:mo>)</mml:mo><mml:mrow><mml:mn mathvariant="normal">1</mml:mn><mml:mo>/</mml:mo><mml:mi>m</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:mstyle displaystyle="true"><mml:mfrac style="display"><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mrow><mml:mo>|</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>|</mml:mo></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
          where the critical stress <inline-formula><mml:math id="M152" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mtext>c</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> is a certain specified fraction of the water pressure in the subglacial hydrological system.
Sliding laws in icepack are not expressed directly, but rather as the derivative of an action functional.
To implement the Schoof sliding law, we need to know the antiderivative of Eq. (<xref ref-type="disp-formula" rid="Ch1.E43"/>).
We found the antiderivative of this expression using a computer algebra system, but the result includes hypergeometric functions.
The Unified Form Language has several transcendental functions (sine, cosine, exponential, etc.), but it does not currently support hypergeometric functions.
Instead, we implemented a sliding relation that exhibits the important features of the Schoof law, i.e., it behaves like an <inline-formula><mml:math id="M153" display="inline"><mml:mrow><mml:mi>m</mml:mi><mml:mo>=</mml:mo><mml:mn mathvariant="normal">3</mml:mn></mml:mrow></mml:math></inline-formula> power law at low sliding speeds and <inline-formula><mml:math id="M154" display="inline"><mml:mrow><mml:mi>m</mml:mi><mml:mo>=</mml:mo><mml:mi mathvariant="normal">∞</mml:mi></mml:mrow></mml:math></inline-formula> at high sliding speeds, but which is more tractable algebraically.
Knowing the critical stress <inline-formula><mml:math id="M155" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mtext>c</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> and the friction coefficient <inline-formula><mml:math id="M156" display="inline"><mml:mi>C</mml:mi></mml:math></inline-formula>, which has units of stress <inline-formula><mml:math id="M157" display="inline"><mml:mo>×</mml:mo></mml:math></inline-formula> speed <inline-formula><mml:math id="M158" display="inline"><mml:msup><mml:mi/><mml:mrow><mml:mo>-</mml:mo><mml:mn mathvariant="normal">1</mml:mn><mml:mo>/</mml:mo><mml:mi>m</mml:mi></mml:mrow></mml:msup></mml:math></inline-formula>, we can define a critical speed <inline-formula><mml:math id="M159" display="inline"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mtext>c</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula> as
            <disp-formula id="Ch1.E44" content-type="numbered"><label>44</label><mml:math id="M160" display="block"><mml:mrow><mml:msub><mml:mi>u</mml:mi><mml:mtext>c</mml:mtext></mml:msub><mml:mo>=</mml:mo><mml:msup><mml:mi>C</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mi>m</mml:mi></mml:mrow></mml:msup><mml:msubsup><mml:mi mathvariant="italic">τ</mml:mi><mml:mtext>c</mml:mtext><mml:mi>m</mml:mi></mml:msubsup><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
          The power dissipation density for the Schoof-type sliding law that we use is
            <disp-formula id="Ch1.E45" content-type="numbered"><label>45</label><mml:math id="M161" display="block"><mml:mrow><mml:mi>P</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi mathvariant="italic">τ</mml:mi><mml:mtext>c</mml:mtext></mml:msub><mml:mfenced open="{" close="}"><mml:mrow><mml:msup><mml:mfenced close=")" open="("><mml:mrow><mml:msubsup><mml:mi>u</mml:mi><mml:mtext>c</mml:mtext><mml:mrow><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mn mathvariant="normal">1</mml:mn><mml:mi>m</mml:mi></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msubsup><mml:mo>+</mml:mo><mml:mo>|</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:msup><mml:mo>|</mml:mo><mml:mrow><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mn mathvariant="normal">1</mml:mn><mml:mi>m</mml:mi></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:mfenced><mml:mstyle scriptlevel="+1"><mml:mfrac><mml:mi>m</mml:mi><mml:mrow><mml:mi>m</mml:mi><mml:mo>+</mml:mo><mml:mn mathvariant="normal">1</mml:mn></mml:mrow></mml:mfrac></mml:mstyle></mml:msup><mml:mo>-</mml:mo><mml:msub><mml:mi>u</mml:mi><mml:mtext>c</mml:mtext></mml:msub></mml:mrow></mml:mfenced><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
          Figure <xref ref-type="fig" rid="Ch1.F2"/> shows a comparison of the original Schoof sliding law and the sliding law that arises as the derivative of the functional in Eq. (<xref ref-type="disp-formula" rid="Ch1.E45"/>).
The two have the same asymptotic behavior when the speed is much smaller or much larger than the critical speed; they differ in a relatively small range around the critical speed.
The relative difference in basal shear stress between the two sliding laws is less than 10 % throughout the entire range.
Although Fig. <xref ref-type="fig" rid="Ch1.F2"/> shows a comparison of both sliding laws with the same value of the critical speed, by using different values, the agreement between our sliding law can be brought into much closer agreement with the Schoof law.
Finally, the Schoof law itself is phenomenological.
A different sliding law with the right asymptotic behavior is no more or less valid.</p>
      <p id="d1e4887">To change the sliding law, users only need to pass one function or the other to the model object at initialization.
(See the “Code and data availability” section below for the source code.)
Users do not need to implement a subclass that overrides some parent method.
This approach would be idiomatic in C++, but it requires knowledge of object-oriented programming that a nonexpert might lack.</p>
      <p id="d1e4890">Figure <xref ref-type="fig" rid="Ch1.F3"/> shows the thickness and ice speed after spinning up the MISMIP+ geometry and input data to steady state with the sliding law described above.
The spin-up used degree-1 basis functions for both thickness and velocity.
To get a high-resolution estimate for the steady state, the spin-up started from a relatively coarse resolution to propagate out most of the transient signal.
Then the mesh was successively refined and spun up again to propagate out the remaining high-wave-number transients.
This process was repeated three times.
The net result is that most of the spin-up is done at a relatively low computational cost.
Figure <xref ref-type="fig" rid="Ch1.F4"/> shows the total ice mass during the retreat and readvance phases of the experiment.
The initial response to turning on melting is very rapid but then becomes roughly linear with time.
When the high melt is turned off at the 100-year mark, the ice readvances, but the rate is much slower than the rate of decrease when melt was on.
This asymmetric response is typical and expected from ice physics; the rates broadly agree with the reference results computed with BISICLES in the original experimental specification <xref ref-type="bibr" rid="bib1.bibx3" id="paren.83"/>.</p>
      <p id="d1e4900">We also ran the experimental setup to steady state using the hybrid flow model with vertical basis functions up to degree 2.
This is the most minimal set of vertical basis functions that can resolve plug flow and the stress boundary conditions at the ice base and surface.
The ratio of basal velocity to surface velocity is shown in Fig. <xref ref-type="fig" rid="Ch1.F5"/>.
The areas with the most significant vertical deformation are at the inflow boundary and where the troughs at the side walls are steepest.
Otherwise, the sliding ratio is above 0.8 throughout almost the entire domain.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F3"><?xmltex \currentcnt{3}?><?xmltex \def\figurename{Figure}?><label>Figure 3</label><caption><p id="d1e4907">The steady-state thickness and velocity of the MISMIP+ experimental setup with the modified Schoof sliding law of Eq. (<xref ref-type="disp-formula" rid="Ch1.E45"/>).</p></caption>
          <?xmltex \igopts{width=199.169291pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/14/4593/2021/gmd-14-4593-2021-f03.png"/>

        </fig>

      <?xmltex \floatpos{t}?><fig id="Ch1.F4"><?xmltex \currentcnt{4}?><?xmltex \def\figurename{Figure}?><label>Figure 4</label><caption><p id="d1e4920">Total ice mass history during retreat (first 100 years) and readvance (second 100 years) of the MISMIP+ experiment.</p></caption>
          <?xmltex \igopts{width=227.622047pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/14/4593/2021/gmd-14-4593-2021-f04.png"/>

        </fig>

      <?xmltex \floatpos{t}?><fig id="Ch1.F5"><?xmltex \currentcnt{5}?><?xmltex \def\figurename{Figure}?><label>Figure 5</label><caption><p id="d1e4932">Ratio of basal velocity to surface velocity in steady state of the MISMIP+ scenario computed with the hybrid model.</p></caption>
          <?xmltex \igopts{width=199.169291pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/14/4593/2021/gmd-14-4593-2021-f05.png"/>

        </fig>

      <p id="d1e4941">Using variational principles to express all constitutive laws is less flexible than specifying the sliding law directly, and this is a distinct disadvantage.
Nonetheless, we were able to implement a sliding law that exhibits the important characteristics of the Schoof sliding law.
<xref ref-type="bibr" rid="bib1.bibx3" id="text.84"/> also suggest using a sliding law that transitions sharply to exact plasticity above the critical speed.
Expressing this sliding law in UFL requires a conditional in the velocity and is, thus, no longer differentiable, causing the forward solver to crash.
The numerical advantages of using variational principles are so great, however, that we view this trade-off as acceptable.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F6"><?xmltex \currentcnt{6}?><?xmltex \def\figurename{Figure}?><label>Figure 6</label><caption><p id="d1e4949">Synthetic ice sheet simulation. <bold>(a)</bold> The bed elevation profile consists of a ring of mountains with valleys of varying depth surrounding a flat plateau where the ice sheet is initialized.
The black square outlines the domain of panel <bold>(b)</bold> which shows the velocity of the ice as it passes through the southernmost mountain pass, with contours of the bed elevation shown in greyscale.</p></caption>
          <?xmltex \igopts{width=227.622047pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/14/4593/2021/gmd-14-4593-2021-f06.png"/>

        </fig>

</sec>
<sec id="Ch1.S5.SS2">
  <label>5.2</label><title>Synthetic ice sheet</title>
      <p id="d1e4972">As a demonstration of the shallow ice approximation model, we ran an experiment inspired by <xref ref-type="bibr" rid="bib1.bibx45" id="text.85"/>.
In this work, the authors coupled an ice flow model to simple models for bed erosion, calving, and glacial isostatic adjustment (GIA) to investigate the formation of deep fjords that are characteristic of coastlines on Baffin Island, Greenland,<?pagebreak page4607?> and British Columbia, among others.
We emulated their domain and bedrock geometry – a plateau surrounded by a ridge punctuated by four valleys – without also simulating erosion or GIA.</p>
      <p id="d1e4978">Figure <xref ref-type="fig" rid="Ch1.F6"/> shows the results of this computational experiment.
We initialized the experiment with a simple but unrealistic ice thickness.
We then evolved the ice sheet without climate forcing for 500 years.
The ice sheet relaxes very rapidly in the first 200 years, but changes are much slower after this, as ice must be funneled through one of the four narrow valleys. The resulting velocity pattern is similar to that of <xref ref-type="bibr" rid="bib1.bibx45" id="text.86"/>, with the highest velocities where ice flows out from the valleys. In and upstream of the valleys, the surface is drawn down due to the elevated export of ice.</p>
      <p id="d1e4986">The diagnostic model used in this demonstration is computationally cheap enough that it can be used to simulate ice sheets over several millennia in a matter of minutes on a desktop. A key feature of icepack is the ability to choose between many different diagnostic models.
Users are free to decide what model works best for the spatial and temporal<?pagebreak page4608?> scales of their problem, how accurately they need to solve this problem to produce useful results, and what computational resources they are willing to devote.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F7"><?xmltex \currentcnt{7}?><?xmltex \def\figurename{Figure}?><label>Figure 7</label><caption><p id="d1e4992">Results of ice shelf damage simulation: <bold>(a)</bold> ice velocity without damage, <bold>(b)</bold> change in ice speed with and without damage, <bold>(c)</bold> thickness, and <bold>(d)</bold> damage field.</p></caption>
          <?xmltex \igopts{width=227.622047pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/14/4593/2021/gmd-14-4593-2021-f07.png"/>

        </fig>

</sec>
<sec id="Ch1.S5.SS3">
  <label>5.3</label><title>Synthetic ice shelf</title>
      <p id="d1e5021">We simulated the evolution of a synthetic ice shelf towards steady state and coupled it with the damage transport model described in Sect. <xref ref-type="sec" rid="Ch1.S2.SS6"/>.
The geometry of the ice shelf consists of the intersection of two circles, one with a larger radius and offset center, designed to roughly mimic the shape and size of real ice shelves.
The radius of the whole shelf is 200 km.
Four ice streams flow into the shelf with varying speeds and a prescribed inflow thickness.
In the first phase of the experiment, the ice shelf is propagated to steady state without damage for 200 years.
After this time interval, the flux imbalance is less than 1 % of the influx.
In the second phase, damage transport is turned on and coupled to the ice velocity.
An interesting feature to observe in the approximate equilibrium damage field is that the highest values occur between the streams and not within them.
Additionally, the spacing between the streams changes as a result of adding damage.
The final ice thickness, velocity, strain rate, and damage are shown in Fig. <xref ref-type="fig" rid="Ch1.F7"/>.</p>
</sec>
<sec id="Ch1.S5.SS4">
  <label>5.4</label><title>Larsen C Ice Shelf</title>
      <p id="d1e5037">To demonstrate the inverse solver, we will estimate the rheology of the Larsen C Ice Shelf in the Antarctic Peninsula from observational data.
Several recent studies have focused on Larsen C because it may be unstable in the warmer climate of the coming decades.
From January to March of 2002, the neighboring Larsen B Ice Shelf disintegrated due to surface melt pond-induced fracture <xref ref-type="bibr" rid="bib1.bibx8" id="paren.87"/>.
This mechanism might also lead to the breakup of Larsen C in the future.
One of the key factors affecting the stability of ice shelves is the presence of marine ice – seawater that freezes onto the base of an ice shelf – in the suture zones where two flow units meet <xref ref-type="bibr" rid="bib1.bibx52" id="paren.88"/>.
Marine ice is warmer than meteoric ice and usually includes brine pockets, which are discernible in radio echo sounding measurements as the absence of reflection from the ice shelf base <xref ref-type="bibr" rid="bib1.bibx35" id="paren.89"/>.
This warmer and impurity-laden ice is more ductile and, thus, should be less prone to fracture than cold and brittle meteoric ice.
Ocean models predict that marine ice forms under Larsen C as well <xref ref-type="bibr" rid="bib1.bibx35" id="paren.90"/>.
By estimating the material rigidity of an ice shelf, we can constrain where marine ice may be forming.</p>
<sec id="Ch1.S5.SS4.SSS1">
  <label>5.4.1</label><title>Data</title>
      <p id="d1e5059">We used the interferometric synthetic aperture radar (InSAR) phase-based ice velocity map from <xref ref-type="bibr" rid="bib1.bibx66" id="text.91"/>.
This dataset has nominal errors over the Larsen Ice Shelf on the order of 1–7 m yr<inline-formula><mml:math id="M162" 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>.
We used the recently released BedMachine map of the thickness of Antarctica, which takes advantage of newly available remote sensing data <xref ref-type="bibr" rid="bib1.bibx64" id="paren.92"/>.</p>
      <p id="d1e5080">Existing work on glaciological inverse problems uses the mismatch between the computed and observed velocity fields as part of the objective functional.
The effect of thickness errors is studied largely through a posteriori validation <xref ref-type="bibr" rid="bib1.bibx39 bib1.bibx54" id="paren.93"/>.
Errors in thickness or surface slope can be large enough that it might be impossible to fit the velocity measurements to the degree that statistical theory predicts <xref ref-type="bibr" rid="bib1.bibx58" id="paren.94"/>.
The velocity measurements themselves might have significant outliers, in which case using the usual weighted sum of squared misfits as an error metric will give poor results.
For these reasons, some studies have explored alternative objective functionals <xref ref-type="bibr" rid="bib1.bibx63" id="paren.95"/>.
We have opted to use the regularized <inline-formula><mml:math id="M163" display="inline"><mml:mrow><mml:msup><mml:mi>L</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula>-type error metric
              <disp-formula id="Ch1.E46" content-type="numbered"><label>46</label><mml:math id="M164" display="block"><mml:mrow><mml:mi>J</mml:mi><mml:mo>(</mml:mo><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mo>)</mml:mo><mml:mo>=</mml:mo><mml:munder><mml:mo movablelimits="false">∫</mml:mo><mml:mi mathvariant="normal">Ω</mml:mi></mml:munder><mml:mfenced close=")" open="("><mml:mrow><mml:msqrt><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:mo>-</mml:mo><mml:msup><mml:mi mathvariant="bold-italic">u</mml:mi><mml:mi>o</mml:mi></mml:msup><mml:msup><mml:mo>|</mml:mo><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow><mml:mrow><mml:msup><mml:mi mathvariant="italic">σ</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mstyle><mml:mo>+</mml:mo><mml:msup><mml:mi mathvariant="italic">γ</mml:mi><mml:mn mathvariant="normal">2</mml:mn></mml:msup></mml:mrow></mml:msqrt><mml:mo>-</mml:mo><mml:mi mathvariant="italic">γ</mml:mi></mml:mrow></mml:mfenced><mml:mtext>d</mml:mtext><mml:mi>x</mml:mi><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
            This error metric approaches the usual weighted sum of squared errors as <inline-formula><mml:math id="M165" display="inline"><mml:mrow><mml:mi mathvariant="italic">γ</mml:mi><mml:mo>→</mml:mo><mml:mi mathvariant="normal">∞</mml:mi></mml:mrow></mml:math></inline-formula>, and it approaches the sparsity-promoting <inline-formula><mml:math id="M166" display="inline"><mml:mrow><mml:msup><mml:mi>L</mml:mi><mml:mn mathvariant="normal">1</mml:mn></mml:msup></mml:mrow></mml:math></inline-formula> error metric as <inline-formula><mml:math id="M167" 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>.
For finite, positive values of <inline-formula><mml:math id="M168" display="inline"><mml:mi mathvariant="italic">γ</mml:mi></mml:math></inline-formula>, this error metric is robust to non-normality or a small fraction of outliers <xref ref-type="bibr" rid="bib1.bibx9" id="paren.96"/>.</p>
</sec>
<sec id="Ch1.S5.SS4.SSS2">
  <label>5.4.2</label><title>Parameterization</title>
      <?pagebreak page4609?><p id="d1e5224">The rheology parameter of an ice shelf is strictly positive.
The optimization algorithm, however, can explore unphysical regions of parameter space without some a priori constraints.
Rather than try to solve an inequality-constrained problem, most studies in glaciology instead reparameterize the problem in terms of some auxiliary field in such a way that the rheology is manifestly positive.
In this case we use the parameterization
              <disp-formula id="Ch1.E47" content-type="numbered"><label>47</label><mml:math id="M169" display="block"><mml:mrow><mml:mi>A</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi>A</mml:mi><mml:mn mathvariant="normal">0</mml:mn></mml:msub><mml:msup><mml:mi>e</mml:mi><mml:mi mathvariant="italic">θ</mml:mi></mml:msup></mml:mrow></mml:math></disp-formula>
            and estimate <inline-formula><mml:math id="M170" display="inline"><mml:mi mathvariant="italic">θ</mml:mi></mml:math></inline-formula>.
The inverse solver calculates the derivative of the objective functional symbolically and is, thus, agnostic to the particular parameterization.
The only information that the user needs to pass is the name of the arguments to the forward model representing the parameter and the observed field so that these can be passed by keyword.</p>

      <?xmltex \floatpos{t}?><fig id="Ch1.F8"><?xmltex \currentcnt{8}?><?xmltex \def\figurename{Figure}?><label>Figure 8</label><caption><p id="d1e5256"><bold>(a)</bold> Inferred fluidity parameter <inline-formula><mml:math id="M171" display="inline"><mml:mi mathvariant="italic">θ</mml:mi></mml:math></inline-formula>: higher values indicate more deformable ice.
<bold>(b)</bold> Stream plot of ice velocity computed from this fluidity parameter.
The background image is the MODIS Mosaic of Antarctica <xref ref-type="bibr" rid="bib1.bibx77 bib1.bibx33" id="paren.97"/>, courtesy of the NASA National Snow and Ice Data Center (NSIDC) Distributed Active Archive Center (DAAC).</p></caption>
            <?xmltex \igopts{width=227.622047pt}?><graphic xlink:href="https://gmd.copernicus.org/articles/14/4593/2021/gmd-14-4593-2021-f08.png"/>

          </fig>

</sec>
<sec id="Ch1.S5.SS4.SSS3">
  <label>5.4.3</label><title>Results</title>
      <p id="d1e5288">The inferred parameter field <inline-formula><mml:math id="M172" display="inline"><mml:mi mathvariant="italic">θ</mml:mi></mml:math></inline-formula> is shown in Fig. <xref ref-type="fig" rid="Ch1.F8"/>.
The algorithm detects areas of much lower ice rigidity around highly damaged ice.
This feature is especially apparent around the large rift emanating from the Gipps Ice Rise, as well as the crevassed areas upstream.
We find other areas of low rigidity in the suture zones where two flow units converge and where marine ice tends to form, releasing heat to the ice shelf, exactly as observed in <xref ref-type="bibr" rid="bib1.bibx35" id="text.98"/>.
Finally, the inferred rheology field reproduces features that have already been found in previous studies of the Larsen C Ice Shelf <xref ref-type="bibr" rid="bib1.bibx46" id="paren.99"/>.</p>
      <p id="d1e5306">The final value of the model–data misfit from Eq. (<xref ref-type="disp-formula" rid="Ch1.E46"/>) matches the value that we would expect if the velocity errors actually came from this probability distribution.
In a separate computational experiment, we used the older Bedmap2 ice thickness <xref ref-type="bibr" rid="bib1.bibx26" id="paren.100"/>.
We were unable to achieve the same model–data misfit using Bedmap2 at the same grid resolution with any regularization parameter.</p>
</sec>
</sec>
</sec>
<sec id="Ch1.S6">
  <label>6</label><title>Usability</title>
      <p id="d1e5324">One of the main goals for icepack is to create a tool that is accessible to researchers who might not be experts in scientific computing.
Previous work on numerical modeling of glacier flow has focused largely on the technical details of the models themselves and has aimed to answer questions such as the following: does a given solver converge with the accuracy expected from finite element theory? Does it scale to large numbers of processors? Can models accurately predict grounding line retreat?
For graduate students or other researchers who are not experts in computational physics, the difficulty of learning to use a particular software package may be more of a rate-limiting factor than the speed or efficiency of that software.</p>
      <p id="d1e5327">The field of human–computer interaction (HCI) asks how we can design software that is easier to learn and use effectively.
In the following, we will describe some of the design choices in icepack and how they relate to what HCI researchers call the “cognitive dimensions of notations”.
<xref ref-type="bibr" rid="bib1.bibx29" id="text.101"/> introduced this concept to assess the usability of visual programming languages, but the criteria they laid out in their study have been used to analyze software systems across many disciplines.</p>
<sec id="Ch1.S6.SS1">
  <label>6.1</label><title>Consistency: after a user learns part of the software, can they guess the remaining parts?</title>
      <p id="d1e5340">Each of the model objects in icepack is a class with a method ending in <monospace>solve</monospace> that takes in keyword arguments for the various input fields and options for things like boundary conditions.
Users already familiar with, say, the <monospace>IceStream</monospace> class can then use the <monospace>HeatTransport</monospace> class under the assumption that the input fields – the current temperature <inline-formula><mml:math id="M173" display="inline"><mml:mi>T</mml:mi></mml:math></inline-formula>, ice velocity <inline-formula><mml:math id="M174" display="inline"><mml:mi>u</mml:mi></mml:math></inline-formula>, and basal melt rate <inline-formula><mml:math id="M175" display="inline"><mml:mi>m</mml:mi></mml:math></inline-formula> – are passed as keyword arguments with the same name as the fields themselves.
Consistency obviates the need to repeatedly consult the documentation or examples once users are already familiar with the software.</p>
</sec>
<sec id="Ch1.S6.SS2">
  <label>6.2</label><title>Progressive evaluation: how easily can users get feedback during their use of the software?</title>
      <p id="d1e5382">Progressive evaluation is the main advantage of having a user interface in an interpreted programming language such as Python as opposed to a compiled language where programs can only run in batch mode.
In the early stages of the development process, any nontrivial simulation of a physical system exists as a prototype which may be nonfunctional or even broken.
The ability to manually step through a simulation and examine the entire state in an interpreter is critical to finding errors faster.
The icepack package was designed to give fine-grained control over how simulations work in order to support this mode of debugging.
The application programming interface (API) provides routines for solving the diagnostic and prognostic equations.
It is the user's responsibility to make the repeated calls to these routines, either in a loop or by manually iterating through one step at a time.
With this responsibility comes the freedom to add in arbitrary code.
This capability might be used to add sanity checks, such as printing minimum and maximum thickness or velocity values.
It can also be used to get feedback on how long the simulation will take or to save results for later visualization.
Other packages support a more coarse-grained view where the user only specifies the start and end time of a simulation and has<?pagebreak page4610?> more limited options for inspecting the state of the running program.</p>
      <p id="d1e5385">The icepack package makes extensive use of Jupyter notebooks as a form of executable documentation.
Jupyter notebooks are a document format that includes code and explanatory text with typeset mathematics that runs interactively in a web browser <xref ref-type="bibr" rid="bib1.bibx51" id="paren.102"/>.
The contents of a notebook can be executed incrementally much like running code in the Python interpreter.
Most importantly, Jupyter notebooks can render and display visualizations on the fly.
This enables a workflow where plotting all intermediate results serves for sanity-checking an experimental simulation.</p>
      <p id="d1e5391">Simulations that have been debugged can then easily be transformed into a single Python script, for example, using the tool <monospace>nbconvert</monospace>, for production runs and parallel execution.
In other words, while there is an interactive interface, there is also a faster batch mode interface.</p>
</sec>
<sec id="Ch1.S6.SS3">
  <label>6.3</label><title>Abstraction gradient: what are the levels of abstraction exposed by the library? Can irrelevant details be hidden?</title>
      <p id="d1e5406">The API for icepack has been designed so that the users only need to decide what problem to solve and not how to solve it.
Where a choice does concern the <italic>how</italic> more than the <italic>what</italic>, we use a sensible default that biases for correctness rather than speed.
For example, the Newton solver uses a direct factorization method to solve the linear system for the search direction because factorization requires no tuning whereas iterative methods do.
A user interested in achieving greater runtime performance can pass additional keyword arguments instead specifying, say, the preconditioned conjugate gradient method.
This choice is of interest mostly to advanced users, so we keep the linear solver algorithm as a default argument.
In so doing, we avoid confronting novice users with options that they might not understand.</p>
      <p id="d1e5415">Advanced users who do wish to tune solver performance for large simulations will need some way to make choices about algorithms.
For example, one might choose the generalized minimum residual (GMRES) iterative solver together with an incomplete LU preconditioner to solve linear systems.
The solver classes, as opposed to the model classes, provide the interface for making these choices.
While alternative solvers might offer faster runtime performance than direct factorization, they also require additional choices to be made – for example, how often to restart GMRES, or
how much fill-in to allow in the incomplete factorization.
Many glaciologists do not have the background in numerical linear algebra to know that adjusting these parameters could make the difference between solver convergence or breakdown.
As another example, users might want to select between different discretization strategies for the Stokes equations.
The discretization of the Stokes equations has to be chosen carefully in order to satisfy the Ladyzhenskaya–Babuška–Brezzi (LBB) conditions <xref ref-type="bibr" rid="bib1.bibx14" id="paren.103"/>.
When using Galerkin least squares stabilization of the weak form, the user has to pick a value of the stabilization parameter.
Determining exactly what value of this parameter is necessary to guarantee stability is a subtle problem, even more so for the kinds of highly anisotropic meshes that are commonly encountered in 3D glacier flow modeling.
If the solver fails to converge, it might not be obvious, even to an expert, whether the problem lies with the stabilization or the aforementioned parameters of the linear solver.</p>
</sec>
</sec>
<sec id="Ch1.S7" sec-type="conclusions">
  <label>7</label><title>Conclusions</title>
      <p id="d1e5430">We have presented a new software package called icepack for modeling the flow of glaciers and ice sheets.
This package advances the state of the art in this field by providing a platform for easily experimenting with the model physics.
In this paper, we have presented three demonstrations of this feature:
<list list-type="order"><list-item>
      <p id="d1e5435">coupling a model of ice shelf flow to a phenomenological model of damage,</p></list-item><list-item>
      <p id="d1e5439">changing the sliding law in a simulation of a marine-terminating glacier, and</p></list-item><list-item>
      <p id="d1e5443">inferring the fluidity of a floating ice shelf in a way that guarantees positivity.</p></list-item></list>
The physics of how glaciers interact with their environment are not completely understood.
Consequently, the ability to change components of the model is an essential feature for any tool aimed at researchers in this field.</p>
      <p id="d1e5447">We have also paid special attention to how we can design this software package to be most usable for its intended audience.
Relatively few works in the computational science literature draw directly from relevant work in HCI when discussing usability (see, e.g., <xref ref-type="bibr" rid="bib1.bibx32 bib1.bibx34" id="altparen.104"/>).
We believe that this is due to two difficulties:
first, the degree to which usability is a rate-limiting factor for scientists is hard to quantify and likely differs widely across disciplines;
second, concretely assessing what features make software tools more or less usable is highly subjective.
By contrast, measuring computational performance is much more feasible, although still fraught with difficulties of its own.
(This is not to say that performance optimization is easy by any means.)
In working with several graduate students and postdoctoral researchers in glaciology, we have observed that usability is a substantial bottleneck for researchers at these career stages.
For this reason, we have chosen to focus explicitly on usability by drawing on the research literature in HCI.
Exactly how to apply principles from HCI to maximize usability is, nonetheless, not an exact science.
Our implementation may have failed to meet this goal, and changes in future versions will be guided by what users find most difficult.
Finally, we argue that the same design features that<?pagebreak page4611?> enhance usability for relative novices to the subject area will also enhance the productivity of expert users.</p>
      <p id="d1e5453">This paper has presented several physics models currently implemented in icepack along with demonstrations.
Future developments will include
<list list-type="order"><list-item>
      <p id="d1e5458">an implementation of full Stokes flow,</p></list-item><list-item>
      <p id="d1e5462">improved physics formulations and solvers that work in ice-free areas, and</p></list-item><list-item>
      <p id="d1e5466">adaptivity in time and space.</p></list-item></list>
New features will be guided by feedback from icepack users and from the glaciological community at large.
By providing implementations of several glacier flow models from less to more complex and by enabling users to experiment with the physics, this tool both lowers the barrier to entry for novices to numerical modeling and provides a pathway for these users to progress towards ever more sophisticated and advanced simulations.</p><?xmltex \hack{\clearpage}?>
</sec>

      
      </body>
    <back><app-group>

<?pagebreak page4612?><app id="App1.Ch1.S1">
  <?xmltex \currentcnt{A}?><label>Appendix A</label><title/>

<?xmltex \floatpos{h}?><table-wrap id="App1.Ch1.S1.T1"><?xmltex \currentcnt{A1}?><label>Table A1</label><caption><p id="d1e5484">Mathematical symbols.</p></caption><oasis:table frame="topbot"><oasis:tgroup cols="2">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="left"/>
     <oasis:thead>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1">Symbol</oasis:entry>
         <oasis:entry colname="col2">Meaning</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M176" display="inline"><mml:mi>h</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Thickness</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M177" display="inline"><mml:mi>b</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Bed elevation</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M178" display="inline"><mml:mi>s</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Surface elevation</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M179" display="inline"><mml:mi>d</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Water depth</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M180" display="inline"><mml:mi>u</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Velocity</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M181" display="inline"><mml:mrow><mml:msub><mml:mover accent="true"><mml:mi>a</mml:mi><mml:mo mathvariant="normal">˙</mml:mo></mml:mover><mml:mtext>s</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Surface mass balance</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M182" display="inline"><mml:mrow><mml:msub><mml:mover accent="true"><mml:mi>a</mml:mi><mml:mo mathvariant="normal">˙</mml:mo></mml:mover><mml:mtext>b</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Basal mass balance</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M183" display="inline"><mml:mover accent="true"><mml:mi mathvariant="italic">ε</mml:mi><mml:mo mathvariant="normal">˙</mml:mo></mml:mover></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Strain rate, <inline-formula><mml:math id="M184" display="inline"><mml:mrow><mml:mstyle displaystyle="false"><mml:mfrac style="text"><mml:mn mathvariant="normal">1</mml:mn><mml:mn mathvariant="normal">2</mml:mn></mml:mfrac></mml:mstyle><mml:mo>(</mml:mo><mml:mi mathvariant="normal">∇</mml:mi><mml:mi>u</mml:mi><mml:mo>+</mml:mo><mml:mi mathvariant="normal">∇</mml:mi><mml:msup><mml:mi>u</mml:mi><mml:mo>⊤</mml:mo></mml:msup><mml:mo>)</mml:mo></mml:mrow></mml:math></inline-formula></oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M185" display="inline"><mml:mi>C</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Bed friction coefficient</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M186" display="inline"><mml:mi>A</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Rheology coefficient</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M187" display="inline"><mml:mi>E</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Enthalpy density</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M188" display="inline"><mml:mi mathvariant="bold-italic">ν</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Unit outward normal</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M189" display="inline"><mml:mi>J</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Action functional</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M190" display="inline"><mml:mi mathvariant="normal">Ω</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Spatial domain</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M191" display="inline"><mml:mi mathvariant="normal">Γ</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Calving terminus</oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table></table-wrap>

<?xmltex \floatpos{h!}?><table-wrap id="App1.Ch1.S1.T2"><?xmltex \currentcnt{A2}?><label>Table A2</label><caption><p id="d1e5771">Physical constants.</p></caption><oasis:table frame="topbot"><oasis:tgroup cols="2">
     <oasis:colspec colnum="1" colname="col1" align="left"/>
     <oasis:colspec colnum="2" colname="col2" align="left"/>
     <oasis:thead>
       <oasis:row rowsep="1">
         <oasis:entry colname="col1">Symbol</oasis:entry>
         <oasis:entry colname="col2">Meaning</oasis:entry>
       </oasis:row>
     </oasis:thead>
     <oasis:tbody>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M192" display="inline"><mml:mi>n</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Glen's flow law exponent</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M193" display="inline"><mml:mi>m</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Weertman sliding law exponent</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M194" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mtext>I</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Ice density</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M195" display="inline"><mml:mrow><mml:msub><mml:mi mathvariant="italic">ρ</mml:mi><mml:mtext>W</mml:mtext></mml:msub></mml:mrow></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Seawater density</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M196" display="inline"><mml:mi>c</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Specific heat capacity of ice</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M197" display="inline"><mml:mi>L</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Latent heat of melting of ice</oasis:entry>
       </oasis:row>
       <oasis:row>
         <oasis:entry colname="col1"><inline-formula><mml:math id="M198" display="inline"><mml:mi>g</mml:mi></mml:math></inline-formula></oasis:entry>
         <oasis:entry colname="col2">Gravitational acceleration</oasis:entry>
       </oasis:row>
     </oasis:tbody>
   </oasis:tgroup></oasis:table></table-wrap>

<?xmltex \hack{\clearpage}?>
</app>
  </app-group><notes notes-type="codedataavailability"><title>Code and data availability</title>

      <p id="d1e5911">All code used in this repository is free and open source, and all data sets used in the demonstrations are publicly available.
The icepack source repository and regression testing results are available from <uri>https://github.com/icepack/icepack</uri> (last access: 28 May 2021).
The icepack package is released under the GPLv3 license.
The Git commit hash of the version of the code used for this publication is b78b0ee5 (see also the Zenodo release at <ext-link xlink:href="https://doi.org/10.5281/zenodo.1205640" ext-link-type="DOI">10.5281/zenodo.1205640</ext-link>; <xref ref-type="bibr" rid="bib1.bibx82" id="altparen.105"/>).
The icepack documentation, user manual, and contribution guidelines are hosted at <uri>https://icepack.github.io</uri> (last access: 28 May 2021).</p>

      <p id="d1e5926">The source code for the demonstrations used in this paper is hosted at  <ext-link xlink:href="https://doi.org/10.5281/zenodo.5063264" ext-link-type="DOI">10.5281/zenodo.5063264</ext-link> <xref ref-type="bibr" rid="bib1.bibx81" id="paren.106"/>, commit hash 4db3dc28.
The demonstrations used glacier outlines that were hand-digitized from satellite imagery in order to generate the model domains.
These outlines are kept in version control and hosted at <ext-link xlink:href="https://doi.org/10.5281/zenodo.5063248" ext-link-type="DOI">10.5281/zenodo.5063248</ext-link> <xref ref-type="bibr" rid="bib1.bibx83" id="paren.107"/>, and the Git commit hash for the version used in this publication is c98a8b75.
The BedMachine thickness map <xref ref-type="bibr" rid="bib1.bibx62" id="paren.108"><named-content content-type="post"><ext-link xlink:href="https://doi.org/10.5067/E1QL9HFQ7A8M" ext-link-type="DOI">10.5067/E1QL9HFQ7A8M</ext-link></named-content></xref> and the MEaSUREs InSAR phase-based velocity map <xref ref-type="bibr" rid="bib1.bibx65" id="paren.109"><named-content content-type="post"><ext-link xlink:href="https://doi.org/10.5067/PZ3NJ5RXRH10" ext-link-type="DOI">10.5067/PZ3NJ5RXRH10</ext-link></named-content></xref> are hosted at the US National Snow and Ice Data Center.</p>
  </notes><notes notes-type="authorcontribution"><title>Author contributions</title>

      <p id="d1e5957">DS designed and implemented icepack with contributions from JB and AH.
IJ tested the model and assisted with design and debugging.
All authors contributed to the demonstration codes and to writing this paper.</p>
  </notes><notes notes-type="competinginterests"><title>Competing interests</title>

      <p id="d1e5963">The authors declare that they have no conflict of interest.</p>
  </notes><notes notes-type="disclaimer"><title>Disclaimer</title>

      <p id="d1e5969">Publisher’s note: Copernicus Publications remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.</p>
  </notes><ack><title>Acknowledgements</title><p id="d1e5976">We would like to thank the Firedrake development team for their support and for many helpful discussions.</p></ack><notes notes-type="financialsupport"><title>Financial support</title>

      <p id="d1e5981">This research has been supported by the National Aeronautics and Space Administration (grant nos. 80NSSC20K0954 and 80NSSC20K1627) and the National Science Foundation (grant nos. 1835321 and 1643285).</p>
  </notes><notes notes-type="reviewstatement"><title>Review statement</title>

      <p id="d1e5987">This paper was edited by Alexander Robel and reviewed by Douglas Brinkerhoff, Ed Bueler, and one anonymous referee.</p>
  </notes><ref-list>
    <title>References</title>

      <ref id="bib1.bibx1"><?xmltex \def\ref@label{{Albrecht and Levermann(2014)}}?><label>Albrecht and Levermann(2014)</label><?label albrecht2014fracture?><mixed-citation>Albrecht, T. and Levermann, A.: Fracture-induced softening for large-scale ice dynamics, The Cryosphere, 8, 587–605, <ext-link xlink:href="https://doi.org/10.5194/tc-8-587-2014" ext-link-type="DOI">10.5194/tc-8-587-2014</ext-link>, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx2"><?xmltex \def\ref@label{{Aln{\ae}s et~al.(2014)}}?><label>Alnæs et al.(2014)</label><?label alnaes2014unified?><mixed-citation>
Alnæs, M. S., Logg, A., Ølgaard, K. B., Rognes, M. E., and Wells, G. N.: Unified form language: A domain-specific language for weak formulations of partial differential equations, ACM T. Math. Software, 40, 1–37, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx3"><?xmltex \def\ref@label{{Asay-Davis et~al.(2016)}}?><label>Asay-Davis et al.(2016)</label><?label asay2016experimental?><mixed-citation>Asay-Davis, X. S., Cornford, S. L., Durand, G., Galton-Fenzi, B. K., Gladstone, R. M., Gudmundsson, G. H., Hattermann, T., Holland, D. M., Holland, D., Holland, P. R., Martin, D. F., Mathiot, P., Pattyn, F., and Seroussi, H.: Experimental design for three interrelated marine ice sheet and ocean model intercomparison projects: MISMIP v. 3 (MISMIP +), ISOMIP v. 2 (ISOMIP +) and MISOMIP v. 1 (MISOMIP1), Geosci. Model Dev., 9, 2471–2497, <ext-link xlink:href="https://doi.org/10.5194/gmd-9-2471-2016" ext-link-type="DOI">10.5194/gmd-9-2471-2016</ext-link>, 2016.</mixed-citation></ref>
      <ref id="bib1.bibx4"><?xmltex \def\ref@label{{Ascher and Petzold(1998)}}?><label>Ascher and Petzold(1998)</label><?label ascher1998computer?><mixed-citation>
Ascher, U. M. and Petzold, L. R.: Computer methods for ordinary differential
equations and differential-algebraic equations, Society for Industrial and Applied Mathematics, 314 pp., 1998.</mixed-citation></ref>
      <ref id="bib1.bibx5"><?xmltex \def\ref@label{{Aschwanden et~al.(2012)}}?><label>Aschwanden et al.(2012)</label><?label aschwanden2012enthalpy?><mixed-citation>
Aschwanden, A., Bueler, E., Khroulev, C., and Blatter, H.: An enthalpy
formulation for glaciers and ice sheets, J. Glaciol., 58, 441–457,
2012.</mixed-citation></ref>
      <ref id="bib1.bibx6"><?xmltex \def\ref@label{{Balay et~al.(2019)}}?><label>Balay et al.(2019)</label><?label balay2019petsc?><mixed-citation>
Balay, S., Abhyankar, S., Adams, M., Brown, J., Brune, P., Buschelman, K.,
Dalcin, L., Dener, A., Eijkhout, V., Gropp, W., Karpeyev, D., Kaushik, D., Knepley, M., May, D., Curfman McInnes, L., Mills, R., Munson, T., Rupp, K., Sanan, P., Smith, B., Zampini, S., Zhang, H., and Zhang, H.: PETSc users manual, U.S. Department of Energy, 2019.</mixed-citation></ref>
      <ref id="bib1.bibx7"><?xmltex \def\ref@label{{Bangerth et~al.(2007)}}?><label>Bangerth et al.(2007)</label><?label bangerth2007deal?><mixed-citation>Bangerth, W., Hartmann, R., and Kanschat, G.: deal.II — a general-purpose
object-oriented finite element library, ACM T. Math. Software, 33, 24–es, <ext-link xlink:href="https://doi.org/10.1145/1268776.1268779" ext-link-type="DOI">10.1145/1268776.1268779</ext-link>, 2007.</mixed-citation></ref>
      <ref id="bib1.bibx8"><?xmltex \def\ref@label{{Banwell et~al.(2013)}}?><label>Banwell et al.(2013)</label><?label banwell2013breakup?><mixed-citation>
Banwell, A. F., MacAyeal, D. R., and Sergienko, O. V.: Breakup of the Larsen B Ice Shelf triggered by chain reaction drainage of supraglacial lakes,
Geophys. Res. Lett., 40, 5872–5876, 2013.</mixed-citation></ref>
      <ref id="bib1.bibx9"><?xmltex \def\ref@label{{Barron(2019)}}?><label>Barron(2019)</label><?label barron2019general?><mixed-citation>
Barron, J. T.: A general and adaptive robust loss function, in: 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), IEEE, Long Beach, CA, USA, 15–20 June 2019, 4326–4334, 2019.</mixed-citation></ref>
      <ref id="bib1.bibx10"><?xmltex \def\ref@label{{Bassis(2010)}}?><label>Bassis(2010)</label><?label bassis2010hamilton?><mixed-citation>
Bassis, J. N.: Hamilton-type principles applied to ice-sheet dynamics: new
approximations for large-scale ice-sheet flow, J. Glaciol., 56,
497–513, 2010.</mixed-citation></ref>
      <ref id="bib1.bibx11"><?xmltex \def\ref@label{{Bellavia and Berrone(2007)}}?><label>Bellavia and Berrone(2007)</label><?label bellavia2007globalization?><mixed-citation>
Bellavia, S. and Berrone, S.: Globalization strategies for Newton–Krylov
methods for stabilized FEM discretization of Navier–Stokes equations,
J. Comput. Phys., 226, 2317–2340, 2007.</mixed-citation></ref>
      <ref id="bib1.bibx12"><?xmltex \def\ref@label{{Bercea et~al.(2016)}}?><label>Bercea et al.(2016)</label><?label bercea2016structure?><mixed-citation>Bercea, G.-T., McRae, A. T., Ham, D. A., Mitchell, L., Rathgeber, F., Nardi,
L., Luporini, F., and Kelly, P. H.: A structure-exploiting numbering
algorithm for finite elements on extruded meshes, and its performance
evaluation in Firedrake, arXiv [preprint], <ext-link xlink:href="https://arxiv.org/abs/1604.0593">arXiv:1604.0593</ext-link>, 2016.</mixed-citation></ref>
      <ref id="bib1.bibx13"><?xmltex \def\ref@label{{Blatter(1995)}}?><label>Blatter(1995)</label><?label blatter1995velocity?><mixed-citation>
Blatter, H.: Velocity and stress fields in grounded glaciers: a simple
algorithm for including deviatoric stress gradients, J. Glaciol.,
41, 333–344, 1995.</mixed-citation></ref>
      <ref id="bib1.bibx14"><?xmltex \def\ref@label{{Boffi et~al.(2013)Boffi, Brezzi, and Fortin}}?><label>Boffi et al.(2013)Boffi, Brezzi, and Fortin</label><?label boffi2013mixed?><mixed-citation>Boffi, D., Brezzi, F., and Fortin, M.: Mixed finite element methods and
applications, vol. 44, Springer, <ext-link xlink:href="https://doi.org/10.1007/978-3-642-36519-5" ext-link-type="DOI">10.1007/978-3-642-36519-5</ext-link>, 2013.</mixed-citation></ref>
      <ref id="bib1.bibx15"><?xmltex \def\ref@label{{B{\"{o}}{\dh}varsson(1955)}}?><label>Böðvarsson(1955)</label><?label bodhvarsson1955flow?><mixed-citation>
Böðvarsson, G.: On the flow of ice-sheet and glaciers, Jökull, 5, 1–8, 1955.</mixed-citation></ref>
      <?pagebreak page4614?><ref id="bib1.bibx16"><?xmltex \def\ref@label{{Brinkerhoff and Johnson(2015)}}?><label>Brinkerhoff and Johnson(2015)</label><?label brinkerhoff2015dynamics?><mixed-citation>
Brinkerhoff, D. and Johnson, J.: Dynamics of thermally induced ice streams
simulated with a higher-order flow model, J. Geophys. Res.-Earth Surf., 120, 1743–1770, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx17"><?xmltex \def\ref@label{{Brinkerhoff and Johnson(2013)}}?><label>Brinkerhoff and Johnson(2013)</label><?label brinkerhoff2013data?><mixed-citation>Brinkerhoff, D. J. and Johnson, J. V.: Data assimilation and prognostic whole ice sheet modelling with the variationally derived, higher order, open source, and fully parallel ice sheet model VarGlaS, The Cryosphere, 7, 1161–1184, <ext-link xlink:href="https://doi.org/10.5194/tc-7-1161-2013" ext-link-type="DOI">10.5194/tc-7-1161-2013</ext-link>, 2013.</mixed-citation></ref>
      <ref id="bib1.bibx18"><?xmltex \def\ref@label{{Budd et~al.(1979)}}?><label>Budd et al.(1979)</label><?label budd1979empirical?><mixed-citation>
Budd, W. F., Keage, P. L., and Blundy, N.: Empirical studies of ice sliding,
J. Glaciol., 23, 157–170, 1979.</mixed-citation></ref>
      <ref id="bib1.bibx19"><?xmltex \def\ref@label{{Bueler(2014)}}?><label>Bueler(2014)</label><?label bueler2014exact?><mixed-citation>
Bueler, E.: An exact solution for a steady, flowline marine ice sheet, J. Glaciol., 60, 1117–1125, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx20"><?xmltex \def\ref@label{{Bueler(2020)}}?><label>Bueler(2020)</label><?label bueler2020petsc?><mixed-citation>Bueler, E.: PETSc for Partial Differential Equations: Numerical Solutions in C and Python, Society for Industrial and Applied Mathematics (SIAM), Philadelphia, PA, 406 pp., <ext-link xlink:href="https://doi.org/10.1137/1.9781611976311" ext-link-type="DOI">10.1137/1.9781611976311</ext-link>, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx21"><?xmltex \def\ref@label{{Cantwell et~al.(2015)}}?><label>Cantwell et al.(2015)</label><?label cantwell2015nektar++?><mixed-citation>
Cantwell, C. D., Moxey, D., Comerford, A., Bolis, A., Rocco, G., Mengaldo, G., De Grazia, D., Yakovlev, S., Lombard, J.-E., Ekelschot, D., Jordi, B., Xu, H., Mohamied, Y., Eskilsson, C., Nelson, B., Vos, P., Biotto, C., Kirby, R. M., and Sherwin, S. J.: Nektar++:
An open-source spectral/hp element framework, Comput. Phys.
Commun., 192, 205–219, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx22"><?xmltex \def\ref@label{{Cuffey and Paterson(2010)}}?><label>Cuffey and Paterson(2010)</label><?label cuffey2010physics?><mixed-citation>
Cuffey, K. M. and Paterson, W. S. B.: The physics of glaciers, Academic Press, 704 pp., 2010.</mixed-citation></ref>
      <ref id="bib1.bibx23"><?xmltex \def\ref@label{{De~Groot and Mazur(2013)}}?><label>De Groot and Mazur(2013)</label><?label de2013non?><mixed-citation>
De Groot, S. R. and Mazur, P.: Non-equilibrium thermodynamics, Dover Publications, New York, 510 pp., 2013.</mixed-citation></ref>
      <ref id="bib1.bibx24"><?xmltex \def\ref@label{{Donea and Huerta(2003)}}?><label>Donea and Huerta(2003)</label><?label donea2003finite?><mixed-citation>Donea, J. and Huerta, A.: Finite element methods for flow problems, John Wiley &amp; Sons, <ext-link xlink:href="https://doi.org/10.1002/0470013826" ext-link-type="DOI">10.1002/0470013826</ext-link>, 2003.</mixed-citation></ref>
      <ref id="bib1.bibx25"><?xmltex \def\ref@label{{Dukowicz et~al.(2010)}}?><label>Dukowicz et al.(2010)</label><?label dukowicz2010consistent?><mixed-citation>
Dukowicz, J. K., Price, S. F., and Lipscomb, W. H.: Consistent approximations
and boundary conditions for ice-sheet dynamics from a principle of least
action, J. Glaciol., 56, 480–496, 2010.</mixed-citation></ref>
      <ref id="bib1.bibx26"><?xmltex \def\ref@label{{Fretwell et~al.(2013)}}?><label>Fretwell et al.(2013)</label><?label fretwell2013bedmap2?><mixed-citation>Fretwell, P., Pritchard, H. D., Vaughan, D. G., Bamber, J. L., Barrand, N. E., Bell, R., Bianchi, C., Bingham, R. G., Blankenship, D. D., Casassa, G., Catania, G., Callens, D., Conway, H., Cook, A. J., Corr, H. F. J., Damaske, D., Damm, V., Ferraccioli, F., Forsberg, R., Fujita, S., Gim, Y., Gogineni, P., Griggs, J. A., Hindmarsh, R. C. A., Holmlund, P., Holt, J. W., Jacobel, R. W., Jenkins, A., Jokat, W., Jordan, T., King, E. C., Kohler, J., Krabill, W., Riger-Kusk, M., Langley, K. A., Leitchenkov, G., Leuschen, C., Luyendyk, B. P., Matsuoka, K., Mouginot, J., Nitsche, F. O., Nogi, Y., Nost, O. A., Popov, S. V., Rignot, E., Rippin, D. M., Rivera, A., Roberts, J., Ross, N., Siegert, M. J., Smith, A. M., Steinhage, D., Studinger, M., Sun, B., Tinto, B. K., Welch, B. C., Wilson, D., Young, D. A., Xiangbin, C., and Zirizzotti, A.: Bedmap2: improved ice bed, surface and thickness datasets for Antarctica, The Cryosphere, 7, 375–393, <ext-link xlink:href="https://doi.org/10.5194/tc-7-375-2013" ext-link-type="DOI">10.5194/tc-7-375-2013</ext-link>, 2013.</mixed-citation></ref>
      <ref id="bib1.bibx27"><?xmltex \def\ref@label{{Gagliardini et~al.(2013)}}?><label>Gagliardini et al.(2013)</label><?label gagliardini2013capabilities?><mixed-citation>Gagliardini, O., Zwinger, T., Gillet-Chaulet, F., Durand, G., Favier, L., de Fleurian, B., Greve, R., Malinen, M., Martín, C., Råback, P., Ruokolainen, J., Sacchettini, M., Schäfer, M., Seddik, H., and Thies, J.: Capabilities and performance of Elmer/Ice, a new-generation ice sheet model, Geosci. Model Dev., 6, 1299–1318, <ext-link xlink:href="https://doi.org/10.5194/gmd-6-1299-2013" ext-link-type="DOI">10.5194/gmd-6-1299-2013</ext-link>, 2013.</mixed-citation></ref>
      <ref id="bib1.bibx28"><?xmltex \def\ref@label{{Gillet-Chaulet et~al.(2006)}}?><label>Gillet-Chaulet et al.(2006)</label><?label gillet2006flow?><mixed-citation>
Gillet-Chaulet, F., Gagliardini, O., Meyssonnier, J., Zwinger, T., and
Ruokolainen, J.: Flow-induced anisotropy in polar ice and related ice-sheet
flow modelling, J. Non-Newton. Fluid, 134, 33–43, 2006.</mixed-citation></ref>
      <ref id="bib1.bibx29"><?xmltex \def\ref@label{{Green and Petre(1996)}}?><label>Green and Petre(1996)</label><?label green1996usability?><mixed-citation>
Green, T. R. G. and Petre, M.: Usability analysis of visual programming
environments: a “cognitive dimensions” framework, J. Visual
Lang. Comput., 7, 131–174, 1996.</mixed-citation></ref>
      <ref id="bib1.bibx30"><?xmltex \def\ref@label{{Greve and Blatter(2009)}}?><label>Greve and Blatter(2009)</label><?label greve2009dynamics?><mixed-citation>
Greve, R. and Blatter, H.: Dynamics of ice sheets and glaciers, Springer
Science &amp; Business Media, 2009.</mixed-citation></ref>
      <ref id="bib1.bibx31"><?xmltex \def\ref@label{{Habermann et~al.(2012)}}?><label>Habermann et al.(2012)</label><?label habermann2012reconstruction?><mixed-citation>
Habermann, M., Maxwell, D., and Truffer, M.: Reconstruction of basal properties in ice sheets using iterative inverse methods, J. Glaciol., 58, 795–808, 2012.</mixed-citation></ref>
      <ref id="bib1.bibx32"><?xmltex \def\ref@label{{Hannay et~al.(2009)}}?><label>Hannay et al.(2009)</label><?label hannay2009scientists?><mixed-citation>Hannay, J. E., MacLeod, C., Singer, J., Langtangen, H. P., Pfahl, D., and
Wilson, G.: How do scientists develop and use scientific software?, in: 2009
ICSE Workshop on Software Engineering for Computational Science and
Engineering, IEEE, Vancouver, BC, Canada, 23–23 May 2009, <ext-link xlink:href="https://doi.org/10.1109/SECSE.2009.5069155" ext-link-type="DOI">10.1109/SECSE.2009.5069155</ext-link>, 2009.</mixed-citation></ref>
      <ref id="bib1.bibx33"><?xmltex \def\ref@label{{Haran et~al.(2014)}}?><label>Haran et al.(2014)</label><?label haran2014modis?><mixed-citation>Haran, T., Bohlander, J., Scambos, T., Painter, T., and Fahnestock, M.: MODIS
Mosaic of Antarctica 2008–2009 (MOA2009) image map, Boulder, Colorado USA,
National Snow and Ice Data Center, <ext-link xlink:href="https://doi.org/10.7265/N5KP8037" ext-link-type="DOI">10.7265/N5KP8037</ext-link>, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx34"><?xmltex \def\ref@label{{Harris et~al.(2020)}}?><label>Harris et al.(2020)</label><?label harris2020array?><mixed-citation>
Harris, C. R., Millman, K. J., van der Walt, S. J., Gommers, R., Virtanen, P., Cournapeau, D., Wieser, E., Taylor, J., Berg, S., Smith, N. J., Kern, R., Picus, M., Hoyer, S., van Kerkwijk, M.H., Brett, M., Haldane, A., Fernández del Río, J., Wiebe, M., Peterson, P., Gérard-Marchant, P., Sheppard, K., Reddy, T., Weckesser, W., Abbasi, H., Gohlke, C., and Oliphant, T. E.: Array programming with NumPy, Nature, 585, 357–362, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx35"><?xmltex \def\ref@label{{Holland et~al.(2009)}}?><label>Holland et al.(2009)</label><?label holland2009marine?><mixed-citation>Holland, P. R., Corr, H. F., Vaughan, D. G., Jenkins, A., and Skvarca, P.:
Marine ice in Larsen ice shelf, Geophys. Res. Lett., 36, L11604, <ext-link xlink:href="https://doi.org/10.1029/2009GL038162" ext-link-type="DOI">10.1029/2009GL038162</ext-link>, 2009.</mixed-citation></ref>
      <ref id="bib1.bibx36"><?xmltex \def\ref@label{{H{\"{u}}ck et~al.(2018)}}?><label>Hück et al.(2018)</label><?label huck2018usability?><mixed-citation>
Hück, A., Bischof, C., Sagebaum, M., Gauger, N. R., Jurgelucks, B., Larour, E., and Perez, G.: A usability case study of algorithmic differentiation tools on the ISSM ice sheet model, Optim. Method. Softw., 33, 844–867, 2018.</mixed-citation></ref>
      <ref id="bib1.bibx37"><?xmltex \def\ref@label{{Hutter(1981)}}?><label>Hutter(1981)</label><?label hutter1981effect?><mixed-citation>
Hutter, K.: The effect of longitudinal strain on the shear stress of an ice
sheet: in defence of using stretched coordinates, J. Glaciol., 27,
39–56, 1981.</mixed-citation></ref>
      <ref id="bib1.bibx38"><?xmltex \def\ref@label{{Huybrechts(2002)}}?><label>Huybrechts(2002)</label><?label huybrechts2002sea?><mixed-citation>
Huybrechts, P.: Sea-level changes at the LGM from ice-dynamic reconstructions
of the Greenland and Antarctic ice sheets during the glacial cycles,
Quatern. Sci. Rev., 21, 203–231, 2002.</mixed-citation></ref>
      <ref id="bib1.bibx39"><?xmltex \def\ref@label{{Joughin et~al.(2004)}}?><label>Joughin et al.(2004)</label><?label joughin2004basal?><mixed-citation>Joughin, I., MacAyeal, D. R., and Tulaczyk, S.: Basal shear stress of the Ross ice streams from control method inversions, J. Geophys. Res.-Sol. Ea., 109, B09405, <ext-link xlink:href="https://doi.org/10.1029/2003JB002960" ext-link-type="DOI">10.1029/2003JB002960</ext-link>, 2004.</mixed-citation></ref>
      <ref id="bib1.bibx40"><?xmltex \def\ref@label{{Joughin et~al.(2009)}}?><label>Joughin et al.(2009)</label><?label joughin2009basal?><mixed-citation>
Joughin, I., Tulaczyk, S., Bamber, J. L., Blankenship, D., Holt, J. W.,
Scambos, T., and Vaughan, D. G.: Basal conditions for Pine Island and
Thwaites Glaciers, West Antarctica, determined using satellite and airborne
data, J. Glaciol., 55, 245–257, 2009.</mixed-citation></ref>
      <ref id="bib1.bibx41"><?xmltex \def\ref@label{{Joughin et~al.(2014)}}?><label>Joughin et al.(2014)</label><?label joughin2014marine?><mixed-citation>
Joughin, I., Smith, B. E., and Medley, B.: Marine ice sheet collapse
potentially under way for the Thwaites Glacier Basin, West Antarctica,
Science, 344, 735–738, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx42"><?xmltex \def\ref@label{{Joughin et~al.(2019)}}?><label>Joughin et al.(2019)</label><?label joughin2019regularized?><mixed-citation>
Joughin, I., Smith, B. E., and Schoof, C. G.: Regularized Coulomb friction laws for ice sheet sliding: application to Pine Island Glacier, Antarctica,
Geophys. Res. Lett., 46, 4764–4771, 2019.</mixed-citation></ref>
      <ref id="bib1.bibx43"><?xmltex \def\ref@label{{Jouvet(2015)}}?><label>Jouvet(2015)</label><?label jouvet2015multilayer?><mixed-citation>
Jouvet, G.: Multilayer shallow shelf approximation: Minimisation formulation,
finite element solvers and applications, J. Comput. Phys.,
287, 60–76, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx44"><?xmltex \def\ref@label{{Jouvet and Bueler(2012)}}?><label>Jouvet and Bueler(2012)</label><?label jouvet2012steady?><mixed-citation>
Jouvet, G. and Bueler, E.: Steady, shallow ice sheets as obstacle problems:
well-posedness and finite element approximation, SIAM J. Appl.
Math., 72, 1292–1314, 2012.</mixed-citation></ref>
      <?pagebreak page4615?><ref id="bib1.bibx45"><?xmltex \def\ref@label{{Kessler et~al.(2008)}}?><label>Kessler et al.(2008)</label><?label kessler2008fjord?><mixed-citation>
Kessler, M. A., Anderson, R. S., and Briner, J. P.: Fjord insertion into
continental margins driven by topographic steering of ice, Nature Geoscience,
1, 365–369, 2008.</mixed-citation></ref>
      <ref id="bib1.bibx46"><?xmltex \def\ref@label{{Khazendar et~al.(2011)}}?><label>Khazendar et al.(2011)</label><?label khazendar2011acceleration?><mixed-citation>Khazendar, A., Rignot, E., and Larour, E.: Acceleration and spatial rheology of Larsen C ice shelf, Antarctic Peninsula, Geophys. Res. Lett., 38, L09502, <ext-link xlink:href="https://doi.org/10.1029/2011GL046775" ext-link-type="DOI">10.1029/2011GL046775</ext-link>, 2011.</mixed-citation></ref>
      <ref id="bib1.bibx47"><?xmltex \def\ref@label{{Kirby and Logg(2006)}}?><label>Kirby and Logg(2006)</label><?label kirby2006compiler?><mixed-citation>
Kirby, R. C. and Logg, A.: A compiler for variational forms, ACM T. Math. Software, 32, 417–444, 2006.</mixed-citation></ref>
      <ref id="bib1.bibx48"><?xmltex \def\ref@label{{Kirby and Mitchell(2018)}}?><label>Kirby and Mitchell(2018)</label><?label kirby2018solver?><mixed-citation>
Kirby, R. C. and Mitchell, L.: Solver composition across the PDE/linear algebra barrier, SIAM J. Sci. Comput., 40, C76–C98, 2018.</mixed-citation></ref>
      <ref id="bib1.bibx49"><?xmltex \def\ref@label{{Kirchner et~al.(2016)}}?><label>Kirchner et al.(2016)</label><?label kirchner2016shallow?><mixed-citation>
Kirchner, N., Ahlkrona, J., Gowan, E. J., Lötstedt, P., Lea, J. M.,
Noormets, R., von Sydow, L., Dowdeswell, J. A., and Benham, T.: Shallow ice
approximation, second order shallow ice approximation, and full Stokes
models: A discussion of their roles in palaeo-ice sheet modelling and
development, Quat. Sci. Rev., 147, 136–147, 2016.</mixed-citation></ref>
      <ref id="bib1.bibx50"><?xmltex \def\ref@label{{Kleiner and Humbert(2014)}}?><label>Kleiner and Humbert(2014)</label><?label kleiner2014numerical?><mixed-citation>
Kleiner, T. and Humbert, A.: Numerical simulations of major ice streams in
western Dronning Maud Land, Antarctica, under wet and dry basal conditions,
J. Glaciol., 60, 215–232, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx51"><?xmltex \def\ref@label{{Kluyver et~al.(2016)}}?><label>Kluyver et al.(2016)</label><?label kluyver2016jupyter?><mixed-citation>
Kluyver, T., Ragan-Kelley, B., Pérez, F., Granger, B. E., Bussonnier, M.,
Frederic, J., Kelley, K., Hamrick, J. B., Grout, J., Corlay, S., Ivanov, P., Avila, D., Abdalla, S., Willing, C., and  Jupyter development team:
Jupyter Notebooks-a publishing format for reproducible computational
workflows, in: Positioning and Power in Academic Publishing: Players, Agents and Agendas, IOS Press, 87–90, 2016.</mixed-citation></ref>
      <ref id="bib1.bibx52"><?xmltex \def\ref@label{{Kulessa et~al.(2014)}}?><label>Kulessa et al.(2014)</label><?label kulessa2014marine?><mixed-citation>Kulessa, B., Jansen, D., Luckman, A. J., King, E. C., and Sammonds, P. R.:
Marine ice regulates the future stability of a large Antarctic ice shelf,
Nat. Commun., 5, 3707, <ext-link xlink:href="https://doi.org/10.1038/ncomms4707" ext-link-type="DOI">10.1038/ncomms4707</ext-link>, 2014.</mixed-citation></ref>
      <ref id="bib1.bibx53"><?xmltex \def\ref@label{{Langdon and Raymond(1978)}}?><label>Langdon and Raymond(1978)</label><?label langdon1978numerical?><mixed-citation>
Langdon, J. and Raymond, C. F.: Numerical calculation of adjustment of a
glacier surface to perturbations of ice thickness, Mater. Glyatsiol. Issled.
Khron. Obsuzhdeniya, 32, 233–239, 1978.</mixed-citation></ref>
      <ref id="bib1.bibx54"><?xmltex \def\ref@label{{Larour et~al.(2005)}}?><label>Larour et al.(2005)</label><?label larour2005rheology?><mixed-citation>Larour, E., Rignot, E., Joughin, I., and Aubry, D.: Rheology of the Ronne Ice
Shelf, Antarctica, inferred from satellite radar interferometry data using an
inverse control method, Geophys. Res. Lett., 32, L05503, <ext-link xlink:href="https://doi.org/10.1029/2004GL021693" ext-link-type="DOI">10.1029/2004GL021693</ext-link>, 2005.</mixed-citation></ref>
      <ref id="bib1.bibx55"><?xmltex \def\ref@label{{Logg et~al.(2012)}}?><label>Logg et al.(2012)</label><?label logg2012automated?><mixed-citation>
Logg, A., Mardal, K.-A., and Wells, G.: Automated solution of differential
equations by the finite element method: The FEniCS book, vol. 84, Springer
Science &amp; Business Media, 2012.</mixed-citation></ref>
      <ref id="bib1.bibx56"><?xmltex \def\ref@label{{MacAyeal(1989)}}?><label>MacAyeal(1989)</label><?label macayeal1989large?><mixed-citation>
MacAyeal, D. R.: Large-scale ice flow over a viscous basal sediment: Theory
and application to ice stream B, Antarctica, J. Geophys.
Res.-Sol. Ea., 94, 4071–4087, 1989.</mixed-citation></ref>
      <ref id="bib1.bibx57"><?xmltex \def\ref@label{{MacAyeal(1992)}}?><label>MacAyeal(1992)</label><?label macayeal1992basal?><mixed-citation>
MacAyeal, D. R.: The basal stress distribution of Ice Stream E, Antarctica,
inferred by control methods, JJ. Geophys.
Res.-Sol. Ea., 97, 595–603, 1992.</mixed-citation></ref>
      <ref id="bib1.bibx58"><?xmltex \def\ref@label{{MacAyeal et~al.(1995)}}?><label>MacAyeal et al.(1995)</label><?label macayeal1995basal?><mixed-citation>
MacAyeal, D. R., Bindschadler, R. A., and Scambos, T. A.: Basal friction of ice stream E, West Antarctica, J. Glaciol., 41, 247–262, 1995.</mixed-citation></ref>
      <ref id="bib1.bibx59"><?xmltex \def\ref@label{{McRae et~al.(2016)}}?><label>McRae et al.(2016)</label><?label mcrae2016automated?><mixed-citation>
McRae, A. T., Bercea, G.-T., Mitchell, L., Ham, D. A., and Cotter, C. J.:
Automated generation and symbolic manipulation of tensor product finite
elements, SIAM J. Sci. Comput., 38, S25–S47, 2016.</mixed-citation></ref>
      <ref id="bib1.bibx60"><?xmltex \def\ref@label{{Meurer et~al.(2017)}}?><label>Meurer et al.(2017)</label><?label sympy?><mixed-citation>Meurer, A., Smith, C. P., Paprocki, M., Čertík, O., Kirpichev, S. B.,
Rocklin, M., Kumar, A., Ivanov, S., Moore, J. K., Singh, S., Rathnayake, T.,
Vig, S., Granger, B. E., Muller, R. P., Bonazzi, F., Gupta, H., Vats, S.,
Johansson, F., Pedregosa, F., Curry, M. J., Terrel, A. R., Roučka, v.,
Saboo, A., Fernando, I., Kulal, S., Cimrman, R., and Scopatz, A.: SymPy:
symbolic computing in Python, PeerJ Comput. Sci., 3, e103,
<ext-link xlink:href="https://doi.org/10.7717/peerj-cs.103" ext-link-type="DOI">10.7717/peerj-cs.103</ext-link>, 2017.</mixed-citation></ref>
      <ref id="bib1.bibx61"><?xmltex \def\ref@label{{Mitusch et~al.(2019)Mitusch, Funke, and Dokken}}?><label>Mitusch et al.(2019)Mitusch, Funke, and Dokken</label><?label mitusch2019dolfin?><mixed-citation>
Mitusch, S. K., Funke, S. W., and Dokken, J. S.: dolfin-adjoint 2018.1:
automated adjoints for FEniCS and Firedrake, J. Open Source Softw.,
4, 1292, 2019.</mixed-citation></ref>
      <ref id="bib1.bibx62"><?xmltex \def\ref@label{Morlighem(2020)}?><label>Morlighem(2020)</label><?label Morlighem2020?><mixed-citation>Morlighem, M.: MEaSUREs BedMachine Antarctica, Version 2 [data set], Boulder, Colorado USA, NASA National Snow and Ice Data Center Distributed Active Archive Center, <ext-link xlink:href="https://doi.org/10.5067/E1QL9HFQ7A8M" ext-link-type="DOI">10.5067/E1QL9HFQ7A8M</ext-link>, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx63"><?xmltex \def\ref@label{{Morlighem et~al.(2010)}}?><label>Morlighem et al.(2010)</label><?label morlighem2010spatial?><mixed-citation>Morlighem, M., Rignot, E., Seroussi, H., Larour, E., Ben Dhia, H., and Aubry,
D.: Spatial patterns of basal drag inferred using control methods from a
full-Stokes and simpler models for Pine Island Glacier, West Antarctica,
Geophys. Res. Lett., 37, L14502, <ext-link xlink:href="https://doi.org/10.1029/2010GL043853" ext-link-type="DOI">10.1029/2010GL043853</ext-link>, 2010.</mixed-citation></ref>
      <ref id="bib1.bibx64"><?xmltex \def\ref@label{{Morlighem et~al.(2019)}}?><label>Morlighem et al.(2019)</label><?label morlighem2019deep?><mixed-citation>
Morlighem, M., Rignot, E., Binder, T., Blankenship, D., Drews, R., Eagles, G., Eisen, O., Ferraccioli, F., Forsberg, R., Fretwell, P., Goel, V., Greenbaum, J. S., Gudmundsson, G. H., Guo, J., Helm, V., Hofstede, C., Howat, I., Humbert, A., Jokat, W., Karlsson, N. B., Lee, W. S., Matsuoka, K., Millan, R., Mouginot, J., Paden, J., Pattyn, F., Roberts, J., Rosier, S., Ruppel, A., Seroussi, H., Smith, E. C., Steinhage, D., Sun, B., van den Broeke, M. R., van Ommen, T. D., van Wessem, M., and Young, D. A.: Deep glacial
troughs and stabilizing ridges unveiled beneath the margins of the Antarctic
ice sheet, Nat. Geosci., 13, 132–137, 2019.</mixed-citation></ref>
      <ref id="bib1.bibx65"><?xmltex \def\ref@label{Mouginot et al.(2019)}?><label>Mouginot et al.(2019)</label><?label Mouginotetal2019?><mixed-citation>Mouginot, J., Rignot, E., and Scheuchl, B.: MEaSUREs Phase-Based Antarctica Ice Velocity Map, Version 1 [data set], Boulder, Colorado USA, NASA National Snow and Ice Data Center Distributed Active Archive Center, <ext-link xlink:href="https://doi.org/10.5067/PZ3NJ5RXRH10" ext-link-type="DOI">10.5067/PZ3NJ5RXRH10</ext-link>, 2019.</mixed-citation></ref>
      <ref id="bib1.bibx66"><?xmltex \def\ref@label{{Mouginot et~al.(2019)}}?><label>Mouginot et al.(2019)</label><?label mouginot2019continent?><mixed-citation>
Mouginot, J., Rignot, E., and Scheuchl, B.: Continent-wide, interferometric SAR phase, mapping of Antarctic ice velocity, Geophys. Res. Lett., 46,
9710–9718, 2019.</mixed-citation></ref>
      <ref id="bib1.bibx67"><?xmltex \def\ref@label{{Nick et~al.(2010)}}?><label>Nick et al.(2010)</label><?label nick2010physically?><mixed-citation>
Nick, F. M., Van der Veen, C. J., Vieli, A., and Benn, D. I.: A physically
based calving model applied to marine outlet glaciers and implications for
the glacier dynamics, J. Glaciol., 56, 781–794, 2010.</mixed-citation></ref>
      <ref id="bib1.bibx68"><?xmltex \def\ref@label{{Nitsche(1971)}}?><label>Nitsche(1971)</label><?label nitsche1971variationsprinzip?><mixed-citation>
Nitsche, J.: Über ein Variationsprinzip zur Lösung von
Dirichlet-Problemen bei Verwendung von Teilräumen, die keinen
Randbedingungen unterworfen sind, in: Abhandlungen aus dem mathematischen
Seminar der Universität Hamburg, Springer, 36, 9–15, 1971.</mixed-citation></ref>
      <ref id="bib1.bibx69"><?xmltex \def\ref@label{{Nocedal and Wright(2006)}}?><label>Nocedal and Wright(2006)</label><?label nocedal2006numerical?><mixed-citation>
Nocedal, J. and Wright, S.: Numerical optimization, Springer Science &amp;
Business Media, 2006.</mixed-citation></ref>
      <ref id="bib1.bibx70"><?xmltex \def\ref@label{{Pattyn(2003)}}?><label>Pattyn(2003)</label><?label pattyn2003new?><mixed-citation>Pattyn, F.: A new three-dimensional higher-order thermomechanical ice sheet
model: Basic sensitivity, ice stream development, and ice flow across
subglacial lakes, J. Geophys. Res.-Sol. Ea., 108, 2382, <ext-link xlink:href="https://doi.org/10.1029/2002JB002329" ext-link-type="DOI">10.1029/2002JB002329</ext-link>, 2003.</mixed-citation></ref>
      <ref id="bib1.bibx71"><?xmltex \def\ref@label{{Pattyn et~al.(2013)}}?><label>Pattyn et al.(2013)</label><?label pattyn2013grounding?><mixed-citation>
Pattyn, F., Perichon, L., Durand, G., Favier, L., Gagliardini, O., Hindmarsh,
R. C., Zwinger, T., Albrecht, T., Cornford, S., Docquier, D., Fürst, J. J., Goldberg, D., Hilmar Gudmundsson, G., Humbert, A., Hütten, M., Huybrechts, P., Jouvet, G., Kleiner, T., Larour, E., Martin, D., Morlighem, M., Payne, A. J., Pollard, D., Rückamp, M., Rybak, O., Seroussi, H., Thoma, M., and Wilkens, N.:
Grounding-line migration in plan-view marine ice-sheet models: results of the
ice2sea MISMIP3d intercomparison, J. Glaciol., 59, 410–422, 2013.</mixed-citation></ref>
      <?pagebreak page4616?><ref id="bib1.bibx72"><?xmltex \def\ref@label{{Perego et~al.(2012)}}?><label>Perego et al.(2012)</label><?label perego2012parallel?><mixed-citation>
Perego, M., Gunzburger, M., and Burkardt, J.: Parallel finite-element
implementation for higher-order ice-sheet models, J. Glaciol., 58,
76–88, 2012.</mixed-citation></ref>
      <ref id="bib1.bibx73"><?xmltex \def\ref@label{{Phillips et~al.(2010)}}?><label>Phillips et al.(2010)</label><?label phillips2010cryo?><mixed-citation>Phillips, T., Rajaram, H., and Steffen, K.: Cryo-hydrologic warming: A
potential mechanism for rapid thermal response of ice sheets, Geophys. Res. Lett., 37, L20503, <ext-link xlink:href="https://doi.org/10.1029/2010GL044397" ext-link-type="DOI">10.1029/2010GL044397</ext-link>, 2010.</mixed-citation></ref>
      <ref id="bib1.bibx74"><?xmltex \def\ref@label{{Pratt et~al.(1998)}}?><label>Pratt et al.(1998)</label><?label pratt1998gauss?><mixed-citation>
Pratt, R. G., Shin, C., and Hick, G.: Gauss–Newton and full Newton methods in frequency–space seismic waveform inversion, Geophys. J.
Int., 133, 341–362, 1998.</mixed-citation></ref>
      <ref id="bib1.bibx75"><?xmltex \def\ref@label{{Rathgeber et~al.(2016)}}?><label>Rathgeber et al.(2016)</label><?label rathgeber2016firedrake?><mixed-citation>
Rathgeber, F., Ham, D. A., Mitchell, L., Lange, M., Luporini, F., McRae, A. T., Bercea, G.-T., Markall, G. R., and Kelly, P. H.: Firedrake: automating the finite element method by composing abstractions, ACM T. Math. Software, 43, 1–27, 2016.</mixed-citation></ref>
      <ref id="bib1.bibx76"><?xmltex \def\ref@label{{Roache(2002)}}?><label>Roache(2002)</label><?label roache2002code?><mixed-citation>
Roache, P. J.: Code verification by the method of manufactured solutions, J.
Fluids Eng., 124, 4–10, 2002.</mixed-citation></ref>
      <ref id="bib1.bibx77"><?xmltex \def\ref@label{{Scambos et~al.(2007)}}?><label>Scambos et al.(2007)</label><?label scambos2007modis?><mixed-citation>
Scambos, T. A., Haran, T. M., Fahnestock, M., Painter, T., and Bohlander, J.:
MODIS-based Mosaic of Antarctica (MOA) data sets: Continent-wide surface
morphology and snow grain size, Remote Sens. Environ., 111, 242–257,
2007.</mixed-citation></ref>
      <ref id="bib1.bibx78"><?xmltex \def\ref@label{{Schoof(2005)}}?><label>Schoof(2005)</label><?label schoof2005effect?><mixed-citation>
Schoof, C.: The effect of cavitation on glacier sliding, P. Roy. Soc. A-Math. Phy., 461,
609–627, 2005.</mixed-citation></ref>
      <ref id="bib1.bibx79"><?xmltex \def\ref@label{{Schoof and Hewitt(2013)}}?><label>Schoof and Hewitt(2013)</label><?label schoof2013ice?><mixed-citation>
Schoof, C. and Hewitt, I.: Ice-sheet dynamics, Annu. Rev. Fluid
Mech., 45, 217–239, 2013.</mixed-citation></ref>
      <ref id="bib1.bibx80"><?xmltex \def\ref@label{{Shapero et~al.(2016)}}?><label>Shapero et al.(2016)</label><?label shapero2016basal?><mixed-citation>
Shapero, D. R., Joughin, I. R., Poinar, K., Morlighem, M., and Gillet-Chaulet,
F.: Basal resistance for three of the largest Greenland outlet glaciers,
J. Geophys. Res.-Earth Surf., 121, 168–180, 2016.</mixed-citation></ref>
      <ref id="bib1.bibx81"><?xmltex \def\ref@label{Shapero and Badgeley(2021)}?><label>Shapero and Badgeley(2021)</label><?label ShaperoBadgeley2021?><mixed-citation>Shapero, D. and Badgeley, J.: icepack/icepack-paper: Code and data for icepack paper [code and data set], Zenodo, <ext-link xlink:href="https://doi.org/10.5281/zenodo.5063264" ext-link-type="DOI">10.5281/zenodo.5063264</ext-link>, last access: 11 June 2021.
</mixed-citation></ref><?xmltex \hack{\newpage}?>
      <ref id="bib1.bibx82"><?xmltex \def\ref@label{{Shapero et al.(2020)}}?><label>Shapero et al.(2020)</label><?label ShaperoZenodo?><mixed-citation>Shapero, D., Badgeley, J., and Hoffman, A.: icepack: glacier flow modeling with the finite element method in Python (Version v1.0.0), Zenodo, <ext-link xlink:href="https://doi.org/10.5281/zenodo.4318150" ext-link-type="DOI">10.5281/zenodo.4318150</ext-link>, 2020.</mixed-citation></ref>
      <ref id="bib1.bibx83"><?xmltex \def\ref@label{Shapero et al.(2021)}?><label>Shapero et al.(2021)</label><?label Shaperoetal2021?><mixed-citation>Shapero, D., Hoffman, A., and Lilien, D.: icepack/glacier-meshes: Digitized glacier outlines [data set], Zenodo, <ext-link xlink:href="https://doi.org/10.5281/zenodo.5063248" ext-link-type="DOI">10.5281/zenodo.5063248</ext-link>,
last access: 28 May 2021.</mixed-citation></ref>
      <ref id="bib1.bibx84"><?xmltex \def\ref@label{{Shu and Osher(1988)}}?><label>Shu and Osher(1988)</label><?label shu1988efficient?><mixed-citation>
Shu, C.-W. and Osher, S.: Efficient implementation of essentially
non-oscillatory shock-capturing schemes, J. Comput. Phys.,
77, 439–471, 1988.</mixed-citation></ref>
      <ref id="bib1.bibx85"><?xmltex \def\ref@label{{Szab{\'{o}} et~al.(2004)Szab{\'{o}}, D{\"{u}}ster, and Rank}}?><label>Szabó et al.(2004)Szabó, Düster, and Rank</label><?label szabo2004p?><mixed-citation>Szabó, B., Düster, A., and Rank, E.: The p-version of the finite
element method, in: Encyclopedia of Computational Mechanics, edited by: Stein, E., Borst, R., and Hughes, T. J. R., <ext-link xlink:href="https://doi.org/10.1002/0470091355.ecm003g" ext-link-type="DOI">10.1002/0470091355.ecm003g</ext-link>, 2004.</mixed-citation></ref>
      <ref id="bib1.bibx86"><?xmltex \def\ref@label{{Tezaur et~al.(2015)}}?><label>Tezaur et al.(2015)</label><?label tezaur2015albany?><mixed-citation>Tezaur, I. K., Perego, M., Salinger, A. G., Tuminaro, R. S., and Price, S. F.: Albany/FELIX: a parallel, scalable and robust, finite element, first-order Stokes approximation ice sheet solver built for advanced analysis, Geosci. Model Dev., 8, 1197–1220, <ext-link xlink:href="https://doi.org/10.5194/gmd-8-1197-2015" ext-link-type="DOI">10.5194/gmd-8-1197-2015</ext-link>, 2015.</mixed-citation></ref>
      <ref id="bib1.bibx87"><?xmltex \def\ref@label{{Van~der Veen(2013)}}?><label>Van der Veen(2013)</label><?label van2013fundamentals?><mixed-citation>
Van der Veen, C. J.: Fundamentals of glacier dynamics, CRC press, 2013.</mixed-citation></ref>
      <ref id="bib1.bibx88"><?xmltex \def\ref@label{{Vieli et~al.(2007)}}?><label>Vieli et al.(2007)</label><?label vieli2007causes?><mixed-citation>
Vieli, A., Payne, A. J., Shepherd, A., and Du, Z.: Causes of pre-collapse
changes of the Larsen B ice shelf: Numerical modelling and assimilation of
satellite observations, Earth Planet. Sc. Lett., 259, 297–306,
2007.</mixed-citation></ref>
      <ref id="bib1.bibx89"><?xmltex \def\ref@label{{Weertman(1957)}}?><label>Weertman(1957)</label><?label weertman1957sliding?><mixed-citation>
Weertman, J.: On the sliding of glaciers, J. Glaciol., 3, 33–38,
1957.</mixed-citation></ref>
      <ref id="bib1.bibx90"><?xmltex \def\ref@label{{Werder et~al.(2013)}}?><label>Werder et al.(2013)</label><?label werder2013modeling?><mixed-citation>
Werder, M. A., Hewitt, I. J., Schoof, C. G., and Flowers, G. E.: Modeling
channelized and distributed subglacial drainage in two dimensions, J.
Geophys. Res.-Earth Surf., 118, 2140–2158, 2013.</mixed-citation></ref>
      <ref id="bib1.bibx91"><?xmltex \def\ref@label{{Zoet and Iverson(2020)}}?><label>Zoet and Iverson(2020)</label><?label zoet2020slip?><mixed-citation>
Zoet, L. K. and Iverson, N. R.: A slip law for glaciers on deformable beds,
Science, 368, 76–78, 2020.</mixed-citation></ref>

  </ref-list></back>
    <!--<article-title-html>icepack: a new glacier flow modeling package in Python, version 1.0</article-title-html>
<abstract-html><p>We introduce a new software package called <q>icepack</q> for modeling the flow of glaciers and ice sheets.
The icepack package is built on the finite element modeling library Firedrake, which uses the Unified Form Language (UFL), a domain-specific language embedded into Python for describing weak forms of partial differential equations.
The diagnostic models in icepack are formulated through action principles that are specified in UFL.
The components of each action functional can be substituted for different forms of the user's choosing, which makes it easy to experiment with the model physics.
The action functional itself can be used to define a solver convergence criterion that is independent of the mesh and requires little tuning on the part of the user. The
icepack package includes the 2D shallow ice and shallow stream models.
We have also defined a 3D hybrid model based on spectral semi-discretization of the Blatter–Pattyn equations.
Finally, icepack includes a Gauss–Newton solver for inverse problems that runs substantially faster than the Broyden–Fletcher–Goldfarb–Shanno (BFGS) method often used in the glaciological literature.
The overall design philosophy of icepack is to be as usable as possible for a wide a swath of the glaciological community, including both experts and novices in computational science.</p></abstract-html>
<ref-html id="bib1.bib1"><label>Albrecht and Levermann(2014)</label><mixed-citation>
Albrecht, T. and Levermann, A.: Fracture-induced softening for large-scale ice dynamics, The Cryosphere, 8, 587–605, <a href="https://doi.org/10.5194/tc-8-587-2014" target="_blank">https://doi.org/10.5194/tc-8-587-2014</a>, 2014.
</mixed-citation></ref-html>
<ref-html id="bib1.bib2"><label>Alnæs et al.(2014)</label><mixed-citation>
Alnæs, M. S., Logg, A., Ølgaard, K. B., Rognes, M. E., and Wells, G. N.: Unified form language: A domain-specific language for weak formulations of partial differential equations, ACM T. Math. Software, 40, 1–37, 2014.
</mixed-citation></ref-html>
<ref-html id="bib1.bib3"><label>Asay-Davis et al.(2016)</label><mixed-citation>
Asay-Davis, X. S., Cornford, S. L., Durand, G., Galton-Fenzi, B. K., Gladstone, R. M., Gudmundsson, G. H., Hattermann, T., Holland, D. M., Holland, D., Holland, P. R., Martin, D. F., Mathiot, P., Pattyn, F., and Seroussi, H.: Experimental design for three interrelated marine ice sheet and ocean model intercomparison projects: MISMIP v. 3 (MISMIP +), ISOMIP v. 2 (ISOMIP +) and MISOMIP v. 1 (MISOMIP1), Geosci. Model Dev., 9, 2471–2497, <a href="https://doi.org/10.5194/gmd-9-2471-2016" target="_blank">https://doi.org/10.5194/gmd-9-2471-2016</a>, 2016.
</mixed-citation></ref-html>
<ref-html id="bib1.bib4"><label>Ascher and Petzold(1998)</label><mixed-citation>
Ascher, U. M. and Petzold, L. R.: Computer methods for ordinary differential
equations and differential-algebraic equations, Society for Industrial and Applied Mathematics, 314 pp., 1998.
</mixed-citation></ref-html>
<ref-html id="bib1.bib5"><label>Aschwanden et al.(2012)</label><mixed-citation>
Aschwanden, A., Bueler, E., Khroulev, C., and Blatter, H.: An enthalpy
formulation for glaciers and ice sheets, J. Glaciol., 58, 441–457,
2012.
</mixed-citation></ref-html>
<ref-html id="bib1.bib6"><label>Balay et al.(2019)</label><mixed-citation>
Balay, S., Abhyankar, S., Adams, M., Brown, J., Brune, P., Buschelman, K.,
Dalcin, L., Dener, A., Eijkhout, V., Gropp, W., Karpeyev, D., Kaushik, D., Knepley, M., May, D., Curfman McInnes, L., Mills, R., Munson, T., Rupp, K., Sanan, P., Smith, B., Zampini, S., Zhang, H., and Zhang, H.: PETSc users manual, U.S. Department of Energy, 2019.
</mixed-citation></ref-html>
<ref-html id="bib1.bib7"><label>Bangerth et al.(2007)</label><mixed-citation>
Bangerth, W., Hartmann, R., and Kanschat, G.: deal.II — a general-purpose
object-oriented finite element library, ACM T. Math. Software, 33, 24–es, <a href="https://doi.org/10.1145/1268776.1268779" target="_blank">https://doi.org/10.1145/1268776.1268779</a>, 2007.
</mixed-citation></ref-html>
<ref-html id="bib1.bib8"><label>Banwell et al.(2013)</label><mixed-citation>
Banwell, A. F., MacAyeal, D. R., and Sergienko, O. V.: Breakup of the Larsen B Ice Shelf triggered by chain reaction drainage of supraglacial lakes,
Geophys. Res. Lett., 40, 5872–5876, 2013.
</mixed-citation></ref-html>
<ref-html id="bib1.bib9"><label>Barron(2019)</label><mixed-citation>
Barron, J. T.: A general and adaptive robust loss function, in: 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), IEEE, Long Beach, CA, USA, 15–20 June 2019, 4326–4334, 2019.
</mixed-citation></ref-html>
<ref-html id="bib1.bib10"><label>Bassis(2010)</label><mixed-citation>
Bassis, J. N.: Hamilton-type principles applied to ice-sheet dynamics: new
approximations for large-scale ice-sheet flow, J. Glaciol., 56,
497–513, 2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib11"><label>Bellavia and Berrone(2007)</label><mixed-citation>
Bellavia, S. and Berrone, S.: Globalization strategies for Newton–Krylov
methods for stabilized FEM discretization of Navier–Stokes equations,
J. Comput. Phys., 226, 2317–2340, 2007.
</mixed-citation></ref-html>
<ref-html id="bib1.bib12"><label>Bercea et al.(2016)</label><mixed-citation>
Bercea, G.-T., McRae, A. T., Ham, D. A., Mitchell, L., Rathgeber, F., Nardi,
L., Luporini, F., and Kelly, P. H.: A structure-exploiting numbering
algorithm for finite elements on extruded meshes, and its performance
evaluation in Firedrake, arXiv [preprint], <a href="https://arxiv.org/abs/1604.0593" target="_blank">arXiv:1604.0593</a>, 2016.
</mixed-citation></ref-html>
<ref-html id="bib1.bib13"><label>Blatter(1995)</label><mixed-citation>
Blatter, H.: Velocity and stress fields in grounded glaciers: a simple
algorithm for including deviatoric stress gradients, J. Glaciol.,
41, 333–344, 1995.
</mixed-citation></ref-html>
<ref-html id="bib1.bib14"><label>Boffi et al.(2013)Boffi, Brezzi, and Fortin</label><mixed-citation>
Boffi, D., Brezzi, F., and Fortin, M.: Mixed finite element methods and
applications, vol. 44, Springer, <a href="https://doi.org/10.1007/978-3-642-36519-5" target="_blank">https://doi.org/10.1007/978-3-642-36519-5</a>, 2013.
</mixed-citation></ref-html>
<ref-html id="bib1.bib15"><label>Böðvarsson(1955)</label><mixed-citation>
Böðvarsson, G.: On the flow of ice-sheet and glaciers, Jökull, 5, 1–8, 1955.
</mixed-citation></ref-html>
<ref-html id="bib1.bib16"><label>Brinkerhoff and Johnson(2015)</label><mixed-citation>
Brinkerhoff, D. and Johnson, J.: Dynamics of thermally induced ice streams
simulated with a higher-order flow model, J. Geophys. Res.-Earth Surf., 120, 1743–1770, 2015.
</mixed-citation></ref-html>
<ref-html id="bib1.bib17"><label>Brinkerhoff and Johnson(2013)</label><mixed-citation>
Brinkerhoff, D. J. and Johnson, J. V.: Data assimilation and prognostic whole ice sheet modelling with the variationally derived, higher order, open source, and fully parallel ice sheet model VarGlaS, The Cryosphere, 7, 1161–1184, <a href="https://doi.org/10.5194/tc-7-1161-2013" target="_blank">https://doi.org/10.5194/tc-7-1161-2013</a>, 2013.
</mixed-citation></ref-html>
<ref-html id="bib1.bib18"><label>Budd et al.(1979)</label><mixed-citation>
Budd, W. F., Keage, P. L., and Blundy, N.: Empirical studies of ice sliding,
J. Glaciol., 23, 157–170, 1979.
</mixed-citation></ref-html>
<ref-html id="bib1.bib19"><label>Bueler(2014)</label><mixed-citation>
Bueler, E.: An exact solution for a steady, flowline marine ice sheet, J. Glaciol., 60, 1117–1125, 2014.
</mixed-citation></ref-html>
<ref-html id="bib1.bib20"><label>Bueler(2020)</label><mixed-citation>
Bueler, E.: PETSc for Partial Differential Equations: Numerical Solutions in C and Python, Society for Industrial and Applied Mathematics (SIAM), Philadelphia, PA, 406 pp., <a href="https://doi.org/10.1137/1.9781611976311" target="_blank">https://doi.org/10.1137/1.9781611976311</a>, 2020.
</mixed-citation></ref-html>
<ref-html id="bib1.bib21"><label>Cantwell et al.(2015)</label><mixed-citation>
Cantwell, C. D., Moxey, D., Comerford, A., Bolis, A., Rocco, G., Mengaldo, G., De Grazia, D., Yakovlev, S., Lombard, J.-E., Ekelschot, D., Jordi, B., Xu, H., Mohamied, Y., Eskilsson, C., Nelson, B., Vos, P., Biotto, C., Kirby, R. M., and Sherwin, S. J.: Nektar++:
An open-source spectral/hp element framework, Comput. Phys.
Commun., 192, 205–219, 2015.
</mixed-citation></ref-html>
<ref-html id="bib1.bib22"><label>Cuffey and Paterson(2010)</label><mixed-citation>
Cuffey, K. M. and Paterson, W. S. B.: The physics of glaciers, Academic Press, 704 pp., 2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib23"><label>De Groot and Mazur(2013)</label><mixed-citation>
De Groot, S. R. and Mazur, P.: Non-equilibrium thermodynamics, Dover Publications, New York, 510 pp., 2013.
</mixed-citation></ref-html>
<ref-html id="bib1.bib24"><label>Donea and Huerta(2003)</label><mixed-citation>
Donea, J. and Huerta, A.: Finite element methods for flow problems, John Wiley &amp; Sons, <a href="https://doi.org/10.1002/0470013826" target="_blank">https://doi.org/10.1002/0470013826</a>, 2003.
</mixed-citation></ref-html>
<ref-html id="bib1.bib25"><label>Dukowicz et al.(2010)</label><mixed-citation>
Dukowicz, J. K., Price, S. F., and Lipscomb, W. H.: Consistent approximations
and boundary conditions for ice-sheet dynamics from a principle of least
action, J. Glaciol., 56, 480–496, 2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib26"><label>Fretwell et al.(2013)</label><mixed-citation>
Fretwell, P., Pritchard, H. D., Vaughan, D. G., Bamber, J. L., Barrand, N. E., Bell, R., Bianchi, C., Bingham, R. G., Blankenship, D. D., Casassa, G., Catania, G., Callens, D., Conway, H., Cook, A. J., Corr, H. F. J., Damaske, D., Damm, V., Ferraccioli, F., Forsberg, R., Fujita, S., Gim, Y., Gogineni, P., Griggs, J. A., Hindmarsh, R. C. A., Holmlund, P., Holt, J. W., Jacobel, R. W., Jenkins, A., Jokat, W., Jordan, T., King, E. C., Kohler, J., Krabill, W., Riger-Kusk, M., Langley, K. A., Leitchenkov, G., Leuschen, C., Luyendyk, B. P., Matsuoka, K., Mouginot, J., Nitsche, F. O., Nogi, Y., Nost, O. A., Popov, S. V., Rignot, E., Rippin, D. M., Rivera, A., Roberts, J., Ross, N., Siegert, M. J., Smith, A. M., Steinhage, D., Studinger, M., Sun, B., Tinto, B. K., Welch, B. C., Wilson, D., Young, D. A., Xiangbin, C., and Zirizzotti, A.: Bedmap2: improved ice bed, surface and thickness datasets for Antarctica, The Cryosphere, 7, 375–393, <a href="https://doi.org/10.5194/tc-7-375-2013" target="_blank">https://doi.org/10.5194/tc-7-375-2013</a>, 2013.
</mixed-citation></ref-html>
<ref-html id="bib1.bib27"><label>Gagliardini et al.(2013)</label><mixed-citation>
Gagliardini, O., Zwinger, T., Gillet-Chaulet, F., Durand, G., Favier, L., de Fleurian, B., Greve, R., Malinen, M., Martín, C., Råback, P., Ruokolainen, J., Sacchettini, M., Schäfer, M., Seddik, H., and Thies, J.: Capabilities and performance of Elmer/Ice, a new-generation ice sheet model, Geosci. Model Dev., 6, 1299–1318, <a href="https://doi.org/10.5194/gmd-6-1299-2013" target="_blank">https://doi.org/10.5194/gmd-6-1299-2013</a>, 2013.
</mixed-citation></ref-html>
<ref-html id="bib1.bib28"><label>Gillet-Chaulet et al.(2006)</label><mixed-citation>
Gillet-Chaulet, F., Gagliardini, O., Meyssonnier, J., Zwinger, T., and
Ruokolainen, J.: Flow-induced anisotropy in polar ice and related ice-sheet
flow modelling, J. Non-Newton. Fluid, 134, 33–43, 2006.
</mixed-citation></ref-html>
<ref-html id="bib1.bib29"><label>Green and Petre(1996)</label><mixed-citation>
Green, T. R. G. and Petre, M.: Usability analysis of visual programming
environments: a “cognitive dimensions” framework, J. Visual
Lang. Comput., 7, 131–174, 1996.
</mixed-citation></ref-html>
<ref-html id="bib1.bib30"><label>Greve and Blatter(2009)</label><mixed-citation>
Greve, R. and Blatter, H.: Dynamics of ice sheets and glaciers, Springer
Science &amp; Business Media, 2009.
</mixed-citation></ref-html>
<ref-html id="bib1.bib31"><label>Habermann et al.(2012)</label><mixed-citation>
Habermann, M., Maxwell, D., and Truffer, M.: Reconstruction of basal properties in ice sheets using iterative inverse methods, J. Glaciol., 58, 795–808, 2012.
</mixed-citation></ref-html>
<ref-html id="bib1.bib32"><label>Hannay et al.(2009)</label><mixed-citation>
Hannay, J. E., MacLeod, C., Singer, J., Langtangen, H. P., Pfahl, D., and
Wilson, G.: How do scientists develop and use scientific software?, in: 2009
ICSE Workshop on Software Engineering for Computational Science and
Engineering, IEEE, Vancouver, BC, Canada, 23–23 May 2009, <a href="https://doi.org/10.1109/SECSE.2009.5069155" target="_blank">https://doi.org/10.1109/SECSE.2009.5069155</a>, 2009.
</mixed-citation></ref-html>
<ref-html id="bib1.bib33"><label>Haran et al.(2014)</label><mixed-citation>
Haran, T., Bohlander, J., Scambos, T., Painter, T., and Fahnestock, M.: MODIS
Mosaic of Antarctica 2008–2009 (MOA2009) image map, Boulder, Colorado USA,
National Snow and Ice Data Center, <a href="https://doi.org/10.7265/N5KP8037" target="_blank">https://doi.org/10.7265/N5KP8037</a>, 2014.
</mixed-citation></ref-html>
<ref-html id="bib1.bib34"><label>Harris et al.(2020)</label><mixed-citation>
Harris, C. R., Millman, K. J., van der Walt, S. J., Gommers, R., Virtanen, P., Cournapeau, D., Wieser, E., Taylor, J., Berg, S., Smith, N. J., Kern, R., Picus, M., Hoyer, S., van Kerkwijk, M.H., Brett, M., Haldane, A., Fernández del Río, J., Wiebe, M., Peterson, P., Gérard-Marchant, P., Sheppard, K., Reddy, T., Weckesser, W., Abbasi, H., Gohlke, C., and Oliphant, T. E.: Array programming with NumPy, Nature, 585, 357–362, 2020.
</mixed-citation></ref-html>
<ref-html id="bib1.bib35"><label>Holland et al.(2009)</label><mixed-citation>
Holland, P. R., Corr, H. F., Vaughan, D. G., Jenkins, A., and Skvarca, P.:
Marine ice in Larsen ice shelf, Geophys. Res. Lett., 36, L11604, <a href="https://doi.org/10.1029/2009GL038162" target="_blank">https://doi.org/10.1029/2009GL038162</a>, 2009.
</mixed-citation></ref-html>
<ref-html id="bib1.bib36"><label>Hück et al.(2018)</label><mixed-citation>
Hück, A., Bischof, C., Sagebaum, M., Gauger, N. R., Jurgelucks, B., Larour, E., and Perez, G.: A usability case study of algorithmic differentiation tools on the ISSM ice sheet model, Optim. Method. Softw., 33, 844–867, 2018.
</mixed-citation></ref-html>
<ref-html id="bib1.bib37"><label>Hutter(1981)</label><mixed-citation>
Hutter, K.: The effect of longitudinal strain on the shear stress of an ice
sheet: in defence of using stretched coordinates, J. Glaciol., 27,
39–56, 1981.
</mixed-citation></ref-html>
<ref-html id="bib1.bib38"><label>Huybrechts(2002)</label><mixed-citation>
Huybrechts, P.: Sea-level changes at the LGM from ice-dynamic reconstructions
of the Greenland and Antarctic ice sheets during the glacial cycles,
Quatern. Sci. Rev., 21, 203–231, 2002.
</mixed-citation></ref-html>
<ref-html id="bib1.bib39"><label>Joughin et al.(2004)</label><mixed-citation>
Joughin, I., MacAyeal, D. R., and Tulaczyk, S.: Basal shear stress of the Ross ice streams from control method inversions, J. Geophys. Res.-Sol. Ea., 109, B09405, <a href="https://doi.org/10.1029/2003JB002960" target="_blank">https://doi.org/10.1029/2003JB002960</a>, 2004.
</mixed-citation></ref-html>
<ref-html id="bib1.bib40"><label>Joughin et al.(2009)</label><mixed-citation>
Joughin, I., Tulaczyk, S., Bamber, J. L., Blankenship, D., Holt, J. W.,
Scambos, T., and Vaughan, D. G.: Basal conditions for Pine Island and
Thwaites Glaciers, West Antarctica, determined using satellite and airborne
data, J. Glaciol., 55, 245–257, 2009.
</mixed-citation></ref-html>
<ref-html id="bib1.bib41"><label>Joughin et al.(2014)</label><mixed-citation>
Joughin, I., Smith, B. E., and Medley, B.: Marine ice sheet collapse
potentially under way for the Thwaites Glacier Basin, West Antarctica,
Science, 344, 735–738, 2014.
</mixed-citation></ref-html>
<ref-html id="bib1.bib42"><label>Joughin et al.(2019)</label><mixed-citation>
Joughin, I., Smith, B. E., and Schoof, C. G.: Regularized Coulomb friction laws for ice sheet sliding: application to Pine Island Glacier, Antarctica,
Geophys. Res. Lett., 46, 4764–4771, 2019.
</mixed-citation></ref-html>
<ref-html id="bib1.bib43"><label>Jouvet(2015)</label><mixed-citation>
Jouvet, G.: Multilayer shallow shelf approximation: Minimisation formulation,
finite element solvers and applications, J. Comput. Phys.,
287, 60–76, 2015.
</mixed-citation></ref-html>
<ref-html id="bib1.bib44"><label>Jouvet and Bueler(2012)</label><mixed-citation>
Jouvet, G. and Bueler, E.: Steady, shallow ice sheets as obstacle problems:
well-posedness and finite element approximation, SIAM J. Appl.
Math., 72, 1292–1314, 2012.
</mixed-citation></ref-html>
<ref-html id="bib1.bib45"><label>Kessler et al.(2008)</label><mixed-citation>
Kessler, M. A., Anderson, R. S., and Briner, J. P.: Fjord insertion into
continental margins driven by topographic steering of ice, Nature Geoscience,
1, 365–369, 2008.
</mixed-citation></ref-html>
<ref-html id="bib1.bib46"><label>Khazendar et al.(2011)</label><mixed-citation>
Khazendar, A., Rignot, E., and Larour, E.: Acceleration and spatial rheology of Larsen C ice shelf, Antarctic Peninsula, Geophys. Res. Lett., 38, L09502, <a href="https://doi.org/10.1029/2011GL046775" target="_blank">https://doi.org/10.1029/2011GL046775</a>, 2011.
</mixed-citation></ref-html>
<ref-html id="bib1.bib47"><label>Kirby and Logg(2006)</label><mixed-citation>
Kirby, R. C. and Logg, A.: A compiler for variational forms, ACM T. Math. Software, 32, 417–444, 2006.
</mixed-citation></ref-html>
<ref-html id="bib1.bib48"><label>Kirby and Mitchell(2018)</label><mixed-citation>
Kirby, R. C. and Mitchell, L.: Solver composition across the PDE/linear algebra barrier, SIAM J. Sci. Comput., 40, C76–C98, 2018.
</mixed-citation></ref-html>
<ref-html id="bib1.bib49"><label>Kirchner et al.(2016)</label><mixed-citation>
Kirchner, N., Ahlkrona, J., Gowan, E. J., Lötstedt, P., Lea, J. M.,
Noormets, R., von Sydow, L., Dowdeswell, J. A., and Benham, T.: Shallow ice
approximation, second order shallow ice approximation, and full Stokes
models: A discussion of their roles in palaeo-ice sheet modelling and
development, Quat. Sci. Rev., 147, 136–147, 2016.
</mixed-citation></ref-html>
<ref-html id="bib1.bib50"><label>Kleiner and Humbert(2014)</label><mixed-citation>
Kleiner, T. and Humbert, A.: Numerical simulations of major ice streams in
western Dronning Maud Land, Antarctica, under wet and dry basal conditions,
J. Glaciol., 60, 215–232, 2014.
</mixed-citation></ref-html>
<ref-html id="bib1.bib51"><label>Kluyver et al.(2016)</label><mixed-citation>
Kluyver, T., Ragan-Kelley, B., Pérez, F., Granger, B. E., Bussonnier, M.,
Frederic, J., Kelley, K., Hamrick, J. B., Grout, J., Corlay, S., Ivanov, P., Avila, D., Abdalla, S., Willing, C., and  Jupyter development team:
Jupyter Notebooks-a publishing format for reproducible computational
workflows, in: Positioning and Power in Academic Publishing: Players, Agents and Agendas, IOS Press, 87–90, 2016.
</mixed-citation></ref-html>
<ref-html id="bib1.bib52"><label>Kulessa et al.(2014)</label><mixed-citation>
Kulessa, B., Jansen, D., Luckman, A. J., King, E. C., and Sammonds, P. R.:
Marine ice regulates the future stability of a large Antarctic ice shelf,
Nat. Commun., 5, 3707, <a href="https://doi.org/10.1038/ncomms4707" target="_blank">https://doi.org/10.1038/ncomms4707</a>, 2014.
</mixed-citation></ref-html>
<ref-html id="bib1.bib53"><label>Langdon and Raymond(1978)</label><mixed-citation>
Langdon, J. and Raymond, C. F.: Numerical calculation of adjustment of a
glacier surface to perturbations of ice thickness, Mater. Glyatsiol. Issled.
Khron. Obsuzhdeniya, 32, 233–239, 1978.
</mixed-citation></ref-html>
<ref-html id="bib1.bib54"><label>Larour et al.(2005)</label><mixed-citation>
Larour, E., Rignot, E., Joughin, I., and Aubry, D.: Rheology of the Ronne Ice
Shelf, Antarctica, inferred from satellite radar interferometry data using an
inverse control method, Geophys. Res. Lett., 32, L05503, <a href="https://doi.org/10.1029/2004GL021693" target="_blank">https://doi.org/10.1029/2004GL021693</a>, 2005.
</mixed-citation></ref-html>
<ref-html id="bib1.bib55"><label>Logg et al.(2012)</label><mixed-citation>
Logg, A., Mardal, K.-A., and Wells, G.: Automated solution of differential
equations by the finite element method: The FEniCS book, vol. 84, Springer
Science &amp; Business Media, 2012.
</mixed-citation></ref-html>
<ref-html id="bib1.bib56"><label>MacAyeal(1989)</label><mixed-citation>
MacAyeal, D. R.: Large-scale ice flow over a viscous basal sediment: Theory
and application to ice stream B, Antarctica, J. Geophys.
Res.-Sol. Ea., 94, 4071–4087, 1989.
</mixed-citation></ref-html>
<ref-html id="bib1.bib57"><label>MacAyeal(1992)</label><mixed-citation>
MacAyeal, D. R.: The basal stress distribution of Ice Stream E, Antarctica,
inferred by control methods, JJ. Geophys.
Res.-Sol. Ea., 97, 595–603, 1992.
</mixed-citation></ref-html>
<ref-html id="bib1.bib58"><label>MacAyeal et al.(1995)</label><mixed-citation>
MacAyeal, D. R., Bindschadler, R. A., and Scambos, T. A.: Basal friction of ice stream E, West Antarctica, J. Glaciol., 41, 247–262, 1995.
</mixed-citation></ref-html>
<ref-html id="bib1.bib59"><label>McRae et al.(2016)</label><mixed-citation>
McRae, A. T., Bercea, G.-T., Mitchell, L., Ham, D. A., and Cotter, C. J.:
Automated generation and symbolic manipulation of tensor product finite
elements, SIAM J. Sci. Comput., 38, S25–S47, 2016.
</mixed-citation></ref-html>
<ref-html id="bib1.bib60"><label>Meurer et al.(2017)</label><mixed-citation>
Meurer, A., Smith, C. P., Paprocki, M., Čertík, O., Kirpichev, S. B.,
Rocklin, M., Kumar, A., Ivanov, S., Moore, J. K., Singh, S., Rathnayake, T.,
Vig, S., Granger, B. E., Muller, R. P., Bonazzi, F., Gupta, H., Vats, S.,
Johansson, F., Pedregosa, F., Curry, M. J., Terrel, A. R., Roučka, v.,
Saboo, A., Fernando, I., Kulal, S., Cimrman, R., and Scopatz, A.: SymPy:
symbolic computing in Python, PeerJ Comput. Sci., 3, e103,
<a href="https://doi.org/10.7717/peerj-cs.103" target="_blank">https://doi.org/10.7717/peerj-cs.103</a>, 2017.
</mixed-citation></ref-html>
<ref-html id="bib1.bib61"><label>Mitusch et al.(2019)Mitusch, Funke, and Dokken</label><mixed-citation>
Mitusch, S. K., Funke, S. W., and Dokken, J. S.: dolfin-adjoint 2018.1:
automated adjoints for FEniCS and Firedrake, J. Open Source Softw.,
4, 1292, 2019.
</mixed-citation></ref-html>
<ref-html id="bib1.bib62"><label>Morlighem(2020)</label><mixed-citation>
Morlighem, M.: MEaSUREs BedMachine Antarctica, Version 2 [data set], Boulder, Colorado USA, NASA National Snow and Ice Data Center Distributed Active Archive Center, <a href="https://doi.org/10.5067/E1QL9HFQ7A8M" target="_blank">https://doi.org/10.5067/E1QL9HFQ7A8M</a>, 2020.
</mixed-citation></ref-html>
<ref-html id="bib1.bib63"><label>Morlighem et al.(2010)</label><mixed-citation>
Morlighem, M., Rignot, E., Seroussi, H., Larour, E., Ben Dhia, H., and Aubry,
D.: Spatial patterns of basal drag inferred using control methods from a
full-Stokes and simpler models for Pine Island Glacier, West Antarctica,
Geophys. Res. Lett., 37, L14502, <a href="https://doi.org/10.1029/2010GL043853" target="_blank">https://doi.org/10.1029/2010GL043853</a>, 2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib64"><label>Morlighem et al.(2019)</label><mixed-citation>
Morlighem, M., Rignot, E., Binder, T., Blankenship, D., Drews, R., Eagles, G., Eisen, O., Ferraccioli, F., Forsberg, R., Fretwell, P., Goel, V., Greenbaum, J. S., Gudmundsson, G. H., Guo, J., Helm, V., Hofstede, C., Howat, I., Humbert, A., Jokat, W., Karlsson, N. B., Lee, W. S., Matsuoka, K., Millan, R., Mouginot, J., Paden, J., Pattyn, F., Roberts, J., Rosier, S., Ruppel, A., Seroussi, H., Smith, E. C., Steinhage, D., Sun, B., van den Broeke, M. R., van Ommen, T. D., van Wessem, M., and Young, D. A.: Deep glacial
troughs and stabilizing ridges unveiled beneath the margins of the Antarctic
ice sheet, Nat. Geosci., 13, 132–137, 2019.
</mixed-citation></ref-html>
<ref-html id="bib1.bib65"><label>Mouginot et al.(2019)</label><mixed-citation>
Mouginot, J., Rignot, E., and Scheuchl, B.: MEaSUREs Phase-Based Antarctica Ice Velocity Map, Version 1 [data set], Boulder, Colorado USA, NASA National Snow and Ice Data Center Distributed Active Archive Center, <a href="https://doi.org/10.5067/PZ3NJ5RXRH10" target="_blank">https://doi.org/10.5067/PZ3NJ5RXRH10</a>, 2019.
</mixed-citation></ref-html>
<ref-html id="bib1.bib66"><label>Mouginot et al.(2019)</label><mixed-citation>
Mouginot, J., Rignot, E., and Scheuchl, B.: Continent-wide, interferometric SAR phase, mapping of Antarctic ice velocity, Geophys. Res. Lett., 46,
9710–9718, 2019.
</mixed-citation></ref-html>
<ref-html id="bib1.bib67"><label>Nick et al.(2010)</label><mixed-citation>
Nick, F. M., Van der Veen, C. J., Vieli, A., and Benn, D. I.: A physically
based calving model applied to marine outlet glaciers and implications for
the glacier dynamics, J. Glaciol., 56, 781–794, 2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib68"><label>Nitsche(1971)</label><mixed-citation>
Nitsche, J.: Über ein Variationsprinzip zur Lösung von
Dirichlet-Problemen bei Verwendung von Teilräumen, die keinen
Randbedingungen unterworfen sind, in: Abhandlungen aus dem mathematischen
Seminar der Universität Hamburg, Springer, 36, 9–15, 1971.
</mixed-citation></ref-html>
<ref-html id="bib1.bib69"><label>Nocedal and Wright(2006)</label><mixed-citation>
Nocedal, J. and Wright, S.: Numerical optimization, Springer Science &amp;
Business Media, 2006.
</mixed-citation></ref-html>
<ref-html id="bib1.bib70"><label>Pattyn(2003)</label><mixed-citation>
Pattyn, F.: A new three-dimensional higher-order thermomechanical ice sheet
model: Basic sensitivity, ice stream development, and ice flow across
subglacial lakes, J. Geophys. Res.-Sol. Ea., 108, 2382, <a href="https://doi.org/10.1029/2002JB002329" target="_blank">https://doi.org/10.1029/2002JB002329</a>, 2003.
</mixed-citation></ref-html>
<ref-html id="bib1.bib71"><label>Pattyn et al.(2013)</label><mixed-citation>
Pattyn, F., Perichon, L., Durand, G., Favier, L., Gagliardini, O., Hindmarsh,
R. C., Zwinger, T., Albrecht, T., Cornford, S., Docquier, D., Fürst, J. J., Goldberg, D., Hilmar Gudmundsson, G., Humbert, A., Hütten, M., Huybrechts, P., Jouvet, G., Kleiner, T., Larour, E., Martin, D., Morlighem, M., Payne, A. J., Pollard, D., Rückamp, M., Rybak, O., Seroussi, H., Thoma, M., and Wilkens, N.:
Grounding-line migration in plan-view marine ice-sheet models: results of the
ice2sea MISMIP3d intercomparison, J. Glaciol., 59, 410–422, 2013.
</mixed-citation></ref-html>
<ref-html id="bib1.bib72"><label>Perego et al.(2012)</label><mixed-citation>
Perego, M., Gunzburger, M., and Burkardt, J.: Parallel finite-element
implementation for higher-order ice-sheet models, J. Glaciol., 58,
76–88, 2012.
</mixed-citation></ref-html>
<ref-html id="bib1.bib73"><label>Phillips et al.(2010)</label><mixed-citation>
Phillips, T., Rajaram, H., and Steffen, K.: Cryo-hydrologic warming: A
potential mechanism for rapid thermal response of ice sheets, Geophys. Res. Lett., 37, L20503, <a href="https://doi.org/10.1029/2010GL044397" target="_blank">https://doi.org/10.1029/2010GL044397</a>, 2010.
</mixed-citation></ref-html>
<ref-html id="bib1.bib74"><label>Pratt et al.(1998)</label><mixed-citation>
Pratt, R. G., Shin, C., and Hick, G.: Gauss–Newton and full Newton methods in frequency–space seismic waveform inversion, Geophys. J.
Int., 133, 341–362, 1998.
</mixed-citation></ref-html>
<ref-html id="bib1.bib75"><label>Rathgeber et al.(2016)</label><mixed-citation>
Rathgeber, F., Ham, D. A., Mitchell, L., Lange, M., Luporini, F., McRae, A. T., Bercea, G.-T., Markall, G. R., and Kelly, P. H.: Firedrake: automating the finite element method by composing abstractions, ACM T. Math. Software, 43, 1–27, 2016.
</mixed-citation></ref-html>
<ref-html id="bib1.bib76"><label>Roache(2002)</label><mixed-citation>
Roache, P. J.: Code verification by the method of manufactured solutions, J.
Fluids Eng., 124, 4–10, 2002.
</mixed-citation></ref-html>
<ref-html id="bib1.bib77"><label>Scambos et al.(2007)</label><mixed-citation>
Scambos, T. A., Haran, T. M., Fahnestock, M., Painter, T., and Bohlander, J.:
MODIS-based Mosaic of Antarctica (MOA) data sets: Continent-wide surface
morphology and snow grain size, Remote Sens. Environ., 111, 242–257,
2007.
</mixed-citation></ref-html>
<ref-html id="bib1.bib78"><label>Schoof(2005)</label><mixed-citation>
Schoof, C.: The effect of cavitation on glacier sliding, P. Roy. Soc. A-Math. Phy., 461,
609–627, 2005.
</mixed-citation></ref-html>
<ref-html id="bib1.bib79"><label>Schoof and Hewitt(2013)</label><mixed-citation>
Schoof, C. and Hewitt, I.: Ice-sheet dynamics, Annu. Rev. Fluid
Mech., 45, 217–239, 2013.
</mixed-citation></ref-html>
<ref-html id="bib1.bib80"><label>Shapero et al.(2016)</label><mixed-citation>
Shapero, D. R., Joughin, I. R., Poinar, K., Morlighem, M., and Gillet-Chaulet,
F.: Basal resistance for three of the largest Greenland outlet glaciers,
J. Geophys. Res.-Earth Surf., 121, 168–180, 2016.
</mixed-citation></ref-html>
<ref-html id="bib1.bib81"><label>Shapero and Badgeley(2021)</label><mixed-citation>
Shapero, D. and Badgeley, J.: icepack/icepack-paper: Code and data for icepack paper [code and data set], Zenodo, <a href="https://doi.org/10.5281/zenodo.5063264" target="_blank">https://doi.org/10.5281/zenodo.5063264</a>, last access: 11 June 2021.

</mixed-citation></ref-html>
<ref-html id="bib1.bib82"><label>Shapero et al.(2020)</label><mixed-citation>
Shapero, D., Badgeley, J., and Hoffman, A.: icepack: glacier flow modeling with the finite element method in Python (Version v1.0.0), Zenodo, <a href="https://doi.org/10.5281/zenodo.4318150" target="_blank">https://doi.org/10.5281/zenodo.4318150</a>, 2020.
</mixed-citation></ref-html>
<ref-html id="bib1.bib83"><label>Shapero et al.(2021)</label><mixed-citation>
Shapero, D., Hoffman, A., and Lilien, D.: icepack/glacier-meshes: Digitized glacier outlines [data set], Zenodo, <a href="https://doi.org/10.5281/zenodo.5063248" target="_blank">https://doi.org/10.5281/zenodo.5063248</a>,
last access: 28 May 2021.
</mixed-citation></ref-html>
<ref-html id="bib1.bib84"><label>Shu and Osher(1988)</label><mixed-citation>
Shu, C.-W. and Osher, S.: Efficient implementation of essentially
non-oscillatory shock-capturing schemes, J. Comput. Phys.,
77, 439–471, 1988.
</mixed-citation></ref-html>
<ref-html id="bib1.bib85"><label>Szabó et al.(2004)Szabó, Düster, and Rank</label><mixed-citation>
Szabó, B., Düster, A., and Rank, E.: The p-version of the finite
element method, in: Encyclopedia of Computational Mechanics, edited by: Stein, E., Borst, R., and Hughes, T. J. R., <a href="https://doi.org/10.1002/0470091355.ecm003g" target="_blank">https://doi.org/10.1002/0470091355.ecm003g</a>, 2004.
</mixed-citation></ref-html>
<ref-html id="bib1.bib86"><label>Tezaur et al.(2015)</label><mixed-citation>
Tezaur, I. K., Perego, M., Salinger, A. G., Tuminaro, R. S., and Price, S. F.: Albany/FELIX: a parallel, scalable and robust, finite element, first-order Stokes approximation ice sheet solver built for advanced analysis, Geosci. Model Dev., 8, 1197–1220, <a href="https://doi.org/10.5194/gmd-8-1197-2015" target="_blank">https://doi.org/10.5194/gmd-8-1197-2015</a>, 2015.
</mixed-citation></ref-html>
<ref-html id="bib1.bib87"><label>Van der Veen(2013)</label><mixed-citation>
Van der Veen, C. J.: Fundamentals of glacier dynamics, CRC press, 2013.
</mixed-citation></ref-html>
<ref-html id="bib1.bib88"><label>Vieli et al.(2007)</label><mixed-citation>
Vieli, A., Payne, A. J., Shepherd, A., and Du, Z.: Causes of pre-collapse
changes of the Larsen B ice shelf: Numerical modelling and assimilation of
satellite observations, Earth Planet. Sc. Lett., 259, 297–306,
2007.
</mixed-citation></ref-html>
<ref-html id="bib1.bib89"><label>Weertman(1957)</label><mixed-citation>
Weertman, J.: On the sliding of glaciers, J. Glaciol., 3, 33–38,
1957.
</mixed-citation></ref-html>
<ref-html id="bib1.bib90"><label>Werder et al.(2013)</label><mixed-citation>
Werder, M. A., Hewitt, I. J., Schoof, C. G., and Flowers, G. E.: Modeling
channelized and distributed subglacial drainage in two dimensions, J.
Geophys. Res.-Earth Surf., 118, 2140–2158, 2013.
</mixed-citation></ref-html>
<ref-html id="bib1.bib91"><label>Zoet and Iverson(2020)</label><mixed-citation>
Zoet, L. K. and Iverson, N. R.: A slip law for glaciers on deformable beds,
Science, 368, 76–78, 2020.
</mixed-citation></ref-html>--></article>
