ucar.unidata.data.sounding
Class CMASoundingAdapter

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

public class CMASoundingAdapter
extends SoundingAdapterImpl
implements SoundingAdapter

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

Version:
$Revision: 1.4 $
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
CMASoundingAdapter()
          Constructor for reflection based construction
CMASoundingAdapter(File file)
          Read a file of decoded soundings from CMA
CMASoundingAdapter(String filename)
          Read a file of decoded soundings from CMA.
 
Method Summary
 String getSource()
          Get the filename for this adapter.
protected  void init()
          Read a file of decoded soundings from CMA.
 SoundingOb initSoundingOb(SoundingOb sound)
          Check to see if the RAOB has any data
static void main(String[] args)
          Test it out
protected  void setRAOBData(SoundingOb so, List levels)
          Set the data in the RAOB.
 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

CMASoundingAdapter

public CMASoundingAdapter()
Constructor for reflection based construction


CMASoundingAdapter

public CMASoundingAdapter(String filename)
                   throws Exception
Read a file of decoded soundings from CMA.

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

CMASoundingAdapter

public CMASoundingAdapter(File file)
                   throws Exception
Read a file of decoded soundings from CMA

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 file of decoded soundings from CMA. Format of file is as follows:

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

setRAOBData

protected void setRAOBData(SoundingOb so,
                           List levels)
Set the data in the RAOB.

Parameters:
so - the SoundingOb
levels - list of SoundingLevelData

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

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

main

public static void main(String[] args)
                 throws Exception
Test it out

Parameters:
args - filename
Throws:
Exception - problem opening or decoding the file