ucar.unidata.data.grid
Class DerivedGridFactory

java.lang.Object
  extended by ucar.unidata.data.grid.DerivedGridFactory

public class DerivedGridFactory
extends Object

DerivedGridFactory has static methods for creating various derived quantities from grids. A grid is defined as a FieldImpl which has one of the following MathTypes structures:

   (x,y) -> (parm)
   (x,y) -> (parm1, ..., parmN)
   (x,y,z) -> (parm)
   (x,y,z) -> (parm1, ..., parmN)
   (t -> (x,y) -> (parm))
   (t -> (x,y) -> (parm1, ..., parmN))
   (t -> (x,y,z) -> (parm))
   (t -> (x,y,z) -> (parm1, ..., parmN))
   (t -> (index -> (x,y) -> (parm)))
   (t -> (index -> (x,y) -> (parm1, ..., parmN)))
   (t -> (index -> (x,y,z) -> (parm)))
   (t -> (index -> (x,y,z) -> (parm1, ..., parmN)))
 
In general, t is a time variable, but it might also be just an index.

Version:
$Revision: 1.73 $
Author:
Don Murray

Field Summary
static Real EARTH_RADIUS
          EARTH RADIUS
static Real EARTH_TWO_OMEGA
          EARTH 2 omega
static Real GRAVITY
          gravity
static Real NEGATIVE_ONE
          negative one
 
Constructor Summary
DerivedGridFactory()
          Default ctor; does nothing
 
Method Summary
static FieldImpl combineGrids(FieldImpl[] grids)
          Combine an array of grids into one.
static FieldImpl combineGrids(FieldImpl[] grids, boolean flatten)
          Combine an array of grids into one.
static FieldImpl combineGrids(FieldImpl[] grids, int samplingMode, int errorMode, boolean flatten)
          Combine an array of grids into one.
static FieldImpl combineGrids(FieldImpl grid1, FieldImpl grid2)
          Combine two Fields into one.
static FieldImpl combineGrids(FieldImpl grid1, FieldImpl grid2, boolean flatten)
          Combine two Fields into one.
static FieldImpl combineGrids(FieldImpl grid1, FieldImpl grid2, FieldImpl grid3)
          Combine three Fields into one.
static FieldImpl combineGrids(FieldImpl grid1, FieldImpl grid2, int samplingMode, int errorMode, boolean flatten)
          Combine two Fields into one.
static FieldImpl create2DTopography(FieldImpl paramGrid, FieldImpl topoGrid)
          Make a FieldImpl of some parameter and topography.
static FieldImpl createAbsoluteVorticity(FieldImpl uFI, FieldImpl vFI)
          Computes absolute vorticity from grid-relative wind components.
static FieldImpl createCoriolisGrid(FieldImpl input)
          Every geo-located data grid can be used to make a grid with the coriolis parameter for the grid values as well
static FieldImpl createDewpoint(FieldImpl temperFI, FieldImpl rhFI)
          Make the FieldImpl of dewpoint temperature scalar values; possibly for sequence of times
static FieldImpl createEquivalentPotentialTemperature(FieldImpl temperFI, FieldImpl rhFI)
          Make a FieldImpl of Equivalent Potential Temperature; usually in 3d grids in a time series (at one or more times).
static FieldImpl createFlowVectors(FieldImpl uGrid, FieldImpl vGrid)
          Make a FieldImpl of wind vectors from u and v components.
static FieldImpl createFlowVectors(FieldImpl uGrid, FieldImpl vGrid, FieldImpl wGrid)
          Make a FieldImpl of flow vectors from u, v and w components.
static FieldImpl createGeostrophicWindVector(FieldImpl paramFI)
          Make a FieldImpl of geostrophic wind.
static FieldImpl createHorizontalAdvection(FieldImpl paramGrid, FieldImpl uGrid, FieldImpl vGrid)
          Make a FieldImpl of horizontal scalar advection from u and v components, defined as u*(dp/dx) + v*(dp/dy)
static FieldImpl createHorizontalDivergence(FieldImpl uGrid, FieldImpl vGrid)
          Make a FieldImpl of horizontal wind divergence from u and v components.
