.. _relhum_icon: relhum =============================================== .. container:: .. container:: leftside .. image:: /_static/RELHUM.png :width: 48px .. container:: rightside Computes the relative humidity from temperature, specific humidity and logarithm of surface pressure (LNSP) GRIB data. LNSP is only required if the input data is specified on ECMWF model levels. When the result is a :class:`Fieldset` the ecCodes **paramId** in the output is set to 157 (=relative humidity). The computation is based on the following formula: .. math:: r = 100 \frac {e(q, p)}{e_{msat}(t)} where: * e is the vapour pressure (see :func:`vapour_pressure`) * e\ :sub:`msat` is the saturation vapour pressure based on the "mixed" phase (see :func:`saturation_vapour_pressure`) * q is the specific humidity * p is the pressure * t is the temperature .. note:: This function performs the same task as the **Relative Humidity** icon in Metview’s :ref:`user interface `. It accepts its parameters as keyword arguments, described below. .. py:function:: relhum(**kwargs) Computes the relative humidity from temperature and specific humidity GRIB data. :param data: Specifies the temperature and specific humidity input GRIB data required for the application. If the input is defined on ECMWF (hybrid/eta) model levels it must contain a Logarithm of Surface Pressure field as well (it must have the ecCodes paramId of 152). :type data: :class:`Fieldset` :rtype: :class:`Fieldset` .. mv-minigallery:: relhum