Package edu.wisc.ssec.mcidasv.data.hydra
Class SuomiNPPDataSource
java.lang.Object
ucar.unidata.collab.SharableImpl
ucar.unidata.data.DataSourceImpl
edu.wisc.ssec.mcidasv.data.HydraDataSource
edu.wisc.ssec.mcidasv.data.hydra.SuomiNPPDataSource
- All Implemented Interfaces:
Sharable
,DataSource
,DataSourceFactory
,XmlPersistable
A data source for NPOESS Preparatory Project (Suomi NPP) data
and JPSS data (JPSS-1 is officially NOAA-20).
This should probably move, but we are placing it here for now
since we are leveraging some existing code used for HYDRA.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected MultiDimensionAdapter[]
private List
<DataCategory> private String
private static final String
private boolean
protected String
Sources file(package private) float[]
(package private) float[]
(package private) Attribute
private boolean
private boolean
private boolean
private boolean
private static final org.slf4j.Logger
(package private) float[]
(package private) float[]
(package private) float[]
(package private) float[]
(package private) float[]
private List
<MultiSpectralData> private Map
<String, MultiSpectralData> private List
<MultiSpectralData> private boolean
protected MultiDimensionReader
private String
private Map
<String, QualityFlag> (package private) SimpleDateFormat
(package private) SimpleDateFormat
(package private) SimpleDateFormat
(package private) SimpleDateFormat
private static final String
(package private) Date
(package private) String
Fields inherited from class edu.wisc.ssec.mcidasv.data.HydraDataSource
oldSourceFromBundles, request, sources
Fields inherited from class ucar.unidata.data.DataSourceImpl
changeDataPathsCbx, dataCacheKey, dataChoices, geoSelectionPanel, haveBeenUnPersisted, okToContinue, PARAM_SHOW_HIDE, PARAM_SHOW_NO, PARAM_SHOW_YES
Fields inherited from interface ucar.unidata.data.DataSource
DATAPATH_DATE_FORMAT, DATAPATH_DATE_PATTERN, MOST_RECENT, ordinalNames, PROP_AUTOCREATEDISPLAY, PROP_BASEDIRECTORY, PROP_CACHEABLE, PROP_DATACHOICENAME, PROP_DISPLAYPROPERTIES, PROP_DOCUMENTLINKS, PROP_FILEPATTERN, PROP_GEOLOCATION, PROP_ICON, PROP_NAME, PROP_POLLINFO, PROP_RESOLVERURL, PROP_SERVICE_HTTP, PROP_SUBPROPERTIES, PROP_TIMELABELS, PROP_TIMESTRIDE, PROP_TITLE
-
Constructor Summary
ConstructorsConstructorDescriptionZero-argument constructor for construction via unpersistence.SuomiNPPDataSource
(String fileName) SuomiNPPDataSource
(DataSourceDescriptor descriptor, String fileName, Hashtable properties) Construct a new Suomi NPP HDF5 data source.SuomiNPPDataSource
(DataSourceDescriptor descriptor, List<String> newSources, Hashtable properties) Construct a new Suomi NPP HDF5 data source. -
Method Summary
Modifier and TypeMethodDescriptionprotected Data
applyProperties
(Data data, Hashtable requestProperties, Map<String, double[]> subset, int adapterIndex) boolean
Can this data source save its dat to local diskprivate DataChoice
doMakeDataChoice
(int idx, MultiSpectralData adapter) private DataChoice
doMakeDataChoice
(int idx, String var, String description) void
Make and insert theDataChoices
for thisDataSource
.boolean
Check to see if thisSuomiNPPDataSource
is equal to the object in question.getData
(DataChoice dataChoice, DataCategory category, DataSelection dataSelection, Hashtable requestProperties) Get the data applicable to the DataChoice and selection criteria.protected Data
getDataInner
(DataChoice dataChoice, DataCategory category, DataSelection dataSelection, Hashtable requestProperties) Get the data for the given DataChoice and selection criteria.getMultiSpectralData
(DataChoice choice) getQfMap()
getSubsetFromLonLatRect
(MultiDimensionSubset select, GeoSelection geoSelection) void
Implement the XmlPersistable interface method that is called after this object has been fully created and initialized after being unpersisted by the XmlEncoder.void
initDataChoice
(DataChoice dataChoice) Sets the global id of the given dataChoice to be a per process unique string value.protected void
initDataSelectionComponents
(List<DataSelectionComponent> components, DataChoice dataChoice) Add any data selection componentsvoid
AddInteger->String
translations to IDV's "translations" resource, so they will be made available to the data probe of Image Display's.boolean
isNOAA()
Determine if this data source originated from a "NOAA file".protected List
saveDataToLocalDisk
(String filePrefix, Object loadId, boolean changeLinks) Save the data source files to local diskvoid
setDatasetName
(String name) void
setFilenameMap
(Map<String, List<String>> filenameMap) void
setOldSources
(List<String> oldSources) void
setup()
Methods inherited from class edu.wisc.ssec.mcidasv.data.HydraDataSource
addPropertiesTabs, clearCachedData, doMakeDateTimes, getAdapters, isFileBased
Methods inherited from class ucar.unidata.data.DataSourceImpl
addActions, addDataChangeListener, addDataChoice, addReloadTab, applyFieldMask, applyProperties, beginWritingDataToLocalDisk, canAddCurrentName, canCacheDataToDisk, canChangeData, canDoAllLevels, canDoFieldMask, canDoGeoSelection, canDoGeoSelectionMap, canDoGeoSelectionStride, canPoll, canShowParameter, checkForInitAfterUnPersistence, clearFileCache, clearTimes, convertSourceFile, convertToFilesIfDirectory, createAutoDisplay, createCacheKey, createElement, decrOutstandingGetDataCalls, doDirectory, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSelectionPanel, doMakeGeoSubsetPropertiesComponent, doRemove, endWritingDataToLocalDisk, expandIfNeeded, findDataChoice, findDataChoices, flushCache, getAbsoluteDateTimes, getActions, getAlias, getAllDateTimes, getAllDateTimes, getAllLevels, getAllLevels, getAllTimesForTimeDriver, getCache, getCache, getCacheClearDelay, getCacheDataToDisk, getCompositeDataChoices, getData, getDataCachePath, getDataChangeListeners, getDataChoices, getDataContext, getDataInner, getDataIsEditable, getDataPaths, getDataPrefix, getDataSelection, getDataSelectionComponents, getDataSource, getDateTimes, getDateTimeSelection, getDefaultSave, getDescription, getDescriptor, getErrorMessage, getEverChangedName, getExtraGeoSelectionComponent, getExtraTimesComponent, getFileFilterForPolling, getFullDescription, getid, getIdv, getInError, getLocalDirectory, getLocationForPolling, getLocationsForPolling, getMostRecentFiles, getName, getNameForDataSource, getNeedToShowErrorToUser, getNextId, getOutstandingGetDataCalls, getPartialDescription, getPassword, getPathsThatCanBeRelative, getPollingInfo, getProperties, getPropertiesComponents, getPropertiesHeader, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getProperty, getRelativePaths, getSampleDataProjection, getSaveDataFileLabel, getSelectedDateTimes, getSelectedDateTimes, getTimesFromDataSelection, getTmpPaths, getTypeName, getUserName, handlePropertiesAction, hasPollingInfo, holdsDateTimes, holdsIndices, identifiedBy, identifiedByName, incrOutstandingGetDataCalls, initAfter, initAfterCreation, initFromXml, isPolling, loadFieldMask, loadFieldMask, loadLatestFile, logException, logException, makeDerivedDataChoices, makeSaveLocalActions, newFileFromPolling, newFilesFromPolling, notifyDataChange, propertiesChanged, putCache, putCache, reloadData, reloadData, reloadProperties, removeCache, removeDataChangeListener, removeDataChoice, removeProperty, replaceDataChoice, resetTmpState, saveDataToLocalDisk, saveDataToLocalDisk, selectTimesFromList, setAlias, setAskToUpdate, setCacheClearDelay, setCacheDataToDisk, setDataEditableStrings, setDataIsEditable, setDataIsRelative, setDataRelativeStrings, setDataSelection, setDateTimeSelection, setDefaultSave, setDescription, setDescriptor, setDirectory, setEverChangedName, setInError, setInError, setInError, setName, setNewFiles, setObjectProperties, setObjectProperty, setPassword, setPollingInfo, setPollLocation, setProperties, setProperty, setProperty, setRelativePaths, setTemplateName, setTmpPaths, setUserName, shouldCache, shouldCache, showPasswordDialog, showPropertiesDialog, showPropertiesDialog, showPropertiesDialog, showWaitDialog, tick, toString, toStringTruncated, updateDetailsText, updateState, writeFieldMaskFile, writeFieldMaskFile
Methods inherited from class ucar.unidata.collab.SharableImpl
applySharableProperties, doShare, doShare, doShareExternal, doShareInternal, getReceiveShareTime, getSharablePropertiesComponent, getShareGroup, getSharing, getUniqueId, initSharable, receiveShareData, removeSharable, setReceiveShareTime, setShareGroup, setSharing, setUniqueId, showSharableDialog
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface ucar.unidata.data.DataSource
getUniqueId
-
Field Details
-
logger
-
filename
Sources file -
oldSources
-
geoSources
-
filenameMap
-
nppAggReader
-
adapters
-
msd_CrIS
-
multiSpectralData
-
msdMap
-
qfMap
-
lutMap
-
DATA_DESCRIPTION
- See Also:
-
instrumentName
-
productName
-
whichEDR
-
crisFilter
-
defaultSubset
-
track_adapter
-
categories
-
isCombinedProduct
-
isDerived
-
nameHasBeenSet
-
isNOAA
-
isEnterprise
-
SEPARATOR_CHAR
- See Also:
-
sdfNASA
-
sdfEnterprise
-
m12LUT
float[] m12LUT -
m13LUT
float[] m13LUT -
m14LUT
float[] m14LUT -
m15LUT
float[] m15LUT -
m16LUT
float[] m16LUT -
i04LUT
float[] i04LUT -
i05LUT
float[] i05LUT -
unitsNASA
-
unitsEnterprise
-
sdf
-
sdfOut
-
theDate
-
subset
-
derivedSubset
-
derivedInit
-
-
Constructor Details
-
SuomiNPPDataSource
public SuomiNPPDataSource()Zero-argument constructor for construction via unpersistence. -
SuomiNPPDataSource
- Throws:
VisADException
-
SuomiNPPDataSource
public SuomiNPPDataSource(DataSourceDescriptor descriptor, String fileName, Hashtable properties) throws VisADException Construct a new Suomi NPP HDF5 data source.- Parameters:
descriptor
- descriptor for thisDataSource
fileName
- name of the hdf file to readproperties
- hashtable of properties- Throws:
VisADException
- problem creating data
-
SuomiNPPDataSource
public SuomiNPPDataSource(DataSourceDescriptor descriptor, List<String> newSources, Hashtable properties) throws VisADException Construct a new Suomi NPP HDF5 data source.- Parameters:
descriptor
- Descriptor for thisDataSource
.newSources
- List of filenames.properties
- Hashtable of properties.- Throws:
VisADException
- problem creating data
-
-
Method Details
-
setup
- Throws:
VisADException
-
initDataChoice
Description copied from class:ucar.unidata.data.DataSourceImpl
Sets the global id of the given dataChoice to be a per process unique string value. Used (for now) for persistence.- Overrides:
initDataChoice
in classDataSourceImpl
- Parameters:
dataChoice
- dataChoice to initialize
-
initAfterUnpersistence
Description copied from class:ucar.unidata.data.DataSourceImpl
Implement the XmlPersistable interface method that is called after this object has been fully created and initialized after being unpersisted by the XmlEncoder.- Specified by:
initAfterUnpersistence
in interfaceDataSource
- Overrides:
initAfterUnpersistence
in classDataSourceImpl
-
canSaveDataToLocalDisk
Description copied from class:HydraDataSource
Can this data source save its dat to local disk- Specified by:
canSaveDataToLocalDisk
in interfaceDataSource
- Overrides:
canSaveDataToLocalDisk
in classHydraDataSource
- Returns:
- can save to local disk
-
saveDataToLocalDisk
protected List saveDataToLocalDisk(String filePrefix, Object loadId, boolean changeLinks) throws Exception Description copied from class:ucar.unidata.data.DataSourceImpl
Save the data source files to local disk- Overrides:
saveDataToLocalDisk
in classDataSourceImpl
- Parameters:
filePrefix
- This is the directory path to write the files to with the unique file identifier append to itloadId
- For stopping the load through the JobManagerchangeLinks
- Should this data source also change its internal data references- Returns:
- List of the files that were written
- Throws:
Exception
- On badness
-
getOldSources
-
setOldSources
-
getFilenameMap
-
setFilenameMap
-
doMakeDataChoices
Make and insert theDataChoices
for thisDataSource
.- Overrides:
doMakeDataChoices
in classDataSourceImpl
-
doMakeDataChoice
- Throws:
Exception
-
doMakeDataChoice
- Throws:
Exception
-
equals
Check to see if thisSuomiNPPDataSource
is equal to the object in question.- Overrides:
equals
in classDataSourceImpl
- Parameters:
o
- object in question- Returns:
- true if they are the same or equivalent objects
-
getMultiSpectralData
-
getMultiSpectralData
-
getDatasetName
-
getQfMap
- Returns:
- the qfMap
-
setDatasetName
-
isNOAA
Determine if this data source originated from a "NOAA file".- Returns:
true
if file came from NOAA,false
otherwise.
-
getSubsetFromLonLatRect
public Map<String,double[]> getSubsetFromLonLatRect(MultiDimensionSubset select, GeoSelection geoSelection) -
getData
public Data getData(DataChoice dataChoice, DataCategory category, DataSelection dataSelection, Hashtable requestProperties) throws VisADException, RemoteException Description copied from class:ucar.unidata.data.DataSourceImpl
Get the data applicable to the DataChoice and selection criteria.- Specified by:
getData
in interfaceDataSource
- Overrides:
getData
in classDataSourceImpl
- Parameters:
dataChoice
- choice that defines the datacategory
- the data categorydataSelection
- DataSelection for subsettingrequestProperties
- extra request properties- Returns:
- the associated data
- Throws:
VisADException
- VisAD problemRemoteException
- Java RMI problem
-
getDataInner
protected Data getDataInner(DataChoice dataChoice, DataCategory category, DataSelection dataSelection, Hashtable requestProperties) throws VisADException, RemoteException Description copied from class:HydraDataSource
Get the data for the given DataChoice and selection criteria.- Overrides:
getDataInner
in classHydraDataSource
- Parameters:
dataChoice
- DataChoice for selectioncategory
- DataCategory for the DataChoice (not used)dataSelection
- subsetting criteriarequestProperties
- extra request properties- Returns:
- the Data object for the request
- Throws:
VisADException
- couldn't create the dataRemoteException
- couldn't create a remote data object
-
applyProperties
protected Data applyProperties(Data data, Hashtable requestProperties, Map<String, double[]> subset, int adapterIndex) throws VisADException, RemoteException- Throws:
VisADException
RemoteException
-
initDataSelectionComponents
protected void initDataSelectionComponents(List<DataSelectionComponent> components, DataChoice dataChoice) Description copied from class:ucar.unidata.data.DataSourceImpl
Add any data selection components- Overrides:
initDataSelectionComponents
in classDataSourceImpl
- Parameters:
components
- list of componentsdataChoice
- the data choice
-
initQfTranslations
AddInteger->String
translations to IDV's "translations" resource, so they will be made available to the data probe of Image Display's.
-