static FieldImpl createHorizontalFluxDivergence(FieldImpl paramGrid, FieldImpl uGrid, FieldImpl vGrid)
          Make a FieldImpl of horizontal scalar flux divergence defined as u*(dp/dx) + v*(dp/dy) + p*(du/dx + dv/dy) [because the Advection() routine, returns negative the formulation is (div - adv)]
static FieldImpl createIPV(FieldImpl temperFI, FieldImpl absvor)
          Make a FieldImpl of isentropic potential vorticity
static FieldImpl createIPV(FieldImpl temperFI, FieldImpl pressFI, FieldImpl absvor)
          Make a grid of isentropic potential vorticity
static FieldImpl createLatitudeGrid(FieldImpl fi)
          Every geo-located data grid can be used to make a grid with latitude with the grid values as well
static FieldImpl createLayerAverage(FieldImpl grid, double value1, double value2)
          Make the average of 2 levels of a grid
static FieldImpl createLayerAverage(FieldImpl grid, String value1, String value2)
          Make the average of 2 levels of a grid
static FieldImpl createLayerDifference(FieldImpl grid, double value1, double value2)
          Make the difference of one grid's values at the given levels; first level subtract second level values.
static FieldImpl createLayerDifference(FieldImpl grid, String value1, String value2)
          Make the difference of one grid's values at the given levels; first level subtract second level values.
static FieldImpl createMixingRatio(FieldImpl temperFI, FieldImpl rhFI)
          Make a FieldImpl of mixing ratio values for series of times in general mr = (saturation mixing ratio) * (RH/100%);
static FieldImpl createPotentialTemperature(FieldImpl temperFI)
          Make a FieldImpl of potential temperature values for series of times of temperature grids.
static FieldImpl createPotentialTemperature(FieldImpl temperFI, FieldImpl pressFI)
          Make a FieldImpl of potential temperature values for series of times in general theta = t * (1000/p)** .286
static FlatField createPressureGridFromDomain(FlatField ff)
          Every data grid with pressure as the z coord can be used to make a grid with pressure with the grid values as well
static FieldImpl createRelativeVorticity(FieldImpl uFI, FieldImpl vFI)
          Computes relative vorticity from grid-relative wind components.
static FieldImpl createThickness(FieldImpl grid)
          Create a 1000-500 mb thickness grid
static FieldImpl createTrueFlowVector(FieldImpl uvGrid)
          Make a grid of true flow vectors from grid relative u and v components.
static FieldImpl createTrueFlowVectors(FieldImpl uGrid, FieldImpl vGrid)
          Make a grid of true flow vectors from grid relative u and v components.
static FieldImpl createTrueWindVectors(FieldImpl uGrid, FieldImpl vGrid)
          Make a grid of true wind vectors from grid relative u and v components.
static FieldImpl createVectorDirection(FieldImpl vector)
          Make a FieldImpl the magnitude of the vector components
static FieldImpl createVectorDirection(FieldImpl uFI, FieldImpl vFI)
          Make a FieldImpl the direction of the vector components
static FieldImpl createVectorMagnitude(FieldImpl vector)
          Make a FieldImpl the magnitude of the vector components
static FieldImpl createVectorMagnitude(FieldImpl uFI, FieldImpl vFI)
          Make a FieldImpl the magnitude of the vector components
static FieldImpl createVectorMagnitude(FieldImpl uFI, FieldImpl vFI, String name)
          Make a FieldImpl the magnitude of the vector components
static FieldImpl createWindSpeed(FieldImpl uFI, FieldImpl vFI)
          Make a FieldImpl of wind speed scalar values from u and v components.
static FieldImpl createWindVectors(FieldImpl uGrid, FieldImpl vGrid)
          Deprecated. use #createFlowVectors(uGrid, vGrid)
static FieldImpl ddx(FieldImpl grid)
          Take the partial derivative with respect to X of the given field.
static FieldImpl ddy(FieldImpl grid)
          Take the partial derivative with respect to Y of the given field.
static FieldImpl getComponent(FieldImpl vector, int index, boolean copy)
          Get nth component of a vector
static FieldImpl getLatitudeGrid(FieldImpl fi)
          Deprecated. use createLatitudeGrid(FieldImpl)
