ucar.grib.grib1
Class Grib1SplitByGridID

java.lang.Object
  extended by ucar.grib.grib1.Grib1SplitByGridID

public final class Grib1SplitByGridID
extends java.lang.Object

A class that scans a GRIB file to split file according to Grid ID.


Field Summary
static java.lang.String fileName
           
static java.util.Map<java.lang.String,java.io.DataOutputStream> gridFiles
           
 
Constructor Summary
Grib1SplitByGridID(ucar.unidata.io.RandomAccessFile raf)
          Constructs a Grib1Input object from a raf.
 
Method Summary
static void main(java.lang.String[] args)
          Splits a Grib1 file according to Grid IDs in the PDS section
 boolean scan()
          scans a Grib file to gather information that could be used to create an index or dump the metadata contents.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fileName

public static java.lang.String fileName

gridFiles

public static java.util.Map<java.lang.String,java.io.DataOutputStream> gridFiles
Constructor Detail

Grib1SplitByGridID

public Grib1SplitByGridID(ucar.unidata.io.RandomAccessFile raf)
Constructs a Grib1Input object from a raf.

Parameters:
raf - with GRIB content
Method Detail

scan

public final boolean scan()
                   throws java.io.IOException
scans a Grib file to gather information that could be used to create an index or dump the metadata contents.

Returns:
boolean if file read successful
Throws:
java.io.IOException - if raf does not contain a valid GRIB record

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException
Splits a Grib1 file according to Grid IDs in the PDS section

Parameters:
args - filename
Throws:
java.io.IOException - error when reading file