ucar.nc2.iosp.gempak
Class GempakSoundingIOSP

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

public class GempakSoundingIOSP
extends GempakStationFileIOSP

An IOSP for Gempak Sounding (SN) data.

Author:
Unidata Java Development Team

Nested Class Summary
protected static class GempakSoundingIOSP.MakeNetcdfFile
          TODO: generalize this static class for testing
 
Field Summary
protected static Dimension DIM_MAXMERGELEVELS
          static for shared dimension of length 4
 
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
GempakSoundingIOSP()
           
 
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  Sequence makeSequence(Structure parent, String partName, boolean includeMissing)
          Make a Sequence for the part
protected  AbstractGempakStationFileReader makeStationReader()
          Make the station reader for this type
 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
 

Field Detail

DIM_MAXMERGELEVELS

protected static final Dimension DIM_MAXMERGELEVELS
static for shared dimension of length 4

Constructor Detail

GempakSoundingIOSP

public GempakSoundingIOSP()
Method Detail

makeStationReader

protected AbstractGempakStationFileReader makeStationReader()
Make the station reader for this type

Specified by:
makeStationReader in class GempakStationFileIOSP
Returns:
a GempakSoundingFileReader

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

makeSequence

protected Sequence makeSequence(Structure parent,
                                String partName,
                                boolean includeMissing)
Make a Sequence for the part

Parameters:
parent - parent structure
partName - partname
includeMissing - true to include the missing variable
Returns:
a Structure


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