<p>I think you might be getting confused. There is relative humidity. If you put in different values, you will get different results. For instance, if you replace the variable names of one of your functions (say replace Min with Max), you will have the same exact function.</p>
<p>Relative humidity is a ratio of the amount of water vapor in the air to the amount of water vapor that could be in the air (saturation vapor pressure <span class="math-container">$e_s$</span>): <span class="math-container">$$RH=100\%\times\frac{e}{e_s}$$</span> Since the saturation vapor pressure decreases with increasing temperature (<a href="https://en.wikipedia.org/wiki/Clausius%E2%80%93Clapeyron_relation" rel="nofollow noreferrer">Clausius Clapeyeron equation</a>):<span class="math-container">$$e_s=611 \exp\left(\frac{L_v}{R_v}\left[\frac{1}{273.15}-\frac{1}{T}\right]\right)$$</span> it is conceivable, and also not uncommon, for the maximum relative humidity to occur when the temperature and specific humidity is at a minimum.</p>
<p>So can the minimum relative humidity be greater than the maximum relative humidity? By definition of minimum and maximum, no. But the times that the minimum and maximum relative humidity occur are often counter-intuitive.</p>

CC BY-SA 4.0
2020-07-15T16:42:21.050Z
2020-07-15T16:42:21.050Z
BarocliniCplusplus
<p>To calculate the minimum and maximum relative humidity you will need to measure temperature and specific humidity all through the day (the more often you measure, the more accurate it will be), calculate the value of the relative humidity for every measurement, and then choose the lowest and highest values.</p>

<p>If the specific humidity is not changing much (stable weather conditions), you will get the maximum relative humidity when the temperature is lowest and the minimum relative humidity when the temperature is highest. This is because the relative humidity is the specific humidity divided by the saturation humidity, and the saturation humidity increases with increasing temperature following the <a href="https://en.wikipedia.org/wiki/Clausius%E2%80%93Clapeyron_relation" rel="nofollow noreferrer">Clausius-Clapeyron</a> relationship. Hence, you can get an estimate of the minimum and maximum relative humidity from your measurements: you need to switch  the values and everything will make sense: maximum 80%, minimum 50%.</p>

CC BY-SA 4.0
2020-02-16T08:04:47.157Z
2020-02-16T08:04:47.157Z
M Juckes
<p>I am trying to calculate minimum and maximum daily Relative Humidity values given a min/max Specific Humidity and min/max Temperature.</p>

<p>I found <a href="https://earthscience.stackexchange.com/questions/2360/how-do-i-convert-specific-humidity-to-relative-humidity">some equations here</a> that work with the given variables, but I have noticed that occasionally the value calculated for Minimum Relative Humidity will be greater than the value calculated for Maximum Relative Humidity. Is this accurate? It feels incorrect that a lower specific humidity and temperature would lead to a higher relative humidity, and it also doesn't seem right to say that, for example, the minimum RH was 80% while the maximum RH was 50%. </p>

<p>I verified <a href="https://www.rotronic.com/en-us/humidity_measurement-feuchtemessung-mesure_de_l_humidite/humidity-calculator-feuchterechner-mr" rel="nofollow noreferrer">my results with this online calculator</a>, and while it is unclear what equations are being used here, the same scenario occurs.</p>

<p>Here are my C# functions for calculating RH. Specific Humidity is given as kg/kg, and Temperature in Celsius:</p>

<pre><code>    public static double CalculateRHmin(double MinSpecificHumidity, double MinTemperature)
    {
        double RHmin = 0.0;
        double es = 6.112 * Math.Exp((17.67 * MinTemperature)/(MinTemperature + 243.5)); 
        double e = MinSpecificHumidity * 1013.25 / (0.378 * MinSpecificHumidity + 0.622);
        RHmin = 100 * (e / es);
        return RHmin;
    }

    public static double CalculateRHmax(double MaxSpecificHumidity, double MaxTemperature)
    {
        double RHmax = 0.0;
        double es = 6.112 * Math.Exp((17.67 * MaxTemperature) / (MaxTemperature + 243.5));
        double e = MaxSpecificHumidity * 1013.25 / (0.378 * MaxSpecificHumidity + 0.622);
        RHmax = 100 * (e / es);
        return RHmax;
    }
