Loading [MathJax]/extensions/tex2jax.js
PISM, A Parallel Ice Sheet Model 2.2.1-cd005eec8 committed by Constantine Khrulev on 2025-03-07
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DEBMSimplePointwise.hh
Go to the documentation of this file.
1// Copyright (C) 2009--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#ifndef PISM_DEBM_SIMPLE_POINTWISE_H
20#define PISM_DEBM_SIMPLE_POINTWISE_H
21
22#include <memory>
23#include <array>
24
25#include "pism/util/Mask.hh"
26#include "pism/util/ScalarForcing.hh"
27
28namespace pism {
29
30class Context;
31class Time;
32
33namespace surface {
34
35// The following three could be nested in DEBMSimplePointwise but SWIG does not appear to
36// support nested classes, so we put them here to make them accessible from Python.
37
46
49
50 double snow_depth;
51 double melt;
52 double runoff;
53 double smb;
54};
55
57 // Solar declination, radians
59 // Square of the ratio of the mean sun-earth distance to the current sun-earth distance
60 // (d_bar / d)^2
62};
63
64//! A dEBM-simple implementation
65/*!
66 * This class implements dEBM-simple, the simple diurnal energy balance model described in
67 *
68 * M. Zeitz, R. Reese, J. Beckmann, U. Krebs-Kanzow, and R. Winkelmann, “Impact of the
69 * melt–albedo feedback on the future evolution of the Greenland Ice Sheet with
70 * PISM-dEBM-simple,” The Cryosphere, vol. 15, Art. no. 12, Dec. 2021.
71*/
73public:
74 DEBMSimplePointwise(const Context &ctx);
75
76 double albedo(double melt_rate, MaskValue cell_type) const;
77
79
80 DEBMSimpleMelt melt(double declination,
81 double distance_factor,
82 double dt,
83 double T_std_deviation,
84 double T,
85 double surface_elevation,
86 double lat,
87 double albedo) const;
88
89 DEBMSimpleChanges step(double ice_thickness, double max_melt, double snow_depth,
90 double accumulation) const;
91
92 // public because it is a diagnostic field
93 double atmosphere_transmissivity(double elevation) const;
94
95 double insolation_diagnostic(double declination,
96 double distance_factor,
97 double latitude_degrees) const;
98
99 // implementation details (exposed as "public" methods for testing)
100 static double CalovGreveIntegrand(double sigma, double temperature);
101 static double hour_angle(double phi, double latitude, double declination);
102 static double solar_longitude(double year_fraction, double eccentricity,
103 double perihelion_longitude);
104 static double distance_factor_present_day(double year_fraction);
105 static double distance_factor_paleo(double eccentricity, double true_anomaly);
106 static double solar_declination_present_day(double year_fraction);
107 static double solar_declination_paleo(double obliquity,
108 double solar_longitude);
109 static double insolation(double solar_constant, double distance_factor, double hour_angle,
110 double latitude, double declination);
111
112 double eccentricity(double time) const;
113 double obliquity(double time) const;
114 double perihelion_longitude(double time) const;
115
116private:
117 //! refreeze melted ice
119 //! refreeze fraction
121 //! threshold temperature for the computation of temperature-driven melt
123
126
130
131 //! slope used in the linear parameterization of the albedo as a function of melt
133
134 //! slope used in the linear parameterization of transmissivity
137
138 // tuning parameters of the melt equation
139 double m_melt_c1;
140 double m_melt_c2;
141
142 // threshold air temperature (no melt at temperatures below this)
144
145 //! latent heat of fusion
146 double m_L;
147 //! the solar constant
149
150 //! minimum solar elevation angle above which melt is possible
151 double m_phi;
152
153 std::unique_ptr<ScalarForcing> m_eccentricity;
154 std::unique_ptr<ScalarForcing> m_obliquity;
155 std::unique_ptr<ScalarForcing> m_perihelion_longitude;
156
158
162
163 std::shared_ptr<const Time> m_time;
164};
165
166} // end of namespace surface
167} // end of namespace pism
168
169#endif /* PISM_DEBM_SIMPLE_POINTWISE_H */
double albedo(double melt_rate, MaskValue cell_type) const
static double insolation(double solar_constant, double distance_factor, double hour_angle, double latitude, double declination)
double m_transmissivity_slope
slope used in the linear parameterization of transmissivity
std::unique_ptr< ScalarForcing > m_eccentricity
std::unique_ptr< ScalarForcing > m_obliquity
double m_refreeze_fraction
refreeze fraction
double m_positive_threshold_temperature
threshold temperature for the computation of temperature-driven melt
static double CalovGreveIntegrand(double sigma, double temperature)
static double solar_longitude(double year_fraction, double eccentricity, double perihelion_longitude)
DEBMSimpleMelt melt(double declination, double distance_factor, double dt, double T_std_deviation, double T, double surface_elevation, double lat, double albedo) const
static double distance_factor_paleo(double eccentricity, double true_anomaly)
double m_albedo_slope
slope used in the linear parameterization of the albedo as a function of melt
double insolation_diagnostic(double declination, double distance_factor, double latitude_degrees) const
bool m_refreeze_ice_melt
refreeze melted ice
double perihelion_longitude(double time) const
double m_solar_constant
the solar constant
static double hour_angle(double phi, double latitude, double declination)
static double distance_factor_present_day(double year_fraction)
double m_phi
minimum solar elevation angle above which melt is possible
static double solar_declination_paleo(double obliquity, double solar_longitude)
double atmosphere_transmissivity(double elevation) const
DEBMSimpleOrbitalParameters orbital_parameters(double time) const
std::unique_ptr< ScalarForcing > m_perihelion_longitude
static double solar_declination_present_day(double year_fraction)
DEBMSimpleChanges step(double ice_thickness, double max_melt, double snow_depth, double accumulation) const
Compute the surface mass balance at a location from the amount of melted snow and the solid accumulat...
std::shared_ptr< const Time > m_time
A dEBM-simple implementation.
const double phi
Definition exactTestK.c:41
MaskValue
Definition Mask.hh:30