Closed Akramz closed 7 years ago
Hi Akramz,
the BUFR file format is a binary format, and to decode it a table with detailed definition of its content is needed (i.e. which variable takes how many bits in the file, how to scale it, etc.) This definition usually is stored in so called BUFR tables, and I suspect there is your problem. WMO defines standard tables, a new version each year, and it seems you have a file that cannot be decoded using these standard tables. This results in a keyerror during decoding. In addition some BUFR files have been created using custom definitions, which may be independent from the definitions provided by WMO. The key code in the error message confirms this. It ends with 239, and all keys ending with a number between 192 and 255 are reserved for local use, so not provided by WMO. Therefore you need to have a copy of the BUFR table files that where used to create this BUFR file, only then you can decode it. You should contact the person or institute that generated this BUFR file and ask them to provide such BUFR table files. One issue you may encounter, is the fact that the format of BUFR table files is not defined in any standard, so different types of BUFR endocing/decoding software use different formats for the BUFR table files. If needed I can assist you to convert them to the right format needed by pybufr-ecmwf. Once you have these table files feel free to contact me again.
marked the issue as enhancement, since the error message could be made a lot clearer.
Additional explanation was added to the error message with commit #484. Closing this request.
Hello,
I wanted to dump the content of a BUFR file using the file provided in the library "_bufr_toascii.py", and i got the following error :
After getting this error i thought i should try installing and dumping The BUFR using the ECCODES Library directly using the bufr_dump command, but then again i got a similar error :
I guess the error is related to my file but i know how, i am new to BUFR and i don't know how to read or debug related errors, any hint or word of advice would be much appreciated.
Thank you.