</code></pre>

<p>Sample execution:</p>

<p>Tmin(Celsius) = 12.71    SHmin(kg/kg) = 0.007672     RHmin = 84.71%</p>

<p>Tmax(Celsius) = 23.71    SHmax(kg/kg) = 0.010929     RHmax = 60.33%</p>

CC BY-SA 4.0
2019-02-04T21:22:33.260Z
As your code now stands, both functions return identical results for the same input. Did you perhaps forget to change the coefficients in one of them?
Spencer
CC BY-SA 4.0
2019-02-04T21:41:59.087Z
The coefficients are the same, but the inputs will not be the same. I guess having the same equation as two different functions is unnecessary, but I have edited the code to make it more clear as well as added some sample data.
joshk94
CC BY-SA 4.0
2019-02-05T01:22:09.630Z
You'll really just want one CalculateRH function ... and then run it through the day. Indeed, you can't use max or min specific humidity/temp values to help... it's about how the specific humidity and temp are related (how "full the air is"), and lower temp/specific humidity can still make higher RH. For example, 0C and mixing ratio of 3.75ish is ~100% full (near sea level). But if it heats up to 20C during the day and the mixing ratio increased to 4, that's only ~27% RH, because the air can hold much more water then. So calculate RH for every ob and replace max/min if higher/lower.
JeopardyTempest
CC BY-SA 4.0
2019-02-05T01:22:41.200Z
(Indeed RH is basically always highest at night and lowest during the daytime.  I think most active meteorologists find relative humidity less useful in terms of getting a useful idea of what's going on in the atmosphere in most circumstances)
JeopardyTempest
CC BY-SA 4.0
2019-02-05T01:28:03.320Z
Your `CalculateRHmin` implicitly assumes that relative humidity is lowest when the temperature is lowest. That's exactly opposite of how things work. The highest relative humidity typically occurs right around sunrise. It's why so many areas have morning fog.
David Hammen
<temperature><humidity>
Can minimum relative humidity be greater than maximum relative humidity?
joshk94
# Can minimum relative humidity be greater than maximum relative humidity?

(Asked by: username_0 on 2019-02-04)

I am trying to calculate minimum and maximum daily Relative Humidity values given a min/max Specific Humidity and min/max Temperature.

I found [some equations here](https://earthscience.stackexchange.com/questions/2360/how-do-i-convert-specific-humidity-to-relative-humidity) that work with the given variables, but I have noticed that occasionally the value calculated for Minimum Relative Humidity will be greater than the value calculated for Maximum Relative Humidity. Is this accurate? It feels incorrect that a lower specific humidity and temperature would lead to a higher relative humidity, and it also doesn't seem right to say that, for example, the minimum RH was 80% while the maximum RH was 50%.

I verified [my results with this online calculator](https://www.rotronic.com/en-us/humidity_measurement-feuchtemessung-mesure_de_l_humidite/humidity-calculator-feuchterechner-mr), and while it is unclear what equations are being used here, the same scenario occurs.

Here are my C# functions for calculating RH. Specific Humidity is given as kg/kg, and Temperature in Celsius:

```
    public static double CalculateRHmin(double MinSpecificHumidity, double MinTemperature)
    {
        double RHmin = 0.0;
        double es = 6.112 * Math.Exp((17.67 * MinTemperature)/(MinTemperature + 243.5)); 
        double e = MinSpecificHumidity * 1013.25 / (0.378 * MinSpecificHumidity + 0.622);
        RHmin = 100 * (e / es);
        return RHmin;
    }

    public static double CalculateRHmax(double MaxSpecificHumidity, double MaxTemperature)
    {
        double RHmax = 0.0;
        double es = 6.112 * Math.Exp((17.67 * MaxTemperature) / (MaxTemperature + 243.5));
        double e = MaxSpecificHumidity * 1013.25 / (0.378 * MaxSpecificHumidity + 0.622);
        RHmax = 100 * (e / es);
        return RHmax;
    }

```

Sample execution:

Tmin(Celsius) = 12.71 SHmin(kg/kg) = 0.007672 RHmin = 84.71%

Tmax(Celsius) = 23.71 SHmax(kg/kg) = 0.010929 RHmax = 60.33%

**Tags:** temperature, humidity

> **Comments:**
> **username_1**: As your code now stands, both functions return identical results for the same input. Did you perhaps forget to change the coefficients in one of them?  
> **username_0**: The coefficients are the same, but the inputs will not be the same. I guess having the same equation as two different functions is unnecessary, but I have edited the code to make it more clear as well as added some sample data.  
> **username_2**: You'll really just want one CalculateRH function ... and then run it through the day. Indeed, you can't use max or min specific humidity/temp values to help... it's about how the specific humidity and temp are related (how "full the air is"), and lower temp/specific humidity can still make higher RH. For example, 0C and mixing ratio of 3.75ish is ~100% full (near sea level). But if it heats up to 20C during the day and the mixing ratio increased to 4, that's only ~27% RH, because the air can hold much more water then. So calculate RH for every ob and replace max/min if higher/lower.  
> **username_2**: (Indeed RH is basically always highest at night and lowest during the daytime.  I think most active meteorologists find relative humidity less useful in terms of getting a useful idea of what's going on in the atmosphere in most circumstances)  
> **username_3**: Your `CalculateRHmin` implicitly assumes that relative humidity is lowest when the temperature is lowest. That's exactly opposite of how things work. The highest relative humidity typically occurs right around sunrise. It's why so many areas have morning fog.  

---

## 2 answers

### Answer by username_4 on 2020-07-15. Score: 2

I think you might be getting confused. There is relative humidity. If you put in different values, you will get different results. For instance, if you replace the variable names of one of your functions (say replace Min with Max), you will have the same exact function.

Relative humidity is a ratio of the amount of water vapor in the air to the amount of water vapor that could be in the air (saturation vapor pressure $e\_s$): $$RH=100\%\times\frac{e}{e\_s}$$ Since the saturation vapor pressure decreases with increasing temperature ([Clausius Clapeyeron equation](https://en.wikipedia.org/wiki/Clausius%E2%80%93Clapeyron_relation)):$$e\_s=611 \exp\left(\frac{L\_v}{R\_v}\left[\frac{1}{273.15}-\frac{1}{T}\right]\right)$$ it is conceivable, and also not uncommon, for the maximum relative humidity to occur when the temperature and specific humidity is at a minimum.

So can the minimum relative humidity be greater than the maximum relative humidity? By definition of minimum and maximum, no. But the times that the minimum and maximum relative humidity occur are often counter-intuitive.


---

### Answer by username_5 on 2020-02-16. Score: 0

To calculate the minimum and maximum relative humidity you will need to measure temperature and specific humidity all through the day (the more often you measure, the more accurate it will be), calculate the value of the relative humidity for every measurement, and then choose the lowest and highest values.

If the specific humidity is not changing much (stable weather conditions), you will get the maximum relative humidity when the temperature is lowest and the minimum relative humidity when the temperature is highest. This is because the relative humidity is the specific humidity divided by the saturation humidity, and the saturation humidity increases with increasing temperature following the [Clausius-Clapeyron](https://en.wikipedia.org/wiki/Clausius%E2%80%93Clapeyron_relation) relationship. Hence, you can get an estimate of the minimum and maximum relative humidity from your measurements: you need to switch the values and everything will make sense: maximum 80%, minimum 50%.


---

