earthkit.meteo.thermo.fieldlist.relative_humidity_from_specific_humidity¶
- earthkit.meteo.thermo.fieldlist.relative_humidity_from_specific_humidity(t, q, p=None)¶
Compute the relative humidity from specific humidity.
- Parameters:
t (
FieldList|Field) – Temperature (K).q (
FieldList|Field) – Specific humidity (kg/kg).p (
FieldList|Field|Iterable[float]|float|None) – Pressure (Pa). If None, inferred from the field metadata oft. Otherwise, iftis a FieldListpmust be a FieldList or an array-like of the same length ast. Iftis a Field,pmust be a single Field or a float.
- Returns:
Relative humidity (%). The result has the same type as the input
tandq(FieldList or Field).- Return type:
FieldList|Field
The computation is based on the following formula:
\[r = 100 \frac {e(q, p)}{e_{msat}(t)}\]where:
\(e\) is the vapour pressure (see
vapour_pressure_from_specific_humidity())\(e_{msat}\) is the
saturation_vapour_pressure()based on the “mixed” phase