bufr.pm:bufrdump.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
Next revision
Previous revision
bufr.pm:bufrdump.pl_help [2010-11-30 14:18:37]
pals
bufr.pm:bufrdump.pl_help [2022-05-31 09:29:31] (current)
Line 2: Line 2:
 Usage: Usage:
       bufrdump.pl <bufr file(s)>       bufrdump.pl <bufr file(s)>
-          [--filter <filter file>] +          [--filter <filter file | filter list>] 
-          [--param <parameter file | parameter list> [--csv]]+          [--param <parameter file | parameter list> [--csv [--delimiter <del>]]
           [--sort]           [--sort]
           [--sort_on <parameter>[-]]           [--sort_on <parameter>[-]]
           [--station <station list>]           [--station <station list>]
           [--transform <transformation file>]           [--transform <transformation file>]
-          [--lon1 x1] +          [--lon1 <x1>
-          [--lat1 y1] +          [--lat1 <y1>
-          [--lon2 x2] +          [--lon2 <x2>
-          [--lat2 x2]+          [--lat2 <y2>
 +          [--obstype <amdar|ocea|surface|sounding|sounding->]
           [--tablepath <path to BUFR tables>]           [--tablepath <path to BUFR tables>]
           [--help]           [--help]
  
 Options: Options:
-      --filter <filter file> +      --filter <filter file | filter list
-                      Decode observations meeting criteria in <filter fileonly +                      Decode observations meeting criteria in filter file or 
-      --param <parameter file | parameter list> [--csv] +                      filter list only 
-                      Print parameters in parameter file or comma separated +      --param <parameter file | parameter list> [--csv [--delimiter <del>]
-                      list (e.g. wmonr,TA) only, in same order as they occur +                      Print parameters in parameter file or comma 
-                      there. If --csv, the parameters vill be printed using +                      separated list (e.g. wmonr,TA) only, in same order 
-                      the CSV (comma separated values) format+                      as they occur there. If using --csv possibly 
 +                      followed by --delimiter <del>, the parameters vill 
 +                      be printed using the CSV (comma-separated values) 
 +                      format, with the delimiter del (default is ';')
       --sort          Sort the decoded observations on station identification;       --sort          Sort the decoded observations on station identification;
-                      first stations with wmonr, then stations with call sign+                      first stations with wmonr, then stations with nationalnr
-                      then stations with buoy_id (others left out)+                      call sign, buoy_id or aircraft (others left out)
       --sort_on <parameter>[-] Sort the decoded observations on increasing       --sort_on <parameter>[-] Sort the decoded observations on increasing
-                      values of <parameter>, or decreasing values if a '-'+                      values of parameter, or decreasing values if a '-'
                       follows the parameter name. E.g. --sort_on TA- will                       follows the parameter name. E.g. --sort_on TA- will
                       sort on decreasing temperatures. Observations not                       sort on decreasing temperatures. Observations not
Line 33: Line 37:
                       except when --sort_on is combined with --sort (in which                       except when --sort_on is combined with --sort (in which
                       case sorting is done firstly on station identification,                       case sorting is done firstly on station identification,
-                      secondly on <parameterwith missing values printed first)+                      secondly on parameter with missing values printed first)
       --station <station list>       --station <station list>
                       Print observations for stations in station list only,                       Print observations for stations in station list only,
Line 39: Line 43:
       --transform <transformation file>       --transform <transformation file>
                       Do the transformations of parameter values listed in                       Do the transformations of parameter values listed in
-                      <transformation file> +                      transformation file 
-      --lon1 x1       Decode observations with longitude >= x1 only +      --lon1 <x1>     Decode observations with longitude >= x1 only 
-      --lat1 y1       Decode observations with latitude >= y1 only +      --lat1 <y1>     Decode observations with latitude >= y1 only 
-      --lon2 x2       Decode observations with longitude <= x2 only +      --lon2 <x2>     Decode observations with longitude <= x2 only 
-      --lat2 y2       Decode observations with latitude <= y2 only+      --lat2 <y2>     Decode observations with latitude <= y2 only
                       x1,y1,x2,y2 should be decimal degrees                       x1,y1,x2,y2 should be decimal degrees
 +      --obstype <amdar|ocea|surface|sounding|sounding->]
 +                      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>       --tablepath <path to BUFR tables>
                       Set path to BUFR tables (overrides ENV{BUFR_TABLES})                       Set path to BUFR tables (overrides ENV{BUFR_TABLES})
Line 53: Line 61:
  
     To avoid having to use the "--tablepath" option, you are adviced to set     To avoid having to use the "--tablepath" option, you are adviced to set
-    the invironment variable BUFR_TABLES to the directory where your BUFR+    the environment variable BUFR_TABLES to the directory where your BUFR
     tables are located (unless the default path provided by bufrdump.pl     tables are located (unless the default path provided by bufrdump.pl
     works for you).     works for you).
Line 62: Line 70:
     temperature to be printed for a BUFR SYNOP file, either supply     temperature to be printed for a BUFR SYNOP file, either supply
  
-      wmonr,call_sign,TA+      wmonr,nationalnr,call_sign,TA
  
     as argument to --params, or supply a <parameter file> which should look     as argument to --params, or supply a <parameter file> which should look
Line 68: Line 76:
  
       wmonr       wmonr
 +      nationalnr
       call_sign       call_sign
       TA       TA
Line 88: Line 97:
     for example start like     for example start like
  
-      wmonr,call_sign,TA +      wmonr;nationalnr;call_sign;TA 
-      01001,,-1.5 +      01001;;;-1.5 
-      ,LF5U,9.0+      ;;LF5U;9.0 
 + 
 +    You can choose another delimiter than semicolon by use of option 
 +    --delimiter <del>, e.g. --csv --delimiter ','
  
     Using --filter will decode only those observations that meet at least     Using --filter will decode only those observations that meet at least
Line 96: Line 108:
     <filter file>, where the BUFR descriptor criteria should come first in     <filter file>, where the BUFR descriptor criteria should come first in
     filter file followed by a blank line, then comes the parameter criteria     filter file followed by a blank line, then comes the parameter criteria
-    which should match <param> or <param> <operator> <value> where operator +    which should match <param> or !<param> or <param> <operator> <value> 
-    is one of =, !=, <, <=, > and >=. An example filter file is+    where operator is one of =, !=, =~, !~, <, <=, > and >=. What follows =~ 
 +    and !~ should be a Perl match regular expression. The parameter criteria 
 +    may be phrased as alternatives by separating them with '|' on a single 
 +    line. An example filter file is
  
       D: 001001 I2.2       D: 001001 I2.2
Line 114: Line 129:
  
     which decodes all observations with block number 01, two other specific     which decodes all observations with block number 01, two other specific
-    wmo stations and one specific ship, being manned stations and having +    wmo stations and one specific ship, where stations should be manned and 
-    cloud cover different from 8 (but NN must be part of the message) and +    have cloud cover with a value different from 8and have temperature 
-    temperature between 5 and 9.5 degrees Celsius and containing +    between 5 and 9.5 degrees Celsiusand contain precipitation for last 24 
-    precipitation for last 24 hours. Comment lines starting with # will be +    hours. Comment lines starting with # will be ignored.
-    ignored.+
  
-    Another example: the simple filter file (starting with a blank line!)+    Another example: the filter file (starting with a blank line!)
  
-      wmonr+      call_sign =~ /^L[A-N]..$/ 
 +      obstime >= '2012-02-10 06:00:00' 
 +      HW | HWA | PW | PWA 
 +      FF > 10 | FG_010 > 10 
 + 
 +    will print only those ship observations for which the 4 character 
 +    call_sign starts with 2 letters in the interval LA-LN, and having 
 +    obstime larger or equal to the datetime given, and containing wave data 
 +    (specifically: height or period of waves, manually or automatically 
 +    measured), and with wind or 10 minutes gust more than 10 m/s. 
 + 
 +    For convenience, when there are no BUFR descriptor criteria, you might 
 +    provide the filter criteria on the command line. Example: 
 + 
 +    --filter 'wmonr,TA > 0,RR_12 | RR_24, !FF'
  
-    will print only those observations containing a wmonr (skipping ships).+    will decode only observations with wmonr, having positive temperature 
 +    and containing precipitation for 12 or 24 hours and not reporting wind. 
 +    If (like for --paramthe filter list consists of one criterium only, a 
 +    comma must be appended.
  
     To avoid the need of creating a filter file when observations for some     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     few stations are requested, you can provide the stations in a comma
-    separated list after option --station. Three examples:+    separated list after option --station. Some examples:
  
       --station wmonr=01001,01152,01492       --station wmonr=01001,01152,01492
 +      --station nationalnr=614_0050410003,637_108
       --station call_sign=LF5U       --station call_sign=LF5U
       --station buoyid=64607,64609       --station buoyid=64607,64609
 +      --station aircraft=EU3421,JHCWUURA
  
     You cannot mix different kinds of stations this way (before '=' you must     You cannot mix different kinds of stations this way (before '=' you must
-    choose either wmonr, call_sign or buoy_id). Note also that providing the +    choose either wmonr, nationalnr, call_signbuoy_id or aircraft). Note 
-    stations in the BUFR descriptor part (first part) of the filter file +    also that providing the stations in the BUFR descriptor part (first 
-    will speed up execution time considerably, compared to using option +    part) of the filter file will speed up execution time considerably, 
-    --station. It is possible to combine --filter with --station if done +    compared to using option --station. It is possible to combine --filter 
-    with some care, e.gspecifying WMO block 01 and the required parameters +    with --station if done with some care, e.gspecifying WMO block 01 and 
-    in filter file, then the requested stations in station list.+    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     The --transform option is provided mainly to be able to use other units
Line 163: Line 197:
     to be applied for sky not all covered by clouds, you should use NN !=     to be applied for sky not all covered by clouds, you should use NN !=
     100 instead of NN != 8 in filter file.     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
 +    '--obstype surface'), or when you want to see only levels with vss>0 in
 +    high resolution radiosonde data (then use '--obstype sounding-'), or
 +    when data category and/or data sub-category in the BUFR messages have
 +    unusual values.
  
 </code> </code>
  • bufr.pm/bufrdump.pl_help.1291126717.txt.gz
  • Last modified: 2022-05-31 09:23:11
  • (external edit)