Class AerologicalDisplay

java.lang.Object
ucar.visad.display.DisplayMaster
ucar.unidata.view.sounding.AerologicalDisplay
All Implemented Interfaces:
AerologicalDisplayConstants
Direct Known Subclasses:
SkewTDisplay, StuveDisplay

public class AerologicalDisplay extends DisplayMaster implements AerologicalDisplayConstants
Provides a 2-D VisAD display for an aerological ( meteorological thermodynamic) diagram.
Version:
$Id: AerologicalDisplay.java,v 1.53 2007/01/30 22:46:00 dmurray Exp $
Author:
Unidata Development Team
  • Field Details

    • CURSOR_PRESSURE

      public static final String CURSOR_PRESSURE
      The name of the VisAD-cursor pressure property.
      See Also:
    • POINTER_PRESSURE

      public static final String POINTER_PRESSURE
      The name of the mouse-pointer pressure property.
      See Also:
    • CURSOR_TEMPERATURE

      public static final String CURSOR_TEMPERATURE
      The name of the VisAD-cursor temperature property.
      See Also:
    • POINTER_TEMPERATURE

      public static final String POINTER_TEMPERATURE
      The name of the mouse-pointer temperature property.
      See Also:
    • ACTIVE_SOUNDING

      public static final String ACTIVE_SOUNDING
      The name of the active sounding property.
      See Also:
    • ACTIVE_WIND_PROFILE

      public static final String ACTIVE_WIND_PROFILE
      The name of the active wind profile property.
      See Also:
    • PROFILE_TEMPERATURE

      public static final String PROFILE_TEMPERATURE
      The name of the profile temperature property.
      See Also:
    • PROFILE_DEW_POINT

      public static final String PROFILE_DEW_POINT
      The name of the profile dew-point property.
      See Also:
    • PROFILE_WIND_SPEED

      public static final String PROFILE_WIND_SPEED
      The name of the profile wind speed property.
      See Also:
    • PROFILE_WIND_DIRECTION

      public static final String PROFILE_WIND_DIRECTION
      The name of the profile wind direction property.
      See Also:
    • CAPE

      public static final String CAPE
      The name of the CAPE property.
      See Also:
  • Constructor Details

  • Method Details

    • initializeClass

      protected void initializeClass() throws VisADException, RemoteException
      Initialize the class
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setDisplayScalarMaps

      protected void setDisplayScalarMaps() throws VisADException, RemoteException
      Set up the DisplayScalarMaps for this display.
      Throws:
      RemoteException - Java RMI exception
      VisADException - VisAD problem
    • getCoordinateSystem

      public AerologicalCoordinateSystem getCoordinateSystem()
      Gets the (p,T) invalid input: '<'-> (x,y) coordinate system transformation associated with this display.
      Returns:
      The (p,T) invalid input: '<'-> (x,y) coordinate system transformation associated with this display
    • setCoordinateSystem

      public void setCoordinateSystem(String type) throws VisADException, RemoteException
      Set the CoordinateSystem for this display to the default for the type.
      Parameters:
      type - type of display (from AerologicalDisplayConstants
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setCoordinateSystem

      public void setCoordinateSystem(AerologicalCoordinateSystem acs) throws VisADException, RemoteException
      Sets the (p,T) invalid input: '<'-> (x,y) coordinate system transformation associated with this display.
      Parameters:
      acs - the new (p,T) invalid input: '<'-> (x,y) coordinate system transformation associated with this display
      Throws:
      RemoteException - Java RMI Exception
      VisADException - problem creating VisAD object
    • coordinateSystemChange

      protected void coordinateSystemChange(AerologicalCoordinateSystem acs) throws VisADException, RemoteException
      Handle a change to the coordinate system.
      Parameters:
      acs - the new (p,T) invalid input: '<'-> (x,y) coordinate system transformation associated with this display
      Throws:
      RemoteException - Java RMI Exception
      VisADException - problem creating VisAD object
    • addProfile

      public void addProfile(Field temperature, Field dewPoint) throws VisADException, RemoteException
      Adds a temperature and dew-point sounding to the display. The sounding will be added to the end of the set of soundings.
      Parameters:
      temperature - The temperature sounding. Must be Pressure -> Temperature.
      dewPoint - The dew-point sounding. Must be Pressure -> DewPoint.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • addProfile

      public void addProfile(Field temperature, Field dewPoint, Field windProfile) throws VisADException, RemoteException
      Adds a temperature, dew-point, and wind sounding to the display. The sounding will be added to the end of the set of soundings.
      Parameters:
      temperature - The temperature sounding. Must be Pressure -> Temperature.
      dewPoint - The dew-point sounding. Must be Pressure -> DewPoint.
      windProfile - The wind profile. Must be Pressure -> Wind
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • addProfile

      public void addProfile(int index, Field temperature, Field dewPoint, Field windProfile) throws VisADException, RemoteException
      Adds a temperature, dew-point and wind sounding to the display. The soundings will be inserted at the given index. The soundings will be invisible.
      Parameters:
      index - The index of the sounding.
      temperature - The temperature sounding. Must be Pressure -> Temperature.
      dewPoint - The dew-point sounding. Must be Pressure -> DewPoint.
      windProfile - The wind profile. Must be Pressure -> Wind
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • profileCount

      public int profileCount()
      Returns the number of profiles in the display.
      Returns:
      The number of profiles in the display.
    • removeProfiles

      public void removeProfiles() throws VisADException, RemoteException
      Removes all soundings from the display.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • removeProfile

      public void removeProfile(int index) throws VisADException, RemoteException
      Removes a given sounding from the display. The soundings subsequent to that position will have their indexes decremented by one.
      Parameters:
      index - The index of the sounding.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setProfileVisible

      public void setProfileVisible(int index, boolean visible) throws VisADException, RemoteException
      Sets the visibility of a given sounding.
      Parameters:
      index - The sounding index.
      visible - Whether or not the sounding should be visible.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setProfilesVisibility

      public void setProfilesVisibility(boolean visible, int index) throws VisADException, RemoteException
      Sets the visibility of last two soundings.
      Parameters:
      visible - Whether or not the sounding should be visible.
      index - _more_
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setActiveSounding

      public void setActiveSounding(int index) throws VisADException, RemoteException
      Sets the "active" sounding. This is necessary for determining the trajectory of a lifted parcel, for example.
      Parameters:
      index - The index of the "active" sounding. A value of -1 means that there is no active sounding.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setOriginalProfiles

      public void setOriginalProfiles(int index) throws VisADException, RemoteException
      Resets the original sounding in the specified sounding.
      Parameters:
      index - The index of the sounding.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • clearProfiles

      public void clearProfiles() throws VisADException, RemoteException
      Removes all soundings from the display.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setConstrainProfiles

      public void setConstrainProfiles(boolean yes) throws VisADException, RemoteException
      Sets the constrainProfiles property. When this property is set, profile temperatures are constrained to be equal to or greater than their corresponding profile dew-points.
      Parameters:
      yes - Whether or not to constrain temperatures to be equal to or greater than corresponding dew-points.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setCursorPressure

      public final void setCursorPressure(Real pressure) throws UnitException, VisADException, RemoteException
      Sets the VisAD-cursor pressure property.
      Parameters:
      pressure - The pressure at the VisAD cursor.
      Throws:
      UnitException - Inappropriate pressure unit.
      VisADException - if a core VisAD failure occurs.
      RemoteException - if a Java RMI failure occurs.
    • setPointerPressure

      public final void setPointerPressure(Real pressure) throws UnitException, VisADException, RemoteException
      Sets the mouse-pointer pressure property.
      Parameters:
      pressure - The pressure at the mouse pointer.
      Throws:
      UnitException - Inappropriate pressure unit.
      VisADException - if a core VisAD failure occurs.
      RemoteException - if a Java RMI failure occurs.
    • getCursorPressure

      public Real getCursorPressure()
      Gets the VisAD-cursor pressure property.
      Returns:
      The pressure at the VisAD cursor. May be null.
    • getPointerPressure

      public Real getPointerPressure()
      Gets the mouse-pointer pressure property.
      Returns:
      The pressure at the mouse pointer. May be null.
    • setCursorTemperature

      protected final void setCursorTemperature(Real temperature) throws UnitException, VisADException, RemoteException
      Sets the VisAD-cursor temperature property.
      Parameters:
      temperature - The cursor temperature.
      Throws:
      UnitException - Inappropriate unit.
      VisADException - if a core VisAD failure occurs.
      RemoteException - if a Java RMI failure occurs.
    • setPointerTemperature

      protected final void setPointerTemperature(Real temperature) throws UnitException, VisADException, RemoteException
      Sets the mouse-pointer temperature property.
      Parameters:
      temperature - The pointer temperature.
      Throws:
      UnitException - Inappropriate unit.
      VisADException - if a core VisAD failure occurs.
      RemoteException - if a Java RMI failure occurs.
    • getCursorTemperature

      public Real getCursorTemperature()
      Gets the cursor temperature property.
      Returns:
      The currently-selected temperature. May be null.
    • getPointerTemperature

      public Real getPointerTemperature()
      Gets the pointer temperature property.
      Returns:
      The temperature under the mouse pointer. May be null.
    • getProfileTemperature

      public Real getProfileTemperature()
      Gets the profile temperature property.
      Returns:
      The profile temperature. May be null.
    • getProfileDewPoint

      public Real getProfileDewPoint()
      Gets the profile dew-point property.
      Returns:
      The profile dew-point. May be null.
    • getProfileWindSpeed

      public Real getProfileWindSpeed()
      Gets the profile wind speed property.
      Returns:
      The profile wind speed. May be null.
    • getProfileWindDirection

      public Real getProfileWindDirection()
      Gets the profile wind direction property.
      Returns:
      The profile wind direction. May be null.
    • setPseudoAdiabaticTrajectoryEnabled

      public void setPseudoAdiabaticTrajectoryEnabled(boolean enable) throws VisADException, RemoteException
      Sets the pseudo-adiabatic-trajectory-on property. An active sounding must also be set in order to compute the trajectory.
      Parameters:
      enable - Whether or not showing of the pseudo adiabatic trajectory is enabled.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
      See Also:
    • isPseudoAdiabaticTrajectoryEnabled

      public boolean isPseudoAdiabaticTrajectoryEnabled()
      Gets the pseudo-adiabatic-trajectory-on property.
      Returns:
      Whether or not showing the pseudo adiabatic trajectory is enabled.
    • setPseudoAdiabaticTrajectoryVisible

      public void setPseudoAdiabaticTrajectoryVisible(boolean visible) throws VisADException, RemoteException
      Sets the visibility of the pseudoadiabatic trajectory.
      Parameters:
      visible - If and only if true, then the trajectory will be visible if it exists.
      Throws:
      VisADException - if a VisAD failure occurs.
      RemoteException - if a Java RMI failure occurs.
    • isPseudoAdiabaticTrajectoryVisible

      public boolean isPseudoAdiabaticTrajectoryVisible()
      Returns the visibility of the pseudoadiabatic trajectory.
      Returns:
      True if and only if the trajectory will be visible if it exists.
    • clearPseudoAdiabaticTrajectory

      public void clearPseudoAdiabaticTrajectory() throws VisADException, RemoteException
      Clears the pseudo-adiabatic-trajectory property.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • getMinimumPressure

      public Real getMinimumPressure()
      Returns the minimum pressure of this display.
      Returns:
      The minimum pressure of this display.
    • getMaximumPressure

      public Real getMaximumPressure()
      Returns the maximum pressure of this display.
      Returns:
      The maximum pressure of this display.
    • getMinimumTemperature

      public Real getMinimumTemperature()
      Returns the minimum temperature of this display.
      Returns:
      The minimum temperature of this display.
    • getMaximumTemperature

      public Real getMaximumTemperature()
      Returns the maximum temperature of this display.
      Returns:
      The maximum temperature of this display.
    • setDryAdiabatVisibility

      public void setDryAdiabatVisibility(boolean on) throws VisADException, RemoteException
      Sets the visibility of the background dry adiabats.
      Parameters:
      on - Whether the background dry adiabats should be visible.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setIsobarsVisibility

      public void setIsobarsVisibility(boolean on) throws VisADException, RemoteException
      _more_
      Parameters:
      on - _more_
      Throws:
      RemoteException - _more_
      VisADException - _more_
    • getDryAdiabatVisibility

      public boolean getDryAdiabatVisibility()
      Get the visibility of the background dry adiabats.
      Returns:
      true if visible
    • getIsoBarsVisibility

      public boolean getIsoBarsVisibility()
      _more_
      Returns:
      _more_
    • setSaturationAdiabatVisibility

      public void setSaturationAdiabatVisibility(boolean on) throws VisADException, RemoteException
      Sets the visibility of the background saturation adiabats.
      Parameters:
      on - Whether the background saturation adiabats should be visible.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • getSaturationAdiabatVisibility

      public boolean getSaturationAdiabatVisibility()
      Get the visibility of the background saturation adiabats.
      Returns:
      true if visible
    • setWindStaffVisibility

      public void setWindStaffVisibility(boolean on) throws VisADException, RemoteException
      Sets the visibility of the wind barb staff.
      Parameters:
      on - Whether the wind barb staff should be visible.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • getWindStaffVisibility

      public boolean getWindStaffVisibility()
      Get the visibility of the wind barb staff
      Returns:
      true if visible
    • setWindLevels

      public void setWindLevels(Gridded1DSet levels) throws VisADException, RemoteException
      Set the levels of the wind profile to display.
      Parameters:
      levels - the set of levels (if null, display all);
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • setSaturationMixingRatioVisibility

      public void setSaturationMixingRatioVisibility(boolean on) throws VisADException, RemoteException
      Sets the visibility of the background saturation adiabats.
      Parameters:
      on - Whether the background saturation adiabats should be visible.
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • getSaturationMixingRatioVisibility

      public boolean getSaturationMixingRatioVisibility()
      Get the visibility of the background saturation adiabats.
      Returns:
      true if visible
    • setBarbOrientation

      public void setBarbOrientation(int orient)
      Set the barb orientation.
      Parameters:
      orient - orientation.
    • getBarbOrientation

      public int getBarbOrientation()
      Get the barb orientation being used (NH or SH style).
      Returns:
      orientation ( FlowControl.NH_ORIENTATION or FlowControl.SH_ORIENTATION)
    • setBarbScale

      public void setBarbScale(int size)
      Set the barb scaling.
      Parameters:
      size - scaling of barbs (2 = default);
    • getBarbScale

      public int getBarbScale()
      Get the barb scaling
      Returns:
      scaling
    • getInstance

      public static AerologicalDisplay getInstance(String type) throws VisADException, RemoteException
      Create a new AerologicalDisplay of the given type
      Parameters:
      type - type of display (from AerologicalDisplayConstants
      Returns:
      a new AerologicalDisplay of the given type
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • getInstance

      public static AerologicalDisplay getInstance(String type, GraphicsConfiguration gc) throws VisADException, RemoteException
      Create a new AerologicalDisplay of the given type
      Parameters:
      type - type of display (from AerologicalDisplayConstants
      gc - GraphicsConfiguration
      Returns:
      a new AerologicalDisplay of the given type
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • getInstance

      Create a new AerologicalDisplay with the specified CoordinateSystem
      Parameters:
      acs - AerologcialCoordinateSystem
      gc - The GraphicsConfiguration for the display
      Returns:
      a new AerologicalDisplay with the specified CoordinateSystem
      Throws:
      VisADException - VisAD failure.
      RemoteException - Java RMI failure.
    • getActiveSounding

      public Sounding getActiveSounding()
      Get the active sounding.
      Returns:
      the active sounding
    • setForeground

      public void setForeground(Color color)
      Sets the "foreground" color of this VisAD display
      Overrides:
      setForeground in class DisplayMaster
      Parameters:
      color - color to use
    • setLabelColor

      public void setLabelColor(Color color)
      Set the label color
      Parameters:
      color - label color
    • setWindColor

      public void setWindColor(Color color)
      Set the wind flag color
      Parameters:
      color - the color
    • setBackgroundLineColor

      public void setBackgroundLineColor(Color color)
      Set the background line colors
      Parameters:
      color - the color