tPicoPhysics.hh - pism - [fork] customized build of PISM, the parallel ice sheet model (tillflux branch)
HTML git clone git://src.adamsgaard.dk/pism
DIR Log
DIR Files
DIR Refs
DIR LICENSE
---
tPicoPhysics.hh (2528B)
---
1 /* Copyright (C) 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 namespace pism {
21
22 class Config;
23
24 namespace ocean {
25
26 struct TocBox1 {
27 bool failed;
28 double value;
29 };
30
31 class PicoPhysics {
32 public:
33 PicoPhysics(const Config &config);
34
35 double pressure(double ice_thickness) const;
36 double T_star(double salinity, double temperature, double pressure) const;
37
38 TocBox1 Toc_box1(double area, double T_star, double Soc_box0, double Toc_box0) const;
39 double Soc_box1(double Toc_box0, double Soc_box0, double Toc) const;
40
41 double Toc(double box_area, double temperature, double T_star, double overturning, double salinity) const;
42
43 double Soc(double salinity, double temperature, double Toc) const;
44
45 double theta_pm(double salinity, double pressure) const;
46 double T_pm(double salinity, double pressure) const;
47
48 double melt_rate(double pm_point, double Toc) const;
49
50 double melt_rate_beckmann_goosse(double pot_pm_point, double Toc) const;
51
52 double overturning(double Soc_box0, double Soc, double Toc_box0, double Toc) const;
53
54 double gamma_T() const;
55 double overturning_coeff() const;
56 double T_dummy() const;
57 double S_dummy() const;
58 double ice_density() const;
59 double continental_shelf_depth() const;
60
61 private:
62 double p_coeff(double g1, double s1) const;
63
64 double m_gamma_T, m_overturning_coeff, m_T_dummy, m_S_dummy;
65 double m_ice_density, m_continental_shelf_depth;
66
67 double m_earth_grav, m_sea_water_density, m_rho_star, m_nu, m_latentHeat, m_c_p_ocean, m_alpha, m_beta;
68
69 double m_lambda;
70
71 // coefficients of the parameterization of the potential temperature
72 double m_a_pot, m_b_pot, m_c_pot;
73
74 // coefficients of the parameterization of the in situ temperature
75 double m_a_in_situ, m_b_in_situ, m_c_in_situ;
76
77 double m_meltFactor;
78 };
79
80 } // end of namespace ocean
81 } // end of namespace pism