[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fwd: New Ticket - [netCDFJava !AEU-822700]: Disabling netCDF warning messages



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.html

Here is sample code that reproduces the problem when compiled with netcdfAll-4.0.jar

import 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