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 Field
Converts grid-relative winds to true (or absolute) winds.static FlatField
Converts grid-relative wind to true (or absolute) wind.static Field
Converts a time-series of grid-relative winds to a time-series of true (or absolute) winds.static RealType
xWindType
(SampledSet grid) Returns theRealType
for the X component of a grid-relative wind.static RealType
yWindType
(SampledSet grid) Returns theRealType
for the Y component of a grid-relative wind.Methods inherited from class ucar.visad.quantities.VectorQuantity
earthVectorType
Methods 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. TheMathType
of 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 theRealType
for 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
RealType
of the X wind component. - Throws:
VisADException
- if a VisAD failure occurs.
-
yWindType
Returns theRealType
for 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
RealType
of 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 areWesterlyWind
andSoutherlyWind
, respectively. If the inputField
is not a time-series, then it must be aFlatField
and it must be compatible with the argument ofcartesianHorizontalWind(FlatField)
. If, however, the the inputField
is a time-series, then its domain must be a temporalGridded1DSet
or aSingletonSet
and 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
- ifrel
isnull
.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 areWesterlyWind
andSoutherlyWind
, respectively. The domain of the inputField
must be a temporalGridded1DSet
or aSingletonSet
. The range values of the inputField
must beFlatField
s. The domains of the rangeFlatField
s must have a manifold dimension of two or greater and they must have a reference system which containsRealType.Latitude
andRealType.Longitude
. The number of components in the range of theFlatField
s 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 theFlatField
s must be equal. TheField
returned by this method has the same domain as the inputField
. The range values of the returnedField
areFlatField
s that have the same domain as the inputFlatField
s. TheMathType
of the range of the returnedFlatField
s 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
- ifrel
isnull
.IllegalArgumentException
- if the input field doesn't have a time-series domain, or if the range values aren'tFlatField
with the same domain, or if the domain of theFlatField
s doesn't have a transformation to latitude and longitude, or if the domain is irregular or has too few points, or if theFlatField
s don't have two and only two components in their range, or if the default units of theFlatField
s 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 areWesterlyWind
andSoutherlyWind
, respectively. The domain of the inputFlatField
must have a manifold dimension of two or greater and it must have a reference system which containsRealType.Latitude
andRealType.Longitude
. The number of components in the range of the inputFlatField
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. TheMathType
of the range of the returnedFlatField
will 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
- ifrel
isnull
.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:
-