netcdf-java icon indicating copy to clipboard operation
netcdf-java copied to clipboard

Support GRIB GDT 140 and PDT 73

Open rschmunk opened this issue 6 years ago • 6 comments

A user sent me a GRIB2 file of ECMWF flood data that netCDF-Java will not open.

The first problem I encountered in trying to figure out why e.g. Panoply and IDV would not open the file is that it specified Grid Definition 140, which is the Lambert Azimuthal Equal Area projection. Some Googling indicates that this projection was first proposed for addition to GRIB in 2012, which I expect is after most/all of the grids that NJ understands were coded.

After an attempt at hacking Grib2Gds to accept template 140, I then ran into the problem that the file uses Product Definition 73, which is missing from Grib2Pds.

Perhaps there are further problems, but that was where I quit.

rschmunk avatar Jul 16 '19 22:07 rschmunk

The dataset creator has suggested they might switch to a different Product Definition Template. He didn't say which, but I would think it would be likely one of the other forecast templates 70-72.

rschmunk avatar Jul 19 '19 22:07 rschmunk

Thanks for the report, @msdsoftware! I'll take a look once we get 5.0.0 stable out the door (likely today). Do you have a sample file I could work with? Even if they switch templates, it'd still be nice to take a look and see if we can support it.

lesserwhirls avatar Jul 22 '19 14:07 lesserwhirls

@lesserwhirls, I have a couple sample datasets. Would have to double-check but I think one should be okay for redistribution.

rschmunk avatar Jul 23 '19 06:07 rschmunk

@msdsoftware please can you share the sample datasets?

cofinoa avatar Jul 29 '19 16:07 cofinoa

Hi guys, hope it's appropriate to piggyback this issue as it seems relevant and I have a couple of example files I can share for reference sake.

I'd been wrestling with reading these files with software I am working on, despite the software being stable until encountering these particular grid data types. I ended up deciding to try loading them in Panoply which has also crashed and burned with the same NullException I have been experiencing - which comes as a result of Grib2PDS not handling product definition 32, which is required to handle these files.

If there are any suggestions of how to work around this, that would be appreciated - but otherwise this seems like something which should be able to work as it appears that this product definition is known.

Cheers, Dan ACCESS-G-APS3-MEDIA_2019122212_000_95.228.zip

ACCESS-G-APS3-MEDIA_2019122212_000_96.228.zip

ms-daniel-bailey avatar Jan 12 '20 10:01 ms-daniel-bailey

FWIW, the issue of Product Definition 32 support arose two years ago in Unidata/thredds#846. Looks like @cofinoa took a whack at it but it turned out to be pretty complex and so apparently was not completed.

rschmunk avatar Jan 13 '20 02:01 rschmunk