static FieldImpl getUComponent(FieldImpl vector)
          Get U component of a vector
static FieldImpl getUComponent(FieldImpl vector, boolean copy)
          Get U component of a vector
static FieldImpl getVComponent(FieldImpl vector)
          Get V component of a vector
static FieldImpl getVComponent(FieldImpl vector, boolean copy)
          Get V component of a vector
static boolean isScalar(FieldImpl grid)
          Is this a vector?
static boolean isVector(FieldImpl grid)
          Is this a vector?
static FieldImpl partial(FieldImpl grid, int domainIndex)
          Take the partial derivative with respect variable at the domain index.
static FieldImpl relativeVorticityFromTrueWind(FieldImpl uFI, FieldImpl vFI)
          Computes relative vorticity from U and V.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EARTH_RADIUS

public static final Real EARTH_RADIUS
EARTH RADIUS


EARTH_TWO_OMEGA

public static final Real EARTH_TWO_OMEGA
EARTH 2 omega


GRAVITY

public static final Real GRAVITY
gravity


NEGATIVE_ONE

public static final Real NEGATIVE_ONE
negative one

Constructor Detail

DerivedGridFactory

public DerivedGridFactory()
Default ctor; does nothing

Method Detail

createThickness

public static FieldImpl createThickness(FieldImpl grid)
                                 throws VisADException,
                                        RemoteException
Create a 1000-500 mb thickness grid

Parameters:
grid - grid (hopefully a height grid)
Returns:
thickness field.
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error
See Also:
createLayerDifference(FieldImpl, String, String)

createLayerDifference

public static FieldImpl createLayerDifference(FieldImpl grid,
                                              String value1,
                                              String value2)
                                       throws VisADException,
                                              RemoteException
Make the difference of one grid's values at the given levels; first level subtract second level values.

Parameters:
grid - grid of data
value1 - level the first as a String
value2 - level the second as a String
Returns:
computed layer difference
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

createLayerDifference

public static FieldImpl createLayerDifference(FieldImpl grid,
                                              double value1,
                                              double value2)
                                       throws VisADException,
                                              RemoteException
Make the difference of one grid's values at the given levels; first level subtract second level values.

Parameters:
grid - grid of data
value1 - level of first
value2 - level of second
Returns:
computed layer difference
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

createLayerAverage

public static FieldImpl createLayerAverage(FieldImpl grid,
                                           String value1,
                                           String value2)
                                    throws VisADException,
                                           RemoteException
Make the average of 2 levels of a grid

Parameters:
grid - grid of data
value1 - level the first as a String
value2 - level the second as a String
Returns:
computed layer difference
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

createLayerAverage

public static FieldImpl createLayerAverage(FieldImpl grid,
                                           double value1,
                                           double value2)
                                    throws VisADException,
                                           RemoteException
Make the average of 2 levels of a grid

Parameters:
grid - grid of data
value1 - level of first
value2 - level of second
Returns:
computed layer difference
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

createRelativeVorticity

public static FieldImpl createRelativeVorticity(FieldImpl uFI,
                                                FieldImpl vFI)
                                         throws VisADException,
                                                RemoteException
Computes relative vorticity from grid-relative wind components. The first and second components of the range of the input FieldImpl are assumed to be the velocity of the wind in the direction of increasing first and second dimension of the domain, respectively.

Parameters:
uFI - grid or time sequence of grids of positive-X wind comp.
vFI - grid or time sequence of grids of positive-Y wind comp.
Returns:
computed relative vorticity.
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error
See Also:
"Meteorology for Scientists and Engineers, p. 233"

relativeVorticityFromTrueWind

public static FieldImpl relativeVorticityFromTrueWind(FieldImpl uFI,
                                                      FieldImpl vFI)
                                               throws VisADException,
                                                      RemoteException
Computes relative vorticity from U and V. The grid is not assumed to be aligned with north and south. Partial derivatives of the wind components are taken with respect to the latitude and longitude dimensions of the reference of the CoordinateSystem of the input spatial domains.

