net.sourceforge.jgrib
Class GribPDSParamTable

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

public class GribPDSParamTable
extends java.lang.Object

A class containing static methods which deliver descriptions and names of parameters, levels and units for byte codes from GRIB records.


Field Summary
protected  int center_id
          Identification of center e.g. 88 for Oslo
protected  java.lang.String filename
          Stores the name of the file containing this table - not opened unless required for lookup.
protected  GribPDSParameter[] parameters
          Parameters - stores array of GribPDSParameter classes
static java.lang.String PROPERTY_GRIBTABURL
          System property variable to search, or set, when using user supplied gribtab directories, and or a stand alone gribtab file !!
protected  int subcenter_id
          Identification of center defined sub-center - not fully implemented yet
protected  int table_number
          Identification of parameter table version number
protected static java.util.ArrayList tables
          List of parameter tables
protected  java.net.URL url
          URL store corresponding url of filename containint this table.
 
Method Summary
 int getCenter_id()
           
 java.lang.String getFilename()
           
 GribPDSParameter getParameter(int id)
          Get the parameter with id id.
 java.lang.String getParameterDescription(int id)
          Get a description for the parameter with id id.
static GribPDSParamTable getParameterTable(int center, int subcenter, int number)
          Looks for the parameter table which matches the center, subcenter and table version from the tables array.
 java.lang.String getParameterTag(int id)
          Get the tag/name of the parameter with id id.
 java.lang.String getParameterUnit(int id)
          Get a description for the unit with id id.
 int getSubcenter_id()
           
 int getTable_number()
           
 java.net.URL getUrl()
           
protected static void readTableEntry(java.net.URL aFileUrl, java.util.ArrayList aTables)
           
 java.lang.String toString()
          Overrides Object.toString()
static void turnOffJGRIBLogging()
          This method is called as the very first nethod in the JGRIB library.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROPERTY_GRIBTABURL

public static final java.lang.String PROPERTY_GRIBTABURL
System property variable to search, or set, when using user supplied gribtab directories, and or a stand alone gribtab file !! Important: Remember to format this as an URL !!

See Also:
Constant Field Values

center_id

protected int center_id
Identification of center e.g. 88 for Oslo


subcenter_id

protected int subcenter_id
Identification of center defined sub-center - not fully implemented yet


table_number

protected int table_number
Identification of parameter table version number


filename

protected java.lang.String filename
Stores the name of the file containing this table - not opened unless required for lookup.


url

protected java.net.URL url
URL store corresponding url of filename containint this table. Opened if required for lookup.


parameters

protected GribPDSParameter[] parameters
Parameters - stores array of GribPDSParameter classes


tables

protected static java.util.ArrayList tables
List of parameter tables

Method Detail

turnOffJGRIBLogging

public static void turnOffJGRIBLogging()
This method is called as the very first nethod in the JGRIB library. It's primary function is to turn off the warnings from the Log4J library, which is printed to STDERR, if logging is not enablet. If log4j is allready configured this function leaves the configuration untouched. - frv_peg - 2006-07-25


readTableEntry

protected static void readTableEntry(java.net.URL aFileUrl,
                                     java.util.ArrayList aTables)
                              throws java.io.IOException,
                                     NotSupportedException
Parameters:
aFileUrl -
aTables -
Throws:
java.io.IOException
NotSupportedException

getParameterTable

public static GribPDSParamTable getParameterTable(int center,
                                                  int subcenter,
                                                  int number)
                                           throws NotSupportedException
Looks for the parameter table which matches the center, subcenter and table version from the tables array. If this is the first time asking for this table, then the parameters for this table have not been read in yet, so this is done as well.

Parameters:
center - - integer from PDS octet 5, representing Center.
subcenter - - integer from PDS octet 26, representing Subcenter
number - - integer from PDS octet 4, representing Parameter Table Version
Returns:
GribPDSParamTable matching center, subcenter, and number
Throws:
NotSupportedException

getParameter

public GribPDSParameter getParameter(int id)
Get the parameter with id id.

Parameters:
id -
Returns:
description of the unit for the parameter

getParameterTag

public java.lang.String getParameterTag(int id)
Get the tag/name of the parameter with id id.

Parameters:
id -
Returns:
tag/name of the parameter

getParameterDescription

public java.lang.String getParameterDescription(int id)
Get a description for the parameter with id id.

Parameters:
id -
Returns:
description for the parameter

getParameterUnit

public java.lang.String getParameterUnit(int id)
Get a description for the unit with id id.

Parameters:
id -
Returns:
description of the unit for the parameter

getCenter_id

public int getCenter_id()
Returns:
center_id

getSubcenter_id

public int getSubcenter_id()
Returns:
subcenter_id

getTable_number

public int getTable_number()
Returns:
table number

getFilename

public java.lang.String getFilename()
Returns:
filename

getUrl

public java.net.URL getUrl()
Returns:
url to file

toString

public java.lang.String toString()
Overrides Object.toString()

Overrides:
toString in class java.lang.Object
Returns:
String representation of the object
See Also:
Object.toString()