ucar.unidata.view.sounding
Class WindProfile

java.lang.Object
  extended by ucar.visad.display.Displayable
      extended by ucar.visad.display.CompositeDisplayable
          extended by ucar.unidata.view.sounding.WindProfile
Direct Known Subclasses:
WindBarbProfile, WindStaff, WindTrace

public abstract class WindProfile
extends CompositeDisplayable

Provides support for the display of a vertical profile of the horizontal wind.

Version:
$Id: WindProfile.java,v 1.27 2006/11/13 16:23:51 dmurray Exp $
Author:
Steven R. Emmerson

Field Summary
static String DIRECTION
          The name of the wind direction property.
static String GEOPOTENTIAL_ALTITUDE
          The name of the geopotential altitude property.
static String GEOPOTENTIAL_ALTITUDE_EXTENT
          The name of the geopotential altitude extent property.
static String MAXIMUM_SPEED
          The name of the maximum wind speed property.
static String PRESSURE
          The name of the geopotential altitude property.
static String SPEED
          The name of the wind speed property.
static String WIND_PROFILE
          The name of the wind profile property.
 
Fields inherited from class ucar.visad.display.CompositeDisplayable
cnt, label
 
Fields inherited from class ucar.visad.display.Displayable
DISPLAY, parent, SCALAR_MAP_SET
 
Constructor Summary
protected WindProfile()
          Constructs from nothing.
protected WindProfile(WindProfile that)
          Constructs from another instance.
 
Method Summary
protected static FlatField ensureCartesian(FlatField input)
          Ensures a wind profile in cartesian coordinates.
 boolean equals(Object obj)
          Indicates if this instance is identical to another object.
 Real getDirection()
          Returns the wind direction property.
 Real getGeopotentialAltitude()
          Returns the geopotential altitude property.
 RealTuple getGeopotentialAltitudeExtent()
          Returns the geopotential altitude extent property.
static RealType getGeopotentialAltitudeRealType()
          Returns the type of the geopotential altitude.
 Real getMaximumSpeed()
          Returns the maximum wind speed property.
protected  FlatField getMissingWindField()
          Returns an instance of a wind field with no values.
 Real getPressure()
          Returns the pressure property.
protected abstract  Field getProfile()
          Returns the vertical profile of the horizontal wind.
static RealType getSoutherlyWindRealType()
          Returns the type of the southerly wind.
 Real getSpeed()
          Returns the wind speed property.
static RealType getWesterlyWindRealType()
          Returns the type of the westerly wind.
 int hashCode()
          Returns the hash code of this instance.
protected  void profileChange(Field oldProfile)
          Handles a change to the vertical profile of the horizontal wind due to either explicit setting or direct manipulation by a VisAD DataRenderer.
protected  void setAltitudeExtent()
          Sets the vertical extent of the wind profile.
protected  void setDirection(Real dir)
          Set the direction value
 void setGeopotentialAltitude(Real geopotentialAltitude)
          Sets the geopotential altitude property.
protected  void setMaximumSpeed()
          Sets the maximum wind speed of the wind profile.
abstract  void setOriginalProfile()
          Resets the vertical profile of the horizontal wind to the profile of the last setProfile().
 void setPressure(Real pressure)
          Sets the pressure property.
abstract  void setProfile(Field profile)
          Sets the vertical profile of the horizontal wind.
protected  void setSpeed(Real spd)
          Set the speed property
protected  void setSpeedAndDirection()
          Sets the wind speed and direction properties.
abstract  void setWindLevels(Gridded1DSet levels)
          Set the levels of the wind profile to display.
 
Methods inherited from class ucar.visad.display.CompositeDisplayable
addConstantMap, addDisplayable, addListDataListener, clearDisplayables, cloneForDisplay, debug, destroy, destroyAll, displayableCount, fireListDataContentsChanged, fireListDataIntervalAdded, fireListDataIntervalRemoved, getAnimationSet, getDisplayable, indexOf, iterator, lastDisplayable, myAddDataReferences, myRemoveDataReferences, removeDisplayable, removeDisplayable, removeListDataListener, setAdjustFlow, setColor, setColorPalette, setColorUnit, setConstantPosition, setDisplay, setDisplayable, setDisplayMaster, setDisplayUnit, setLineWidth, setManipulable, setPointMode, setPointSize, setSelectedRange, setUseFastRendering, setUseTimesInAnimation, setVisible, setVisible, setVisible, toFront, toString
 
Methods inherited from class ucar.visad.display.Displayable
addConstantMaps, addDataReferences, addPropertyChangeListener, addPropertyChangeListener, addRefsInvoked, addScalarMap, addScalarMaps, applyColorUnit, applyDisplayUnit, checkUnit, combineConstantMaps, destroyDisplayable, firePropertyChange, firePropertyChange, fireScalarMapSetChange, getColorUnit, getConstantMaps, getData, getDestroyed, getDisplay, getDisplayMaster, getDisplayUnit, getPointMode, getScalarMap, getScalarMap, getScalarMap, getScalarMapSet, getUseFastRendering, getUseTimesInAnimation, getVisible, hasDataObject, isActive, isUnitCompatible, isVisible, logException, myAddConstantMaps, removeConstantMap, removeDataReferences, removePropertyChangeListener, removePropertyChangeListener, removeScalarMap, replaceScalarMap, setColorPalette, setContourInfo, setDisplayActive, setDisplayInactive, setOverrideAnimationSet, setOverrideAnimationSet, setParent, setRangeForColor, setRangeForColor, setScalarMapSet, setSelectedRange
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