Parameters:
uFI - grid or time sequence of grids of the eastward wind comp.
vFI - grid or time sequence of grids of the northward wind comp.
Returns:
computed relative vorticity.
Throws:
IllegalArgumentException - if the input spatial domain(s) don't have a CoordinateSystem whose reference contains RealType.Latitude and RealType.Longitude.
RemoteException - Java RMI error
VisADException - VisAD Error
See Also:
"Meteorology for Scientists and Engineers, p. 233"

createAbsoluteVorticity

public static FieldImpl createAbsoluteVorticity(FieldImpl uFI,
                                                FieldImpl vFI)
                                         throws VisADException,
                                                RemoteException
Computes absolute vorticity from grid-relative wind components. Absolute vorticity is relative vorticity plus the Coriolus parameter. The first and second components of the range of the input FieldImpl are assumed to be the velocity of the wind in the direction of increasing first and second dimension of the domain, respectively.

Parameters:
uFI - grid or time sequence of grids of positive-X wind comp.
vFI - grid or time sequence of grids of positive-Y wind comp.
Returns:
computed absolute vorticity.
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error
See Also:
"Meteorology for Scientists and Engineers, p. 234"

createTrueWindVectors

public static FieldImpl createTrueWindVectors(FieldImpl uGrid,
                                              FieldImpl vGrid)
                                       throws VisADException,
                                              RemoteException
Make a grid of true wind vectors from grid relative u and v components.

Parameters:
uGrid - grid of U wind component
vGrid - grid of V wind component
Returns:
true wind components
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

createTrueFlowVectors

public static FieldImpl createTrueFlowVectors(FieldImpl uGrid,
                                              FieldImpl vGrid)
                                       throws VisADException,
                                              RemoteException
Make a grid of true flow vectors from grid relative u and v components.

Parameters:
uGrid - grid of U wind component
vGrid - grid of V wind component
Returns:
true flow components
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

createTrueFlowVector

public static FieldImpl createTrueFlowVector(FieldImpl uvGrid)
                                      throws VisADException,
                                             RemoteException
Make a grid of true flow vectors from grid relative u and v components.

Parameters:
uvGrid - vector of uv grids
Returns:
true flow components
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

createWindVectors

public static FieldImpl createWindVectors(FieldImpl uGrid,
                                          FieldImpl vGrid)
                                   throws VisADException,
                                          RemoteException
Deprecated. use #createFlowVectors(uGrid, vGrid)

Make a FieldImpl of wind vectors from u and v components.

Parameters:
uGrid - grid of U wind component
vGrid - grid of V wind component
Returns:
combine two separate fields (u and v) into one grid (u,v)
Throws:
VisADException - VisAD problem
RemoteException - remote problem

createGeostrophicWindVector

public static FieldImpl createGeostrophicWindVector(FieldImpl paramFI)
                                             throws VisADException,
                                                    RemoteException
Make a FieldImpl of geostrophic wind.

Parameters:
paramFI - parameter to use (height)
Returns:
vector of geopotential height
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

create2DTopography

public static FieldImpl create2DTopography(FieldImpl paramGrid,
                                           FieldImpl topoGrid)
                                    throws VisADException,
                                           RemoteException
Make a FieldImpl of some parameter and topography. We add a little bit to the topography grid so it will raise it up just a tad

Parameters:
paramGrid - parameter grid
topoGrid - grid of topography. Must have units convertible with meter or geopotential meter.
Returns:
combined grids
Throws:
VisADException - VisAD problem
RemoteException - remote problem

createFlowVectors

public static FieldImpl createFlowVectors(FieldImpl uGrid,
                                          FieldImpl vGrid)
                                   throws VisADException,
                                          RemoteException
Make a FieldImpl of wind vectors from u and v components.

Parameters:
uGrid - grid of U flow component
vGrid - grid of V flow component
Returns:
combine two separate fields (u and v) into one grid (u,v)
Throws:
VisADException - VisAD problem
RemoteException - remote problem

createFlowVectors

public static FieldImpl createFlowVectors(FieldImpl uGrid,
                                          FieldImpl vGrid,
                                          FieldImpl wGrid)
                                   throws VisADException,
                                          RemoteException
Make a FieldImpl of flow vectors from u, v and w components.

