Commit 273c4b86 authored by LEFEBVREJP email's avatar LEFEBVREJP email
Browse files

Merge branch '15-humidity-conversions' into 'master'

Resolve "humidity conversions"

Closes #15

See merge request !25
parents 99885c51 91e70220
Pipeline #12422 passed with stages
in 5 minutes and 36 seconds
...@@ -843,6 +843,18 @@ std::vector<std::vector<float>> GFSFile::query(float lat, float lon, int month, ...@@ -843,6 +843,18 @@ std::vector<std::vector<float>> GFSFile::query(float lat, float lon, int month,
{ {
surfaceAltitude = hpaToAltitude(vdata[kk][ll], temp, msle) - 2.f; surfaceAltitude = hpaToAltitude(vdata[kk][ll], temp, msle) - 2.f;
} }
// check whether relative humidity has been requested, and convert
// specific humidity if this is present instead
auto relHumIt = std::find(columns.begin(), columns.end(), "RELH");
if (relHumIt != columns.end() && varb.compare("SPHU") == 0)
{
varb = "RELH";
double specificHumidity = vdata[kk][ll];
// Convert specific humidity to relative humidity
vdata[kk][ll] =
specificHumidityToRelativeHumidity(specificHumidity, temp, plevel);
}
auto it = std::find(columns.begin(), columns.end(), varb); auto it = std::find(columns.begin(), columns.end(), varb);
if (it != columns.end()) if (it != columns.end())
{ {
......
...@@ -39,6 +39,8 @@ const Real sqrtTHREE = std::sqrt(Real(3.0)); ...@@ -39,6 +39,8 @@ const Real sqrtTHREE = std::sqrt(Real(3.0));
const Real DAYS_PER_YEAR = 365.25; const Real DAYS_PER_YEAR = 365.25;
const Real SECONDS_PER_HOUR = 3600.0; const Real SECONDS_PER_HOUR = 3600.0;
const Real METERS_PER_MILE = 1609.344; const Real METERS_PER_MILE = 1609.344;
const Real ABS_ZERO_CELSIUS = -273.15;
const Real MASS_RATIO_WATER_VAPOR_DRY_AIR = 0.62198;
/** /**
* Type def unsigned long to Identifier * Type def unsigned long to Identifier
*/ */
......
...@@ -198,3 +198,404 @@ TEST(radix, greatCircleVolume) ...@@ -198,3 +198,404 @@ TEST(radix, greatCircleVolume)
EARTH_RADIUS_MEAN + 1); EARTH_RADIUS_MEAN + 1);
EXPECT_NEAR(24625680, volume, 1e-1); EXPECT_NEAR(24625680, volume, 1e-1);
} }
TEST(radix, Pressure1000)
{
double tolerance = 0.001;
double potentialTemp1 = 273.15, potentialTemp2 = 293.0,
potentialTemp3 = 240.654, pressure = 1000;
double temp = absoluteTemperature(potentialTemp1, pressure);
ASSERT_NEAR(potentialTemp1, temp, potentialTemp1 * tolerance);
temp = absoluteTemperature(potentialTemp2, pressure);
ASSERT_NEAR(potentialTemp2, temp, potentialTemp2 * tolerance);
temp = absoluteTemperature(potentialTemp3, pressure);
ASSERT_NEAR(potentialTemp3, temp, potentialTemp3 * tolerance);
}
TEST(radix, Pressure900)
{
double tolerance = 0.001;
double potentialTemp1 = 273.15, potentialTemp2 = 293.0,
potentialTemp3 = 240.654, pressure = 900;
double expectTemp1 = 265.042, expectTemp2 = 284.303, expectTemp3 = 233.511;
double temp = absoluteTemperature(potentialTemp1, pressure);
ASSERT_NEAR(expectTemp1, temp, expectTemp1 * tolerance);
temp = absoluteTemperature(potentialTemp2, pressure);
ASSERT_NEAR(expectTemp2, temp, expectTemp2 * tolerance);
temp = absoluteTemperature(potentialTemp3, pressure);
ASSERT_NEAR(expectTemp3, temp, expectTemp3 * tolerance);
}
TEST(radix, Pressure800)
{
double tolerance = 0.001;
double potentialTemp1 = 273.15, potentialTemp2 = 293.0,
potentialTemp3 = 240.654, pressure = 800;
double expectTemp1 = 256.2624306593, expectTemp2 = 274.8851992794,
expectTemp3 = 225.7755042573;
double temp = absoluteTemperature(potentialTemp1, pressure);
ASSERT_NEAR(expectTemp1, temp, expectTemp1 * tolerance);
temp = absoluteTemperature(potentialTemp2, pressure);
ASSERT_NEAR(expectTemp2, temp, expectTemp2 * tolerance);
temp = absoluteTemperature(potentialTemp3, pressure);
ASSERT_NEAR(expectTemp3, temp, expectTemp3 * tolerance);
}
TEST(radix, Pressure700)
{
double tolerance = 0.001;
double potentialTemp1 = 273.15, potentialTemp2 = 293.0,
potentialTemp3 = 240.654, pressure = 700;
double expectTemp1 = 246.6602937075, expectTemp2 = 264.5852683737,
expectTemp3 = 217.3157104956;
double temp = absoluteTemperature(potentialTemp1, pressure);
ASSERT_NEAR(expectTemp1, temp, expectTemp1 * tolerance);
temp = absoluteTemperature(potentialTemp2, pressure);
ASSERT_NEAR(expectTemp2, temp, expectTemp2 * tolerance);
temp = absoluteTemperature(potentialTemp3, pressure);
ASSERT_NEAR(expectTemp3, temp, expectTemp3 * tolerance);
}
TEST(radix, Pressure600)
{
double tolerance = 0.001;
double potentialTemp1 = 273.15, potentialTemp2 = 293.0,
potentialTemp3 = 240.654, pressure = 600;
double expectTemp1 = 236.0219871191, expectTemp2 = 253.1738686651,
expectTemp3 = 207.9430177124;
double temp = absoluteTemperature(potentialTemp1, pressure);
ASSERT_NEAR(expectTemp1, temp, expectTemp1 * tolerance);
temp = absoluteTemperature(potentialTemp2, pressure);
ASSERT_NEAR(expectTemp2, temp, expectTemp2 * tolerance);
temp = absoluteTemperature(potentialTemp3, pressure);
ASSERT_NEAR(expectTemp3, temp, expectTemp3 * tolerance);
}
TEST(radix, Pressure500)
{
double tolerance = 0.001;
double potentialTemp1 = 273.15, potentialTemp2 = 293.0,
potentialTemp3 = 240.654, pressure = 500;
double expectTemp1 = 224.0302306934, expectTemp2 = 240.3106629806,
expectTemp3 = 197.3778917711;
double temp = absoluteTemperature(potentialTemp1, pressure);
ASSERT_NEAR(expectTemp1, temp, expectTemp1 * tolerance);
temp = absoluteTemperature(potentialTemp2, pressure);
ASSERT_NEAR(expectTemp2, temp, expectTemp2 * tolerance);
temp = absoluteTemperature(potentialTemp3, pressure);
ASSERT_NEAR(expectTemp3, temp, expectTemp3 * tolerance);
}
TEST(radix, Pressure400)
{
double tolerance = 0.001;
double potentialTemp1 = 273.15, potentialTemp2 = 293.0,
potentialTemp3 = 240.654, pressure = 400;
double expectTemp1 = 210.1795037842, expectTemp2 = 225.4533941379,
expectTemp3 = 185.1749526036;
double temp = absoluteTemperature(potentialTemp1, pressure);
ASSERT_NEAR(expectTemp1, temp, expectTemp1 * tolerance);
temp = absoluteTemperature(potentialTemp2, pressure);
ASSERT_NEAR(expectTemp2, temp, expectTemp2 * tolerance);
temp = absoluteTemperature(potentialTemp3, pressure);
ASSERT_NEAR(expectTemp3, temp, expectTemp3 * tolerance);
}
TEST(radix, Pressure300)
{
double tolerance = 0.001;
double potentialTemp1 = 273.15, potentialTemp2 = 293.0,
potentialTemp3 = 240.654, pressure = 300;
double expectTemp1 = 193.5788402819, expectTemp2 = 207.646348902,
expectTemp3 = 170.5492302002;
double temp = absoluteTemperature(potentialTemp1, pressure);
ASSERT_NEAR(expectTemp1, temp, expectTemp1 * tolerance);
temp = absoluteTemperature(potentialTemp2, pressure);
ASSERT_NEAR(expectTemp2, temp, expectTemp2 * tolerance);
temp = absoluteTemperature(potentialTemp3, pressure);
ASSERT_NEAR(expectTemp3, temp, expectTemp3 * tolerance);
}
TEST(radix, Pressure200)
{
double tolerance = 0.001;
double potentialTemp1 = 273.15, potentialTemp2 = 293.0,
potentialTemp3 = 240.654, pressure = 200;
double expectTemp1 = 172.3835354925, expectTemp2 = 184.9107666092,
expectTemp3 = 151.8754799576;
double temp = absoluteTemperature(potentialTemp1, pressure);
ASSERT_NEAR(expectTemp1, temp, expectTemp1 * tolerance);
temp = absoluteTemperature(potentialTemp2, pressure);
ASSERT_NEAR(expectTemp2, temp, expectTemp2 * tolerance);
temp = absoluteTemperature(potentialTemp3, pressure);
ASSERT_NEAR(expectTemp3, temp, expectTemp3 * tolerance);
}
TEST(radix, MixingRatio10)
{
double tolerance = 0.01;
double temp1 = 25 - ABS_ZERO_CELSIUS, pressure1 = 900.0,
temp2 = 10 - ABS_ZERO_CELSIUS, pressure2 = 650.0,
temp3 = 40 - ABS_ZERO_CELSIUS, pressure3 = 800.0,
mixingRatio = 10.0 * 1.0E-3;
double expectRelHum1 = 44.967, expectRelHum2 = 83.818, expectRelHum3 = 17.158;
double relHum = mixingRatioToRelativeHumidity(mixingRatio, temp1, pressure1);
ASSERT_NEAR(expectRelHum1, relHum, expectRelHum1 * tolerance);
relHum = mixingRatioToRelativeHumidity(mixingRatio, temp2, pressure2);
ASSERT_NEAR(expectRelHum2, relHum, expectRelHum2 * tolerance);
relHum = mixingRatioToRelativeHumidity(mixingRatio, temp3, pressure3);
ASSERT_NEAR(expectRelHum3, relHum, expectRelHum3 * tolerance);
}
TEST(radix, MixingRatio5)
{
double tolerance = 0.01;
double temp1 = 5.3 - ABS_ZERO_CELSIUS, pressure1 = 1010.0,
temp2 = -3.2 - ABS_ZERO_CELSIUS, pressure2 = 740.0,
temp3 = 0.0 - ABS_ZERO_CELSIUS, pressure3 = 300.0,
mixingRatio = 5.0 * 1.0E-3;
double expectRelHum1 = 90.474, expectRelHum2 = 100.0, expectRelHum3 = 39.17;
double relHum = mixingRatioToRelativeHumidity(mixingRatio, temp1, pressure1);
ASSERT_NEAR(expectRelHum1, relHum, expectRelHum1 * tolerance);
relHum = mixingRatioToRelativeHumidity(mixingRatio, temp2, pressure2);
ASSERT_NEAR(expectRelHum2, relHum, expectRelHum2 * tolerance);
relHum = mixingRatioToRelativeHumidity(mixingRatio, temp3, pressure3);
ASSERT_NEAR(expectRelHum3, relHum, expectRelHum3 * tolerance);
}
TEST(radix, MixingRatio3)
{
double tolerance = 0.01;
double temp1 = -2.0 - ABS_ZERO_CELSIUS, pressure1 = 890.0,
temp2 = -3.2 - ABS_ZERO_CELSIUS, pressure2 = 550.0,
temp3 = -15.0 - ABS_ZERO_CELSIUS, pressure3 = 300.0,
mixingRatio = 3.0 * 1.0E-3;
double expectRelHum1 = 81.01, expectRelHum2 = 54.73, expectRelHum3 = 75.34;
double relHum = mixingRatioToRelativeHumidity(mixingRatio, temp1, pressure1);
ASSERT_NEAR(expectRelHum1, relHum, expectRelHum1 * tolerance);
relHum = mixingRatioToRelativeHumidity(mixingRatio, temp2, pressure2);
ASSERT_NEAR(expectRelHum2, relHum, expectRelHum2 * tolerance);
relHum = mixingRatioToRelativeHumidity(mixingRatio, temp3, pressure3);
ASSERT_NEAR(expectRelHum3, relHum, expectRelHum3 * tolerance);
}
TEST(radix, MixingRatio1)
{
double tolerance = 0.01;
double temp1 = 6.0 - ABS_ZERO_CELSIUS, pressure1 = 890.0,
temp2 = 1.5 - ABS_ZERO_CELSIUS, pressure2 = 550.0,
temp3 = -25.0 - ABS_ZERO_CELSIUS, pressure3 = 300.0,
mixingRatio = 1.0 * 1.0E-3;
double expectRelHum1 = 15.29, expectRelHum2 = 12.971, expectRelHum3 = 59.66;
double relHum = mixingRatioToRelativeHumidity(mixingRatio, temp1, pressure1);
ASSERT_NEAR(expectRelHum1, relHum, expectRelHum1 * tolerance);
relHum = mixingRatioToRelativeHumidity(mixingRatio, temp2, pressure2);
ASSERT_NEAR(expectRelHum2, relHum, expectRelHum2 * tolerance);
relHum = mixingRatioToRelativeHumidity(mixingRatio, temp3, pressure3);
ASSERT_NEAR(expectRelHum3, relHum, expectRelHum3 * tolerance);
}
TEST(radix, MixingRatioPoint25)
{
double tolerance = 0.01;
double temp1 = 32.0 - ABS_ZERO_CELSIUS, pressure1 = 1050.0,
temp2 = 6.5 - ABS_ZERO_CELSIUS, pressure2 = 650.0,
temp3 = -25.0 - ABS_ZERO_CELSIUS, pressure3 = 250.0,
mixingRatio = 0.25 * 1.0E-3;
double expectRelHum1 = 0.88722, expectRelHum2 = 2.6997, expectRelHum3 = 12.44;
double relHum = mixingRatioToRelativeHumidity(mixingRatio, temp1, pressure1);
ASSERT_NEAR(expectRelHum1, relHum, expectRelHum1 * tolerance);
relHum = mixingRatioToRelativeHumidity(mixingRatio, temp2, pressure2);
ASSERT_NEAR(expectRelHum2, relHum, expectRelHum2 * tolerance);
relHum = mixingRatioToRelativeHumidity(mixingRatio, temp3, pressure3);
ASSERT_NEAR(expectRelHum3, relHum, expectRelHum3 * tolerance);
}
TEST(radix, SpecificHumidity10)
{
double tolerance = 0.01;
double temp1 = 25 - ABS_ZERO_CELSIUS, pressure1 = 900.0,
temp2 = 10 - ABS_ZERO_CELSIUS, pressure2 = 650.0,
temp3 = 40 - ABS_ZERO_CELSIUS, pressure3 = 800.0,
specificHumidity = 10.0;
double expectRelHum1 = 44.967, expectRelHum2 = 83.818, expectRelHum3 = 17.158;
double relHum =
specificHumidityToRelativeHumidity(specificHumidity, temp1, pressure1);
ASSERT_NEAR(expectRelHum1, relHum, expectRelHum1 * tolerance);
relHum =
specificHumidityToRelativeHumidity(specificHumidity, temp2, pressure2);
ASSERT_NEAR(expectRelHum2, relHum, expectRelHum2 * tolerance);
relHum =
specificHumidityToRelativeHumidity(specificHumidity, temp3, pressure3);
ASSERT_NEAR(expectRelHum3, relHum, expectRelHum3 * tolerance);
}
TEST(radix, SpecificHumidity5)
{
double tolerance = 0.01;
double temp1 = 5.3 - ABS_ZERO_CELSIUS, pressure1 = 1010.0,
temp2 = -3.2 - ABS_ZERO_CELSIUS, pressure2 = 740.0,
temp3 = 0.0 - ABS_ZERO_CELSIUS, pressure3 = 300.0,
specificHumidity = 5.0;
double expectRelHum1 = 90.474, expectRelHum2 = 100.0, expectRelHum3 = 39.17;
double relHum =
specificHumidityToRelativeHumidity(specificHumidity, temp1, pressure1);
ASSERT_NEAR(expectRelHum1, relHum, expectRelHum1 * tolerance);
relHum =
specificHumidityToRelativeHumidity(specificHumidity, temp2, pressure2);
ASSERT_NEAR(expectRelHum2, relHum, expectRelHum2 * tolerance);
relHum =
specificHumidityToRelativeHumidity(specificHumidity, temp3, pressure3);
ASSERT_NEAR(expectRelHum3, relHum, expectRelHum3 * tolerance);
}
TEST(radix, SpecificHumidity3)
{
double tolerance = 0.01;
double temp1 = -2.0 - ABS_ZERO_CELSIUS, pressure1 = 890.0,
temp2 = -3.2 - ABS_ZERO_CELSIUS, pressure2 = 550.0,
temp3 = -15.0 - ABS_ZERO_CELSIUS, pressure3 = 300.0,
specificHumidity = 3.0;
double expectRelHum1 = 81.01, expectRelHum2 = 54.73, expectRelHum3 = 75.34;
double relHum =
specificHumidityToRelativeHumidity(specificHumidity, temp1, pressure1);
ASSERT_NEAR(expectRelHum1, relHum, expectRelHum1 * tolerance);
relHum =
specificHumidityToRelativeHumidity(specificHumidity, temp2, pressure2);
ASSERT_NEAR(expectRelHum2, relHum, expectRelHum2 * tolerance);
relHum =
specificHumidityToRelativeHumidity(specificHumidity, temp3, pressure3);
ASSERT_NEAR(expectRelHum3, relHum, expectRelHum3 * tolerance);
}
TEST(radix, SpecificHumidity1)
{
double tolerance = 0.01;
double temp1 = 6.0 - ABS_ZERO_CELSIUS, pressure1 = 890.0,
temp2 = 1.5 - ABS_ZERO_CELSIUS, pressure2 = 550.0,
temp3 = -25.0 - ABS_ZERO_CELSIUS, pressure3 = 300.0,
specificHumidity = 1.0;
double expectRelHum1 = 15.29, expectRelHum2 = 12.971, expectRelHum3 = 59.66;
double relHum =
specificHumidityToRelativeHumidity(specificHumidity, temp1, pressure1);
ASSERT_NEAR(expectRelHum1, relHum, expectRelHum1 * tolerance);
relHum =
specificHumidityToRelativeHumidity(specificHumidity, temp2, pressure2);
ASSERT_NEAR(expectRelHum2, relHum, expectRelHum2 * tolerance);
relHum =
specificHumidityToRelativeHumidity(specificHumidity, temp3, pressure3);
ASSERT_NEAR(expectRelHum3, relHum, expectRelHum3 * tolerance);
}
TEST(radix, SpecificHumidityPoint25)
{
double tolerance = 0.01;
double temp1 = 32.0 - ABS_ZERO_CELSIUS, pressure1 = 1050.0,
temp2 = 6.5 - ABS_ZERO_CELSIUS, pressure2 = 650.0,
temp3 = -25.0 - ABS_ZERO_CELSIUS, pressure3 = 250.0,
specificHumidity = 0.25;
double expectRelHum1 = 0.88722, expectRelHum2 = 2.6997, expectRelHum3 = 12.44;
double relHum =
specificHumidityToRelativeHumidity(specificHumidity, temp1, pressure1);
ASSERT_NEAR(expectRelHum1, relHum, expectRelHum1 * tolerance);
relHum =
specificHumidityToRelativeHumidity(specificHumidity, temp2, pressure2);
ASSERT_NEAR(expectRelHum2, relHum, expectRelHum2 * tolerance);
relHum =
specificHumidityToRelativeHumidity(specificHumidity, temp3, pressure3);
ASSERT_NEAR(expectRelHum3, relHum, expectRelHum3 * tolerance);
}
...@@ -228,4 +228,75 @@ double exponentialIntegral(double d) ...@@ -228,4 +228,75 @@ double exponentialIntegral(double d)
return numer / denom / (d * std::exp(d)); return numer / denom / (d * std::exp(d));
} }
Real absoluteTemperature(Real potentialTemp, Real pressure)
{
// Gas constant / specific heat capacity at constant pressure for air
double rDivCp = 0.286;
// Reference pressure (mb)
double refPressure = 1000.0;
double expComponent = pow((refPressure / pressure), rDivCp);
double temp = potentialTemp / expComponent;
return temp;
}
Real saturationVaporPressure(Real absTemp, Real pressure)
{
// Convert temperature to C and limit range to -45 < temp < +60
double tempC = absTemp + ABS_ZERO_CELSIUS;
tempC = std::max(-45.0, std::min(60.0, tempC));
// Calculate saturation vapour pressure
double satVapPress = 6.112 * exp(17.62 * tempC / (243.12 + tempC));
// Apply correction for moist air
double moistCorrection =
1.0 + (4.5 + 0.0006 * pow(tempC, 2)) * pressure * 1.0E-6;
satVapPress = satVapPress * moistCorrection;
return satVapPress;
}
Real mixingRatioToRelativeHumidity(Real mixingRatio, Real absTemp,
Real pressure)
{
// Calculate the saturation vapour pressure
double satVapPress = saturationVaporPressure(absTemp, pressure);
// Calculate the vapour pressure
double vapPress =
mixingRatio / (MASS_RATIO_WATER_VAPOR_DRY_AIR + mixingRatio) * pressure;
// Calculate the relative humidity - ensure it is 0 < humidity < 100
double relHum = 100.0 * vapPress / satVapPress;
relHum = std::max(0.0, std::min(100.0, relHum));
return relHum;
}
Real specificHumidityToRelativeHumidity(Real specificHumidity, Real absTemp,
Real pressure)
{
// Convert input specific humidity from g/kg to kg/kg
specificHumidity = specificHumidity / 1000.0;
// Calculate the saturation vapour pressure
double satVapPress = saturationVaporPressure(absTemp, pressure);
// Calculate the vapour pressure
double vapPress = specificHumidity /
(MASS_RATIO_WATER_VAPOR_DRY_AIR +
(1 - MASS_RATIO_WATER_VAPOR_DRY_AIR) * specificHumidity) *
pressure;
// Calculate the relative humidity - ensure it is 0 < humidity < 100
double relHum = 100.0 * vapPress / satVapPress;
relHum = std::max(0.0, std::min(100.0, relHum));
return relHum;
}
} // namespace radix } // namespace radix
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
namespace radix namespace radix
{ {
/** /**
* @brief hpaToAltitude converts hectorpascals or millibars to altitude (meters) * @brief hpaToAltitude converts hectopascals or millibars to altitude (meters)
* @param hpa hectorpascals in millibars * @param hpa hectorpascals in millibars
* @param temperature in kelvin (default=288.15) * @param temperature in kelvin (default=288.15)
* @param msle mean sea level pressure (default=1013.25) * @param msle mean sea level pressure (default=1013.25)
...@@ -26,6 +26,48 @@ namespace radix ...@@ -26,6 +26,48 @@ namespace radix
*/ */
Real RADIX_PUBLIC hpaToAltitude(Real hpa, Real temperature = 288.15, Real RADIX_PUBLIC hpaToAltitude(Real hpa, Real temperature = 288.15,
Real msle = 1013.25); Real msle = 1013.25);
/**
* @brief absoluteTemperature Get the temperature of an air parcel given its
* potential temperature and pressure
* @param potentialTemp Potential temperature in Kelvin
* @param pressure Pressure in mb
* @return Absolute temperature (K)
*/
Real RADIX_PUBLIC absoluteTemperature(Real potentialTemp, Real pressure);
/**
* @brief saturationVaporPressure Calculate the saturation pressure of an air
* parcel given its absolute temperature and pressure
* @param absTemp Absolute temperature in Kelvin
* @param pressure Pressure in mb
* @return Saturation vapour pressure (mb)
*/
Real RADIX_PUBLIC saturationVaporPressure(Real absTemp, Real pressure);
/**
* @brief mixingRatioToRelativeHumidity Get the relative humidity of an air
* parcel given a mixing ratio, temperature and pressure
* @param mixingRatio Mixing ratio (g/g)
* @param absTemp Absolute temperature (K)
* @param pressure Pressure (mb)
* @return Relative humidity (%)
*/
Real RADIX_PUBLIC mixingRatioToRelativeHumidity(Real mixingRatio, Real absTemp,
Real pressure);
/**
* @brief specificHumidityToRelativeHumidity Get the relative humidity of an air
* parcel given a specific humidity, temperature and pressure
* @param specificHumidity Specific humidity (g/kg)
* @param absTemp Absolute temperature (K)
* @param pressure Pressure (mb)
* @return Relative humidity (%)
*/
Real RADIX_PUBLIC specificHumidityToRelativeHumidity(Real specificHumidity,
Real absTemp,
Real pressure);
/** /**
* @brief cspanf returns a value in the interval (begin,end] * @brief cspanf returns a value in the interval (begin,end]
* This function is used to reduce periodic variables to a standard range. * This function is used to reduce periodic variables to a standard range.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment