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.
On 4/6/2010 2:46 PM, Dan Schaffer wrote:
Hi John Thanks for your response. The sample file is merely example1.nc from your tutorial: http://www.unidata.ucar.edu/software/netcdf/ncml/v2.2/Tutorial.htmlHere is sample code that reproduces the problem when compiled with netcdfAll-4.0.jarimport static ucar.nc2.FileWriter.*; import java.io.*; import ucar.nc2.*; import ucar.nc2.dataset.*; public class WarningDemo { public static void main(String[] args) { try {NetcdfDataset dataset = NetcdfDataset.acquireDataset("example.nc", null);System.out.println(dataset); @SuppressWarnings("unused")NetcdfFileWriteable packedDataset = (NetcdfFileWriteable) writeToFile(dataset, "example_out.nc", true); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
this seems to be fixed in version 4.2