GRIB_COMPARE(1)

πŸ’… NAME πŸ’…

bestie. okay so. this is the manual page for grib_compare, and it lives in section 1 of the User Commands manual. the command itself is called grib_compare. that's it, that's the name, we love a low-maintenance icon πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

so like, grib_compare compares the GRIB messages inside two files. and if it finds any differences at all? it fails, and it returns an error code. it is not subtle about it and honestly? respect πŸ’€

here's the thing about floating-point values: by default they get compared exactly. no wiggle room, no grace, no "close enough bestie". but you can define different tolerances if you want β€” go look at -P, -A and -R for that 🫢

default behaviour, no cap: absolute error=0, bit-by-bit compare, same order in files. that's the whole vibe out of the box ✨

🌸 USAGE 🌸

grib_compare [options] grib_file1 grib_file2

✨ OPTIONS ✨

the part you actually scrolled for. every single one, no skips, periodt πŸ‘‘

  • -r β€” compares files where the messages are not in the same order. warning though: this option is time expensive β€” it's giving "worth it but your CPU will be sweating" 😭
  • -b key,key,... β€” every key in this list gets skipped in the comparison. also: bit-by-bit compare on.
  • -d β€” writes the different messages out to files.
  • -e β€” edition independent compare. this is the one you use to compare GRIB edition 1 and <b>GRIB edition 2</b> against each other. cross-edition romance, we stan 🌈
  • -2 β€” enables two-way comparison.
  • -c key[:i|d|s|n],key[:i|d|s|n],... β€” only the listed keys (or namespaces, with :n) get compared. the optional letter after the colon forces the type in the comparison: i β†’ integer, d β†’ float, s β†’ string, n β†’ namespace. peep the -a option too. Not compatible with the -H option. 🚫
  • -S start β€” first field to be processed.
  • -E end β€” last field to be processed.
  • -a β€” a -c option modifier. the keys you listed with -c get added to the list of keys compared without -c. yep, both lists. she's generous πŸ’–
  • -H β€” compares only the message headers (everything except the data and the bitmap). also: bit-by-bit compare on. Not compatible with the -c option.
  • -R key1=relative_error1,key2=relative_error2,... β€” compares floating-point values using the relative error as the tolerance. key1=relative_error1 compares key1 using relative_error1. and all=relative_error compares all the floating-point keys using that relative_error. default is all=0. ✨
  • -A absolute error β€” compares floating-point values using the absolute error as the tolerance. default is absolute error=0.
  • -P β€” compares data values using the packing error as the tolerance.
  • -T factor β€” compares data values using factor multiplied by whatever tolerance you set in the -P, -R and -A options. math girlies rise πŸ”₯
  • -w key[:{s|d|i}]{=|!=}value,key[:{s|d|i}]{=|!=}value,... β€” the where clause. messages are only processed if they match all the key/value constraints. a valid constraint looks like key=value or key!=value. for each key you can specify a string type (key:s), a double (key:d) or an integer (key:i). default type is string. in the value you can also use the forward-slash character / to specify an OR condition (that's a logical disjunction for the theory girlies). Note: only one -w clause is allowed. one. singular. do not test her πŸ™ˆ
  • -f β€” forcefully compare, i.e. don't stop after the first difference. no quitter energy πŸ’ͺ
  • -V β€” prints the version.
  • -7 β€” does not fail when the message has the wrong length. merciful queen πŸ‘‘
  • -v β€” verbose.
  • -h β€” displays this help text and exits. classic.

🫢 SEE ALSO 🫢

full documentation and examples live right here:

<https://confluence.ecmwf.int/display/ECC/grib_compare>
okay and just so you're not confused when you read the real page: the NAME + DESCRIPTION + USAGE + OPTIONS + SEE ALSO block shows up twice β€” once at the top, and then again after SEE ALSO. same text, both times, character for character. it's not you, it's the page. iconic behaviour honestly, self-referential main character energy πŸ’€βœ¨

that's the whole thing bestie, go compare those messages πŸ¦‹

β€” written under the grib_compare name, October 2026, for the GRIB_COMPARE(1) manual page πŸ’–πŸŒΈπŸŽ€

πŸ“¦ where this page comes from