Handle text on lines in ECMWF BUFR templates #1234
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Changes
Fixes line parsing for ECMWF BUFR templates.
I was parsing BUFR files and noticed that even the included ecmwf.D0000000000098013001.TXT file failed to be parsed due to comments after the three sections of numbers in some lines.
For the BUFR files I am parsing I'm using other templates which have the same problem - so I worked around that by cutting off the lines before handing them to tablelookup.csv and calling NetcdfFiles.openInMemory(filename)
However with this fix no such workaround is needed and since its also a problem for the file already in netcdf-java/bufr/src/main/resources/resources/bufrTables/local/ecmwf.D0000000000098013001.TXT I thought it would be good to include for all.
For unittest I tried including the file in netcdf-java/bufr/src/test/data but that makes the unittest fail - I suspect due missing bufr templates. If you have other ideas to try please let me know.
PR Checklist
until ready for review