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.
Hello, I know I'm somewhat behind the times, but a while ago I downloaded the NetCDF java library version 1 and integrated that into my code. Everything has been great up until last July, when I started to receive reports that my code was no longer able to parse certain NetCDF files. The obvious solution is to upgrade to version 2, but the class library has changed too much for me to do this quickly (and I just don't have the time right now). My question is: is there a quick patch I can write to parse these newer NetCDF files using the version 1 library? Did a substantial change occur in the definition of NetCDF files? I get end-of-file errors as the offsets to the variable data are larger than the file lengths themselves. thanks for any helpful advice, Scott java.io.EOFException at javax.imageio.stream.ImageInputStreamImpl.readInt(ImageInputStreamImpl.java:235) at ucar.netcdf.NetcdfStream$V1IntegerIo.readArray(NetcdfStream.java:1090) at ucar.netcdf.NetcdfStream$V1Io.toArray(NetcdfStream.java:757) at ucar.netcdf.NetcdfStream$V1Io.toArray(NetcdfStream.java:721) at ucar.netcdf.Variable.toArray(Variable.java:296) at ucar.nc2.Variable.read(Variable.java:229) at ucar.nc2.NetcdfStream.cacheData(NetcdfStream.java:102)