Unidata / MetPy

MetPy is a collection of tools in Python for reading, visualizing and performing calculations with weather data.
https://unidata.github.io/MetPy/
BSD 3-Clause "New" or "Revised" License
1.26k stars 415 forks source link

saturation vapor pressure #1469

Open IslandOfDreams opened 4 years ago

IslandOfDreams commented 4 years ago

The Magnus type formula used fopr the calculation of saturation vapor pressure (thermo.py, line 771)

return sat_pressure_0c * np.exp(17.67 * (temperature - 273.15 * units.kelvin)
                                       / (temperature - 29.65 * units.kelvin))

refers to [Bolton1980].

Therein, Bolton explains (p. 1047): 'The following formula was fitted to Wexler's results, extrapolated for T < 0°C, to an accuracy of 0.1% for -30°C <= T <= 35°C: ...'

Since the Earth atmosphere shows a much greater temperature range of roughly -65°C <= T <= 50°C, Bolton's formula regularly gives less accurate results outside his recommended interval.

For a fruitful discussion of this topic see, e. g., Alduchov, Eskridge - Improved Magnus Form Approximation of Saturation Pressure.

The following formula as given by [Sonntag, 1990] assures a higher accuracy over a much extended temperature range (Python code):

return (math.exp ( -6096.9385 / T 
                 + 16.635794
                 - 2.711193 * T / 1.0e2
                 + 1.673952 / 1.0e5 * T*T
                 + 2.433502 * math.log (T)
                 ) * 100.0)      # conversion from hPa to Pa
             * units.Pascal.
with T: Temperature in KELVIN in the Temperature Scale 1990.
and     207,25 K <= T <= 334,05 K (i.e. -65.9°C <= T <= 60.9°C)

Reference: Sonntag D., 1990: Important new values of the physical constants of 1986, vapor pressure formulations based on ITS-90, and psychrometer formulae. Z. Meteorol., 70, 340-344.

dopplershift commented 4 years ago

Thanks for the suggestions. We'd definitely like to improve our calculation, see for instance #508. One other challenge is trying to make sure we maintain sufficient run-time performance, which of course requires defining what exactly that is.

Do you have some concrete examples (specifically, input values and references for output) where the current implementation is proving insufficient? That would help us document and justify changes we make.

wangxing181 commented 12 months ago

The Magnus type formula used fopr the calculation of saturation vapor pressure (thermo.py, line 771)

return sat_pressure_0c * np.exp(17.67 * (temperature - 273.15 * units.kelvin)
                                       / (temperature - 29.65 * units.kelvin))

refers to [Bolton1980].

Therein, Bolton explains (p. 1047): 'The following formula was fitted to Wexler's results, extrapolated for T < 0°C, to an accuracy of 0.1% for -30°C <= T <= 35°C: ...'

Since the Earth atmosphere shows a much greater temperature range of roughly -65°C <= T <= 50°C, Bolton's formula regularly gives less accurate results outside his recommended interval.

For a fruitful discussion of this topic see, e. g., Alduchov, Eskridge - Improved Magnus Form Approximation of Saturation Pressure.

The following formula as given by [Sonntag, 1990] assures a higher accuracy over a much extended temperature range (Python code):

return (math.exp ( -6096.9385 / T 
                 + 16.635794
                 - 2.711193 * T / 1.0e2
                 + 1.673952 / 1.0e5 * T*T
                 + 2.433502 * math.log (T)
                 ) * 100.0)      # conversion from hPa to Pa
             * units.Pascal.
with T: Temperature in KELVIN in the Temperature Scale 1990.
and     207,25 K <= T <= 334,05 K (i.e. -65.9°C <= T <= 60.9°C)

Reference: Sonntag D., 1990: Important new values of the physical constants of 1986, vapor pressure formulations based on ITS-90, and psychrometer formulae. Z. Meteorol., 70, 340-344.

Hi IslandOfDreams , can u share the Reference: Sonntag D., 1990: Important new values of the physical constants of 1986, vapor pressure formulations based on ITS-90, and psychrometer formulae. Z. Meteorol., 70, 340-344. or share the psychrometric equation. thanks a lot

adriesse commented 2 weeks ago

See Sonntag 1994. The work by Sonntag is also quoted in the WMO CIMO guide.