PISM, A Parallel Ice Sheet Model  stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800
StressBalance_diagnostics.hh
Go to the documentation of this file.
1 // Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2023 Constantine Khroulev
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 #ifndef _PISMSTRESSBALANCE_DIAGNOSTICS_H_
20 #define _PISMSTRESSBALANCE_DIAGNOSTICS_H_
21 
22 #include "pism/stressbalance/StressBalance.hh"
23 #include "pism/util/Diagnostic.hh"
24 
25 namespace pism {
26 namespace stressbalance {
27 
28 //! \brief Computes the vertically-averaged ice velocity.
29 class PSB_velbar : public Diag<StressBalance>
30 {
31 public:
32  PSB_velbar(const StressBalance *m);
33 protected:
34  virtual std::shared_ptr<array::Array> compute_impl() const;
35 };
36 
37 //! \brief Computes velbar_mag, the magnitude of vertically-integrated horizontal
38 //! velocity of ice and masks out ice-free areas.
39 class PSB_velbar_mag : public Diag<StressBalance>
40 {
41 public:
42  PSB_velbar_mag(const StressBalance *m);
43 protected:
44  virtual std::shared_ptr<array::Array> compute_impl() const;
45 };
46 
47 //! \brief Computes uflux and vflux, components of vertically-integrated horizontal
48 //! flux of ice.
49 class PSB_flux : public Diag<StressBalance>
50 {
51 public:
52  PSB_flux(const StressBalance *m);
53 protected:
54  virtual std::shared_ptr<array::Array> compute_impl() const;
55 };
56 
57 //! \brief Computes flux_mag, the magnitude of vertically-integrated horizontal
58 //! flux of ice.
59 class PSB_flux_mag : public Diag<StressBalance>
60 {
61 public:
62  PSB_flux_mag(const StressBalance *m);
63 protected:
64  virtual std::shared_ptr<array::Array> compute_impl() const;
65 };
66 
67 //! \brief Computes velbase_mag, the magnitude of horizontal velocity of ice at base
68 //! of ice and masks out ice-free areas.
69 class PSB_velbase_mag : public Diag<StressBalance>
70 {
71 public:
73 protected:
74  virtual std::shared_ptr<array::Array> compute_impl() const;
75 };
76 
77 //! \brief Computes velsurf_mag, the magnitude of horizontal ice velocity at the
78 //! surface.
79 class PSB_velsurf_mag : public Diag<StressBalance>
80 {
81 public:
83 protected:
84  virtual std::shared_ptr<array::Array> compute_impl() const;
85 };
86 
87 //! \brief Computes velsurf, the horizontal velocity of ice at ice surface.
88 class PSB_velsurf : public Diag<StressBalance>
89 {
90 public:
91  PSB_velsurf(const StressBalance *m);
92 protected:
93  virtual std::shared_ptr<array::Array> compute_impl() const;
94 };
95 
96 //! Computes vertical ice velocity (relative to the geoid).
97 /*!
98  \f[
99  w(s) = \tilde w(s) + \frac{\partial b}{\partial t} + U(s) \cdot \nabla b
100  \f]
101  in grounded areas. In floating shelves
102  \f[
103  w(s) = \tilde w(s) - \tilde w(z_{\text{sea level}}).
104  \f]
105 
106  This ensures that \f$\tilde w(z_{\text{sea level}}) = 0\f$.
107 */
108 class PSB_wvel : public Diag<StressBalance>
109 {
110 public:
111  PSB_wvel(const StressBalance *m);
112  virtual std::shared_ptr<array::Array> compute(bool zero_above_ice) const;
113 protected:
114  virtual std::shared_ptr<array::Array> compute_impl() const;
115 };
116 
117 //! Computes wvelsurf, the vertical velocity of ice at ice surface.
118 class PSB_wvelsurf : public Diag<StressBalance>
119 {
120 public:
121  PSB_wvelsurf(const StressBalance *m);
122 protected:
123  virtual std::shared_ptr<array::Array> compute_impl() const;
124 };
125 
126 //! Computes wvelbase, the vertical velocity of ice at the base of ice.
127 class PSB_wvelbase : public Diag<StressBalance>
128 {
129 public:
130  PSB_wvelbase(const StressBalance *m);
131 protected:
132  virtual std::shared_ptr<array::Array> compute_impl() const;
133 };
134 
135 //! \brief Computes horizontal ice velocity at the base of ice.
136 class PSB_velbase : public Diag<StressBalance>
137 {
138 public:
139  PSB_velbase(const StressBalance *m);
140 protected:
141  virtual std::shared_ptr<array::Array> compute_impl() const;
142 };
143 
144 //! \brief Computes basal frictional heating.
145 class PSB_bfrict : public Diag<StressBalance>
146 {
147 public:
148  PSB_bfrict(const StressBalance *m);
149 protected:
150  virtual std::shared_ptr<array::Array> compute_impl() const;
151 };
152 
153 //! \brief Computes the x-component of the horizontal ice velocity.
154 class PSB_uvel : public Diag<StressBalance>
155 {
156 public:
157  PSB_uvel(const StressBalance *m);
158 protected:
159  virtual std::shared_ptr<array::Array> compute_impl() const;
160 };
161 
162 //! \brief Computes the y-component of the horizontal ice velocity.
163 class PSB_vvel : public Diag<StressBalance>
164 {
165 public:
166  PSB_vvel(const StressBalance *m);
167 protected:
168  virtual std::shared_ptr<array::Array> compute_impl() const;
169 };
170 
171 //! \brief Computes vertical velocity of ice, relative to the bed directly
172 //! below.
173 class PSB_wvel_rel : public Diag<StressBalance>
174 {
175 public:
176  PSB_wvel_rel(const StressBalance *m);
177 protected:
178  virtual std::shared_ptr<array::Array> compute_impl() const;
179 };
180 
181 //! \brief Reports the volumetric strain heating (3D).
182 class PSB_strainheat : public Diag<StressBalance>
183 {
184 public:
185  PSB_strainheat(const StressBalance *m);
186 protected:
187  virtual std::shared_ptr<array::Array> compute_impl() const;
188 };
189 
190 //! \brief Reports the vertically-integrated (2D) principal strain rates.
191 class PSB_strain_rates : public Diag<StressBalance>
192 {
193 public:
195 protected:
196  virtual std::shared_ptr<array::Array> compute_impl() const;
197 };
198 
199 //! \brief Reports the vertically-integrated (2D) deviatoric stresses.
200 class PSB_deviatoric_stresses : public Diag<StressBalance>
201 {
202 public:
204 protected:
205  virtual std::shared_ptr<array::Array> compute_impl() const;
206 };
207 
208 //! \brief Reports the pressure within the ice (3D).
209 class PSB_pressure : public Diag<StressBalance>
210 {
211 public:
212  PSB_pressure(const StressBalance *m);
213 protected:
214  virtual std::shared_ptr<array::Array> compute_impl() const;
215 };
216 
217 //! \brief Reports the xz component of the shear stress within the ice (3D), according to the SIA formula.
218 class PSB_tauxz : public Diag<StressBalance>
219 {
220 public:
221  PSB_tauxz(const StressBalance *m);
222 protected:
223  virtual std::shared_ptr<array::Array> compute_impl() const;
224 };
225 
226 //! \brief Reports the yz component of the shear stress within the ice (3D), according to the SIA formula.
227 class PSB_tauyz : public Diag<StressBalance>
228 {
229 public:
230  PSB_tauyz(const StressBalance *m);
231 protected:
232  virtual std::shared_ptr<array::Array> compute_impl() const;
233 };
234 
235 /*! @brief tensile von Mises stress */
236 class PSB_vonmises_stress : public Diag<StressBalance>
237 {
238 public:
240  std::shared_ptr<array::Array> compute_impl() const;
241 };
242 
243 } // end of namespace stressbalance
244 } // end of namespace pism
245 
246 #endif /* _PISMSTRESSBALANCE_DIAGNOSTICS_H_ */
A template derived from Diagnostic, adding a "Model".
Definition: Diagnostic.hh:166
std::shared_ptr< array::Array > compute() const
Compute a diagnostic quantity and return a pointer to a newly-allocated Array.
Definition: Diagnostic.cc:131
virtual std::shared_ptr< array::Array > compute_impl() const
Computes basal frictional heating.
virtual std::shared_ptr< array::Array > compute_impl() const
Reports the vertically-integrated (2D) deviatoric stresses.
virtual std::shared_ptr< array::Array > compute_impl() const
Computes flux_mag, the magnitude of vertically-integrated horizontal flux of ice.
virtual std::shared_ptr< array::Array > compute_impl() const
Computes uflux and vflux, components of vertically-integrated horizontal flux of ice.
virtual std::shared_ptr< array::Array > compute_impl() const
Reports the pressure within the ice (3D).
virtual std::shared_ptr< array::Array > compute_impl() const
Reports the vertically-integrated (2D) principal strain rates.
virtual std::shared_ptr< array::Array > compute_impl() const
Reports the volumetric strain heating (3D).
virtual std::shared_ptr< array::Array > compute_impl() const
Reports the xz component of the shear stress within the ice (3D), according to the SIA formula.
virtual std::shared_ptr< array::Array > compute_impl() const
Reports the yz component of the shear stress within the ice (3D), according to the SIA formula.
virtual std::shared_ptr< array::Array > compute_impl() const
Computes the x-component of the horizontal ice velocity.
virtual std::shared_ptr< array::Array > compute_impl() const
Computes velbar_mag, the magnitude of vertically-integrated horizontal velocity of ice and masks out ...
virtual std::shared_ptr< array::Array > compute_impl() const
Computes the vertically-averaged ice velocity.
virtual std::shared_ptr< array::Array > compute_impl() const
Computes velbase_mag, the magnitude of horizontal velocity of ice at base of ice and masks out ice-fr...
virtual std::shared_ptr< array::Array > compute_impl() const
Computes horizontal ice velocity at the base of ice.
virtual std::shared_ptr< array::Array > compute_impl() const
Computes velsurf_mag, the magnitude of horizontal ice velocity at the surface.
virtual std::shared_ptr< array::Array > compute_impl() const
Computes velsurf, the horizontal velocity of ice at ice surface.
std::shared_ptr< array::Array > compute_impl() const
virtual std::shared_ptr< array::Array > compute_impl() const
Computes the y-component of the horizontal ice velocity.
virtual std::shared_ptr< array::Array > compute_impl() const
Computes vertical velocity of ice, relative to the bed directly below.
virtual std::shared_ptr< array::Array > compute_impl() const
Computes vertical ice velocity (relative to the geoid).
virtual std::shared_ptr< array::Array > compute_impl() const
Computes wvelbase, the vertical velocity of ice at the base of ice.
virtual std::shared_ptr< array::Array > compute_impl() const
Computes wvelsurf, the vertical velocity of ice at ice surface.
The class defining PISM's interface to the shallow stress balance code.
static void zero_above_ice(const array::Array3D &F, const array::Scalar &H, array::Array3D &result)