-
Notifications
You must be signed in to change notification settings - Fork 124
Closed
Milestone
Description
The regex for the temperature group allows an arbitrary number (but at least 1) of digits, both for temperature and dewpoint:
Lines 87 to 90 in 96f6b98
| TEMP_RE = re.compile( | |
| r"""^(?P<temp>(M|-)?\d+|//|XX|MM)/ | |
| (?P<dewpt>(M|-)?\d+|//|XX|MM)?\s+""", | |
| re.VERBOSE, |
However, the Manual on Codes gives the format of the temperature group as T'T'/T'dT'd in 15.11, calling for exactly 2 digits.
Consequently, the following report should raise an error instead of parsing a temperature of 201°C (which clearly is a typo in this context considering the reports before/after this one).
METAR EDDM 022150Z 26006KT CAVOK 201/16 Q1018 NOSIG
Metadata
Metadata
Assignees
Labels
No labels