earthkit.meteo.thermo.fieldlist.temperature_from_potential_temperature

earthkit.meteo.thermo.fieldlist.temperature_from_potential_temperature(th, p=None)

Compute the temperature from potential temperature.

Parameters:
  • th (FieldList|Field) – Potential temperature (K).

  • p (FieldList|Field|Iterable[float]|float|None) – Pressure (Pa). If None, inferred from the field metadata of th. Otherwise, if th is a FieldList p must be a FieldList or an array-like of the same length as th. If th is a Field, p must be a single Field or a float.

Returns:

Temperature (K). The result has the same type as the input th (FieldList or Field).

Return type:

FieldList|Field

The computation is based on the following formula:

\[t = \theta (\frac{p}{10^{5}})^{\kappa}\]

with \(\kappa = R_{d}/c_{pd}\) (see earthkit.meteo.constants.kappa).