bufr.pm:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

bufr.pm:start [2010-12-02 13:58:44]
pals
bufr.pm:start [2022-05-31 09:29:31]
Line 1: Line 1:
-====== Geo::BUFR ====== 
- 
-[[http://search.cpan.org/dist/Geo-BUFR/|Geo::BUFR]] is a [[http://www.cpan.org/|CPAN]] module for BUFR decoding and encoding developed at the Norwegian Meteorological Institute (met.no). 
- 
-Below you will find a toolkit of BUFR handling programs used actively at met.no, with examples of use and complete source code. Hopefully this will demonstrate the power of Geo::BUFR as well as providing potential users of Geo::BUFR an easy start. The first 5 programs are included in the CPAN Geo::BUFR distribution (will be installed in the ''bin'' subdirectory of the installation directory). 
- 
-You might want to change the value of the following constants in source code:  DEFAULT_TABLE_PATH, DEFAULT_TABLE and DEFAULT_CTABLE. 
- 
-A line consisting solely of three dots (...) in the examples of output from running the programs, marks that a (not so interesting) part of the output has been left out. 
- 
-===== bufrread.pl ===== 
- 
-Decodes and prints section 0-4 in BUFR messages in input file(s). If the BUFR message is contained in a WMO bulletin, will also print WMO ahl. 
- 
-[[bufrread.pl|source code]] 
- 
-[[bufrread_ex1|Example]]: Executing bufrread.pl without arguments 
- 
-[[bufrread_help|Example]]: buffread.pl %%--%%help 
- 
-[[bufrread_multi|Example]]: Processing a file containing several BUFR SYNOP bulletines, with no options set 
- 
-[[bufrread_param|Example]]: Same as above, but with options %%--%%param and %%--%%data_only set 
- 
-[[bufrread_filter|Example]]: Same as previous example, but with option %%--%%filter also set. Note that the program [[#bufrdump.pl]] described below provides the same option but with more functionality. 
- 
-[[bufrread_code|Example]]: Processing a BUFR TEMP message with option %%--%%codetables set (to resolve code and flag values) 
- 
-[[bufrread_bitmap|Example]]: Processing a BUFR message containing operators 222000 and 223000 with option %%--%%bitmap set (to display bitmapped entities on same line) 
- 
-[[bufrread_associated|Example]]: Processing a BUFR message containing associated fields and change scale and data width operators 
- 
-[[bufrread_all_operators|Example]]: Same as above, but with options %%--%%all_operators and %%--%%data_only set 
- 
-[[bufrread_strict_checking|Example]]: Processing a file containing BUFR BUOY bulletins with recoverable formatting errors in the BUFR messages, with option %%--%%strict_checking set 
- 
-===== bufrresolve.pl ===== 
- 
-Displays information in BUFR tables. 
- 
-[[bufrresolve_source|source code]] 
- 
-[[bufrresolve_ex1|Example]]: Executing bufrresolve.pl without arguments 
- 
-[[bufrresolve_help|Example]]: bufrresolve.pl %%--%%help 
- 
-[[bufrresolve_309052|Example]]: Executing bufrresolve.pl on a table D descriptor (309052) 
- 
-[[bufrresolve_partial|Example]]: Same as above, but with option %%--%%partial 
- 
-[[bufrresolve_simple|Example]]: Same as above, but with option %%--%%simple 
- 
-[[bufrresolve_noexpand|Example]]: Executing bufrresolve.pl on a sequence of descriptors with option %%--%%noexpand 
- 
-[[bufrresolve_code|Example]]: Showing content of code table (option %%--%%code) 
- 
-[[bufrresolve_flag|Example]]: Resolving flag value (option %%--%%flag)  
- 
-===== bufrencode.pl ===== 
- 
-Encode a BUFR message based on data and metadata text files. 
- 
-[[bufrencode_source|source code]] 
- 
-[[bufrencode_ex1|Example]]: Executing bufrencode.pl without arguments 
- 
-[[bufrencode_help|Example]]: bufrencode.pl %%--%%help 
- 
-[[bufrencode_ex2|Example]]: Encoding a 2 subset BUFR SYNOP message 
- 
-===== bufr_reencode.pl ===== 
- 
-Encode BUFR message(s) based on a text file matching what you would get by running bufrread.pl on the resulting BUFR file. This might be a handy alternative to bufrencode.pl for encoding new BUFR messages: start with a similar BUFR message you know is correctly formatted, run bufrread.pl on this, edit the output as desired, and using this as input to bufr_reencode.pl. 
- 
-[[bufr_reencode_source|source code]] 
- 
-[[bufr_reeencode_ex1|Example]]: Executing bufr_reencode.pl without arguments 
- 
-[[bufr_reencode_help|Example]]: bufr_reencode.pl %%--%%help 
- 
-[[bufr_reencode_ex2|Example]]: Encoding a single subset BUFR SYNOP message 
- 
- 
-===== bufralter.pl ===== 
- 
-bufralter.pl provides an even easier way to do some basic manipulation of BUFR messages than does bufr_reencode.pl (although much more restricted in what changes are possible). Besides, bufralter.pl has the nice feature of not touching the text between the BUFR messages. This might be handy if you for example have a file with WMO bulletins and want to do some changes in the BUFR messages without affecting or losing the WMO bulletin envelopes. 
- 
-[[bufralter.pl_source|source code]] 
- 
-[[bufralter.pl_ex1|Example]]: Executing bufralter.pl without arguments 
- 
-[[bufralter.pl_help|Example]]: bufralter.pl %%--%%help 
- 
-[[bufralter.pl_synop|Example]]: Altering a single subset BUFR SYNOP message, by changing value of hour, minute and temperature in section 4, changing update sequence number and changing version number for master table and local table. 
- 
-===== bufrdump.pl ===== 
- 
-A BUFR toolkit wouldn't be complete unless you have a way to dump the contents of BUFR files in a way which requires no prior knowledge whatsoever of the BUFR format. Therefore, the program bufrdump.pl is included even though it actually does not employ Geo::BUFR.pm, but rather is a wrapper around a Fortran program (named [[bufrdump|bufrdump]]) which uses the ECMWF [[http://www.ecmwf.int/products/data/software/bufr.html|libbufr]] library for the BUFR decoding. The reason for this choice was that for this particular program speed might be important (expecting users to dump huge BUFR files and grep'ing on the output), besides the fact that the main part of the program would be equally boring to code whether in Fortran or Perl. 
- 
-The parameters are dumped in a ''name=value'' fashion according to what most users at met.no expects, e.g. ''TA=-9.3'' for temperature at 2 m equal to -9.3 Celsius. If your users are accustomed to other symbols and/or units, this should be rather easy to modify in source code of bufrdump.F. 
- 
-So far only dumping of BUFR SYNOP and BUFR TEMP has been implemented. More observation types are likely to be included in the future. 
- 
-[[bufrdump.pl_source|source code]] 
- 
-[[bufrdump.pl_ex1|Example]]: Executing bufrdump.pl without arguments 
- 
-[[bufrdump.pl_help|Example]]: bufrdump.pl %%--%%help 
- 
-[[bufrdump.pl_syno|Example]]: Dumping a multisubset multimessage BUFR SYNOP file with no options set 
- 
-[[bufrdump.pl_param|Example]]: Same as above, but with option %%--%%param set 
- 
-[[bufrdump.pl_csv|Example]]: Same as the %%--%%param example above, but also with option %%--%%csv set 
- 
-[[bufrdump.pl_filter|Example]]: Same as the %%--%%param example above, but also with option %%--%%filter set 
- 
-[[bufrdump.pl_sort|Example]]: Same as the %%--%%param example above, but also with option %%--%%sort set, for sorting on station identification 
- 
-[[bufrdump.pl_sort_on|Example]]: Same as the %%--%%param example above, but also with option %%--%%sort_on TA- set, for sorting on descending temperatures 
- 
-[[bufrdump.pl_syno2|Example]]: Dumping another BUFR SYNOP file with some selected parameters only 
- 
-[[bufrdump.pl_transform|Example]]: Same dump as above, but this time using %%--transform%% to display wind speed in knots and cloud cover in % 
- 
-[[bufrdump.pl_syno3|Example]]: Dumping yet another BUFR SYNOP file with stations and parameters selected on command line 
- 
-[[bufrdump.pl_temp|Example]]: Dumping a BUFR TEMP message with no options set 
- 
- 
-===== Extracting from BUFR tables ===== 
- 
-[[#bufrresolve.pl]] does provide several ways of extracting information from BUFR tables, but you might have special needs not covered by the program. Making your own scripts based on Geo::BUFR should not bee too difficult, however. As an illustration, see [[dump_flag_tables.pl]] for a script that dumps all the flag tables in a (hard coded) table file. Running this script produced this [[dump_flag_output|output]]. 
  
  • bufr.pm/start.txt
  • Last modified: 2022-05-31 09:29:31
  • (external edit)