ucar.unidata.view.sounding
Class BuoyancyProfileCell

java.lang.Object
  extended by ucar.unidata.view.sounding.ComputeCell
      extended by ucar.unidata.view.sounding.BuoyancyProfileCell

public final class BuoyancyProfileCell
extends ComputeCell

Computes a buoyancy profile from profiles of parcel and environmental densities. The buoyancy is defined as the massic volume (alias "specific volume" or "volume per mass") of the parcel minus the massic volume of the environment. Positive buoyancy corresponds to an upward force on the parcel.

This class is thread-compatible but not thread-safe: clients should synchronize concurrent access to instances of this class.

Version:
$Revision: 1.8 $ $Date: 2005/05/13 18:33:25 $
Author:
Steven R. Emmerson

Constructor Summary
BuoyancyProfileCell(DataReference envDenProRef, DataReference parDenProRef)
          Constructs from input and output data references.
 
Method Summary
protected  Data compute(Data[] datums)
          Computes the output buoyancy-profile.
 
Methods inherited from class ucar.unidata.view.sounding.ComputeCell
clean, disableRef, enableAllInputRefs, getInputRefs, getOutputRef, noDataField, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BuoyancyProfileCell

public BuoyancyProfileCell(DataReference envDenProRef,
                           DataReference parDenProRef)
                    throws VisADException,
                           RemoteException
Constructs from input and output data references.

Parameters:
envDenProRef - The input environmental density profile reference.
parDenProRef - The input parcel density profile reference.
Throws:
VisADException - if a VisAD failure occurs.
RemoteException - if a Java RMI failure occurs.
Method Detail

compute

protected Data compute(Data[] datums)
                throws TypeException,
                       VisADException,
                       RemoteException
Computes the output buoyancy-profile.

Specified by:
compute in class ComputeCell
Parameters:
datums - The input data. datums[0] is the environment's air density profile; datums[1] is the parcel's air density profile.
Returns:
The corresponding boyancy profile as the difference in massic volumes of the two input profiles.
Throws:
ClassCastException - if an input data reference has the wrong type of data object.
TypeException - if a VisAD data object has the wrong type.
VisADException - if a VisAD failure occurs.
RemoteException - if a Java RMI failure occurs.