Re: netcdf 3, java, combining with java.util.zip

Ken Pavelle wrote:

John,

Can you help point me in the right direction? We have only one novice Java programmer here, and I'm not even sure how big my project is.

We have a Java applet that reads netCDF files and interactively displays the data ( http://www.srh.noaa.gov/abrfc/precip/zoom.php ). I want to save user bandwith by reading gzipped netcdf files instead. I can read the zipped file using java.util.zip, but the netCDF Java library only reads from netCDF files, not from a memory buffer.

How hard will it be for a decent Java programmer to extend the netCDF java library (specifically NetcdfFile?) to read from buffer instead of file?

Thank you for your time. (....even moreso if you have the time to reply!)

Regards,
Ken Pavelle
NOAA, National Weather Service

Hi Ken:

unzip the file into a byte array, then call

 NetcdfFile.openInMemory(String location, byte[] data)

then it should work as usual

make sure you have the latest version (2.2.06)