pythermalcomfort icon indicating copy to clipboard operation
pythermalcomfort copied to clipboard

Humidity differences in py and r

Open Wangjiayi1115 opened this issue 1 year ago • 2 comments

Describe the bug

Here are the differences we have identified:

  • [ ] calculation of humidity

humidity

In py the calculation is link

hi = tdb + 5 / 9 * ((6.112 * 10 ** (7.5 * tdb / (237.7 + tdb)) * rh / 100) - 10)

In R the calculation is link

ta+5/9*(6.11*exp(5417.753*(1/273.15-1/(calcDewp(ta, rh)+273.15)))-10)

R Implementation: The calculation uses the dew point temperature (calcDewp) as an intermediate step.This approach is based on the Clausius-Clapeyron equation, leveraging the dew point to determine vapor pressure before calculating the Humidex.

Python Implementation: The calculation skips the dew point temperature and directly computes the saturated vapor pressure using Tetens’ formula. It simplifies the process by directly using the dry bulb temperature and relative humidity to calculate vapor pressure. @FedericoTartarini and Marcel to review

Wangjiayi1115 avatar Sep 12 '24 07:09 Wangjiayi1115