earthkit.meteo.thermo.virtual_potential_temperature¶
- earthkit.meteo.thermo.virtual_potential_temperature(t: ArrayLike, q: ArrayLike, p: ArrayLike) ArrayLike¶
- earthkit.meteo.thermo.virtual_potential_temperature(t: xarray.DataArray, q: xarray.DataArray, p: xarray.DataArray) xarray.DataArray
- earthkit.meteo.thermo.virtual_potential_temperature(t: earthkit.data.FieldList, q: earthkit.data.FieldList, p: earthkit.data.FieldList) earthkit.data.FieldList
Compute the virtual potential temperature from temperature and specific humidity.
- Parameters:
t (
numberorarray-like) – Temperature (K)q (
numberorarray-like) – Specific humidity (kg/kg)p (
numberorarray-like) – Pressure (Pa)
- Returns:
Virtual potential temperature (K)
- Return type:
numberorarray-like
The computation is based on the following formula:
\[\Theta_{v} = \theta (1 + \frac{1 - \epsilon}{\epsilon} q)\]where:
\(\Theta\) is the
potential_temperature()\(\epsilon = R_{d}/R_{v}\) (see
earthkit.meteo.constants.epsilon).
Implementations¶
virtual_potential_temperature()calls one of the following implementations depending on the type of the input arguments:earthkit.meteo.thermo.array.virtual_potential_temperature()for array-likeearthkit.meteo.thermo.xarray.virtual_potential_temperature()for xarray.DataArrayearthkit.meteo.thermo.fieldlist.virtual_potential_temperature()for FieldList
The function returns an object of the same type as the input arguments.