Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
bufr.pm:bufrdump.pl_help [2010-04-07 11:04:52] pals |
bufr.pm:bufrdump.pl_help [2022-05-31 09:29:31] (current) |
||
---|---|---|---|
Line 2: | Line 2: | ||
Usage: | Usage: | ||
bufrdump.pl <bufr file(s)> | bufrdump.pl <bufr file(s)> | ||
- | [--filter <filter file>] | + | [--filter <filter file | filter list>] |
- | [--param < | + | [--param < |
- | [--lon1 x1] | + | [--sort] |
- | [--lat1 y1] | + | [--sort_on < |
- | [--lon2 x2] | + | [--station <station list>] |
- | [--lat2 | + | [--transform < |
+ | [--lon1 | ||
+ | [--lat1 | ||
+ | [--lon2 | ||
+ | [--lat2 | ||
+ | [--obstype < | ||
[--tablepath <path to BUFR tables>] | [--tablepath <path to BUFR tables>] | ||
[--help] | [--help] | ||
Options: | Options: | ||
- | --filter <filter file> | + | --filter <filter file | filter list> |
- | Decode observations meeting criteria in <filter file> only | + | Decode observations meeting criteria in filter file or |
- | --param < | + | filter list only |
- | Print parameters in <parameter file> only, in same order | + | --param < |
- | as they occur in < | + | Print parameters in parameter file or comma |
- | --lon1 x1 | + | separated list (e.g. wmonr, |
- | --lat1 y1 | + | as they occur there. If using --csv possibly |
- | --lon2 x2 | + | followed by --delimiter < |
- | --lat2 y2 | + | be printed using the CSV (comma-separated values) |
+ | format, with the delimiter del (default is ';' | ||
+ | --sort | ||
+ | first stations with wmonr, then stations with nationalnr, | ||
+ | call sign, buoy_id or aircraft (others left out) | ||
+ | --sort_on | ||
+ | values of parameter, or decreasing values if a ' | ||
+ | follows the parameter name. E.g. --sort_on TA- will | ||
+ | sort on decreasing temperatures. Observations not | ||
+ | containing the parameter at all will be printed lastly, | ||
+ | except when --sort_on is combined with --sort (in which | ||
+ | case sorting is done firstly on station identification, | ||
+ | secondly on parameter with missing values printed first) | ||
+ | --station <station list> | ||
+ | Print observations for stations in station list only, | ||
+ | e.g. wmonr=01384, | ||
+ | --transform < | ||
+ | Do the transformations of parameter values listed in | ||
+ | transformation file | ||
+ | --lon1 | ||
+ | --lat1 | ||
+ | --lon2 | ||
+ | --lat2 | ||
x1,y1,x2,y2 should be decimal degrees | x1,y1,x2,y2 should be decimal degrees | ||
+ | --obstype < | ||
+ | Force observation type. If this option is not set, | ||
+ | will make an educated guess of observation type | ||
+ | based on metadata in section 1 of each BUFR message | ||
--tablepath <path to BUFR tables> | --tablepath <path to BUFR tables> | ||
Set path to BUFR tables (overrides ENV{BUFR_TABLES}) | Set path to BUFR tables (overrides ENV{BUFR_TABLES}) | ||
- | --help | + | --help |
+ | perldoc bufrdump.pl) | ||
- | Options may be abbreviated, | + | Options may be abbreviated, |
To avoid having to use the " | To avoid having to use the " | ||
- | the invironment | + | the environment |
tables are located (unless the default path provided by bufrdump.pl | tables are located (unless the default path provided by bufrdump.pl | ||
works for you). | works for you). | ||
- | The lines in < | + | The lines in < |
- | | + | < |
- | temperature to be printed for a BUFR SYNOP file, the < | + | |
- | | + | temperature to be printed for a BUFR SYNOP file, either supply |
+ | |||
+ | wmonr, | ||
+ | |||
+ | as argument to --params, or supply a < | ||
+ | | ||
wmonr | wmonr | ||
- | | + | |
+ | call_sign | ||
TA | TA | ||
If you want " | If you want " | ||
in BUFR message, precede the parameter name with an exclamation mark | in BUFR message, precede the parameter name with an exclamation mark | ||
- | (e.g. ' | + | (e.g. ' |
+ | argument to --param is a parameter list, you must prevent the shell from | ||
+ | attaching special meaning to the exclamation mark by enclosing the list | ||
+ | in single quotes. | ||
+ | |||
+ | If the parameter list consists of one parameter only, a comma must be | ||
+ | appended (e.g. ' | ||
+ | comma to signal that this is not a filename but parameter name(s). | ||
+ | |||
+ | If --csv is used in conjunction with --param, all values will be printed | ||
+ | using the CSV format, with first line listing the parameters, and with | ||
+ | missing fields printed as -32767 if the parameter is marked with ' | ||
+ | parameter file or list. With the parameter file above, the listing may | ||
+ | for example start like | ||
+ | |||
+ | wmonr; | ||
+ | 01001;;; | ||
+ | ;; | ||
+ | |||
+ | You can choose another delimiter than semicolon by use of option | ||
+ | --delimiter < | ||
Using --filter will decode only those observations that meet at least | Using --filter will decode only those observations that meet at least | ||
Line 50: | Line 108: | ||
<filter file>, where the BUFR descriptor criteria should come first in | <filter file>, where the BUFR descriptor criteria should come first in | ||
filter file followed by a blank line, then comes the parameter criteria | filter file followed by a blank line, then comes the parameter criteria | ||
- | which should match < | + | which should match < |
- | | + | |
+ | and !~ should be a Perl match regular expression. The parameter criteria | ||
+ | may be phrased as alternatives by separating them with ' | ||
+ | line. An example filter file is | ||
D: 001001 I2.2 | D: 001001 I2.2 | ||
Line 59: | Line 120: | ||
06 252 | 06 252 | ||
D: 001011 A9 | D: 001011 A9 | ||
- | | + | |
- | NN != 0 | + | |
+ | | ||
TA >= 5 | TA >= 5 | ||
TA < 9.5 | TA < 9.5 | ||
+ | RR_24 | ||
which decodes all observations with block number 01, two other specific | which decodes all observations with block number 01, two other specific | ||
- | wmo stations and one specific ship, having | + | wmo stations and one specific ship, where stations should be manned and |
- | (but NN must be part of the message) | + | have cloud cover with a value different from 8, and have temperature |
- | | + | |
+ | hours. Comment lines starting with # will be ignored. | ||
+ | |||
+ | Another example: the filter file (starting with a blank line!) | ||
+ | |||
+ | call_sign =~ / | ||
+ | obstime >= ' | ||
+ | HW | HWA | PW | PWA | ||
+ | FF > 10 | FG_010 > 10 | ||
+ | |||
+ | will print only those ship observations for which the 4 character | ||
+ | call_sign starts with 2 letters in the interval LA-LN, and having | ||
+ | obstime larger or equal to the datetime given, and containing wave data | ||
+ | (specifically: | ||
+ | measured), and with wind or 10 minutes gust more than 10 m/s. | ||
+ | |||
+ | For convenience, | ||
+ | provide the filter criteria on the command line. Example: | ||
+ | |||
+ | --filter ' | ||
+ | |||
+ | will decode only observations with wmonr, having positive temperature | ||
+ | and containing precipitation for 12 or 24 hours and not reporting wind. | ||
+ | If (like for --param) the filter list consists of one criterium only, a | ||
+ | comma must be appended. | ||
+ | |||
+ | To avoid the need of creating a filter file when observations for some | ||
+ | few stations are requested, you can provide the stations in a comma | ||
+ | separated list after option --station. Some examples: | ||
+ | |||
+ | --station wmonr=01001, | ||
+ | --station nationalnr=614_0050410003, | ||
+ | --station call_sign=LF5U | ||
+ | --station buoyid=64607, | ||
+ | --station aircraft=EU3421, | ||
+ | |||
+ | You cannot mix different kinds of stations this way (before ' | ||
+ | choose either wmonr, nationalnr, call_sign, buoy_id or aircraft). Note | ||
+ | also that providing the stations in the BUFR descriptor part (first | ||
+ | part) of the filter file will speed up execution time considerably, | ||
+ | compared to using option --station. It is possible to combine --filter | ||
+ | with --station if done with some care, e.g. specifying WMO block 01 and | ||
+ | the required parameters in filter file, then the requested stations in | ||
+ | station list. | ||
+ | |||
+ | The --transform option is provided mainly to be able to use other units | ||
+ | than what is default in bufrdump.pl. The transformation file should list | ||
+ | the transformations wanted, one per line as | ||
+ | |||
+ | < | ||
+ | |||
+ | where $x is original value of the parameter. | ||
+ | |||
+ | For example, the following transformation file will display wind speed | ||
+ | FF and wind gust FG in knots instead of m/s, rounded to one decimal, and | ||
+ | cloud cover NN in % (instead of the default which is using WMO code | ||
+ | table 2700, roughly counting octas): | ||
+ | |||
+ | FF = sprintf(" | ||
+ | FG = sprintf(" | ||
+ | NN = int($x*12.5 + .5) | ||
+ | |||
+ | If --transform is combined with --filter, the filter criteria should | ||
+ | refer to the transformed values. E.g. if the above NN transform to % is | ||
+ | to be applied for sky not all covered by clouds, you should use NN != | ||
+ | 100 instead of NN != 8 in filter file. | ||
+ | |||
+ | The --obstype option might be handy in some special cases, like when you | ||
+ | are interested only in the surface part of oceanographic data (then use | ||
+ | ' | ||
+ | high resolution radiosonde data (then use ' | ||
+ | when data category and/or data sub-category in the BUFR messages have | ||
+ | unusual values. | ||
</ | </ |