earthkit.meteo.thermo.array.virtual_temperature

earthkit.meteo.thermo.array.virtual_temperature(t, q)

Compute the virtual temperature from temperature and specific humidity.

Parameters:
  • t (number or array-like) – Temperature (K)s

  • q (number or array-like) – Specific humidity (kg/kg)

Returns:

Virtual temperature (K)

Return type:

number or array-like

The computation is based on the following formula [Wallace2006]:

\[t_{v} = t (1 + \frac{1 - \epsilon}{\epsilon} q)\]

with \(\epsilon = R_{d}/R_{v}\) (see earthkit.meteo.constants.epsilon).