dbamsg(1) Work with encoded meteorological data

SYNOPSIS

dbamsg [command] [options] [args...]

DESCRIPTION

Examine, dump and convert files containing meteorological data. It supports observations encoded in BUFR, CREX and AOF formats.

dbamsg always requires a non-switch argument, that indicates what is the operation that should be performed:

help

Print a help summary.
help manpage

Print this manpage.
scan [options] [filter] filename [filename [...]]

Summarise the contents of a file with meteorological data.
head [options] [filter] filename [filename [...]]

Dump the contents of the header of a file with meteorological data.
dump [options] [filter] filename [filename [...]]

Dump the contents of a file with meteorological data.
cat [options] [filter] filename [filename [...]]

Dump the raw data of a file with meteorological data.
bisect [options] --test=testscript filename

Bisect filename and output the minimum subsequence found for which testscript fails.. Run testscript passing parts of filename on its stdin and checking the return code. Then divide the input in half and try on each half. Keep going until testscript does not fail in any portion of the file. Output to stdout the smallest portion for which testscript fails. This is useful to isolate the few messages in a file that cause problems.
convert [options] [filter] filename [filename [...]]

Convert meteorological data between different formats.
compare [options] filename1 [filename2]

Compare two files with meteorological data.
fixaof [options] filename [filename1 [...]]]

Recomputes the start and end of observation period in the headers of the given AOF files.
makebufr [options] filename [filename1 [...]]]

Read a simple description of a BUFR file and output the BUFR file.. Read a simple description of a BUFR file and output the BUFR file. This only works for simple BUFR messages without attributes encoded with data present bitmaps.

OPTIONS

dbamsg follows the usual GNU command line syntax, with long options starting with two dashes (`-').

Options used to filter messages

--category=num
match messages with the given data category
--subcategory=num
match BUFR messages with the given data subcategory
--check-digit=num
match CREX messages with check digit (if 1) or without check digit (if 0)
--unparsable
match only messages that cannot be parsed
--parsable
match only messages that can be parsed
--index=expr
match messages with the index in the given range (ex.: 1-5,9,22-30)

Option for command scan

-?, --help
print an help message
--verbose
verbose output
-t type, --type=type
format of the input data ('bufr', 'crex', 'aof')
--rejected=fname
write unprocessed data to this file

Option for command head

-?, --help
print an help message
--verbose
verbose output
-t type, --type=type
format of the input data ('bufr', 'crex', 'aof')
--rejected=fname
write unprocessed data to this file

Option for command dump

-?, --help
print an help message
--verbose
verbose output
-t type, --type=type
format of the input data ('bufr', 'crex', 'aof')
--rejected=fname
write unprocessed data to this file
--interpreted
dump the message as understood by the importer
--precise
import messages using precise contexts instead of standard ones
--text
dump as text that can be processed by dbamsg makebufr
--csv
dump in machine readable CSV format
--json
dump in machine readable JSON format
--dds
dump structure of data description section
--structured
structured dump of the message contents

Option for command cat

-?, --help
print an help message
--verbose
verbose output
-t type, --type=type
format of the input data ('bufr', 'crex', 'aof')
--rejected=fname
write unprocessed data to this file

Option for command bisect

-?, --help
print an help message
--verbose
verbose output
--test=cmd
command to run to test a message group
-t type, --type=type
format of the input data ('bufr', 'crex', 'aof')
--rejected=fname
write unprocessed data to this file

Option for command convert

-?, --help
print an help message
--verbose
verbose output
-t type, --type=type
format of the input data ('bufr', 'crex', 'aof', 'csv')
-d type, --dest=type
format of the data in output ('bufr', 'crex', 'aof')
--rejected=fname
write unprocessed data to this file
--template=name
template of the data in output (autoselect if not specified, 'list' gives a list)
-r rep_memo, --report=rep_memo
force output data to be of this type of report
--precise
import messages using precise contexts instead of standard ones
--bufr2netcdf-categories
recompute data categories and subcategories according to message contents, for use as input to bufr2netcdf
-o fname, --output=fname
destination file. Default: stdandard output

Option for command compare

-?, --help
print an help message
--verbose
verbose output
-t type, --type1=type
format of the first file to compare ('bufr', 'crex', 'aof')
-d type, --type2=type
format of the second file to compare ('bufr', 'crex', 'aof')
--rejected=fname
write unprocessed data to this file

Option for command fixaof

-?, --help
print an help message
--verbose
verbose output

Option for command makebufr

-?, --help
print an help message
--verbose
verbose output

EXAMPLES

Here are some example invocations of \fBdbamsg\fP:

  # Convert an AOF message to BUFR
  dbamsg convert file.aof > file.bufr
  # Convert a BUFR message to CREX
  dbamsg convert file.bufr -d crex > file.crex
  # Convert BUFR messages to CREX, but skip all those not in january 2010
  dbamsg convert year=2010 month=1 file.bufr -d crex > file.crex
  # Dump the content of a message, as they are in the message
  dbamsg dump file.bufr
  # Dump the content of a message, interpreted as physical quantities
  dbamsg dump --interpreted file.bufr

TEMPLATE NAMES

This is a list of possible template names for the --template switch:

acars

ACARS (autodetect)
acars-ecmwf

ACARS ECMWF (4.145)
acars-wmo

ACARS WMO
airep

AIREP (autodetect)
airep-ecmwf

AIREP ECMWF (4.142)
amdar

AMDAR (autodetect)
amdar-ecmwf

AMDAR ECMWF (4.144)
amdar-wmo

AMDAR WMO
buoy

Buoy (1.21)
generic

Generic (255.0)
metar

Metar (0.140)
pilot

pilot (autodetect)
pilot-ecmwf

Pilot (2.91)
pilot-wmo

Pilot (2.1, 2.2, 2.3)
pollution

Pollution (8.171)
ship

Synop ship (autodetect)
ship-abbr

Synop ship (abbreviated) (1.9)
ship-auto

Synop ship (auto) (1.13)
ship-plain

Synop ship (normal) (1.11)
ship-reduced

Synop ship (reduced) (1.19)
ship-second

Synop ship (second record) (1.12)
ship-wmo

Ship WMO
synop

Synop (autodetect)
synop-ecmwf

Synop ECMWF (autodetect) (0.1)
synop-ecmwf-auto

Synop ECMWF land auto (0.3)
synop-ecmwf-land

Synop ECMWF land (0.1)
synop-ecmwf-land-high

Synop ECMWF land high level station (0.1)
synop-wmo

Synop WMO (0.1)
temp

Temp (autodetect)
temp-ecmwf

Temp ECMWF (autodetect)
temp-ecmwf-land

Temp ECMWF land (2.101)
temp-ecmwf-ship

Temp ECMWF ship (2.102)
temp-radar

Temp radar doppler wind profile (6.1)
temp-ship

Temp ship (autodetect)
temp-wmo

Temp WMO (2.101)
wmo

WMO style templates (autodetect)

--template=list will also print the list.

AUTHOR

dbamsg has been written by Enrico Zini <[email protected]> for ARPA Emilia Romagna, Servizio Idrometeorologico.