Open dwfncar opened 6 years ago
Moving down to major because I think it can wait until June 2018 by jensen
Charge 2799991
Moved to 10.1 since this is not needed by UK Met Office.
This can be done by using python embedding. There is a python package. PyBufrKit \& Documenation.
@hsoh-u do you have an example of how to implement python embedding for pb2nc? Specifically, what object is it expecting the python script to create? e.g. python embedding for grid_stat needs a numpy array named met_data
plus an attrs
dict. What does pb2nc expect?
Apologies if this is already in the docs somewhere. I can't seem to find it.
Unlike ascii2nc, the python embedding for pb2nc is not supported. pb2nc was implemented with APIs from the PREPBUFR library. The python embedding for ECMWF BUFR should do what pb2nc does for PREPBUFR in python. Two options are available for the python object for MET point observation data.
We are working to simplify the method 2
Based upon meetings with ECMWF staff, the ECMWF BUFR tables are external to the BUFR data files. This task is to enhance MET as follows:
(1) Enable pb2nc to read ECMWF BUFR files.
(2) Determine the BUFR table that specified for this data.
(3) Check if the specified BUFR table is included with the BUFR file.
(4) If so, use it.
(5) If not, look for the MET_BUFR_TABLES environment variable which specifies a directory containing BUFR tables.
(6) Read the specified BUFR table and use it to interpret the data.
The ECMWF BUFR tables are available here:
https://software.ecmwf.int/wiki/display/BUFR/BUFRDC+Home
That website contains a tarball of BUFR tables used by ECMWF along with many other institutions around the world. Rather than redistributing the BUFRDC tables ourselves, just point users to where they can download them.
Also, suggest enhancing PB2NC so that if the BUFR table is not included with the data and an external table can't be located in the MET_BUFR_TABLES directory, print a useful error message. [MET-926] created by johnhg
Charge Key: 2799991