net.sourceforge.jgrib
Class GribFileGroup

java.lang.Object
  extended by net.sourceforge.jgrib.GribFileGroup

public class GribFileGroup
extends java.lang.Object

A class to store multiple GribFile-s while allowing access to the GribRecords of those files as if they were one large file. This came about because it seems most GRIB files are for a single forecast time, and this will allow an entire forecast period to be built. Therefore, the methods are biased towards the separate files being the same model run at different forecast times. It can be used otherwise, but files will be sorted according to forecast time. TODO - This is not yet functional - the next item on my "todo" list

Version:
1.0
Author:
Capt Richard D. Gonzalez

Constructor Summary
GribFileGroup(java.lang.String[] filenames)
           
 
Method Summary
 GribRecordGDS[] getGrids()
          Get get grids
 GribRecordLight[] getLightRecords()
          Get Light GRIB records
 int getRecordCount()
          Get the number of records this GRIB file contains.
 java.lang.String[] getTypeNames()
          Get type names
 void listParameters(java.io.PrintStream out)
          Method added by Richard Gonzalez 23 Sep 02.
 void listRecords(java.io.PrintStream out)
          Print out overview of GRIB file content.
 java.lang.String toString()
          Get a string representation of the GRIB file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GribFileGroup

public GribFileGroup(java.lang.String[] filenames)
              throws java.io.FileNotFoundException,
                     java.io.IOException,
                     NotSupportedException,
                     NoValidGribException
Parameters:
filenames -
Throws:
java.io.FileNotFoundException
java.io.IOException
NotSupportedException
NoValidGribException
Method Detail

getTypeNames

public java.lang.String[] getTypeNames()
Get type names

Returns:
array with names

getLightRecords

public GribRecordLight[] getLightRecords()
Get Light GRIB records

Returns:
Array with Light Grib Records

getGrids

public GribRecordGDS[] getGrids()
Get get grids

Returns:
array with grids

getRecordCount

public int getRecordCount()
Get the number of records this GRIB file contains.

Returns:
number of records in this GRIB file

listRecords

public void listRecords(java.io.PrintStream out)
                 throws java.io.IOException,
                        NoValidGribException,
                        NotSupportedException
Print out overview of GRIB file content.

Parameters:
out - print stream the output is written to
Throws:
java.io.IOException - if a record can not be opened etc.
NoValidGribException - if a record is no valid GRIB record
NotSupportedException

listParameters

public void listParameters(java.io.PrintStream out)
Method added by Richard Gonzalez 23 Sep 02. Print out listing of parameters in GRIB file.

Parameters:
out - print stream the output is written to

toString

public java.lang.String toString()
Get a string representation of the GRIB file.

Overrides:
toString in class java.lang.Object
Returns:
NoValidGribException if record is no valid GRIB record