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

[netCDFJava #HMB-497600]: Reading NDFD Files



Hiya Rob,

Glad it was just a missing jar, not a bug. A side note, the grib library can 
read files with headers. For your question about getting the variables and 
dimensions, just open the file as NetcdfFile().

NetcdfFile ncfile = NetcdfFile.open(  "fileLocationHere" );
          List<Variable> vars = ncfile.getVariables();
          for( Variable var : vars ) 
            System.out.println( var.getName();    

          List<Dimension> dims = ncfile.getDimensions();
          for( Dimension dim : dims )
           System.out.println( dim.getName();

ncfile.close();

Here are some urls to documentation:

Tutorial    http://www.unidata.ucar.edu/software/netcdf-java/tutorial/index.html
JavaDocs    
http://www.unidata.ucar.edu/software/netcdf-java/v4.1/javadoc/index.html
Look at NetcdfFile   Variable     Dimension as as starter.

You might also want to look at NetcdfDataset and GridDataset for more options 
on how look at the data.

Robb...


   

Ticket Details
===================
Ticket ID: HMB-497600
Department: Support netCDF Java
Priority: Normal
Status: Open