Class Nidsiosp

  • All Implemented Interfaces:
    ucar.nc2.iosp.IOServiceProvider

    public class Nidsiosp
    extends ucar.nc2.iosp.AbstractIOServiceProvider
    IOServiceProvider implementation abstract base class to read/write "version 3" netcdf files. AKA "file format version 1" files.

    see concrete class

    • Field Detail

      • readonly

        protected boolean readonly
      • headerParser

        protected ucar.nc2.iosp.nids.Nidsheader headerParser
      • fileUsed

        protected int fileUsed
      • recStart

        protected int recStart
      • debug

        protected boolean debug
      • debugSize

        protected boolean debugSize
      • debugSPIO

        protected boolean debugSPIO
      • showHeaderBytes

        protected boolean showHeaderBytes
    • Constructor Detail

      • Nidsiosp

        public Nidsiosp()
    • Method Detail

      • isValidFile

        public boolean isValidFile​(ucar.unidata.io.RandomAccessFile raf)
        Check if the file is a Nids 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
        Specified by:
        open in interface ucar.nc2.iosp.IOServiceProvider
        Overrides:
        open in class ucar.nc2.iosp.AbstractIOServiceProvider
        Throws:
        IOException
      • readNestedData

        public ucar.ma2.Array readNestedData​(ucar.nc2.Variable v2,
                                             ucar.ma2.Section section)
                                      throws ucar.ma2.InvalidRangeException
        Read nested structure data
        Throws:
        ucar.ma2.InvalidRangeException
      • readData

        public ucar.ma2.Array readData​(ucar.nc2.Variable v2,
                                       ucar.ma2.Section section)
                                throws ucar.ma2.InvalidRangeException
        Read the data for each variable passed in
        Throws:
        ucar.ma2.InvalidRangeException
      • readNestedGraphicSymbolData

        public ucar.ma2.Array readNestedGraphicSymbolData​(String name,
                                                          ucar.ma2.StructureMembers.Member m,
                                                          ByteBuffer bos,
                                                          ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
                                                          List<ucar.ma2.Range> section)
                                                   throws ucar.ma2.InvalidRangeException
        Read nested graphic symbolic structure data
        Parameters:
        name - Variable name,
        m - Structure mumber name,
        bos - data buffer,
        vinfo - variable info,
        section - variable section
        Returns:
        the array of member variable data
        Throws:
        ucar.ma2.InvalidRangeException
      • readGraphicSymbolData

        public ucar.ma2.ArrayStructure readGraphicSymbolData​(String name,
                                                             ByteBuffer bos,
                                                             ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
        Read graphic sysmbol structure data
        Parameters:
        name - Variable name
        bos - data buffer,
        vinfo - variable info,
        Returns:
        the arraystructure of graphic symbol data
      • readNestedLinkedVectorData

        public ucar.ma2.Array readNestedLinkedVectorData​(String name,
                                                         String memberName,
                                                         ByteBuffer bos,
                                                         ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
                                                         List<ucar.ma2.Range> section)
                                                  throws ucar.ma2.InvalidRangeException
        Read nested structure data
        Parameters:
        name - Variable name,
        memberName - mumber name,
        bos - data buffer,
        vinfo - variable info,
        section - variable section
        Returns:
        the array of member variable data
        Throws:
        ucar.ma2.InvalidRangeException
      • readLinkedVectorData

        public ucar.ma2.ArrayStructure readLinkedVectorData​(String name,
                                                            ByteBuffer bos,
                                                            ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
        Read linked vector sturcture data
        Parameters:
        name - Variable name,
        bos - data buffer,
        vinfo - variable info,
        Returns:
        the arraystructure of linked vector data
      • readNestedCircleStructData

        public ucar.ma2.Array readNestedCircleStructData​(String name,
                                                         String memberName,
                                                         ByteBuffer bos,
                                                         ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
                                                         List<ucar.ma2.Range> section)
                                                  throws ucar.ma2.InvalidRangeException
        Read nested data
        Parameters:
        name - Variable name,
        memberName - Structure mumber name,
        bos - Data buffer,
        vinfo - variable info,
        section - variable section
        Returns:
        the array of member variable data
        Throws:
        ucar.ma2.InvalidRangeException
      • readCircleStructData

        public ucar.ma2.ArrayStructure readCircleStructData​(String name,
                                                            ByteBuffer bos,
                                                            ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
        Read data
        Parameters:
        name - Variable name,
        bos - Data buffer,
        vinfo - variable info,
        Returns:
        the arraystructure of circle struct data
      • readTabAlphaNumData

        public Object readTabAlphaNumData​(ByteBuffer bos,
                                          ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
        Read data
        Parameters:
        bos - Data buffer,
        vinfo - variable info,
        Returns:
        the array of tab data
      • readOneScanGenericData

        public Object readOneScanGenericData​(ByteBuffer bos,
                                             ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
                                             String vName)
        Read one scan radar data
        Parameters:
        bos - Data buffer
        vinfo - variable info
        Returns:
        the data object of scan data
      • readOneScanData

        public Object readOneScanData​(ByteBuffer bos,
                                      ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
                                      String vName)
        Read one scan radar data
        Parameters:
        bos - Data buffer
        vinfo - variable info
        Returns:
        the data object of scan data
      • readOneBeamShortData

        public short[] readOneBeamShortData​(byte[] ddata,
                                            int rLen,
                                            int xt,
                                            int level)
        read one radial beam data
      • readNestedWindBarbData

        public ucar.ma2.Array readNestedWindBarbData​(String name,
                                                     String memberName,
                                                     ByteBuffer bos,
                                                     ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
                                                     List<ucar.ma2.Range> section)
                                              throws ucar.ma2.InvalidRangeException
        Read nested data
        Parameters:
        name - Variable name,
        memberName - Structure mumber name,
        bos - Data buffer,
        vinfo - variable info,
        section - variable section
        Returns:
        the array of member variable data
        Throws:
        ucar.ma2.InvalidRangeException
      • readWindBarbData

        public ucar.ma2.ArrayStructure readWindBarbData​(String name,
                                                        ByteBuffer bos,
                                                        ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
                                                        List sList)
        Read data
        Parameters:
        name - Variable name,
        bos - Data buffer,
        vinfo - variable info,
        Returns:
        the arraystructure of wind barb data
      • readNestedVectorArrowData

        public ucar.ma2.Array readNestedVectorArrowData​(String name,
                                                        String memberName,
                                                        ByteBuffer bos,
                                                        ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
                                                        List<ucar.ma2.Range> section)
                                                 throws ucar.ma2.InvalidRangeException
        Read nested data
        Parameters:
        name - Variable name,
        memberName - Structure mumber name,
        bos - Data buffer,
        vinfo - variable info,
        section - variable section
        Returns:
        the array of member variable data
        Throws:
        ucar.ma2.InvalidRangeException
      • readVectorArrowData

        public ucar.ma2.ArrayStructure readVectorArrowData​(String name,
                                                           ByteBuffer bos,
                                                           ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
        Read data
        Parameters:
        name - Variable name,
        bos - Data buffer,
        vinfo - variable info,
        Returns:
        the arraystructure of vector arrow data
      • readNestedTextStringData

        public ucar.ma2.Array readNestedTextStringData​(String name,
                                                       String memberName,
                                                       ByteBuffer bos,
                                                       ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
                                                       List<ucar.ma2.Range> section)
                                                throws ucar.ma2.InvalidRangeException
        Read nested data
        Parameters:
        name - Variable name,
        memberName - Structure mumber name,
        bos - Data buffer,
        vinfo - variable info,
        section - variable section
        Returns:
        the array of member variable data
        Throws:
        ucar.ma2.InvalidRangeException
      • readTextStringData

        public ucar.ma2.ArrayStructure readTextStringData​(String name,
                                                          ByteBuffer bos,
                                                          ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
        Read data
        Parameters:
        name - Variable name,
        bos - Data buffer,
        vinfo - variable info
        Returns:
        the arraystructure of text string data
      • readNestedDataUnlinkVector

        public ucar.ma2.Array readNestedDataUnlinkVector​(String name,
                                                         String memberName,
                                                         ByteBuffer bos,
                                                         ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
                                                         List<ucar.ma2.Range> section)
                                                  throws ucar.ma2.InvalidRangeException
        Read nested data
        Parameters:
        name - Variable name,
        memberName - Structure mumber name,
        bos - Data buffer,
        vinfo - variable info,
        section - variable section
        Returns:
        the array of member variable data
        Throws:
        ucar.ma2.InvalidRangeException
      • readUnlinkedVectorData

        public ucar.ma2.ArrayStructure readUnlinkedVectorData​(String name,
                                                              ByteBuffer bos,
                                                              ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
        Read data
        Parameters:
        name - Variable name,
        bos - Data buffer,
        vinfo - variable info,
        Returns:
        the arraystructure of unlinked vector data
      • readOneArrayData

        public Object readOneArrayData​(ByteBuffer bos,
                                       ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
                                       String vName)
      • readOneArrayData1

        public Object readOneArrayData1​(ByteBuffer bos,
                                        ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)
        Read data
        Parameters:
        bos - is data buffer
        vinfo - is variable info
        Returns:
        the data object
      • readOneRowData1

        public short[] readOneRowData1​(byte[] ddata,
                                       int rLen,
                                       int xt)
        Read data from encoded values and run len into regular data array
        Parameters:
        ddata - is encoded data values
        Returns:
        the data array of row data
      • readOneRowData2

        public short[] readOneRowData2​(byte[] ddata,
                                       int rLen,
                                       int xt)
        Read data from encoded values and run len into regular data array
        Parameters:
        ddata - is encoded data values
        Returns:
        the data array of row data
      • readOneRowData

        public byte[] readOneRowData​(byte[] ddata,
                                     int rLen,
                                     int xt)
        Read data from encoded values and run len into regular data array
        Parameters:
        ddata - is encoded data values
        Returns:
        the data array of row data
      • readCompData1

        public byte[] readCompData1​(byte[] uncomp,
                                    long hoff,
                                    long doff)
      • readCompData

        public byte[] readCompData​(long hoff,
                                   long doff)
                            throws IOException
        Read compressed data
        Parameters:
        hoff - header offset
        doff - data offset
        Returns:
        the array of data
        Throws:
        IOException
      • readUCompData

        public byte[] readUCompData​(long hoff,
                                    long doff)
                             throws IOException
        Read uncompressed data
        Parameters:
        hoff - header offset
        doff - data offset
        Returns:
        the array of data
        Throws:
        IOException
      • reacquire

        public void reacquire()
                       throws IOException
        Specified by:
        reacquire in interface ucar.nc2.iosp.IOServiceProvider
        Overrides:
        reacquire in class ucar.nc2.iosp.AbstractIOServiceProvider
        Throws:
        IOException