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

Create BUFR HOWTO

DB-All.e can be used for creating well-formatted BUFR files from generic observations coded in a relatively simple csv text format. The observations should be written in a format similar to the following:

Longitude,Latitude,Report,Date,Level1,L1,Level2,L2,Time range,P1,P2,Varcode,Value
12.052,44.027,synop,,,,,,,,,B01001,17
12.052,44.027,synop,,,,,,,,,B01002,0
12.052,44.027,synop,2013-03-15 06:00:00,1,,,,1,0,21600,B13011,0.2
12.052,44.027,synop,2013-03-15 06:00:00,103,2000,,,254,0,0,B12101,275.8
...

The columns Longitude, Latitude and Date have obvious meanings (for the detailed interpretation of Date, see the definition of validity time in the time range documentation ).

The Report column is just a hint to the converter for choosing a suitable conversion template, so values as synop and temp are acceptable.

Vertical levels in the csv file (columns Level1,L1,Level2,L2) are coded according to tables borrowed from the WMO GRIB2 level coding: Level1 and Level2 define a finite-thickness layer on which the observation is valid, when the second level is missing the observation is considered to be valid at a single level in the vertical; the vertical level page describes in detail the codes and units for vertical levels.

Time ranges for statistical processing (columns Time range,P1,P2) define a time interval and a possible statistical processing of the observation on that interval; here too the coding style is borrowed from GRIB2 tables. The complete description of the time range for statistical processing is in the timerange page.

Codes for variables, i.e. physical quantities, indicated in the Varcode column of the csv file, are derived from the BUFR table B of WMO, the most useful values are listed in the following table

Variable code unit
WMO block number B01001
WMO station number B01002
Pressure B10004 Pa
Pressure reduced to mean sea level B10051 Pa
Wind direction B11001 Deg. true
Wind speed B11002 m/s
U component of wind B11003 m/s
V component of wind B11004 m/s
W component of wind B11006 m/s
Air temperature B12101 K
Dew-point temperature B12103 K
Specific humidity B13001 Kg/Kg
Relative humidity B13003 %
Total precipitation B13011 Kg/m^2

a complete list can be found in the [btable page](https://github.com/ARPA-SIMC/dballe/blob/maste /doc/fapi_btable.md) or in the installed file /usr/share/wreport/dballe.txt.

A single file can contain any number of lines with different sets of metadata (geographical location, time, timerange, etc.), a suitable number of BUFR messages will be coded in output.

The conversion is performed with a command similar to the following:

dbamsg convert -t csv -d bufr --template=wmo inputobs.csv > obs-wmo.bufr

where all the options for dbamsg convert command may be used. Notice that a BUFR template must be chosen for the output; when choosing an universally known template such as wmo (e.g. synop) or ecmwf-synop, only those input lines whose metadata can fit in the template will be coded in the output. If you need to code data that do not fit in a standard message, you can use the generic template which can accommodate all the possible combinations, but then the message will be coded according to local extensions.

Clone this wiki locally