Skip to content

Include discipline information to CodeFlag.xml #314

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

Open
lesserwhirls opened this issue Apr 28, 2025 · 9 comments
Open

Include discipline information to CodeFlag.xml #314

lesserwhirls opened this issue Apr 28, 2025 · 9 comments
Assignees
Milestone

Comments

@lesserwhirls
Copy link

I would like to revisit this closed issue, as pervious versions of the XML documents had discipline information available in the Code Flag xml document. As an example, consider the code flag xml document distributed with GRIB2_22_0_0_exp.zip, which used to be obtainable from http://www.wmo.int/pages/prog/www/WMOCodes/WMO306_vI2/LatestVERSION/LatestVERSION.html (now 404s). Using the older Code Flag XML layout, we had:

<GRIB2_22_0_0_CodeFlag_exp_en>
  <No>331</No>
  <Title_en>Code table 4.1 - Parameter category by product discipline</Title_en>
  <SubTitle_en>Product discipline 0 - Meteorological products</SubTitle_en>
  <CodeFlag>0</CodeFlag>
  <MeaningParameterDescription_en>Temperature</MeaningParameterDescription_en>
  <Status>Operational</Status>
</GRIB2_22_0_0_CodeFlag_exp_en>

In the latest XML layout, the same CodeFlag entry is:

<GRIB2_CodeFlag_en>
  <Title_en>Code table 4.1 - Parameter category by product discipline</Title_en>
  <CodeFlag>0</CodeFlag>
  <MeaningParameterDescription_en>Temperature</MeaningParameterDescription_en>
  <Status>Operational</Status>
</GRIB2_CodeFlag_en>

Without the discipline information from the previously included <SubTitle_en> child, this code flag 0 cannot be distinguished from:

<GRIB2_CodeFlag_en>
  <Title_en>Code table 4.1 - Parameter category by product discipline</Title_en>
  <CodeFlag>0</CodeFlag>
  <MeaningParameterDescription_en>Hydrology basic products</MeaningParameterDescription_en>
  <Status>Operational</Status>
</GRIB2_CodeFlag_en>
@sebvi
Copy link
Contributor

sebvi commented Apr 29, 2025

This is a very valid point.

I am not familiar with the xml version, we use the csv at ECMWF but do we have the same issue for the sub tables of Code Table 4.2?

@lesserwhirls
Copy link
Author

Greetings @sebvi! The GRIB2/txt/CodeFlag.txt file still contains the discipline information for table 4.1 and 4.2 under the SubTitle_en column, which is what used to be in the xml version as <SubTitle_en> child elements.

@amilan17
Copy link
Member

https://github.com/wmo-im/et-data/wiki/2025.04.30.et.data notes:
@antoinemerle will help with updating the scripts as needed

@amilan17 amilan17 moved this from Submitted to In progress in GRIB2 Amendments Apr 30, 2025
@amilan17
Copy link
Member

amilan17 commented May 2, 2025

@lesserwhirls the previous versions of GRIB and BUFR are available from this site: https://community.wmo.int/en/activity-areas/wis/previous-versions

@amilan17
Copy link
Member

amilan17 commented May 2, 2025

I think this change was introduced in v26, after we created a script to generate the XML in GitHub...

v25...v26

It looks like a simple fix in the py script

Image

@amilan17 amilan17 added this to the FT2025-2 milestone May 2, 2025
@amilan17
Copy link
Member

amilan17 commented May 2, 2025

updated the script, please review the XML in this branch

https://github.com/wmo-im/GRIB2/tree/314-include-discipline-information-to-codeflagxml

Are the empty tags ok? <SubTitle_en/>

@lesserwhirls
Copy link
Author

Greetings @amilan17! Empty tags are ok for my use. Thank you so much!

@antoinemerle
Copy link
Contributor

Thanks @amilan17 for updating the script.
So this is sorted it out ?

Thanks

@amilan17
Copy link
Member

https://github.com/wmo-im/et-data/wiki/2025.05.27.et.data notes:
XML is updated; team noted that there no issues with integration where used;

@wmo-im/et-data can you test the XML in systems where relevant?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

When branches are created from issues, their pull requests are automatically linked.

4 participants