Skip to content

BUFRTemplateConversionHowto

Davide Cesari edited this page May 5, 2016 · 1 revision

BUFR template conversion HOWTO

DB-All.e can be used for converting BUFR messages from one template to another while keeping the contents unchanged as much as possible, e.g. from the ECMWF template, as for messages coming from the MARS archive, to the WMO template, which is the current worldwide standard for weather observation exchange and it is also required for conversion to netcdf when performing data assimilation with the COSMO model. Both input and output templates must be known to DB-All.e in order to physically interpret the data and perform the conversion. The command to perform such a conversion to WMO template looks like:

dbamsg convert --template=wmo inputobs.bufr > obs-wmo.bufr

This will decode the messages in inputobs.bufr, recode them one by one and send them to stdout (redirected to a file). The recoding is done using the WMO template most suitable for the type of observation being read; this works at the moment for observations like SYNOP, SHIP, TEMP/PILOT, aircraft reports and possibly others. The conversion tries to keep as much information as possible but some information may be lost and/or not all the fields in the output template may be filled due to the different structure of the templates. Other template are understood by DB-All.e, to see a full list, run dbamsg convert --template=list, while for getting more general help use dbamsg --help or see the relevant manpages.

If the final purpose is the conversion to NetCDF for COSMO model, an additional switch --bufr2netcdf-categories should be used:

dbamsg convert --bufr2netcdf-categories --template=wmo \
 myobs.bufr > myobs-wmo.bufr

This will allow a fine manipulation of the BUFR category and subcategory information which makes the result more suitable for the successive conversion.

Clone this wiki locally