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

Incorrect SYNOP messages do not lead to raised errors #6

Closed
RoryPTB opened this issue Dec 19, 2022 · 1 comment
Closed

Incorrect SYNOP messages do not lead to raised errors #6

RoryPTB opened this issue Dec 19, 2022 · 1 comment

Comments

@RoryPTB
Copy link

RoryPTB commented Dec 19, 2022

Invalid SYNOP messages often lead to logged warnings when a decode error should be raised.

For example, when the YYGGiw group is missed, pymetdecoder returns [WARNING] *something* is not a valid code for WindIndicator.

Suggested fix: in __init__.py line 120, add raise DecodeError(str(e)). I have also found raising an error when an invalid section 1 precipitation group is found helps too when section 0 groups are missing, in synop/__init__.py line 176.

@tdbabas
Copy link
Collaborator

tdbabas commented Dec 19, 2022

Hi @RoryPTB - looks like something I originally overlooked! It appears to be a fairly straightforward fix. Will take a look in the New Year

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants