Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing GRIB-1 time range indicators #1246

Open
1 task done
rschmunk opened this issue Oct 9, 2023 · 6 comments
Open
1 task done

Missing GRIB-1 time range indicators #1246

rschmunk opened this issue Oct 9, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@rschmunk
Copy link
Contributor

rschmunk commented Oct 9, 2023

Versions impacted by the bug

I am working with a devo copy of netCDF-Java 5.5.4, snapshot downloaded early August.

What went wrong?

A user pinged me because netCDF-Java (and thus Panoply) would not open a GRIB-1 dataset, with an exception thrown because the data use time range indicator 130. See stack trace below.

In looking at the netCDF-Java code, I see that Grib1ParamTime rejects and time range indicator with value > 125. However, in looking for more info about this, I found that there are at least thirteen time range indicators greater than that limit, as shown on e.g. this NOAA/NCEP webpage

Although the above link is to a NOAA webpage, the user originally downloaded the data from an EU Copernicus site. Unfortunately, I don't know what specific field input he used there to acquire the problem dataset. Instead he provided me a copy of the file.

Is there any chance that netCDF-Java developers can look into this in the foreseeable future? I haven't looked at the code in Grib1ParamTime closely enough to see if I could puzzle it out for myself, and bugs in another app are calling for my immediate attention.

Relevant stack trace

Caused by: java.lang.IllegalArgumentException: PDS: Unknown Time Range Indicator 130
	at ucar.nc2.grib.grib1.Grib1ParamTime.<init>(Grib1ParamTime.java:399)
	at ucar.nc2.grib.grib1.tables.Grib1Customizer.getParamTime(Grib1Customizer.java:118)
	at ucar.nc2.grib.grib1.Grib1Record.getParamTime(Grib1Record.java:124)
	at ucar.nc2.grib.collection.Grib1CollectionBuilder.filterIntervals(Grib1CollectionBuilder.java:160)
	at ucar.nc2.grib.collection.Grib1CollectionBuilder.makeGroups(Grib1CollectionBuilder.java:107)
	at ucar.nc2.grib.collection.GribCollectionBuilder.createMultipleRuntimeCollections(GribCollectionBuilder.java:128)
	at ucar.nc2.grib.collection.GribCollectionBuilder.createIndex(GribCollectionBuilder.java:120)
	at ucar.nc2.grib.collection.GribCdmIndex.openGribCollectionFromDataFile(GribCdmIndex.java:821)
	at ucar.nc2.grib.collection.GribCdmIndex.openGribCollectionFromDataFile(GribCdmIndex.java:804)
	at ucar.nc2.grib.collection.GribCdmIndex.openGribCollectionFromRaf(GribCdmIndex.java:774)
	at ucar.nc2.grib.collection.GribIosp.build(GribIosp.java:183)
	at ucar.nc2.NetcdfFiles.build(NetcdfFiles.java:815)
	at ucar.nc2.NetcdfFiles.open(NetcdfFiles.java:754)
	at ucar.nc2.NetcdfFiles.open(NetcdfFiles.java:276)

Relevant log messages

No response

If you have an example file that you can share, please attach it to this issue.

If so, may we include it in our test datasets to help ensure the bug does not return once fixed?
Note: the test datasets are publicly accessible without restriction.

Yes

Code of Conduct

  • I agree to follow the UCAR/Unidata Code of Conduct
@rschmunk rschmunk added the bug Something isn't working label Oct 9, 2023
@JohnLCaron
Copy link
Collaborator

JohnLCaron commented Oct 10, 2023 via email

@rschmunk
Copy link
Contributor Author

@JohnLCaron, Depends on your definition of huge. The sample file I was provided is 170 MB.

@JohnLCaron
Copy link
Collaborator

hmm i dont see the file

@rschmunk
Copy link
Contributor Author

@JohnLCaron, I didn't include a link in my original post about this. Here's a Dropbox link.

@rschmunk
Copy link
Contributor Author

And today I get a complaint from someone downloading data from the same Copernicus website that they are getting an "Unknown Time Range Indicator 128" exception trying to open the download. Sorry, no sample file provided this time.

@JohnLCaron
Copy link
Collaborator

JohnLCaron commented Oct 11, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants