Class GradsBinaryGridServiceProvider

  • All Implemented Interfaces:
    Comparable<IOServiceProvider>, IOServiceProvider

    public class GradsBinaryGridServiceProvider
    extends AbstractIOServiceProvider
    IOSP for GrADS Binary data files. This IOSP only handles the binary formatted grids, most other GrADS data types can be read directly through other IOSPs. Notes jcaron Apparently we need the control file (.ctl), which then references the data file (.dat) Dont see any test data - added to cdmUnitTest/formats/grads Possible File leaks - remove from standard IOSP's until we can resolve this. Also need to override release, reacquire
    See Also:
    "http://www.iges.org/grads/gadoc/descriptorfile.html", "http://www.iges.org/grads/gadoc/aboutgriddeddata.html"
    • Constructor Detail

      • GradsBinaryGridServiceProvider

        public GradsBinaryGridServiceProvider()
    • Method Detail

      • isValidFile

        public boolean isValidFile​(RandomAccessFile raf)
                            throws IOException
        Is this a valid file? For this GrADS IOSP, the valid file must be:
        • raw binary grid (not GRIB, netCDF, HDF, etc)
        • not a cross section (x and y > 1)
        • not an ensemble definded by EDEF/ENDEDEF (need examples)
        Parameters:
        raf - RandomAccessFile to check
        Returns:
        true if a valid GrADS grid file of the type listed above
        Throws:
        IOException - problem reading file
      • getFileTypeId

        public String getFileTypeId()
        Get the file type id
        Returns:
        the file type id
        See Also:
        "https://www.unidata.ucar.edu/software/netcdf-java/formats/FileTypes.html"
      • getFileTypeDescription

        public String getFileTypeDescription()
        Get the file type description
        Returns:
        the file type description
        See Also:
        "https://www.unidata.ucar.edu/software/netcdf-java/formats/FileTypes.html"
      • buildNCFile

        protected void buildNCFile()
        Build the netCDF file