Understanding METAR files

METAR - aviation weather report - data sets are available on an hourly basis from stations all over the world. They're a great way to get current weather conditions for a region. The format is very terse, so I've put together a short guide to understanding them:

Where to get METAR data

The best source for US METAR data is the NWS:

http://weather.noaa.gov/weather/metar.shtml

They publish it in both by-station and cycle files via FTP.

Locating METAR stations

Each METAR report comes from a weather station - often at an airport. The NWS publishes a listing of all stations, including lat/lon, at:

http://adds.aviationweather.noaa.gov/metars/stations.txt

Understanding cycle files

Cycle files include reports for all available stations for a given hour. If you're getting the files from the NWS's FTP site, the files are named using the format hhZ.txt where hh is the hour the report was made in UTC. i.e 00Z.txt is the report for midnight UTC, 23Z.txt is for 11 pm UTC.

Within each file, the format looks like:

2009/02/07 14:53
KDRO 071453Z AUTO 29003KT 10SM CLR M03/M09 A3010 RMK AO2 SLP207 T10281089 53005 FZRANO

with each report pair separated by a blank line. The date line is fairly obvious. The report line is defined below.

The NWS deletes the previous cycle file 10 minutes prior to the new cycle file is published.

Understanding METAR report lines

The METAR report lines are in either international or north american format. The two are very similar. Starting with the US/Canadian format:

KDVT 071453Z 10003KT 10SM BKN060 11/05 A2991 RMK AO2 SLP119 T01110050 53001

The breaks down into:

[station code] [observation time] <AUTO> [wind direction and speed] [visibility] [specific observations]
Station code
The 4-digit station code (KDVT in our example) identifies the specific METAR station making the report. See the station list above. Our example is "PHOENIX/DEER VLY" in Arizona.
Observation time
This is the observation time in UTC. The first two digits are the day of the month. The next 4 are the time in UTC 24 hour format, followed by a Z to denote UTC. Our example - 071453Z - was taken on the 7th at 14:53 UTC.
Specific observations
The remainder of the METAR line varies depending on the observations being made. See below for an explanation of the most common types.

Observation codes

There are a large number of observation codes you may see in the later part of the METAR report line. Here are a few of the common ones:
Code Meaning Examples
ACC Altocumulus castellanus clouds. ACC
ACSL Altocumulus standing lenticular clouds. ACSL
AO1 Automated station without precipitation discriminator. AO1
AO2 Automated station with precipitation discriminator. AO2
BC Patches or broken. Always tied to another sky condition such as fog (FG). BCFG
BKN Broken clouds. Always followed by an altitude in feet / 100 showing the level the clouds are at. i.e. this is the cloud ceiling. May be followed by a cloud type such as CB. BKN028 - cloud ceiling at 2,800 feet
BL Blowing. Always tied to another condition such as snow (S) or sand (SA). BLSA - blowing sand
BR Mist. BR
CA Cloud-air lightning. Don't confuse this with CAVOK - this code doesn't take any following codes. CA
CB Cumulonimbus clouds. This is often tied to FEW or BKN. CB
CBMAM Cumulonimbus mammatus clouds. CBMAM
CC Cloud-to-cloud lightning. CC
CCSL Cirrocumulus standing lenticular clouds. CCSL
CG Cloud-to-ground lightning. CG
CIG Ceiling exists - there is a ceiling at the lowest cloud layer CIG
CLR Clear CLR
COR This report is a correction to the previous report COR
DR Drifting. Always tied to a material. DRSN - drifting snow
DS Dust storm. DS
DSIPTG Dissipating. DSIPTG
DSNT Distant. DSNT
DU Dust DU
DZ Drizzle DZ
E East E