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 Stringprivate intprivate Stringprivate Stringprivate booleanprivate 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 TypeMethodDescriptionvoidaddRangeProcessor(String arrayName, RangeProcessor rangeProcessor) voidclose()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 intBased on the names of the variable dimensions, determine the in-track index.short[]getShortArray(String array_name, int[] start, int[] count, int[] stride) private voidinit(List<NetCDFFile> ncdfal) private StringmapNameIfLUTVar(String array_name) private StringmapNameIfQualityFlag(String array_name) private ObjectprocessArray(String mapName, String array_name, DataType arrayType, int granIdx, Object values, RangeProcessor rngProcessor, int[] start, int[] count) private ObjectvoidvoidsetQfMap(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:
getArrayTypein interfaceMultiDimensionReader
-
getDimensionNames
- Specified by:
getDimensionNamesin interfaceMultiDimensionReader
-
getDimensionLengths
- Specified by:
getDimensionLengthsin interfaceMultiDimensionReader
-
mapNameIfQualityFlag
-
mapNameIfLUTVar
-
getFloatArray
public float[] getFloatArray(String array_name, int[] start, int[] count, int[] stride) throws Exception - Specified by:
getFloatArrayin interfaceMultiDimensionReader- Throws:
Exception
-
getIntArray
public int[] getIntArray(String array_name, int[] start, int[] count, int[] stride) throws Exception - Specified by:
getIntArrayin interfaceMultiDimensionReader- Throws:
Exception
-
getDoubleArray
public double[] getDoubleArray(String array_name, int[] start, int[] count, int[] stride) throws Exception - Specified by:
getDoubleArrayin interfaceMultiDimensionReader- Throws:
Exception
-
getShortArray
public short[] getShortArray(String array_name, int[] start, int[] count, int[] stride) throws Exception - Specified by:
getShortArrayin interfaceMultiDimensionReader- Throws:
Exception
-
getByteArray
public byte[] getByteArray(String array_name, int[] start, int[] count, int[] stride) throws Exception - Specified by:
getByteArrayin interfaceMultiDimensionReader- Throws:
Exception
-
getArray
- Specified by:
getArrayin interfaceMultiDimensionReader- Throws:
Exception
-
getGlobalAttribute
- Specified by:
getGlobalAttributein interfaceMultiDimensionReader- Throws:
Exception
-
getArrayAttribute
- Specified by:
getArrayAttributein interfaceMultiDimensionReader- Throws:
Exception
-
close
- Specified by:
closein interfaceMultiDimensionReader- Throws:
Exception
-
init
- Throws:
Exception
-
getInTrackIndex
Based on the names of the variable dimensions, determine the in-track index.- Parameters:
v-Variablethat "contains" dimension names that allow for inference of the in-track index.nullis 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
-