Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Mathinline
\epsilon = \frac{R_{dry}}{R_{vapour}} = 0.621981


number virtual_temperature(t: number, q: number)
vector virtual_temperature(t: vector, q: vector)
fieldset virtual_temperature(t: fieldset, q: fieldset)

New in Metview version 5.13.0.
Computes the virtual temperature from the given temperature and specific humidity:

  • temperature (K)
  • q: specific humidity (kg/kg)

The result is the virtual temperature in K units. On error nil is returned. When the result is a fieldset the ecCodes paramId in the output is set to 300012 (=virtual temperature). The computation is based on the following formula:

Mathinline
T_{v} = T (1 + \frac{1 - \epsilon}{\epsilon} q)

where

  • T is the temperature
  • q is the specific humidity
  • ε = 0.621981