PISM, A Parallel Ice Sheet Model 2.3.0-79cae578d committed by Constantine Khrulev on 2026-03-22
Loading...
Searching...
No Matches
DummyEnergyModel.cc
Go to the documentation of this file.
1/* Copyright (C) 2016, 2017, 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/energy/EnthalpyModel.hh"
21#include "pism/util/MaxTimestep.hh"
22#include "pism/util/Logger.hh"
23
24namespace pism {
25namespace energy {
26
28 std::shared_ptr<const Grid> grid,
29 std::shared_ptr<const stressbalance::StressBalance> stress_balance)
30 : EnthalpyModel(grid, stress_balance) {
31 // empty
32}
33
34void DummyEnergyModel::restart_impl(const File &input_file, int record) {
35 EnthalpyModel::restart_impl(input_file, record);
36
37 m_log->message(2,
38 "NOTE: this \"energy balance\" model holds enthalpy and basal melt rate constant in time.\n");
39}
40
42 const array::Scalar &ice_thickness,
43 const array::Scalar &surface_temperature,
44 const array::Scalar &climatic_mass_balance,
45 const array::Scalar &basal_heat_flux) {
47 ice_thickness, surface_temperature,
48 climatic_mass_balance, basal_heat_flux);
49 m_log->message(2,
50 "NOTE: this \"energy balance\" model holds enthalpy and basal melt rate constant in time.\n");
51}
52
53void DummyEnergyModel::update_impl(double t, double dt, const Inputs &inputs) {
54 (void) t;
55 (void) dt;
56 (void) inputs;
57}
58
60 // silence a compiler warning
61 (void) t;
62
63 // no time step restriction
64 return MaxTimestep("dummy energy model");
65}
66
67
68} // end of namespace energy
69} // end of namespace pism
std::shared_ptr< const Logger > m_log
logger (for easy access)
Definition Component.hh:164
High-level PISM I/O class.
Definition File.hh:57
Combines the max. time step with the flag indicating if a restriction is active. Makes is possible to...
DummyEnergyModel(std::shared_ptr< const Grid > grid, std::shared_ptr< const stressbalance::StressBalance > stress_balance)
void restart_impl(const File &input_file, int record)
void update_impl(double t, double dt, const Inputs &inputs)
Update ice enthalpy field based on conservation of energy.
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)
MaxTimestep max_timestep_impl(double t) const
virtual void restart_impl(const File &input_file, int record)
virtual 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)
The enthalpy-based energy balance model.