PISM, A Parallel Ice Sheet Model  stable v2.1.1 committed by Constantine Khrulev on 2024-12-04 13:36:58 -0900
TemperatureModel.hh
Go to the documentation of this file.
1 /* Copyright (C) 2016, 2017, 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 TEMPERATUREMODEL_H
21 #define TEMPERATUREMODEL_H
22 
23 #include "pism/energy/EnergyModel.hh"
24 
25 namespace pism {
26 namespace energy {
27 
28 class TemperatureModel : public EnergyModel {
29 public:
30  TemperatureModel(std::shared_ptr<const Grid> grid,
31  std::shared_ptr<const stressbalance::StressBalance> stress_balance);
32 
33  const array::Array3D & temperature() const;
34 
35 protected:
36  void restart_impl(const File &input_file, int record);
37 
38  void bootstrap_impl(const File &input_file,
39  const array::Scalar &ice_thickness,
40  const array::Scalar &surface_temperature,
41  const array::Scalar &climatic_mass_balance,
42  const array::Scalar &basal_heat_flux);
43 
45  const array::Scalar &ice_thickness,
46  const array::Scalar &surface_temperature,
47  const array::Scalar &climatic_mass_balance,
48  const array::Scalar &basal_heat_flux);
49 
51  void update_impl(double t, double dt, const Inputs &inputs);
52 
53  void define_model_state_impl(const File &output) const;
54  void write_model_state_impl(const File &output) const;
55 
56  void column_drainage(const double rho, const double c, const double L,
57  const double z, const double dz,
58  double *Texcess, double *bwat) const;
59 
61 };
62 
63 } // end of namespace energy
64 } // end of namespace pism
65 
66 #endif /* TEMPERATUREMODEL_H */
std::shared_ptr< const Grid > grid() const
Definition: Component.cc:105
High-level PISM I/O class.
Definition: File.hh:56
A virtual class collecting methods common to ice and bedrock 3D fields.
Definition: Array3D.hh:33
const array::Scalar & basal_melt_rate() const
Basal melt rate in grounded areas. (It is set to zero elsewhere.)
Definition: EnergyModel.cc:307
virtual void update_impl(double t, double dt, const Inputs &inputs)=0
void write_model_state_impl(const File &output) const
The default (empty implementation).
const array::Array3D & temperature() const
void initialize_impl(const array::Scalar &basal_melt_rate, const array::Scalar &ice_thickness, const array::Scalar &surface_temperature, const array::Scalar &climatic_mass_balance, const array::Scalar &basal_heat_flux)
void define_model_state_impl(const File &output) const
The default (empty implementation).
void restart_impl(const File &input_file, int record)
virtual void update_impl(double t, double dt, const Inputs &inputs)=0
TemperatureModel(std::shared_ptr< const Grid > grid, std::shared_ptr< const stressbalance::StressBalance > stress_balance)
void column_drainage(const double rho, const double c, const double L, const double z, const double dz, double *Texcess, double *bwat) const
void bootstrap_impl(const File &input_file, const array::Scalar &ice_thickness, const array::Scalar &surface_temperature, const array::Scalar &climatic_mass_balance, const array::Scalar &basal_heat_flux)
static const double L
Definition: exactTestL.cc:40
#define rho
Definition: exactTestM.c:35