Versions Compared

Key

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

...

  1. The default behaviour for bufr_compare without any option is to perform a bit by bit comparison of the two messages. If the messages are found to be bitwise different then bufr_compare switches to a "key based" mode to find out which coded keys are different. To see how bufr_compare works we first set the key bufrHeaderSubCentre=1 in the file syno_1.bufr

    Code Block
     
    > bufr_set -s bufrHeaderSubCentre=1 data/bufr/syno_1.bufr out.bufr
    
    Then we can compare the two fields with bufr_compare.
    Code Block
     
    > bufr_compare data/bufr/syno_1.bufr out.bufr
    == 1 == DIFFERENCE == long [bufrHeaderSubCentre]: [0] != [1]
    
    In the output we can see that the only "coded" key with different values in the two messages is bufrHeaderSubCentre . The comparison can be forced to be successful by listing the keys with different values in the -b option.
    Code Block
     
    > bufr_compare -b bufrHeaderSubCentre data/bufr/syno_1.bufr out.bufr