Parameters:
uGrid - grid of U flow component
vGrid - grid of V flow component
wGrid - grid of W flow component
Returns:
combine three separate fields (u, v and w) into one grid (u,v,w)
Throws:
VisADException - VisAD problem
RemoteException - remote problem

combineGrids

public static FieldImpl combineGrids(FieldImpl[] grids)
                              throws VisADException,
                                     RemoteException
Combine an array of grids into one. If the grids are on different time domains, they are resampled to the domain of the first.

Parameters:
grids - array of grids (must have at least 2)
Returns:
combined grid.
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

combineGrids

public static FieldImpl combineGrids(FieldImpl[] grids,
                                     boolean flatten)
                              throws VisADException,
                                     RemoteException
Combine an array of grids into one. If the grids are on different time domains, they are resampled to the domain of the first. Flatten

Parameters:
grids - array of grids (must have at least 2)
flatten - flatten the structure
Returns:
combined grid.
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

combineGrids

public static FieldImpl combineGrids(FieldImpl[] grids,
                                     int samplingMode,
                                     int errorMode,
                                     boolean flatten)
                              throws VisADException,
                                     RemoteException
Combine an array of grids into one. If the grids are on different time domains, they are resampled to the domain of the first.

Parameters:
grids - array of grids (must have at least 2)
samplingMode - sampling mode (e.g. WEIGHTED_AVERAGE, NEAREST_NEIGHBOR)
errorMode - sampling error mode (e.g. NO_ERRORS)
flatten - false to keep tuple integrity.
Returns:
combined grid.
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

combineGrids

public static FieldImpl combineGrids(FieldImpl grid1,
                                     FieldImpl grid2,
                                     FieldImpl grid3)
                              throws VisADException,
                                     RemoteException
Combine three Fields into one. If the grids are on different time domains, the second is resampled to the domain of the first.

Parameters:
grid1 - first grid. This will be used for the time/space domain
grid2 - second grid.
grid3 - third grid.
Returns:
combined grid.
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

combineGrids

public static FieldImpl combineGrids(FieldImpl grid1,
                                     FieldImpl grid2)
                              throws VisADException,
                                     RemoteException
Combine two Fields into one. If the grids are on different time domains, the second is resampled to the domain of the first.

Parameters:
grid1 - first grid. This will be used for the time/space domain
grid2 - second grid.
Returns:
combined grid.
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

combineGrids

public static FieldImpl combineGrids(FieldImpl grid1,
                                     FieldImpl grid2,
                                     boolean flatten)
                              throws VisADException,
                                     RemoteException
Combine two Fields into one. If the grids are on different time domains, the second is resampled to the domain of the first.

Parameters:
grid1 - first grid. This will be used for the time/space domain
grid2 - second grid.
flatten - true to flatten
Returns:
combined grid.
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

combineGrids

public static FieldImpl combineGrids(FieldImpl grid1,
                                     FieldImpl grid2,
                                     int samplingMode,
                                     int errorMode,
                                     boolean flatten)
                              throws VisADException,
                                     RemoteException
Combine two Fields into one. If the grids are on different time domains, the second is resampled to the domain of the first.

Parameters:
grid1 - first grid. This will be used for the time/space domain
grid2 - second grid.
samplingMode - sampling mode (e.g. WEIGHTED_AVERAGE, NEAREST_NEIGHBOR)
errorMode - sampling error mode (e.g. NO_ERRORS)
flatten - false to keep tuple integrity.
Returns:
combined grid.
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

createWindSpeed

public static FieldImpl createWindSpeed(FieldImpl uFI,
                                        FieldImpl vFI)
                                 throws VisADException,
                                        RemoteException
Make a FieldImpl of wind speed scalar values from u and v components.

Parameters:
uFI - grid of U wind component
vFI - grid of V wind component
Returns:
wind speed grid
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

createVectorMagnitude

public static FieldImpl createVectorMagnitude(FieldImpl uFI,
                                              FieldImpl vFI)
                                       throws VisADException,
                                              RemoteException
Make a FieldImpl the magnitude of the vector components

Parameters:
uFI - grid of U wind component
vFI - grid of V wind component
Returns:
wind speed grid
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

createVectorMagnitude

