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

[netCDFJava #HMB-497600]: Reading NDFD Files

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.


  • Subject: [netCDFJava #HMB-497600]: Reading NDFD Files
  • Date: Sat, 20 Mar 2010 08:33:20 -0600

Hiya Rob,

Here's a better solution, using NamedObject instead of Object for GridDataset 
getting times.

GridDataset gridDataSet = GridDataset.open( fileName );
GridDatatype mt = gridDataSet.findGridDatatype("Minimum_temperature");
List<NamedObject> times = ((GeoGrid) mt).getTimes();
for( NamedObject t : times ) {
  System.out.println( t.toString() );
}

You also might want to look at the JavaDoc on GeoGrid.
JavaDocs 
http://www.unidata.ucar.edu/software/netcdf-java/v4.1/javadoc/index.html

I also forgot to mention that NetcdfFile times are offsets from the reference 
time as integers.

Robb...

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