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

Originating centre and sub centre incorrect in BUFR generated by wis2box #536

Closed
david-i-berry opened this issue Oct 2, 2023 · 12 comments
Closed
Assignees
Labels
bug Something isn't working enhancement New feature or request
Milestone

Comments

@david-i-berry
Copy link
Member

Whilst the originating centre and sub centre in BUFR data generated by the wis2box (via synop2bufr and csv2bufr) can be set by configuring the csv2bufr mapping files this has not been done for the vast majority of wis2box's currently installed.

With the new configuration workflow this could be done via an environment variable and then using this environment variable via the API and event driven workflows.

@maaikelimper maaikelimper added this to the sprint-013 milestone Oct 2, 2023
@maaikelimper maaikelimper added enhancement New feature or request bug Something isn't working labels Oct 2, 2023
@tomkralidis
Copy link
Collaborator

tomkralidis commented Nov 9, 2023

2023-11-09 wis2box standup

  • we should ensure the value is null/missing rather than incorrect (in BUFR tools)

@maaikelimper maaikelimper removed their assignment Nov 9, 2023
@tomkralidis
Copy link
Collaborator

  1. check BUFR regulations on centre id requirements (@david-i-berry)
  2. default is null
  3. in BUFR tools, check for centre id environment variable; if exists, then set, else null/unset

@tomkralidis
Copy link
Collaborator

  • default is null
    • template changes in synop2bufr/csv2bufr

@tomkralidis
Copy link
Collaborator

2024-01-17

  • updated as part of csv2bufr-template refactor
  • needs update in synop2bufr
  • needs testing/release management

@david-i-berry
Copy link
Member Author

wis2box docs need updating to instruct user how to update originating centre (some initial instructions provided as part of the Jakarta training material).

@tomkralidis
Copy link
Collaborator

2024-01-30

@RoryPTB
Copy link
Contributor

RoryPTB commented Jan 31, 2024

Update:
When the BUFR header centre and subcentre are not set in the mapping file, the default is not none but rather 98 and 0 respectively. So, it appears that ECMWF are setting the defaults to their own if it is missing. Hence the use of environment variables BUFR_ORIGINATING_CENTRE and BUFR_ORIGINATING_SUBCENTRE should be mandatory.

@tomkralidis
Copy link
Collaborator

Thanks @RoryPTB. Can we (in the BUFR handler) force unset these values in any way? Or is the result the same?

@RoryPTB
Copy link
Contributor

RoryPTB commented Feb 1, 2024

Update:
It turns out it is possible to manually do this. Elements that are part of the data section can be set to MISSING. However, elements in the header section are set to missing by setting all of their respective bit values to 1. Since the originating centre and originating subcentre have a data width of 16, setting their default values to 65535 is equivalent to missing.

In this way, the environment variables are no longer mandatory. If they are not set however, synop2bufr will still present a warning to the user.
For the implementation of this, please see the latest commit of my PR.

@david-i-berry
Copy link
Member Author

See also #546

@tomkralidis
Copy link
Collaborator

2024-03-05:

  • fixed in API, will be fixed once API updates are merged/integrated to stack

@tomkralidis
Copy link
Collaborator

Closing. Will monitor as wis2box BUFR production circulates across WIS2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants