SNOWPACK 3.7.0
Constants.h
Go to the documentation of this file.
1/*
2 * SNOWPACK stand-alone
3 *
4 * Copyright WSL Institute for Snow and Avalanche Research SLF, DAVOS, SWITZERLAND
5*/
6/* This file is part of Snowpack.
7 Snowpack is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 Snowpack is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with Snowpack. If not, see <http://www.gnu.org/licenses/>.
19*/
20
27#ifndef CONSTANTS_H
28#define CONSTANTS_H
29
30#include <cstddef> //needed for size_t
31
36#ifndef SN_VERSION
37 //here below, the double-expansion stringification macro trick...
38 #define STR1(x) #x
39 #define STR2(x) STR1(x)
40 #define SN_VERSION STR2( _VERSION )
41#endif
42
43namespace Constants {
44 const double undefined = -999.;
45 const int iundefined = -999;
46 const size_t stundefined = static_cast<size_t>(-999);
47 const double min_percent_values = 0.9;
48
49 const double pi = 3.14159265358979323846;
50 const double g = 9.80665;
51 const double stefan_boltzmann = 5.67051e-8;
52
53 const double solcon = 1366.1;
54
55 const double gas_constant = 461.9;
56 const double gas_constant_air = 287.0;
57 const double gas_constant_mol = 8.31;
58 const double karman = 0.4;
59
61
62 const double min_albedo = 0.3;
63 const double max_albedo = 0.9;
64 const double glacier_albedo = 0.3;
66
68 const double emissivity_snow = 0.98;
69 const double emissivity_soil = 0.95;
70
72
74 const double density_air = 1.1;
75 const double density_ice = 917.0;
76 const double density_water = 1000.0;
77 const double density_vapor = 1.0;
78
80
81 const double specific_heat_ice = 2100.0;
82 const double specific_heat_water = 4190.0;
83 const double specific_heat_air = 1004.67;
85
87
88 const double conductivity_ice = 2.2;
89 const double conductivity_water = 0.598;
90 const double conductivity_air = 0.026;
92
94
95
96 const double diffusion_coefficient_in_air = 22.0e-6;
97 const double diffusion_coefficient_in_snow = 85.0e-6;
99
101
102 const double meltfreeze_tk = 273.15;
103 const double triple_point_t = 273.16;
104 const double triple_point_p = 611.73;
105 const double lh_sublimation = 2.838e6;
106 const double lh_vaporization = 2.504e6;
107 const double lh_fusion = 3.34e5;
109
111
112 const double min_slope_angle = 3.;
113
115 const double eps = 1.e-6;
116 const double eps2 = eps*eps;
117 const double big = 1.0e200;
119}
120
121#endif
Definition: Constants.h:43
const double density_air
Approximation: use ideal gas law.
Definition: Constants.h:74
const double density_ice
At T = 0 degC.
Definition: Constants.h:75
const size_t stundefined
Definition: Constants.h:46
const double pi
Definition: Constants.h:49
const double min_slope_angle
Smallest angle a flat field may show (deg)
Definition: Constants.h:112
const double conductivity_ice
(W m-1 K-1)
Definition: Constants.h:88
const double conductivity_water
(W m-1 K-1)
Definition: Constants.h:89
const int iundefined
This is the snowpack undefined value.
Definition: Constants.h:45
const double triple_point_p
(Pa)
Definition: Constants.h:104
const double stefan_boltzmann
Definition: Constants.h:51
const double specific_heat_air
see Stull "Meteorology for scientists and engineers" p44
Definition: Constants.h:83
const double emissivity_soil
Definition: Constants.h:69
const double eps
Small numbers for comparisons and to avoid divisions by zero.
Definition: Constants.h:115
const double diffusion_coefficient_in_air
This value was taken from: Colbeck, S.C., 1993. The vapor diffusion coefficient for snow,...
Definition: Constants.h:96
const double specific_heat_water
at T = 0 degC
Definition: Constants.h:82
const double undefined
This is the snowpack undefined value.
Definition: Constants.h:44
const double triple_point_t
(K)
Definition: Constants.h:103
const double max_albedo
Definition: Constants.h:63
const double conductivity_air
(W m-1 K-1)
Definition: Constants.h:90
const double density_water
At T = 0 degC.
Definition: Constants.h:76
const double diffusion_coefficient_in_snow
It is larger (see Colbeck) according to work prior to 2008!
Definition: Constants.h:97
const double min_albedo
Definition: Constants.h:62
const double solcon
Total Solar Irradiance (W m-2) (Froehlich, 2006)
Definition: Constants.h:53
const double gas_constant_mol
(J mol-1 K-1)
Definition: Constants.h:57
const double meltfreeze_tk
(K)
Definition: Constants.h:102
const double gas_constant_air
for air (J kg-1 K-1)
Definition: Constants.h:56
const double lh_sublimation
(J kg-1) (solid to vapor)
Definition: Constants.h:105
const double g
Definition: Constants.h:50
const double eps2
Definition: Constants.h:116
const double lh_vaporization
(J kg-1) (liquid to vapor)
Definition: Constants.h:106
const double gas_constant
(J kg-1 K-1)
Definition: Constants.h:55
const double specific_heat_ice
at T = 0 degC
Definition: Constants.h:81
const double karman
Karman constant.
Definition: Constants.h:58
const double big
used for Dirichlet boundary conditions
Definition: Constants.h:117
const double density_vapor
Approximation: use ideal gas law.
Definition: Constants.h:77
const double lh_fusion
(J kg-1) (solid to liquid)
Definition: Constants.h:107
const double glacier_albedo
Definition: Constants.h:64
const double emissivity_snow
Definition: Constants.h:68
const double min_percent_values
Definition: Constants.h:47