[ncl-install] gdal and grib2 issue

Daniel Reinert Daniel.Reinert at dwd.de
Fri Mar 9 06:06:26 MST 2012


Dear Mary,

I just wanted to report a subtle issue that we ran into with ncl 6.0. 
Since here at DWD we are running a SuSe system with gcc 4.1.2, we had to 
compile ncl 6.0 from source. Everything went more or less smoothly, 
except for the following subtle GRIB2 problem that we encountered:

The compilation was performed WITH GDAL(v1.9.0) and WITH GRIB2 (g2clib 
v1.2.1) support.

When trying to read a Grib2 file containing Sattelite data, I got the 
following error from ncl_filedump:
/
getpdstemplate: PDS Template 4.31 not defined. /
/warning:Error unpacking GRIB record section 4. /
/fatal:Could not open(CTH_DE_201111070600.grb2)/

However, the current g2clib (both, the original one from NCEP (v1.2.3) 
and the modified one you provide (v1.2.1)) do contain the required 
template 4.31. The problem seems to be related to the fact, that GDAL 
also includes g2clib, but in a somewhat outdated version 
(gdal-1.9.0/frmts/grib/degrib18/g2clib-1.0.4), which does not contain 
Template 4.31. It seems that ncl is linked against the "wrong" g2clib, 
if GDAL is compiled in.

If ncl is compiled without GDAL support, then the GRIB2 file containing 
the satellite data can be read without problems.

Since we wanted to have GDAL compiled in, we looked for an alternative 
solution. The following worked for us:
When compiling GDAL, one can switch off the GRIB driver by using the 
configure flag "--without-grib". Then, ncl is linked against the correct 
g2clib. However, I'm not sure, whether this has any unwanted side-effects.

Is there a more 'elegant' way of telling ncl which g2clib library to use?

Cheers,
Daniel

-- 
---------------------------
Dr. Daniel Reinert
Deutscher Wetterdienst
Research and Development
63067 Offenbach am Main
Germany

Phone: +49 69 8062 2060
--------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-install/attachments/20120309/de45d00b/attachment.html 


More information about the ncl-install mailing list