Package ucar.nc2.iosp.nids
Class Nidsiosp
- java.lang.Object
-
- ucar.nc2.iosp.AbstractIOServiceProvider
-
- ucar.nc2.iosp.nids.Nidsiosp
-
- All Implemented Interfaces:
ucar.nc2.iosp.IOServiceProvider
public class Nidsiosp extends ucar.nc2.iosp.AbstractIOServiceProviderIOServiceProvider implementation abstract base class to read/write "version 3" netcdf files. AKA "file format version 1" files. see concrete class
-
-
Field Summary
Fields Modifier and Type Field Description protected booleandebugprotected booleandebugSizeprotected booleandebugSPIOprotected intfileUsedprotected ucar.nc2.iosp.nids.NidsheaderheaderParserprotected booleanreadonlyprotected intrecStartprotected booleanshowHeaderBytes
-
Constructor Summary
Constructors Constructor Description Nidsiosp()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetFileTypeDescription()StringgetFileTypeId()booleanisValidFile(ucar.unidata.io.RandomAccessFile raf)Check if the file is a Nids file.voidopen(ucar.unidata.io.RandomAccessFile raf, ucar.nc2.NetcdfFile ncfile, ucar.nc2.util.CancelTask cancelTask)voidreacquire()ucar.ma2.ArrayStructurereadCircleStructData(String name, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)Read databyte[]readCompData(long hoff, long doff)Read compressed databyte[]readCompData1(byte[] uncomp, long hoff, long doff)ucar.ma2.ArrayreadData(ucar.nc2.Variable v2, ucar.ma2.Section section)Read the data for each variable passed inucar.ma2.ArrayStructurereadGraphicSymbolData(String name, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)Read graphic sysmbol structure dataucar.ma2.ArrayStructurereadLinkedVectorData(String name, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)Read linked vector sturcture dataucar.ma2.ArrayreadNestedCircleStructData(String name, String memberName, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo, List<ucar.ma2.Range> section)Read nested dataucar.ma2.ArrayreadNestedData(ucar.nc2.Variable v2, ucar.ma2.Section section)Read nested structure dataucar.ma2.ArrayreadNestedDataUnlinkVector(String name, String memberName, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo, List<ucar.ma2.Range> section)Read nested dataucar.ma2.ArrayreadNestedGraphicSymbolData(String name, ucar.ma2.StructureMembers.Member m, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo, List<ucar.ma2.Range> section)Read nested graphic symbolic structure dataucar.ma2.ArrayreadNestedLinkedVectorData(String name, String memberName, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo, List<ucar.ma2.Range> section)Read nested structure dataucar.ma2.ArrayreadNestedTextStringData(String name, String memberName, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo, List<ucar.ma2.Range> section)Read nested dataucar.ma2.ArrayreadNestedVectorArrowData(String name, String memberName, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo, List<ucar.ma2.Range> section)Read nested dataucar.ma2.ArrayreadNestedWindBarbData(String name, String memberName, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo, List<ucar.ma2.Range> section)Read nested dataObjectreadOneArrayData(ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo, String vName)ObjectreadOneArrayData1(ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)Read datashort[]readOneBeamShortData(byte[] ddata, int rLen, int xt, int level)read one radial beam databyte[]readOneRowData(byte[] ddata, int rLen, int xt)Read data from encoded values and run len into regular data arrayshort[]readOneRowData1(byte[] ddata, int rLen, int xt)Read data from encoded values and run len into regular data arrayshort[]readOneRowData2(byte[] ddata, int rLen, int xt)Read data from encoded values and run len into regular data arrayObjectreadOneScanData(ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo, String vName)Read one scan radar dataObjectreadOneScanGenericData(ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo, String vName)Read one scan radar dataObjectreadTabAlphaNumData(ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)Read dataucar.ma2.ArrayStructurereadTextStringData(String name, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)Read databyte[]readUCompData(long hoff, long doff)Read uncompressed dataucar.ma2.ArrayStructurereadUnlinkedVectorData(String name, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)Read dataucar.ma2.ArrayStructurereadVectorArrowData(String name, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo)Read dataucar.ma2.ArrayStructurereadWindBarbData(String name, ByteBuffer bos, ucar.nc2.iosp.nids.Nidsheader.Vinfo vinfo, List sList)Read data-
Methods inherited from class ucar.nc2.iosp.AbstractIOServiceProvider
build, buildFinish, close, getDetailInfo, getFileTypeVersion, getLastModified, getStructureIterator, isBuilder, readSection, readToByteChannel, readToOutputStream, release, sendIospMessage, setNetcdfFile, streamToByteChannel, syncExtend, toStringDebug
-
-
-
-
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
-
-
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:
openin interfaceucar.nc2.iosp.IOServiceProvider- Overrides:
openin classucar.nc2.iosp.AbstractIOServiceProvider- Throws:
IOException
-
readNestedData
public ucar.ma2.Array readNestedData(ucar.nc2.Variable v2, ucar.ma2.Section section) throws ucar.ma2.InvalidRangeExceptionRead nested structure data- Throws:
ucar.ma2.InvalidRangeException
-
readData
public ucar.ma2.Array readData(ucar.nc2.Variable v2, ucar.ma2.Section section) throws ucar.ma2.InvalidRangeExceptionRead 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 namebos- 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 buffervinfo- 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 buffervinfo- 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 buffervinfo- 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 IOExceptionRead compressed data- Parameters:
hoff- header offsetdoff- data offset- Returns:
- the array of data
- Throws:
IOException
-
readUCompData
public byte[] readUCompData(long hoff, long doff) throws IOExceptionRead uncompressed data- Parameters:
hoff- header offsetdoff- data offset- Returns:
- the array of data
- Throws:
IOException
-
reacquire
public void reacquire() throws IOException- Specified by:
reacquirein interfaceucar.nc2.iosp.IOServiceProvider- Overrides:
reacquirein classucar.nc2.iosp.AbstractIOServiceProvider- Throws:
IOException
-
-