public static FieldImpl createVectorMagnitude(FieldImpl vector)
                                       throws VisADException,
                                              RemoteException
Make a FieldImpl the magnitude of the vector components

Parameters:
vector - vector of grid of U and V wind component
Returns:
wind speed grid
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

createVectorMagnitude

public static FieldImpl createVectorMagnitude(FieldImpl uFI,
                                              FieldImpl vFI,
                                              String name)
                                       throws VisADException,
                                              RemoteException
Make a FieldImpl the magnitude of the vector components

Parameters:
uFI - grid of U wind component
vFI - grid of V wind component
name - name of the resulting value
Returns:
wind speed grid
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

createVectorDirection

public static FieldImpl createVectorDirection(FieldImpl vector)
                                       throws VisADException,
                                              RemoteException
Make a FieldImpl the magnitude of the vector components

Parameters:
vector - vector of grid of U and V direction component
Returns:
flow direction grid
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

createVectorDirection

public static FieldImpl createVectorDirection(FieldImpl uFI,
                                              FieldImpl vFI)
                                       throws VisADException,
                                              RemoteException
Make a FieldImpl the direction of the vector components

Parameters:
uFI - grid of U flow component
vFI - grid of V flow component
Returns:
direction grid
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

createHorizontalDivergence

public static FieldImpl createHorizontalDivergence(FieldImpl uGrid,
                                                   FieldImpl vGrid)
                                            throws VisADException,
                                                   RemoteException
Make a FieldImpl of horizontal wind divergence from u and v components.

Parameters:
uGrid - grid of U wind component
vGrid - grid of V wind component
Returns:
grid of horizontal divergence
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

createHorizontalFluxDivergence

public static FieldImpl createHorizontalFluxDivergence(FieldImpl paramGrid,
                                                       FieldImpl uGrid,
                                                       FieldImpl vGrid)
                                                throws VisADException,
                                                       RemoteException
Make a FieldImpl of horizontal scalar flux divergence defined as u*(dp/dx) + v*(dp/dy) + p*(du/dx + dv/dy) [because the Advection() routine, returns negative the formulation is (div - adv)]

Parameters:
paramGrid - grid of scalar parameter
uGrid - grid of U wind component
vGrid - grid of V wind component
Returns:
grid of horizontal flux divergence of scalar
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

createHorizontalAdvection

public static FieldImpl createHorizontalAdvection(FieldImpl paramGrid,
                                                  FieldImpl uGrid,
                                                  FieldImpl vGrid)
                                           throws VisADException,
                                                  RemoteException
Make a FieldImpl of horizontal scalar advection from u and v components, defined as u*(dp/dx) + v*(dp/dy)

Parameters:
paramGrid - grid of scalar parameter
uGrid - grid of U wind component
vGrid - grid of V wind component
Returns:
grid of horizontal advection of scalar
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

createDewpoint

public static FieldImpl createDewpoint(FieldImpl temperFI,
                                       FieldImpl rhFI)
                                throws VisADException,
                                       RemoteException
Make the FieldImpl of dewpoint temperature scalar values; possibly for sequence of times

Parameters:
temperFI - grid of air temperature
rhFI - grid of relative humidity
Returns:
dewpoint grid
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

createEquivalentPotentialTemperature

public static FieldImpl createEquivalentPotentialTemperature(FieldImpl temperFI,
                                                             FieldImpl rhFI)
                                                      throws VisADException,
                                                             RemoteException
Make a FieldImpl of Equivalent Potential Temperature; usually in 3d grids in a time series (at one or more times).

Parameters:
temperFI - grid of air temperature
rhFI - grid of relative humidity
Returns:
grid computed mixing ratio result grids
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

createMixingRatio

public static FieldImpl createMixingRatio(FieldImpl temperFI,
                                          FieldImpl rhFI)
                                   throws VisADException,
                                          RemoteException
Make a FieldImpl of mixing ratio values for series of times in general mr = (saturation mixing ratio) * (RH/100%);

Parameters:
temperFI - grid of air temperature
rhFI - grid of relative humidity
Returns:
grid of computed mixing ratio
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

createPotentialTemperature

