This project is read-only.

TAF visibility of "P6SM" is not handled


TAFs commonly contain the string "P6SM" in the visibility field to indicate "greater than six statute miles".
KBOS 302027Z 3020/3124 27010KT P6SM SCT025 BKN250
This string does not match the visibility expression, however:
          @"^((CAVOK)|(\d{4})|(((M)?|(\d+) )(\d+)(/(\d\d?))?SM))";
And ends up being completely ignored.


Engin1980 wrote Sep 6, 2013 at 9:03 PM


thank you for your report. Well, to be honest, I just right now checked the official WMO documentation and I am not able to find there anything like this - is it really typically used this way and what exactly does it mean? Moreover, is there some opposite way, how to say e.g. "less than six statute miles"?

To be honest, Im getting depressed by differences between US, Canada and EU weather reports and currently I will probably divide it into three different decoders, because I cannot see the advantage to have it together and it is becaming really hard to keep all together to work correctly.

So, for now, I am sorry, I cannot help you. You can now download source codes and update them for your own, but I am not able to simply add "greater than..." into decoding mechanism, because I have no idea how to handle it in EU metars.

TimSylvester wrote Sep 6, 2013 at 10:02 PM

I completely understand your frustration. It's just that complexity that makes a project like this so useful, though.

This notation appears on the NOAA site, so, if it's not documented by WMO, it's probably an "extension" used by FAA/NOAA in the U.S..

In terms of the decoded representation, I would expect perhaps a simple boolean value indicating "more than" which would only ever be set to true in this case; if there is no equivalent in other regions. I could add that myself, but I don't want to diverge from your project unless strictly necessary. For now I'm just replacing "P6SM" with "6SM" in the input string.

It seems to me that the parser should actually produce an error when it encounters something that it cannot understand, however. I know that it does in other cases.