There are several VPD algorithms that are essentially estimations applicable to specific circumstances. Here are a couple that are most applicable (with reasonable error) for the temperature ranges we’d typically consider. It’s been awhile since I looked at this but from what I recall, three steps, here:
- Saturation pressure (aka partial pressure of water)
- Vapor pressure
- Vapor pressure deficit
(1) Saturation pressure
These calculate the “saturation pressure”:
Goff Gratch (1984):
where the equations differ depending if the temperature is > 0 celcius or < 0 celcius, respectively. The variables a(n), b(n), c(n), and g(n) are fixed coefficients:
Note that temperatures (T) input to the Goff-Gratch algorithm is in Kelvin and output is hPa (kPa = hPa / 10).
Another one,
Teten (1960s?):
Accurate for temperatures > 0 Celcius only:
where temperature (t) for Teten is in Celcius and output is kPa.
(2) Vapor Pressure
Then you calculate the vapor pressure of the atmosphere from the saturation pressure:
vapor pressure atmosphere = Rh * Es
and the vapor pressure of the leaf:
vapor pressure leaf = (1) * Es
Es is from the above calculated saturation pressure. Rh is the relative humidity. Calculate both the leaf and the atmosphere vapor pressures.
A leaf has 100% humidity (but the temperature may be different). For simplicity, you can estimate the leaf temperature or just say it’s the same as the surrounding air. The leaf temperature does impact the VPD and is an important consideration for determining the leaf transpiration.
(3) Vapor pressure deficit
VPD = (vapor pressure leaf) - (vapor pressure atmosphere)
Done. Pay attention to consistency of the units when applying these algorithms.
Some interesting observations, notice that the vapor pressure (partial pressures) is distilled down to the difference in the relative humidity between the leaf and the surrounding air! A non-dead leaf is considered to be “100% humid” no matter the temperature. If the air happens to also be 100% humid and the temperature of the leaf and the air happen to be the same, VPD would be zero = no transpiration possible.
The specific portion for calculating the saturation pressure in the C / C++ code is (for Goff Gratch):
double a1 = -7.90298 * (373.16 / Tkelvin() - 1.0);
double a2 = 5.02808 * log10(373.16 / Tkelvin() );
double a3 = (-1.3816 / 10000000) * (powf(10, 11.344*(1.0 - Tkelvin() / 373.16)) - 1.0);
double a4 = (8.1328 / 1000) * (powf(10, -3.49149*(373.16 / Tkelvin() - 1.0) - 1.0) );
double vapor_pressure = a1 + a2 + a3 + a4 + log10(1013.246);
return (powf(10.0,vapor_pressure)/10.0);
where TKelvin is the temperature in Kelvin. powf in the above calculates 10^(some number) as a floating point number. log10 is the log base 10 of some number. Other operators are typical mathematical operations. Double means floating point number (not integer). Most of the rest of the code is doing other things such as converting temperatures. Compare this to the above formula for Goff-Gratch.
This would be the “meat” of the problem(step 1). Then apply steps two and three as noted above.
It should be straight forward to convert that portion to over to Python since it’s mainly maths. Let me know if you run into trouble.