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 (
numberorarray-like) – Potential temperature (K)p (
numberorarray-like) – Pressure (Pa)
- Returns:
Temperature (K)
- Return type:
numberorarray-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:earthkit.meteo.thermo.array.temperature_from_potential_temperature()for array-likeearthkit.meteo.thermo.xarray.temperature_from_potential_temperature()for xarray.DataArrayearthkit.meteo.thermo.fieldlist.temperature_from_potential_temperature()for FieldList
The function returns an object of the same type as the input arguments.