NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [netcdf-java] GRIB collection processing in 4.3



On Feb 15, 2012, at 18:37, John Caron wrote:

>> I do have DiskCache.setCachePolicy (true) in my code, along with a call to
>> DiskCache.setRootDirectory(somepath), and it gets called during program
>> initialization. However, the gbx9 and ncx files are still appearing in the
>> same directory as the grib file rather than in the somepath directory.
> 
> i thought i fixed that. are you using the latest version?

I'm using a 4.3 bundle that I downloaded a couple days ago. The NJ and GRIB
jars are both timestamped Feb. 9.

I just doublechecked to see if using a custom cache directory otherwise
worked by opening a compressed NC file. NJ created the uncompressed
version in the specified cache dir.


>> BTW: Something else I was running into last night is that the discussion of
>> runtime loading of GRIB tables and lookup lists at
>> http://www.unidata.ucar.edu/software/netcdf-java/reference/RuntimeLoading.html
>> doesn't seem to have been updated for the latest NJ-4.3. I was getting
>> compiler/linker complaints because classes couldn't be found to be imported.
> 
> it has been updated, but probably i missed some. which classes where you 
> seeing missing?


The webpage says that to open a lookup list...

   Register a GRIB1 or GRIB2 lookup table (version 4.3):
   ucar.nc2.grib.grib1.Grib1ParamTable.addParameterTableLookup(String 
lookupFilename);
   ucar.nc2.grib.grib2.tables.Grib2Tables.addParameterTableLookup(String 
lookupFilename);

I am getting complaints that neither ucar.nc2.grib.grib1.Grib1ParamTable or
ucar.nc2.grib.grib2.tables.Grib2Tables is available.

It looks like I can replace the GRIB-1 call by instead trying

  
ucar.nc2.grib.grib1.tables.Grib1ParamTables.addParameterTableLookup(lookupFilename);

Note different package and class name.

I haven't figure out what to replace the GRIB-2 call with, but at the moment 
that
doesn't matter as I don't have a user's sample GRIB-2 table or lookup list to
test it on anyway.

I haven't yet tried a straight open of a GRIB table without going through an
intervening lookup list, but again, when I look at the examples on the webpage

  Register a GRIB1 or GRIB2 table (version 4.3):

  ucar.nc2.grib.grib1.Grib1ParamTable.addParameterTable(int center, int 
subcenter, int tableVersion, String tableFilename);
  ucar.nc2.grib.grib2.tables.Grib2Tables.addParameterTable(int center, int 
subcenter, int masterVersion, int localVersion, String tableFilename);

it doesnt't look right. The GRIB-1 looks, again, like it's missing the
.tables. from the package path. The GRIB-2 .tables. package just isn't there.

rbs


--
Robert B. Schmunk
NASA Goddard Institute for Space Studies, 2880 Broadway, New York, NY 10025
212-678-5535