Package edu.wisc.ssec.mcidasv.data.hydra
Class GranuleAggregation
java.lang.Object
edu.wisc.ssec.mcidasv.data.hydra.GranuleAggregation
- All Implemented Interfaces:
MultiDimensionReader
Provides a view and operations on a set of contiguous data granules as if they
were a single granule.
This file needs to implement the same signatures NetCDFFile does,
but for aggregations of consecutive granules.
- Author:
- tommyj
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
private int
private String
private String
private boolean
private static final org.slf4j.Logger
(package private) List
<NetCDFFile> (package private) List
<NetcdfFile> private String
(package private) Map
<String, QualityFlag> (package private) Map
<String, RangeProcessor> -
Constructor Summary
ConstructorsConstructorDescriptionGranuleAggregation
(List<NetCDFFile> ncdfal, Set<String> products, String inTrackDimensionName, String crossTrackDimensionName) GranuleAggregation
(List<NetCDFFile> ncdfal, Set<String> products, String inTrackDimensionName, String crossTrackDimensionName, boolean isEDR) GranuleAggregation
(List<NetCDFFile> ncdfal, Set<String> products, String inTrackDimensionName, String inTrackGeoDimensionName, String crossTrackDimensionName) GranuleAggregation
(List<NetCDFFile> ncdfal, Set<String> products, String inTrackDimensionName, String inTrackGeoDimensionName, String crossTrackDimensionName, boolean isVIIRS) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRangeProcessor
(String arrayName, RangeProcessor rangeProcessor) void
close()
getArrayAttribute
(String array_name, String attr_name) getArrayType
(String array_name) byte[]
getByteArray
(String array_name, int[] start, int[] count, int[] stride) int[]
getDimensionLengths
(String array_name) String[]
getDimensionNames
(String array_name) double[]
getDoubleArray
(String array_name, int[] start, int[] count, int[] stride) float[]
getFloatArray
(String array_name, int[] start, int[] count, int[] stride) getGlobalAttribute
(String attr_name) int[]
getIntArray
(String array_name, int[] start, int[] count, int[] stride) private int
Based on the names of the variable dimensions, determine the in-track index.short[]
getShortArray
(String array_name, int[] start, int[] count, int[] stride) private void
init
(List<NetCDFFile> ncdfal) private String
mapNameIfLUTVar
(String array_name) private String
mapNameIfQualityFlag
(String array_name) private Object
processArray
(String mapName, String array_name, DataType arrayType, int granIdx, Object values, RangeProcessor rngProcessor, int[] start, int[] count) private Object
void
void
setQfMap
(Map<String, QualityFlag> qfMap)
-
Field Details
-
logger
-
nclist
-
ncdfal
-
varMapList
-
varDimNamesList
-
varDataTypeList
-
varGranInTrackLengths
-
varAggrDimLengths
Map<String,int[]> varAggrDimLengths -
granCutRanges
-
granCutScans
-
qfMap
-
lutMap
-
varToRangeProcessor
-
granuleCount
-
inTrackDimensionName
-
inTrackGeoDimensionName
-
crossTrackDimensionName
-
products
-
origName
-
isVIIRS
-
-
Constructor Details
-
GranuleAggregation
public GranuleAggregation(List<NetCDFFile> ncdfal, Set<String> products, String inTrackDimensionName, String inTrackGeoDimensionName, String crossTrackDimensionName, boolean isVIIRS) throws Exception - Throws:
Exception
-
GranuleAggregation
public GranuleAggregation(List<NetCDFFile> ncdfal, Set<String> products, String inTrackDimensionName, String inTrackGeoDimensionName, String crossTrackDimensionName) throws Exception - Throws:
Exception
-
GranuleAggregation
public GranuleAggregation(List<NetCDFFile> ncdfal, Set<String> products, String inTrackDimensionName, String crossTrackDimensionName) throws Exception - Throws:
Exception
-
GranuleAggregation
public GranuleAggregation(List<NetCDFFile> ncdfal, Set<String> products, String inTrackDimensionName, String crossTrackDimensionName, boolean isEDR) throws Exception - Throws:
Exception
-
-
Method Details
-
getArrayType
- Specified by:
getArrayType
in interfaceMultiDimensionReader
-
getDimensionNames
- Specified by:
getDimensionNames
in interfaceMultiDimensionReader
-
getDimensionLengths
- Specified by:
getDimensionLengths
in interfaceMultiDimensionReader
-
mapNameIfQualityFlag
-
mapNameIfLUTVar
-
getFloatArray
public float[] getFloatArray(String array_name, int[] start, int[] count, int[] stride) throws Exception - Specified by:
getFloatArray
in interfaceMultiDimensionReader
- Throws:
Exception
-
getIntArray
public int[] getIntArray(String array_name, int[] start, int[] count, int[] stride) throws Exception - Specified by:
getIntArray
in interfaceMultiDimensionReader
- Throws:
Exception
-
getDoubleArray
public double[] getDoubleArray(String array_name, int[] start, int[] count, int[] stride) throws Exception - Specified by:
getDoubleArray
in interfaceMultiDimensionReader
- Throws:
Exception
-
getShortArray
public short[] getShortArray(String array_name, int[] start, int[] count, int[] stride) throws Exception - Specified by:
getShortArray
in interfaceMultiDimensionReader
- Throws:
Exception
-
getByteArray
public byte[] getByteArray(String array_name, int[] start, int[] count, int[] stride) throws Exception - Specified by:
getByteArray
in interfaceMultiDimensionReader
- Throws:
Exception
-
getArray
- Specified by:
getArray
in interfaceMultiDimensionReader
- Throws:
Exception
-
getGlobalAttribute
- Specified by:
getGlobalAttribute
in interfaceMultiDimensionReader
- Throws:
Exception
-
getArrayAttribute
- Specified by:
getArrayAttribute
in interfaceMultiDimensionReader
- Throws:
Exception
-
close
- Specified by:
close
in interfaceMultiDimensionReader
- Throws:
Exception
-
init
- Throws:
Exception
-
getInTrackIndex
Based on the names of the variable dimensions, determine the in-track index.- Parameters:
v
-Variable
that "contains" dimension names that allow for inference of the in-track index.null
is allowed.- Returns:
- correct index (0 or greater), or -1 if error.
-
readArray
private Object readArray(String array_name, int[] start, int[] count, int[] stride) throws Exception - Throws:
Exception
-
setQfMap
- Parameters:
qfMap
- the qfMap to set
-
setLUTMap
- Parameters:
lutMap
- the lutMap to set
-
getVarMap
-
getReaders
-
processArray
private Object processArray(String mapName, String array_name, DataType arrayType, int granIdx, Object values, RangeProcessor rngProcessor, int[] start, int[] count) -
addRangeProcessor
-