PISM, A Parallel Ice Sheet Model  stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800
Hydrology.hh
Go to the documentation of this file.
1 // Copyright (C) 2012-2023 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 #ifndef _PISMHYDROLOGY_H_
20 #define _PISMHYDROLOGY_H_
21 
22 #include "pism/util/array/Vector.hh"
23 #include "pism/util/Component.hh"
24 
25 namespace pism {
26 
27 //! @brief Sub-glacial hydrology models and related diagnostics.
28 namespace hydrology {
29 
30 class Inputs {
31 public:
32  Inputs();
33 
34  // modeling domain (set to NULL in whole-ice-sheet configurations)
36  // geometry
38  // hydrological inputs
42 };
43 
44 //! \brief The PISM subglacial hydrology model interface.
45 /*!
46  This is a virtual base class.
47 
48  The purpose of this class and its derived classes is to provide
49  \code
50  subglacial_water_thickness()
51  subglacial_water_pressure()
52  till_water_thickness()
53  \endcode
54  These correspond to state variables \f$W\f$, \f$P\f$, and \f$W_{\text{till}}\f$
55  in [\ref BuelervanPeltDRAFT], though not all derived classes of Hydrology
56  have all of them as state variables.
57 
58  Additional modeled fields, for diagnostic purposes, are
59  \code
60  overburden_pressure(array::Scalar &result)
61  wall_melt(array::Scalar &result)
62  \endcode
63 
64  This interface is appropriate to subglacial hydrology models which track a
65  two-dimensional water layer with a well-defined thickness and pressure at each
66  map-plane location. The methods subglacial_water_thickness() and
67  subglacial_water_pressure() return amount and pressure of the *transportable*
68  water, that is, the subglacial water which moves along a modeled hydraulic
69  head gradient, in contrast to the water stored in the till.
70 
71  The transportable water moves through a subglacial morphology which is not
72  determined in this base class.
73 
74  The Hydrology models have separate, but potentially-coupled, water
75  which is held in local till storage. Thus the
76  transportable water (bwat) and till water (tillwat) thicknesses are different.
77  Published models with till storage include [\ref BBssasliding, \ref SchoofTill,
78  \ref TrufferEchelmeyerHarrison2001, \ref Tulaczyketal2000b, \ref vanderWeletal2013].
79 
80  The till water thickness is can be used, via the theory of
81  [\ref Tulaczyketal2000], to compute an effective pressure for the water in the
82  pore spaces of the till, which can then be used by the Mohr-Coulomb criterion
83  to provide a yield stress. Class MohrCoulombYieldStress does this
84  calculation. Here in Hydrology only the till water thickness tillwat is
85  computed.
86 
87  Hydrology is a timestepping component. Because of the
88  short physical timescales associated to liquid water moving under a glacier,
89  Hydrology (and derived) classes generally take many substeps in PISM's major
90  ice dynamics time steps. Thus when an update() method in a Hydrology
91  class is called it will advance its internal time to the new goal t+dt
92  using its own internal time steps.
93 
94  Generally Hydrology classes use the ice geometry, the basal melt
95  rate, and the basal sliding velocity in determining the evolution of the
96  hydrology state variables. Note that the basal melt rate is an
97  energy-conservation-derived field and the basal-sliding velocity is derived
98  from the solution of a stress balance. The basal melt rate and
99  sliding velocity fields therefore generally come from IceModel and
100  StressBalance, respectively.
101 
102  Additional, time-dependent and spatially-variable water input to the basal
103  layer, taken directly from a file, is possible too.
104 
105  Ice geometry and energy fields are normally treated as constant in time
106  during the update() call for the interval [t,t+dt]. Thus the coupling is
107  one-way during the update() call.
108 */
109 class Hydrology : public Component {
110 public:
111  Hydrology(std::shared_ptr<const Grid> g);
112  virtual ~Hydrology() = default;
113 
114  void restart(const File &input_file, int record);
115 
116  void bootstrap(const File &input_file,
117  const array::Scalar &ice_thickness);
118 
119  void init(const array::Scalar &W_till,
120  const array::Scalar &W,
121  const array::Scalar &P);
122 
123  void update(double t, double dt, const Inputs& inputs);
124 
125  const array::Scalar& till_water_thickness() const;
127  const array::Scalar& overburden_pressure() const;
128  const array::Scalar& surface_input_rate() const;
129  const array::Vector& flux() const;
130 
131  const array::Scalar& mass_change() const;
138 
139 protected:
140  virtual void restart_impl(const File &input_file, int record);
141 
142  virtual void bootstrap_impl(const File &input_file,
143  const array::Scalar &ice_thickness);
144 
145  virtual void init_impl(const array::Scalar &W_till,
146  const array::Scalar &W,
147  const array::Scalar &P);
148 
149  virtual void update_impl(double t, double dt, const Inputs& inputs) = 0;
150  virtual std::map<std::string, Diagnostic::Ptr> diagnostics_impl() const;
151 
152  virtual void define_model_state_impl(const File &output) const;
153  virtual void write_model_state_impl(const File &output) const;
154 
155  void compute_overburden_pressure(const array::Scalar &ice_thickness,
156  array::Scalar &result) const;
157 
160  array::Scalar &result);
161 
162  void compute_basal_melt_rate(const array::CellType &mask,
163  const array::Scalar &basal_melt_rate,
164  array::Scalar &result);
165 protected:
166  // water flux on the regular grid
168 
169  //! effective thickness of basal water stored in till
171 
172  //! effective thickness of transportable basal water
174 
175  //! overburden pressure
177 
178  // surface input rate
180 
181  // input rate due to basal melt
183 
184  // change due to flow for the current hydrology time step
186 
187  // changes in water thickness
188  //
189  // these quantities are re-set to zero at the beginning of the PISM time step
197 
198  // when we update the water amounts, careful mass accounting at the boundary
199  // is needed
200  void enforce_bounds(const array::CellType &cell_type,
201  const array::Scalar *no_model_mask,
202  double max_thickness,
203  double ocean_water_thickness,
204  array::Scalar &water_thickness,
205  array::Scalar &grounded_margin_change,
206  array::Scalar &grounding_line_change,
207  array::Scalar &conservation_error_change,
208  array::Scalar &no_model_mask_change);
209 private:
210  virtual void initialization_message() const = 0;
211 };
212 
213 void check_bounds(const array::Scalar& W, double W_max);
214 
215 } // end of namespace hydrology
216 } // end of namespace pism
217 
218 #endif /* _PISMHYDROLOGY_H_ */
A class defining a common interface for most PISM sub-models.
Definition: Component.hh:118
High-level PISM I/O class.
Definition: File.hh:56
"Cell type" mask. Adds convenience methods to array::Scalar.
Definition: CellType.hh:30
array::Scalar m_flow_change
Definition: Hydrology.hh:196
const array::Scalar & till_water_thickness() const
Return the effective thickness of the water stored in till.
Definition: Hydrology.cc:501
void restart(const File &input_file, int record)
Definition: Hydrology.cc:355
Hydrology(std::shared_ptr< const Grid > g)
Definition: Hydrology.cc:278
array::Scalar m_flow_change_incremental
Definition: Hydrology.hh:185
virtual void bootstrap_impl(const File &input_file, const array::Scalar &ice_thickness)
Definition: Hydrology.cc:377
array::Scalar m_surface_input_rate
Definition: Hydrology.hh:179
array::Scalar m_total_change
Definition: Hydrology.hh:195
virtual void define_model_state_impl(const File &output) const
The default (empty implementation).
Definition: Hydrology.cc:467
void bootstrap(const File &input_file, const array::Scalar &ice_thickness)
Definition: Hydrology.cc:360
array::Scalar m_grounding_line_change
Definition: Hydrology.hh:192
const array::Scalar & mass_change_at_domain_boundary() const
Definition: Hydrology.cc:534
const array::Scalar & surface_input_rate() const
Definition: Hydrology.cc:518
virtual void initialization_message() const =0
void enforce_bounds(const array::CellType &cell_type, const array::Scalar *no_model_mask, double max_thickness, double ocean_water_thickness, array::Scalar &water_thickness, array::Scalar &grounded_margin_change, array::Scalar &grounding_line_change, array::Scalar &conservation_error_change, array::Scalar &no_model_mask_change)
Correct the new water thickness based on boundary requirements.
Definition: Hydrology.cc:669
const array::Scalar & subglacial_water_thickness() const
Return the effective thickness of the transportable basal water layer.
Definition: Hydrology.cc:506
array::Scalar m_basal_melt_rate
Definition: Hydrology.hh:182
const array::Scalar & mass_change_due_to_lateral_flow() const
Definition: Hydrology.cc:546
virtual void init_impl(const array::Scalar &W_till, const array::Scalar &W, const array::Scalar &P)
Definition: Hydrology.cc:387
const array::Scalar & mass_change_due_to_conservation_error() const
Definition: Hydrology.cc:530
array::Scalar1 m_W
effective thickness of transportable basal water
Definition: Hydrology.hh:173
void compute_overburden_pressure(const array::Scalar &ice_thickness, array::Scalar &result) const
Update the overburden pressure from ice thickness.
Definition: Hydrology.cc:480
const array::Scalar & mass_change_at_grounded_margin() const
Definition: Hydrology.cc:522
virtual void restart_impl(const File &input_file, int record)
Definition: Hydrology.cc:370
array::Scalar m_input_change
Definition: Hydrology.hh:193
void update(double t, double dt, const Inputs &inputs)
Definition: Hydrology.cc:394
array::Scalar m_Wtill
effective thickness of basal water stored in till
Definition: Hydrology.hh:170
const array::Scalar & overburden_pressure() const
Definition: Hydrology.cc:496
virtual void update_impl(double t, double dt, const Inputs &inputs)=0
const array::Scalar & mass_change_due_to_input() const
Definition: Hydrology.cc:542
array::Scalar m_Pover
overburden pressure
Definition: Hydrology.hh:176
virtual std::map< std::string, Diagnostic::Ptr > diagnostics_impl() const
Definition: Hydrology.cc:443
virtual void write_model_state_impl(const File &output) const
The default (empty implementation).
Definition: Hydrology.cc:471
virtual ~Hydrology()=default
const array::Vector & flux() const
Definition: Hydrology.cc:514
void compute_basal_melt_rate(const array::CellType &mask, const array::Scalar &basal_melt_rate, array::Scalar &result)
Definition: Hydrology.cc:627
array::Scalar m_grounded_margin_change
Definition: Hydrology.hh:191
const array::Scalar & mass_change_at_grounding_line() const
Definition: Hydrology.cc:526
array::Scalar m_no_model_mask_change
Definition: Hydrology.hh:194
void compute_surface_input_rate(const array::CellType &mask, const array::Scalar *surface_input_rate, array::Scalar &result)
Definition: Hydrology.cc:593
void init(const array::Scalar &W_till, const array::Scalar &W, const array::Scalar &P)
Definition: Hydrology.cc:365
const array::Scalar & mass_change() const
Definition: Hydrology.cc:538
array::Scalar m_conservation_error_change
Definition: Hydrology.hh:190
The PISM subglacial hydrology model interface.
Definition: Hydrology.hh:109
const Geometry * geometry
Definition: Hydrology.hh:37
const array::Scalar * ice_sliding_speed
Definition: Hydrology.hh:41
const array::Scalar * surface_input_rate
Definition: Hydrology.hh:39
const array::Scalar1 * no_model_mask
Definition: Hydrology.hh:35
const array::Scalar * basal_melt_rate
Definition: Hydrology.hh:40
void check_bounds(const array::Scalar &W, double W_max)
Definition: Hydrology.cc:553
static const double g
Definition: exactTestP.cc:36