.TH DBAMSG 1 "dec 9, 2016 .SH NAME dbamsg \- Work with encoded meteorological data .SH SYNOPSIS .B dbamsg .RI [ command ] .RI [ options ] .RI [ args ... ] .br .SH DESCRIPTION Examine, dump and convert files containing meteorological data. It supports observations encoded in BUFR, CREX and AOF formats. .P \fBdbamsg\fP always requires a non-switch argument, that indicates what is the operation that should be performed: .TP \fBhelp\fP .br Print a help summary. .TP \fBhelp manpage\fP .br Print this manpage. .TP \fBscan [options] [filter] filename [filename [...]]\fP .br Summarise the contents of a file with meteorological data. .TP \fBhead [options] [filter] filename [filename [...]]\fP .br Dump the contents of the header of a file with meteorological data. .TP \fBdump [options] [filter] filename [filename [...]]\fP .br Dump the contents of a file with meteorological data. .TP \fBcat [options] [filter] filename [filename [...]]\fP .br Dump the raw data of a file with meteorological data. .TP \fBbisect [options] --test=testscript filename\fP .br 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. .TP \fBconvert [options] [filter] filename [filename [...]]\fP .br Convert meteorological data between different formats. .TP \fBcompare [options] filename1 [filename2]\fP .br Compare two files with meteorological data. .TP \fBfixaof [options] filename [filename1 [...]]]\fP .br Recomputes the start and end of observation period in the headers of the given AOF files. .TP \fBmakebufr [options] filename [filename1 [...]]]\fP .br 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. .SH OPTIONS \fBdbamsg\fP follows the usual GNU command line syntax, with long options starting with two dashes (`-'). .SS Options used to filter messages .TP .B \-\-category=num match messages with the given data category .TP .B \-\-subcategory=num match BUFR messages with the given data subcategory .TP .B \-\-check-digit=num match CREX messages with check digit (if 1) or without check digit (if 0) .TP .B \-\-unparsable match only messages that cannot be parsed .TP .B \-\-parsable match only messages that can be parsed .TP .B \-\-index=expr match messages with the index in the given range (ex.: 1-5,9,22-30) .SS Option for command scan .TP .B \-?, \-\-help print an help message .TP .B \-\-verbose verbose output .TP .B \-t type, \-\-type=type format of the input data ('bufr', 'crex', 'aof') .TP .B \-\-rejected=fname write unprocessed data to this file .SS Option for command head .TP .B \-?, \-\-help print an help message .TP .B \-\-verbose verbose output .TP .B \-t type, \-\-type=type format of the input data ('bufr', 'crex', 'aof') .TP .B \-\-rejected=fname write unprocessed data to this file .SS Option for command dump .TP .B \-?, \-\-help print an help message .TP .B \-\-verbose verbose output .TP .B \-t type, \-\-type=type format of the input data ('bufr', 'crex', 'aof') .TP .B \-\-rejected=fname write unprocessed data to this file .TP .B \-\-interpreted dump the message as understood by the importer .TP .B \-\-precise import messages using precise contexts instead of standard ones .TP .B \-\-text dump as text that can be processed by dbamsg makebufr .TP .B \-\-csv dump in machine readable CSV format .TP .B \-\-json dump in machine readable JSON format .TP .B \-\-dds dump structure of data description section .TP .B \-\-structured structured dump of the message contents .SS Option for command cat .TP .B \-?, \-\-help print an help message .TP .B \-\-verbose verbose output .TP .B \-t type, \-\-type=type format of the input data ('bufr', 'crex', 'aof') .TP .B \-\-rejected=fname write unprocessed data to this file .SS Option for command bisect .TP .B \-?, \-\-help print an help message .TP .B \-\-verbose verbose output .TP .B \-\-test=cmd command to run to test a message group .TP .B \-t type, \-\-type=type format of the input data ('bufr', 'crex', 'aof') .TP .B \-\-rejected=fname write unprocessed data to this file .SS Option for command convert .TP .B \-?, \-\-help print an help message .TP .B \-\-verbose verbose output .TP .B \-t type, \-\-type=type format of the input data ('bufr', 'crex', 'aof', 'csv') .TP .B \-d type, \-\-dest=type format of the data in output ('bufr', 'crex', 'aof') .TP .B \-\-rejected=fname write unprocessed data to this file .TP .B \-\-template=name template of the data in output (autoselect if not specified, 'list' gives a list) .TP .B \-r rep_memo, \-\-report=rep_memo force output data to be of this type of report .TP .B \-\-precise import messages using precise contexts instead of standard ones .TP .B \-\-bufr2netcdf-categories recompute data categories and subcategories according to message contents, for use as input to bufr2netcdf .TP .B \-o fname, \-\-output=fname destination file. Default: stdandard output .SS Option for command compare .TP .B \-?, \-\-help print an help message .TP .B \-\-verbose verbose output .TP .B \-t type, \-\-type1=type format of the first file to compare ('bufr', 'crex', 'aof') .TP .B \-d type, \-\-type2=type format of the second file to compare ('bufr', 'crex', 'aof') .TP .B \-\-rejected=fname write unprocessed data to this file .SS Option for command fixaof .TP .B \-?, \-\-help print an help message .TP .B \-\-verbose verbose output .SS Option for command makebufr .TP .B \-?, \-\-help print an help message .TP .B \-\-verbose verbose output .SH EXAMPLES Here are some example invocations of \\fBdbamsg\\fP: .P .nf # 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 .fi .SH TEMPLATE NAMES This is a list of possible template names for the \fB\-\-template\fP switch: .P .TP \fBacars\fP .br ACARS (autodetect) .TP \fBacars-ecmwf\fP .br ACARS ECMWF (4.145) .TP \fBacars-wmo\fP .br ACARS WMO .TP \fBairep\fP .br AIREP (autodetect) .TP \fBairep-ecmwf\fP .br AIREP ECMWF (4.142) .TP \fBamdar\fP .br AMDAR (autodetect) .TP \fBamdar-ecmwf\fP .br AMDAR ECMWF (4.144) .TP \fBamdar-wmo\fP .br AMDAR WMO .TP \fBbuoy\fP .br Buoy (1.21) .TP \fBgeneric\fP .br Generic (255.0) .TP \fBmetar\fP .br Metar (0.140) .TP \fBpilot\fP .br pilot (autodetect) .TP \fBpilot-ecmwf\fP .br Pilot (2.91) .TP \fBpilot-wmo\fP .br Pilot (2.1, 2.2, 2.3) .TP \fBpollution\fP .br Pollution (8.171) .TP \fBship\fP .br Synop ship (autodetect) .TP \fBship-abbr\fP .br Synop ship (abbreviated) (1.9) .TP \fBship-auto\fP .br Synop ship (auto) (1.13) .TP \fBship-plain\fP .br Synop ship (normal) (1.11) .TP \fBship-reduced\fP .br Synop ship (reduced) (1.19) .TP \fBship-second\fP .br Synop ship (second record) (1.12) .TP \fBship-wmo\fP .br Ship WMO .TP \fBsynop\fP .br Synop (autodetect) .TP \fBsynop-ecmwf\fP .br Synop ECMWF (autodetect) (0.1) .TP \fBsynop-ecmwf-auto\fP .br Synop ECMWF land auto (0.3) .TP \fBsynop-ecmwf-land\fP .br Synop ECMWF land (0.1) .TP \fBsynop-ecmwf-land-high\fP .br Synop ECMWF land high level station (0.1) .TP \fBsynop-wmo\fP .br Synop WMO (0.1) .TP \fBtemp\fP .br Temp (autodetect) .TP \fBtemp-ecmwf\fP .br Temp ECMWF (autodetect) .TP \fBtemp-ecmwf-land\fP .br Temp ECMWF land (2.101) .TP \fBtemp-ecmwf-ship\fP .br Temp ECMWF ship (2.102) .TP \fBtemp-radar\fP .br Temp radar doppler wind profile (6.1) .TP \fBtemp-ship\fP .br Temp ship (autodetect) .TP \fBtemp-wmo\fP .br Temp WMO (2.101) .TP \fBwmo\fP .br WMO style templates (autodetect) .P \-\-template=list will also print the list. .SH AUTHOR \fBdbamsg\fP has been written by Enrico Zini for ARPA Emilia Romagna, Servizio Idrometeorologico.