pycequeau.meteo.calculators.vapor_pressure module

class pycequeau.meteo.calculators.vapor_pressure.VaporPressureCalculator[source]

Bases: MeteoCalculator

Compute saturated vapor pressure from dewpoint temperature.

The saturated vapor pressure is evaluated at the dewpoint temperature. Under that condition, the saturated vapor pressure is equal to the actual vapor pressure.

default_output_name: str | None = 'vp'
classmethod saturated_vapor_pressure(temperature_celsius: ndarray | DataArray, method: str = 'lowe_1977') ndarray | DataArray[source]

Compute saturated vapor pressure from air temperature.

The formulation is selected with method. lowe_1977 uses the polynomial approximation from Lowe (1977), while murray_1967 uses the exponential form from Murray (1967).

For lowe_1977, the saturated vapor pressure is computed with two sixth-order polynomials, one over liquid water and one over ice:

\[\begin{split}\begin{aligned} e_{s,w}(T) &= 100 \left(a_{0} + T\left(a_{1} + T\left(a_{2} + T\left(a_{3} + T\left(a_{4} + T\left(a_{5} + a_{6}T\right)\right)\right)\right)\right)\right) \\ e_{s,i}(T) &= 100 \left(a_{0} + T\left(a_{1} + T\left(a_{2} + T\left(a_{3} + T\left(a_{4} + T\left(a_{5} + a_{6}T\right)\right)\right)\right)\right)\right) \end{aligned}\end{split}\]

Here \(T\) is the temperature in \(^\circ C\), \(e_{s,w}\) is the saturated vapor pressure over water in \(Pa\), and \(e_{s,i}\) is the saturated vapor pressure over ice in \(Pa\).

For murray_1967, Murray gives the convenient exponential form:

\[\begin{split}\begin{aligned} e_{s,w}(T_{k}) &= 100 \times 6.1078 \exp\left(17.2693882 \frac{T_{k} - 273.16}{T_{k} - 35.86}\right) \\ e_{s,i}(T_{k}) &= 100 \times 6.1078 \exp\left(21.8745584 \frac{T_{k} - 273.16}{T_{k} - 7.66}\right) \end{aligned}\end{split}\]

Here \(T_{k}\) is the temperature in \(K\), \(e_{s,w}\) is the saturated vapor pressure over water in \(Pa\), and \(e_{s,i}\) is the saturated vapor pressure over ice in \(Pa\).

The result is returned in \(Pa\).

source_variable_groups: tuple[tuple[str, ...], ...] = (('d2m', 'dewpoint_temperature'),)
classmethod vapor_pressure_from_dewpoint_array(dewpoint_temperature: ndarray, method: str = 'lowe_1977') ndarray[source]

Compute vapor pressure from a dewpoint-temperature array.

The vapor pressure is obtained by evaluating the saturated vapor pressure at the dewpoint temperature:

\[e_{a} = e_{s}(T_{dew})\]

The returned values are expressed in \(mmHg\). The method argument selects the saturated-vapor-pressure formulation used by saturated_vapor_pressure().

classmethod vapor_pressure_from_dewpoint_dataarray(dewpoint_temperature: DataArray, method: str = 'lowe_1977') DataArray[source]

Compute vapor pressure from a dewpoint-temperature data array.

This method first converts the dewpoint temperature to degrees Celsius, then computes the saturated vapor pressure in \(Pa\), and finally converts the result to \(mmHg\).

The resulting vapor pressure is:

\[e_{a} = e_{s}(T_{dew})\]

Here \(e_{a}\) is the actual vapor pressure, \(e_{s}\) is the saturated vapor pressure function, and \(T_{dew}\) is the dewpoint temperature.

The method argument selects the saturated-vapor-pressure formulation used by saturated_vapor_pressure().

variable_name: str | None = 'vapor_pressure'