Class GempakGridServiceProvider

  • All Implemented Interfaces:
    Comparable<ucar.nc2.iosp.IOServiceProvider>, ucar.nc2.iosp.IOServiceProvider

    public class GempakGridServiceProvider
    extends GridServiceProvider
    An IOSP for GEMPAK Grid data
    • Field Detail

      • extendIndex

        public static boolean extendIndex
        Reread the file on a sync
    • Constructor Detail

      • GempakGridServiceProvider

        public GempakGridServiceProvider()
    • Method Detail

      • isValidFile

        public boolean isValidFile​(ucar.unidata.io.RandomAccessFile raf)
                            throws IOException
        Is this a valid file?
        Parameters:
        raf - RandomAccessFile to check
        Returns:
        true if a valid GEMPAK grid file
        Throws:
        IOException - problem reading file
      • getFileTypeId

        public String getFileTypeId()
      • getFileTypeDescription

        public String getFileTypeDescription()
      • open

        public void open​(ucar.unidata.io.RandomAccessFile raf,
                         ucar.nc2.NetcdfFile ncfile,
                         ucar.nc2.util.CancelTask cancelTask)
                  throws IOException
        Open the service provider for reading.
        Specified by:
        open in interface ucar.nc2.iosp.IOServiceProvider
        Overrides:
        open in class GridServiceProvider
        Parameters:
        raf - file to read from
        ncfile - netCDF file we are writing to (memory)
        cancelTask - task for cancelling
        Throws:
        IOException - problem reading file
      • open

        protected void open​(GridIndex index,
                            ucar.nc2.util.CancelTask cancelTask)
                     throws IOException
        Open the index and create the netCDF file from that
        Specified by:
        open in class GridServiceProvider
        Parameters:
        index - GridIndex to use
        cancelTask - cancel task
        Throws:
        IOException - problem reading the file
      • sync

        public boolean sync()
                     throws IOException
        Sync the file
        Returns:
        true if needed to sync
        Throws:
        IOException - problem synching the file
      • setExtendIndex

        public static void setExtendIndex​(boolean b)
        Extend the list of grid
        Parameters:
        b - true to reread the grid on a sync