specific_humidity_from_relative_humidity
- specific_humidity_from_relative_humidity(t, r[, p])
New in Metview version 5.14.0.
Computes the specific humidity from the given temperature (
t), relative_humidity (r) and pressure (p).- Parameters
- Return type
same type as
tor None
The result is the specific humidity in kg/kg units. On error None is returned. The following rules are applied when
tandrareFieldsetobjects:if
tis a pressure levelFieldsetnopis neededif
tis 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 astfor other level types
pmust be aFieldsetdefining the pressure on the same levels ast
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:
\[r = 100 \frac {e(q, p)}{e_{msat}(t)}\]- where:
e is the vapour pressure (see
vapour_pressure())emsat is the saturation vapour pressure based on the “mixed” phase (see
saturation_vapour_pressure())t is the temperature
r is the relative humidity
Note
See also
relhum()andrelative_humidity_from_specific_humidity().