Package ucar.nc2.dt.ugrid
Class UGridDataset
- java.lang.Object
-
- ucar.nc2.dt.ugrid.UGridDataset
-
- All Implemented Interfaces:
Closeable,AutoCloseable,ucar.nc2.dt.GridDataset,UGridDataset,ucar.nc2.ft.FeatureDataset,ucar.nc2.util.cache.FileCacheable
public class UGridDataset extends Object implements UGridDataset, ucar.nc2.ft.FeatureDataset
Make a UGridDataset into a collection of Meshsets
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUGridDataset.FactoryclassUGridDataset.MeshsetThis is a set of MeshVariables with the same Mesh and Topology
-
Field Summary
Fields Modifier and Type Field Description protected ucar.nc2.util.cache.FileCachefileCache
-
Constructor Summary
Constructors Constructor Description UGridDataset(ucar.nc2.dataset.NetcdfDataset ds)Create a UGridDataset from a NetcdfDataset.UGridDataset(ucar.nc2.dataset.NetcdfDataset ds, Formatter parseInfo)Create a UGridDataset from a NetcdfDataset.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ucar.nc2.AttributeContainerattributes()voidcalcBounds()voidclose()ucar.nc2.AttributefindGlobalAttributeIgnoreCase(String name)ucar.nc2.dt.GridDatatypefindGridByShortName(String shortName)ucar.nc2.dt.GridDatatypefindGridDatatype(String name)ucar.unidata.geoloc.LatLonRectgetBoundingBox()ucar.nc2.time.CalendarDategetCalendarDateEnd()ucar.nc2.time.CalendarDateRangegetCalendarDateRange()ucar.nc2.time.CalendarDategetCalendarDateStart()ucar.nc2.VariableSimpleIFgetDataVariable(String shortName)List<ucar.nc2.VariableSimpleIF>getDataVariables()ucar.nc2.units.DateRangegetDateRange()StringgetDescription()StringgetDetailInfo()voidgetDetailInfo(Formatter buff)DategetEndDate()ucar.nc2.constants.FeatureTypegetFeatureType()List<ucar.nc2.Attribute>getGlobalAttributes()List<ucar.nc2.dt.GridDatatype>getGrids()List<ucar.nc2.dt.GridDataset.Gridset>getGridsets()StringgetImplementationName()longgetLastModified()StringgetLocation()StringgetLocationURI()List<UGridDataset.Meshset>getMeshsets()UGridDatatypegetMeshVariableByName(String name)List<UGridDatatype>getMeshVariables()get the list of GridDatatype objects contained in this dataset.StringgetName()ucar.nc2.dataset.NetcdfDatasetgetNetcdfDataset()ucar.nc2.NetcdfFilegetNetcdfFile()ucar.unidata.geoloc.ProjectionRectgetProjBoundingBox()DategetStartDate()StringgetTitle()static UGridDatasetopen(String location)Open a netcdf dataset, using NetcdfDataset.defaultEnhanceMode plus CoordSystems and turn into a UGridDataset.static UGridDatasetopen(String location, Set<ucar.nc2.dataset.NetcdfDataset.Enhance> enhanceMode)Open a netcdf dataset, using NetcdfDataset.defaultEnhanceMode plus CoordSystems and turn into a UGridDataset.voidreacquire()voidrelease()voidsetFileCache(ucar.nc2.util.cache.FileCache fileCache)voidsetFileCache(ucar.nc2.util.cache.FileCacheIF fileCache)UGridDatasetsubset(ucar.unidata.geoloc.LatLonRect bounds)booleansyncExtend()
-
-
-
Constructor Detail
-
UGridDataset
public UGridDataset(ucar.nc2.dataset.NetcdfDataset ds) throws IOExceptionCreate a UGridDataset from a NetcdfDataset.- Parameters:
ds- underlying NetcdfDataset, will do Enhance.CoordSystems if not already done.- Throws:
IOException- on read error
-
UGridDataset
public UGridDataset(ucar.nc2.dataset.NetcdfDataset ds, Formatter parseInfo) throws IOExceptionCreate a UGridDataset from a NetcdfDataset.- Parameters:
ds- underlying NetcdfDataset, will do Enhance.CoordSystems if not already done.parseInfo- put parse info here, may be null- Throws:
IOException- on read error
-
-
Method Detail
-
open
public static UGridDataset open(String location) throws IOException
Open a netcdf dataset, using NetcdfDataset.defaultEnhanceMode plus CoordSystems and turn into a UGridDataset.- Parameters:
location- netcdf dataset to open, using NetcdfDataset.acquireDataset().- Returns:
- GridDataset
- Throws:
IOException- on read error- See Also:
NetcdfDataset.acquireDataset(ucar.nc2.dataset.DatasetUrl, ucar.nc2.util.CancelTask)
-
open
public static UGridDataset open(String location, Set<ucar.nc2.dataset.NetcdfDataset.Enhance> enhanceMode) throws IOException
Open a netcdf dataset, using NetcdfDataset.defaultEnhanceMode plus CoordSystems and turn into a UGridDataset.- Parameters:
location- netcdf dataset to open, using NetcdfDataset.acquireDataset().enhanceMode- open netcdf dataset with this enhanceMode- Returns:
- GridDataset
- Throws:
IOException- on read error- See Also:
NetcdfDataset.acquireDataset(ucar.nc2.dataset.DatasetUrl, ucar.nc2.util.CancelTask)
-
getMeshVariableByName
@Nullable public UGridDatatype getMeshVariableByName(String name)
- Specified by:
getMeshVariableByNamein interfaceUGridDataset
-
getMeshVariables
public List<UGridDatatype> getMeshVariables()
Description copied from interface:UGridDatasetget the list of GridDatatype objects contained in this dataset.- Specified by:
getMeshVariablesin interfaceUGridDataset- Returns:
- list of GridDatatype
-
calcBounds
public void calcBounds() throws IOException- Throws:
IOException
-
getGlobalAttributes
public List<ucar.nc2.Attribute> getGlobalAttributes()
- Specified by:
getGlobalAttributesin interfaceucar.nc2.ft.FeatureDataset
-
getTitle
public String getTitle()
- Specified by:
getTitlein interfaceucar.nc2.ft.FeatureDataset
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin interfaceucar.nc2.ft.FeatureDataset
-
getName
public String getName()
-
getLocation
public String getLocation()
- Specified by:
getLocationin interfaceucar.nc2.ft.FeatureDataset- Specified by:
getLocationin interfaceucar.nc2.util.cache.FileCacheable
-
getLocationURI
public String getLocationURI()
-
getStartDate
public Date getStartDate()
-
getEndDate
public Date getEndDate()
-
getBoundingBox
public ucar.unidata.geoloc.LatLonRect getBoundingBox()
- Specified by:
getBoundingBoxin interfaceucar.nc2.ft.FeatureDataset
-
attributes
public ucar.nc2.AttributeContainer attributes()
- Specified by:
attributesin interfaceucar.nc2.ft.FeatureDataset
-
findGlobalAttributeIgnoreCase
public ucar.nc2.Attribute findGlobalAttributeIgnoreCase(String name)
- Specified by:
findGlobalAttributeIgnoreCasein interfaceucar.nc2.ft.FeatureDataset
-
getDataVariables
public List<ucar.nc2.VariableSimpleIF> getDataVariables()
- Specified by:
getDataVariablesin interfaceucar.nc2.ft.FeatureDataset
-
getDataVariable
public ucar.nc2.VariableSimpleIF getDataVariable(String shortName)
- Specified by:
getDataVariablein interfaceucar.nc2.ft.FeatureDataset
-
getNetcdfFile
public ucar.nc2.NetcdfFile getNetcdfFile()
- Specified by:
getNetcdfFilein interfaceucar.nc2.ft.FeatureDataset
-
getFeatureType
public ucar.nc2.constants.FeatureType getFeatureType()
- Specified by:
getFeatureTypein interfaceucar.nc2.ft.FeatureDataset
-
getDateRange
public ucar.nc2.units.DateRange getDateRange()
-
getImplementationName
public String getImplementationName()
- Specified by:
getImplementationNamein interfaceucar.nc2.ft.FeatureDataset
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceucar.nc2.ft.FeatureDataset- Specified by:
closein interfaceucar.nc2.util.cache.FileCacheable- Throws:
IOException
-
syncExtend
public boolean syncExtend() throws IOException- Throws:
IOException
-
setFileCache
public void setFileCache(ucar.nc2.util.cache.FileCache fileCache)
-
getDetailInfo
public String getDetailInfo()
-
getNetcdfDataset
public ucar.nc2.dataset.NetcdfDataset getNetcdfDataset()
-
getDetailInfo
public void getDetailInfo(Formatter buff)
- Specified by:
getDetailInfoin interfaceucar.nc2.ft.FeatureDataset
-
getMeshsets
public List<UGridDataset.Meshset> getMeshsets()
- Specified by:
getMeshsetsin interfaceUGridDataset
-
subset
public UGridDataset subset(ucar.unidata.geoloc.LatLonRect bounds)
- Specified by:
subsetin interfaceUGridDataset
-
getCalendarDateRange
public ucar.nc2.time.CalendarDateRange getCalendarDateRange()
- Specified by:
getCalendarDateRangein interfaceucar.nc2.ft.FeatureDataset
-
getCalendarDateStart
public ucar.nc2.time.CalendarDate getCalendarDateStart()
- Specified by:
getCalendarDateStartin interfaceucar.nc2.ft.FeatureDataset
-
getCalendarDateEnd
public ucar.nc2.time.CalendarDate getCalendarDateEnd()
- Specified by:
getCalendarDateEndin interfaceucar.nc2.ft.FeatureDataset
-
getLastModified
public long getLastModified()
- Specified by:
getLastModifiedin interfaceucar.nc2.util.cache.FileCacheable
-
setFileCache
public void setFileCache(ucar.nc2.util.cache.FileCacheIF fileCache)
- Specified by:
setFileCachein interfaceucar.nc2.util.cache.FileCacheable
-
release
public void release() throws IOException- Specified by:
releasein interfaceucar.nc2.util.cache.FileCacheable- Throws:
IOException
-
reacquire
public void reacquire() throws IOException- Specified by:
reacquirein interfaceucar.nc2.util.cache.FileCacheable- Throws:
IOException
-
getGrids
public List<ucar.nc2.dt.GridDatatype> getGrids()
- Specified by:
getGridsin interfaceucar.nc2.dt.GridDataset
-
findGridDatatype
public ucar.nc2.dt.GridDatatype findGridDatatype(String name)
- Specified by:
findGridDatatypein interfaceucar.nc2.dt.GridDataset
-
findGridByShortName
public ucar.nc2.dt.GridDatatype findGridByShortName(String shortName)
- Specified by:
findGridByShortNamein interfaceucar.nc2.dt.GridDataset
-
getProjBoundingBox
public ucar.unidata.geoloc.ProjectionRect getProjBoundingBox()
- Specified by:
getProjBoundingBoxin interfaceucar.nc2.dt.GridDataset
-
getGridsets
public List<ucar.nc2.dt.GridDataset.Gridset> getGridsets()
- Specified by:
getGridsetsin interfaceucar.nc2.dt.GridDataset
-
-