This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Greetings Jeff, If you are dealing with GRIB files, you should use netCDF-Java 4.3. The GRIB handling in 4.2 is broken. See the note for GRIB users here and try the 4.3 jar: https://www.unidata.ucar.edu/software/netcdf-java/documentation.htm#v43 Cheers! Sean > Full Name: Jeff Smith > Email Address: address@hidden > Organization: Front Range Community College > Package Version: 4.2 > Operating System: Windows 7 > Hardware: > Description of problem: > > I downloaded and installed netcdf-4.2.jar on my Windows laptop. My need is > to read GRIB2 files from NCEP. I have encountered several problems. The > most serious is that, according to the documnentation, objects from > the class Grib2ProductDefintionSection have a method that returns an > object of the class Grib2PDSVariables, but there is no such class as > Grib2PDSVariables in the package. > > Another serious problem is that the class Grib2GridDefinitionSection > does not appear to read in the correct number of bytes. This results in > an array out of bounds exception being raised in line 1741 of method > getInt in Grib2GDSVariables.java (which is called from line 82 of > GribGDSVariables.java, which in turn is in a method called from line > 418 of Grib2GridDefinitionSection.java). I have verified that all the > GRIB2 files that I have tested with are properly constructed GRIB2 files. > > Ticket Details =================== Ticket ID: IHC-743264 Department: Support netCDF Java Priority: Normal Status: Open