<p>Just in case it will save a great deal of time for others in the future, ill recommend the metpy package.</p>
<p><a href="https://unidata.github.io/MetPy/latest/api/generated/metpy.calc.specific_humidity_from_dewpoint.html" rel="nofollow noreferrer">https://unidata.github.io/MetPy/latest/api/generated/metpy.calc.specific_humidity_from_dewpoint.html</a></p>

CC BY-SA 4.0
2021-06-05T12:20:27.743Z
Please expand the answer to detail the specifics of the package
arkaia
CC BY-SA 4.0
2021-06-05T13:43:44.470Z
The specifics are detailed in the link. In summary, it's a python function that requires the surface pressure and the dew point temperature and computes the specific humidity from these two variables.
innomask
CC BY-SA 4.0
2021-11-16T10:50:38.110Z
Yeah but the question is: is the equation shown in my question for saturated specific humidity? and if so, how can I calculate the specific humidity? (rather than saturated?
Xu Shan
CC BY-SA 4.0
2021-06-05T11:48:25.163Z
2021-06-05T11:48:25.163Z
innomask
<p>The answer is easy. Replace <span class="math-container">$T$</span> with <span class="math-container">$T_d$</span>, where <span class="math-container">$T_d$</span> is the dewpoint temperature.</p>
<p>I will say I am not all that familiar with those equations, but that is besides the point.</p>

CC BY-SA 4.0
2021-02-23T16:37:05.837Z
2021-02-23T16:37:05.837Z
BarocliniCplusplus
<p>I am using ERA5 data to drive the land surface model. One of the forcing required by LSM is specific humidity. We want to use the 2-m specific humidity. So how can I calculate the specific humidity based on dew point at 2 meters, surface pressure at 2 meters and temperature at 2 meters? I saw in ERA5 documentation we can calculate the 'saturated specific humidity' by some equations (<a href="https://confluence.ecmwf.int/display/CKB/ERA5%3A+data+documentation#ERA5:datadocumentation-Computationofnear-surfacehumidityandsnowcover" rel="nofollow noreferrer">https://confluence.ecmwf.int/display/CKB/ERA5%3A+data+documentation#ERA5:datadocumentation-Computationofnear-surfacehumidityandsnowcover</a>).
<a href="https://i.sstatic.net/qPpwO.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/qPpwO.png" alt="enter image description here" /></a>
But how can I get the specific humidity?</p>
<p>Thanks and hope for your early reply!</p>

<meteorology><climate-models><humidity><land-surface><land-surface-models>
How to calculate the specific humidity based on the saturated specific humidity?
Xu Shan
# How to calculate the specific humidity based on the saturated specific humidity?

(Asked by: username_0 on 2021-02-23)

I am using ERA5 data to drive the land surface model. One of the forcing required by LSM is specific humidity. We want to use the 2-m specific humidity. So how can I calculate the specific humidity based on dew point at 2 meters, surface pressure at 2 meters and temperature at 2 meters? I saw in ERA5 documentation we can calculate the 'saturated specific humidity' by some equations (<https://confluence.ecmwf.int/display/CKB/ERA5%3A+data+documentation#ERA5:datadocumentation-Computationofnear-surfacehumidityandsnowcover>).
[![enter image description here](https://i.sstatic.net/qPpwO.png)](https://i.sstatic.net/qPpwO.png)
But how can I get the specific humidity?

Thanks and hope for your early reply!

**Tags:** meteorology, climate-models, humidity, land-surface, land-surface-models


---

## 2 answers

### Answer by username_1 on 2021-06-05. Score: 1

Just in case it will save a great deal of time for others in the future, ill recommend the metpy package.

<https://unidata.github.io/MetPy/latest/api/generated/metpy.calc.specific_humidity_from_dewpoint.html>

> **Comments:**
> **username_2**: Please expand the answer to detail the specifics of the package  
> **username_1**: The specifics are detailed in the link. In summary, it's a python function that requires the surface pressure and the dew point temperature and computes the specific humidity from these two variables.  
> **username_0**: Yeah but the question is: is the equation shown in my question for saturated specific humidity? and if so, how can I calculate the specific humidity? (rather than saturated?  

---

### Answer by username_3 on 2021-02-23. Score: 1

The answer is easy. Replace $T$ with $T\_d$, where $T\_d$ is the dewpoint temperature.

I will say I am not all that familiar with those equations, but that is besides the point.


---

