ITEC 325 Assignment 2 Working individually you will create a series of regular expressions that identify different parts composing a METAR. METARs are reports assembled with a particular format that is easy to decode with computer systems using regular expressions. These reports typically come in two forms: North American METARs and International METARs. Create a series of regular expressions that decode each token of information using the North American METAR form. You can find METAR reports at the following address: (under the METARs tab) https://www.aviationweather.gov/ In order to find the weather information you need to get a METAR report from any airport you wish utilizing the appropriate code (Baltimore-Washington International is KBWI) and then apply the different regular expressions to identify each token and eventually extract it from the report. Your homework submission should be a script that reads a single line METAR from a file named: metar.txt Your script output (to the shell screen) should include: the report type: either METAR or SPECI for “Special Report” the station identifies (four characters starting with a K) Day of the month and time the report was filed If the token ‘AUTO’ is present, you should output “This is a fully automated report” If the token ‘COR’ is present, you should output “This is a corrected observation” Wind direction and speed, wind gusting, and variable wind directions Visibility in statute miles Light, medium, or heavy rain (-RA|RA|+RA) Cloud Conditions: [0 or more occurrences of each of the following] a. Sky Clear b. Few Clouds c. Scattered Clouds d. Broken Clouds e. Overcast Clouds 10. Temperature 11. Dew Point 12. Barometric Pressure 13. If the token ‘TH’ is present, you should output “Thunderstorms reported in the area” 1. 2. 3. 4. 5. 6. 7. 8. 9. KEY TO DECODING THE U.S. METAR OBSERVATION REPORT KEY TO DECODING A METAR REPORT METAR KABC 121755Z AUTO 21016G24KT 180V240 1SM R11/P6000FT TYPE OF REPORT METAR: hourly (scheduled) report; SPECI: special (unscheduled) report. ICAO STATION Four character ICAO location identifier. (location) IDENTIFIER DATE/TIME group All dates and times in UTC using a 24-hour clock; two-digit date and four-digit time; always appended with Z to indicate UTC. AUTO: Indicates a fully automated report with no human intervention. It is removed when an observer logs on to the system. REPORT MODIFIER COR: Indicates a corrected observation. No modifier indicates human observer or automated system with human logged on for oversight functions. WIND DIRECTION AND SPEED VISIBILITY RUNWAY VISUAL RANGE Direction in tens of degrees from true north (first three digits); next two digits: speed in whole knots; if needed, include character as: Gusts (character) followed by maximum observed speed; always appended with KT to indicate knots; 00000KT for calm; if direction varies by 60o or more and speed greater than 6 knots, a Variable wind direction group is reported, otherwise omitted. If wind direction is variable and speed 6 knots or less, replace wind direction with VRB followed by wind speed in knots. Prevailing visibility in statute miles and fractions with space between whole miles and fractions; always appended with SM to indicate statute miles; values <1/4SM reported as M1/4SM. A 10-minute RVR evaluation value in hundreds of feet is reported if prevailing visibility is < or = 1 mile or RVR < or = 6000 feet; always appended with FT to indicate feet; value prefixed with M or P to indicate value is lower or higher than the reportable RVR value. See Present weather: QUALIFIER Intensity or Proximity - Light -RA BR WEATHER PHENOMENA "no sign" Moderate + Heavy VC Vicinity: but not at aerodrome; in U.S. METAR, between 5SM and 10SM of the point(s) of observation. Descriptor MI Shallow BL Blowing BC Patches SH showers WEATHER PHENOMENA TS PR Partial Thunderstorm DR Drifting FZ Freezing Precipitation DZ Drizzle IC Ice Crystals UP Unknown in automated observations RA Rain SN Snow PL Ice pellets GR Hail SG Snow grains GS Small hail/ snow pellets Obscuration BR Mist (< or = FU Smoke 5/8SM) HZ Haze SA Sand VA Volcanic DU Widespread Ash Dust PY Spray Other SQ Squall FC Funnel Cloud BKN015 OVC025 SKY CONDITION SS Sandstorm DS +FC Tornado/ Duststorm Waterspout PO Well developed dust/sand whirls Cloud amount and height: CLR (In automated METAR reports only, no clouds detected below 12000 feet.); SKy Clear 0/8; FEW 1/8-2/8; SCattered 3/8-4/8; BroKeN 5/8-7/8; OVerCast 8/8; 3-digit height of base in hundreds of feet; followed by Towering CUmulus or CumulonimBus if present. For an observed sky: Vertical Visibility followed by vertical veisibility in hundreds of feet into the obscuration, example: VV004. More than 1 layer may be reported. Each is reported in whole degrees Celsius using two digits; values TEMPERATURE/DEW are separated by a solidus (/); sub-zero values are prefixed with an POINT M (minus). 06/04 ALTIMETER A2990 Altimeter setting (in U.S. reports) is always prefixed with an A indicating inches of mercury; reported using four digits: tens, units, tenths, and hundredths. The following groups are reported in the Remarks section of the METAR report Remarks includes clarifying or augmenting data concerning elements in the body of the METAR, additive coded data and maintenance data. RMK REMARKS IDENTIFIER TORNADO, FUNNEL CLOUD or WATERSPOUT TORNADIC ACTIVITY AO2 TYPE OF AUTOMATED STATION PK WND 20032/25 PEAK WIND PK WND dddff(F)/(hh)mm; direction in tens of degrees, speed in whole knots, time in minutes after the hour. Only minutes after the hour is included if the hour can be inferred from the report. WSHFT 1715 WIND SHIFT WSHFT followed by hours and minutes of occurrence. The term FROPA may be entered after the time if it is reasonably certain that the wind shift was a result of a frontal passage. VIS 3/4V1 1/2 VARIABLE VIS vnvnvnvn vnVvxvxvx vxvx; reported if prevailing visibility is <3 Augmented;