PISM, A Parallel Ice Sheet Model 2.3.0-79cae578d committed by Constantine Khrulev on 2026-03-22
Loading...
Searching...
No Matches
WeertmanSliding.cc
Go to the documentation of this file.
1/* Copyright (C) 2018, 2021, 2022, 2023, 2025 PISM Authors
2 *
3 * This file is part of PISM.
4 *
5 * PISM is free software; you can redistribute it and/or modify it under the
6 * terms of the GNU General Public License as published by the Free Software
7 * Foundation; either version 3 of the License, or (at your option) any later
8 * version.
9 *
10 * PISM is distributed in the hope that it will be useful, but WITHOUT ANY
11 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13 * details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with PISM; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#include "pism/stressbalance/WeertmanSliding.hh"
21
22#include "pism/rheology/FlowLawFactory.hh"
23#include "pism/geometry/Geometry.hh"
24#include "pism/stressbalance/StressBalance.hh"
25#include "pism/util/Logger.hh"
26
27namespace pism {
28namespace stressbalance {
29
30WeertmanSliding::WeertmanSliding(std::shared_ptr<const Grid> grid)
31 : ShallowStressBalance(grid) {
33 // Use the SIA flow law.
34 m_flow_law = ice_factory.create(m_config->get_string("stress_balance.sia.flow_law"),
35 m_config->get_number("stress_balance.sia.Glen_exponent"));
36}
37
39 m_log->message(2, "* Initializing Weertman-style basal sliding...\n");
40}
41
42
43/*!
44 * Compute sliding velocity using a Weertman-style parameterization from [@ref Tomkin2007],
45 * equation 5.
46 *
47 * @f[ u_s = \frac{2 A_s \beta_c (\rho g H)^{n}}{N - P} \cdot |\nabla h|^{n-1} \cdot \nabla h,
48 * @f]
49 *
50 * where
51 *
52 * - @f$ A_s @f$ is the sliding parameter,
53 * - @f$ \beta_c @f$ is a parameter capturing the effect of the presence of valley walls
54 * (set to 1 in this implementation),
55 * - @f$ \rho @f$ is the ice density,
56 * - @f$ H @f$ is the ice thickness,
57 * - @f$ h @f$ is the ice surface elevation ,
58 * - @f$ n @f$ is the flow law exponent (usually 3),
59 * - @f$ g @f$ is the acceleration due to gravity,
60 * - @f$ N @f$ is the ice overburden pressure,
61 * - @f$ P @f$ is the basal water pressure.
62 *
63 * With these modifications and noting that @f$ N = \rho g H @f$, the formula above
64 * becomes
65 *
66 * @f[ u_s = \frac{2 A_s}{1 - k} \cdot (N |\nabla h|)^{n-1} \cdot \nabla h,
67 * @f]
68 *
69 * where
70 * - @f$ N = \rho g H @f$,
71 * - @f$ P = k N @f$ (we assume that basal water pressure is a given fraction of overburden)
72 *
73 * This parameterization is used for areas of grounded ice where the base of the ice is
74 * temperate.
75 */
76void WeertmanSliding::update(const Inputs &inputs, bool full_update) {
77
78 (void) full_update;
79
80 const array::Scalar &H = inputs.geometry->ice_thickness;
82 const auto &cell_type = inputs.geometry->cell_type;
83 const array::Array3D &enthalpy = *inputs.enthalpy;
84
85 double n = m_flow_law->exponent();
86 double A_s = m_config->get_number("stress_balance.weertman_sliding.A", "Pa-3 s-1 m-2");
87 double k = m_config->get_number("stress_balance.weertman_sliding.k");
88
89 array::AccessScope list{&m_velocity, &H, &h, &enthalpy, &cell_type};
90
91 ParallelSection loop(m_grid->com);
92 try {
93 for (auto p : m_grid->points()) {
94 const int i = p.i(), j = p.j();
95
96 double
97 P_o = m_EC->pressure(H(i, j)),
98 E_base = enthalpy.get_column(i, j)[0];
99
100 if (not m_EC->is_temperate(E_base, P_o) or cell_type.ocean(i, j)) {
101 m_velocity(i, j) = 0.0;
102 continue;
103 }
104
105 // Note: we may need to decide if we should use one-sided FD at ice margins.
106 Vector2d grad_h = {diff_x_p(h, i, j), diff_y_p(h, i, j)};
107
108 // Note: this could be optimized by computing this instead
109 // 2 * A_s / (1 - k) * pow(P * P * (h_x * h_x + h_y * h_y), (n - 1) / 2) * grad_h;
110 // ... but I'm not sure we need to and the current code is cleaner.
111 m_velocity(i, j) = - 2.0 * A_s / (1.0 - k) * pow(P_o * grad_h.magnitude(), n - 1) * grad_h;
112 }
113 } catch (...) {
114 loop.failed();
115 }
116 loop.check();
117
118}
119
120} // end of namespace stressbalance
121} // end of namespace pism
std::shared_ptr< const Config > m_config
configuration database used by this component
Definition Component.hh:160
const std::shared_ptr< const Grid > m_grid
grid used by this component
Definition Component.hh:158
std::shared_ptr< const Logger > m_log
logger (for easy access)
Definition Component.hh:164
array::Scalar2 ice_surface_elevation
Definition Geometry.hh:57
array::CellType2 cell_type
Definition Geometry.hh:55
array::Scalar2 ice_thickness
Definition Geometry.hh:51
void failed()
Indicates a failure of a parallel section.
double magnitude() const
Magnitude.
Definition Vector2d.hh:40
This class represents a 2D vector field (such as ice velocity) at a certain grid point.
Definition Vector2d.hh:29
Makes sure that we call begin_access() and end_access() for all accessed array::Arrays.
Definition Array.hh:66
double * get_column(int i, int j)
Definition Array3D.cc:127
A virtual class collecting methods common to ice and bedrock 3D fields.
Definition Array3D.hh:33
std::shared_ptr< FlowLaw > create(const std::string &type_name, double exponent)
const array::Array3D * enthalpy
std::shared_ptr< rheology::FlowLaw > m_flow_law
std::shared_ptr< EnthalpyConverter > m_EC
Shallow stress balance (such as the SSA).
WeertmanSliding(std::shared_ptr< const Grid > g)
virtual void update(const Inputs &inputs, bool full_update)
#define n
Definition exactTestM.c:37
static const double k
Definition exactTestP.cc:42