public final class GridRelativeHorizontalWind extends HorizontalWind
Modifier and Type | Field and Description |
---|---|
static boolean |
doNewCode
flag for whether there is new code
|
DEFAULT_SPEED_UNIT
Constructor and Description |
---|
GridRelativeHorizontalWind(visad.SampledSet grid)
Constructs from the underlying grid.
|
Modifier and Type | Method and Description |
---|---|
static visad.Field |
cartesianHorizontalWind(visad.Field rel)
Converts grid-relative winds to true (or absolute) winds.
|
static visad.FlatField |
cartesianHorizontalWind(visad.FlatField rel)
Converts grid-relative wind to true (or absolute) wind.
|
static visad.Field |
timeSeriesCartesianHorizontalWind(visad.Field rel)
Converts a time-series of grid-relative winds to a time-series of true
(or absolute) winds.
|
static visad.RealType |
xWindType(visad.SampledSet grid)
Returns the
RealType for the X component of a
grid-relative wind. |
static visad.RealType |
yWindType(visad.SampledSet grid)
Returns the
RealType for the Y component of a
grid-relative wind. |
earthVectorType
realTupleType, setRealTupleType
public GridRelativeHorizontalWind(visad.SampledSet grid) throws visad.VisADException
MathType
of the
grid-relative X and Y components will be xWindType(grid)
and
yWindType(grid)
, respectively.grid
- The underlying grid.visad.VisADException
- if a VisAD failure occurs.java.lang.IllegalArgumentException
- if grid.getDimension() < 2
.
or grid.getManifoldDimension() <
2
.java.lang.NullPointerException
- if the input grid is null
.xWindType(SampledSet)
,
yWindType(SampledSet)
public static visad.RealType xWindType(visad.SampledSet grid) throws visad.VisADException
RealType
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 be HorizontalWind.DEFAULT_SPEED_UNIT
.grid
- The grid.RealType
of the X wind
component.visad.VisADException
- if a VisAD failure occurs.public static visad.RealType yWindType(visad.SampledSet grid) throws visad.VisADException
RealType
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 be HorizontalWind.DEFAULT_SPEED_UNIT
.grid
- The grid.RealType
of the Y wind
component.visad.VisADException
- if a VisAD failure occurs.public static visad.Field cartesianHorizontalWind(visad.Field rel) throws visad.VisADException, java.rmi.RemoteException
WesterlyWind
and SoutherlyWind
, respectively. If the input
Field
is not a time-series, then it must be a FlatField
and it must be compatible with the argument of cartesianHorizontalWind(FlatField)
. If, however, the the
input Field
is a time-series, then its domain must be
a temporal Gridded1DSet
or a SingletonSet
and
its range values must be compatible with the argument of cartesianHorizontalWind(FlatField)
.rel
- The grid-relative winds.java.lang.NullPointerException
- if rel
is
null
.java.lang.IllegalArgumentException
- if the input field is not a time-series
and is incompatible with cartesianHorizontalWind(FlatField)
,
or if the input field is a
time-series but its range values
are incompatible with cartesianHorizontalWind(FlatField)
.visad.VisADException
- if a VisAD failure occurs.java.rmi.RemoteException
- if a Java RMI failure occurs.public static visad.Field timeSeriesCartesianHorizontalWind(visad.Field rel) throws visad.VisADException, java.rmi.RemoteException
WesterlyWind
and SoutherlyWind
, respectively.
The domain of the input Field
must be a temporal
Gridded1DSet
or a SingletonSet
.
The range values of the input Field
must be
FlatField
s. The domains of the range
FlatField
s must have a manifold dimension of two or
greater and they must have a
reference system which contains RealType.Latitude
and
RealType.Longitude
.
The number of components in the range of the FlatField
s
must be two.
Both components must have units convertible with HorizontalWind.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 the FlatField
s must be equal.
The Field
returned by this method has the same domain as
the input Field
.
The range values of the returned Field
are
FlatField
s that have the same domain as the input
FlatField
s.
The MathType
of the range of the returned
FlatField
s will be
CartesianHorizontalWind.getEarthVectorType()
.rel
- The time-series of grid-relative wind.java.lang.NullPointerException
- if rel
is
null
.java.lang.IllegalArgumentException
- if the input field doesn't have a
time-series domain,
or if the range values aren't FlatField
with the same domain,
or if the domain of the FlatField
s doesn't have a
transformation
to latitude and longitude,
or if the domain is irregular or has
too few points, or if the FlatField
s don't have two
and only two components in their range,
or if the default units of the FlatField
s range aren't equal.visad.VisADException
- if a VisAD failure occurs.java.rmi.RemoteException
- if a Java RMI failure occurs.CartesianHorizontalWind
public static visad.FlatField cartesianHorizontalWind(visad.FlatField rel) throws visad.VisADException, java.rmi.RemoteException
WesterlyWind
and SoutherlyWind
, respectively. The domain of the input
FlatField
must have a manifold dimension of two or
greater and it must have a
reference system which contains RealType.Latitude
and
RealType.Longitude
. The number
of components in the range of the input FlatField
must
be two. Both components must have units convertible with HorizontalWind.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 MathType
of the range of the returned FlatField
will be CartesianHorizontalWind.getEarthVectorType()
and
the domain will be the same as the input domain.rel
- The field of grid-relative wind.java.lang.NullPointerException
- if rel
is
null
.java.lang.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.visad.VisADException
- if a VisAD failure occurs.java.rmi.RemoteException
- if a Java RMI failure occurs.CartesianHorizontalWind