Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metar doesn't parse correctly #2807

Closed
ManojAgrawal opened this issue Nov 29, 2022 · 6 comments · Fixed by #2808
Closed

Metar doesn't parse correctly #2807

ManojAgrawal opened this issue Nov 29, 2022 · 6 comments · Fixed by #2808
Labels
Area: IO Pertains to reading data Type: Bug Something is not working like it should
Milestone

Comments

@ManojAgrawal
Copy link

What went wrong?

Metar

DEN
1/24/17 16:00
KDEN 241600Z 02010KT 1/16SM R35L/1000V1200FT FZFG VV001 M01/M02 A2954 RMK AO2 SFC VIS M1/4 T10111022

isn't parsed correctly. output dataframe (pasted below) doesn't have visibility, weather condition 'FZFG' and has a cloud coverage of 10

station_id | latitude | longitude | elevation | date_time | wind_direction | wind_speed | wind_gust | visibility | current_wx1 | current_wx2 | current_wx3 | low_cloud_type | low_cloud_level | medium_cloud_type | medium_cloud_level | high_cloud_type | high_cloud_level | highest_cloud_type | highest_cloud_level | cloud_coverage
-- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | --

KDEN | 39.85 | -104.65 | 1640 | 2022-11-24 16:00:00 | 20 | 10.0 | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 10

Screen Shot 2022-11-29 at 9 37 56 AM

Operating System

MacOS

Version

1.3

Python Version

3.9.12

Code to Reproduce

from metpy import io

df = io.parse_metar_to_dataframe('KDEN 241600Z 02010KT 1/16SM R35L/1000V1200FT FZFG VV001 M01/M02 A2954 RMK AO2 SFC VIS M1/4 T10111022')

df.head()

Errors, Traceback, and Logs

No response

@ManojAgrawal ManojAgrawal added the Type: Bug Something is not working like it should label Nov 29, 2022
@dopplershift
Copy link
Member

I'm 99% sure the problem here is the visibility group, which is 1/16SM.

Now looking over the Federal Meteorological Handbook 1, I now see that 1/16SM (as well as 3/16 and 5/16) are valid visibility codes for manual stations. We can update the parser to accommodate that.

@dopplershift dopplershift added the Area: IO Pertains to reading data label Nov 29, 2022
@ManojAgrawal
Copy link
Author

Thanks Ryan!

dopplershift added a commit to dopplershift/MetPy that referenced this issue Nov 29, 2022
Apparently this is a valid visibility for manual observations.
dopplershift added a commit to dopplershift/MetPy that referenced this issue Nov 29, 2022
Apparently this is a valid visibility for manual observations.
@dopplershift dopplershift added this to the November 2022 milestone Nov 29, 2022
@dopplershift
Copy link
Member

As I thought, easy fix. This will be fixed in the impending 1.4 release.

@ManojAgrawal
Copy link
Author

Thanks Ryan! When can we expect the new release?

@dopplershift
Copy link
Member

We're trying for it before the end of the month (in two days). The only thing that's really holding it up is #2743.

If you really want the changes, you can always install metpy from git:
pip install git+https://github.com/Unidata/MetPy@main#egg=metpy

@ManojAgrawal
Copy link
Author

cool, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: IO Pertains to reading data Type: Bug Something is not working like it should
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants