Class 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
    • Field Detail

      • fileCache

        protected ucar.nc2.util.cache.FileCache fileCache
    • Constructor Detail

      • UGridDataset

        public UGridDataset​(ucar.nc2.dataset.NetcdfDataset ds)
                     throws IOException
        Create 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 IOException
        Create 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)
      • getGlobalAttributes

        public List<ucar.nc2.Attribute> getGlobalAttributes()
        Specified by:
        getGlobalAttributes in interface ucar.nc2.ft.FeatureDataset
      • getTitle

        public String getTitle()
        Specified by:
        getTitle in interface ucar.nc2.ft.FeatureDataset
      • getDescription

        public String getDescription()
        Specified by:
        getDescription in interface ucar.nc2.ft.FeatureDataset
      • getName

        public String getName()
      • getLocation

        public String getLocation()
        Specified by:
        getLocation in interface ucar.nc2.ft.FeatureDataset
        Specified by:
        getLocation in interface ucar.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:
        getBoundingBox in interface ucar.nc2.ft.FeatureDataset
      • attributes

        public ucar.nc2.AttributeContainer attributes()
        Specified by:
        attributes in interface ucar.nc2.ft.FeatureDataset
      • findGlobalAttributeIgnoreCase

        public ucar.nc2.Attribute findGlobalAttributeIgnoreCase​(String name)
        Specified by:
        findGlobalAttributeIgnoreCase in interface ucar.nc2.ft.FeatureDataset
      • getDataVariables

        public List<ucar.nc2.VariableSimpleIF> getDataVariables()
        Specified by:
        getDataVariables in interface ucar.nc2.ft.FeatureDataset
      • getDataVariable

        public ucar.nc2.VariableSimpleIF getDataVariable​(String shortName)
        Specified by:
        getDataVariable in interface ucar.nc2.ft.FeatureDataset
      • getNetcdfFile

        public ucar.nc2.NetcdfFile getNetcdfFile()
        Specified by:
        getNetcdfFile in interface ucar.nc2.ft.FeatureDataset
      • getFeatureType

        public ucar.nc2.constants.FeatureType getFeatureType()
        Specified by:
        getFeatureType in interface ucar.nc2.ft.FeatureDataset
      • getDateRange

        public ucar.nc2.units.DateRange getDateRange()
      • getImplementationName

        public String getImplementationName()
        Specified by:
        getImplementationName in interface ucar.nc2.ft.FeatureDataset
      • close

        public void close()
                   throws IOException
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Specified by:
        close in interface ucar.nc2.ft.FeatureDataset
        Specified by:
        close in interface ucar.nc2.util.cache.FileCacheable
        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:
        getDetailInfo in interface ucar.nc2.ft.FeatureDataset
      • getCalendarDateRange

        public ucar.nc2.time.CalendarDateRange getCalendarDateRange()
        Specified by:
        getCalendarDateRange in interface ucar.nc2.ft.FeatureDataset
      • getCalendarDateStart

        public ucar.nc2.time.CalendarDate getCalendarDateStart()
        Specified by:
        getCalendarDateStart in interface ucar.nc2.ft.FeatureDataset
      • getCalendarDateEnd

        public ucar.nc2.time.CalendarDate getCalendarDateEnd()
        Specified by:
        getCalendarDateEnd in interface ucar.nc2.ft.FeatureDataset
      • getLastModified

        public long getLastModified()
        Specified by:
        getLastModified in interface ucar.nc2.util.cache.FileCacheable
      • setFileCache

        public void setFileCache​(ucar.nc2.util.cache.FileCacheIF fileCache)
        Specified by:
        setFileCache in interface ucar.nc2.util.cache.FileCacheable
      • release

        public void release()
                     throws IOException
        Specified by:
        release in interface ucar.nc2.util.cache.FileCacheable
        Throws:
        IOException
      • reacquire

        public void reacquire()
                       throws IOException
        Specified by:
        reacquire in interface ucar.nc2.util.cache.FileCacheable
        Throws:
        IOException
      • getGrids

        public List<ucar.nc2.dt.GridDatatype> getGrids()
        Specified by:
        getGrids in interface ucar.nc2.dt.GridDataset
      • findGridDatatype

        public ucar.nc2.dt.GridDatatype findGridDatatype​(String name)
        Specified by:
        findGridDatatype in interface ucar.nc2.dt.GridDataset
      • findGridByShortName

        public ucar.nc2.dt.GridDatatype findGridByShortName​(String shortName)
        Specified by:
        findGridByShortName in interface ucar.nc2.dt.GridDataset
      • getProjBoundingBox

        public ucar.unidata.geoloc.ProjectionRect getProjBoundingBox()
        Specified by:
        getProjBoundingBox in interface ucar.nc2.dt.GridDataset
      • getGridsets

        public List<ucar.nc2.dt.GridDataset.Gridset> getGridsets()
        Specified by:
        getGridsets in interface ucar.nc2.dt.GridDataset