ucar.nc2.iosp.gempak
Class GempakSoundingFileReader

java.lang.Object
  extended by ucar.nc2.iosp.gempak.GempakFileReader
      extended by ucar.nc2.iosp.gempak.AbstractGempakStationFileReader
          extended by ucar.nc2.iosp.gempak.GempakSoundingFileReader
All Implemented Interfaces:
GempakConstants

public class GempakSoundingFileReader
extends AbstractGempakStationFileReader

Read a Gempak grid file

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

Nested Class Summary
 
Nested classes/interfaces inherited from class ucar.nc2.iosp.gempak.GempakFileReader
GempakFileReader.DMFileHeaderInfo, GempakFileReader.DMHeaders, GempakFileReader.DMKeys, GempakFileReader.DMLabel, GempakFileReader.DMParam, GempakFileReader.DMPart, GempakFileReader.Key, GempakFileReader.PackingInfo, GempakFileReader.RData
 
Field Summary
static java.lang.String DATE
          date key identifier
static int HGHT_COORD
          HGHT vertical coordinate
static java.lang.String MERGED
          standard surface file id
static int PRES_COORD
          PRES vertical coordinate
static java.lang.String SNDT
          Surface Text identifier
static int THTA_COORD
          THTA vertical coordinate
static java.lang.String TIME
          time key identifier
static java.lang.String UNMERGED
          climate surface file id
 
Fields inherited from class ucar.nc2.iosp.gempak.AbstractGempakStationFileReader
subType
 
Fields inherited from class ucar.nc2.iosp.gempak.GempakFileReader
dmLabel, fileHeaderInfo, fileSize, headers, keys, MTMACH, mvmst, needToSwap, parts, rf
 
Fields inherited from interface ucar.nc2.iosp.gempak.GempakConstants
COL, IMISSD, LLGDHD, LLNANL, LLNNAV, LLSTHL, MBLKSZ, MDCHAR, MDGDEC, MDGDIF, MDGGRB, MDGNMC, MDGNON, MDGRB2, MDGRID, MDINTG, MDREAL, MDRPCK, MFGD, MFSF, MFSN, MTALPH, MTAPOL, MTHP, MTIBM, MTIGPH, MTIRIS, MTLNUX, MTSUN, MTULTX, MTVAX, RDIFFD, RMISSD, ROW
 
Method Summary
static GempakSoundingFileReader getInstance(RandomAccessFile raf, boolean fullCheck)
          Initialize the file, read in all the metadata (ala DM_OPEN)
protected  boolean init()
          Initialize this reader.
protected  boolean init(boolean fullCheck)
          Initialize this reader.
static void main(java.lang.String[] args)
          Run the program
protected  void makeFileSubType()
          Make the file subtype
 void printOb(int row, int col)
          Print the list of dates in the file
 
Methods inherited from class ucar.nc2.iosp.gempak.AbstractGempakStationFileReader
findStationIndex, getDates, getDateString, getFileSubType, getFileType, getParameters, getStationKeyNames, getStations, makeDateList, printDates, printStations, readStationsAndTimes
 
Methods inherited from class ucar.nc2.iosp.gempak.GempakFileReader
DM_RDTR, DM_RDTR, DM_RFLT, DM_RFLT, DM_RFLT, DM_RINT, DM_RINT, DM_RINT, DM_RPKG, DM_RSTR, DM_RSTR, DM_UNPK, findFileHeader, findKey, getBits, getByteOrder, getByteOrder, getDataPointer, getFile, getFileHeader, getFilename, getInitFileSize, getOffset, getPart, getPartNumber, init, logError, printFileLabel, printHeaders, printKeys, printParts, readFileHeaderInfo, readHeaders, readKeys, readParts
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SNDT

public static final java.lang.String SNDT
Surface Text identifier

See Also:
Constant Field Values

DATE

public static final java.lang.String DATE
date key identifier

See Also:
Constant Field Values

TIME

public static final java.lang.String TIME
time key identifier

See Also:
Constant Field Values

PRES_COORD

public static final int PRES_COORD
PRES vertical coordinate

See Also:
Constant Field Values

THTA_COORD

public static final int THTA_COORD
THTA vertical coordinate

See Also:
Constant Field Values

HGHT_COORD

public static final int HGHT_COORD
HGHT vertical coordinate

See Also:
Constant Field Values

MERGED

public static final java.lang.String MERGED
standard surface file id

See Also:
Constant Field Values

UNMERGED

public static final java.lang.String UNMERGED
climate surface file id

See Also:
Constant Field Values
Method Detail

getInstance

public static GempakSoundingFileReader getInstance(RandomAccessFile raf,
                                                   boolean fullCheck)
                                            throws java.io.IOException
Initialize the file, read in all the metadata (ala DM_OPEN)

Parameters:
raf - RandomAccessFile to read.
fullCheck - if true, check entire structure
Returns:
A GempakSoundingFileReader
Throws:
java.io.IOException - problem reading file

init

protected boolean init()
                throws java.io.IOException
Initialize this reader. Read all the metadata

Overrides:
init in class AbstractGempakStationFileReader
Returns:
true if successful
Throws:
java.io.IOException - problem reading the data

init

protected boolean init(boolean fullCheck)
                throws java.io.IOException
Initialize this reader. Get the Grid specific info

Overrides:
init in class AbstractGempakStationFileReader
Parameters:
fullCheck - check to make sure there are grids we can handle
Returns:
true if successful
Throws:
java.io.IOException - problem reading the data

makeFileSubType

protected void makeFileSubType()
Make the file subtype

Specified by:
makeFileSubType in class AbstractGempakStationFileReader

printOb

public void printOb(int row,
                    int col)
Print the list of dates in the file

Parameters:
row - ob row
col - ob column

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Run the program

Parameters:
args - [0] filename (required), [1] variable name (X for default), [2] X to not list grids
Throws:
java.io.IOException - problem reading the file