public interface GridDatatype extends IsMissingEvaluator, java.lang.Comparable<GridDatatype>
Modifier and Type | Method and Description |
---|---|
Attribute |
findAttributeIgnoreCase(java.lang.String name)
Convenience function; lookup Attribute by name.
|
java.lang.String |
findAttValueIgnoreCase(java.lang.String attName,
java.lang.String defaultValue)
Convenience function; lookup Attribute value by name.
|
java.util.List<Attribute> |
getAttributes()
Get a List of Attribute specific to the Grid
|
GridCoordSystem |
getCoordinateSystem()
get the Grid's Coordinate System.
|
DataType |
getDataType()
get the data type
|
java.lang.String |
getDescription()
Get the description/long_name of the Grid, or null if none.
|
Dimension |
getDimension(int i)
get the ith dimension
|
java.util.List<Dimension> |
getDimensions()
Returns a List of Dimension containing the dimensions used by this grid.
|
Dimension |
getEnsembleDimension()
get the ensemble Dimension, if it exists
|
int |
getEnsembleDimensionIndex()
get the ensemble Dimension index in the geogrid (canonical order), or -1 if none
|
java.lang.String |
getFullName()
Get the full, unescaped name of the Grid
|
java.lang.String |
getInfo()
human readable information about this Grid.
|
MAMath.MinMax |
getMinMaxSkipMissingData(Array data)
Get the minimum and the maximum data value of the previously read Array,
skipping missing values as defined by isMissingData(double val).
|
java.lang.String |
getName()
Alias for getFullName().
|
ProjectionImpl |
getProjection()
get the Projection, if it exists.
|
int |
getRank()
get the rank
|
Dimension |
getRunTimeDimension()
get the runtime Dimension, if it exists
|
int |
getRunTimeDimensionIndex()
get the runtime Dimension index in the geogrid (canonical order), or -1 if none
|
int[] |
getShape()
get the shape (canonical ordering)
|
java.lang.String |
getShortName()
Get the short name of the Grid
|
Dimension |
getTimeDimension()
get the time Dimension, if it exists
|
int |
getTimeDimensionIndex()
get the time Dimension index in the geogrid (canonical order), or -1 if none
|
java.lang.String |
getUnitsString()
Get the unit string
|
VariableDS |
getVariable()
Get the underlying Variable, if it exists.
|
Dimension |
getXDimension()
get the x Dimension, if it exists
|
int |
getXDimensionIndex()
get the x Dimension index in the geogrid (canonical order)
|
Dimension |
getYDimension()
get the y Dimension, if it exists
|
int |
getYDimensionIndex()
get the y Dimension index in the geogrid (canonical order)
|
Dimension |
getZDimension()
get the z Dimension, if it exists
|
int |
getZDimensionIndex()
get the z Dimension index in the geogrid (canonical order), or -1 if none
|
boolean |
hasMissingData()
true if there may be missing data
|
boolean |
isMissingData(double val)
if val is missing data
|
GridDatatype |
makeSubset(Range t_range,
Range z_range,
LatLonRect bbox,
int z_stride,
int y_stride,
int x_stride)
Create a new GeoGrid that is a logical subset of this GeoGrid.
|
GridDatatype |
makeSubset(Range rt_range,
Range e_range,
Range t_range,
Range z_range,
Range y_range,
Range x_range)
Create a new GeoGrid that is a logical subset of this GeoGrid.
|
Array |
readDataSlice(int t_index,
int z_index,
int y_index,
int x_index)
This reads an arbitrary data slice, returning the data in
canonical order (t-z-y-x).
|
Array |
readDataSlice(int rt_index,
int e_index,
int t_index,
int z_index,
int y_index,
int x_index)
This reads an arbitrary data slice, returning the data in
canonical order (rt-e-t-z-y-x).
|
Array |
readVolumeData(int t_index)
Reads in the data "volume" at the given time index.
|
float[] |
setMissingToNaN(float[] data)
Convert (in place) all values in the given array that are considered
as "missing" to Float.NaN, according to isMissing(val).
|
hasMissing, isMissing
java.lang.String getFullName()
java.lang.String getShortName()
java.lang.String getName()
java.lang.String getDescription()
java.lang.String getUnitsString()
DataType getDataType()
int getRank()
int[] getShape()
java.util.List<Attribute> getAttributes()
Attribute findAttributeIgnoreCase(java.lang.String name)
name
- the name of the attributejava.lang.String findAttValueIgnoreCase(java.lang.String attName, java.lang.String defaultValue)
attName
- name of the attributedefaultValue
- if not found, use this as the defaultjava.util.List<Dimension> getDimensions()
Dimension getDimension(int i)
i
- index of dimensionDimension getTimeDimension()
Dimension getZDimension()
Dimension getYDimension()
Dimension getXDimension()
Dimension getEnsembleDimension()
Dimension getRunTimeDimension()
int getTimeDimensionIndex()
int getZDimensionIndex()
int getYDimensionIndex()
int getXDimensionIndex()
int getEnsembleDimensionIndex()
int getRunTimeDimensionIndex()
GridCoordSystem getCoordinateSystem()
ProjectionImpl getProjection()
boolean hasMissingData()
boolean isMissingData(double val)
val
- test this valueMAMath.MinMax getMinMaxSkipMissingData(Array data)
data
- Array to get min/max valuesfloat[] setMissingToNaN(float[] data)
data
- input arrayArray readDataSlice(int rt_index, int e_index, int t_index, int z_index, int y_index, int x_index) throws java.io.IOException
rt_index
- if < 0, get all of runtime dim; if valid index, fix slice to that value.e_index
- if < 0, get all of ensemble dim; if valid index, fix slice to that value.t_index
- if < 0, get all of time dim; if valid index, fix slice to that value.z_index
- if < 0, get all of z dim; if valid index, fix slice to that value.y_index
- if < 0, get all of y dim; if valid index, fix slice to that value.x_index
- if < 0, get all of x dim; if valid index, fix slice to that value.java.io.IOException
- on io errorArray readDataSlice(int t_index, int z_index, int y_index, int x_index) throws java.io.IOException
t_index
- if < 0, get all of time dim; if valid index, fix slice to that value.z_index
- if < 0, get all of z dim; if valid index, fix slice to that value.y_index
- if < 0, get all of y dim; if valid index, fix slice to that value.x_index
- if < 0, get all of x dim; if valid index, fix slice to that value.java.io.IOException
- on io errorArray readVolumeData(int t_index) throws java.io.IOException
t_index
- time index; ignored if no time axis. you can set to -1 to read all times.java.io.IOException
- on io errorGridDatatype makeSubset(Range rt_range, Range e_range, Range t_range, Range z_range, Range y_range, Range x_range) throws InvalidRangeException
rt_range
- subset the runtime dimension, or null if you want all of ite_range
- subset the ensemble dimension, or null if you want all of itt_range
- subset the time dimension, or null if you want all of itz_range
- subset the vertical dimension, or null if you want all of ity_range
- subset the y dimension, or null if you want all of itx_range
- subset the x dimension, or null if you want all of itInvalidRangeException
- if ranges are invlaidGridDatatype makeSubset(Range t_range, Range z_range, LatLonRect bbox, int z_stride, int y_stride, int x_stride) throws InvalidRangeException
t_range
- subset the time dimension, or null if you want all of itz_range
- subset the vertical dimension, or null if you want all of itbbox
- a lat/lon bounding box, or null if you want all x,yz_stride
- use only if z_range is null, then take all z with this stride (1 means all)y_stride
- use this stride on the y coordinate (1 means all)x_stride
- use this stride on the x coordinate (1 means all)InvalidRangeException
- if ranges are invlaidjava.lang.String getInfo()
VariableDS getVariable()