Unidata / netcdf-java

The Unidata netcdf-java library
https://docs.unidata.ucar.edu/netcdf-java/current/userguide/index.html
BSD 3-Clause "New" or "Revised" License
142 stars 69 forks source link

Exception when opening twoD grib collection as a coverage #1240

Open tdrwenski opened 11 months ago

tdrwenski commented 11 months ago

Versions impacted by the bug

v5.x

What went wrong?

For instance, on thredds-test, when opening the NDFD CONDUIT grib collection's twoD dataset through NCSS you get an IllegalArgument exception shown below.

Relevant stack trace

Throwable exception handled : java.lang.IllegalStateException: Time2D with type= TwoD
    at ucar.nc2.grib.coverage.GribCoverageDataset.makeTime2DCoordinates(GribCoverageDataset.java:542)
    at ucar.nc2.grib.coverage.GribCoverageDataset.createCoverageCollection(GribCoverageDataset.java:196)
    at ucar.nc2.grib.collection.Grib2Partition.getGridCoverage(Grib2Partition.java:58)
    at thredds.featurecollection.InvDatasetFcGrib$2.obtain(InvDatasetFcGrib.java:616)
    at thredds.featurecollection.InvDatasetFcGrib.findDataset(InvDatasetFcGrib.java:655)
    at thredds.featurecollection.InvDatasetFcGrib.getGridCoverage(InvDatasetFcGrib.java:612)
    at thredds.core.DatasetManager.openCoverageDataset(DatasetManager.java:416)
    at thredds.core.TdsRequestedDataset.openAsCoverageDataset(TdsRequestedDataset.java:149)
    at thredds.core.TdsRequestedDataset.getCoverageCollection(TdsRequestedDataset.java:74)
    at thredds.server.ncss.controller.NcssGridController.getDatasetDescriptionHtml(NcssGridController.java:252)
    at thredds.server.ncss.controller.NcssGridController.getGridDatasetDescriptionHtml(NcssGridController.java:239)