Versions Compared

Key

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

...

Computes the Lifted Condensation Level (LCL) of a parcel ascending from a given temperature, dewpoint and pressure, where

...

The result is the mixing ratio in kg/kg units. On error  error nil is returned. The computation is based on the following well known formula:

Mathdisplay
\w = \frac{q}{1 - q}


number mixing_ratio_from_vapour_pressure(number p, number e)

...

The result is the mixing ratio in kg/kg units. On error  nil is returned. The computation is based on the following formula:

Mathdisplay
\w = \epsilon \frac{e}{p - e}

where

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



number potential_temperature(number t, number p)

...

The result is the potential temperature in K units. On error  nil is returned.


number relative_humidity(number t, number q, number p)

Computes the relative humidity for a given temperature, specific humidity and pressure, where

    • t: temperature (K)
    • q: specific humidity (kg/kg)
    • p: pressure (Pa)

The result is the relative humidity in the range of [0, 1]. On error nil is returned. The computation is based on the following formula:

Mathdisplay
r = \frac{e(q, p)}{e_{sat}(t)}

where e is the vapour pressure and esat is the saturation vapour pressure.


number saturation_mixing_ratio(number t, number p)

...

The result is the saturation mixing ratio in kg/kg units. On error nil is returned. The computation is implemented via the following function calls:

ws = mixing_ratio(p, saturation_vapour_pressure(t))


number saturation_vapour_pressure(number t)

Computes the saturation vapour pressure for a given temperature, where

    • t: the temperature (°CK)

The result is the saturation vapour pressure in Pa units. On error  error nil is returned. The computations are based on the same a mixed-phase Tetens formula that is used by IFS for diagnostic purposes (see here on p116 for details from the details for latest model cycle (CY45R1, the latest at the time of the writing of this documentation).

...

    • th:the potential temperature (°CK)
    • p: the pressure (hPaPa)

The result is the temperature in °C K units. On error  error nil is returned.


netcdf thermo_bufr(...)

...

The function returns a definition to describe all the parameters related to the parcel's ascend. The members of this definition are as follows (temperature values are in °C and pressure values are in hPa) :

    • path: the path of the parcel. It is itself a definition with two members: t and p, each containing a list of values.
    • area: the positive and negative buoyancy areas between the parcel path and the profile. It is a list of definitions describing the areas.
    • cape: the value of the CAPE (Convective Available Potential Energy)  (J/kg)
    • cin: value the CIN (Convective Inhibition) (J/kg)
    • lcl: the Lifted Condensation Level. It is a definition with two members: t and p. If no LCL exists it is set to nil.
    • lfc: the Level of Free Convention. It is a definition with two members: t and p. If no LFC exists it is set to nil.
    • el: the Equilibrium Level. It is a definition with two members: t and p. If no EL exists it is set to nil.
    • top: the Cloud Top Level. It is a definition with two members: t and p. If no TOP exists it is set to nil.
    • start: the start conditions of the parcel with four members: mode, t, td and p.

...

Mathdisplay
\frac{p\;q}{\epsilon\; (1 + q(\frac{1}{\epsilon} -1 )}

where with

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

...