Package noaa.coastwatch.io
Class CWNCReader
java.lang.Object
noaa.coastwatch.io.EarthDataReader
noaa.coastwatch.io.NCReader
noaa.coastwatch.io.CWNCReader
- All Implemented Interfaces:
GridSubsetReader
,NCSD
The
CWNCReader
class reads Java NetCDF accessible
datasets and uses the CoastWatch HDF metadata conventions to parse
the attribute and variable data.- Since:
- 3.2.0
- Author:
- Peter Hollemans
-
Field Summary
Fields inherited from class noaa.coastwatch.io.EarthDataReader
dataProjection, info, rawMetadataMap, variables
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected DataVariable
getActualVariable
(int index) Gets the actual variable with data.Gets the data format description.double
Gets the CoastWatch HDF metadata version for this dataset.protected DataVariable
getPreviewImpl
(int index) Implementation for the subclass.protected void
Performs reader initialization after the dataset has been opened.Methods inherited from class noaa.coastwatch.io.NCReader
close, convertAttributeValue, getAttribute, getAttribute, getAttribute, getAttributeAsArray, getAttributeAsArray, getAttributeAsArray, getCoordinateSystems, getDataset, getFilename, getGridSubset, getRawMetadata, getReferencedFile, getVariable, getVariablesForSystem, isNetwork
Methods inherited from class noaa.coastwatch.io.EarthDataReader
canUpdateNavigation, containsVariable, finalize, findVariable, getAllGrids, getAllVariables, getChunkProducer, getIndex, getInfo, getName, getPreview, getPreview, getRawMetadata, getSceneTime, getSource, getStatistics, getStatisticsVariables, getVariable, getVariables, putStatistics, setDataProjection, setUnitsMap, updateNavigation
-
Constructor Details
-
CWNCReader
Creates a new reader from the specified file.- Parameters:
name
- the file name or URL to read.- Throws:
IOException
- if an error occurred reading the metadata.
-
-
Method Details
-
getDataFormat
Gets the data format description.- Specified by:
getDataFormat
in classEarthDataReader
-
getMetaVersion
public double getMetaVersion()Gets the CoastWatch HDF metadata version for this dataset.- Returns:
- the metadata version. If no metadata attribute can be found, the metadata version is assumed to be 2.3.
-
initializeReader
Description copied from class:NCReader
Performs reader initialization after the dataset has been opened.- Overrides:
initializeReader
in classNCReader
- Throws:
IOException
- if an error occurred on initialization.
-
getPreviewImpl
Description copied from class:EarthDataReader
Implementation for the subclass.- Specified by:
getPreviewImpl
in classEarthDataReader
- Throws:
IOException
- See Also:
-
getActualVariable
Description copied from class:NCReader
Gets the actual variable with data. This method should be implemented in the child class and is only called if the variable is not already in the cache. SeeNCReader.getVariable(int)
for the required behaviour.- Specified by:
getActualVariable
in classNCReader
- Throws:
IOException
-