Package ucar.unidata.data.grid
Class GeoGridAdapter
java.lang.Object
ucar.unidata.data.grid.GeoGridAdapter
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
ConstructorsConstructorDescriptionGeoGridAdapter(GeoGridDataSource dataSource, ucar.nc2.dt.grid.GeoGrid geoGrid) Construct a GeoGridAdapter that will take a GeoGrid and return VisAD Data objects from it.GeoGridAdapter(GeoGridDataSource dataSource, ucar.nc2.dt.grid.GeoGrid geoGrid, String paramName) Construct a GeoGridAdapter that will take a GeoGrid and return VisAD Data objects from it.GeoGridAdapter(GeoGridDataSource dataSource, ucar.nc2.dt.grid.GeoGrid geoGrid, String paramName, ucar.nc2.NetcdfFile ncFile) Construct a GeoGridAdapter that will take a GeoGrid and return VisAD Data objects from it.GeoGridAdapter(GeoGridDataSource dataSource, ucar.nc2.dt.grid.GeoGrid geoGrid, String paramName, ucar.nc2.NetcdfFile ncFile, Object extraCacheKey) Construct a GeoGridAdapter that will take a GeoGrid and return VisAD Data objects from it.GeoGridAdapter(GeoGridDataSource dataSource, ucar.nc2.dt.grid.GeoGrid geoGrid, 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.dt.grid.GeoGridGet the geogrid that this adapter usesprotected ListCreate 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 fieldsstatic booleanisZAxisOk(ucar.nc2.dataset.CoordinateAxis1D zaxis) Utility to check if we should ignore the given z axisstatic booleanUtility to check if we can handle the vertical transform
-
Field Details
-
cacheFile
cache file
-
-
Constructor Details
-
GeoGridAdapter
public GeoGridAdapter(GeoGridDataSource dataSource, ucar.nc2.dt.grid.GeoGrid geoGrid) 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 question- Throws:
VisADException- unable to create one of the VisAD objects
-
GeoGridAdapter
public GeoGridAdapter(GeoGridDataSource dataSource, ucar.nc2.dt.grid.GeoGrid geoGrid, 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 questionparamName- name of the parameter- Throws:
VisADException- unable to create one of the VisAD objects
-
GeoGridAdapter
public GeoGridAdapter(GeoGridDataSource dataSource, ucar.nc2.dt.grid.GeoGrid geoGrid, 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 questionncFile- file that the GeoGrid data is coming from- Throws:
VisADException- unable to create one of the VisAD objects
-
GeoGridAdapter
public GeoGridAdapter(GeoGridDataSource dataSource, ucar.nc2.dt.grid.GeoGrid geoGrid, 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 questionparamName- name of the parameterncFile- file that the GeoGrid data is coming from- Throws:
VisADException- unable to create one of the VisAD objects
-
GeoGridAdapter
public GeoGridAdapter(GeoGridDataSource dataSource, ucar.nc2.dt.grid.GeoGrid geoGrid, 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 questionparamName- 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
-
getLevels
Create the list of levels for this grid- Returns:
- List of levels as Real-s
- Throws:
VisADException- On badness
-
getGeoGrid
protected ucar.nc2.dt.grid.GeoGrid 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
-
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
-