public class GridUtil
extends java.lang.Object
(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.
Modifier and Type | Class and Description |
---|---|
static class |
GridUtil.Grid2D
Class Grid2D holds a 2d lat/lon and value array
|
static class |
GridUtil.Normalize2DArray |
static class |
GridUtil.QuantileTransformer |
static class |
GridUtil.RobustScaler
The formula of the Robustscaler in sklearn is:
X_scale = (X_i - X_med)/(X_percentile75 - X_percentile25)
|
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_ERROR_MODE
Default error mode used for subsampling grids
|
static int |
DEFAULT_SAMPLING_MODE
Default sampling mode used for subsampling grids
|
static int |
DEPENDENT_ERRORS
Dependent error mode
|
static visad.RealType |
ENSEMBLE_TYPE
ensemble RealType
|
static java.lang.String |
FUNC_AVERAGE
Deprecated.
use GridMath.FUNC_AVERAGE
|
static java.lang.String |
FUNC_DIFFERENCE
Deprecated.
use GridMath.FUNC_DIFFERENCE
|
static java.lang.String |
FUNC_MAX
Deprecated.
use GridMath.FUNC_MAX
|
static java.lang.String |
FUNC_MIN
Deprecated.
use GridMath.FUNC_MIN
|
static java.lang.String |
FUNC_SUM
Deprecated.
use GridMath.FUNC_SUM
|
static int |
INDEPENDENT_ERRORS
Independent error mode
|
static int |
NEAREST_NEIGHBOR
Nearest Neighbor sampling mode
|
static int |
NO_ERRORS
No error mode
|
static java.lang.String |
SMOOTH_5POINT
Five point smoother identifier
|
static java.lang.String |
SMOOTH_9POINT
Nine point smoother identifier
|
static java.lang.String |
SMOOTH_CIRCULAR
Barnes circular smoother identifier
|
static java.lang.String |
SMOOTH_CRESSMAN
Cressman smoother identifier
|
static java.lang.String |
SMOOTH_GAUSSIAN
Gaussian smoother identifier
|
static java.lang.String |
SMOOTH_RECTANGULAR
Barnes circular smoother identifier
|
static int |
WEIGHTED_AVERAGE
Weighted average sampling mode
|
Constructor and Description |
---|
GridUtil()
Default ctor
|
Modifier and Type | Method and Description |
---|---|
static visad.FieldImpl |
addLevelToGrid(visad.FieldImpl grid,
double levelValue,
java.lang.String levelUnit)
Add a level to a 2D grid
|
static visad.FieldImpl |
applyFunctionOverTime(visad.FieldImpl grid,
java.lang.String function,
boolean makeTimes)
Deprecated.
use GridMath.applyFunctionOverTime(FieldImpl, String, boolean)
|
static visad.FieldImpl |
averageOverTime(visad.FieldImpl grid,
boolean makeTimes)
Deprecated.
use GridMath.averageOverTime(FieldImpl, boolean)
|
static boolean |
canSliceAtLevel(visad.FieldImpl grid,
visad.Real level)
Determine whether the grid in question can be sliced at
the level specified (i.e., units or CS allows this)
|
static boolean |
canSliceAtLevel(visad.SampledSet spatialSet,
visad.Real level)
Determine whether the set in question can be sliced at
the level specified (i.e., units or CS allows this)
|
static boolean |
canSwapLatLon(visad.FieldImpl grid)
Can the lat/lons be swapped?
|
static visad.FieldImpl |
classifier(visad.FieldImpl field,
java.lang.String classifierStr,
java.lang.String outFileName)
A classifier in machine learning is an algorithm that automatically orders or
categorizes data into one or more of a set of “classes.”
|
static visad.FieldImpl |
differenceFromBaseTime(visad.FieldImpl grid)
Deprecated.
use GridMath.differenceFromBaseTime(FieldImpl)
|
static void |
exportGridToNetcdf(visad.FieldImpl grid)
Write grid out to a netCDF CF compliant file
|
static void |
exportGridToNetcdf(visad.FieldImpl grid,
java.lang.String filename)
Write grid out to a netCDF CF compliant file
|
visad.FieldImpl |
extractParam(visad.FieldImpl grid,
visad.MathType paramType)
Extract a single parameter from a grid of multiple parameters.
|
static visad.FieldImpl |
extractParam(visad.FieldImpl grid,
visad.ScalarType param)
Extract the param from a sequence, it will be the range type
of the individual elements.
|
static Range[] |
fieldMinMax(visad.FlatField field)
Find min and max of range data in any VisAD FlatField
|
static void |
fillMissing(float[][] grid2D,
float missingValue)
Fill a structure with missing values with nearby grid values
|
static int[][] |
findContainedIndices(float[][] latlon,
visad.UnionSet map)
Find the indices of the latlon values contained in the map
|
static int[][] |
findContainedIndices(visad.GriddedSet domain,
visad.UnionSet map)
Find the indices of the domain values contained in the map
|
static float[][][] |
findContainedLatLons(float[][] latlons,
visad.UnionSet maps)
Find the lat/lon values in the given spatial domain contained by the polygons in the given map set
|
static float[][][] |
findContainedLatLons(visad.GriddedSet domain,
visad.UnionSet maps)
Find the lat/lon values in the given spatial domain contained by the polygons in the given map set
|
static int[][] |
findIndicesInsideRange(float[][] values,
float min,
float max)
Finds the indices of the values array whose value is in the given range
|
static int[][] |
findIndicesOutsideRange(float[][] values,
float min,
float max)
Finds the indices of the values array whose value is not in the given range
|
static java.util.List<FieldStats> |
findMinMaxAverage(visad.FieldImpl field,
visad.UnionSet mapSets)
Find the min/max and average of a file inside the mapsets
|
static FieldStats |
findMinMaxAverageFromRange(visad.FlatField field,
visad.UnionSet mapSets)
Find the min, max and average from the range
|
static int[][] |
findNotContainedIndices(float[][] latlon,
visad.UnionSet map)
Find the indices of the latlon values contained in the map
|
static int[][] |
findNotContainedIndices(visad.GriddedSet domain,
visad.UnionSet map)
find the indices not contained in the map domian
|
static double |
findOptimalLambda(double[] data,
double minLambda,
double maxLambda,
double stepSize) |
static double |
findOptimalLambda(float[] data,
double minLambda,
double maxLambda,
double stepSize) |
static visad.Real |
getAltitude(visad.FieldImpl grid,
visad.Real level)
Get the altitude corresponding to the level specified using
the domain of the grid.
|
static visad.Real |
getAltitude(visad.SampledSet domainSet,
visad.Real level)
Get the altitude corresponding to the level specified using
the domain of the grid.
|
static visad.georef.LatLonPoint |
getCenterLatLonPoint(visad.FieldImpl grid)
Get the latitude/longitude point at the center of the grid.
|
static visad.georef.LatLonPoint |
getCenterLatLonPoint(visad.SampledSet spatialDomain)
Get the latitude/longitude point at the center of the domain.
|
static visad.RealTuple |
getCenterPoint(visad.FieldImpl grid)
Method to get the center point of a grid's spatial domain
as a RealTuple.
|
static visad.RealTuple |
getCenterPoint(visad.SampledSet spatialDomain)
Method to get the center point of a spatial domain
as a RealTuple.
|
static java.util.List<visad.DateTime> |
getDateTimeList(visad.FieldImpl grid)
Get the list of DateTime objects from the domain of the given grid
|
static float[][] |
getEarthLocationPoints(visad.GriddedSet domain)
Convert the domain to the reference earth located points
|
static visad.Gridded1DSet |
getEnsembleSet(visad.FieldImpl ensGrid)
Return the ensemble set for the field
|
static visad.RealType |
getEnsembleType(visad.FieldImpl grid)
Get the RealType of the ensemble.
|
static visad.FieldImpl |
getGridAsPointObs(visad.FieldImpl grid)
Convert a grid to point obs
|
static float[][] |
getLatLon(visad.GriddedSet domain)
Convert the domain to the reference earth located points.
|
static ucar.unidata.geoloc.LatLonRect |
getLatLonRect(visad.GriddedSet domain)
Convert the domain to the latlonRect
|
static float[][][] |
getLatLons(float[][] latlons,
int[][] indices)
Find the lat/lon values in the given spatial domain for the given indices
|
static float[][][] |
getLatLons(visad.GriddedSet domain,
int[][] indices)
Find the lat/lon values in the given spatial domain for the given indices
|
static visad.Real |
getLevel(visad.FieldImpl grid,
visad.Real altitude)
Get the altitude corresponding to the level specified using
the domain of the grid.
|
static Range[] |
getMinMax(visad.FieldImpl fieldImpl)
get max and min of all range values in the current active fieldImpl
|
static visad.georef.MapProjection |
getNavigation(visad.FieldImpl grid)
Get the navigation for this grid
|
static visad.georef.MapProjection |
getNavigation(visad.SampledSet spatialSet)
Get the navigation for this spatialDomain
|
static visad.FieldImpl |
getParam(visad.FieldImpl grid,
int index)
Extract the range MathType of the lowest element.
|
static visad.FieldImpl |
getParam(visad.FieldImpl grid,
int index,
boolean copy)
Extract the range MathType of the lowest element.
|
static visad.TupleType |
getParamType(visad.FieldImpl grid)
Get the range MathType of the lowest element.
|
static visad.Unit[] |
getParamUnits(visad.FieldImpl grid)
Get the range MathType of the lowest element.
|
static visad.FieldImpl |
getProfileAtLatLonPoint(visad.FieldImpl grid,
visad.georef.LatLonPoint point)
Returns a vertical profile of a grid at a Lat/Lon point.
|
static visad.FieldImpl |
getProfileAtLatLonPoint(visad.FieldImpl grid,
visad.georef.LatLonPoint point,
int samplingMode)
Returns a vertical profile of a grid at a Lat/Lon point.
|
static visad.FieldImpl |
getProfileAtLatLonPoint(visad.FieldImpl grid,
visad.georef.LatLonPoint point,
int samplingMode,
int errorMode)
Returns a vertical profile of a grid at a Lat/Lon point.
|
static visad.RealType |
getSequenceType(visad.FieldImpl grid)
Get the RealType of the sequence.
|
static visad.SampledSet |
getSpatialDomain(visad.FieldImpl grid)
Get the spatial domain for this grid.
|
static visad.SampledSet |
getSpatialDomain(visad.FieldImpl grid,
int timeIndex)
Get the spatial domain for this grid at the specified time step.
|
static visad.Set |
getTimeSet(visad.FieldImpl grid)
Get the time set from the grid.
|
static visad.RealType |
getVerticalType(visad.FieldImpl grid)
Get the RealType of the vertical dimension of the spatial domain
of the grid.
|
static visad.RealType |
getVerticalType(visad.SampledSet domainSet)
Get the unit of the vertical dimension of the domain set.
|
static visad.Unit |
getVerticalUnit(visad.FieldImpl grid)
Get the unit of the vertical dimension of the spatial domain of the grid.
|
static visad.Unit |
getVerticalUnit(visad.SampledSet domainSet)
Get the unit of the vertical dimension of the domain.
|
static visad.SampledSet |
getWholeSpatialDomain(visad.FieldImpl grid)
Get the spatial domain for this grid.
|
static visad.UnionSet |
glyphsToMap(visad.GriddedSet domainSet,
java.util.List glyphs)
Process the glyph to Unionset.
|
static boolean |
hasEnsemble(visad.FieldImpl grid)
Check to see if this is an ensemble grid
|
static boolean |
is2D(visad.FieldImpl grid)
Check to see if this is a 2D grid
|
static boolean |
is2D(visad.SampledSet domainSet)
Check to see if this is a 2D domain
|
static boolean |
is3D(visad.FieldImpl grid)
Check to see if this is a 3D grid
|
static boolean |
is3D(visad.SampledSet domainSet)
Check to see if this is a 3D domain
|
static boolean |
isAllMissing(visad.FieldImpl field)
Check if all real values in a FieldImpl are missing.
|
static boolean |
isAllMissing(visad.FieldImpl grid,
boolean popupErrorMessage)
Check if all real values in a FieldImpl are missing.
|
static boolean |
isAnyMissing(visad.FieldImpl grid)
Check if any of the real values in a FieldImpl are missing.
|
static boolean |
isConstantSpatialDomain(visad.FieldImpl grid)
See if the spatial domain of this grid is constant (ie: not
time varying)
|
static boolean |
isGrid(visad.FieldImpl field)
Check to see if this field is a grid that can be handled by
these methods
|
static boolean |
isLatLonOrder(visad.FieldImpl grid)
Check to see if this is a navigated grid (domain can be converted to
lat/lon)
|
static boolean |
isLatLonOrder(visad.SampledSet spatialSet)
Check to see if this is a navigated domain (can be converted to
lat/lon)
|
static boolean |
isLonCyclic(double first,
double last)
Check to see if the longitude values are cyclic within the default epsilon
(i.e., last == first+360 +- 0.0005)
|
static boolean |
isLonCyclic(double first,
double last,
double epsilon)
Check to see if the longitude values are cyclic (i.e., last == first+360
within esplion)
|
static boolean |
isNavigated(visad.FieldImpl grid)
Check to see if this is a navigated grid (domain can be converted to
lat/lon)
|
static boolean |
isNavigated(visad.SampledSet spatialSet)
Check to see if this is a navigated domain (can be converted to
lat/lon)
|
static boolean |
isSequence(visad.FieldImpl grid)
Check to see if this is a single grid or if it is a sequence
of grids.
|
static boolean |
isSinglePointDomain(visad.FieldImpl grid)
See if the domain of the grid is a single point (only 1 x and y value).
|
static boolean |
isSinglePointDomain(visad.SampledSet ss)
See if the domain is a single point (only 1 x and y value).
|
static boolean |
isTimeSequence(visad.FieldImpl grid)
Check to see if this is a single grid or if it is a time sequence
of grids.
|
static boolean |
isVolume(visad.FieldImpl grid)
Is the gievn field a volume.
|
static double |
logLikelihood(double[] data,
double lambda) |
static visad.FieldImpl |
lonFlip(visad.FieldImpl grid)
Flip the grid along the central longitude.
|
static void |
main(java.lang.String[] args)
test
|
static visad.FieldImpl |
make2DGridFromSlice(visad.FieldImpl slice)
Transform a 2D slice (3D grid with 2D manifold) into a 2D
grid.
|
static visad.FieldImpl |
make2DGridFromSlice(visad.FieldImpl slice,
boolean copy)
Transform a 2D slice (3D grid with 2D manifold) into a 2D
grid.
|
static visad.data.DataRange |
makeDataRange(Range range)
Make a DataRange from a Range
|
static visad.data.DataRange[] |
makeDataRanges(Range[] range)
Make an array of DataRanges from an array of Ranges
|
static visad.Gridded2DSet |
makeDomain2D(visad.GriddedSet domainSet)
Transform a (possibly) 3D set into a 2D set (removing the Z dimension)
|
static float[][] |
makeGrid(float[][][] grid2D,
int numCols,
int numRows,
float missingValue)
Make a grid structure
|
static float[][] |
makeGrid(float[][] grid2D,
int numCols,
int numRows,
float missingValue)
Make a grid structure
|
static GridUtil.Grid2D |
makeGrid2D(visad.FieldImpl grid)
rectangulrize the given field, making a grid2d out of its spatial domain and values
|
static visad.TupleType |
makeNewParamType(visad.TupleType oldParamType,
java.lang.String newSuffix)
Make a new type for the field by appending the suffix to the exiting
RealTypes in the range
|
static visad.georef.MapProjection |
makeRadarMapProjection(visad.CoordinateSystem radarCS)
Return a MapProjection that relates to the Radar*DCoordinateSystem.
|
static Range |
makeRange(visad.data.DataRange range)
Make a range from a VisAD data range
|
static Range[] |
makeRanges(visad.data.DataRange[] range)
Make an array of Ranges from an array of DataRanges
|
static float |
max(float[] array) |
static visad.FieldImpl |
maxOverTime(visad.FieldImpl grid,
boolean makeTimes)
Deprecated.
use GridMath.maxOverTime(FieldImpl, boolean)
|
static double |
mean(double[] data) |
static visad.FieldImpl |
medianFilter(visad.FieldImpl field,
int window_lenx,
int window_leny)
Process medianFilter mean filtering is simply to replace each pixel value
in an image with the mean (average) value of its neighbors, including itself
|
static visad.FlatField |
medianFilter(visad.FlatField fltFld,
int window_lenx,
int window_leny)
Process medianFilter
|
static float[] |
medianFilter(float[] A,
int lenx,
int leny,
int window_lenx,
int window_leny)
Process medianFilter
|
static float[] |
medianFilterOrg(float[] A,
int lenx,
int leny,
int window_lenx,
int window_leny) |
static float |
min(float[] array) |
static visad.FieldImpl |
minOverTime(visad.FieldImpl grid,
boolean makeTimes)
Deprecated.
use GridMath.minOverTime
|
static double |
normalizeLongitude(visad.SampledSet domain,
double lon)
Make sure a longitude value for use in
a spatial domain Set with Longitude in the spatial domain
is inside the spatial domain's longitude range.
|
static double |
normalizeLongitude(visad.SampledSet domain,
double lon,
visad.Unit lonUnit)
Make sure a longitude value for use in
a spatial domain Set with Longitude in the spatial domain
is inside the spatial domain's longitude range.
|
static visad.Real |
normalizeLongitude(visad.SampledSet domain,
visad.Real lon)
Make sure a longitude value for use in
a spatial domain Set with Longitude in the spatial domain
is inside the spatial domain's longitude range.
|
static java.util.List |
parseXml(org.w3c.dom.Element root,
boolean initialXml)
Process the glyph xml with only polygon glyph.
|
static java.lang.String |
printit(visad.FieldImpl field)
Print the type of the sample of a data object
|
static java.lang.String |
printModes(int samplingMode,
int errorMode)
Print out the sampling and error modes modes
|
static java.util.List<DrawingGlyph> |
read(java.lang.String filename)
respond to the read data call and return list of Glyph
|
static visad.FieldImpl |
replaceRangeValues(visad.FieldImpl grid,
float low,
float high,
float newValue)
Process for classifier
|
static visad.FieldImpl |
resampleGrid(visad.FieldImpl grid,
visad.SampledSet subDomain)
Resample the grid at the positions defined by a SampledSet using
the default methods and error propagation.
|
static visad.FieldImpl |
resampleGrid(visad.FieldImpl grid,
visad.SampledSet subDomain,
int samplingMode)
Resample the grid at the positions defined by a SampledSet using
the method specified and default error propagation.
|
static visad.FieldImpl |
resampleGrid(visad.FieldImpl grid,
visad.SampledSet subDomain,
int samplingMode,
int errorMode)
Resample the grid at the positions defined by a SampledSet.
|
static visad.FieldImpl |
sample(visad.FieldImpl grid,
visad.georef.EarthLocation location)
Sample the grid at the position defined by the EarthLocation
|
static visad.FieldImpl |
sample(visad.FieldImpl grid,
visad.georef.EarthLocation location,
int samplingMode)
Sample the grid at the position defined by the EarthLocation
|
static visad.FieldImpl |
sample(visad.FieldImpl grid,
visad.georef.EarthLocation location,
int samplingMode,
int errorMode)
Sample the grid at the position defined by the EarthLocation
with the VisAD resampling method given.
|
static visad.FieldImpl |
sample(visad.FieldImpl grid,
float lat,
float lon)
Sample the grid at the position defined by the EarthLocation
|
static visad.FieldImpl |
sample(visad.FieldImpl grid,
visad.georef.LatLonPoint point)
Sample the grid at the position defined by the LatLonPoint
|
static visad.FieldImpl |
sample(visad.FieldImpl grid,
visad.georef.LatLonPoint point,
int samplingMode)
Sample the grid at the position defined by the LatLonPoint
|
static visad.FieldImpl |
sample(visad.FieldImpl grid,
visad.georef.LatLonPoint point,
int samplingMode,
int errorMode)
Sample the grid at the position defined by the LatLonPoint
|
static visad.Real |
sampleToReal(visad.FieldImpl grid,
visad.georef.EarthLocation el,
visad.Real animationValue)
This samples the given grid in both time and space and trys to return a
Real value
|
static visad.Real |
sampleToReal(visad.FieldImpl grid,
visad.georef.EarthLocation el,
visad.Real animationValue,
int samplingMode)
This samples the given grid in both time and space and trys to return a
Real value
|
static visad.Real |
sampleToReal(visad.FieldImpl grid,
visad.georef.EarthLocation el,
visad.Real animationValue,
int samplingMode,
int errorMode)
This samples the given grid in both time and space and trys to return a
Real value
|
static visad.RealTuple |
sampleToRealTuple(visad.FieldImpl grid,
visad.georef.EarthLocation el,
visad.Real animationValue,
int samplingMode)
This samples the given grid in both time and space and trys to
return a Real value
|
static visad.RealTuple |
sampleToRealTuple(visad.FieldImpl grid,
visad.georef.EarthLocation el,
visad.Real animationValue,
int samplingMode,
int errorMode)
This samples the given grid in both time and space and trys to return a Real value
|
static visad.FieldImpl |
setAltitudeValues(visad.FieldImpl grid,
float[] altValues)
Set the altitude values for a grid
|
static visad.FieldImpl |
setParamType(visad.FieldImpl grid,
visad.RealType newParam)
Set the range MathType of the lowest element.
|
static visad.FieldImpl |
setParamType(visad.FieldImpl grid,
visad.RealType newParam,
boolean copy)
Set the range MathType of the lowest element.
|
static visad.FieldImpl |
setParamType(visad.FieldImpl grid,
java.lang.String newName)
Set the range MathType of the lowest element.
|
static visad.FieldImpl |
setParamType(visad.FieldImpl grid,
java.lang.String[] newNames,
boolean copy)
Set the range MathType of the lowest element.
|
static visad.FieldImpl |
setParamType(visad.FieldImpl grid,
java.lang.String newName,
boolean copy)
Set the range MathType of the lowest element.
|
static visad.FieldImpl |
setParamType(visad.FieldImpl grid,
visad.TupleType newParam)
Set the range MathType of the lowest element.
|
static visad.FieldImpl |
setParamType(visad.FieldImpl grid,
visad.TupleType newParam,
boolean copy)
Set the range MathType of the lowest element.
|
static visad.FieldImpl |
setPressureValues(visad.FieldImpl grid,
float[] pressValues)
Set the pressure values for a grid
|
static visad.FieldImpl |
setSpatialDomain(visad.FieldImpl grid,
visad.SampledSet newDomain)
Change the spatial domain of a grid using the new one.
|
static visad.FieldImpl |
setSpatialDomain(visad.FieldImpl grid,
visad.SampledSet newDomain,
boolean copy)
Change the spatial domain of a grid using the new one.
|
static visad.FieldImpl |
setVerticalValues(visad.FieldImpl grid,
float[] newValues,
visad.RealType vertType,
visad.Unit vertUnit)
Set the vertical values
|
static visad.FieldImpl |
slice(visad.FieldImpl grid,
visad.SampledSet slice)
Slice the grid at the positions defined by a SampledSet.
|
static visad.FieldImpl |
slice(visad.FieldImpl grid,
visad.SampledSet slice,
int samplingMode)
Slice the grid at the positions defined by a SampledSet.
|
static visad.FieldImpl |
slice(visad.FieldImpl grid,
visad.SampledSet slice,
int samplingMode,
int errorMode)
Slice the grid at the positions defined by a SampledSet.
|
static visad.FieldImpl |
sliceAlongLatLonLine(visad.FieldImpl grid,
visad.georef.LatLonPoint start,
visad.georef.LatLonPoint end)
Slice the grid along the line specified by the two LatLonPoint-s
|
static visad.FieldImpl |
sliceAlongLatLonLine(visad.FieldImpl grid,
visad.georef.LatLonPoint start,
visad.georef.LatLonPoint end,
int samplingMode)
Slice the grid along the line specified by the two LatLonPoint-s
|
static visad.FieldImpl |
sliceAlongLatLonLine(visad.FieldImpl grid,
visad.georef.LatLonPoint start,
visad.georef.LatLonPoint end,
int samplingMode,
int errorMode)
Slice the grid along the line specified by the two LatLonPoint-s
|
static visad.FieldImpl |
sliceAlongLatLonLine(visad.FieldImpl grid,
java.util.List<visad.georef.LatLonPoint> points,
int samplingMode)
Slice the grid along the line specified by the two LatLonPoint-s
|
static visad.FieldImpl |
sliceAlongLatLonLine(visad.FieldImpl grid,
java.util.List<visad.georef.LatLonPoint> points,
int samplingMode,
int errorMode)
Slice the grid along the line specified by the two LatLonPoint-s
|
static visad.FieldImpl |
sliceAtLevel(visad.FieldImpl grid,
double levelValue)
Slice the grid at the vertical level indictated.
|
static visad.FieldImpl |
sliceAtLevel(visad.FieldImpl grid,
visad.Real level)
Slice the grid at the vertical level indictated.
|
static visad.FieldImpl |
sliceAtLevel(visad.FieldImpl grid,
visad.Real level,
int samplingMode)
Slice the grid at the vertical level indictated.
|
static visad.FieldImpl |
sliceAtLevel(visad.FieldImpl grid,
visad.Real level,
int samplingMode,
int errorMode)
Slice the grid at the vertical level indictated.
|
static visad.FieldImpl |
smooth(visad.FieldImpl slice,
java.lang.String type)
Smooth a 2D field
|
static visad.FieldImpl |
smooth(visad.FieldImpl slice,
java.lang.String type,
int filterLevel)
Smooth a 2D field
|
static visad.FieldImpl |
subset(visad.FieldImpl grid,
int skip)
Create a subset of the grid, skipping every nth point in
the X and Y direction.
|
static visad.FieldImpl |
subset(visad.FieldImpl grid,
int skipx,
int skipy)
Create a subset of the grid skipping every i'th x and
j'th y point.
|
static visad.FieldImpl |
subset(visad.FieldImpl grid,
int skipx,
int skipy,
int skipz)
Create a subset of the grid skipping every i'th x and
j'th y point and k'th z point
|
static visad.GriddedSet |
subsetDomain(visad.GriddedSet domainSet,
int skipx,
int skipy,
int skipz)
Create a subset of the domainset skipping every i'th x and
j'th y point.
|
static visad.FieldImpl |
sumFromBaseTime(visad.FieldImpl grid)
Deprecated.
use GridMath.sumFromBaseTime(FieldImpl)
|
static visad.FieldImpl |
sumOverTime(visad.FieldImpl grid,
boolean makeTimes)
Deprecated.
use GridMath.sumOverTime(FieldImpl, boolean)
|
static visad.FieldImpl |
swapLatLon(visad.FieldImpl grid)
Swap the lat/lon coordinates of the grid.
|
static void |
testIt(visad.FieldImpl grid)
test
|
static visad.FieldImpl |
timeStepDifference(visad.FieldImpl grid,
int offset)
Deprecated.
use GridMath.timeStepDifference(FieldImpl, int)
|
static visad.FieldImpl |
timeStepFunc(visad.FieldImpl grid,
int offset,
java.lang.String func)
Deprecated.
use GridMath.timeStepFunc(FieldImpl, int, String)
|
static visad.FieldImpl |
timeStepSum(visad.FieldImpl grid,
int offset)
Deprecated.
use GridMath.timeStepSum(FieldImpl, int)
|
static void |
writeGridAtPolygonToXls(visad.FieldImpl grid,
java.lang.String filename,
java.lang.String fxgrfName)
extract grid along polygon and write out to an Excel spreadsheet
|
static void |
writeGridToXls(visad.FieldImpl grid)
Write grid out to an Excel spreadsheet
|
static void |
writeGridToXls(visad.FieldImpl grid,
java.lang.String filename)
Write grid out to an Excel spreadsheet
|
static double[] |
yeoJohnsonTransform(double[] data,
double lambda) |
static float[] |
yeoJohnsonTransform(float[] data,
double lambda) |
public static final int WEIGHTED_AVERAGE
public static final int NEAREST_NEIGHBOR
public static final int NO_ERRORS
public static final int DEPENDENT_ERRORS
public static final int INDEPENDENT_ERRORS
public static final int DEFAULT_SAMPLING_MODE
public static final int DEFAULT_ERROR_MODE
public static final java.lang.String FUNC_AVERAGE
public static final java.lang.String FUNC_SUM
public static final java.lang.String FUNC_MAX
public static final java.lang.String FUNC_MIN
public static final java.lang.String FUNC_DIFFERENCE
public static final java.lang.String SMOOTH_5POINT
public static final java.lang.String SMOOTH_9POINT
public static final java.lang.String SMOOTH_GAUSSIAN
public static final java.lang.String SMOOTH_CRESSMAN
public static final java.lang.String SMOOTH_CIRCULAR
public static final java.lang.String SMOOTH_RECTANGULAR
public static final visad.RealType ENSEMBLE_TYPE
public static boolean isGrid(visad.FieldImpl field)
field
- fieldImpl to checkpublic static boolean isConstantSpatialDomain(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to checkvisad.VisADException
- problem getting Data objectpublic static visad.SampledSet getSpatialDomain(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to checkvisad.VisADException
- problem getting domain setpublic static visad.SampledSet getWholeSpatialDomain(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to checkvisad.VisADException
- problem getting domain setpublic static visad.SampledSet getSpatialDomain(visad.FieldImpl grid, int timeIndex) throws visad.VisADException
grid
- grid to checktimeIndex
- timestep to checkvisad.VisADException
- problem getting domain setpublic static visad.FieldImpl setSpatialDomain(visad.FieldImpl grid, visad.SampledSet newDomain) throws visad.VisADException
grid
- grid to change.newDomain
- Must have same length as current spatial domain of
gridvisad.VisADException
- wrong domain length or VisAD problem.public static visad.FieldImpl setSpatialDomain(visad.FieldImpl grid, visad.SampledSet newDomain, boolean copy) throws visad.VisADException
grid
- grid to change.newDomain
- Must have same length as current spatial domain of
gridcopy
- copy valuesvisad.VisADException
- wrong domain length or VisAD problem.public static boolean isSinglePointDomain(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to checkvisad.VisADException
- problem accessing gridpublic static boolean isSinglePointDomain(visad.SampledSet ss) throws visad.VisADException
ss
- domain set of the gridvisad.VisADException
- problem accessing gridpublic static boolean isSequence(visad.FieldImpl grid)
grid
- grid to checkisTimeSequence(FieldImpl)
public static boolean hasEnsemble(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to checkvisad.VisADException
- problem determining thispublic static visad.RealType getEnsembleType(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to checkvisad.VisADException
- unable to get the informationhasEnsemble(FieldImpl)
public static visad.Gridded1DSet getEnsembleSet(visad.FieldImpl ensGrid) throws visad.VisADException
ensGrid
- the ensemble gridvisad.VisADException
- problems reading datapublic static boolean isTimeSequence(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to checkvisad.VisADException
- problem determining thispublic static visad.Set getTimeSet(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to checkvisad.VisADException
- problem determining thispublic static java.util.List<visad.DateTime> getDateTimeList(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to checkvisad.VisADException
- problem determining thispublic static boolean isNavigated(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to checkvisad.VisADException
- can't create VisAD objectpublic static boolean isNavigated(visad.SampledSet spatialSet) throws visad.VisADException
spatialSet
- spatial domain of grid to checkvisad.VisADException
- can't create VisAD objectpublic static visad.georef.MapProjection getNavigation(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to usevisad.VisADException
- no navigation or some other errorpublic static visad.georef.MapProjection getNavigation(visad.SampledSet spatialSet) throws visad.VisADException
spatialSet
- spatial set for gridvisad.VisADException
- no navigation or some other errorpublic static boolean isLatLonOrder(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to checkvisad.VisADException
- can't get at VisAD objectspublic static boolean isLatLonOrder(visad.SampledSet spatialSet) throws visad.VisADException
spatialSet
- spatial domain of the gridvisad.VisADException
- can't get at VisAD objectspublic static visad.RealType getSequenceType(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to checkvisad.VisADException
- unable to get the informationisSequence(FieldImpl)
public static boolean is3D(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to checkvisad.VisADException
- unable to get the informationpublic static boolean isVolume(visad.FieldImpl grid) throws visad.VisADException
grid
- The gridvisad.VisADException
- On badnesspublic static visad.RealTuple sampleToRealTuple(visad.FieldImpl grid, visad.georef.EarthLocation el, visad.Real animationValue, int samplingMode) throws visad.VisADException, java.rmi.RemoteException
grid
- The gridel
- LocationanimationValue
- The time to sample at. If null then we
just sample at the locationsamplingMode
- mode to usejava.rmi.RemoteException
- On badnessvisad.VisADException
- On badnesspublic static visad.RealTuple sampleToRealTuple(visad.FieldImpl grid, visad.georef.EarthLocation el, visad.Real animationValue, int samplingMode, int errorMode) throws visad.VisADException, java.rmi.RemoteException
grid
- The gridel
- LocationanimationValue
- The time to sample at. If null then we just sample at the locationsamplingMode
- sampling mode to useerrorMode
- error mode to usejava.rmi.RemoteException
- On badnessvisad.VisADException
- On badnesspublic static visad.Real sampleToReal(visad.FieldImpl grid, visad.georef.EarthLocation el, visad.Real animationValue) throws visad.VisADException, java.rmi.RemoteException
grid
- The gridel
- LocationanimationValue
- Timejava.rmi.RemoteException
- On badnessvisad.VisADException
- On badnesspublic static visad.Real sampleToReal(visad.FieldImpl grid, visad.georef.EarthLocation el, visad.Real animationValue, int samplingMode) throws visad.VisADException, java.rmi.RemoteException
grid
- The gridel
- LocationanimationValue
- The time to sample at. If null then we just sample
at the locationsamplingMode
- mode to usejava.rmi.RemoteException
- On badnessvisad.VisADException
- On badnesspublic static visad.Real sampleToReal(visad.FieldImpl grid, visad.georef.EarthLocation el, visad.Real animationValue, int samplingMode, int errorMode) throws visad.VisADException, java.rmi.RemoteException
grid
- The gridel
- LocationanimationValue
- The time to sample at. If null then we just sample
at the locationsamplingMode
- sampling mode to useerrorMode
- error mode to usejava.rmi.RemoteException
- On badnessvisad.VisADException
- On badnesspublic static boolean is3D(visad.SampledSet domainSet) throws visad.VisADException
domainSet
- spatial domain of the gridvisad.VisADException
- unable to get the informationpublic static boolean is2D(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to checkvisad.VisADException
- unable to get the informationpublic static boolean is2D(visad.SampledSet domainSet) throws visad.VisADException
domainSet
- spatial domain to checkvisad.VisADException
- unable to get the informationpublic static visad.FieldImpl subset(visad.FieldImpl grid, int skip) throws visad.VisADException
grid
- grid to subsetskip
- x and y skip factorvisad.VisADException
- unable to subset the gridpublic static visad.FieldImpl subset(visad.FieldImpl grid, int skipx, int skipy) throws visad.VisADException
grid
- grid to subsampleskipx
- x skip factorskipy
- y skip factorvisad.VisADException
- unable to subsample gridpublic static visad.FieldImpl subset(visad.FieldImpl grid, int skipx, int skipy, int skipz) throws visad.VisADException
grid
- grid to subsampleskipx
- x skip factorskipy
- y skip factorskipz
- z skip factorvisad.VisADException
- unable to subsample gridpublic static visad.GriddedSet subsetDomain(visad.GriddedSet domainSet, int skipx, int skipy, int skipz) throws visad.VisADException
domainSet
- domain to subsampleskipx
- x skip factorskipy
- y skip factorskipz
- z skip factorvisad.VisADException
- unable to subsample gridpublic static visad.FieldImpl sliceAtLevel(visad.FieldImpl grid, visad.Real level) throws visad.VisADException
grid
- grid to slice (must be a valid 3D grid)level
- level to slice at. level must have units
convertible with the vertial coordinate of the spatial
domain or it's reference if there is a CoordinateSystem
associated with the domain.visad.VisADException
- problem in resamplingpublic static visad.FieldImpl sliceAtLevel(visad.FieldImpl grid, visad.Real level, int samplingMode) throws visad.VisADException
grid
- grid to slice (must be a valid 3D grid)level
- level to slice at. level must have units
convertible with the vertial coordinate of the spatial
domain or it's reference if there is a CoordinateSystem
associated with the domain.samplingMode
- Data.WEIGHTED_AVERAGE or Data.NEAREST_NEIGHBORvisad.VisADException
- problem in resamplingpublic static visad.FieldImpl sliceAtLevel(visad.FieldImpl grid, visad.Real level, int samplingMode, int errorMode) throws visad.VisADException
grid
- grid to slice (must be a valid 3D grid)level
- level to slice at. level must have units
convertible with the vertial coordinate of the spatial
domain or it's reference if there is a CoordinateSystem
associated with the domain.samplingMode
- Data.WEIGHTED_AVERAGE or Data.NEAREST_NEIGHBORerrorMode
- Data.NO_ERRORS, Data.DEPENDENT, Data.INDEPENDENTvisad.VisADException
- problem in resamplingpublic static boolean isAllMissing(visad.FieldImpl field) throws visad.VisADException
field
- fieldImpl to checkvisad.VisADException
- unable to open VisAD objectpublic static boolean isAllMissing(visad.FieldImpl grid, boolean popupErrorMessage) throws visad.VisADException
grid
- grid to checkpopupErrorMessage
- pop up a JOptionDialog box is all are missingvisad.VisADException
- unable to open VisAD objectpublic static boolean isAnyMissing(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to checkvisad.VisADException
- unable to open VisAD objectpublic static visad.FieldImpl averageOverTime(visad.FieldImpl grid, boolean makeTimes) throws visad.VisADException
grid
- grid to averagemakeTimes
- If true then make a time field with the range being the same computed value
If false then just return a single field of the computed valuesvisad.VisADException
- On badnesspublic static visad.FieldImpl timeStepDifference(visad.FieldImpl grid, int offset) throws visad.VisADException
grid
- grid to averageoffset
- time step offset. e.g., offset=-1 results in D(T)=D(T)-D(T-1)visad.VisADException
- On badnesspublic static visad.FieldImpl timeStepSum(visad.FieldImpl grid, int offset) throws visad.VisADException
grid
- grid to averageoffset
- time step offset. e.g., offset=-1 results in D(T)=D(T)+D(T-1)visad.VisADException
- On badnesspublic static visad.FieldImpl differenceFromBaseTime(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to averagevisad.VisADException
- On badnesspublic static visad.FieldImpl sumFromBaseTime(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to averagevisad.VisADException
- On badnesspublic static visad.FieldImpl timeStepFunc(visad.FieldImpl grid, int offset, java.lang.String func) throws visad.VisADException
grid
- grid to averageoffset
- time step offset.func
- which function to apply, SUM or DIFFERENCEvisad.VisADException
- On badnesspublic static visad.FieldImpl sumOverTime(visad.FieldImpl grid, boolean makeTimes) throws visad.VisADException
grid
- grid to analyzemakeTimes
- If true then make a time field with the range
being the same computed value. If false then just
return a single field of the computed valuesvisad.VisADException
- On badnesspublic static visad.FieldImpl minOverTime(visad.FieldImpl grid, boolean makeTimes) throws visad.VisADException
grid
- grid to analyzemakeTimes
- If true then make a time field with the range
being the same computed value. If false then just
return a single field of the computed valuesvisad.VisADException
- On badnesspublic static visad.FieldImpl maxOverTime(visad.FieldImpl grid, boolean makeTimes) throws visad.VisADException
grid
- grid to analyzemakeTimes
- If true then make a time field with the range
being the same computed value. If false then just
return a single field of the computed valuesvisad.VisADException
- On badnesspublic static visad.FieldImpl applyFunctionOverTime(visad.FieldImpl grid, java.lang.String function, boolean makeTimes) throws visad.VisADException
grid
- grid to averagefunction
- One of the GridMath.FUNC_ enumsmakeTimes
- If true then make a time field with the range
being the same computed value. If false then just
return a single field of the computed valuesvisad.VisADException
- On badnesspublic static visad.Gridded2DSet makeDomain2D(visad.GriddedSet domainSet) throws visad.VisADException
domainSet
- the 2 or 3D domainvisad.VisADException
- unable to create 2D slicepublic static visad.FieldImpl addLevelToGrid(visad.FieldImpl grid, double levelValue, java.lang.String levelUnit) throws visad.VisADException
grid
- the gridlevelValue
- the level valuelevelUnit
- the level unitvisad.VisADException
- for badpublic static visad.TupleType makeNewParamType(visad.TupleType oldParamType, java.lang.String newSuffix) throws visad.VisADException
oldParamType
- old parameter type containing only real componentsnewSuffix
- the new suffix for Range RealTypesvisad.VisADException
- problem creating new typespublic static GridUtil.Grid2D makeGrid2D(visad.FieldImpl grid) throws visad.VisADException, java.rmi.RemoteException
grid
- the gridjava.rmi.RemoteException
- On badnessvisad.VisADException
- On badnesspublic static void testIt(visad.FieldImpl grid) throws visad.VisADException, java.rmi.RemoteException
grid
- testjava.rmi.RemoteException
- On badnessvisad.VisADException
- On badnesspublic static visad.FieldImpl sliceAtLevel(visad.FieldImpl grid, double levelValue) throws visad.VisADException
grid
- grid to slice (must be a valid 3D grid)levelValue
- level value to slice at. Value is assumed
to be in the units of the vertical coordinate of the
spatial domain of the FieldImplvisad.VisADException
- problem in resamplingpublic static visad.FieldImpl getProfileAtLatLonPoint(visad.FieldImpl grid, visad.georef.LatLonPoint point) throws visad.VisADException
null
if no such profile could be created.grid
- grid to slice (must be a valid 3D grid)point
- LatLonPoint to sample at.null
. If this is a
sequence of grids it will be a sequence of the slices.visad.VisADException
- problem in resamplingpublic static visad.FieldImpl getProfileAtLatLonPoint(visad.FieldImpl grid, visad.georef.LatLonPoint point, int samplingMode) throws visad.VisADException
null
if no such profile could be created.grid
- grid to slice (must be a valid 3D grid)point
- LatLonPoint to sample at.samplingMode
- Data.WEIGHTED_AVERAGE or NEAREST_NEIGHBORnull
. If this is a
sequence of grids it will be a sequence of the slices.visad.VisADException
- problem in resamplingpublic static visad.FieldImpl getProfileAtLatLonPoint(visad.FieldImpl grid, visad.georef.LatLonPoint point, int samplingMode, int errorMode) throws visad.VisADException
null
if no such profile could be created.grid
- grid to slice (must be a valid 3D grid)point
- LatLonPoint to sample at.samplingMode
- Data.WEIGHTED_AVERAGE or NEAREST_NEIGHBORerrorMode
- Data.NO_ERRORS, Data.DEPENDENT, Data.INDEPENDENTnull
. If this is a
sequence of grids it will be a sequence of the slices.visad.VisADException
- problem in resamplingpublic static visad.FieldImpl sliceAlongLatLonLine(visad.FieldImpl grid, visad.georef.LatLonPoint start, visad.georef.LatLonPoint end) throws visad.VisADException
grid
- grid to slice (must be a valid 2D or 3D grid)start
- starting LatLonPoint of the lineend
- starting LatLonPoint of the linevisad.VisADException
- problem in resamplingpublic static visad.FieldImpl sliceAlongLatLonLine(visad.FieldImpl grid, visad.georef.LatLonPoint start, visad.georef.LatLonPoint end, int samplingMode) throws visad.VisADException
grid
- grid to slice (must be a valid 2D or 3D grid)start
- starting LatLonPoint of the lineend
- starting LatLonPoint of the linesamplingMode
- Data.WEIGHTED_AVERAGE or NEAREST_NEIGHBORvisad.VisADException
- problem in resamplingpublic static visad.FieldImpl sliceAlongLatLonLine(visad.FieldImpl grid, java.util.List<visad.georef.LatLonPoint> points, int samplingMode) throws visad.VisADException
grid
- grid to slice (must be a valid 2D or 3D grid)points
- list of points along the linesamplingMode
- mode for samplingvisad.VisADException
- problem in resamplingpublic static visad.FieldImpl sliceAlongLatLonLine(visad.FieldImpl grid, java.util.List<visad.georef.LatLonPoint> points, int samplingMode, int errorMode) throws visad.VisADException
grid
- grid to slice (must be a valid 2D or 3D grid)points
- list of points along the linesamplingMode
- mode for samplingerrorMode
- Data.NO_ERRORS, Data.DEPENDENT, Data.INDEPENDENTvisad.VisADException
- problem in resamplingpublic static visad.FieldImpl sliceAlongLatLonLine(visad.FieldImpl grid, visad.georef.LatLonPoint start, visad.georef.LatLonPoint end, int samplingMode, int errorMode) throws visad.VisADException
grid
- grid to slice (must be a valid 2D or 3D grid)start
- starting LatLonPoint of the lineend
- starting LatLonPoint of the linesamplingMode
- mode for samplingerrorMode
- Data.NO_ERRORS, Data.DEPENDENT, Data.INDEPENDENTvisad.VisADException
- problem in resamplingpublic static visad.FieldImpl sample(visad.FieldImpl grid, visad.georef.EarthLocation location) throws visad.VisADException
grid
- grid to sample (must be a valid 3D grid)location
- EarthLocation to sample at.visad.VisADException
- invalid point or some other problempublic static visad.FieldImpl sample(visad.FieldImpl grid, float lat, float lon) throws visad.VisADException, java.rmi.RemoteException
grid
- grid to sample (must be a valid 3D grid)lat
- EarthLocation to sample at.lon
- EarthLocation to sample at.visad.VisADException
- invalid point or some other problemjava.rmi.RemoteException
public static visad.FieldImpl sample(visad.FieldImpl grid, visad.georef.EarthLocation location, int samplingMode) throws visad.VisADException
grid
- grid to sample (must be a valid 3D grid)location
- EarthLocation to sample at.samplingMode
- Data.WEIGHTED_AVERAGE or NEAREST_NEIGHBORvisad.VisADException
- invalid point or some other problempublic static visad.FieldImpl sample(visad.FieldImpl grid, visad.georef.EarthLocation location, int samplingMode, int errorMode) throws visad.VisADException
grid
- grid to sample (must be a valid 3D grid)location
- EarthLocation to sample at.samplingMode
- Data.WEIGHTED_AVERAGE or NEAREST_NEIGHBORerrorMode
- Data.NO_ERRORS, Data.DEPENDENT, Data.INDEPENDENTvisad.VisADException
- invalid point or some other problempublic static visad.FieldImpl sample(visad.FieldImpl grid, visad.georef.LatLonPoint point) throws visad.VisADException
grid
- grid to sample (must be a valid 3D grid)point
- LatLonPoint to sample at.visad.VisADException
- invalid point or some other problempublic static visad.FieldImpl sample(visad.FieldImpl grid, visad.georef.LatLonPoint point, int samplingMode) throws visad.VisADException
grid
- grid to sample (must be a valid 3D grid)point
- LatLonPoint to sample at.samplingMode
- Data.WEIGHTED_AVERAGE or NEAREST_NEIGHBORvisad.VisADException
- invalid point or some other problempublic static visad.FieldImpl sample(visad.FieldImpl grid, visad.georef.LatLonPoint point, int samplingMode, int errorMode) throws visad.VisADException
grid
- grid to sample (must be a valid 3D grid)point
- LatLonPoint to sample at.samplingMode
- Data.WEIGHTED_AVERAGE or NEAREST_NEIGHBORerrorMode
- Data.NO_ERRORS, Data.DEPENDENT, Data.INDEPENDENTvisad.VisADException
- invalid point or some other problempublic static visad.FieldImpl slice(visad.FieldImpl grid, visad.SampledSet slice) throws visad.VisADException
grid
- grid to slice (must be a valid 3D grid)slice
- set of points to sample on. It must be compatible
with the spatial domain of the grid.visad.VisADException
- invalid slice or some other problempublic static visad.FieldImpl slice(visad.FieldImpl grid, visad.SampledSet slice, int samplingMode) throws visad.VisADException
grid
- grid to slice (must be a valid 3D grid)slice
- set of points to sample on. It must be compatible
with the spatial domain of the grid.samplingMode
- Data.WEIGHTED_AVERAGE or NEAREST_NEIGHBORvisad.VisADException
- invalid slice or some other problempublic static visad.FieldImpl slice(visad.FieldImpl grid, visad.SampledSet slice, int samplingMode, int errorMode) throws visad.VisADException
grid
- grid to slice (must be a valid 3D grid)slice
- set of points to sample on. It must be compatible
with the spatial domain of the grid.samplingMode
- Data.WEIGHTED_AVERAGE or NEAREST_NEIGHBORerrorMode
- Data.NO_ERRORS, Data.DEPENDENT, Data.INDEPENDENTvisad.VisADException
- invalid slice or some other problempublic static visad.FieldImpl make2DGridFromSlice(visad.FieldImpl slice) throws visad.VisADException
slice
- slice to transformvisad.VisADException
- unable to create 2D slicepublic static visad.FieldImpl make2DGridFromSlice(visad.FieldImpl slice, boolean copy) throws visad.VisADException
slice
- slice to transformcopy
- true to copy datavisad.VisADException
- unable to create 2D slicepublic static visad.Unit[] getParamUnits(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to checkvisad.VisADException
- unable to get at data typespublic static java.lang.String printit(visad.FieldImpl field) throws visad.VisADException, java.rmi.RemoteException
field
- the fieldjava.rmi.RemoteException
- java RMI problemvisad.VisADException
- unable to get at data typespublic static visad.TupleType getParamType(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to checkvisad.VisADException
- unable to get at data typespublic static visad.FieldImpl getParam(visad.FieldImpl grid, int index) throws visad.VisADException
grid
- grid to checkindex
- parameter indexvisad.VisADException
- unable to get at data typespublic static visad.FieldImpl getParam(visad.FieldImpl grid, int index, boolean copy) throws visad.VisADException
grid
- grid to checkindex
- parameter indexcopy
- true to make a copyvisad.VisADException
- unable to get at data typespublic static visad.FieldImpl setParamType(visad.FieldImpl grid, java.lang.String newName) throws visad.VisADException
grid
- grid to changenewName
- name of new parametervisad.VisADException
- problem setting new parameterpublic static visad.FieldImpl setParamType(visad.FieldImpl grid, java.lang.String newName, boolean copy) throws visad.VisADException
grid
- grid to changenewName
- name of new parametercopy
- true to make a copyvisad.VisADException
- problem setting new parameterpublic static visad.FieldImpl setParamType(visad.FieldImpl grid, java.lang.String[] newNames, boolean copy) throws visad.VisADException
grid
- grid to changenewNames
- names of new parameterscopy
- true to make a copyvisad.VisADException
- problem setting new parameterpublic static visad.FieldImpl setParamType(visad.FieldImpl grid, visad.RealType newParam) throws visad.VisADException
grid
- grid to changenewParam
- MathType of new parametervisad.VisADException
- problem setting new parameterpublic static visad.FieldImpl setParamType(visad.FieldImpl grid, visad.RealType newParam, boolean copy) throws visad.VisADException
grid
- grid to changenewParam
- RealType of new parametercopy
- true to copy datavisad.VisADException
- problem setting new parameterpublic static visad.FieldImpl setParamType(visad.FieldImpl grid, visad.TupleType newParam) throws visad.VisADException
grid
- grid to changenewParam
- MathType of new parametervisad.VisADException
- problem setting new parameterpublic static visad.FieldImpl setParamType(visad.FieldImpl grid, visad.TupleType newParam, boolean copy) throws visad.VisADException
grid
- grid to changenewParam
- MathType of new parametercopy
- true to copy the datavisad.VisADException
- problem setting new parameterpublic static visad.FieldImpl extractParam(visad.FieldImpl grid, visad.ScalarType param) throws visad.VisADException
grid
- grid to changeparam
- MathType of new parametervisad.VisADException
- problem setting new parameterpublic visad.FieldImpl extractParam(visad.FieldImpl grid, visad.MathType paramType) throws visad.VisADException
grid
- to extract fromparamType
- param to extractvisad.VisADException
- some problem occured (like the param isn't
in the grid)public static visad.Real normalizeLongitude(visad.SampledSet domain, visad.Real lon) throws visad.VisADException
domain
- domain set of value for normalizationlon
- longitudevisad.VisADException
- problem accessing setpublic static double normalizeLongitude(visad.SampledSet domain, double lon) throws visad.VisADException
domain
- domain set of value for normalizationlon
- longitude valuesvisad.VisADException
- problem accessing setpublic static double normalizeLongitude(visad.SampledSet domain, double lon, visad.Unit lonUnit) throws visad.VisADException
domain
- domain set of value for normalizationlon
- longitude valueslonUnit
- longitude unitvisad.VisADException
- problem accessing setpublic static visad.georef.MapProjection makeRadarMapProjection(visad.CoordinateSystem radarCS) throws visad.VisADException
radarCS
- radar coordinate system (Radar2DCoordinateSystem or
Radar3DCoordinateSystem)visad.VisADException
- problem creating MapProjection.public static visad.FieldImpl resampleGrid(visad.FieldImpl grid, visad.SampledSet subDomain) throws visad.VisADException
grid
- grid to resample (must be a valid 3D grid)subDomain
- set of points to sample on. It must be compatible
with the spatial domain of the grid.visad.VisADException
- invalid subDomain or some other problempublic static visad.FieldImpl resampleGrid(visad.FieldImpl grid, visad.SampledSet subDomain, int samplingMode) throws visad.VisADException
grid
- grid to resample (must be a valid 3D grid)subDomain
- set of points to sample on. It must be compatible
with the spatial domain of the grid.samplingMode
- sampling method to use for slicingvisad.VisADException
- invalid subDomain or some other problempublic static visad.RealTuple getCenterPoint(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to evaluatevisad.VisADException
- problem accessing the datapublic static visad.RealTuple getCenterPoint(visad.SampledSet spatialDomain) throws visad.VisADException
spatialDomain
- domain to evaluatevisad.VisADException
- problem accessing the datapublic static visad.georef.LatLonPoint getCenterLatLonPoint(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to evaluatevisad.VisADException
- problem accessing the datapublic static visad.georef.LatLonPoint getCenterLatLonPoint(visad.SampledSet spatialDomain) throws visad.VisADException
spatialDomain
- domain to evaluatevisad.VisADException
- problem accessing the datapublic static visad.FieldImpl resampleGrid(visad.FieldImpl grid, visad.SampledSet subDomain, int samplingMode, int errorMode) throws visad.VisADException
grid
- grid to resample (must be a valid 3D grid)subDomain
- set of points to sample on. It must be compatible
with the spatial domain of the grid.samplingMode
- sampling method to use for slicingerrorMode
- error method to use for error propagationvisad.VisADException
- invalid subDomain or some other problempublic static visad.Real getLevel(visad.FieldImpl grid, visad.Real altitude) throws visad.VisADException
grid
- grid to usealtitude
- altitude to convert.visad.VisADException
- for badpublic static visad.Real getAltitude(visad.FieldImpl grid, visad.Real level) throws visad.VisADException
grid
- grid to uselevel
- must be compatible (unit wise) with vertical coordinate
of the gridvisad.VisADException
- VisAD errorpublic static visad.Real getAltitude(visad.SampledSet domainSet, visad.Real level) throws visad.VisADException
domainSet
- sampledSet to uselevel
- must be compatible (unit wise) with vertical coordinate
of the gridvisad.VisADException
- VisAD errorpublic static visad.RealType getVerticalType(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to checkvisad.VisADException
- problem getting the typepublic static visad.RealType getVerticalType(visad.SampledSet domainSet) throws visad.VisADException
domainSet
- domainSet to checkvisad.VisADException
- problem getting the typepublic static visad.Unit getVerticalUnit(visad.FieldImpl grid) throws visad.VisADException
grid
- domain to checkvisad.VisADException
- problem getting the unitpublic static visad.Unit getVerticalUnit(visad.SampledSet domainSet) throws visad.VisADException
domainSet
- domain to checkvisad.VisADException
- problem getting the unitpublic static boolean canSliceAtLevel(visad.FieldImpl grid, visad.Real level) throws visad.VisADException
grid
- grid in questionlevel
- level in questionvisad.VisADException
- problem creating VisAD objectpublic static boolean canSliceAtLevel(visad.SampledSet spatialSet, visad.Real level) throws visad.VisADException
spatialSet
- domain set to checklevel
- level in questionvisad.VisADException
- problem creating VisAD objectpublic static Range[] fieldMinMax(visad.FlatField field) throws visad.VisADException, java.rmi.RemoteException
field
- a VisAD FlatField. Cannot be nulljava.rmi.RemoteException
- Java RMI errorvisad.VisADException
- VisAD Errorpublic static Range makeRange(visad.data.DataRange range)
range
- the data rangepublic static Range[] makeRanges(visad.data.DataRange[] range)
range
- the DataRangespublic static visad.data.DataRange makeDataRange(Range range)
range
- the Rangepublic static visad.data.DataRange[] makeDataRanges(Range[] range)
range
- the Rangespublic static Range[] getMinMax(visad.FieldImpl fieldImpl) throws visad.VisADException, java.rmi.RemoteException
fieldImpl
- input field with outer dimension of timejava.rmi.RemoteException
- Java RMI errorvisad.VisADException
- VisAD Errorpublic static java.lang.String printModes(int samplingMode, int errorMode)
samplingMode
- sampling modeerrorMode
- error modepublic static visad.FieldImpl getGridAsPointObs(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to convertvisad.VisADException
- problem getting datapublic static float[][] getEarthLocationPoints(visad.GriddedSet domain) throws visad.VisADException
domain
- the domain setvisad.VisADException
- problem converting pointspublic static int[][] findContainedIndices(visad.GriddedSet domain, visad.UnionSet map) throws visad.VisADException
domain
- domain to usemap
- the map lines containing bounding polygonsvisad.VisADException
- problem samplingpublic static int[][] findContainedIndices(float[][] latlon, visad.UnionSet map) throws visad.VisADException
latlon
- set of lat/lon valuesmap
- the map lines containing bounding polygonsvisad.VisADException
- problem samplingpublic static int[][] findNotContainedIndices(visad.GriddedSet domain, visad.UnionSet map) throws visad.VisADException
domain
- grid domainmap
- map of valuesvisad.VisADException
- problem getting at the datapublic static int[][] findNotContainedIndices(float[][] latlon, visad.UnionSet map) throws visad.VisADException
latlon
- set of lat/lon valuesmap
- the map lines containing bounding polygonsvisad.VisADException
- problem samplingpublic static float[][][] getLatLons(visad.GriddedSet domain, int[][] indices) throws visad.VisADException
indices
- index array we get from findContainedIndices methods. i.e., indices[numPolygons][numIndices]domain
- domain to usefloat[numPolygonPoints][2][numPoints]
visad.VisADException
- problem samplingpublic static float[][][] getLatLons(float[][] latlons, int[][] indices) throws visad.VisADException
indices
- index array we get from findContainedIndices methods. i.e., indices[numPolygons][numIndices]latlons
- lat/lons from the spatial domainfloat[numPolygonPoints][2][numPoints]
visad.VisADException
- problem samplingpublic static float[][][] findContainedLatLons(visad.GriddedSet domain, visad.UnionSet maps) throws visad.VisADException
domain
- domain to usemaps
- The mapsfloat[numPolygonPoints][2][numPoints]
visad.VisADException
- problem samplingpublic static float[][][] findContainedLatLons(float[][] latlons, visad.UnionSet maps) throws visad.VisADException
latlons
- the lat/lons from the domainmaps
- The mapsfloat[numPolygonPoints][2][numPoints]
visad.VisADException
- problem samplingpublic static int[][] findIndicesInsideRange(float[][] values, float min, float max) throws visad.VisADException
values
- valuesmin
- min valuemax
- max valuevisad.VisADException
- On badnesspublic static int[][] findIndicesOutsideRange(float[][] values, float min, float max) throws visad.VisADException
values
- valuesmin
- min valuemax
- max valuevisad.VisADException
- On badnesspublic static float[][] getLatLon(visad.GriddedSet domain) throws visad.VisADException
domain
- the domain setvisad.VisADException
- problem converting pointspublic static ucar.unidata.geoloc.LatLonRect getLatLonRect(visad.GriddedSet domain) throws visad.VisADException
domain
- the domain setvisad.VisADException
- problem converting pointspublic static float max(float[] array)
public static float min(float[] array)
public static void main(java.lang.String[] args) throws java.lang.Exception
args
- argsjava.lang.Exception
- On badnesspublic static void writeGridToXls(visad.FieldImpl grid) throws java.lang.Exception
grid
- grid to writejava.lang.Exception
- problem writing gridpublic static void writeGridToXls(visad.FieldImpl grid, java.lang.String filename) throws java.lang.Exception
grid
- grid to writefilename
- filenamejava.lang.Exception
- problem writing gridpublic static void writeGridAtPolygonToXls(visad.FieldImpl grid, java.lang.String filename, java.lang.String fxgrfName) throws java.lang.Exception
grid
- grid to writefilename
- filenamefxgrfName
- xgrf filenamejava.lang.Exception
- problem writing gridpublic static void exportGridToNetcdf(visad.FieldImpl grid) throws java.lang.Exception
grid
- grid to writejava.lang.Exception
- problem writing gridpublic static void exportGridToNetcdf(visad.FieldImpl grid, java.lang.String filename) throws java.lang.Exception
grid
- grid to writefilename
- filenamejava.lang.Exception
- problem writing gridpublic static visad.FieldImpl setPressureValues(visad.FieldImpl grid, float[] pressValues) throws visad.VisADException
grid
- grid to changepressValues
- pressure values. Must match number of levels in
the grid. Units are millibars.visad.VisADException
- problem setting the valuespublic static visad.FieldImpl setAltitudeValues(visad.FieldImpl grid, float[] altValues) throws visad.VisADException
grid
- grid to changealtValues
- altitude values. Must match number of levels in
the grid. Units are meters.visad.VisADException
- problem setting the valuespublic static visad.FieldImpl setVerticalValues(visad.FieldImpl grid, float[] newValues, visad.RealType vertType, visad.Unit vertUnit) throws visad.VisADException
grid
- the grid to changenewValues
- the new vertical values. Must match the number
of vertical levels in the grid.vertType
- the type of the datavertUnit
- the unit of newValues
visad.VisADException
- problem setting the valuespublic static java.util.List<FieldStats> findMinMaxAverage(visad.FieldImpl field, visad.UnionSet mapSets) throws visad.VisADException, java.rmi.RemoteException
field
- the fieldmapSets
- The map setsjava.rmi.RemoteException
- Java RMI problemvisad.VisADException
- problem getting the valuespublic static FieldStats findMinMaxAverageFromRange(visad.FlatField field, visad.UnionSet mapSets) throws visad.VisADException, java.rmi.RemoteException
field
- the fieldmapSets
- the mapsetsjava.rmi.RemoteException
- Java RMI errorvisad.VisADException
- VisAD Data errorpublic static boolean canSwapLatLon(visad.FieldImpl grid) throws visad.VisADException
grid
- to checkvisad.VisADException
- problem determining if we can swappublic static visad.FieldImpl swapLatLon(visad.FieldImpl grid) throws visad.VisADException
grid
- grid to swapvisad.VisADException
- VisAD problempublic static visad.FieldImpl smooth(visad.FieldImpl slice, java.lang.String type) throws visad.VisADException
slice
- the 2D slicetype
- the type of smoothing (SMOOTH_5POINT, etc)visad.VisADException
- VisAD Errorpublic static visad.FieldImpl smooth(visad.FieldImpl slice, java.lang.String type, int filterLevel) throws visad.VisADException
slice
- the 2D slicetype
- the type of smoothing (SMOOTH_5POINT, etc)filterLevel
- level of filtering (used for SMOOTH_GAUSSIAN only)visad.VisADException
- VisAD Errorpublic static float[][] makeGrid(float[][] grid2D, int numCols, int numRows, float missingValue)
grid2D
- the valuesnumCols
- number of columnsnumRows
- number of rowsmissingValue
- the missing valuepublic static float[][] makeGrid(float[][][] grid2D, int numCols, int numRows, float missingValue)
grid2D
- the valuesnumCols
- number of columnsnumRows
- number of rowsmissingValue
- the missing valuepublic static void fillMissing(float[][] grid2D, float missingValue)
grid2D
- grid structuremissingValue
- missing valuepublic static visad.FieldImpl lonFlip(visad.FieldImpl grid) throws visad.VisADException, java.rmi.RemoteException
grid
- the grid to flipjava.rmi.RemoteException
- Java RMI problemvisad.VisADException
- VisAD problem reading datapublic static boolean isLonCyclic(double first, double last)
first
- first valuelast
- last valuepublic static boolean isLonCyclic(double first, double last, double epsilon)
first
- first valuelast
- last valueepsilon
- last valuepublic static java.util.List<DrawingGlyph> read(java.lang.String filename)
filename
- input file namepublic static java.util.List parseXml(org.w3c.dom.Element root, boolean initialXml) throws visad.VisADException, java.rmi.RemoteException
root
- Root of the xml dominitialXml
- Did this come from the data choice or from an importjava.rmi.RemoteException
- When bad things happenvisad.VisADException
- When bad things happenpublic static visad.UnionSet glyphsToMap(visad.GriddedSet domainSet, java.util.List glyphs) throws java.lang.Exception
domainSet
- domain setglyphs
- list of polygon glyphjava.lang.Exception
- for badpublic static visad.FieldImpl medianFilter(visad.FieldImpl field, int window_lenx, int window_leny) throws visad.VisADException, java.rmi.RemoteException, java.lang.CloneNotSupportedException
field
- inputwindow_lenx
- default value is 10window_leny
- default value is 10visad.VisADException
- for badjava.rmi.RemoteException
- for badjava.lang.CloneNotSupportedException
- for badpublic static visad.FlatField medianFilter(visad.FlatField fltFld, int window_lenx, int window_leny) throws visad.VisADException, java.rmi.RemoteException
fltFld
- input ffwindow_lenx
- default value is 10window_leny
- default value is 10visad.VisADException
- for badjava.rmi.RemoteException
- for badpublic static float[] medianFilter(float[] A, int lenx, int leny, int window_lenx, int window_leny) throws visad.VisADException
A
- array of floatlenx
- x dimensionleny
- y dimensionwindow_lenx
- x dimension lengthwindow_leny
- y dimension lengthvisad.VisADException
- for badpublic static float[] medianFilterOrg(float[] A, int lenx, int leny, int window_lenx, int window_leny) throws visad.VisADException
visad.VisADException
public static visad.FieldImpl classifier(visad.FieldImpl field, java.lang.String classifierStr, java.lang.String outFileName) throws java.lang.Exception
field
- the input fieldclassifierStr
- input string of classifieroutFileName
- output file namejava.lang.Exception
- for badpublic static visad.FieldImpl replaceRangeValues(visad.FieldImpl grid, float low, float high, float newValue) throws visad.VisADException, java.rmi.RemoteException
grid
- the input fieldlow
- lower rangehigh
- higher rangenewValue
- replace valuevisad.VisADException
- for badjava.rmi.RemoteException
- for badpublic static double[] yeoJohnsonTransform(double[] data, double lambda)
public static float[] yeoJohnsonTransform(float[] data, double lambda)
public static double findOptimalLambda(double[] data, double minLambda, double maxLambda, double stepSize)
public static double findOptimalLambda(float[] data, double minLambda, double maxLambda, double stepSize)
public static double logLikelihood(double[] data, double lambda)
public static double mean(double[] data)