WIND_PROFILE

public static String WIND_PROFILE
The name of the wind profile property.


GEOPOTENTIAL_ALTITUDE

public static String GEOPOTENTIAL_ALTITUDE
The name of the geopotential altitude property.


PRESSURE

public static String PRESSURE
The name of the geopotential altitude property.


SPEED

public static String SPEED
The name of the wind speed property.


DIRECTION

public static String DIRECTION
The name of the wind direction property.


GEOPOTENTIAL_ALTITUDE_EXTENT

public static String GEOPOTENTIAL_ALTITUDE_EXTENT
The name of the geopotential altitude extent property.


MAXIMUM_SPEED

public static String MAXIMUM_SPEED
The name of the maximum wind speed property.

Constructor Detail

WindProfile

protected WindProfile()
               throws VisADException,
                      RemoteException
Constructs from nothing.

Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

WindProfile

protected WindProfile(WindProfile that)
               throws RemoteException,
                      VisADException
Constructs from another instance.

Parameters:
that - The other instance.
Throws:
VisADException - if a core VisAD failure occurs.
RemoteException - if a Java RMI failure occurs.
Method Detail

getMissingWindField

protected FlatField getMissingWindField()
Returns an instance of a wind field with no values.

Returns:
A wind field with no values.

setProfile

public abstract void setProfile(Field profile)
                         throws VisADException,
                                RemoteException
Sets the vertical profile of the horizontal wind.

Parameters:
profile - The vertical profile of the horizontal wind.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setOriginalProfile

public abstract void setOriginalProfile()
                                 throws VisADException,
                                        RemoteException
Resets the vertical profile of the horizontal wind to the profile of the last setProfile().

Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

getProfile

protected abstract Field getProfile()
                             throws VisADException,
                                    RemoteException
Returns the vertical profile of the horizontal wind.

Returns:
The vertical profile of the horizontal wind.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

profileChange

protected void profileChange(Field oldProfile)
                      throws VisADException,
                             RemoteException
Handles a change to the vertical profile of the horizontal wind due to either explicit setting or direct manipulation by a VisAD DataRenderer.

Parameters:
oldProfile - The old profile. May be null.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setAltitudeExtent

protected void setAltitudeExtent()
                          throws VisADException,
                                 RemoteException
Sets the vertical extent of the wind profile.

Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setMaximumSpeed

protected void setMaximumSpeed()
                        throws RemoteException,
                               VisADException
Sets the maximum wind speed of the wind profile.

Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

getMaximumSpeed

public Real getMaximumSpeed()
Returns the maximum wind speed property.

Returns:
The maximum wind speed property.

getGeopotentialAltitudeExtent

public RealTuple getGeopotentialAltitudeExtent()
Returns the geopotential altitude extent property.

Returns:
The geopotential altitude extent property.

setGeopotentialAltitude

public void setGeopotentialAltitude(Real geopotentialAltitude)
                             throws RemoteException,
                                    VisADException
Sets the geopotential altitude property.

Parameters:
geopotentialAltitude - The new value.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

getGeopotentialAltitude

public Real getGeopotentialAltitude()
Returns the geopotential altitude property.

Returns:
The geopotential altitude property.

setPressure

public void setPressure(Real pressure)
                 throws RemoteException,
                        VisADException
Sets the pressure property.

Parameters:
pressure - The new value.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

getPressure

public Real getPressure()
Returns the pressure property.

Returns:
The pressure property.

setSpeedAndDirection

protected void setSpeedAndDirection()
                             throws RemoteException,
                                    VisADException
Sets the wind speed and direction properties.

Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.

getSpeed

public Real getSpeed()
Returns the wind speed property.

Returns:
The wind speed property.

getDirection

public Real getDirection()
Returns the wind direction property.

Returns:
The wind direction property.

getGeopotentialAltitudeRealType

public static RealType getGeopotentialAltitudeRealType()
                                                throws VisADException
Returns the type of the geopotential altitude.

Returns:
The type of the geopotential altitude.
Throws:
VisADException - VisAD failure.

getWesterlyWindRealType

public static RealType getWesterlyWindRealType()
                                        throws VisADException
Returns the type of the westerly wind.

Returns:
The type of the westerly wind.
Throws:
VisADException - VisAD failure.

getSoutherlyWindRealType

public static RealType getSoutherlyWindRealType()
                                         throws VisADException
Returns the type of the southerly wind.

Returns:
The type of the southerly wind.
Throws:
VisADException - VisAD failure.

equals

public boolean equals(Object obj)
Indicates if this instance is identical to another object.

Overrides:
equals in class Object
Parameters:
obj - The other object.
Returns:
true if and only if this instance is identical to the other object.

hashCode

public int hashCode()
Returns the hash code of this instance.

Overrides:
hashCode in class Object
Returns:
The hash code of this instance.

ensureCartesian

protected static FlatField ensureCartesian(FlatField input)
                                    throws VisADException,
                                           RemoteException
Ensures a wind profile in cartesian coordinates.

Parameters:
input - Wind profile in cartesian or polar coordinates.
Returns:
Wind profile in cartesian coordinates.
Throws:
VisADException - if a core VisAD failure occurs.
RemoteException - if a Java RMI failure occurs.

setWindLevels

public abstract 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 - if a core VisAD failure occurs.
RemoteException - if a Java RMI failure occurs.

setSpeed

protected void setSpeed(Real spd)
Set the speed property

Parameters:
spd - speed value

setDirection

protected void setDirection(Real dir)
Set the direction value

Parameters:
dir - direction value