specific_humidity_from_dewpoint
- specific_humidity_from_dewpoint(td[, p])
New in Metview version 5.13.0.
Computes the specific humidity from the given dewpoint (
td) and pressure (p).- Parameters
- Return type
same type as
tdor None
The result is the specific humidity in kg/kg units. On error None is returned. The following rules are applied when
tdis aFieldset:if
tdis a pressure levelFieldsetnopis neededif
tdis defined on ECMWF model levels (hybrid/eta)pmust be either a single LNSP (logarithm of surface pressure, identified by paramId=152) field or aFieldsetdefining the pressure on the same levels astdfor other level types
pmust be aFieldsetdefining the pressure on the same levels astd
When the result is a
Fieldsetthe ecCodes paramId in the output is set to 133 (=specific humidity).The computation is based on the following equation:
\[e(q, p) = e_{wsat}(td)\]- where:
e is the vapour pressure (see
vapour_pressure())ewsat is the saturation vapour pressure over water (see
saturation_vapour_pressure())td is the dewpoint temperature