public class GradsBinaryGridServiceProvider extends AbstractIOServiceProvider
Modifier and Type | Field and Description |
---|---|
protected GradsDataDescriptorFile |
gradsDDF
GrADS file reader
|
raf
Constructor and Description |
---|
GradsBinaryGridServiceProvider() |
Modifier and Type | Method and Description |
---|---|
protected void |
buildNCFile()
Build the netCDF file
|
void |
close()
Close this IOSP and associated files
|
String |
getFileTypeDescription()
Get the file type description
|
String |
getFileTypeId()
Get the file type id
|
boolean |
isValidFile(RandomAccessFile raf)
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)
|
void |
open(RandomAccessFile raf,
NetcdfFile ncfile,
CancelTask cancelTask)
Open the service provider for reading.
|
Array |
readData(Variable v2,
Section section)
Read the data for the variable
|
getDetailInfo, getFileTypeVersion, getLastModified, getStructureIterator, readSection, readToByteChannel, readToOutputStream, sendIospMessage, streamToByteChannel, syncExtend, toStringDebug
protected GradsDataDescriptorFile gradsDDF
public boolean isValidFile(RandomAccessFile raf) throws IOException
raf
- RandomAccessFile to checkIOException
- problem reading filepublic String getFileTypeId()
public String getFileTypeDescription()
public void open(RandomAccessFile raf, NetcdfFile ncfile, CancelTask cancelTask) throws IOException
open
in interface IOServiceProvider
open
in class AbstractIOServiceProvider
raf
- file to read fromncfile
- netCDF file we are writing to (memory)cancelTask
- task for cancellingIOException
- problem reading fileprotected void buildNCFile() throws IOException
IOException
- problem reading the filepublic void close() throws IOException
close
in interface IOServiceProvider
close
in class AbstractIOServiceProvider
IOException
- problem closing filespublic Array readData(Variable v2, Section section) throws IOException, InvalidRangeException
v2
- Variable to readsection
- section infomationIOException
- problem reading from fileInvalidRangeException
- invalid RangeRange
Copyright © 1999–2015 UCAR/Unidata. All rights reserved.