(deutsche Version, versión en Español)
metaf2xml parses and decodes aviation routine weather reports (METAR, SPECI), aerodrome forecasts (TAF), and synoptic observations (SYNOP) and stores the components as XML (all done in Perl). There are also XSLT style sheets to convert the XML to plain language (text, HTML), or XML with different schemas, and a command line and a web-based (CGI) user interface.
Content |
TAF SBGL (HTML, español) |
METAR KJFK (HTML, english) |
METAR UUEE (HTML, Русский) |
The latest version (2009-05-09) is 1.36 (TAR, ZIP), and includes also README, change log, ToDo, distinfo, and DTD.
METAR and SPECI (weather observation) and TAF (weather forecast) information is essential for flight planning and in-flight decisions (real flight and simulation). It is regularily compiled by meteorologists at about 3,500 airports worldwide and distributed via reliable, non-public networks. Information for SYNOP is collected by more than 11,000 manned and unmanned meteorological stations around the world and is used for weather forecasting and climatic statistics. The format of the original messages is abbreviated, some items are coded. Here are some METAR, TAF, and SYNOP messages from Rio (SBGL, 83746), New York (KJFK, 74486), and Tokyo (RJTT, 47662):
SBGL 091200Z 05004KT 4500 HZ FEW010 SCT090 23/18 Q1018 KJFK 091251Z 14005KT 0SM BR OVC002 14/13 A2971 KJFK 091155Z 0912/1018 12005KT 1/4SM FG VV001 TEMPO 0912/0913 6SM BR BKN003 FM091400 19010KT P6SM SCT040 BKN120 FM092100 21015KT P6SM BKN035CB BKN100 FM100200 26017G24KT P6SM SCT045 FM100600 29020G33KT P6SM SCT045 RJTT 091300Z 21013KT CAVOK 21/14 Q1012 RMK A2989 AAXX 09184 83746 31560 11608 10271 20177 40141 56015 70511 81100 AAXX 09184 74486 32764 81603 10206 20156 30029 40040 58014 91751 333 10206 20139 555 90918 AAXX 09184 47662 12970 72003 10180 20139 30064 40107 56009 60001 80002
The format of the messages (and a lot more about observing and reporting weather) is specified in WMO Manual No. 306 or in Annex 3 to the Convention on International Civil Aviation; some countries deviate from that standard or extend it, some have published documentation (e.g. Federal Meteorological Handbook No. 1 and No. 2 for the USA). Especially the format of the remarks for METAR and TAF messages, or the coding of sections 3 and 5 for SYNOP messages is highly dependent on the country or even the observing station.
metaf2xml can be used for flight simulations or by private pilot (students) who want to extend their knowledge about the message formats, and everyone who just wants to know the current or forecast weather at some station in plain language (see examples below).
There are other projects that deal with METAR and TAF messages, e.g.:
But somehow I always missed a feature I liked to have.
The project's home page is at SourceForge.net, releases are also announced at freshmeat.net. The latest version includes the parser, the DTD schema, XSLT style sheets to convert the XML to plain language, the Perl scripts for the user interfaces, and everything to install all of them.
With the demo version with graphics (uses Ajax), the stations are marked with a dot on a map. The map can be viewed in different enlargements and can be moved by click and drag. The processed messages are displayed beneath the map, with the latest request on top. The list of stations is fixed but it also could be created dynamically, e.g. from a database.
The messages for the stations are fetched from files on the sourceforge-server. These are messages from the past and are updated only from time to time. sourceforge.net does not allow outgoing connections, so they cannot be fetched directly from the internet.
It is also possible to enter weather messages, which requires the selection of the message type (METAR, TAF, SYNOP).
With the text-based demo version, weather messages can be entered. If the option "ICAO id(s)" or "WMO id(s)" is selected, station id's can be entered, too; the messages for the stations will be fetched from files on the server, as for the graphical demo version.
Several organisations and providers offer public access to up-to-date and older weather messages, e.g.:
The result of the parsing of the above example messages can be found in metar-taf-synop.xml (XML without XSLT style sheet reference). Using the XSLT style sheets from the project, the output in plain language (here: english, HTML) looks as follows:
| msg: SBGL 091200Z 05004KT 4500 HZ FEW010 SCT090 23/18 Q1018 | |||
| METAR | METAR Report | ||
|---|---|---|---|
| SBGL | station id: | SBGL (Aeroporto Internacional do Rio de Janeiro/Galeão, Brazil) | |
| 091200Z | Report time: | on the 9., 12:00 UTC | |
| 05004KT | Wind: | from the NE (50° (+4°/-5°)) at 7.4 km/h | 4 kt = 4.6 mph = 2.1 m/s |
| 4500 | Visibility: | 4500 (.. <4600) m | 2.8 miles |
| HZ | Weather: | haze | |
| FEW010 SCT090 | Sky condition: | few clouds at 1000 ft | 300 m |
| scattered clouds at 9000 ft | 2740 m | ||
| 23/18 | Temperature: | 23 °C | 73.4 °F |
| Dewpoint: | 18 °C | 64.4 °F | |
| relative humidity: | 74% | ||
| Q1018 | altimeter: | 1018 hPa | 30.06 in. Hg |
| msg: KJFK 091251Z 14005KT 0SM BR OVC002 14/13 A2971 | |||
| METAR | METAR Report | ||
|---|---|---|---|
| KJFK | station id: | KJFK (Kennedy International Airport, New York, New York, USA) | |
| 091251Z | Report time: | on the 9., 12:51 UTC | |
| 14005KT | Wind: | from the SE (140° (+4°/-5°)) at 9.3 km/h | 5 kt = 5.8 mph = 2.6 m/s |
| 0SM | Visibility: | 0 (.. <0.0625) miles | 0 m |
| BR | Weather: | mist | |
| OVC002 | ceiling: | at 200 ft | 60 m |
| Sky condition: | sky overcast at 200 ft | 60 m | |
| 14/13 | Temperature: | 14 °C | 57.2 °F |
| Dewpoint: | 13 °C | 55.4 °F | |
| relative humidity: | 94% | ||
| A2971 | altimeter: | 1006 hPa | 29.71 in. Hg |
| msg: KJFK 091155Z 0912/1018 12005KT 1/4SM FG VV001 TEMPO 0912/0913 6SM BR BKN003 FM091400 19010KT P6SM SCT040 BKN120 FM092100 21015KT P6SM BKN035CB BKN100 FM100200 26017G24KT P6SM SCT045 FM100600 29020G33KT P6SM SCT045 | |||
| TAF | 30h aerodrome forecast | ||
|---|---|---|---|
| KJFK | station id: | KJFK (Kennedy International Airport, New York, New York, USA) | |
| 091155Z | Issue time: | on the 9., 11:55 UTC | |
| 0912/1018 | Forecast period: | 9., 12:00 - 10., 18:00 UTC | |
| 12005KT | Wind: | from the ESE (120° (+4°/-5°)) at 9.3 km/h | 5 kt = 5.8 mph = 2.6 m/s |
| 1/4SM | Visibility: | 0.25 (.. <0.3125) miles | 400 m |
| FG | Weather: | fog | |
| VV001 | Vert. visibility: | 100 ft | 30 m |
| trend forecast: | |||
| TEMPO 0912/0913 | from 9., 12:00 UTC till 9., 13:00 UTC temporarily: | ||
| 6SM | Visibility: | 6 (.. <7) miles | 9.7 km |
| BR | Weather: | mist | |
| BKN003 | ceiling: | at 300 ft | 90 m |
| Sky condition: | broken clouds at 300 ft | 90 m | |
| FM091400 | from 9., 14:00 UTC becoming: | ||
| 19010KT | Wind: | from the S (190° (+4°/-5°)) at 18.5 km/h | 10 kt = 11.5 mph = 5.1 m/s |
| P6SM | Visibility: | >=6 miles | >=9.7 km |
| SCT040 BKN120 | ceiling: | at 12000 ft | 3660 m |
| Sky condition: | scattered clouds at 4000 ft | 1220 m | |
| broken clouds at 12000 ft | 3660 m | ||
| FM092100 | from 9., 21:00 UTC becoming: | ||
| 21015KT | Wind: | from the SSW (210° (+4°/-5°)) at 27.8 km/h | 15 kt = 17.3 mph = 7.7 m/s |
| P6SM | Visibility: | >=6 miles | >=9.7 km |
| BKN035CB BKN100 | ceiling: | at 3500 ft | 1070 m |
| Sky condition: | broken clouds at 3500 ft (cumulonimbus) | 1070 m | |
| broken clouds at 10000 ft | 3050 m | ||
| FM100200 | from 10., 02:00 UTC becoming: | ||
| 26017G24KT | Wind: | from the W (260° (+4°/-5°)) at 31.5 km/h | 17 kt = 19.6 mph = 8.7 m/s |
| with gusts at 44.4 km/h | 24 kt = 27.6 mph = 12.3 m/s | ||
| P6SM | Visibility: | >=6 miles | >=9.7 km |
| SCT045 | Sky condition: | scattered clouds at 4500 ft | 1370 m |
| FM100600 | from 10., 06:00 UTC becoming: | ||
| 29020G33KT | Wind: | from the WNW (290° (+4°/-5°)) at 37 km/h | 20 kt = 23 mph = 10.3 m/s |
| with gusts at 61.1 km/h | 33 kt = 38 mph = 17 m/s | ||
| P6SM | Visibility: | >=6 miles | >=9.7 km |
| SCT045 | Sky condition: | scattered clouds at 4500 ft | 1370 m |
| msg: RJTT 091300Z 21013KT CAVOK 21/14 Q1012 RMK A2989 | |||
| METAR | METAR Report | ||
|---|---|---|---|
| RJTT | station id: | RJTT (東京国際空港 (羽田空港) (Tōkyō Kokusai Kūkō (Haneda)), Japan) | |
| 091300Z | Report time: | on the 9., 13:00 UTC | |
| 21013KT | Wind: | from the SSW (210° (+4°/-5°)) at 24.1 km/h | 13 kt = 15 mph = 6.7 m/s |
| CAVOK | cloud and visibility OK | ||
| 21/14 | Temperature: | 21 °C | 69.8 °F |
| Dewpoint: | 14 °C | 57.2 °F | |
| relative humidity: | 64% | ||
| Q1012 | altimeter: | 1012 hPa | 29.88 in. Hg |
| RMK | Remarks: | ||
| A2989 | altimeter: | 1012 hPa | 29.89 in. Hg |
| msg: AAXX 09184 83746 31560 11608 10271 20177 40141 56015 70511 81100 | |||
warning: station pressure missing | |||
| SYNOP | Synoptic observation (main hour) | ||
|---|---|---|---|
| section 0: | |||
| AAXX | fixed land station | ||
| 0918 | Report time: | on the 9., 18:00 UTC | |
| 4 | wind data: | kt | |
| 83746 | station id: | 83746 (South America) (Aeroporto Internacional do Rio de Janeiro/Galeão, Brazil) | |
| section 1: | |||
| 3 | precipitation data: | omitted (no precipitation) | |
| 1 | weather data: | in section 1 | |
| 5 | base of lowest cloud: | 600 m | 1970 ft |
| to: | 1000 m | 3280 ft | |
| 60 | Visibility: | 10 (.. <11) km | 6.2 miles |
| 1 | total cloud cover: | 1/8 or less, but not 0/8 | |
| 1608 | Wind: | from the SSE (160° (+4°/-5°)) at 14.8 km/h | 8 kt = 9.2 mph = 4.1 m/s |
| 10271 20177 | Temperature: | 27.1 °C | 80.8 °F |
| Dewpoint: | 17.7 °C | 63.9 °F | |
| relative humidity: | 57% | ||
| 40141 | sea level pressure: | 1014.1 hPa | 29.95 in. Hg |
| 56015 | pressure change last 3h: | -1.5 hPa, having decreased, then steady, or decreased then decreased more slowly | |
| 70511 | Weather: | haze | |
| weather last 6h: | cloud covering at times more than, at other times less than half of the sky | ||
| 81100 | cloud types: | low: 1/8 or less, but not 0/8 cumulus (little vertical extent) (Cu humulis or fractus) | |
| mid-level: no clouds | |||
| high: no clouds | |||
| msg: AAXX 09184 74486 32764 81603 10206 20156 30029 40040 58014 91751 333 10206 20139 555 90918 | |||
| SYNOP | Synoptic observation (main hour) | ||
|---|---|---|---|
| section 0: | |||
| AAXX | fixed land station | ||
| 0918 | Report time: | on the 9., 18:00 UTC | |
| 4 | wind data: | kt | |
| 74486 | station id: | 74486 (North and Central Amerika) (Kennedy International Airport, New York, New York, USA) | |
| section 1: | |||
| 3 | precipitation data: | omitted (no precipitation) | |
| 2 | weather data: | omitted (no significant phenomenon) | |
| 7 | base of lowest cloud: | 1520 m | 5000 ft |
| to: | 1980 m | 6500 ft | |
| 64 | Visibility: | 9 (.. <10) miles | 14.5 km |
| 8 | total cloud cover: | 8/8 | |
| 1603 | Wind: | from the SSE (160° (+4°/-5°)) at 5.6 km/h | 3 kt = 3.5 mph = 1.5 m/s |
| 10206 20156 | Temperature: | 20.6 °C | 69.1 °F |
| Dewpoint: | 15.6 °C | 60.1 °F | |
| relative humidity: | 73% | ||
| 30029 | station level pressure: | 1002.9 hPa | 29.62 in. Hg |
| 40040 | sea level pressure: | 1004.0 hPa | 29.65 in. Hg |
| 58014 | pressure change last 3h: | -1.4 hPa, steady or having increased, then decreased; or decreased then decreased more rapidly | |
| 91751 | exact obs. time: | 17:51 UTC | |
| 333 | section 3: | ||
| 10206 | max. temperature last 12h: | 20.6 °C | 69.1 °F |
| 20139 | min. temperature last 24h: | 13.9 °C | 57.0 °F |
| 555 | section 5: | ||
| 90918 | Report time: | on the 9., 18:00 UTC | |
| msg: AAXX 09184 47662 12970 72003 10180 20139 30064 40107 56009 60001 80002 | |||
| SYNOP | Synoptic observation (main hour) | ||
|---|---|---|---|
| section 0: | |||
| AAXX | fixed land station | ||
| 0918 | Report time: | on the 9., 18:00 UTC | |
| 4 | wind data: | kt | |
| 47662 | station id: | 47662 (Asia) (Metropolitan Area Heliport Tokyo, Japan) | |
| section 1: | |||
| 1 | precipitation data: | in section 1 | |
| 2 | weather data: | omitted (no significant phenomenon) | |
| 9 | base of lowest cloud: | >=2500 m | >=8200 ft |
| 70 | Visibility: | 20 (.. <21) km | 12.4 miles |
| 7 | total cloud cover: | 7/8 or more, but not 8/8 | |
| 2003 | Wind: | from the SSW (200° (+4°/-5°)) at 5.6 km/h | 3 kt = 3.5 mph = 1.5 m/s |
| 10180 20139 | Temperature: | 18.0 °C | 64.4 °F |
| Dewpoint: | 13.9 °C | 57.0 °F | |
| relative humidity: | 77% | ||
| 30064 | station level pressure: | 1006.4 hPa | 29.72 in. Hg |
| 40107 | sea level pressure: | 1010.7 hPa | 29.85 in. Hg |
| 56009 | pressure change last 3h: | -0.9 hPa, having decreased, then steady, or decreased then decreased more slowly | |
| 60001 | precip. amount last 6h: | 0 mm | 0 in. |
| 80002 | cloud types: | low: no clouds | |
| mid-level: no clouds | |||
| high: cirrus (dense, with sproutings, or in tufts) (Ci spissatus, castellanus, or flocus) | |||