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.21k stars 408 forks source link

Station Data Used for METAR Site ID KGZL (Stigler, OK) is incorrect #3536

Closed geofflewen closed 3 weeks ago

geofflewen commented 3 weeks ago

What went wrong?

METAR parsing functions (parse_metar_file, parse_metar_to_dataframe) are returning a station elevation of 183 m for ASOS/AWOS site KGZL. The NWS gives the elevation as 183 feet (https://www.weather.gov/wrh/timeseries?site=KGZL). As a result, station pressures computed for KGZL are anomalously low.

Given a METAR report as:

KGZL 122355Z AUTO 14005KT 10SM CLR 31/18 A3003 RMK AO2=

The station pressure using an altimeter setting of 30.03 inHg and an elevation of 183 m is calculated as 29.38 inHg when the actual station pressure is reported to be 29.83 inHg.

Operating System

MacOS

Version

1.6.2

Python Version

3.9.19

Code to Reproduce

from metpy.io import parse_metar_to_dataframe
KGZL = 'KGZL 122355Z AUTO 14005KT 10SM CLR 31/18 A3003 RMK AO2='

df = parse_metar_to_dataframe(KGZL)
print(df[['station_id','latitude','longitude','elevation']])

# returns:
#            station_id  latitude  longitude  elevation
# KGZL          KGZL         35.28      -95.1     183


### Errors, Traceback, and Logs

_No response_
akrherz commented 3 weeks ago

You believe this location in Oklahoma has an elevation of 183 feet? I believe 183m is right.

geofflewen commented 3 weeks ago

I’m only going off the NWS reported elevation for the site (see the link provided.)

There appear to be anomalies in the calculated SLP for KGZL and in the process of looking into it found the discrepancy in elevations.

One or the other of the station elevations being used is incorrect. They can’t be 183 m and 183 feet.

Aside: I suppose if the NWS is using the wrong elevation that might explain the apparent SLP anomaly that caught my attention. I just wanted to accord the NWS authority in this matter.

On Thu, Jun 13, 2024 at 11:46 daryl herzmann @.***> wrote:

You believe this location in Oklahoma has an elevation of 183 feet? I believe 183m is right.

— Reply to this email directly, view it on GitHub https://github.com/Unidata/MetPy/issues/3536#issuecomment-2166212292, or unsubscribe https://github.com/notifications/unsubscribe-auth/APGAHXTKXMF5OOBTNW6A2PTZHHEHHAVCNFSM6AAAAABJIYRC6CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRWGIYTEMRZGI . You are receiving this because you authored the thread.Message ID: @.***>

geofflewen commented 3 weeks ago

Follow-up to my last reply;

Local METAR sites tend to have elevations (c.f. https://www.weather.gov/wrh/timeseries?site=) in the range

KFSM:  436 ft

KMKO: 607 ft

KMLC:  768 ft

KTQH:  873 ft.

MetPy returns “correct” values of elevation in meters for all of these.  I suppose if the actual elevation of Stigler is 600 ft (183m), that would explain the anomaly in Altimeter Setting/SLP that caught my attention.  I had to accord one source or the other the authority and chose the NWS as the authoritative source.

Geoff

From: daryl herzmann @.> Reply-To: Unidata/MetPy @.> Date: Thursday, June 13, 2024 at 11:46 AM To: Unidata/MetPy @.> Cc: geofflewen @.>, Author @.***> Subject: Re: [Unidata/MetPy] METAR Site ID data for KGZL (Stigler, OK) is incorrect (Issue #3536)

You believe this location in Oklahoma has an elevation of 183 feet? I believe 183m is right.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

geofflewen commented 3 weeks ago

I'm going to close this as I am satisfied that

1) the elevation of Stigler is on the order of 600 ft above mean sea level; 2) the NWS is using an elevation of 183 feet in the calculation of altimeter settings at https://www.weather.gov/wrh/timeseries?site=KGZL.

Given (1) and (2) there appears it be a systematic error of about +.4 inHg in the KGZL measurement of station pressure, and that using an elevation of 183 ft partially masked this systematic error, but this is not a MetPy issue.