Package ucar.visad.quantities
Class GridRelativeHorizontalWind
java.lang.Object
ucar.visad.quantities.Quantity
ucar.visad.quantities.VectorQuantity
ucar.visad.quantities.Wind
ucar.visad.quantities.HorizontalWind
ucar.visad.quantities.GridRelativeHorizontalWind
The quantity of horizontal wind in vector coordinates that are relative to
an underlying grid. Note that, in general, the X component of the wind won't
be in an eastward direction.
- Version:
- $Revision: 1.14 $ $Date: 2006/12/05 19:04:33 $
- Author:
- Steven R. Emmerson
-
Field Summary
FieldsFields inherited from class ucar.visad.quantities.HorizontalWind
DEFAULT_SPEED_UNIT -
Constructor Summary
ConstructorsConstructorDescriptionConstructs from the underlying grid. -
Method Summary
Modifier and TypeMethodDescriptionstatic FieldConverts grid-relative winds to true (or absolute) winds.static FlatFieldConverts grid-relative wind to true (or absolute) wind.static FieldConverts a time-series of grid-relative winds to a time-series of true (or absolute) winds.static RealTypexWindType(SampledSet grid) Returns theRealTypefor the X component of a grid-relative wind.static RealTypeyWindType(SampledSet grid) Returns theRealTypefor the Y component of a grid-relative wind.Methods inherited from class ucar.visad.quantities.VectorQuantity
earthVectorTypeMethods inherited from class ucar.visad.quantities.Quantity
realTupleType, setRealTupleType
-
Field Details
-
doNewCode
public static boolean doNewCodeflag for whether there is new code
-
-
Constructor Details
-
GridRelativeHorizontalWind
Constructs from the underlying grid. The grid-relative X and Y components are assumed to be in the direction of increasing first and second dimensions, respectively. TheMathTypeof the grid-relative X and Y components will bexWindType(grid)andyWindType(grid), respectively.- Parameters:
grid- The underlying grid.- Throws:
VisADException- if a VisAD failure occurs.IllegalArgumentException- ifgrid.getDimension() invalid input: '<' 2. orgrid.getManifoldDimension() invalid input: '<' 2.NullPointerException- if the input grid isnull.- See Also:
-
-
Method Details
-
xWindType
Returns theRealTypefor the X component of a grid-relative wind. The X component is in the direction of increasing first dimension of the grid. The name of the component will be X_Wind_Component, where X is the name of the first dimension of the grid, and the default unit will beHorizontalWind.DEFAULT_SPEED_UNIT.- Parameters:
grid- The grid.- Returns:
- The
RealTypeof the X wind component. - Throws:
VisADException- if a VisAD failure occurs.
-
yWindType
Returns theRealTypefor the Y component of a grid-relative wind. The Y component is in the direction of increasing second dimension of the grid. The name of the component will be Y_Wind_Component, where Y is the name of the second dimension of the grid, and the default unit will beHorizontalWind.DEFAULT_SPEED_UNIT.- Parameters:
grid- The grid.- Returns:
- The
RealTypeof the Y wind component. - Throws:
VisADException- if a VisAD failure occurs.
-
cartesianHorizontalWind
Converts grid-relative winds to true (or absolute) winds. The U and V components of true wind areWesterlyWindandSoutherlyWind, respectively. If the inputFieldis not a time-series, then it must be aFlatFieldand it must be compatible with the argument ofcartesianHorizontalWind(FlatField). If, however, the the inputFieldis a time-series, then its domain must be a temporalGridded1DSetor aSingletonSetand its range values must be compatible with the argument ofcartesianHorizontalWind(FlatField).- Parameters:
rel- The grid-relative winds.- Returns:
- The time-series of true wind corresponding to the input.
- Throws:
NullPointerException- ifrelisnull.IllegalArgumentException- if the input field is not a time-series and is incompatible withcartesianHorizontalWind(FlatField), or if the input field is a time-series but its range values are incompatible withcartesianHorizontalWind(FlatField).VisADException- if a VisAD failure occurs.RemoteException- if a Java RMI failure occurs.
-
timeSeriesCartesianHorizontalWind
public static Field timeSeriesCartesianHorizontalWind(Field rel) throws VisADException, RemoteException Converts a time-series of grid-relative winds to a time-series of true (or absolute) winds. The U and V components of true wind areWesterlyWindandSoutherlyWind, respectively. The domain of the inputFieldmust be a temporalGridded1DSetor aSingletonSet. The range values of the inputFieldmust beFlatFields. The domains of the rangeFlatFields must have a manifold dimension of two or greater and they must have a reference system which containsRealType.LatitudeandRealType.Longitude. The number of components in the range of theFlatFields must be two. Both components must have units convertible withHorizontalWind.DEFAULT_SPEED_UNIT. The first and second components are assumed to be the wind components in the direction of increasing first and second manifold dimension indexes, respectively. The domains of theFlatFields must be equal. TheFieldreturned by this method has the same domain as the inputField. The range values of the returnedFieldareFlatFields that have the same domain as the inputFlatFields. TheMathTypeof the range of the returnedFlatFields will beCartesianHorizontalWind.getEarthVectorType().- Parameters:
rel- The time-series of grid-relative wind.- Returns:
- The time-series of true wind corresponding to the input.
- Throws:
NullPointerException- ifrelisnull.IllegalArgumentException- if the input field doesn't have a time-series domain, or if the range values aren'tFlatFieldwith the same domain, or if the domain of theFlatFields doesn't have a transformation to latitude and longitude, or if the domain is irregular or has too few points, or if theFlatFields don't have two and only two components in their range, or if the default units of theFlatFields range aren't equal.VisADException- if a VisAD failure occurs.RemoteException- if a Java RMI failure occurs.- See Also:
-
cartesianHorizontalWind
public static FlatField cartesianHorizontalWind(FlatField rel) throws VisADException, RemoteException Converts grid-relative wind to true (or absolute) wind. The U and V components of true wind areWesterlyWindandSoutherlyWind, respectively. The domain of the inputFlatFieldmust have a manifold dimension of two or greater and it must have a reference system which containsRealType.LatitudeandRealType.Longitude. The number of components in the range of the inputFlatFieldmust be two. Both components must have units convertible withHorizontalWind.DEFAULT_SPEED_UNIT. The first and second components are assumed to be the wind components in the direction of increasing first and second manifold dimension indexes, respectively. TheMathTypeof the range of the returnedFlatFieldwill beCartesianHorizontalWind.getEarthVectorType()and the domain will be the same as the input domain.- Parameters:
rel- The field of grid-relative wind.- Returns:
- The field of true wind corresponding to the input field.
- Throws:
NullPointerException- ifrelisnull.IllegalArgumentException- if the input field doesn't have two and only two components in its range, or if the default units of the input range aren't equal, or if the domain of the input field doesn't have a transformation to latitude and longitude, or the grid is irregular or has too few points.VisADException- if a VisAD failure occurs.RemoteException- if a Java RMI failure occurs.- See Also:
-