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
- earthkit.meteo.thermo.temperature_from_potential_temperature(th: earthkit.data.Field, p: earthkit.data.Field | None = None) earthkit.data.Field
Compute the temperature from potential temperature.
- Parameters:
th (
array-like | xarray.DataArray | FieldList | Field) – Potential temperature (K)p (
array-like | xarray.DataArray | FieldList | Field) – Pressure (Pa)
- Returns:
Temperature (K)
- Return type:
array-like | xarray.DataArray | 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).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 | Field
The function returns an object of the same type as the input arguments.