Package ucar.nc2.iosp.mcidas
Class McIDASGridServiceProvider
- java.lang.Object
-
- ucar.nc2.iosp.AbstractIOServiceProvider
-
- ucar.nc2.iosp.grid.GridServiceProvider
-
- ucar.nc2.iosp.mcidas.McIDASGridServiceProvider
-
- All Implemented Interfaces:
ucar.nc2.iosp.IOServiceProvider
public class McIDASGridServiceProvider extends GridServiceProvider
An IOSP for McIDAS Grid data
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ucar.nc2.iosp.grid.GridServiceProvider
GridServiceProvider.IndexExtendMode
-
-
Field Summary
Fields Modifier and Type Field Description protected McIDASGridReadermcGridReaderMcIDAS file reader-
Fields inherited from class ucar.nc2.iosp.grid.GridServiceProvider
addLatLon, alwaysInCache, debugMissing, debugMissingDetails, debugOpen, debugProj, debugTiming, debugVert, forceNewIndex, indexFileModeOnOpen, indexFileModeOnSync
-
-
Constructor Summary
Constructors Constructor Description McIDASGridServiceProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected float[]_readData(GridRecord gr)Read the data for this GridRecordStringgetFileTypeDescription()Get the file type descriptionStringgetFileTypeId()Get the file type idbooleanisValidFile(ucar.unidata.io.RandomAccessFile raf)Is this a valid file?protected voidopen(GridIndex index, ucar.nc2.util.CancelTask cancelTask)Open the index and create the netCDF file from thatvoidopen(ucar.unidata.io.RandomAccessFile raf, ucar.nc2.NetcdfFile ncfile, ucar.nc2.util.CancelTask cancelTask)Open the service provider for reading.booleansync()Sync and extend-
Methods inherited from class ucar.nc2.iosp.grid.GridServiceProvider
forceNewIndex, isMissingXY, readData, setDebugFlags, setExtendIndex, setIndexAlwaysInCache, setIndexFileModeOnOpen, setIndexFileModeOnSync
-
Methods inherited from class ucar.nc2.iosp.AbstractIOServiceProvider
build, buildFinish, close, getDetailInfo, getFileTypeVersion, getLastModified, getStructureIterator, isBuilder, reacquire, readSection, readToByteChannel, readToOutputStream, release, sendIospMessage, setNetcdfFile, streamToByteChannel, syncExtend, toStringDebug
-
-
-
-
Field Detail
-
mcGridReader
protected McIDASGridReader mcGridReader
McIDAS file reader
-
-
Method Detail
-
isValidFile
public boolean isValidFile(ucar.unidata.io.RandomAccessFile raf) throws IOExceptionIs this a valid file?- Parameters:
raf- RandomAccessFile to check- Returns:
- true if a valid McIDAS grid file
- Throws:
IOException- problem reading file
-
getFileTypeId
public String getFileTypeId()
Get the file type id- Returns:
- the file type id
-
getFileTypeDescription
public String getFileTypeDescription()
Get the file type description- Returns:
- the file type description
-
open
public void open(ucar.unidata.io.RandomAccessFile raf, ucar.nc2.NetcdfFile ncfile, ucar.nc2.util.CancelTask cancelTask) throws IOExceptionOpen the service provider for reading.- Specified by:
openin interfaceucar.nc2.iosp.IOServiceProvider- Overrides:
openin classGridServiceProvider- Parameters:
raf- file to read fromncfile- netCDF file we are writing to (memory)cancelTask- task for cancelling- Throws:
IOException- problem reading file
-
open
protected void open(GridIndex index, ucar.nc2.util.CancelTask cancelTask) throws IOException
Open the index and create the netCDF file from that- Specified by:
openin classGridServiceProvider- Parameters:
index- GridIndex to usecancelTask- cancel task- Throws:
IOException- problem reading the file
-
sync
public boolean sync()
Sync and extend- Returns:
- false
-
_readData
protected float[] _readData(GridRecord gr) throws IOException
Read the data for this GridRecord- Specified by:
_readDatain classGridServiceProvider- Parameters:
gr- grid identifier- Returns:
- the data (or null)
- Throws:
IOException- problem reading the data
-
-