Class 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:
  • Constructor Details

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