MetPy icon indicating copy to clipboard operation
MetPy copied to clipboard

Altimeter Setting to Sea Level Does Not Match

Open jrleeman opened this issue 3 years ago • 4 comments

What went wrong?

Using METARs from some larger airports we don't get SLP values that match those reported.

KDEN 190053Z 23006KT 10SM SCT120 BKN160 BKN220 32/08 A3004 RMK AO2 PK WND 26033/0008 WSHFT 0009 RAB10E29 SLP071 P0000 T03220083

we get 1002.8 hPa, but the METAR indicates SLP is 1007.1 hPa

Looking at Dallas (much lover elevation of 606ft) we get a difference still

KDFW 190053Z 18019G24KT 10SM FEW110 39/14 A2976 RMK AO2 PK WND 17027/0019 SLP066 T03940139

We calculate 1006.8, but the METAR indicates 1006.6.

In the end I haven't yet found the root cause, but wanted to document it.

Operating System

Windows

Version

1.3

Python Version

3.10.4

Code to Reproduce

import metpy.calc as mpcalc
from metpy.units import units

a = 30.04 * units('inHg')
h = 5434 * units('ft')

mpcalc.altimeter_to_sea_level_pressure(a, h, 32 * units.degC).to('hPa')

Errors, Traceback, and Logs

No response

jrleeman avatar Jul 19 '22 01:07 jrleeman

My first instinct is there an inherent limitation to this computation. The way that the function is formulated will have the limitations of defining the average layer temperature when a portion of that layer is below ground. This is exacerbated in a place like Denver compared to Dallas. A quick internet search indicates some more sophisticated calculations for doing this conversation including: http://www.wind101.net/sea-level-pressure-advanced/sea-level-pressure-advanced.html There is also something from WMO, but I can't seem to access the website as the document has moved with subsequent page updates to the WMO websites.

kgoebber avatar Jul 19 '22 21:07 kgoebber

I think you're likely on track. I probably won't get to dig in for awhile yet, but seems like we should be able to reproduce the ASOS readings functionally.

jrleeman avatar Jul 19 '22 21:07 jrleeman

My fuzzy recollection thinks there is some recent averaged surface air temperature correction applied to the standard atmosphere calculation to provide a seasonal bias correction to the standard atmosphere assumption? Now, where did I see this... :(

akrherz avatar Jul 20 '22 02:07 akrherz

According to the AMS Glossary, "the mean temperature for the preceding 12 hours is employed", so I'd only expect agreement (or at least, less of a discrepancy) if you used that temperature rather than 32 C in the calculation.

sgdecker avatar Sep 11 '22 00:09 sgdecker