MeteoIODoc  MeteoIODoc-2.6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Atmosphere.h
Go to the documentation of this file.
1 /***********************************************************************************/
2 /* Copyright 2009 WSL Institute for Snow and Avalanche Research SLF-DAVOS */
3 /***********************************************************************************/
4 /* This file is part of MeteoIO.
5  MeteoIO is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  MeteoIO is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with MeteoIO. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #ifndef ATMOSPHERE_H
19 #define ATMOSPHERE_H
20 
21 #include <meteoio/IOUtils.h>
22 
23 namespace mio {
24 
33 class Atmosphere {
34  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  static double windChill(const double& TA, const double& VW);
46  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  static double Dilley_emissivity(const double& RH, const double& TA);
53  static double Dilley_ilwr(const double& RH, const double& TA);
54  static double Prata_emissivity(const double& RH, const double& TA);
55  static double Prata_ilwr(const double& RH, const double& TA);
56  static double Clark_emissivity(const double& RH, const double& TA);
57  static double Clark_ilwr(const double& RH, const double& TA);
58  static double Tang_emissivity(const double& RH, const double& TA);
59  static double Tang_ilwr(const double& RH, const double& TA);
60  static double Idso_emissivity(const double& RH, const double& TA);
61  static double Idso_ilwr(const double& RH, const double& TA);
62 
63  //cloudy sky emissivity
64  static double Omstedt_emissivity(const double& RH, const double& TA, const double& cloudiness);
65  static double Omstedt_ilwr(const double& RH, const double& TA, const double& cloudiness);
66  static double Konzelmann_emissivity(const double& RH, const double& TA, const double& cloudiness);
67  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  static double Crawford_ilwr(const double& lat, const double& lon, const double& altitude,
70  const double& julian, const double& TZ,
71  const double& RH, const double& TA, const double& ISWR, const double& cloudiness=IOUtils::nodata);
72  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  static double Unsworth_ilwr(const double& lat, const double& lon, const double& altitude,
74  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  static double ILWR_parametrized(const double& lat, const double& lon, const double& altitude,
79  const double& julian, const double& TZ,
80  const double& RH, const double& TA, const double& ISWR, const double& cloudiness=IOUtils::nodata);
81 
82  static double RhtoDewPoint(double RH, double TA, const bool& force_water);
83  static double DewPointtoRh(double TD, double TA, const bool& force_water);
84  static double specToRelHumidity(const double& altitude, const double& TA, const double& qi);
85  static double relToSpecHumidity(const double& altitude, const double& TA, const double& RH);
86 
87  static double blkBody_Emissivity(const double& lwr, const double& T);
88  static double blkBody_Radiation(const double& ea, const double& T);
89 };
90 
91 } //end namespace
92 
93 #endif
static double Prata_emissivity(const double &RH, const double &TA)
Evaluate the atmosphere emissivity for clear sky. This uses the formula from Prata – "A new long-wave...
Definition: Atmosphere.cc:356
static double windLogProfile(const double &v_ref, const double &z_ref, const double &z, const double &z0=0.03)
Wind log profile. This is used to compute the equivalent wind speed at a different height...
Definition: Atmosphere.cc:171
static double Kasten_clearness(const double &cloudiness)
Evaluate the solar clearness index for a given cloudiness. This uses the formula from Kasten and Czep...
Definition: Atmosphere.cc:536
static double blackGlobeTemperature(const double &TA, const double &RH, const double &VW, const double &iswr_dir, const double &iswr_diff, const double &cos_Z)
Black Globe Temperature. This is an estimation of the black globe temperature based on physical model...
Definition: Atmosphere.cc:134
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)
Evaluate the long wave radiation for clear or cloudy sky. This uses the formula from Crawford and Duc...
Definition: Atmosphere.cc:580
static double wetBulbTemperature(const double &T, const double &RH, const double &altitude)
Standard atmosphere wet bulb temperature. This gives the lowest temperature that could be reached by ...
Definition: Atmosphere.cc:111
static double ILWR_parametrized(const double &lat, const double &lon, const double &altitude, const double &julian, const double &TZ, const double &RH, const double &TA, const double &ISWR, const double &cloudiness=IOUtils::nodata)
Compute a parametrized Incoming Long Wave Radiation This uses either Atmosphere::Crawford_ilwr or Atm...
Definition: Atmosphere.cc:739
static double heatIndex(const double &TA, const double &RH)
Heat index. This is an index aiming at expressing the human-perceived air temperature due to humidity...
Definition: Atmosphere.cc:206
static double Tang_ilwr(const double &RH, const double &TA)
Evaluate the long wave radiation for clear sky. This uses the formula from Tang, Etzion and Meir – "E...
Definition: Atmosphere.cc:425
static double Brutsaert_emissivity(const double &RH, const double &TA)
Evaluate the atmosphere emissivity for clear sky. This uses the formula from Brutsaert – "On a Deriva...
Definition: Atmosphere.cc:290
static double Omstedt_emissivity(const double &RH, const double &TA, const double &cloudiness)
Evaluate the atmosphere emissivity from the water vapor pressure and cloudiness. This is according to...
Definition: Atmosphere.cc:466
static double Idso_ilwr(const double &RH, const double &TA)
Evaluate the long wave radiation for clear sky. This uses the formula from Idso – "A set of equations...
Definition: Atmosphere.cc:452
static double Unsworth_ilwr(const double &RH, const double &TA, const double &iswr_meas, const double &iswr_clear_sky, const double &cloudiness=IOUtils::nodata)
Evaluate the long wave radiation for clear or cloudy sky. This uses the formula from Unsworth and Mon...
Definition: Atmosphere.cc:662
static double gravity(const double &altitude, const double &latitude)
Acceleration due to gravity.
Definition: Atmosphere.cc:76
static double virtualTemperatureFactor(const double &e, const double &p)
Virtual temperature multiplying factor. In order to get a virtual temperature, multiply the original ...
Definition: Atmosphere.cc:275
static double blkBody_Emissivity(const double &lwr, const double &T)
Calculate the black body emissivity.
Definition: Atmosphere.cc:36
static double Idso_emissivity(const double &RH, const double &TA)
Evaluate the atmosphere emissivity for clear sky. This uses the formula from Idso – "A set of equatio...
Definition: Atmosphere.cc:438
static double Konzelmann_ilwr(const double &RH, const double &TA, const double &cloudiness)
Evaluate the long wave radiation from RH, TA and cloudiness. This is according to Konzelmann...
Definition: Atmosphere.cc:522
static double Clark_ilwr(const double &RH, const double &TA)
Evaluate the long wave radiation for clear sky. This uses the formula from Clark & Allen – "The estim...
Definition: Atmosphere.cc:398
static double windChill(const double &TA, const double &VW)
Wind chill temperature. This is an index aiming at expressing the human-percived feeling of air tempe...
Definition: Atmosphere.cc:185
static double Tang_emissivity(const double &RH, const double &TA)
Evaluate the atmosphere emissivity for clear sky. This uses the formula from Tang, Etzion and Meir – "Estimates of clear night sky emissivity in the Negev Highlands, Israel", Energy Conversion and Management, 45.11, 2004, pp 1831-1843.
Definition: Atmosphere.cc:411
static double Clark_emissivity(const double &RH, const double &TA)
Evaluate the atmosphere emissivity for clear sky. This uses the formula from Clark & Allen – "The est...
Definition: Atmosphere.cc:384
A class to calculate the atmosphere's parameters.
Definition: Atmosphere.h:33
static double Omstedt_ilwr(const double &RH, const double &TA, const double &cloudiness)
Evaluate the long wave radiation from RH, TA and cloudiness. This is according to A...
Definition: Atmosphere.cc:486
static double waterVaporDensity(const double &Temperature, const double &VaporPressure)
Calculates the water vapor density, for a given temperature and vapor pressure.
Definition: Atmosphere.cc:98
static double Kasten_cloudiness(const double &solarIndex)
Evaluate the cloudiness from a given solar index. This uses the formula from Kasten and Czeplak – "So...
Definition: Atmosphere.cc:556
static double Dilley_ilwr(const double &RH, const double &TA)
Evaluate the long wave radiation for clear sky. This uses the formula from Dilley and O'Brien – "Esti...
Definition: Atmosphere.cc:339
static double Konzelmann_emissivity(const double &RH, const double &TA, const double &cloudiness)
Evaluate the atmosphere emissivity from the water vapor pressure and cloudiness. This is according to...
Definition: Atmosphere.cc:500
const double nodata
This is the internal nodata value.
Definition: IOUtils.h:60
static double RhtoDewPoint(double RH, double TA, const bool &force_water)
Convert a relative humidity to a dew point temperature.
Definition: Atmosphere.cc:767
static double stdDryAirDensity(const double &altitude, const double &temperature)
Standard dry air pressure.
Definition: Atmosphere.cc:88
static double DewPointtoRh(double TD, double TA, const bool &force_water)
Convert a dew point temperature to a relative humidity.
Definition: Atmosphere.cc:813
static double relToSpecHumidity(const double &altitude, const double &TA, const double &RH)
Calculate the specific Humidity from relative humidity (RH).
Definition: Atmosphere.cc:878
static double specToRelHumidity(const double &altitude, const double &TA, const double &qi)
Calculate the relative Humidity (RH) from specific humidity.
Definition: Atmosphere.cc:862
static double stdAirPressure(const double &altitude)
Standard atmospheric pressure as a function of the altitude. This is based on the following formula (...
Definition: Atmosphere.cc:64
static double vaporSaturationPressure(const double &T)
Standard water vapor saturation pressure. See Murray, F. W., "On the computation of saturation vapor ...
Definition: Atmosphere.cc:252
const double e
Definition: Meteoconst.h:66
static double Prata_ilwr(const double &RH, const double &TA)
Evaluate the long wave radiation for clear sky. This uses the formula from Prata – "A new long-wave f...
Definition: Atmosphere.cc:371
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)
Wet Bulb Globe Temperature index. This is an index aiming at expressing the human-perceived air tempe...
Definition: Atmosphere.cc:236
static double Dilley_emissivity(const double &RH, const double &TA)
Evaluate the atmosphere emissivity for clear sky. This uses the formula from Dilley and O'Brien – "Es...
Definition: Atmosphere.cc:323
static double blkBody_Radiation(const double &ea, const double &T)
Calculates the black body long wave radiation knowing its emissivity.
Definition: Atmosphere.cc:48
static double Brutsaert_ilwr(const double &RH, const double &TA)
Evaluate the long wave radiation for clear sky. This uses the formula from Brutsaert – "On a Derivabl...
Definition: Atmosphere.cc:308