On Tue, 6 Oct 2009, Tor Christian Bekkvik wrote:
Hi, I have some questions regarding GRIB table configuration:
1) Is there a way to configure GRIBtables in NetCDF without rebuilding
grib-6.0.jar in ncSrc-4.0.zip!\lib\release\ ?
Tor,
Yes, the following routine, in class GribPDSParamTable
/**
* Reads in the list of tables available and stores them. Does not
actually
* open the parameter tables files, nor store the list of parameters,
but
* just stores the file names of the parameter tables.
* Parameters for a table are read in when the table is requested (in
the
* getParameterTable method).
*
* @param userGribTabList string of userlookup file
* @throws IOException on read error
*/
public static void addParameterUserLookup(String userGribTabList)
There is a sample file with the grib jar called userlookup.lst, it has
the same syntax as tablelookup.lst. If the table name begins with /,
http:, or file: then it looks for the file with the full path name,
otherwise it assumes the table is in the resource directory. The tables
are loaded according to site ID, subsite ID and table version number
that's obtained from the data file. If you load a new table with the same
configuration as one in tablelookup.lst file, your new configuration will
over write the original configuration.
GribPDSParamTable.addParameterUserLookup(
"/local/robb/trunk20090914/grib/resources/resources/grib/tables/userlookup.lst");
2) Where can I find sourcecode for grib-6.0.jar (or later versions) ? (the
source
will answer question 1, but is not included in ncSrc-4.0.zip)
The source for the Grib decoder package is located on page:
http://www.unidata.ucar.edu/software/decoders/ unders downloads.
The Grib package has just went under a major refactor to implement the
Ensemble data processing, so some APIs have be deprecated. The deprecated
APIs are going to be removed in a future release so I suggest looking at
the javaDocs for the changes.
RObb...
We occasionally have gribfiles using gribtables not defined in grib*.jar. The
only
solution I currently know, is to unzip the grib*.jar file and modify gribtable
definitions inside \resources\grib\tables\tablelookup.lst. (tablelookup.lst
points to *.tab files in the same directory) This is not very user friendly,
so perhaps there is a java property or method call where you can override some
gribtable settings?
Thanks,
Tor C Bekkvik
--
Tor Christian Bekkvik
Scientist
Christian Michelsen Research AS
Phone: +47 55 57 42 28
===============================================================================
Robb Kambic Unidata Program Center
Software Engineer III Univ. Corp for Atmospheric Research
rkambic@xxxxxxxxxxxxxxxx WWW: http://www.unidata.ucar.edu/
===============================================================================