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.
Hi Leigh, > Are there any samples of Java code available anywhere that you know of > that show how to use the Java netCDF library? I am expecrienced in > using the C++ netCDF interface, and would appreciate any Java code > examples that anyone could provide. In particular, I would like to see > Java code samples for creating netCDF files, reading them, writing to > them, etc.... Any and all code examples would be greatly appreciated. Some test code is available with the source distribution. It may be useful as an example to supplement the documentation, since it does create a simple netCDF file and then read it back in. It's in src/ucar/tests/TestNetcdf.java However, since it's also intended as a preliminary test, it's not ideal as a tutorial example. We're putting together something more like the C++ example program nctst.cc, with comments on how to create and read a netCDF file. I'll try to make it available from the netcdf-java page by the end of the week ... --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu