Class SoundingAdapterImpl

java.lang.Object
ucar.unidata.beans.InvisiblePropertiedBean
ucar.unidata.data.sounding.SoundingAdapterImpl
All Implemented Interfaces:
Serializable, PropertiedBean
Direct Known Subclasses:
AddeSoundingAdapter, CDMStationProfileAdapter, CMASoundingAdapter, NetcdfSoundingAdapter

public abstract class SoundingAdapterImpl extends InvisiblePropertiedBean
Class for retrieving upper air data from an ADDE remote server. Creates a SoundingOb for each of the stations on the remote server for the latest available data.
See Also:
  • Field Details

    • haveInitialized

      protected boolean haveInitialized
      Initialization flag
    • debug

      protected boolean debug
      Debug flag
    • defaults

      protected Defaults defaults
      Defaults for parameters
    • stations

      protected List<SoundingStation> stations
      List of stations
    • soundings

      protected List<SoundingOb> soundings
      List of soundings
    • times

      protected List<DateTime> times
      List of times
  • Constructor Details

    • SoundingAdapterImpl

      public SoundingAdapterImpl(String name)
      Construct an empty AddeSoundingAdapter
      Parameters:
      name - name for this adapter
  • Method Details

    • init

      protected void init() throws Exception
      Initialize the adapter. Set the initialization flag to true. Subclasses should call super.init() after doing what they need to do.
      Throws:
      Exception - problem initializing
    • checkInit

      protected void checkInit()
      Check to see if we have been initialized.
    • getDflt

      protected String getDflt(String prefix, String name, String dflt)
      Get a property value from the Defaults
      Parameters:
      prefix - prefix for property
      name - name of property
      dflt - default value
      Returns:
      value for prefix.name or dflt
    • dbPrint

      protected void dbPrint(String s)
      If we are in debug mode then print the string
      Parameters:
      s - string to print
    • getStations

      public List<SoundingStation> getStations()
      Retrieves a list of the stations in the dataset.
      Returns:
      list of sounding stations or empty list if none found
    • getStations

      public List<SoundingStation> getStations(DateTime time)
      Retrieves a list of the stations in the dataset for a given time.
      Parameters:
      time - time of observation
      Returns:
      list of sounding stations or null if none found
    • initSoundingOb

      public abstract SoundingOb initSoundingOb(SoundingOb so)
      Initialize a sounding ob
      Parameters:
      so - ob to initialize
      Returns:
      initialized observation
    • getSoundingOb

      public SoundingOb getSoundingOb(SoundingStation station)
      Retrieve the first sounding observation found for the given station.
      Parameters:
      station - station to look for
      Returns:
      first sounding observation for the given station or null if no sounding is available for this station
    • getSoundingObs

      public SoundingOb[] getSoundingObs()
      Retrieve all the sounding observations in the dataset
      Returns:
      all the sounding observations in the dataset or null
    • getSoundingTimes

      public DateTime[] getSoundingTimes()
      Retrieve an array of the sounding times available in the dataset.
      Returns:
      list of timestamps
    • getSoundingTimes

      public List<DateTime> getSoundingTimes(SoundingStation station)
      Retrieves a list of the times in the dataset for a given station.
      Parameters:
      station - station of observation
      Returns:
      list of times or empty list if none found