public class SigmetIOServiceProvider extends AbstractIOServiceProvider
Modifier and Type | Field and Description |
---|---|
static java.util.Map<java.lang.String,java.lang.Number> |
recHdr |
location, ncfile, raf, rafOrder
Constructor and Description |
---|
SigmetIOServiceProvider() |
Modifier and Type | Method and Description |
---|---|
void |
doNetcdfFileCoordinate(NetcdfFile ncfile,
int[] bst,
short[] yr,
short[] m,
short[] dda,
java.util.ArrayList<Variable> varList,
java.util.Map<java.lang.String,java.lang.Number> recHdr)
Fill all of the variables/attributes in the ncfile
|
java.lang.String |
getFileTypeDescription()
Get a human-readable description for this file type.
|
java.lang.String |
getFileTypeId()
Get a unique id for this file type.
|
java.lang.String |
getFileTypeVersion()
Get the version of this file type.
|
java.util.ArrayList<Variable> |
init(RandomAccessFile raf,
NetcdfFile ncfile,
java.util.Map<java.lang.String,java.lang.String> hdrNames)
Define Dimensions, Variables, Attributes in ncfile
|
boolean |
isValidFile(RandomAccessFile raf)
Check if this is a valid SIGMET-IRIS file for this IOServiceProvider.
|
static void |
main(java.lang.String[] args) |
void |
open(RandomAccessFile raf,
NetcdfFile ncfile,
CancelTask cancelTask)
Open existing file, and populate ncfile with it.
|
Array |
readData(Variable v2,
Section section)
Read data from a top level Variable and return a memory resident Array.
|
Array |
readData1(Variable v2,
Section section)
Read data from a top level Variable and return a memory resident Array.
|
Array |
readFloatData(LayoutRegular index,
Variable v2)
Read data from a top level Variable of FLOAT data type and return a memory resident Array.
|
Array |
readIntData(LayoutRegular index,
Variable v2)
Read data from a top level Variable of INTEGER data type and return a memory resident Array.
|
static java.util.Map<java.lang.String,java.lang.Number> |
readRecordsHdr(RandomAccessFile raf)
Read some global data from SIGMET file.
|
java.util.Map<java.lang.String,java.lang.String> |
readStnNames(RandomAccessFile raf)
Read StationName strings
|
long |
readToByteChannel11(Variable v2,
Section section,
java.nio.channels.WritableByteChannel channel)
Read data from a top level Variable and send data to a WritableByteChannel.
|
close, getDetailInfo, getLastModified, getStructureIterator, reacquire, readSection, readToByteChannel, readToOutputStream, release, sendIospMessage, streamToByteChannel, syncExtend, toStringDebug
public static void main(java.lang.String[] args)
public java.lang.String getFileTypeDescription()
IOServiceProvider
public java.lang.String getFileTypeVersion()
IOServiceProvider
getFileTypeVersion
in interface IOServiceProvider
getFileTypeVersion
in class AbstractIOServiceProvider
public java.lang.String getFileTypeId()
IOServiceProvider
public boolean isValidFile(RandomAccessFile raf)
raf
- RandomAccessFilepublic void open(RandomAccessFile raf, NetcdfFile ncfile, CancelTask cancelTask) throws java.io.IOException
open
in interface IOServiceProvider
open
in class AbstractIOServiceProvider
raf
- the file to work on, it has already passed the isValidFile() test.ncfile
- add objects to this empty NetcdfFilecancelTask
- used to monitor user cancellation; may be null.java.io.IOException
- if read errorpublic static java.util.Map<java.lang.String,java.lang.Number> readRecordsHdr(RandomAccessFile raf)
public java.util.Map<java.lang.String,java.lang.String> readStnNames(RandomAccessFile raf)
public java.util.ArrayList<Variable> init(RandomAccessFile raf, NetcdfFile ncfile, java.util.Map<java.lang.String,java.lang.String> hdrNames) throws java.io.IOException
raf
- ucar.unidata.io.RandomAccessFile corresponds of SIGMET datafile.ncfile
- an empty NetcdfFile object which will be filled.hdrNames
- java.util.Map with values for "StationName.." Attributesjava.io.IOException
public void doNetcdfFileCoordinate(NetcdfFile ncfile, int[] bst, short[] yr, short[] m, short[] dda, java.util.ArrayList<Variable> varList, java.util.Map<java.lang.String,java.lang.Number> recHdr)
ncfile
- NetcdfFile object which will be filled.bst
- number of seconds since midnight for start of sweepyr
- year of start of each sweepm
- month of start of each sweepdda
- day of start of each sweepvarList
- ArrayList of Variables of ncfilerecHdr
- java.util.Map with values for Attributespublic Array readData1(Variable v2, Section section) throws java.io.IOException, InvalidRangeException
v2
- Variable. It may have FLOAT/INTEGER data type.section
- wanted section of data of Variable. The section list is a list
of ucar.ma2.Range which define the requested data subset.java.io.IOException
InvalidRangeException
public Array readData(Variable v2, Section section) throws java.io.IOException, InvalidRangeException
IOServiceProvider
v2
- a top-level Variablesection
- 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.java.io.IOException
- if read errorInvalidRangeException
- if invalid sectionRange
public Array readIntData(LayoutRegular index, Variable v2) throws java.io.IOException
index
- LayoutRegular objectv2
- Variable has INTEGER data type.java.io.IOException
public Array readFloatData(LayoutRegular index, Variable v2) throws java.io.IOException
index
- LayoutRegular objectv2
- Variable has FLOAT data type.java.io.IOException
public long readToByteChannel11(Variable v2, Section section, java.nio.channels.WritableByteChannel channel) throws java.io.IOException, InvalidRangeException
v2
- Variablesection
- wanted section of data of Variable. The section list is a list
of ucar.ma2.Range which define the requested data subset.channel
- WritableByteChannel object - channel that can write bytes.java.io.IOException
InvalidRangeException