MetarWeather ActiveX Component v1.20
Copyright (c) 2003 - 2009 Nir Sofer


MetarWeather ActiveX Component is a small ActiveX component that allows you to decode METAR weather reports and display them as a simple readable weather report. You can use this component in your Web site (By calling it from asp server script), in Visual Basic application, or in any other tool that supports ActiveX components.

About METAR Reports

METAR ("Aviation Routine Weather Report") is an international standard for reporting the weather conditions in thousands of airports about the world. The METAR weather reports are usually issued once per hour, but when there are significant changes in weather, the METAR reports are issued more frequently.
Each METAR report contains essential information about the current weather conditions: Temperature, Dew Point, Barometric Pressure, Wind Speed and Direction, Visibility, Clouds Cover, Current Weather (Rain, Thunderstorms, Hail, Snow and so on...), and more...
Here's an example for a single METAR report:
KMCO 290853Z 10006KT 8SM TSRA FEW029CB BKN110 OVC300 22/21 A3012 RMK AO2 TSB30 SLP198 P0005 60017 T02170211 58003
For most people, this line looks like an unmeaningful characters sequence, but actually it contains a lots of information about the weather conditions. If you decode the above METAR line with the MetarWeather ActiveX component, you'll see the details of the weather information that this METAR represents. Click Here to watch this METAR weather report after decoding it with MetarWeather component.

Getting METAR Reports From The Internet

The following Web sites provides free access to METAR data. You can use the above sites to obtain METAR reports, and then decode them with MetarWeather component.


This component is released as freeware for personal and non-commercial use. You are allowed to freely distribute this component via floppy disk, CD-ROM, Internet, or in any other way, as long as you don't charge anything for this.
You are also allowed to:
  • Use this component for displaying METAR weather reports in your Web site, as long as your Web site is free of charge.
  • Include this component in freeware/non-commercial application package.
However, If you want to include this component in commercial product, you must ask permission from the author.


The software is provided "AS IS" without any warranty, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The author will not be liable for any special, incidental, consequential or indirect damages due to loss of data or any other reason.

System Requirements

This component requires the MFC library - MFC42.dll.
However, you should not worry to much about that, because all systems today already have this file.

Using The MetarWeather ActiveX Component

In order to start using this component, you have to register the mweather.dll file. You can use the RegSvr32 utility to do it, for example:
RegSvr32 f:\mweather\mweather.dll

After registering the component, you can create a new METAR decoder object in any development tool that supports ActiveX components.
For Example: (In Visual Basic)
Dim objMetar  As Object

Set objMetar = CreateObject("MWeather.MetarDecoder")
In order to decode METAR string, call DecodeMetarLine method:
strMetar = "KMCO 290953Z 13006KT 10SM -TSRA BKN036CB OVC300 22/21 A3014 RMK AO2 SLP203"
blnDecoded = objMetar.DecodeMetarLine(strMetar)
If the METAR line is successfully decoded, the DecodeMetarLine function returns True, so you can continue to the next step.
Before extracting the weather report, you can change the display units according to your needs, for example:
'Tells the MetarWeather component to display the temperature and dew point in Fahrenheit:
objMetar.UnitTemperature = unFahrenheit

'Display pressure values in inch of mercury:
objMetar.UnitPressure = unInchOfMercury
Finally, you can use the GetWeatherData method to create the weather report. This function accepts one argument that represents the weather field number.
For example:
'Get the Temperature:
strTemperature = objMetar.GetWeatherData(wfTemperature)
'Get the Relative Humidity:
strRH = objMetar.GetWeatherData(wfRelativeHumidity)

The ASP page sample - metar.asp

The MetarWeather component package contains an ASP sample page that demonstrates how to use the MetarWeather component in your Web site. In this sample page, you can type a METAR line, select display units, and then click the "Decode METAR" in order view the weather report.

MetarWeather Component Reference

In order to view the information about all methods and properties of MetarWeather, click here


If you have any problem, suggestion, comment, or you found a bug in my dll, you can send a message to

Download MetarWeather ActiveX Component