ucar.unidata.data.sounding
Class NetcdfSoundingAdapter

java.lang.Object
  extended by ucar.unidata.beans.InvisiblePropertiedBean
      extended by ucar.unidata.data.sounding.SoundingAdapterImpl
          extended by ucar.unidata.data.sounding.NetcdfSoundingAdapter
All Implemented Interfaces:
Serializable, PropertiedBean, SoundingAdapter

public class NetcdfSoundingAdapter
extends SoundingAdapterImpl
implements SoundingAdapter

This class creates VisAD compatible data objects from a netCDF file of upper air soundings.

Version:
$Revision: 1.20 $
Author:
IDV development team
See Also:
Serialized Form

Field Summary
 
Fields inherited from class ucar.unidata.data.sounding.SoundingAdapterImpl
debug, defaults, haveInitialized, soundings, stations, times
 
Constructor Summary
NetcdfSoundingAdapter()
          Constructor for reflection based construction
NetcdfSoundingAdapter(File file)
          Read a netCDF file of decoded soundings
NetcdfSoundingAdapter(String filename)
          Read a netCDF file of decoded soundings.
 
Method Summary
protected  String getDflt(String name, String dflt)
          Get a default value using this Adapter's prefix
 String getSource()
          Get the filename for this adapter.
protected  void init()
          Read a netCDF file of decoded soundings.
 SoundingOb initSoundingOb(SoundingOb sound)
          Check to see if the RAOB has any data
 void setSource(String s)
          Set the source for this data
 void update()
          Update the adapter (re-read the data)
 
Methods inherited from class ucar.unidata.data.sounding.SoundingAdapterImpl
checkInit, dbPrint, getDflt, getSoundingOb, getSoundingObs, getSoundingTimes, getSoundingTimes, getStations, getStations
 
Methods inherited from class ucar.unidata.beans.InvisiblePropertiedBean
addProperty, addPropertyChangeListener, addPropertyChangeListener, disablePropertyChangeEvents, enablePropertyChangeEvents, getTitle, removePropertyChangeListener, removePropertyChangeListener, setTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ucar.unidata.data.sounding.SoundingAdapter
getSoundingObs, getSoundingTimes, getSoundingTimes, getStations, getStations
 

Constructor Detail

NetcdfSoundingAdapter

public NetcdfSoundingAdapter()
Constructor for reflection based construction


NetcdfSoundingAdapter

public NetcdfSoundingAdapter(String filename)
                      throws Exception
Read a netCDF file of decoded soundings.

Parameters:
filename - the fully qualified path and name of the file to be adapted.
Throws:
Exception - problem reading file

NetcdfSoundingAdapter

public NetcdfSoundingAdapter(File file)
                      throws Exception
Read a netCDF file of decoded soundings

Parameters:
file - File to read
Throws:
Exception - problem encountered
Method Detail

update

public void update()
Update the adapter (re-read the data)

Specified by:
update in interface SoundingAdapter

init

protected void init()
             throws Exception
Read a netCDF file of decoded soundings.

Overrides:
init in class SoundingAdapterImpl
Throws:
Exception - problem reading the file

getSource

public String getSource()
Get the filename for this adapter.

Specified by:
getSource in interface SoundingAdapter
Returns:
name of file

setSource

public void setSource(String s)
Set the source for this data

Specified by:
setSource in interface SoundingAdapter
Parameters:
s - new source

initSoundingOb

public SoundingOb initSoundingOb(SoundingOb sound)
Check to see if the RAOB has any data

Specified by:
initSoundingOb in interface SoundingAdapter
Specified by:
initSoundingOb in class SoundingAdapterImpl
Parameters:
sound - sounding to check
Returns:
sounding with data

getDflt

protected String getDflt(String name,
                         String dflt)
Get a default value using this Adapter's prefix

Parameters:
name - name of property key
dflt - default value
Returns:
the default for that property or dflt if not in properties