Package ucar.unidata.data.grid
Class GridCoverageAdapter
java.lang.Object
ucar.unidata.data.grid.GridCoverageAdapter
Adapt a ucar.unidata.GeoGrid into VisAD Data object(s).
GeoGridAdapter gets a Geogrid and has methods to create a
a VisAD 2D or 3D FlatField, or sequence of same, from the GeoGrid
for parameter names and time(s) desired.
- Author:
- Don Murray
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGridCoverageAdapter
(GridCoverageDataSource dataSource, ucar.nc2.ft2.coverage.Coverage geoGrid, ucar.nc2.ft2.coverage.SubsetParams params) Construct a GeoGridAdapter that will take a GeoGrid and return VisAD Data objects from it.GridCoverageAdapter
(GridCoverageDataSource dataSource, ucar.nc2.ft2.coverage.Coverage geoGrid, ucar.nc2.ft2.coverage.SubsetParams params, String paramName) Construct a GeoGridAdapter that will take a GeoGrid and return VisAD Data objects from it.GridCoverageAdapter
(GridCoverageDataSource dataSource, ucar.nc2.ft2.coverage.Coverage geoGrid, ucar.nc2.ft2.coverage.SubsetParams params, String paramName, ucar.nc2.NetcdfFile ncFile) Construct a GeoGridAdapter that will take a GeoGrid and return VisAD Data objects from it.GridCoverageAdapter
(GridCoverageDataSource dataSource, ucar.nc2.ft2.coverage.Coverage geoGrid, ucar.nc2.ft2.coverage.SubsetParams params, String paramName, ucar.nc2.NetcdfFile ncFile, Object extraCacheKey) Construct a GeoGridAdapter that will take a GeoGrid and return VisAD Data objects from it.GridCoverageAdapter
(GridCoverageDataSource dataSource, ucar.nc2.ft2.coverage.Coverage geoGrid, ucar.nc2.ft2.coverage.SubsetParams params, ucar.nc2.NetcdfFile ncFile) Construct a GeoGridAdapter that will take a GeoGrid and return VisAD Data objects from it. -
Method Summary
Modifier and TypeMethodDescriptiongetData()
Get all the data from this GeoGrid.protected ucar.nc2.ft2.coverage.Coverage
Get the geogrid that this adapter usesprotected List
Create the list of levels for this gridGet a time ordered sequence of 2D flat fieldsgetSequence
(int[] timeIndices) Get a time ordered sequence of 2D flat fieldsgetSequence
(int[] timeIndices, int[] memberIndices, Object loadId) Get a time ordered sequence of 2D flat fieldsgetSequence
(int[] timeIndices, Object loadId) Get a time ordered sequence of 2D flat fieldsint
static boolean
isZAxisOk
(ucar.nc2.dataset.CoordinateAxis1D zaxis) Utility to check if we should ignore the given z axisstatic boolean
Utility to check if we can handle the vertical transform
-
Field Details
-
cacheFile
cache file
-
-
Constructor Details
-
GridCoverageAdapter
public GridCoverageAdapter(GridCoverageDataSource dataSource, ucar.nc2.ft2.coverage.Coverage geoGrid, ucar.nc2.ft2.coverage.SubsetParams params) throws VisADException Construct a GeoGridAdapter that will take a GeoGrid and return VisAD Data objects from it.- Parameters:
dataSource
- source of this GeoGridgeoGrid
- the GeoGrid in questionparams
- subset parameter- Throws:
VisADException
- unable to create one of the VisAD objects
-
GridCoverageAdapter
public GridCoverageAdapter(GridCoverageDataSource dataSource, ucar.nc2.ft2.coverage.Coverage geoGrid, ucar.nc2.ft2.coverage.SubsetParams params, String paramName) throws VisADException Construct a GeoGridAdapter that will take a GeoGrid and return VisAD Data objects from it.- Parameters:
dataSource
- source of this GeoGridgeoGrid
- the GeoGrid in questionparams
- the subset parameterparamName
- name of the parameter- Throws:
VisADException
- unable to create one of the VisAD objects
-
GridCoverageAdapter
public GridCoverageAdapter(GridCoverageDataSource dataSource, ucar.nc2.ft2.coverage.Coverage geoGrid, ucar.nc2.ft2.coverage.SubsetParams params, ucar.nc2.NetcdfFile ncFile) throws VisADException Construct a GeoGridAdapter that will take a GeoGrid and return VisAD Data objects from it.- Parameters:
dataSource
- source of this GeoGridgeoGrid
- the GeoGrid in questionparams
- the subset parameterncFile
- file that the GeoGrid data is coming from- Throws:
VisADException
- unable to create one of the VisAD objects
-
GridCoverageAdapter
public GridCoverageAdapter(GridCoverageDataSource dataSource, ucar.nc2.ft2.coverage.Coverage geoGrid, ucar.nc2.ft2.coverage.SubsetParams params, String paramName, ucar.nc2.NetcdfFile ncFile) throws VisADException Construct a GeoGridAdapter that will take a GeoGrid and return VisAD Data objects from it.- Parameters:
dataSource
- source of this GeoGridgeoGrid
- the GeoGrid in questionparams
- the subset parameterparamName
- name of the parameterncFile
- file that the GeoGrid data is coming from- Throws:
VisADException
- unable to create one of the VisAD objects
-
GridCoverageAdapter
public GridCoverageAdapter(GridCoverageDataSource dataSource, ucar.nc2.ft2.coverage.Coverage geoGrid, ucar.nc2.ft2.coverage.SubsetParams params, String paramName, ucar.nc2.NetcdfFile ncFile, Object extraCacheKey) throws VisADException Construct a GeoGridAdapter that will take a GeoGrid and return VisAD Data objects from it.- Parameters:
dataSource
- source of this GeoGridgeoGrid
- the GeoGrid in questionparams
- the subset parameterparamName
- name of the parameterncFile
- file that the GeoGrid data is coming fromextraCacheKey
- Extra key to use when caching- Throws:
VisADException
- unable to create one of the VisAD objects
-
-
Method Details
-
isZAxisOk
public static boolean isZAxisOk(ucar.nc2.dataset.CoordinateAxis1D zaxis) Utility to check if we should ignore the given z axis- Parameters:
zaxis
- given z axis- Returns:
- Is ok
-
isZUnitOk
Utility to check if we can handle the vertical transform- Parameters:
zUnit
- zUnitvt
- vertical transform- Returns:
- true if we can
-
getLevels
Create the list of levels for this grid- Returns:
- List of levels as Real-s
- Throws:
VisADException
- On badness
-
getGeoGrid
protected ucar.nc2.ft2.coverage.Coverage getGeoGrid()Get the geogrid that this adapter uses- Returns:
- the GeoGrid or null
-
getSequence
Get a time ordered sequence of 2D flat fields- Returns:
- data for all the times for a particular 2D field
-
getSequence
Get a time ordered sequence of 2D flat fields- Parameters:
timeIndices
- indices of times in the data- Returns:
- data for all the times for a particular 2D field
-
getSequence
Get a time ordered sequence of 2D flat fields- Parameters:
timeIndices
- indices of times in the dataloadId
- loadId- Returns:
- data for all the times for a particular 2D field
-
getSequence
Get a time ordered sequence of 2D flat fields- Parameters:
timeIndices
- indices of times in the datamemberIndices
- the member indicesloadId
- loadId- Returns:
- data for all the times for a particular 2D field
-
getData
Get all the data from this GeoGrid.- Returns:
- VisAD representation of this GeoGrid
- Throws:
VisADException
- problem creating the grid
-
indexOf
- Throws:
VisADException
-