Created
June 27, 2023 11:32
-
-
Save lrodorigo/9d08ac68db1731c09472372e1047d24f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@staticmethod | |
def get_dew_point(t_air_c, rel_humidity): | |
"""Compute the dew point in degrees Celsius | |
:param t_air_c: current ambient temperature in degrees Celsius | |
:type t_air_c: float | |
:param rel_humidity: relative humidity in % | |
:type rel_humidity: float | |
:return: the dew point in degrees Celsius | |
:rtype: float | |
""" | |
A = 17.27 | |
B = 237.7 | |
alpha = ((A * t_air_c) / (B + t_air_c)) + math.log(rel_humidity / 100.0) | |
return (B * alpha) / (A - alpha) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment