bufr.pm:bufrextract.pl_help

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
bufr.pm:bufrextract.pl_help [2023-02-05 09:12:24]
pals
bufr.pm:bufrextract.pl_help [2026-03-26 18:00:48] (current)
pals
Line 3: Line 3:
       bufrextract.pl <bufr file(s)>       bufrextract.pl <bufr file(s)>
           [--ahl <ahl_regexp>]           [--ahl <ahl_regexp>]
-          [--only_ahl[--without_ahl[--gts]+          [--only_ahl | --without_ahl | --gts
 +          [--filter <metadata criteria>]
           [--outfile <filename>]           [--outfile <filename>]
           [--help]           [--help]
Line 14: Line 15:
        --only_ahl         Extract AHLs only        --only_ahl         Extract AHLs only
        --without_ahl      Extract BUFR messages only        --without_ahl      Extract BUFR messages only
 +       --filter <metadata criteria>
 +                          Extract BUFR messages matching the <metadata criteria> only
        --outfile <filename>        --outfile <filename>
                           Will print to <filename> instead of STDOUT                           Will print to <filename> instead of STDOUT
Line 23: Line 26:
  
     For option "--ahl" the <ahl_regexp> should be a Perl regular expression.     For option "--ahl" the <ahl_regexp> should be a Perl regular expression.
-    E.g. "--ahl 'ISS... ENMI'" will decode only BUFR SHIP (ISS) from+    E.g. "--ahl 'ISS... ENMI'" will decode only SHIP BUFR (ISS) from
     CCCC=ENMI.     CCCC=ENMI.
  
Line 31: Line 34:
     GTS: Attachment II-4. Format of Meteorological Messages.     GTS: Attachment II-4. Format of Meteorological Messages.
  
-    No bufrtables are needed for running bufrextract.pl, since section 4 in +    Using "--filter" makes it possible to filter based on almost any of the 
-    BUFR message will not be decoded (which also speeds up execution quite a +    metadata present in section 1 (and 0) of the BUFR messages. Some few 
-    bit).+    examples which hopefully are enough to illustrate how to write the 
 +    <metadata criteria>: according to Common Code Table C-13 of WMO-no. 306, 
 +    "dc=0 ic=0,1,2,6" should take care of synoptic and one-hour observations 
 +    from fixed-land stations, while "dc=1 ic=0,6" should do the same for 
 +    marine stations. If you want to extract both, use for <metadata 
 +    criteria>: "dc=0 ic=0,1,2,6 | dc=1 ic=0,6"
 + 
 +    Here is the full list of metadata available for filtering (the first 
 +    2-letter abbreviation is what should be used in the <metadata 
 +    criteria>): 
 + 
 +      be = BUFR edition 
 +      oc = Originating centre 
 +      os = Originating subcentre 
 +      dc = Data category (table A) 
 +      ic = International data subcategory 
 +      lc = Local data subcategory 
 +      mt = Master table version number 
 +      lt = Local table version number 
 +      ye = Year 
 +      mo = Month 
 +      da = Day 
 +      ho = Hour 
 +      mi = Minute 
 +      se = Second 
 + 
 +    Note that no bufrtables are needed for running bufrextract.pl, since 
 +    section 4 in BUFR message will not be decoded (which also speeds up 
 +    execution quite a bit).
  
 </code> </code>
  • bufr.pm/bufrextract.pl_help.txt
  • Last modified: 2026-03-26 18:00:48
  • by pals