dewpoint_from_specific_humidity

dewpoint_from_specific_humidity(q[, p])

Computes the dewpoint temperature from the given specific humidity (q) and pressure (p).

Parameters
  • q (number, ndarray or Fieldset) – specific humidity (kg/kg)

  • p (number, ndarray or Fieldset) – pressure (Pa)

Return type

same type as q or None

The result is the dewpoint temperature in K units. On error None is returned. The following rules are applied when q is a Fieldset:

  • if q is a pressure level Fieldset no p is needed

  • if q is defined on ECMWF model levels (hybrid/eta) p must be either a single LNSP (logarithm of surface pressure, identified by paramId=152) field or a Fieldset defining the pressure on the same levels as q

  • for other level types p must be a Fieldset defining the pressure on the same levels as q.

The computation is based on the following equation:

\[e(q, p) = e_{wsat}(td)\]
where: