WSL/SLF GitLab Repository

Atmosphere.h 5.34 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/***********************************************************************************/
/*  Copyright 2009 WSL Institute for Snow and Avalanche Research    SLF-DAVOS      */
/***********************************************************************************/
/* This file is part of MeteoIO.
    MeteoIO is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    MeteoIO is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with MeteoIO.  If not, see <http://www.gnu.org/licenses/>.
*/
18
19
#ifndef ATMOSPHERE_H
#define ATMOSPHERE_H
20

21
22
#include <meteoio/IOUtils.h>

23
24
25
26
27
28
namespace mio {

/**
 * @class Atmosphere
 * @brief A class to calculate the atmosphere's parameters
 *
29
 * @ingroup meteoLaws
30
31
32
33
34
 * @author Mathias Bavay
 * @date   2010-06-10
 */
class Atmosphere {
	public:
35
		static double gravity(const double& altitude, const double& latitude);
36
		static double stdAirPressure(const double& altitude);
37
		static double stdDryAirDensity(const double& altitude, const double& temperature);
38
		static double vaporSaturationPressure(const double& T);
39
		static double virtualTemperatureFactor(const double& e, const double& p);
40
		static double waterVaporDensity(const double& Temperature, const double& VaporPressure);
41
		static double wetBulbTemperature(const double& T, const double& RH, const double& altitude);
42
		static double blackGlobeTemperature(const double& TA, const double& RH, const double& VW, const double& iswr_dir, const double& iswr_diff, const double& cos_Z);
43
		static double windLogProfile(const double& v_ref, const double& z_ref, const double& z, const double& z0=0.03);
44

45
46
		static double windChill(const double& TA, const double& VW);
		static double heatIndex(const double& TA, const double& RH);
47
		static double WBGT_index(const double& TA, const double& RH, const double& VW, const double& iswr_dir, const double& iswr_diff, const double& cos_Z, const double& altitude);
48

49
		//clear sky emissivity
50
		static double Brutsaert_emissivity(const double& RH, const double& TA);
51
		static double Brutsaert_ilwr(const double& RH, const double& TA);
52
53
54
55
		static double Dilley_emissivity(const double& RH, const double& TA);
		static double Dilley_ilwr(const double& RH, const double& TA);
		static double Prata_emissivity(const double& RH, const double& TA);
		static double Prata_ilwr(const double& RH, const double& TA);
56
57
58
59
		static double Clark_emissivity(const double& RH, const double& TA);
		static double Clark_ilwr(const double& RH, const double& TA);
		static double Tang_emissivity(const double& RH, const double& TA);
		static double Tang_ilwr(const double& RH, const double& TA);
60
61
		static double Idso_emissivity(const double& RH, const double& TA);
		static double Idso_ilwr(const double& RH, const double& TA);
62
63
64
65
66
67

		//cloudy sky emissivity
		static double Omstedt_emissivity(const double& RH, const double& TA, const double& cloudiness);
		static double Omstedt_ilwr(const double& RH, const double& TA, const double& cloudiness);
		static double Konzelmann_emissivity(const double& RH, const double& TA, const double& cloudiness);
		static double Konzelmann_ilwr(const double& RH, const double& TA, const double& cloudiness);
68
		static double Crawford_ilwr(const double& RH, const double& TA, const double& iswr_meas, const double& iswr_clear_sky, const unsigned char& month, const double& cloudiness=IOUtils::nodata);
69
70
		static double Crawford_ilwr(const double& lat, const double& lon, const double& altitude,
		                            const double& julian, const double& TZ,
71
72
		                            const double& RH, const double& TA, const double& ISWR, const double& cloudiness=IOUtils::nodata);
		static double Unsworth_ilwr(const double& RH, const double& TA, const double& iswr_meas, const double& iswr_clear_sky, const double& cloudiness=IOUtils::nodata);
73
74
		static double Unsworth_ilwr(const double& lat, const double& lon, const double& altitude,
		                            const double& julian, const double& TZ,
75
		                            const double& RH, const double& TA, const double& ISWR, const double& cloudiness=IOUtils::nodata);
76
		static double Kasten_clearness(const double& cloudiness);
77
		static double Kasten_cloudiness(const double& solarIndex);
78
79
		static double ILWR_parametrized(const double& lat, const double& lon, const double& altitude,
		                                const double& julian, const double& TZ,
80
		                                const double& RH, const double& TA, const double& ISWR, const double& cloudiness=IOUtils::nodata);
81

82
83
		static double RhtoDewPoint(double RH, double TA, const bool& force_water);
		static double DewPointtoRh(double TD, double TA, const bool& force_water);
84
85
		static double specToRelHumidity(const double& altitude, const double& TA, const double& qi);
		static double relToSpecHumidity(const double& altitude, const double& TA, const double& RH);
86
87
88

		static double blkBody_Emissivity(const double& lwr, const double& T);
		static double blkBody_Radiation(const double& ea, const double& T);
89
90
91
92
93
};

} //end namespace

#endif