Open mpvginde opened 1 week ago
@mpvginde, thank your for reporting this issue.
My reply below is not a solution rather an explanation.
This happens when the temperature is < 0C. If you try e.g. t = 277.5 your example will work. This is down to the saturation vapour pressure
formula used in the computations, see:
By default it uses the phase="mixed" option (the other values are "water" and "ice"), which for t > 0C is the same as phase="water". Some of the methods allow specifying the phase
keyword, but not the relative/specific humidity ones, which always use the default saturation vapour pressure.
The dewpoint is computed by inverting this formula to find the temperature from the saturation vapour pressure. However, this is always done with the phase="water" option. So this results in the discrepancy for t < 0C values.
We will review these computations and come up with a solution.
Thanks @sandorkertesz, For the explanation.
So if I understand correct, in case of t <= 0C it is best to go from specific hum. to dewpoint to relative hum. As this will take into account the mixed phase.
What happened?
When starting from a given pressure, specific humidity and temperature, using
earthkit.meteo.thermo
functions to calculatespecific humidity --> dewpoint temperature --> relative humidity
andspecific humidity --> relaitve humidity
results in different results for relative humidity.What are the steps to reproduce the bug?