ARPA-SIMC / bufr2netcdf

Tools to convert BUFR weather reports in NetCDF file format
GNU General Public License v2.0
7 stars 0 forks source link

Select mnemonic tables based on bufr table version #14

Open spanezz opened 6 months ago

spanezz commented 6 months ago

(Spin off from https://github.com/ARPA-SIMC/bufr2netcdf/issues/9#issuecomment-1991829675)

bufr2netcdf is currently always using mnem_014 for all input buffers, see https://github.com/ARPA-SIMC/bufr2netcdf/blob/master/src/namer.cc#L123

The comment in the code points at the fact that it is unclear what table to use when the input gribs are using different table versions.

I'm opening this issue to work out what bufr2netcdf should do, and then implement it properly.

What would be the expected behaviour?

dcesari commented 6 months ago

I guess that the mnemonic table should match the WMO table required by each message. However I made a check with diff and grep and each successive mnemonic table contains only additions, with a single exception of the removal of 012060 NAEIT between 20 and 21, but it has been added again in 22.

So, as far as I understand, it is safe to use the latest available table for simplicity.

dcesari commented 6 months ago

Actually that variable appeared in WMO table v22, so it was probably inserted by mistake in DWD table v20.