ucar.nc2.iosp.mcidas
Class McIDASGridServiceProvider

java.lang.Object
  extended by ucar.nc2.iosp.AbstractIOServiceProvider
      extended by ucar.nc2.iosp.grid.GridServiceProvider
          extended by ucar.nc2.iosp.mcidas.McIDASGridServiceProvider
All Implemented Interfaces:
IOServiceProvider

public class McIDASGridServiceProvider
extends GridServiceProvider

An IOSP for McIDAS Grid data

Version:
$Revision: 1.3 $
Author:
IDV Development Team

Field Summary
protected  McIDASGridReader mcGridReader
          McIDAS file reader
 
Fields inherited from class ucar.nc2.iosp.grid.GridServiceProvider
addLatLon, debugMissing, debugMissingDetails, debugOpen, debugProj, debugTiming, debugVert, fmrcCoordSys, ncfile, parseInfo, raf, useMaximalCoordSys
 
Constructor Summary
McIDASGridServiceProvider()
           
 
Method Summary
protected  float[] _readData(GridRecord gr)
          Read the data for this GridRecord
 boolean isValidFile(RandomAccessFile raf)
          Is this a valid file?
static void main(java.lang.String[] args)
          Test this
protected  void open(GridIndex index, CancelTask cancelTask)
          Open the index and create the netCDF file from that
 void open(RandomAccessFile raf, NetcdfFile ncfile, CancelTask cancelTask)
          Open the service provider for reading.
 boolean sync()
          Sync and extend
 
Methods inherited from class ucar.nc2.iosp.grid.GridServiceProvider
close, getDetailInfo, readData, sendIospMessage, setDebugFlags, syncExtend, useMaximalCoordSys
 
Methods inherited from class ucar.nc2.iosp.AbstractIOServiceProvider
createValidNetcdfObjectName, getStructureIterator, readSection, readToByteChannel, toStringDebug
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mcGridReader

protected McIDASGridReader mcGridReader
McIDAS file reader

Constructor Detail

McIDASGridServiceProvider

public McIDASGridServiceProvider()
Method Detail

isValidFile

public boolean isValidFile(RandomAccessFile raf)
                    throws java.io.IOException
Is this a valid file?

Parameters:
raf - RandomAccessFile to check
Returns:
true if a valid McIDAS grid file
Throws:
java.io.IOException - problem reading file

open

public void open(RandomAccessFile raf,
                 NetcdfFile ncfile,
                 CancelTask cancelTask)
          throws java.io.IOException
Open the service provider for reading.

Specified by:
open in interface IOServiceProvider
Overrides:
open in class GridServiceProvider
Parameters:
raf - file to read from
ncfile - netCDF file we are writing to (memory)
cancelTask - task for cancelling
Throws:
java.io.IOException - problem reading file

open

protected void open(GridIndex index,
                    CancelTask cancelTask)
             throws java.io.IOException
Open the index and create the netCDF file from that

Specified by:
open in class GridServiceProvider
Parameters:
index - GridIndex to use
cancelTask - cancel task
Throws:
java.io.IOException - problem reading the file

sync

public boolean sync()
Sync and extend

Specified by:
sync in interface IOServiceProvider
Overrides:
sync in class AbstractIOServiceProvider
Returns:
false

_readData

protected float[] _readData(GridRecord gr)
                     throws java.io.IOException
Read the data for this GridRecord

Specified by:
_readData in class GridServiceProvider
Parameters:
gr - grid identifier
Returns:
the data (or null)
Throws:
java.io.IOException - problem reading the data

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Test this

Parameters:
args - filename
Throws:
java.io.IOException - problem reading file