Skip to content

Instantly share code, notes, and snippets.

Created September 17, 2020 11:44
What would you like to do?
import numpy as np
def calculate_abs_humidity_np(temperature, relative_humidity):
""" Calculates absolute humidity from temperature and relative humidity """
t = temperature
rh = relative_humidity
abs_humidity = (6.112 * np.exp((17.67*t)/(t+243.5)) * rh * 2.1674)/(273.15+t)
return abs_humidity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment