Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
bufr.pm:bufrencode_help [2010-02-02 10:40:33] pals created |
bufr.pm:bufrencode_help [2014-05-28 14:25:51] pals |
||
---|---|---|---|
Line 1: | Line 1: | ||
< | < | ||
+ | Usage: | ||
+ | bufrencode.pl --data <data file> --metadata < | ||
+ | [--outfile <file to print encoded BUFR message to>] | ||
+ | [--strict_checking n] | ||
+ | [--tablepath <path to BUFR tables>] | ||
+ | [--verbose n] | ||
+ | [--help] | ||
- | Will create a BUFR message | + | Options: |
- | in files <data file> and < | + | |
+ | | ||
- | Usage: / | + | --strict_checking n n=0 Disable strict checking of BUFR format |
- | or / | + | n=1 Issue warning if (recoverable) error in |
+ | BUFR format | ||
+ | n=2 (default) Croak if (recoverable) error in BUFR format. | ||
+ | | ||
- | Options: | + | --verbose n |
- | --help | + | Verbose output is sent to STDOUT, so ought to |
- | Will print this help message and then exit | + | be combined with option --outfile |
- | --outfile < | + | |
- | Will print encoded BUFR messages to < | + | --tablepath <path to BUFR tables> |
- | | + | |
- | | + | will fetch tables from the environment variable |
- | | + | BUFR_TABLES, |
- | --tablepath <path to BUFR tables> | + | |
- | If used, will set path to BUFR tables. If not set, will fetch tables | + | |
- | | + | |
- | | + | the same as consulting perldoc bufrencode.pl |
+ | |||
+ | | ||
+ | | ||
+ | For the metadata file, use this as a prototype and change the values as | ||
+ | desired: | ||
+ | |||
+ | BUFR_EDITION | ||
+ | MASTER_TABLE | ||
+ | CENTRE | ||
+ | SUBCENTRE | ||
+ | UPDATE_SEQUENCE_NUMBER | ||
+ | OPTIONAL_SECTION | ||
+ | DATA_CATEGORY | ||
+ | INT_DATA_SUBCATEGORY | ||
+ | LOC_DATA_SUBCATEGORY | ||
+ | MASTER_TABLE_VERSION | ||
+ | LOCAL_TABLE_VERSION | ||
+ | YEAR 2008 | ||
+ | MONTH 9 | ||
+ | DAY 1 | ||
+ | HOUR 6 | ||
+ | MINUTE | ||
+ | SECOND | ||
+ | OBSERVED_DATA | ||
+ | COMPRESSED_DATA | ||
+ | DESCRIPTORS_UNEXPANDED | ||
+ | |||
+ | For BUFR edition < 4, replace the lines INT_DATA_SUBCATEGORY, | ||
+ | LOC_DATA_SUBCATEGORY, | ||
+ | and YEAR_OF_CENTURY (the order of lines doesn' | ||
+ | |||
+ | | ||
+ | For the data file, use the same format as would result if you did run on | ||
+ | the generated BUFR message | ||
+ | |||
+ | bufrread.pl <bufr file> --data_only | cut -c -31 | ||
- | For the metadata file, use this as prototype and change | + | or if you use bufrread.pl with " |
+ | example, the file might begin with | ||
- | BUFR_EDITION | + | |
- | MASTER_TABLE | + | 2 005002 |
- | CENTRE | + | 3 006002 |
- | SUBCENTRE | + | 4 004001 |
- | UPDATE_NUMBER | + | ... |
- | OPTIONAL_SECTION | + | |
- | DATA_CATEGORY | + | |
- | INT_DATA_SUBCATEGORY | + | |
- | LOC_DATA_SUBCATEGORY | + | |
- | MASTER_TABLE_VERSION | + | |
- | LOCAL_TABLE_VERSION | + | |
- | YEAR | + | |
- | MONTH 9 | + | |
- | DAY 1 | + | |
- | HOUR 6 | + | |
- | MINUTE | + | |
- | SECOND | + | |
- | OBSERVED_DATA | + | |
- | COMPRESSED_DATA | + | |
- | DESCRIPTORS_UNEXPANDED | + | |
- | For BUFR edition < 4, replace | + | Every time a new line starting with the number 1 is met, a new subset |
- | LOC_DATA_SUBCATEGORY, | + | will be generated in the BUFR message. Lines not starting with a number |
- | and YEAR_OF_CENTURY (the order of lines doesn' | + | are ignored. |
- | For the data file, use the same format as would result if you did run | + | |
- | on the generated | + | |
- | | + | |
- | (or if you use bufrread.pl with --width n, replace 31 with n+16). | + | |
- | For example, the file might begin with | + | |
- | | + | |
- | | + | |
- | 3 006002 | + | |
- | 4 004001 | + | |
- | ... | + | |
- | Every time a new line starting with the number 1 is met, a new subset will be | + | |
- | generated in the BUFR message. Lines not starting with a number are ignored. | + | |
+ | | ||
+ | | ||
+ | ... | ||
- | For missing values, use 'missing' or stop the line after the BUFR descriptor. | + | To encode a NIL subset, all delayed replication factors should be |
+ | nonzero, and all other values set to missing | ||
+ | defining | ||
- | Associated values should use BUFR descriptor 999999. | + | Options may be abbreviated, |
- | To encode a NIL subset, all delayed replication factors should be set to 1, and | ||
- | all other values set to missing except for the descriptors defining the station. | ||
</ | </ |