Add Table C

Asked by Laura on 2015-02-24

Hi everybody,
I write you because I have a problem with bufr decoding tables used by your library libECBUFR.
For some bufr data I get back the error messages "Can't decode messages". I have update to the last version (23) table B and D
in /usr/share/libecbufr but I guess I need also BUFR TABLE C FLAGS because for these products:
"The encoding/decoding of the ASR product requires new entries in the BUFR Code and Flag Tables" .
How can I add this ECMWF table to decode the bufr with libecbufr?

Thank you for the help.


Question information

English Edit question
libECBUFR Edit question
No assignee Edit question
Solved by:
Yves Pelletier
Last query:
Last reply:

Hi Laura,

Code and Flags Tables are not used directly by libECBUFR or by most BUFR software I am aware of. I think there is a misunderstanding, but don't worry, let's see if we can clear it up.

Quick recap: the structure and content of a BUFR message is defined by a sequence of descriptors contained in Section 3 of the BUFR message. The data payload is a series of numbers, contained in Section 4. The numbers can be retrieved by following the structure given by the sequence of descriptors. By the end of the decoding process, you get numerical values associated to a bunch of Table B descriptors.

For example, the sequence may have contained desciptor 0-05-001 (Latitude (high accuracy)) and you would now have decoded a value of, say, 45.73439 for that descriptor. In Table B, the units of 0-05-001 are defined as "degree". And so, now you know that the latitude encoded in the message is 45.73439 degrees.

Let us suppose the sequence also contains descriptor 0-20-012 (Cloud Type). Let's say the decoded value is 3. In Table B, the units of 0-20-012 are defined as "Code Table". So now, we need to go to the Code Table for this descriptor. It is kept with all the other Code and Flag Tables, and is called 'Code Table 0 20 012'. And in Code Table 0 20 012 we find that value "3" corresponds to the cloud type Altocumulus. Most BUFR software, including libECBUFR, do not currently take this additional step of consulting the Code Table and spitting out "Altocumulus". It will just spit out "3".

All you need for the "mechanical" process of decoding BUFR are Tables B and D. The Codes and Flags Tables are used to assign numerical identifiers to non-numerical concepts, like cloud type or the character of precipitation. So if your documentation says that "The encoding/decoding of the ASR product requires new entries in the BUFR Code and Flag Tables", it does not mean you will be unable to decode a message, it just says that some Code and Flag Tables need to be updated in order for users to be able to interpret some of the numerical values that will come out of the decoder.

Also, just to clarify something you said, Table C is not related to Code and Flag Tables.

So, in the end, your error message "Can't decode" is probably unrelated to all this. If you can give us a sample of the problematic BUFR, we will see if we can reproduce the issue.

Laura (lauramail) said : #2

Many thanks for the clear explanation!
I have added entries in the D table and it works.

My best,

Laura (lauramail) said : #3

Thanks Yves Pelletier, that solved my question.

I'm glad I was able to help.