PISM, A Parallel Ice Sheet Model  stable v2.1.1 committed by Constantine Khrulev on 2024-12-04 13:36:58 -0900
utilities.hh
Go to the documentation of this file.
1 /* Copyright (C) 2016, 2018 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 UTILITIES_H
21 #define UTILITIES_H
22 
23 namespace pism {
24 
25 namespace array {
26 class Array3D;
27 class Scalar;
28 }
29 
30 namespace energy {
31 
32 void compute_temperature(const array::Array3D &enthalpy,
33  const array::Scalar &ice_thickness,
34  array::Array3D &result);
35 
36 void compute_enthalpy(const array::Array3D &temperature,
37  const array::Array3D &liquid_water_fraction,
38  const array::Scalar &ice_thickness,
39  array::Array3D &result);
40 
41 void compute_enthalpy_cold(const array::Array3D &temperature,
42  const array::Scalar &ice_thickness,
43  array::Array3D &result);
44 
45 void compute_liquid_water_fraction(const array::Array3D &enthalpy,
46  const array::Scalar &ice_thickness,
47  array::Array3D &result);
48 
49 void compute_cts(const array::Array3D &enthalpy,
50  const array::Scalar &ice_thickness,
51  array::Array3D &result);
52 
53 double total_ice_enthalpy(double thickness_threshold,
54  const array::Array3D &ice_enthalpy,
55  const array::Scalar &ice_thickness);
56 
57 void bootstrap_ice_temperature(const array::Scalar &ice_thickness,
58  const array::Scalar &ice_surface_temp,
59  const array::Scalar &surface_mass_balance,
60  const array::Scalar &basal_heat_flux,
61  array::Array3D &result);
62 
63 void bootstrap_ice_enthalpy(const array::Scalar &ice_thickness,
64  const array::Scalar &ice_surface_temp,
65  const array::Scalar &surface_mass_balance,
66  const array::Scalar &basal_heat_flux,
67  array::Array3D &result);
68 
69 } // end of namespace energy
70 } // end of namespace pism
71 
72 #endif /* UTILITIES_H */
void compute_liquid_water_fraction(const array::Array3D &enthalpy, const array::Scalar &ice_thickness, array::Array3D &result)
Compute the liquid fraction corresponding to enthalpy and ice_thickness.
Definition: utilities.cc:136
void bootstrap_ice_temperature(const array::Scalar &ice_thickness, const array::Scalar &ice_surface_temp, const array::Scalar &surface_mass_balance, const array::Scalar &basal_heat_flux, array::Array3D &result)
Create a temperature field within the ice from provided ice thickness, surface temperature,...
Definition: utilities.cc:327
void compute_cts(const array::Array3D &ice_enthalpy, const array::Scalar &ice_thickness, array::Array3D &result)
Compute the CTS field, CTS = E/E_s(p), from ice_enthalpy and ice_thickness, and put in result.
Definition: utilities.cc:179
void compute_enthalpy_cold(const array::Array3D &temperature, const array::Scalar &ice_thickness, array::Array3D &result)
Compute ice enthalpy from temperature temperature by assuming the ice has zero liquid fraction.
Definition: utilities.cc:48
void compute_temperature(const array::Array3D &enthalpy, const array::Scalar &ice_thickness, array::Array3D &result)
Definition: utilities.cc:76
void bootstrap_ice_enthalpy(const array::Scalar &ice_thickness, const array::Scalar &ice_surface_temp, const array::Scalar &surface_mass_balance, const array::Scalar &basal_heat_flux, array::Array3D &result)
Definition: utilities.cc:439
void compute_enthalpy(const array::Array3D &temperature, const array::Array3D &liquid_water_fraction, const array::Scalar &ice_thickness, array::Array3D &result)
Compute result (enthalpy) from temperature and liquid fraction.
Definition: utilities.cc:105
double total_ice_enthalpy(double thickness_threshold, const array::Array3D &ice_enthalpy, const array::Scalar &ice_thickness)
Computes the total ice enthalpy in J.
Definition: utilities.cc:218