Everything I Know About The Sources and Uses of Weather Codes on the Web

ICAO - International Civil Aviation Organization

There's a world-wide network of ICAO stations which provide weather observations and forecasts. The information is intended for aviation, but it is useful for anyone who want easy access to world-wide weather conditions and forecasts.

The four-letter ICAO code can be used to obtain hourly METAR observations and TAF forecasts for the location. METAR and TAF are French acronyms. The former refers to aviation routine weather report, and the latter as terminal aerodrome forecast.

According to the Texas A&M Department of atmospheric sciences, "The METAR code is a precise, easy to read code which provides a great deal of information. The code format is also used by most of the world to provide pilots with trend forecast weather at air terminals to which they are flying. This code has been adopted as the international code for reporting weather conditions by all nations." The U.S., of course, has taken a couple of exceptions to the standard. TAF reports can also vary by country

One can obtain raw text METAR and TAF reports quite easily over the internet via FTP (or HTTP.) Despite the words from Texas A&M, decoding these raw texts can be fairly complicated. In general, you need to parse each code group, identify its type, and then decode the observation or forecast. There are a lot of potential codes, but many programs simply short-cut the process by looking for the basics and discarding anything unknown..

http://metar.noaa.gov/table_master.jsp?sub_menu=no&show=guide.html&dir=./documents/&title=title_helpful  takes you to a ‘quick reference guide’ to decoding, and http://www.avweb.com/weather/metarabv.html takes you to a complete list of METAR and TAF abbreviations:

To make life easier you can download a pre-decoded METAR from NOAA using a URL like ftp://weather.noaa.gov/data/observations/metar/decoded/KMQE.TXT or download the raw report with ftp://weather.noaa.gov/data/observations/metar/stations/KMQE.TXT and decode it yourself. KMQE is the ICAO code for the METAR site at East Milton, MA.
TAFs can be downloaded using ftp://weather.noaa.gov/data/forecasts/taf/stations/KBOS.TXT, but there is no decoded version in that directory. KBOS is the ICAO code for the TAF site at Logan Airport, Boston.

A complete list of ICAO stations with some detailed information about each including latitude, longitude and elevation, is maintained at http://www.rap.ucar.edu/weather/surface/stations.txt


Some ICAO locations in the U.S. are also sites for NEXRAD (next generation weather radar.) These radars offer several different 'products' or types of data and/or image.

NEXRAD images are fairly easy to obtain via HTTP. You just need to know (or be happy with) the type of image (product) that a particular URL will produce. Visit a URL like and http://radar.weather.gov/radar/latest/DS.p19r0/si.kbox.shtml and examine the other URLS of thevarious available images. Naturally, you can omit the page and download the image directly, using a URL like http://radar.weather.gov/radar/images/DS.p19r0/SI.kbox/latest.gif.

The section of the URL between the ‘DS.’ and the SI.’ defines the specific radar product. KBOX is the NEXRAD site in Taunton, MA.

The directory referenced in the URL actually contains all the files from the last available sequence of images. All but the last image in the sequence are named using their time/date stamp, so the actual names are unpredictable. The site permits directory listings, however, so if you use the same URL without the filename (http://radar.weather.gov/radar/images/DS.p19r0/SI.kbox/) you will get a page listing all the filenames of the latest image sequences. Parse the html and download those files to have a sequence of images which may be animated.

You’ll notice that the native NWS images have a black background, so they can be superimposed on a more colorful or detailed geographical map. The ICAO list referenced above indicated which are also NEXRAD sites.

SAME Codes

According to http://weather.gov/om/marine/wxradio.htm, SAME geographic codes are used to program SAME-capable NOAA Weather Radio receivers to receive alert messages for user-specified areas. If you have such a receiver, these codes are useful.

A complete list of SAME location codes is maintained at http://www.nws.noaa.gov/nwr/SameCode.txt.

NOAA - National Oceanic and Atmospheric Administration (U.S. Department of Commerce)

NOAA is home of the National Weather Service (NWS) which has provided its forecast information by a county-based  6-character ‘zone’ code. You can obtain a straightforward text forecast, for example, using a URL like http://weather.noaa.gov/pub/data/forecasts/zone/ma/maz022.txt, or one like http://www.srh.noaa.gov/data/forecasts/MAZ022.php will produce a more elaborate HTML page complete with graphics.

MAZ022 is the NOAA zone for Barnstable Country, MA.

These NOAA zones are sometimes referred to as ‘warning zones’ because the National Weather Service also has issued its special weather statements using these zones.

Most NOAA sites no longer require the zone, just the zip code or city and state. As it says here, http://www.erh.noaa.gov/er/box/The point and click forecasts below are generated directly from the National Digital Forecast Database. They are no longer "Zone" or County based forecaster manipulated text products, but rather point specific text products generated "on-the-fly" from gridded forecast fields prepared by National Weather Service Meteorologists.

Nevertheless, using the zones produces a more compact URL, and those cited above will produce accurate working forecasts.

This forum entry,  http://www.weather-watch.com/smf/index.php/topic,9220/prev_next,next.html, offers directions to a couple of versions of the complete zone/county lists, but you have to join Weather-Watch to be allowed to download.

Commercial Sources

There are other ways to get your weather, of course, and may of those are free. Some provide easy ways to create a block of code which can be inserted into a web page to display the latest weather (and of course to link back to their commercial sites.) If you search the web using 'weather gizmo,' 'weather button,' 'weather ticker,' or similar phrases, you'll find plenty of options, or visit your favorite commercial site and look around.

At least one commercial site (MSNBC) also permits free direct links to their raw data. It's in its own proprietary format and largely undocumented, but through trial and error a lot of PHP scripts have been developed to access and decode it. The risk, of course, is that the format or the access rules might be changed at any time. I know of no complete list of MSNBC weather geographic codes; you have to figure them out by using their regular page, entering a zip code, and examining the URL of the result page to find the embedded code.

Maintained (such as it is) by rgm at fabbnet.net