Class Nidsiosp

    • 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​(RandomAccessFile raf)
        Check if the file is a Nids file.
        Parameters:
        raf - RandomAccessFile
        Returns:
        true if valid.
      • getFileTypeId

        public String getFileTypeId()
        Description copied from interface: IOServiceProvider
        Get a unique id for this file type.
        Returns:
        registered id of the file type
        See Also:
        "https://www.unidata.ucar.edu/software/netcdf-java/formats/FileTypes.html"
      • getFileTypeDescription

        public String getFileTypeDescription()
        Description copied from interface: IOServiceProvider
        Get a human-readable description for this file type.
        Returns:
        description of the file type
        See Also:
        "https://www.unidata.ucar.edu/software/netcdf-java/formats/FileTypes.html"
      • open

        public void open​(RandomAccessFile raf,
                         NetcdfFile ncfile,
                         CancelTask cancelTask)
                  throws IOException
        Description copied from interface: IOServiceProvider
        Open existing file, and populate ncfile with it. This method is only called by the NetcdfFile constructor on itself. The provided NetcdfFile object will be empty except for the location String and the IOServiceProvider associated with this NetcdfFile object.
        Specified by:
        open in interface IOServiceProvider
        Overrides:
        open in class AbstractIOServiceProvider
        Parameters:
        raf - the file to work on, it has already passed the isValidFile() test.
        ncfile - add objects to this empty NetcdfFile
        cancelTask - used to monitor user cancellation; may be null.
        Throws:
        IOException - if read error
      • readData

        public Array readData​(Variable v2,
                              Section section)
                       throws InvalidRangeException
        Read the data for each variable passed in
        Parameters:
        v2 - a top-level Variable
        section - the section of data to read. There must be a Range for each Dimension in the variable, in order. Note: no nulls allowed. IOSP may not modify.
        Returns:
        the requested data in a memory-resident Array
        Throws:
        InvalidRangeException - if invalid section
        See Also:
        Range
      • readNestedGraphicSymbolData

        public Array readNestedGraphicSymbolData​(String name,
                                                 StructureMembers.Member m,
                                                 ByteBuffer bos,
                                                 ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
                                                 List<Range> section)
                                          throws 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:
        InvalidRangeException
      • readGraphicSymbolData

        public 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 Array readNestedLinkedVectorData​(String name,
                                                String memberName,
                                                ByteBuffer bos,
                                                ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
                                                List<Range> section)
                                         throws 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:
        InvalidRangeException
      • readLinkedVectorData

        public 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 Array readNestedCircleStructData​(String name,
                                                String memberName,
                                                ByteBuffer bos,
                                                ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
                                                List<Range> section)
                                         throws 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:
        InvalidRangeException
      • readCircleStructData

        public 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 Array readNestedWindBarbData​(String name,
                                            String memberName,
                                            ByteBuffer bos,
                                            ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
                                            List<Range> section)
                                     throws 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:
        InvalidRangeException
      • readWindBarbData

        public 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 Array readNestedVectorArrowData​(String name,
                                               String memberName,
                                               ByteBuffer bos,
                                               ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
                                               List<Range> section)
                                        throws 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:
        InvalidRangeException
      • readVectorArrowData

        public 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 Array readNestedTextStringData​(String name,
                                              String memberName,
                                              ByteBuffer bos,
                                              ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
                                              List<Range> section)
                                       throws 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:
        InvalidRangeException
      • readTextStringData

        public 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 Array readNestedDataUnlinkVector​(String name,
                                                String memberName,
                                                ByteBuffer bos,
                                                ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo,
                                                List<Range> section)
                                         throws 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:
        InvalidRangeException
      • readUnlinkedVectorData

        public 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