earthkit.meteo.thermo.temperature_from_potential_temperature

earthkit.meteo.thermo.temperature_from_potential_temperature(th: ArrayLike, p: ArrayLike) ArrayLike
earthkit.meteo.thermo.temperature_from_potential_temperature(th: xarray.DataArray, p: xarray.DataArray) xarray.DataArray
earthkit.meteo.thermo.temperature_from_potential_temperature(th: earthkit.data.FieldList, p: earthkit.data.FieldList | None = None) earthkit.data.FieldList

Compute the temperature from potential temperature.

Parameters:
  • th (number or array-like) – Potential temperature (K)

  • p (number or array-like) – Pressure (Pa)

Returns:

Temperature (K)

Return type:

number or array-like

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).

Implementations

temperature_from_potential_temperature() calls one of the following implementations depending on the type of the input arguments:

The function returns an object of the same type as the input arguments.