ucar.nc2.iosp.gempak
Class GempakSurfaceIOSP

java.lang.Object
  extended by ucar.nc2.iosp.AbstractIOServiceProvider
      extended by ucar.nc2.iosp.gempak.GempakStationFileIOSP
          extended by ucar.nc2.iosp.gempak.GempakSurfaceIOSP
All Implemented Interfaces:
IOServiceProvider

public class GempakSurfaceIOSP
extends GempakStationFileIOSP

An IOSP for Gempak Surface data.

Author:
Unidata Java Development Team

Nested Class Summary
protected static class GempakSurfaceIOSP.MakeNetcdfFile
          TODO: generalize this static class for testing
 
Field Summary
 
Fields inherited from class ucar.nc2.iosp.gempak.GempakStationFileIOSP
DIM_LEN2, DIM_LEN4, DIM_LEN8, gemreader, IMISS, MISSING_VAR, ncfile, parseInfo, raf, RMISS, TIME_VAR
 
Constructor Summary
GempakSurfaceIOSP()
           
 
Method Summary
protected  void fillNCFile()
          Build the netCDF file
 String getCFFeatureType()
          Get the CF feature type
 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  AbstractGempakStationFileReader makeStationReader()
          Make the station reader
 Array readData(Variable v2, Section section)
          Read the data for the variable
 
Methods inherited from class ucar.nc2.iosp.gempak.GempakStationFileIOSP
addGlobalAttributes, buildNCFile, close, getConventions, getDetailInfo, getStackTrace, getStnVarSize, makeMissingVariable, makeParamVariable, makeStationVariable, makeStationVars, makeStructure, open, printStack, sync, syncExtend
 
Methods inherited from class ucar.nc2.iosp.AbstractIOServiceProvider
getFileTypeVersion, getStructureIterator, readSection, readToByteChannel, sendIospMessage, toStringDebug
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GempakSurfaceIOSP

public GempakSurfaceIOSP()
Method Detail

makeStationReader

protected AbstractGempakStationFileReader makeStationReader()
Make the station reader

Specified by:
makeStationReader in class GempakStationFileIOSP
Returns:
GempakSurfaceFileReader

isValidFile

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

Specified by:
isValidFile in interface IOServiceProvider
Overrides:
isValidFile in class GempakStationFileIOSP
Parameters:
raf - RandomAccessFile to check
Returns:
true if a valid Gempak 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"

getCFFeatureType

public String getCFFeatureType()
Get the CF feature type

Overrides:
getCFFeatureType in class GempakStationFileIOSP
Returns:
the feature type

readData

public Array readData(Variable v2,
                      Section section)
               throws IOException,
                      InvalidRangeException
Read the data for the variable

Parameters:
v2 - Variable to read
section - section infomation
Returns:
Array of data
Throws:
IOException - problem reading from file
InvalidRangeException - invalid Range
See Also:
Range

main

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

Parameters:
args - file name
Throws:
IOException - problem reading the file

fillNCFile

protected void fillNCFile()
                   throws IOException
Build the netCDF file

Specified by:
fillNCFile in class GempakStationFileIOSP
Throws:
IOException - problem reading the file


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