Package ucar.unidata.view.sounding
Class MeanWindCell
java.lang.Object
visad.ActionImpl
ucar.unidata.view.sounding.MeanWindCell
- All Implemented Interfaces:
Runnable
,EventListener
,Action
,ThingChangedListener
Provides support for the computation of the density-weighted, mean
horizontal wind.
- Version:
- $Id: MeanWindCell.java,v 1.14 2005/05/13 18:33:33 jeffmc Exp $
- Author:
- Steven R. Emmerson
-
Field Summary
FieldsFields inherited from class visad.ActionImpl
TRACE_STACK, TRACE_TIME
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs from nothing.MeanWindCell
(DataReference windProfileRef, DataReference densityProfileRef, DataReference meanWindRef) Constructs from DataReference-s to a wind profile, a density profile, and a mean wind.MeanWindCell
(Field windProfile, Field densityProfile) Constructs from a wind profile and a density profile. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a PropertyChangeListener.void
addPropertyChangeListener
(String name, PropertyChangeListener listener) Adds a PropertyChangeListener for a named property.void
doAction()
Compute a new mean-wind value.boolean
Indicates if this instance is identical to another object.Returns the data reference for the mean wind.static Tuple
Returns the missing mean-wind value.static TupleType
getType()
Returns the type of the mean wind.getWind()
Returns the mean wind.int
hashCode()
Returns the hash code of this instance.void
Removes a PropertyChangeListener.void
removePropertyChangeListener
(String name, PropertyChangeListener listener) Removes a PropertyChangeListener for a named property.void
setDensityProfile
(Field densityProfile) Sets the air-density profile.void
setWindProfile
(Field windProfile) Sets the wind profile.Methods inherited from class visad.ActionImpl
addReference, checkTicks, disableAction, enableAction, findReference, getCurrentActionThread, getLinks, getName, getTaskCount, printPool, queue, removeAllReferences, removeReference, run, setEnabled, setName, setThreadPoolMaximum, stop, stopThreadPool, thingChanged, waitForTasks
-
Field Details
-
MEAN_WIND
The name of the mean wind property.- See Also:
-
-
Constructor Details
-
MeanWindCell
Constructs from nothing.- Throws:
VisADException
- VisAD failure;RemoteException
- Java RMI failure.
-
MeanWindCell
Constructs from a wind profile and a density profile.- Parameters:
windProfile
- The wind profile.densityProfile
- The density profile.- Throws:
VisADException
- VisAD failure;RemoteException
- Java RMI failure.
-
MeanWindCell
public MeanWindCell(DataReference windProfileRef, DataReference densityProfileRef, DataReference meanWindRef) throws VisADException, RemoteException Constructs from DataReference-s to a wind profile, a density profile, and a mean wind.- Parameters:
windProfileRef
- The reference to the wind profile.densityProfileRef
- The reference to the density profile.meanWindRef
- The reference to the mean wind.- Throws:
VisADException
- VisAD failure;RemoteException
- Java RMI failure.
-
-
Method Details
-
getType
Returns the type of the mean wind.- Returns:
- The type of the mean wind.
-
getMissing
Returns the missing mean-wind value.- Returns:
- The missing mean-wind value.
-
doAction
Compute a new mean-wind value. This method will be invoked whenever the wind profile or density profile changes. This method will put the new value into the DataReference for the mean wind and will fire a PropertyChangeEvent for MEAN_WIND if the new value differs from the old.- Specified by:
doAction
in classActionImpl
- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
addPropertyChangeListener
Adds a PropertyChangeListener.- Parameters:
listener
- The PropertyChangeListener to be added.
-
addPropertyChangeListener
Adds a PropertyChangeListener for a named property.- Parameters:
name
- The name of the property.listener
- The PropertyChangeListener to be added.
-
removePropertyChangeListener
Removes a PropertyChangeListener.- Parameters:
listener
- The PropertyChangeListener to be removed.
-
removePropertyChangeListener
Removes a PropertyChangeListener for a named property.- Parameters:
name
- The name of the property.listener
- The PropertyChangeListener to be removed.
-
setWindProfile
Sets the wind profile.- Parameters:
windProfile
- The horizontal wind profile.- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
setDensityProfile
public void setDensityProfile(Field densityProfile) throws TypeException, VisADException, RemoteException Sets the air-density profile.- Parameters:
densityProfile
- The air-density profile.- Throws:
TypeException
- Argument has wrong VisAD MathType.VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getWind
Returns the mean wind.- Returns:
- The mean, horizontal wind.
- Throws:
VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-
getMeanWindRef
Returns the data reference for the mean wind.- Returns:
- The data reference for the mean wind.
-
equals
Indicates if this instance is identical to another object. -
hashCode
public int hashCode()Returns the hash code of this instance.
-