MeteoIODoc 20241221.207bde49
Atmosphere.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2/***********************************************************************************/
3/* Copyright 2009 WSL Institute for Snow and Avalanche Research SLF-DAVOS */
4/***********************************************************************************/
5/* This file is part of MeteoIO.
6 MeteoIO is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 MeteoIO is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public License
17 along with MeteoIO. If not, see <http://www.gnu.org/licenses/>.
18*/
19#ifndef ATMOSPHERE_H
20#define ATMOSPHERE_H
21
22#include <meteoio/IOUtils.h>
23
24namespace mio {
25
35 public:
36 static double gravity(const double& altitude, const double& latitude);
37 static double stdAirPressure(const double& altitude);
38 static double reducedAirPressure(const double& pressure, const double& altitude, const double& latitude);
39 static double stdDryAirDensity(const double& altitude, const double& temperature);
40 static double vaporSaturationPressure(const double& T);
41 static double vaporSaturationPressureWater(const double& T);
42 static double virtualTemperatureFactor(const double& e, const double& p);
43 static double waterVaporDensity(const double& Temperature, const double& VaporPressure);
44 static double wetBulbTemperature(const double& T, const double& RH, const double& altitude);
45 static double blackGlobeTemperature(const double& TA, const double& RH, const double& VW, const double& iswr_dir, const double& iswr_diff, const double& cos_Z);
46 static double windLogProfile(const double& v_ref, const double& z_ref, const double& z, const double& z0=0.03);
47
48 static double windChill(const double& TA, const double& VW);
49 static double heatIndex(const double& TA, const double& RH);
50 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);
51
52 //clear sky emissivity
53 static double Brutsaert_emissivity(const double& RH, const double& TA);
54 static double Brutsaert_ilwr(const double& RH, const double& TA);
55 static double Dilley_emissivity(const double& RH, const double& TA);
56 static double Dilley_ilwr(const double& RH, const double& TA);
57 static double Prata_emissivity(const double& RH, const double& TA);
58 static double Prata_ilwr(const double& RH, const double& TA);
59 static double Clark_emissivity(const double& RH, const double& TA);
60 static double Clark_ilwr(const double& RH, const double& TA);
61 static double Tang_emissivity(const double& RH, const double& TA);
62 static double Tang_ilwr(const double& RH, const double& TA);
63 static double Idso_emissivity(const double& RH, const double& TA);
64 static double Idso_ilwr(const double& RH, const double& TA);
65
66 //cloudy sky emissivity
67 static double Omstedt_emissivity(const double& RH, const double& TA, const double& cloudiness);
68 static double Omstedt_ilwr(const double& RH, const double& TA, const double& cloudiness);
69 static double Konzelmann_emissivity(const double& RH, const double& TA, const double& cloudiness);
70 static double Konzelmann_ilwr(const double& RH, const double& TA, const double& cloudiness);
71 static double Carmona_emissivity(const double& RH, const double& TA, const double& cloudiness);
72 static double Carmona_ilwr(const double& RH, const double& TA, const double& cloudiness);
73 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);
74 static double Crawford_ilwr(const double& lat, const double& lon, const double& altitude,
75 const double& julian, const double& TZ,
76 const double& RH, const double& TA, const double& ISWR, const double& cloudiness=IOUtils::nodata);
77 static double Unsworth_ilwr(const double& RH, const double& TA, const double& iswr_meas, const double& iswr_clear_sky, const double& cloudiness=IOUtils::nodata);
78 static double Unsworth_ilwr(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 static double Lhomme_ilwr(const double& RH, const double& TA, const double& iswr_meas, const double& iswr_clear_sky, const double& cloudiness);
82 static double Lhomme_ilwr(const double& lat, const double& lon, const double& altitude,
83 const double& julian, const double& TZ,
84 const double& RH, const double& TA, const double& ISWR, const double& cloudiness=IOUtils::nodata);
85 static double Kasten_clearness(const double& cloudiness);
86 static double Kasten_cloudiness(const double& solarIndex);
87 static double Lhomme_clearness(const double& cloudiness);
88 static double Lhomme_cloudiness(const double& solarIndex);
89 static double ILWR_parametrized(const double& lat, const double& lon, const double& altitude,
90 const double& julian, const double& TZ,
91 const double& RH, const double& TA, const double& ISWR, const double& cloudiness=IOUtils::nodata);
92
93 static double RhtoDewPoint(double RH, double TA, const bool& force_water);
94 static double DewPointtoRh(double TD, double TA, const bool& force_water);
95 static double specToRelHumidity(const double& altitude, const double& TA, const double& qi);
96 static double relToSpecHumidity(const double& altitude, const double& TA, const double& RH);
97
98 static double blkBody_Emissivity(const double& lwr, const double& T, const bool& max_limit=true);
99 static double blkBody_Radiation(const double& ea, const double& T);
100
101 static const double day_iswr_thresh; //threhold on ISWR above which it is considered to be daylight
102};
103
104} //end namespace
105
106#endif
A class to calculate the atmosphere's parameters.
Definition: Atmosphere.h:34
static double blkBody_Radiation(const double &ea, const double &T)
Calculates the black body long wave radiation knowing its emissivity.
Definition: Atmosphere.cc:53
static double Lhomme_cloudiness(const double &solarIndex)
Evaluate the cloudiness from a given solar index. This uses the formula from Lhomme et al....
Definition: Atmosphere.cc:720
static double Carmona_ilwr(const double &RH, const double &TA, const double &cloudiness)
Evaluate the long wave radiation from RH, TA and cloudiness. This is according to Carmona,...
Definition: Atmosphere.cc:644
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:216
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:820
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:446
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:412
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:533
static double vaporSaturationPressure(const double &T)
Standard water vapor saturation pressure. See Murray, F. W., "On the computation of saturation vapor ...
Definition: Atmosphere.cc:297
static double Lhomme_clearness(const double &cloudiness)
Evaluate the solar clearness index for a given cloudiness. This uses the formula from Lhomme et al....
Definition: Atmosphere.cc:699
static double stdDryAirDensity(const double &altitude, const double &temperature)
Standard dry air pressure.
Definition: Atmosphere.cc:119
static double RhtoDewPoint(double RH, double TA, const bool &force_water)
Convert a relative humidity to a dew point temperature.
Definition: Atmosphere.cc:1006
static const double day_iswr_thresh
Definition: Atmosphere.h:101
static double DewPointtoRh(double TD, double TA, const bool &force_water)
Convert a dew point temperature to a relative humidity.
Definition: Atmosphere.cc:1052
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:379
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:173
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:680
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:659
static double Lhomme_ilwr(const double &RH, const double &TA, const double &iswr_meas, const double &iswr_clear_sky, const double &cloudiness)
Evaluate the long wave radiation for clear or cloudy sky. This uses the formula from Lhomme et al....
Definition: Atmosphere.cc:741
static double waterVaporDensity(const double &Temperature, const double &VaporPressure)
Calculates the water vapor density, for a given temperature and vapor pressure.
Definition: Atmosphere.cc:130
static double reducedAirPressure(const double &pressure, const double &altitude, const double &latitude)
Atmospheric pressure reduced to sea level. This calculates the following formula (with P the pressure...
Definition: Atmosphere.cc:92
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:395
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:281
static double blkBody_Emissivity(const double &lwr, const double &T, const bool &max_limit=true)
Calculate the black body emissivity.
Definition: Atmosphere.cc:40
static double Tang_emissivity(const double &RH, const double &TA)
Evaluate the atmosphere emissivity for clear sky. This uses the formula from Tang,...
Definition: Atmosphere.cc:489
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:460
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:548
static double specToRelHumidity(const double &altitude, const double &TA, const double &qi)
Calculate the relative Humidity (RH) from specific humidity.
Definition: Atmosphere.cc:1101
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:430
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:70
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:504
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:607
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:344
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:230
static double vaporSaturationPressureWater(const double &T)
Standard water vapor saturation pressure, assuming "over water" for the full temperature range....
Definition: Atmosphere.cc:326
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:360
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:902
static double relToSpecHumidity(const double &altitude, const double &TA, const double &RH)
Calculate the specific Humidity from relative humidity (RH).
Definition: Atmosphere.cc:1117
static double Carmona_emissivity(const double &RH, const double &TA, const double &cloudiness)
Evaluate the atmosphere emissivity from RH, TA and cloudiness. This is according to Carmona,...
Definition: Atmosphere.cc:623
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:475
static double gravity(const double &altitude, const double &latitude)
Acceleration due to gravity.
Definition: Atmosphere.cc:106
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:979
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:144
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:569
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:518
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:584
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:251
static const double e
Definition: Meteoconst.h:68
const double nodata
This is the internal nodata value.
Definition: IOUtils.h:75
Definition: Config.cc:31