Error in Metar String

May 18, 2011 at 8:47 PM

I am using NOAA's METAR data and I am receiving an error when I try to read it. It just states basically, it is not in the correct format. Here is a sample URL from NOAA:

You can view all available METAR data here:


May 19, 2011 at 11:29 AM

Hi. I checked this but I found no error. Unfortunately you did not write any information about the thrown exception. There can be two possible problems:

a) the curret source (which is something like ftp:/ftp??? is not accessible from your location. I didn't know URL you pasted here, but for support, I created a class NoaaGovRetrieverV2 which will download metar from the URL you entered. This class is not available via main package, but is located in separated release - see . Only choose which library do you need (.NET vs Silverlight) and overwrite the previous files. *

b) the metar on the page is in formal incorrect form (that means there is syntax error in the metar string). I made the library by METAR specification, however I found some US airports sometimes distrurb the original string and in that case the metar cannot be decoded. In this case I can help you only if you send me the text of the incorrect metar string. The current metar string for KSDF works ok.


* BTW the content of the files in both source of "a)" problems is the same. So simply, all you need is to open a stream to your URL, download the content, take the second line (this is important, first line contains some date), add keyword "METAR " before it as it is required by METAR specification and send it for parsing.

May 19, 2011 at 1:19 PM

Thanks to your reply I figured out what it was. The NOAA METAR does not have METAR keyword at the beginning of the string.


May 19, 2011 at 1:27 PM

I'm glad to read that :-)


Unfortunately, keyword METAR is required at the beginning of the string to recognize between METAR and SPECI report. However, most of US metar stations does not include it. I do this in the algorithm of retriever manually.

Jul 19, 2012 at 2:47 PM
Edited Jul 19, 2012 at 4:01 PM

METAR LIRS 191355Z /////KT CAVOK 33/11 Q1014


Decoding failed at ->Whole METAR->Wind with variability->Wind->Wind. Reason: >> Failed text is >/////KT CAVOK 33/11 Q1014<. --> Decoding failed at ->Wind with variability->Wind->Wind. Reason: >> Failed text is >/////KT CAVOK 33/11 Q1014<. --> Decoding failed at ->Wind->Wind. Reason: >> Failed text is >/////KT CAVOK 33/11 Q1014<. --> Decoding failed at ->Wind. Reason: >> Failed text is >/////KT CAVOK 33/11 Q1014<. --> Failed text is >/////KT CAVOK 33/11 Q1014<.

/////KT means that the information about wind is not available


Jul 20, 2012 at 6:42 PM


I know the "issue" what is not the issue. The problem is that in the specification of WMO, the "Wind direction" and "wind speed" are not optional blocks. They must be present with valid values.

However, I got multiple reports about this, so I will do something with that. So far I can offer you two solutions:

* you can manually check for /////KT string and replace it with something valid, like 00000KT

* if you downloaded latest version, you can try to use different analyse, "ENG.WMOCodes.Decoders.MetarDecoderWithAllOptional" class may help you, which tries to decode the METAR string with all blocks as optional. It was developed for Canada metars, where this is valid metar format.


The future version of decoder with try to deal with this.