Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iwxxm.sch bugs involving SIGMET.SIGMETPosition-2 and SIGMET.SIGMETEvolvingCondition-5 #293

Closed
blchoy opened this issue Oct 27, 2022 · 4 comments
Labels
Milestone

Comments

@blchoy
Copy link
Member

blchoy commented Oct 27, 2022

Describe the bug
SIGMET.SIGMETPosition-2 and SIGMET.SIGMETEvolvingCondition-5 in iwxxm.sch of IWXXM Version 2012-2 triggered incorrectly when a TC SIGMET report is being encapsulated in a COLLECT construct.

To Reproduce
The example (https://gist.github.com/blchoy/0d28a25aaf91ef41cb1e3b8c593a48db) created by encapsulating sigmet-A6-2-TC.xml in a COLLECT construct cannot pass the schematron check of iwxxm.sch.

Expected behavior
The example should pass the checks of the two schematron rules.

Screenshots
Not applicable.

Desktop (please complete the following information):
Not applicable.

Additional context
Not applicable.

@blchoy
Copy link
Member Author

blchoy commented Oct 27, 2022

The following are proposed changes to the two schematron rules:

   <sch:pattern id="SIGMET.SIGMETPosition-2">
      <sch:rule context="//iwxxm:SIGMETPosition">
              <sch:assert test="( ( ( exists(//iwxxm:TropicalCycloneSIGMET) and (count(//iwxxm:TropicalCycloneSIGMET//iwxxm:analysisCollection) = count(//iwxxm:TropicalCycloneSIGMET//iwxxm:analysisCollection//iwxxm:forecastPositionAnalysis//iwxxm:tropicalCyclonePosition) ) ) and ( exists(//iwxxm:TropicalCycloneSIGMET) and not(exists(//iwxxm:TropicalCycloneSIGMET//iwxxm:supplementaryAnalysisCollection//iwxxm:forecastPositionAnalysis//iwxxm:tropicalCyclonePosition) ) ) ) or ( not(exists(//iwxxm:TropicalCycloneSIGMET)) and (count(//iwxxm:TropicalCycloneSIGMET//iwxxm:tropicalCyclonePosition) = 0) ) )">SIGMET.SIGMETPosition-2: iwxxm:tropicalCyclonePosition shall only be present in iwxxm:analysisCollection of iwxxm:TropicalCycloneSIGMET</sch:assert>
      </sch:rule>
   </sch:pattern>
   <sch:pattern id="SIGMET.SIGMETEvolvingCondition-5">
      <sch:rule context="//iwxxm:SIGMETEvolvingCondition">
              <sch:assert test="( ( ( exists(//iwxxm:TropicalCycloneSIGMET) and (count(//iwxxm:TropicalCycloneSIGMET//iwxxm:analysisCollection) = c
ount(//iwxxm:TropicalCycloneSIGMET//iwxxm:analysisCollection//iwxxm:analysis//iwxxm:tropicalCyclonePosition) ) ) and ( exists(//iwxxm:TropicalCycloneSIGMET) and not(exists(//iwxxm:TropicalCycloneSIGMET//iwxxm:supplementaryAnalysisCollection//iwxxm:analysis//iwxxm:tropicalCyclonePosition) ) ) ) or ( not(exists(//iwxxm:TropicalCycloneSIGMET)) and (count(//iwxxm:TropicalCycloneSIGMET//iwxxm:tropicalCyclonePosition) = 0) ) )">SIGMET.SIGMETEvolvingCondition-5: iwxxm:tropicalCyclonePosition shall only be present in iwxxm:analysisCollection of iwxxm:TropicalCycloneSIGMET</sch:assert>
      </sch:rule>
   </sch:pattern> 

@blchoy blchoy added the bug label Oct 27, 2022
@amilan17 amilan17 modified the milestone: FT2023-1 Nov 29, 2022
@amilan17 amilan17 added this to the FT2023-1 milestone Nov 29, 2022
@blchoy
Copy link
Member Author

blchoy commented Dec 8, 2022

It was noticed that some States were not coding the example in the APAC SIGMET Guide mentioned in #250 correctly: While iwxxm:TropicalCycloneSIGMET/iwxxm:analysisCollection has a multiplicity of [0..*], in this case there shall only be one iwxxm:analysisCollection describing the TC positions and their associated CB clouds. The remaining descriptions after "AND" in the TAC message shall be coded under iwxxm:supplementaryAnalysisCollection.

It is therefore further proposed to include a new schematron rule to enforce the use of only one iwxxm:analysisCollection in a iwxxm:TropicalCycloneSIGMET:

   <sch:pattern id="SIGMET.TropicalCycloneSIGMET-1">
      <sch:rule context="//iwxxm:TropicalCycloneSIGMET">
	      <sch:assert test="( if( exists(//iwxxm:TropicalCycloneSIGMET) ) then( count(//iwxxm:TropicalCycloneSIGMET//iwxxm:analysisCollection) = 1 ) else( true() ) )">SIGMET.TropicalCycloneSIGMET-1: There shall only be one iwxxm:analysisCollection in iwxxm:TropicalCycloneSIGMET</sch:assert>
      </sch:rule>
   </sch:pattern>

@amilan17
Copy link
Member

amilan17 commented Dec 9, 2022

https://github.com/wmo-im/iwxxm/wiki/TT-AvData-Teleconference-2022-Dec-09 notes:

  • Choy presented the PR
  • @jkorosi try to validate

@amilan17
Copy link
Member

amilan17 commented Dec 9, 2022

It was noticed that some States were not coding the example in the APAC SIGMET Guide mentioned in #250 correctly..... 

@blchoy - Can you open a new issue for this? It would be good to keep track of separately.

@amilan17 amilan17 closed this as completed Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Public consultation
Development

No branches or pull requests

2 participants