Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
bufr.pm:bufrdump.pl_help [2010-02-02 15:19:34] pals created |
bufr.pm:bufrdump.pl_help [2012-02-06 15:46:01] pals |
||
---|---|---|---|
Line 1: | Line 1: | ||
< | < | ||
- | Usage: | + | Usage: |
+ | | ||
+ | | ||
+ | [--param < | ||
+ | [--sort] | ||
+ | [--sort_on < | ||
+ | [--station <station list>] | ||
+ | [--transform < | ||
+ | [--lon1 x1] | ||
+ | [--lat1 y1] | ||
+ | [--lon2 x2] | ||
+ | [--lat2 x2] | ||
+ | [--obstype < | ||
+ | [--tablepath <path to BUFR tables> | ||
+ | [--help] | ||
- | Will print section 4 in BUFR messages | + | Options: |
+ | --filter <filter file> | ||
+ | Decode observations meeting criteria | ||
+ | --param < | ||
+ | Print parameters in parameter file or comma separated | ||
+ | list (e.g. wmonr,TA) only, in same order as they occur | ||
+ | there. If --csv, the parameters vill be printed using | ||
+ | the CSV (comma separated values) format | ||
+ | --sort | ||
+ | first stations with wmonr, then stations with nationalnr, | ||
+ | call sign, buoy_id or aircraft (others left out) | ||
+ | --sort_on <parameter>[-] Sort the decoded observations on increasing | ||
+ | values of < | ||
+ | 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 < | ||
+ | --station <station list> | ||
+ | Print observations for stations in station list only, | ||
+ | e.g. wmonr=01384, | ||
+ | --transform < | ||
+ | Do the transformations of parameter values listed in | ||
+ | < | ||
+ | --lon1 x1 | ||
+ | --lat1 y1 | ||
+ | --lon2 x2 | ||
+ | --lat2 y2 | ||
+ | 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> | ||
+ | Set path to BUFR tables (overrides ENV{BUFR_TABLES}) | ||
+ | --help | ||
+ | perldoc bufrdump.pl) | ||
- | Options | + | |
- | | + | To avoid having to use the "--tablepath" |
- | Decode observations meeting criteria in <filter file> only | + | the invironment variable BUFR_TABLES |
- | --param < | + | tables |
- | Print parameters in < | + | works for you). |
- | as they occur in < | + | |
- | --lon1 x1 | + | |
- | --lat1 y1 | + | |
- | --lon2 x2 | + | |
- | --lat2 y2 | + | |
- | x1,y1,x2,y2 should be decimal degrees | + | |
- | --tablepath < | + | |
- | Set path to BUFR tables (overrides ENV{BUFR_TABLES}) | + | |
- | --help | + | |
+ | The lines in < | ||
+ | < | ||
+ | printed. For example, if you want only station identification and | ||
+ | temperature to be printed for a BUFR SYNOP file, either supply | ||
- | You should probably set | + | wmonr, |
- | export BUFR_TABLES=/ | + | |
- | or use the --tablepath option. | + | |
- | The lines in < | + | as argument |
- | want to be printed. For example, if you want only station | + | |
- | identification and temperature to be printed for a BUFR SYNOP file, | + | |
- | the < | + | |
- | wmonr | + | |
- | DDDD | + | |
- | TA | + | TA |
- | 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. | ||
- | Using --filter will decode only those observations that meet at least | + | If the parameter list consists |
- | one of the BUFR descriptor criteria and all of the parameter | + | |
- | in <filter file>, where the BUFR descriptor criteria should come first | + | comma to signal that this is not a filename but parameter |
- | in filter file followed by a blank line, then comes the parameter | + | |
- | criteria which should match < | + | |
- | is one of =, !=, <, <=, > and >=. An example filter file is | + | |
- | D: 001001 I2.2 | + | If --csv is used in conjunction with --param, all values will be printed |
- | 01 | + | using the CSV format, with first line listing the parameters, and with |
- | D: 001001 I2.2 001002 I3.3 | + | |
- | 03 895 | + | parameter file or list. With the parameter file above, the listing may |
- | 06 252 | + | for example start like |
- | D: 001011 A9 | + | |
- | LDWR | + | |
- | NN != 0 | + | wmonr, |
- | TA >= 5 | + | 01001,, |
- | TA < 9.5 | + | ,LF5U,9.0 |
+ | |||
+ | Using --filter will decode only those observations that meet at least | ||
+ | one of the BUFR descriptor criteria and all of the parameter criteria in | ||
+ | <filter file>, where the BUFR descriptor criteria should come first in | ||
+ | filter file followed by a blank line, then comes the parameter criteria | ||
+ | which should match < | ||
+ | is one of =, !=, <, <=, > and >=. The parameter criteria may be phrased | ||
+ | as alternatives by separating them with ' | ||
+ | filter file is | ||
+ | |||
+ | D: 001001 I2.2 | ||
+ | 01 | ||
+ | D: 001001 I2.2 001002 I3.3 | ||
+ | 03 895 | ||
+ | 06 252 | ||
+ | D: 001011 A9 | ||
+ | LF5U | ||
+ | |||
+ | type = Manned | ||
+ | | ||
+ | TA >= 5 | ||
+ | TA < 9.5 | ||
+ | RR_24 | ||
+ | |||
+ | which decodes all observations with block number 01, two other specific | ||
+ | wmo stations and one specific ship, being manned stations and having | ||
+ | cloud cover different from 8 (but NN must be part of the message) and | ||
+ | temperature between 5 and 9.5 degrees Celsius and containing | ||
+ | precipitation for last 24 hours. Comment lines starting with # will be | ||
+ | ignored. | ||
+ | |||
+ | Another example: the filter file (starting with a blank line!) | ||
+ | |||
+ | wmonr < 04000 | ||
+ | RR_1 | RR_12 | RR_24 | ||
+ | TA < -10 | TA > 10 | ||
+ | |||
+ | will print only those observations containing a wmonr less than 04000 | ||
+ | (note the leading 0 needed for this special parameter to make it 5 | ||
+ | digit), and containing precipitation for 1, 12 or 24 hours, and having | ||
+ | temperature below minus 10 or above plus 10 degrees Celsius. | ||
+ | |||
+ | 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. Four 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 | ||
+ | ' | ||
+ | the BUFR messages have unusual values. | ||
- | which decodes all observations with block number 01, two other | ||
- | specific wmo stations and one specific ship, having cloud cover | ||
- | different from 0 (but NN must be part of the message) and temperature | ||
- | between 5 and 9.5 degrees Celsius. Comment lines starting with # | ||
- | will be ignored. | ||
</ | </ |