Class 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.
Author:
IDV development team
See Also:
  • Constructor Details

    • 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 Details

    • 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
    • initold

      protected void initold() throws Exception
      Read a file of decoded soundings from CMA. Format of file is as follows:
      Throws:
      Exception - problem reading the file
    • setRAOBData

      protected void setRAOBData(SoundingOb so, List<ucar.unidata.data.sounding.SoundingLevelData> 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