PISM, A Parallel Ice Sheet Model  stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800
BTU_Full.hh
Go to the documentation of this file.
1 /* Copyright (C) 2016, 2017, 2019, 2020, 2021, 2022, 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 
20 #ifndef BTU_FULL_H
21 #define BTU_FULL_H
22 
23 #include "pism/energy/BedThermalUnit.hh"
24 #include "pism/util/Context.hh"
25 
26 namespace pism {
27 
28 namespace energy {
29 
30 class BedrockColumn;
31 
32 //! @brief Given the temperature of the top of the bedrock, for the duration of one time-step,
33 //! provides upward geothermal flux at that interface at the end of the time-step.
34 /*!
35  The geothermal flux actually applied to the base of an ice sheet is dependent, over time,
36  on the temperature of the basal ice itself. The purpose of a bedrock thermal layer
37  in an ice sheet model is to implement this dependency by using a physical model
38  for the temperature within that layer, the upper lithosphere. Because the
39  upper part of the lithosphere stores or releases energy into the ice,
40  the typical lithosphere geothermal flux rate is not the same thing as the
41  geothermal flux applied to the base of the ice. This issue has long been
42  recognized by ice sheet modelers [%e.g. \ref RitzFabreLetreguilly].
43 
44  For instance, suppose the ice sheet is in a balanced state in which the geothermal
45  flux deep in the crust is equal to the heat flux into the ice base. If the
46  near-surface ice cools from this state then, because the ice temperature gradient
47  is now greater in magnitude, between the warm bedrock and the cooler ice, the ice
48  will for some period receive more than the deep geothermal flux rate. Similarly,
49  if the ice warms from the balanced state then the temperature difference with
50  the bedrock has become smaller and the magnitude of the ice basal heat flux will
51  be less than the deep geothermal rate.
52 
53  We regard the lithosphere geothermal flux rate, which is applied in this model
54  to the base of the bedrock thermal layer, as a time-independent quantity. This
55  concept is the same as in all published ice sheet models, to our knowledge.
56 
57  Because the relevant layer of bedrock below an ice sheet is typically shallow,
58  modeling the bedrock temperature is quite simple.
59  Let \f$T_b(t,x,y,z)\f$ be the temperature of the bedrock layer, for elevations
60  \f$-L_b \le z \le 0\f$. In this routine, \f$z=0\f$ refers to the top of the
61  bedrock, the ice/bedrock interface. (Note \f$z=0\f$ is the base of the ice in
62  IceModel, and thus a different location if ice is floating.)
63  Let \f$G\f$ be the lithosphere geothermal flux rate, namely the PISM input
64  variable `bheatflx`; see Related Page \ref std_names . Let \f$k_b\f$
65  = `bedrock_thermal_conductivity` in pism_config.cdl) be the constant thermal
66  conductivity of the upper lithosphere. In these terms the actual
67  upward heat flux into the ice/bedrock interface is the quantity,
68  \f[G_0 = -k_b \frac{\partial T_b}{\partial z}.\f]
69  This is the \e output of the method flux_through_top_surface() in this class.
70 
71  The evolution equation solved in this class, for which a timestep is done by the
72  update() method, is the standard 1D heat equation
73  \f[\rho_b c_b \frac{\partial T_b}{\partial t} = k_b \frac{\partial^2 T_b}{\partial z^2}\f]
74  where \f$\rho_b\f$ = `bedrock_thermal_density` and \f$c_b\f$ =
75  `bedrock_thermal_specific_heat_capacity` in pism_config.cdl.
76 
77  If 3 or more levels are used then everything is the general case. The lithospheric temperature in
78  `temp` is saved in files as `litho_temp`. The flux_through_top_surface() method uses second-order
79  differencing to compute the values of \f$G_0\f$.
80 
81  If 2 levels are used then everything is the general case except that flux_through_top_surface()
82  method uses first-order differencing to compute the values of \f$G_0\f$.
83 */
84 class BTU_Full : public BedThermalUnit {
85 public:
86  BTU_Full(std::shared_ptr<const Grid> g, const BTUGrid &vertical_grid);
87  virtual ~BTU_Full() = default;
88 
89  //! Bedrock thermal layer temperature field.
90  const array::Array3D& temperature() const;
91 
92 protected:
93  virtual void bootstrap(const array::Scalar &bedrock_top_temperature);
94 
95  virtual void init_impl(const InputOptions &opts);
96 
97  virtual double vertical_spacing_impl() const;
98  virtual double depth_impl() const;
99  virtual unsigned int Mz_impl() const;
100 
101  virtual MaxTimestep max_timestep_impl(double my_t) const;
102 
104  virtual void update_impl(const array::Scalar &bedrock_top_temperature,
105  double t, double dt);
106 
107  virtual void define_model_state_impl(const File &output) const;
108  virtual void write_model_state_impl(const File &output) const;
109 protected:
110  //! bedrock thermal layer temperature, in degrees Kelvin; part of state; uses equally-spaced
111  //! layers.
112  std::shared_ptr<array::Array3D> m_temp;
113 
114  //! bedrock thermal conductivity
115  double m_k;
116  //! diffusivity of the heat flow within the bedrock layer
117  double m_D;
118 
119  //! number of vertical levels within the bedrock
120  unsigned int m_Mbz;
121  //! thickness of the bedrock layer, in meters
122  double m_Lbz;
123 
124  //! true if the model needs to "bootstrap" the temperature field during the first time step
126 
128 
129  std::shared_ptr<BedrockColumn> m_column;
130 };
131 
132 } // end of namespace energy
133 } // end of namespace pism
134 
135 
136 #endif /* BTU_FULL_H */
High-level PISM I/O class.
Definition: File.hh:56
Combines the max. time step with the flag indicating if a restriction is active. Makes is possible to...
Definition: MaxTimestep.hh:31
A virtual class collecting methods common to ice and bedrock 3D fields.
Definition: Array3D.hh:33
virtual MaxTimestep max_timestep_impl(double my_t) const
Definition: BTU_Full.cc:147
const array::Array3D & temperature() const
Bedrock thermal layer temperature field.
Definition: BTU_Full.cc:243
unsigned int m_Mbz
number of vertical levels within the bedrock
Definition: BTU_Full.hh:120
void update_flux_through_top_surface()
Definition: BTU_Full.cc:210
std::shared_ptr< array::Array3D > m_temp
Definition: BTU_Full.hh:112
virtual unsigned int Mz_impl() const
Definition: BTU_Full.cc:128
double m_Lbz
thickness of the bedrock layer, in meters
Definition: BTU_Full.hh:122
virtual void write_model_state_impl(const File &output) const
The default (empty implementation).
Definition: BTU_Full.cc:142
virtual ~BTU_Full()=default
std::shared_ptr< BedrockColumn > m_column
Definition: BTU_Full.hh:129
bool m_bootstrapping_needed
true if the model needs to "bootstrap" the temperature field during the first time step
Definition: BTU_Full.hh:125
virtual double depth_impl() const
Definition: BTU_Full.cc:133
virtual void define_model_state_impl(const File &output) const
The default (empty implementation).
Definition: BTU_Full.cc:137
virtual double vertical_spacing_impl() const
Definition: BTU_Full.cc:124
virtual void bootstrap(const array::Scalar &bedrock_top_temperature)
Definition: BTU_Full.cc:251
BTU_Full(std::shared_ptr< const Grid > g, const BTUGrid &vertical_grid)
Definition: BTU_Full.cc:32
virtual void update_impl(const array::Scalar &bedrock_top_temperature, double t, double dt)=0
double m_D
diffusivity of the heat flow within the bedrock layer
Definition: BTU_Full.hh:117
virtual void init_impl(const InputOptions &opts)
Initialize the bedrock thermal unit.
Definition: BTU_Full.cc:87
double m_k
bedrock thermal conductivity
Definition: BTU_Full.hh:115
Given the temperature of the top of the bedrock, for the duration of one time-step,...
Definition: BTU_Full.hh:84
virtual void update_impl(const array::Scalar &bedrock_top_temperature, double t, double dt)=0
Given the temperature of the top of the bedrock, for the duration of one time-step,...
static const double g
Definition: exactTestP.cc:36