Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. The bufr_filter processes sequentially all bufr messages contained in the input files and applies the rules to each one of them. Input messages can be written to the output by using the "write" statement. The write statement can be parameterised so that output is sent to multiple files depending on key values used in the output file name. If we write a rules_file containing the only statement:


  2. To print header information only (all BUFR messages must have it)

    Code Block
    writeprint "../data/split/[bufrHeaderCentre]_ [datebufrHeaderSubCentre]_ [dataTypemasterTablesVersionNumber]_ [levelTypelocalTablesVersionNumber].grib [editionNumbernumberOfSubsets]";
    
    Applying this
    Code Block
    
    > bufr_filter rules_file
    to the "
     ../data/bufr/
    tigge
    syno_
    pf_ecmwf.grib2" grib file we obtain several files in the ../data/split directory containing fields split according to their key
    multi.bufr
    98 0 13 1 1
    98 0 13 1 1
    98 0 13 1 1
    


  3. To print values from the data section the messages has to be unpacked. This rules_file:\

    Code Block
    
    set unpack=1;
    print "block=[blockNumber] station=[stationNumber] lat=[latitude] lon=[longitude] t2=[airTemperatureAt2M]";
    
    will print out some data values from SYNOP BUFR messages. values To filter out only header information that all the BUFR files must have. print "[bufrHeaderCentre] [bufrHeaderSubCentre] [masterTablesVersionNumber] [localTablesVersionNumber] [numberOfSubsets]"; > bufr_filter ../data/bufr/aaen_51.bufr
    Code Block
    Code Block
    > bufr_filter rules_file ../data/bufr/syno_multi.bufr
    >  results
    98 0 13 1 1
    98 0 13 1 1
    98 0 13 1 1block=1 station=1 lat=70.93 lon=-8.67 t2=274.5
    block=1 station=3 lat=77 lon=15.5 t2=268.4
    block=1 station=7 lat=78.92 lon=11.93 t2=268.5