wmo-im / iwxxm

XML schema and Schematron for aviation weather data exchange
https://old.wmo.int/wiswiki/tiki-index.php%3Fpage=TT-AvXML
48 stars 22 forks source link

TAF: cloudAndVisibilityOK versus CAVOK #141

Closed ernstdevreede closed 5 years ago

ernstdevreede commented 5 years ago

A question about implementing TAF's in IWXXM 2.1.1:

The cloudAndvisibilityOK attribute for the TAF's MeteorologicalAreodromeForecastRecord is a required attribute, which means it should be specified for each MeteorologicalAreodromeForecastRecord element.

This is inconsistent with the CAVOK term in TAC messages, which does not have to be repeated if it does not change. Does this mean that for each MeteorologicalAreodromeForecastRecord one would have to derive the value of the cloudAndVisibilityOK attribute from the combined values of visibility, weather and clouds, taking into account that if one of these values is not set you have to search back in the preceding non-PROB MeteorologicalAreodromeForecastRecords for the actual values? This regularly leads to the case that TAC has no CAVOK but IWXXM has cloudAndVisibilityOK=true.

For example: TAF LZIB 101058Z 1012/1112 24015KT CAVOK PROB30 TEMPO 1015/1017 20020KT 6000 BR SCT020 BECMG 1100/1102 16006KT BECMG 1104/1107 14022KT 7000 RADZ SCT010 BKN015 OVC025=

In prose: We expect CAVOK, 30% chance of 6000m visibility, later a wind shift (but still CAVOK, implicitly) and lastly a wind shift and less visibility with rain and clouds. In IWXXM for the four MeteorologicalAreodromeForecastRecords we would get the values cloudAndVisibilityOK="true" cloudAndVisibilityOK="false" cloudAndVisibilityOK="true" cloudAndVisibilityOK="false"

If in contrary the cloudAndVisibilityOK attribute would mimick the presence of CAVOK in the TAC we would get the values: cloudAndVisibilityOK="true" cloudAndVisibilityOK="false" cloudAndVisibilityOK="false" cloudAndVisibilityOK="false"

I am not sure which approach is the right one.

blchoy commented 5 years ago

Thank you for your question. Your first way of encoding (i.e. TFTF) is correct. If you set cloudAndVisibilityOK="false" with no mentioning of other elements (as in BECMG 1100/1102 16006KT) the schematron rules will complain during validation.

By the way, it would be nice if you could post your question on Google Group cbs-tt-avxml@wmo.int next time. There are a lot of experts there who are eager to share their experience in coding with IWXXM with you. We hope we could save GitHub issues for confirmed bugs/enhancements to allow easy tracking.