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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DataVariablegetActualVariable(int index) Gets the actual variable with data.Gets the data format description.doubleGets the CoastWatch HDF metadata version for this dataset.protected DataVariablegetPreviewImpl(int index) Implementation for the subclass.protected voidPerforms 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, isNetworkMethods 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:
getDataFormatin 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:NCReaderPerforms reader initialization after the dataset has been opened.- Overrides:
initializeReaderin classNCReader- Throws:
IOException- if an error occurred on initialization.
-
getPreviewImpl
Description copied from class:EarthDataReaderImplementation for the subclass.- Specified by:
getPreviewImplin classEarthDataReader- Throws:
IOException- See Also:
-
getActualVariable
Description copied from class:NCReaderGets 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:
getActualVariablein classNCReader- Throws:
IOException
-