Package ucar.unidata.data.grid
Class DerivedGridFactory
java.lang.Object
ucar.unidata.data.grid.DerivedGridFactory
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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
binaryIndexDec
(float[] a, float theta0) _more_static int
binaryIndexInc
(float[] a, float theta0) _more_static FieldImpl
calculateDailyAnomaly
(FieldImpl dailyData, FieldImpl dailyClim) Calculate the daily anomalystatic FieldImpl
calculateDailyAnomaly
(FieldImpl dailyData, FieldImpl dailyClim, boolean asPercent) Calculate the daily anomalystatic 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, int samplingMode, int errorMode, boolean flatten) Combine two Fields into one.static FieldImpl
combineGrids
(FieldImpl grid1, FieldImpl grid2, int samplingMode, int errorMode, boolean flatten, boolean copy) Combine two Fields into one.static FieldImpl
combineGrids
(FieldImpl grid1, FieldImpl grid2, FieldImpl grid3) Combine three Fields into one.static FieldImpl
combineGrids1
(FieldImpl grid1, FieldImpl grid2) This is not working, hope to do colored by and over topo at the same timestatic FieldImpl
combineGridsN
(FieldImpl grid1, FieldImpl grid2) Combine two Fields into one.static FieldImpl
combineGridsR
(FieldImpl[] grids, int samplingMode, int errorMode, boolean flatten) Combine an array of grids into one.static FieldImpl
ComputePrecipRatesDbz
(FieldImpl field) Calculate the radar precip rate based on Marshall-Palmer drop size distributionstatic FlatField
ComputePrecipRatesDbzFF
(FlatField[] grids) static FieldImpl
ComputePrecipRatesZZDR
(FieldImpl gridz, FieldImpl gridzdr) Calculate the radar precip rate based on www.chill.colostate.edu/w/Differential_Reflectivity_from_Raindrops_and_WSR-88D_Rainfall_Estimationstatic FlatField
ComputePrecipRatesZZDRFF
(FlatField[] gridz, FlatField[] gridzdr) static float[][]
convert2Darray
(FlatField grid, int ii) _more_static float[][][]
convert3Darray
(FlatField grid, int ii) _more_static FieldImpl
convertPressureToHeight
(FieldImpl pressureField) Convert a pressure field to height values using the supplied coordinate systemstatic FieldImpl
convertPressureToHeight
(FieldImpl pressureField, CoordinateSystem pressToHeightCS) Convert a pressure field to height values using the supplied coordinate systemstatic FieldImpl
calculate the vertical velocity based on pressure velocity dz/dt= dp/dt * dz/dpstatic FieldImpl
convertPressureVelocityToHeightVelocity
(FieldImpl pressureVelField, FieldImpl hField, CoordinateSystem pressToHeightCS) Convert pressure velocity to height velocitystatic FieldImpl
convertPressureVelocityToHeightVelocity2
(FieldImpl wGrid, FieldImpl tGrid) calculate the vertical velocity based on hydrostatic and ideal gas law equation (w, m/s) = -(R*T/gP)*(w, Pa/s)static FieldImpl
convertToAirPressure
(FieldImpl press) Convert the pressure field to use AirPressure.getRealType as the parameter type, converting to hPa.static FieldImpl
create2DTopography
(FieldImpl paramGrid, FieldImpl topoGrid) Make a FieldImpl of some parameter and topography.static FieldImpl
create2DTopography
(FieldImpl paramGrid, FieldImpl topoGrid, boolean resampleToTopography) 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
createAirDensity
(FieldImpl pressFI, FieldImpl temperFI) Calculate the AirDensitystatic FieldImpl
createColumnBuoyancyIndex
(FieldImpl temperFI, FieldImpl rhFI) Calculate the Column Buoyancy Indexstatic FieldImpl
createConservedSounding
(FieldImpl temperFI, FieldImpl rhFI) Make the FieldImpl of dewpoint temperature scalar values; possibly for sequence of timesstatic 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 wellstatic FieldImpl
createDailyClimatology
(FieldImpl dailyData, boolean use366) Calculate a daily climatology from a grid of daily values for a period of timestatic FieldImpl
createDewpoint
(FieldImpl temperFI, FieldImpl rhFI) Make the FieldImpl of dewpoint temperature scalar values; possibly for sequence of timesstatic FieldImpl
createEPTFromSpecificHumidity
(FieldImpl temperFI, FieldImpl specificFI) Make a FieldImpl of Equivalent Potential Temperature; usually in 3d grids in a time series (at one or more times).static FieldImpl
createEPTFromSpecificHumidity
(FieldImpl temperFI, FieldImpl pressFI, FieldImpl specificFI) Make a FieldImpl of Equivalent Potential Temperature; usually in 3d grids in a time series (at one or more 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
createEquivalentPotentialTemperature
(FieldImpl temperFI, FieldImpl pressFI, 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
createFlowVectorsN
(FieldImpl uGrid, FieldImpl vGrid) _more_static FieldImpl
createFlowVectorsN
(FieldImpl uGrid, FieldImpl vGrid, FieldImpl wGrid) _more_static FieldImpl
createFlowVectorsN1
(FieldImpl wGrid) _more_createFlowVectorsNA
(FieldImpl uGrid, FieldImpl vGrid, FieldImpl wGrid, FieldImpl topo) _more_static FieldImpl
createGalvezDavisonIndex
(FieldImpl temperFI, FieldImpl rhFI) Calculate the Galvez-Davison Indexstatic FieldImpl
createGeostrophicWindVector
(FieldImpl paramFI) Make a FieldImpl of geostrophic wind.static FieldImpl
createHeatIndex
(FieldImpl temperFI, FieldImpl rhFI) Make the FieldImpl of heatindex scalar values; possibly for sequence of timesstatic FieldImpl
createHorizontalAdvection
(FieldImpl paramGrid, FieldImpl flowVector) Make a FieldImpl of horizontal scalar advection from flow vector, defined as u*(dp/dx) + v*(dp/dy)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
Make a FieldImpl of isentropic potential vorticitystatic FieldImpl
Make a grid of isentropic potential vorticitystatic FieldImpl
Every geo-located data grid can be used to make a grid with latitude with the grid values as wellstatic FieldImpl
createLayerAverage
(FieldImpl grid, double value1, double value2) Make the average of 2 levels of a gridstatic FieldImpl
createLayerAverage
(FieldImpl grid, double value1, double value2, Unit levelUnit) Make the average of 2 levels of a gridstatic FieldImpl
createLayerAverage
(FieldImpl grid, String value1, String value2) Make the average of 2 levels of a gridstatic FieldImpl
createLayerAverage
(FieldImpl grid, String value1, String value2, String levelUnit) Make the average of 2 levels of a gridstatic 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, double value1, double value2, Unit levelUnit) 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
createLayerDifference
(FieldImpl grid, String value1, String value2, String levelUnit) Make the difference of one grid's values at the given levels; first level subtract second level values.static FieldImpl
Every geo-located data grid can be used to make a grid with longitude with the grid values as wellstatic 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
createMixingRatio
(FieldImpl temperFI, FieldImpl pressFI, 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)** .286static FieldImpl
createPotentialVorticity
(FieldImpl thetaFI, FieldImpl vectorFI) Make a grid of isentropic potential vorticitystatic FieldImpl
createPressureField
(FieldImpl geoPH) static FieldImpl
Every data grid with pressure as the z coord can be used to make a grid with pressure with the grid values as wellstatic FlatField
Every data grid with pressure as the z coord can be used to make a grid with pressure with the grid values as wellstatic FieldImpl
createRelativeHumidity
(FieldImpl temperFI, FieldImpl mixingRatioFI) Make a FieldImpl of Relative Humidity; usually in 3d grids in a time series (at one or more times).static FieldImpl
createRelativeHumidity
(FieldImpl temperFI, FieldImpl mixingRatioFI, boolean isSpecificHumidity) Make a FieldImpl of Relative Humidity; usually in 3d grids in a time series (at one or more times).static FieldImpl
createRelativeHumidity
(FieldImpl temperFI, FieldImpl pressFI, FieldImpl mixingRatioFI, boolean isSpecificHumidity) Make a FieldImpl of Relative Humidity; usually in 3d grids in a time series (at one or more times).static FieldImpl
createRelativeHumidityFromSpecificHumidity
(FieldImpl temperFI, FieldImpl specificFI) Make a FieldImpl of Relative Humidity; usually in 3d grids in a time series (at one or more times).static FieldImpl
createRelativeHumidityFromSpecificHumidity
(FieldImpl temperFI, FieldImpl pressFI, FieldImpl specificFI) Make a FieldImpl of Relative Humidity; usually in 3d grids in a time series (at one or more times).static FieldImpl
createRelativeVorticity
(FieldImpl uFI, FieldImpl vFI) Computes relative vorticity from grid-relative wind components.static FieldImpl
static FieldImpl
createSatEquivalentPotentialTemperature
(FieldImpl temperFI, FieldImpl pressFI) Make a FieldImpl of Saturation equivalent potential temperature values for series of timesstatic FieldImpl
createSurfaceWindAngle
(FieldImpl gridu, FieldImpl gridv, FieldImpl gridw, double value1, String lUnit) Calculate the surface wind angle at certain levelstatic FieldImpl
createThickness
(FieldImpl grid) Create a 1000-500 mb thickness gridstatic FieldImpl
createTrueFlowVector
(FieldImpl uvGrid) Create true flow vectors from a uv grid.static FieldImpl
createTrueFlowVector0
(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
createTrueFlowVectors
(FieldImpl uGrid, FieldImpl vGrid, FieldImpl wGrid) _more_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 componentsstatic FieldImpl
createVectorDirection
(FieldImpl uFI, FieldImpl vFI) Make a FieldImpl the direction of the vector componentsstatic FieldImpl
createVectorMagnitude
(FieldImpl vector) Make a FieldImpl the magnitude of the vector componentsstatic FieldImpl
createVectorMagnitude
(FieldImpl uFI, FieldImpl vFI) Make a FieldImpl the magnitude of the vector componentsstatic FieldImpl
createVectorMagnitude
(FieldImpl uFI, FieldImpl vFI, String name) Make a FieldImpl the magnitude of the vector componentsstatic FieldImpl
createVirtualPotentialTemperature
(FieldImpl pressFI, FieldImpl temperFI, FieldImpl dewPtFI) Calculate the VirtualPotentialTemperaturestatic FieldImpl
createVirtualTemperature
(FieldImpl pressFI, FieldImpl temperFI, FieldImpl dewPtFI) Calculate the VirtualTemperaturestatic 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) Make a FieldImpl of wind vectors from u and v components.static FieldImpl
createWRFMixingRatio
(FieldImpl pFI, FieldImpl pbFI, FieldImpl temperFI, FieldImpl rhFI) static FieldImpl
Take the partial derivative with respect to X of the given field.static FieldImpl
Take the partial derivative with respect to Y of the given field.static FieldImpl
ensembleAverage
(FieldImpl grid) Create an ensemble averagestatic FieldImpl
extractGridADVOverThetaTopoSurface
(FieldImpl theta, FieldImpl vector, FieldImpl other, float theta0) We interpolate gridded data to the theta surface and then calc the advection and create 2d topo of the advection resultstatic FieldImpl
extractGridOverThetaTopoSurface
(FieldImpl theta, float theta0) Every data grid with pressure as the z coord can be used to make a grid with altitude with the constant grid valuestatic FieldImpl
extractGridOverThetaTopoSurface
(FieldImpl theta, FieldImpl other, float theta0) Every data grid with pressure as the z coord can be used to make a grid with altitude with the constant grid valuestatic FieldImpl
extractMaxGridSurface
(FieldImpl theta, float theta0) static FieldImpl
extractUVGridOverThetaTopoSurface
(FieldImpl theta, FieldImpl other1, FieldImpl other2, float theta0) Every data grid with pressure as the z coord can be used to make a grid with altitude with the constant grid valuestatic FieldImpl
extractVectorGridOverThetaTopoSurface
(FieldImpl theta, FieldImpl vector, float theta0) Every data grid with pressure as the z coord can be used to make a grid with altitude with the constant grid valuestatic FieldImpl
getComponent
(FieldImpl vector, int index, boolean copy) Get nth component of a vectorstatic int
getIndexOfLargest
(float[] a) static FieldImpl
Every geo-located data grid can be used to make a grid with latitude with the grid values as wellstatic FieldImpl
getUComponent
(FieldImpl vector) Get U component of a vectorstatic FieldImpl
getUComponent
(FieldImpl vector, boolean copy) Get U component of a vectorstatic FieldImpl
getVComponent
(FieldImpl vector) Get V component of a vectorstatic FieldImpl
getVComponent
(FieldImpl vector, boolean copy) Get V component of a vectorstatic float
interpolateMaxHeight
(FieldImpl grid, float lat0, float lon0, float alt0) static boolean
Is this a vector?static boolean
Is this a vector?static float
linearInterpolateHeight
(float[] theta, float[] other, float[] z, float theta0, boolean isDec) _more_static float
linearInterpolateHeight
(float[] theta, float[] z, float theta0, boolean isDec) _more_static FieldImpl
Mask the values in a grid with the maskstatic FieldImpl
Mask the values in a grid with the maskstatic FlatField
mergeTracks
(List datas) This is a duplication and should be removed laterstatic FieldImpl
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.static FieldImpl
removeUnit
(String varname, FieldImpl field) static FieldImpl
removeUnit
(FieldImpl field) remove unitstatic double[]
subArray
(double[] a, int start, int count, int strike) _more_static float[]
subArray
(float[] a, int start, int count, int strike) _more_static FieldImpl
Make the fix interval of one grid's values ;
-
Field Details
-
NEGATIVE_ONE
negative one -
EARTH_RADIUS
EARTH RADIUS (6371 km) -
EARTH_TWO_OMEGA
EARTH 2 omega -
GRAVITY
gravity -
CLIMATE_UNITS
climatology units
-
-
Constructor Details
-
DerivedGridFactory
public DerivedGridFactory()Default ctor; does nothing
-
-
Method Details
-
ensembleAverage
Create an ensemble average- Parameters:
grid
- the grid of ensembles- Returns:
- the average of the members
- Throws:
RemoteException
- java RMI problemVisADException
- VisAD error
-
createThickness
Create a 1000-500 mb thickness grid- Parameters:
grid
- grid (hopefully a height grid)- Returns:
- thickness field.
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error- See Also:
-
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 datavalue1
- level the first as a Stringvalue2
- level the second as a String- Returns:
- computed layer difference
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
createLayerDifference
public static FieldImpl createLayerDifference(FieldImpl grid, String value1, String value2, String levelUnit) 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 datavalue1
- level the first as a Stringvalue2
- level the second as a StringlevelUnit
- unit spec for level- Returns:
- computed layer difference
- Throws:
RemoteException
- Java RMI errorVisADException
- 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 datavalue1
- level of firstvalue2
- level of second- Returns:
- computed layer difference
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
createLayerDifference
public static FieldImpl createLayerDifference(FieldImpl grid, double value1, double value2, Unit levelUnit) 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 datavalue1
- level of firstvalue2
- level of secondlevelUnit
- unit for level- Returns:
- computed layer difference
- Throws:
RemoteException
- Java RMI errorVisADException
- 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 datavalue1
- level the first as a Stringvalue2
- level the second as a String- Returns:
- computed layer difference
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
createLayerAverage
public static FieldImpl createLayerAverage(FieldImpl grid, String value1, String value2, String levelUnit) throws VisADException, RemoteException Make the average of 2 levels of a grid- Parameters:
grid
- grid of datavalue1
- level the first as a Stringvalue2
- level the second as a StringlevelUnit
- unit for level- Returns:
- computed layer difference
- Throws:
RemoteException
- Java RMI errorVisADException
- 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 datavalue1
- level of firstvalue2
- level of second- Returns:
- computed layer difference
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
createLayerAverage
public static FieldImpl createLayerAverage(FieldImpl grid, double value1, double value2, Unit levelUnit) throws VisADException, RemoteException Make the average of 2 levels of a grid- Parameters:
grid
- grid of datavalue1
- level of firstvalue2
- level of secondlevelUnit
- unit for level- Returns:
- computed layer difference
- Throws:
RemoteException
- Java RMI errorVisADException
- 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 inputFieldImpl
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 errorVisADException
- VisAD Error- See Also:
-
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 theCoordinateSystem
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:
RemoteException
- Java RMI errorVisADException
- VisAD Error- See Also:
-
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 inputFieldImpl
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 errorVisADException
- VisAD Error- See Also:
-
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 componentvGrid
- grid of V wind component- Returns:
- true wind components
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
createTrueFlowVectors
public static FieldImpl createTrueFlowVectors(FieldImpl uGrid, FieldImpl vGrid, FieldImpl wGrid) throws VisADException, RemoteException _more_- Parameters:
uGrid
- _more_vGrid
- _more_wGrid
- _more_- Returns:
- _more_
- Throws:
RemoteException
- _more_VisADException
- _more_
-
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 componentvGrid
- grid of V wind component- Returns:
- true flow components
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
createTrueFlowVector0
public static FieldImpl createTrueFlowVector0(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 errorVisADException
- VisAD Error
-
createTrueFlowVector
public static FieldImpl createTrueFlowVector(FieldImpl uvGrid) throws VisADException, RemoteException Create true flow vectors from a uv grid.- Parameters:
uvGrid
- the uv grid- Returns:
- the grid converted to true (north) winds
- Throws:
RemoteException
- Java RMI ExceptionVisADException
- VisAD problem
-
createWindVectors
public static FieldImpl createWindVectors(FieldImpl uGrid, FieldImpl vGrid) throws VisADException, RemoteException Make a FieldImpl of wind vectors from u and v components.- Parameters:
uGrid
- grid of U wind componentvGrid
- grid of V wind component- Returns:
- combine two separate fields (u and v) into one grid (u,v)
- Throws:
VisADException
- VisAD problemRemoteException
- remote problem deprecated use #createFlowVectors(uGrid, vGrid)
-
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 errorVisADException
- 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 gridtopoGrid
- grid of topography. Must have units convertible with meter or geopotential meter.- Returns:
- combined grids
- Throws:
VisADException
- VisAD problemRemoteException
- remote problem
-
create2DTopography
public static FieldImpl create2DTopography(FieldImpl paramGrid, FieldImpl topoGrid, boolean resampleToTopography) 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 gridtopoGrid
- grid of topography. Must have units convertible with meter or geopotential meter.resampleToTopography
- true to resample to the topography domain- Returns:
- combined grids
- Throws:
VisADException
- VisAD problemRemoteException
- remote problem
-
convertPressureToHeight
public static FieldImpl convertPressureToHeight(FieldImpl pressureField) throws VisADException, RemoteException Convert a pressure field to height values using the supplied coordinate system- Parameters:
pressureField
- the pressure field. Must have units convertible with hPa and have a single range dimension.- Returns:
- the height field
- Throws:
RemoteException
- Java RMI exceptionVisADException
- Illegal field or some other VisAD error
-
convertPressureToHeight
public static FieldImpl convertPressureToHeight(FieldImpl pressureField, CoordinateSystem pressToHeightCS) throws VisADException, RemoteException Convert a pressure field to height values using the supplied coordinate system- Parameters:
pressureField
- the pressure field. Must have units convertible with hPa and have a single range dimension.pressToHeightCS
- The transform. If null, standard atmosphere is used.- Returns:
- the height field
- Throws:
RemoteException
- Java RMI exceptionVisADException
- Illegal field or some other VisAD error
-
convertPressureVelocityToHeightVelocity
public static FieldImpl convertPressureVelocityToHeightVelocity(FieldImpl wGrid) throws VisADException, RemoteException calculate the vertical velocity based on pressure velocity dz/dt= dp/dt * dz/dp- Parameters:
wGrid
- pressure velocity field- Returns:
- the velocities as m/s
- Throws:
RemoteException
- Java RMI problemVisADException
- VisAD problem
-
convertPressureVelocityToHeightVelocity2
public static FieldImpl convertPressureVelocityToHeightVelocity2(FieldImpl wGrid, FieldImpl tGrid) throws VisADException, RemoteException calculate the vertical velocity based on hydrostatic and ideal gas law equation (w, m/s) = -(R*T/gP)*(w, Pa/s)- Parameters:
wGrid
- pressure velocity fieldtGrid
- the temperature field- Returns:
- the velocities as m/s
- Throws:
RemoteException
- Java RMI problemVisADException
- VisAD problem
-
convertPressureVelocityToHeightVelocity
public static FieldImpl convertPressureVelocityToHeightVelocity(FieldImpl pressureVelField, FieldImpl hField, CoordinateSystem pressToHeightCS) throws VisADException, RemoteException Convert pressure velocity to height velocity- Parameters:
pressureVelField
- pressure velocity fieldhField
- the height fieldpressToHeightCS
- _more_- Returns:
- the velocities as m/s
- Throws:
RemoteException
- Java RMI problemVisADException
- VisAD 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 componentvGrid
- grid of V flow component- Returns:
- combine two separate fields (u and v) into one grid (u,v)
- Throws:
VisADException
- VisAD problemRemoteException
- 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 componentvGrid
- grid of V flow componentwGrid
- grid of W flow component- Returns:
- combine three separate fields (u, v and w) into one grid (u,v,w)
- Throws:
VisADException
- VisAD problemRemoteException
- remote problem
-
createFlowVectorsN
public static FieldImpl createFlowVectorsN(FieldImpl uGrid, FieldImpl vGrid, FieldImpl wGrid) throws VisADException, RemoteException _more_- Parameters:
uGrid
- _more_vGrid
- _more_wGrid
- _more_- Returns:
- _more_
- Throws:
RemoteException
- _more_VisADException
- _more_
-
createFlowVectorsNA
public static List<FieldImpl> createFlowVectorsNA(FieldImpl uGrid, FieldImpl vGrid, FieldImpl wGrid, FieldImpl topo) throws VisADException, RemoteException, Exception _more_- Parameters:
uGrid
- _more_vGrid
- _more_wGrid
- _more_topo
- _more_- Returns:
- _more_
- Throws:
Exception
- _more_RemoteException
- _more_VisADException
- _more_
-
createFlowVectorsN
public static FieldImpl createFlowVectorsN(FieldImpl uGrid, FieldImpl vGrid) throws VisADException, RemoteException _more_- Parameters:
uGrid
- _more_vGrid
- _more_- Returns:
- _more_
- Throws:
RemoteException
- _more_VisADException
- _more_
-
createFlowVectorsN1
_more_- Parameters:
wGrid
- _more_- Returns:
- _more_
- Throws:
RemoteException
- _more_VisADException
- _more_
-
combineGrids
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 errorVisADException
- 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 errorVisADException
- 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 errorVisADException
- VisAD Error
-
combineGridsR
public static FieldImpl combineGridsR(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 errorVisADException
- 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 domaingrid2
- second grid.grid3
- third grid.- Returns:
- combined grid.
- Throws:
RemoteException
- Java RMI errorVisADException
- 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 domaingrid2
- second grid.- Returns:
- combined grid.
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
combineGridsN
public static FieldImpl combineGridsN(FieldImpl grid1, FieldImpl grid2) throws VisADException, RemoteException Combine two Fields into one. If the grids are on different spatial domains, the second is resampled to the domain of the first.- Parameters:
grid1
- first grid. This will be used for the time/space domaingrid2
- second grid.- Returns:
- combined grid.
- Throws:
RemoteException
- Java RMI errorVisADException
- 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 domaingrid2
- second grid.flatten
- true to flatten- Returns:
- combined grid.
- Throws:
RemoteException
- Java RMI errorVisADException
- 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 domaingrid2
- 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 errorVisADException
- VisAD Error
-
combineGrids
public static FieldImpl combineGrids(FieldImpl grid1, FieldImpl grid2, int samplingMode, int errorMode, boolean flatten, boolean copy) 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 domaingrid2
- 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.copy
- copy the values during combine- Returns:
- combined grid.
- Throws:
RemoteException
- Java RMI errorVisADException
- 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 componentvFI
- grid of V wind component- Returns:
- wind speed grid
- Throws:
RemoteException
- Java RMI errorVisADException
- 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 componentvFI
- grid of V wind component- Returns:
- wind speed grid
- Throws:
RemoteException
- Java RMI errorVisADException
- 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 errorVisADException
- 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 componentvFI
- grid of V wind componentname
- name of the resulting value- Returns:
- wind speed grid
- Throws:
RemoteException
- Java RMI errorVisADException
- 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 errorVisADException
- 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 componentvFI
- grid of V flow component- Returns:
- direction grid
- Throws:
RemoteException
- Java RMI errorVisADException
- 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 componentvGrid
- grid of V wind component- Returns:
- grid of horizontal divergence
- Throws:
RemoteException
- Java RMI errorVisADException
- 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 parameteruGrid
- grid of U wind componentvGrid
- grid of V wind component- Returns:
- grid of horizontal flux divergence of scalar
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
createHorizontalAdvection
public static FieldImpl createHorizontalAdvection(FieldImpl paramGrid, FieldImpl flowVector) throws VisADException, RemoteException Make a FieldImpl of horizontal scalar advection from flow vector, defined as u*(dp/dx) + v*(dp/dy)- Parameters:
paramGrid
- grid of scalar parameterflowVector
- grid of wind vector- Returns:
- grid of horizontal advection of scalar
- Throws:
RemoteException
- Java RMI errorVisADException
- 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 parameteruGrid
- grid of U wind componentvGrid
- grid of V wind component- Returns:
- grid of horizontal advection of scalar
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
createConservedSounding
public static FieldImpl createConservedSounding(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 temperaturerhFI
- grid of relative humidity- Returns:
- dewpoint grid
- Throws:
RemoteException
- Java RMI errorVisADException
- 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 temperaturerhFI
- grid of relative humidity- Returns:
- dewpoint grid
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
createHeatIndex
public static FieldImpl createHeatIndex(FieldImpl temperFI, FieldImpl rhFI) throws VisADException, RemoteException Make the FieldImpl of heatindex scalar values; possibly for sequence of times- Parameters:
temperFI
- grid of air temperaturerhFI
- grid of relative humidity- Returns:
- dewpoint grid
- Throws:
RemoteException
- Java RMI errorVisADException
- 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 temperaturerhFI
- grid of relative humidity- Returns:
- grid computed mixing ratio result grids
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
createEquivalentPotentialTemperature
public static FieldImpl createEquivalentPotentialTemperature(FieldImpl temperFI, FieldImpl pressFI, 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 temperaturepressFI
- grid of air pressurerhFI
- grid of relative humidity- Returns:
- grid computed mixing ratio result grids
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
removeUnit
- Throws:
VisADException
-
createRelativeHumidity
public static FieldImpl createRelativeHumidity(FieldImpl temperFI, FieldImpl mixingRatioFI) throws VisADException, RemoteException Make a FieldImpl of Relative Humidity; usually in 3d grids in a time series (at one or more times).- Parameters:
temperFI
- grid of air temperaturemixingRatioFI
- grid of mixing ratio- Returns:
- grid computed Relative Humidity result grids
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
createRelativeHumidityFromSpecificHumidity
public static FieldImpl createRelativeHumidityFromSpecificHumidity(FieldImpl temperFI, FieldImpl specificFI) throws VisADException, RemoteException Make a FieldImpl of Relative Humidity; usually in 3d grids in a time series (at one or more times).- Parameters:
temperFI
- grid of air temperaturespecificFI
- grid of specific humidity- Returns:
- grid computed Relative Humidity result grids
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
createRelativeHumidityFromSpecificHumidity
public static FieldImpl createRelativeHumidityFromSpecificHumidity(FieldImpl temperFI, FieldImpl pressFI, FieldImpl specificFI) throws VisADException, RemoteException Make a FieldImpl of Relative Humidity; usually in 3d grids in a time series (at one or more times).- Parameters:
temperFI
- grid of air temperaturepressFI
- grid of air pressurespecificFI
- grid of specific humidity- Returns:
- grid computed Relative Humidity result grids
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
createEPTFromSpecificHumidity
public static FieldImpl createEPTFromSpecificHumidity(FieldImpl temperFI, FieldImpl specificFI) 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 temperaturespecificFI
- grid of specific humidity- Returns:
- grid computed mixing ratio result grids
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
createEPTFromSpecificHumidity
public static FieldImpl createEPTFromSpecificHumidity(FieldImpl temperFI, FieldImpl pressFI, FieldImpl specificFI) 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 temperaturepressFI
- grid of air pressurespecificFI
- grid of specific humidity- Returns:
- grid computed mixing ratio result grids
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
createRelativeHumidity
public static FieldImpl createRelativeHumidity(FieldImpl temperFI, FieldImpl mixingRatioFI, boolean isSpecificHumidity) throws VisADException, RemoteException Make a FieldImpl of Relative Humidity; usually in 3d grids in a time series (at one or more times).- Parameters:
temperFI
- grid of air temperaturemixingRatioFI
- grid of mixing ratioisSpecificHumidity
- is the mixingRationFI really SH?- Returns:
- grid computed Relative Humidity result grids
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
createRelativeHumidity
public static FieldImpl createRelativeHumidity(FieldImpl temperFI, FieldImpl pressFI, FieldImpl mixingRatioFI, boolean isSpecificHumidity) throws VisADException, RemoteException Make a FieldImpl of Relative Humidity; usually in 3d grids in a time series (at one or more times).- Parameters:
temperFI
- grid of air temperaturepressFI
- grid of air pressuremixingRatioFI
- grid of mixing ratioisSpecificHumidity
- is the mixingRationFI really SH?- Returns:
- grid computed Relative Humidity result grids
- Throws:
RemoteException
- Java RMI errorVisADException
- 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 temperaturerhFI
- grid of relative humidity- Returns:
- grid of computed mixing ratio
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
createMixingRatio
public static FieldImpl createMixingRatio(FieldImpl temperFI, FieldImpl pressFI, 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 temperaturepressFI
- grid of air temperaturerhFI
- grid of relative humidity- Returns:
- grid of computed mixing ratio
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
createWRFMixingRatio
public static FieldImpl createWRFMixingRatio(FieldImpl pFI, FieldImpl pbFI, FieldImpl temperFI, FieldImpl rhFI) throws VisADException, RemoteException - Throws:
VisADException
RemoteException
-
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 errorVisADException
- VisAD Error
-
createSatEquivalentPotentialTemperature
public static FieldImpl createSatEquivalentPotentialTemperature(FieldImpl temperFI) throws VisADException, RemoteException - Parameters:
temperFI
- one grid or a time sequence of grids of temperature with a spatial domain that includes pressure in vertical- Returns:
- computed Saturation Equ potential temperature grid
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
createPressureField
- Parameters:
geoPH
- one grid or a time sequence of geo potential height with a spatial domain that includes pressure in vertical- Returns:
- computed pressure grid
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
convertToAirPressure
public static FieldImpl convertToAirPressure(FieldImpl press) throws VisADException, RemoteException Convert the pressure field to use AirPressure.getRealType as the parameter type, converting to hPa.- Parameters:
press
- the pressure- Returns:
- the converted field
- Throws:
RemoteException
- Java RMI ExceptionVisADException
- problem in VisAD land
-
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 temperaturepressFI
- grid or time sequence of grids of pressure- Returns:
- computed potential temperature grid
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
createSatEquivalentPotentialTemperature
public static FieldImpl createSatEquivalentPotentialTemperature(FieldImpl temperFI, FieldImpl pressFI) throws VisADException, RemoteException Make a FieldImpl of Saturation equivalent potential temperature values for series of times- Parameters:
temperFI
- grid or time sequence of grids of temperaturepressFI
- grid or time sequence of grids of pressure- Returns:
- computed potential temperature grid
- Throws:
RemoteException
- Java RMI errorVisADException
- 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 verticalabsvor
- grid or time sequence of grids of absolute vorticity- Returns:
- computed grid(s)
- Throws:
RemoteException
- Java RMI errorVisADException
- 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 temperaturepressFI
- grid or time sequence of grids of pressures at levels in gridabsvor
- grid or time sequence of grids of absolute vorticity- Returns:
- computed grid
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
createPotentialVorticity
public static FieldImpl createPotentialVorticity(FieldImpl thetaFI, FieldImpl vectorFI) throws VisADException, RemoteException Make a grid of isentropic potential vorticity- Parameters:
thetaFI
- grid or time sequence of grids of theta, thetae, etvectorFI
- grid or time sequence of grids of u and v- Returns:
- computed grid
- Throws:
RemoteException
- Java RMI errorVisADException
- 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 errorVisADException
- VisAD Error
-
createPressureGrid
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
- FieldImpl with pressure in grid domain- Returns:
- grid of pressures
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
combineGrids1
public static FieldImpl combineGrids1(FieldImpl grid1, FieldImpl grid2) throws VisADException, RemoteException This is not working, hope to do colored by and over topo at the same time- Parameters:
grid1
- with u, v, hgrid2
- other- Returns:
- grid of altitude
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
extractGridOverThetaTopoSurface
public static FieldImpl extractGridOverThetaTopoSurface(FieldImpl theta, float theta0) throws VisADException, RemoteException Every data grid with pressure as the z coord can be used to make a grid with altitude with the constant grid value- Parameters:
theta
- FlatField with pressure in grid domaintheta0
- constant value- Returns:
- grid of altitude
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
extractVectorGridOverThetaTopoSurface
public static FieldImpl extractVectorGridOverThetaTopoSurface(FieldImpl theta, FieldImpl vector, float theta0) throws VisADException, RemoteException Every data grid with pressure as the z coord can be used to make a grid with altitude with the constant grid value- Parameters:
theta
- FlatField with pressure in grid domainvector
- FlatField with pressure in grid domaintheta0
- constant value- Returns:
- grid of altitude
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
extractGridADVOverThetaTopoSurface
public static FieldImpl extractGridADVOverThetaTopoSurface(FieldImpl theta, FieldImpl vector, FieldImpl other, float theta0) throws VisADException, RemoteException We interpolate gridded data to the theta surface and then calc the advection and create 2d topo of the advection result- Parameters:
theta
- FlatField with pressure in grid domainvector
- FlatField with pressure in grid domainother
- FlatField to be advectedtheta0
- constant value- Returns:
- grid of altitude
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
extractUVGridOverThetaTopoSurface
public static FieldImpl extractUVGridOverThetaTopoSurface(FieldImpl theta, FieldImpl other1, FieldImpl other2, float theta0) throws VisADException, RemoteException Every data grid with pressure as the z coord can be used to make a grid with altitude with the constant grid value- Parameters:
theta
- FlatField with pressure in grid domainother1
- FlatField with pressure in grid domainother2
- FlatField with pressure in grid domaintheta0
- constant value- Returns:
- grid of altitude
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
extractGridOverThetaTopoSurface
public static FieldImpl extractGridOverThetaTopoSurface(FieldImpl theta, FieldImpl other, float theta0) throws VisADException, RemoteException Every data grid with pressure as the z coord can be used to make a grid with altitude with the constant grid value- Parameters:
theta
- FlatField with pressure in grid domainother
- FlatField with pressure in grid domaintheta0
- constant value- Returns:
- grid of altitude
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error
-
linearInterpolateHeight
public static float linearInterpolateHeight(float[] theta, float[] z, float theta0, boolean isDec) _more_- Parameters:
theta
- _more_z
- _more_theta0
- _more_isDec
- _more_- Returns:
- _more_
-
binaryIndexDec
public static int binaryIndexDec(float[] a, float theta0) _more_- Parameters:
a
- _more_theta0
- _more_- Returns:
- _more_
-
binaryIndexInc
public static int binaryIndexInc(float[] a, float theta0) _more_- Parameters:
a
- _more_theta0
- _more_- Returns:
- _more_
-
linearInterpolateHeight
public static float linearInterpolateHeight(float[] theta, float[] other, float[] z, float theta0, boolean isDec) _more_- Parameters:
theta
- _more_other
- _more_z
- _more_theta0
- _more_isDec
- _more_- Returns:
- _more_
-
convert3Darray
public static float[][][] convert3Darray(FlatField grid, int ii) throws VisADException, RemoteException _more_- Parameters:
grid
- _more_ii
- _more_- Returns:
- _more_
- Throws:
VisADException
- for badRemoteException
- for bad
-
convert2Darray
public static float[][] convert2Darray(FlatField grid, int ii) throws VisADException, RemoteException _more_- Parameters:
grid
- _more_ii
- _more_- Returns:
- _more_
- Throws:
VisADException
- for badRemoteException
- for bad
-
mask
public static FieldImpl mask(FieldImpl gridToMask, FieldImpl mask, float maskValue) throws VisADException Mask the values in a grid with the mask- Parameters:
gridToMask
- the grid to maskmask
- the masking gridmaskValue
- the mask value- Returns:
- the masked grid
- Throws:
VisADException
- Problem reading or creating VisAD data objects
-
mask
public static FieldImpl mask(FieldImpl gridToMask, FieldImpl mask, float maskValue, boolean resampleToMask) throws VisADException Mask the values in a grid with the mask- Parameters:
gridToMask
- the grid to maskmask
- the masking gridmaskValue
- the mask valueresampleToMask
- if true, resample to the mask domain- Returns:
- the masked grid
- Throws:
VisADException
- Problem reading or creating VisAD data objects
-
createCoriolisGrid
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 errorVisADException
- VisAD Error
-
getLatitudeGrid
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 deprecated use createLatitudeGrid(FieldImpl)
- Throws:
RemoteException
- for badVisADException
- for bad
-
createLatitudeGrid
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
- for badVisADException
- for bad
-
createLongitudeGrid
Every geo-located data grid can be used to make a grid with longitude with the grid values as well- Parameters:
fi
- Any geolocated grid- Returns:
- extracted grid of longitudes at the grid points
- Throws:
RemoteException
- for badVisADException
- for bad
-
mergeTracks
This is a duplication and should be removed later- Parameters:
datas
- _more_- Returns:
- _more_
- Throws:
VisADException
- _more_
-
subArray
public static float[] subArray(float[] a, int start, int count, int strike) _more_- Parameters:
a
- _more_start
- _more_count
- _more_strike
- _more_- Returns:
- _more_
-
subArray
public static double[] subArray(double[] a, int start, int count, int strike) _more_- Parameters:
a
- _more_start
- _more_count
- _more_strike
- _more_- Returns:
- _more_
-
ddx
Take the partial derivative with respect to X of the given field.- Parameters:
grid
- grid to parialize- Returns:
- partialized grid
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error deprecated use GridMath.ddx(FieldImpl)
-
ddy
Take the partial derivative with respect to Y of the given field.- Parameters:
grid
- grid to parialize- Returns:
- partialized grid
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error deprecated use GridMath.ddy(FieldImpl)
-
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 parializedomainIndex
- index of variable to use for derivative- Returns:
- partialized grid
- Throws:
RemoteException
- Java RMI errorVisADException
- VisAD Error deprecated use GridMath.partial(FieldImpl, int)
-
isVector
Is this a vector?- Parameters:
grid
- grid to check- Returns:
- true if there is more than one component
- Throws:
VisADException
- VisAD Error
-
isScalar
Is this a vector?- Parameters:
grid
- grid to check- Returns:
- true if there is more than one component
- Throws:
VisADException
- VisAD Error
-
getUComponent
Get U component of a vector- Parameters:
vector
- vector quantity- Returns:
- u (first) component or null if not a vector
- Throws:
VisADException
- VisAD Error
-
getUComponent
Get U component of a vector- Parameters:
vector
- vector quantitycopy
- true to copy values- Returns:
- u (first) component or null if not a vector
- Throws:
VisADException
- VisAD Error
-
getVComponent
Get V component of a vector- Parameters:
vector
- vector quantity- Returns:
- v (second) component or null if not a vector. Does not copy
- Throws:
VisADException
- VisAD Error
-
getVComponent
Get V component of a vector- Parameters:
vector
- vector quantitycopy
- true to copy values- Returns:
- v (second) component or null if not a vector.
- Throws:
VisADException
- VisAD Error
-
getComponent
public static FieldImpl getComponent(FieldImpl vector, int index, boolean copy) throws VisADException Get nth component of a vector- Parameters:
vector
- vector quantityindex
- index of componentcopy
- true to copy values- Returns:
- nth component or null in index > number of components
- Throws:
VisADException
- VisAD Error
-
createDailyClimatology
public static FieldImpl createDailyClimatology(FieldImpl dailyData, boolean use366) throws VisADException Calculate a daily climatology from a grid of daily values for a period of time- Parameters:
dailyData
- the daily datause366
- create a 366 day climatology- Returns:
- the daily climatology grid
- Throws:
VisADException
- illegal grid or problem calculating climatology
-
calculateDailyAnomaly
public static FieldImpl calculateDailyAnomaly(FieldImpl dailyData, FieldImpl dailyClim) throws VisADException Calculate the daily anomaly- Parameters:
dailyData
- the daily datadailyClim
- the climatology- Returns:
- the daily anomaly
- Throws:
VisADException
- bad input or problem creating fields
-
calculateDailyAnomaly
public static FieldImpl calculateDailyAnomaly(FieldImpl dailyData, FieldImpl dailyClim, boolean asPercent) throws VisADException Calculate the daily anomaly- Parameters:
dailyData
- the daily datadailyClim
- the climatologyasPercent
- return the values as a percentage of normal (+/-)- Returns:
- the daily anomaly
- Throws:
VisADException
- bad input or problem creating fields
-
createSurfaceWindAngle
public static FieldImpl createSurfaceWindAngle(FieldImpl gridu, FieldImpl gridv, FieldImpl gridw, double value1, String lUnit) throws VisADException, RemoteException Calculate the surface wind angle at certain level- Parameters:
gridu
- windgridv
- windgridw
- windvalue1
- valuelUnit
- unit- Returns:
- the angle
- Throws:
VisADException
- bad input or problem creating fieldsRemoteException
- for bad
-
timeStepAccumulatedPrecip
Make the fix interval of one grid's values ;- Parameters:
grid
- grid of data- Returns:
- computed layer difference
- Throws:
VisADException
- VisAD Error
-
createVirtualPotentialTemperature
public static FieldImpl createVirtualPotentialTemperature(FieldImpl pressFI, FieldImpl temperFI, FieldImpl dewPtFI) throws VisADException, RemoteException Calculate the VirtualPotentialTemperature- Parameters:
pressFI
- pressuretemperFI
- temperaturedewPtFI
- dewPT- Returns:
- the angle
- Throws:
VisADException
- bad input or problem creating fieldsRemoteException
- for bad
-
createVirtualTemperature
public static FieldImpl createVirtualTemperature(FieldImpl pressFI, FieldImpl temperFI, FieldImpl dewPtFI) throws VisADException, RemoteException Calculate the VirtualTemperature- Parameters:
pressFI
- windtemperFI
- winddewPtFI
- wind- Returns:
- the angle
- Throws:
VisADException
- bad input or problem creating fieldsRemoteException
- for bad
-
getIndexOfLargest
public static int getIndexOfLargest(float[] a) -
interpolateMaxHeight
public static float interpolateMaxHeight(FieldImpl grid, float lat0, float lon0, float alt0) throws VisADException, RemoteException - Throws:
VisADException
RemoteException
-
extractMaxGridSurface
public static FieldImpl extractMaxGridSurface(FieldImpl theta, float theta0) throws VisADException, RemoteException - Throws:
VisADException
RemoteException
-
createAirDensity
public static FieldImpl createAirDensity(FieldImpl pressFI, FieldImpl temperFI) throws VisADException, RemoteException Calculate the AirDensity- Parameters:
pressFI
- windtemperFI
- wind- Returns:
- the angle
- Throws:
VisADException
- bad input or problem creating fieldsRemoteException
- for bad
-
createGalvezDavisonIndex
public static FieldImpl createGalvezDavisonIndex(FieldImpl temperFI, FieldImpl rhFI) throws VisADException, RemoteException Calculate the Galvez-Davison Index- Parameters:
temperFI
- temperaturerhFI
- relative humidity- Returns:
- the gdi
- Throws:
VisADException
- bad input or problem creating fieldsRemoteException
- for bad
-
createColumnBuoyancyIndex
public static FieldImpl createColumnBuoyancyIndex(FieldImpl temperFI, FieldImpl rhFI) throws VisADException, RemoteException Calculate the Column Buoyancy Index- Parameters:
temperFI
- temperaturerhFI
- relative humidity- Returns:
- the gdi
- Throws:
VisADException
- bad input or problem creating fieldsRemoteException
- for bad
-
ComputePrecipRatesDbz
Calculate the radar precip rate based on Marshall-Palmer drop size distribution- Parameters:
field
- radar reflectivity- Returns:
- the rain rate (inches/hour)
- Throws:
VisADException
- bad input or problem creating fields
-
ComputePrecipRatesDbzFF
- Throws:
VisADException
-
ComputePrecipRatesZZDR
public static FieldImpl ComputePrecipRatesZZDR(FieldImpl gridz, FieldImpl gridzdr) throws VisADException Calculate the radar precip rate based on www.chill.colostate.edu/w/Differential_Reflectivity_from_Raindrops_and_WSR-88D_Rainfall_Estimation- Parameters:
gridz
- radar reflectivitygridzdr
- radar differential reflectivity- Returns:
- the rain rate (inches/hour)
- Throws:
VisADException
- bad input or problem creating fields
-
ComputePrecipRatesZZDRFF
public static FlatField ComputePrecipRatesZZDRFF(FlatField[] gridz, FlatField[] gridzdr) throws VisADException - Throws:
VisADException
-
removeUnit
remove unit- Parameters:
field
- input field- Returns:
- the new field
- Throws:
VisADException
- bad input or problem creating fields
-