NOAA-EMC / NCEPLIBS-g2c

This library contains C decoder/encoder routines for GRIB edition 2.
Other
18 stars 11 forks source link

adding g2c_compare() #402

Closed edwardhartnett closed 1 year ago

edwardhartnett commented 1 year ago

Fixes #401

In this PR I add a new function which compares the metadata of two open files to see if they match.

THis is not intended for user use - it will be used in testing.

edwardhartnett commented 1 year ago

This is ready to merge. Once merged I can use this new function to clear up testing problems in NCEPLIBS-grib_utils which occur because different versions of Jasper give slightly different compression results, meaning the file offsets in the resulting files are slightly different, even though the files are the same and contain the same metadata and data.

In this PR I add the function to compare the metadata.

Now that I think about it, I guess I need to add an option to also compare the data...

Let me turn this back into a draft while I ponder.