def _actual_vapor_pressure(q, pair):
    """"Actual vapor pressure from specific humidity

    Parameters
    ----------
    q : ee.Image or ee.Number
        Specific humidity [kg/kg].
    pair : ee.Image or ee.Number
        Air pressure [kPa].

    Returns
    -------
    ea : ee.Image or ee.Number
        Actual vapor pressure [kPa].

    Notes
    -----
    ea = q * pair / (0.622 + 0.378 * q)

    """
    return q.multiply(0.378).add(0.622).pow(-1).multiply(q).multiply(pair)
