ucar.unidata.view.sounding
Class CapeCalculator

java.lang.Object
  extended by ucar.unidata.view.sounding.CapeCalculator

public class CapeCalculator
extends Object

Provides support for calculating Convective Available Potential Energy (CAPE) and Convective Inhibition (CIN) values.

Version:
$Id: CapeCalculator.java,v 1.6 2005/05/13 18:33:25 jeffmc Exp $
Author:
Steven R. Emmerson

Field Summary
 String CAPE
          The name of the Convective Available Potential Energy (CAPE) property.
 String CIN
          The name of the Convective Inhibition (CIN) property.
 
Constructor Summary
CapeCalculator()
          Constructs from nothing.
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds a PropertyChangeListener.
 void addPropertyChangeListener(String name, PropertyChangeListener listener)
          Adds a PropertyChangeListener for a named property.
 Real getCAPE()
          Returns the value of the CAPE property.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes a PropertyChangeListener.
 void removePropertyChangeListener(String name, PropertyChangeListener listener)
          Removes a PropertyChangeListener for a named property.
 void setCape(Field temperatureProfile, Field dewPointProfile, Field wetTrajectory)
          Sets the CAPE property from profiles for temperature and dew-point and the trajectory of the saturated portion of a lifted parcel.
protected  void setCape(Real newCape)
          Sets the CAPE property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CAPE

public String CAPE
The name of the Convective Available Potential Energy (CAPE) property.


CIN

public String CIN
The name of the Convective Inhibition (CIN) property.

Constructor Detail

CapeCalculator

public CapeCalculator()
Constructs from nothing.

Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener. The listener will be added to both the CAPE and CIN listener-lists.

Parameters:
listener - The PropertyChangeListener to be added.

addPropertyChangeListener

public void addPropertyChangeListener(String name,
                                      PropertyChangeListener listener)
Adds a PropertyChangeListener for a named property.

Parameters:
name - The name of the property.
listener - The PropertyChangeListener to be added.

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a PropertyChangeListener. The listener will be removed from both the CAPE and CIN listener-lists.

Parameters:
listener - The PropertyChangeListener to be removed.

removePropertyChangeListener

public void removePropertyChangeListener(String name,
                                         PropertyChangeListener listener)
Removes a PropertyChangeListener for a named property.

Parameters:
name - The name of the property.
listener - The PropertyChangeListener to be removed.
Throws:
NullPointerException - if the name is null.

setCape

public void setCape(Field temperatureProfile,
                    Field dewPointProfile,
                    Field wetTrajectory)
             throws TypeException,
                    VisADException,
                    RemoteException
Sets the CAPE property from profiles for temperature and dew-point and the trajectory of the saturated portion of a lifted parcel.

Parameters:
temperatureProfile - The temperature profile.
dewPointProfile - The dew-point profile.
wetTrajectory - The trajectory of the saturated portion of the lifted parcel.
Throws:
TypeException - Somthing has the wrong type.
VisADException - VisAD failure.
RemoteException - Java RMI failure.

setCape

protected void setCape(Real newCape)
Sets the CAPE property.

Parameters:
newCape - The new value.

getCAPE

public Real getCAPE()
Returns the value of the CAPE property.

Returns:
The value of the CAPE property.