Follow

Just for the fun of it, I implemented a very small function that calculates the dew point at a given and relative (RH).
Now, I'm kind of lost how to calculate how RH changes with pressure.

```python
import numpy as np

def dew_point(T, RH):
Md_by_Ml = 0.622
K1 = 6.112 # hPa
K2 = 17.62 if T >= 0. else 22.46
K3 = 243.12 if T >= 0. else 272.62 # °C
lnRH = np.log(RH)
q = K2/(K3+T)
tau = K3 * (q*T + lnRH)/(q*K3 - lnRH)

return tau
```

I'm not from the field, so be gentle with me please 🥹

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.