public static FieldImpl createPotentialTemperature(FieldImpl temperFI)
                                            throws VisADException,
                                                   RemoteException
Make a FieldImpl of potential temperature values for series of times of temperature grids. It's assumed that the spatialDomain of the grid has pressure as it's vertical dimension. in general theta = t * (1000/p)** .286

Parameters:
temperFI - one grid or a time sequence of grids of temperature with a spatial domain that includes pressure in vertical
Returns:
computed potential temperature grid
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

createPotentialTemperature

public static FieldImpl createPotentialTemperature(FieldImpl temperFI,
                                                   FieldImpl pressFI)
                                            throws VisADException,
                                                   RemoteException
Make a FieldImpl of potential temperature values for series of times in general theta = t * (1000/p)** .286

Parameters:
temperFI - grid or time sequence of grids of temperature
pressFI - grid or time sequence of grids of pressure
Returns:
computed potential temperature grid
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

createIPV

public static FieldImpl createIPV(FieldImpl temperFI,
                                  FieldImpl absvor)
                           throws VisADException,
                                  RemoteException
Make a FieldImpl of isentropic potential vorticity

Parameters:
temperFI - grid or time sequence of grids of temperature with a spatial domain that includes pressure in vertical
absvor - grid or time sequence of grids of absolute vorticity
Returns:
computed grid(s)
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

createIPV

public static FieldImpl createIPV(FieldImpl temperFI,
                                  FieldImpl pressFI,
                                  FieldImpl absvor)
                           throws VisADException,
                                  RemoteException
Make a grid of isentropic potential vorticity

Parameters:
temperFI - grid or time sequence of grids of temperature
pressFI - grid or time sequence of grids of pressures at levels in grid
absvor - grid or time sequence of grids of absolute vorticity
Returns:
computed grid
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

createPressureGridFromDomain

public static FlatField createPressureGridFromDomain(FlatField ff)
                                              throws VisADException,
                                                     RemoteException
Every data grid with pressure as the z coord can be used to make a grid with pressure with the grid values as well

Parameters:
ff - FlatField with pressure in grid domain
Returns:
grid of pressures
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

createCoriolisGrid

public static FieldImpl createCoriolisGrid(FieldImpl input)
                                    throws VisADException,
                                           RemoteException
Every geo-located data grid can be used to make a grid with the coriolis parameter for the grid values as well

Parameters:
input - Any geolocated grid
Returns:
extracted grid of coriolis factor (2*OMEGA*sin(lat)) at the grid points
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

getLatitudeGrid

public static FieldImpl getLatitudeGrid(FieldImpl fi)
                                 throws VisADException,
                                        RemoteException
Deprecated. use createLatitudeGrid(FieldImpl)

Every geo-located data grid can be used to make a grid with latitude with the grid values as well

Parameters:
fi - Any geolocated grid
Returns:
extracted grid of latitudes at the grid points
Throws:
RemoteException
VisADException

createLatitudeGrid

public static FieldImpl createLatitudeGrid(FieldImpl fi)
                                    throws VisADException,
                                           RemoteException
Every geo-located data grid can be used to make a grid with latitude with the grid values as well

Parameters:
fi - Any geolocated grid
Returns:
extracted grid of latitudes at the grid points
Throws:
RemoteException
VisADException

ddx

public static FieldImpl ddx(FieldImpl grid)
                     throws VisADException,
                            RemoteException
Take the partial derivative with respect to X of the given field.

Parameters:
grid - grid to parialize
Returns:
partialized grid
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

ddy

public static FieldImpl ddy(FieldImpl grid)
                     throws VisADException,
                            RemoteException
Take the partial derivative with respect to Y of the given field.

Parameters:
grid - grid to parialize
Returns:
partialized grid
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

partial

public static FieldImpl partial(FieldImpl grid,
                                int domainIndex)
                         throws VisADException,
                                RemoteException
Take the partial derivative with respect variable at the domain index.

Parameters:
grid - grid to parialize
domainIndex - index of variable to use for derivative
Returns:
partialized grid
Throws:
RemoteException - Java RMI error
VisADException - VisAD Error

isVector

public static boolean isVector(FieldImpl grid)
                        throws VisADException
Is this a vector?

Parameters: