bufr.pm:start

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
bufr.pm:start [2015-02-04 15:57:10]
pals [Merging BUFR TEMP]
bufr.pm:start [2022-05-31 09:29:31] (current)
Line 11: Line 11:
   * Before trying to install Geo::BUFR you should check that you have Perl installed.   * Before trying to install Geo::BUFR you should check that you have Perl installed.
  
-  * Installing Geo::BUFR will not install any BUFR tables. When invoking the utility programs you should use the option ''%%--%%tablepath'' to tell in which directory you keep your [[http://search.cpan.org/dist/Geo-BUFR/lib/Geo/BUFR.pm#BUFR_TABLE_FILES|BUFR table files]]. Alternatively, you can set the environment variable BUFR_TABLES, or you can change the value of the constant ''DEFAULT_TABLE_PATH'' in the source code of the utility programs (possibly you might want to change the values of ''DEFAULT_TABLE'' and ''DEFAULT_CTABLE'' also). +  * Installing Geo::BUFR will not install any BUFR tables. When invoking the utility programs you should use the option ''%%--%%tablepath'' to tell in which directory you keep your [[http://search.cpan.org/dist/Geo-BUFR/lib/Geo/BUFR.pm#BUFR-TABLE-FILES|BUFR table files]], and possibly ''%%--%%tableformat'' to tell the table format. Alternatively, you can set the environment variable ''BUFR_TABLES'', or you can change the value of the constant ''DEFAULT_TABLE_PATH'' in the source code of the utility programs (possibly you might want to change the values of ''DEFAULT_TABLE_FORMAT'', ''DEFAULT_TABLE'' and ''DEFAULT_CTABLE'' also). 
 +  
  
 ===== bufrread.pl ===== ===== bufrread.pl =====
Line 39: Line 39:
  
 [[bufrread_strict_checking|Example]]: Processing a file containing BUFR BUOY bulletins with recoverable formatting errors in the BUFR messages, with option %%--%%strict_checking 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
 +
 +[[bufrread_ahl|Example]]: Filtering a file containing a large number of GTS bulletins to decode BUFR BUOYs only, using option %%--%%ahl
  
 ===== bufrresolve.pl ===== ===== bufrresolve.pl =====
Line 61: Line 63:
  
 [[bufrresolve_flag|Example]]: Resolving flag value (option %%--%%flag)  [[bufrresolve_flag|Example]]: Resolving flag value (option %%--%%flag) 
 +
 +[[bufrresolve_bufrtable|Example]]: Illustrating use of options %%--%%bufrtable and %%--%%tablepath (for a local table B descriptor) 
 +
 +[[bufrresolve_tableformat|Example]]: Illustrating use of option %%--%%tableformat ECCODES on a local table D descriptor
 +
 +[[bufrresolve_verbose|Example]]: Illustrating use of option %%--%%verbose 1 (to see which tables are loaded)
 +
  
 ===== bufrencode.pl ===== ===== bufrencode.pl =====
Line 98: Line 107:
  
 [[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. [[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.
 +
 +===== bufrextract.pl =====
 +
 +Extract (raw) BUFR messages and/or AHLs from file(s).
 +
 +[[bufrextract.pl_source|source code]]
 +
 +[[bufrextract.pl_ex1|Example]]: Executing bufrextract.pl without arguments
 +
 +[[bufrextract.pl_help|Example]]: bufrextract.pl %%--%%help
 +
 +[[bufrextract.pl_ahl|Example]]: bufrextract.pl %%--%%ahl
 +
 +[[bufrextract.pl_onlyahl|Example]]: bufrextract.pl %%--%%only_ahl
 +
 +[[bufrextract.pl_ahl_onlyahl|Examples]]: bufrextract.pl %%--%%ahl %%--%%only_ahl
  
 ===== bufrdump.pl ===== ===== bufrdump.pl =====
Line 103: Line 128:
 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 [[https://software.ecmwf.int/wiki/display/BUFR/BUFRDC+Home|ECMWF BUFRDC 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. 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 [[https://software.ecmwf.int/wiki/display/BUFR/BUFRDC+Home|ECMWF BUFRDC 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 (see [[http://www.met.no/Parametere+i+Kvalobs-databasen.b7C_wlnG5w.ips|Parametere i Kvalobs-databasen]]), 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.+The parameters are dumped in a ''name=value'' fashion according to what most users at Met Norway expects (see [[https://wiki.met.no/kvalobs/kvalobs/kvalobs-parametre_sortert_alfabetisk_etter_kode|Parametere i Kvalobs-databasen]]), 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 dumping of BUFR SYNOP, TEMP, AMDAR and BUOY have been implemented (probably works also for PILOT, BATHY and TESAC). More observation types are likely to be included in the future. So far dumping of BUFR SYNOP, TEMP, AMDAR and BUOY have been implemented (probably works also for PILOT, BATHY and TESAC). More observation types are likely to be included in the future.
Line 146: Line 171:
 ===== Merging BUFR TEMP ===== ===== Merging BUFR TEMP =====
  
-BUFR TEMP should according to WMO regulations be issued on the GTS in one IUK-bulletin containing data up to 100 hPa, and one IUS-bulletin containing the whole sounding. Some centres, however, reformats TAC TEMP part A-D part for part into 4 different BUFR TEMP bulletins, which are very cumbersome to handle in data processing. Therefore [[mergebufrtemp.pl]] was created in the hope that some data producers will find this program useful for doing the necessary merging of (BUFR) TEMP parts. Example of use: <code>  mergebufrtemp.pl <bufr.a> <bufr.b> --outfile <bufr.ab> </code> where the file bufr.a is supposed to contain a BUFR TEMP message converted from BUFR TEMP part A only, bufr.b a BUFR TEMP message converted from BUFR TEMP part B only, and the file bufr.ab is the result of merging these two parts into a BUFR message suitable to be included in an IUK-bulletin. Repeated use of mergebufrtemp.pl might be used to create a file bufr.abcd to be included in the IUS-bulletin, containing the whole ascent.+BUFR TEMP should according to WMO regulations be issued on the GTS in one IUK-bulletin containing data up to 100 hPa, and one IUS-bulletin containing the whole sounding. Some centres, however, reformat TAC TEMP part A-D part for part into 4 different BUFR TEMP bulletins, which are very cumbersome to handle in data processing. Therefore [[mergebufrtemp.pl]] was created in the hope that some data producers will find this program useful for doing the necessary merging of (BUFR) TEMP parts. Example of use: <code>  mergebufrtemp.pl <bufr.a> <bufr.b> --outfile <bufr.ab> </code> where the file bufr.a is supposed to contain a BUFR TEMP message converted from BUFR TEMP part A only, bufr.b a BUFR TEMP message converted from BUFR TEMP part B only, and the file bufr.ab is the result of merging these two parts into a BUFR message suitable to be included in an IUK-bulletin. Repeated use of mergebufrtemp.pl might be used to create a file bufr.abcd to be included in the IUS-bulletin, containing the whole ascent. 
 + 
 + 
 +===== Sorting BUFR TEMP ===== 
 + 
 +According to B/C 25.7: "Temperature, dew-point and wind data at pressure levels obtained during the radiosonde ascent shall be included in descending order with respect to pressure. Data at each pressure level shall be included only once". This makes perfect sense, since it is hard to think of any application where you would not prefer to have this ordering and uniqueness of pressure levels. However, many data producers sin against this regulation, and even more astounding: in Note (1) to B/C 25.7 WMO explicitly allows violations of this regulation (for BUFR TEMP converted from TAC TEMP).  
 + 
 +Therefore [[sortbufrtemp.pl]] was created to do the necessary sorting of pressure levels and possible merging of duplicate levels (i.e. pressure levels having same value for pressure, time and position coordinates). 
 + 
 +[[sortbufrtemp.pl_help|Example]]: sortbufrtemp.pl %%--%%help
  • bufr.pm/start.1423065430.txt.gz
  • Last modified: 2022-05-31 09:23:11
  • (external edit)