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

Nested Class Summary
 
Nested classes/interfaces inherited from class ucar.nc2.iosp.grid.GridServiceProvider
GridServiceProvider.IndexExtendMode
 
Field Summary
protected  McIDASGridReader mcGridReader
          McIDAS file reader
 
Fields inherited from class ucar.nc2.iosp.grid.GridServiceProvider
addLatLon, alwaysInCache, debugMissing, debugMissingDetails, debugOpen, debugProj, debugTiming, debugVert, fmrcCoordSys, forceNewIndex, indexFileModeOnOpen, indexFileModeOnSync, ncfile, useMaximalCoordSys
 
Fields inherited from class ucar.nc2.iosp.AbstractIOServiceProvider
raf
 
Constructor Summary
McIDASGridServiceProvider()
           
 
Method Summary
protected  float[] _readData(GridRecord gr)
          Read the data for this GridRecord
 String getFileTypeDescription()
          Get the file type description
 String getFileTypeId()
          Get the file type id
 boolean isValidFile(RandomAccessFile raf)
          Is this a valid file?
static void main(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
forceNewIndex, getDetailInfo, isMissingXY, readData, sendIospMessage, setDebugFlags, setExtendIndex, setIndexAlwaysInCache, setIndexFileModeOnOpen, setIndexFileModeOnSync, useMaximalCoordSys
 
Methods inherited from class ucar.nc2.iosp.AbstractIOServiceProvider
close, getFileTypeVersion, getStructureIterator, readSection, readToByteChannel, syncExtend, 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 IOException
Is 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
See Also:
"http://www.unidata.ucar.edu/software/netcdf-java/formats/FileTypes.html"

getFileTypeDescription

public String getFileTypeDescription()
Get the file type description

Returns:
the file type description
See Also:
"http://www.unidata.ucar.edu/software/netcdf-java/formats/FileTypes.html"

open

public void open(RandomAccessFile raf,
                 NetcdfFile ncfile,
                 CancelTask cancelTask)
          throws 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:
IOException - problem reading file

open

protected void open(GridIndex index,
                    CancelTask cancelTask)
             throws 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:
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 IOException
Read the data for this GridRecord

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

main

public static void main(String[] args)
                 throws IOException
Test this

Parameters:
args - filename
Throws:
IOException - problem reading file


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.