gnudatalanguage / gdl

GDL - GNU Data Language
GNU General Public License v2.0
274 stars 61 forks source link

Grib & eccodes #1004

Closed alaingdl closed 3 years ago

alaingdl commented 3 years ago

OK, I am totally lost on what is Grib and the link with Eccodes. I suspect something is wrong in the detection of Grib/Eccodes. @slayoo

Assuming not using build_gdl.sh I have a Debian with libgrib-api-dev but with NO eccodes libs/paquets It crashes test_grib.pro with :

GDL> test_grib
% Compiled module: TEST_GRIB.
% TEST_GRIB: opening example.grib...
% TEST_GRIB: number of messages in file:        6
% TEST_GRIB: getting message from file...
GRIB_API ERROR   :  Unable to find boot.def. Context path=/usr/share/grib_api/definitions
/build/grib-api-1.28.0/src/grib_context.c at line 216: assertion failure Assert(0)
Magick: abort due to signal 6 (SIGABRT) "Abort"...
Aborted

I have another Debian without libgrib-api-dev installed but with all 3 paquets : libeccodes-data, libeccodes-dev, libeccodes0 installed. The test_grib.pro test does run perfectly.

Both give :

GDL> grib_exists()
       1

What is really needed ? Maybe we need few cleanup in CMakeList & related files ?!

(furthermore we have a minuscule bug because test_grib should be run in testsuite/ directory (file not found if run outside)).

slayoo commented 3 years ago

GRIB is a meteorological file format grib_api was a package created at ECMWF that later got superseded by eccodes - another package from ECMWF. The elements of the API that we use remained the same, though - which is why in CMake files we try to locate either of the libraries.

Noteworthy, GRIB support was added to GDL before it was added to IDL, and unfortunately the routine names and calling sequences differ between IDL and GDL as a result.

GillesDuvert commented 3 years ago

Same adventure as Alain on my size. As if some fundamental GRIB file was missing from the GRIB install. The change of names wrt IDL is too bad.

alaingdl commented 3 years ago

just a comment : what's new in IDL 8.8

The following 3rd party libraries have been added in this release: [...] ecCodes 2.15.0

The following 3rd party libraries have been removed in this release: [...] GRIB API

slayoo commented 3 years ago

let us then just leave eccodes as the only option? GRIB-API is anyhow not to be used any more

slayoo commented 3 years ago

here's a PR: https://github.com/gnudatalanguage/gdl/pull/1013

slayoo commented 3 years ago

I've merged #1013, so I guess this can be closed (as GDL will no longer compile with GRIB_API, only ECCODES supported)