.TH DBAMSG 1 "jan 10, 2023 .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 or CREX 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 \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', 'json', 'csv') .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', 'json', 'csv') .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', 'json', 'csv') .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', 'json', 'csv') .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', 'json', 'csv') .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', 'json', 'csv') .TP .B \-d type, \-\-dest=type format of the data in output ('bufr', 'crex', 'json') .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', 'json', 'csv') .TP .B \-d type, \-\-type2=type format of the second file to compare ('bufr', 'crex', 'json', 'csv') .TP .B \-\-rejected=fname write unprocessed data to this file .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 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 AUTHOR \fBdbamsg\fP has been written by Enrico Zini for ARPA Emilia Romagna, Servizio Idrometeorologico.