Project

General

Profile

GRIB2 to NetCDF

Added by Brian Walsh over 11 years ago

Hello,

I'm trying to convert a GRIB2 file to NetCDF using the CDO command line and it gives me the following error:

Error (gribapiScanTimestep1) : GRIB_API support not compiled in!

I only downloaded and installed the CDO executable file (didn't compile), so how am I able to compile the support for GRIB_API?


Replies (10)

RE: GRIB2 to NetCDF - Added by Ralf Mueller over 11 years ago

The windows binary does not support GRIB2 (as stated on Win32). If you need this on windows, you have to use cygwin and compile cdo yourself just like on unix.

RE: GRIB2 to NetCDF - Added by Ralf Mueller over 11 years ago

If you need any assistance with cygwin installation, drop a line here.

RE: GRIB2 to NetCDF - Added by Chris Brundick about 11 years ago

Ralf Mueller wrote:

If you need any assistance with cygwin installation, drop a line here.

Sorry to tag on to this question but I think my issue is related. I'm looking into converting a GRIB2 file to GRIB1. I tried to configure the linux build to use the grib_api as follows:

./configure --with-grib_api=yes

but I got the following error:
configure: error: Could not link to grib_api library

Not sure where to go from here...

RE: GRIB2 to NetCDF - Added by Ralf Mueller about 11 years ago

Chris Brundick wrote:

Ralf Mueller wrote:

If you need any assistance with cygwin installation, drop a line here.

Sorry to tag on to this question but I think my issue is related. I'm looking into converting a GRIB2 file to GRIB1. I tried to configure the linux build to use the grib_api as follows:

./configure --with-grib_api=yes

but I got the following error:
configure: error: Could not link to grib_api library

With this configure option, the grib_api library has to be installed in /usr. You better use a directory for the value of such an option. What's its installation directory? Could you upload the config.log file?

RE: GRIB2 to NetCDF - Added by Chris Brundick about 11 years ago

Sorry - I'm new to this. Where do you get the grib_api library?

RE: GRIB2 to NetCDF - Added by Ralf Mueller about 11 years ago

See the installation instructions in the docu.
Some general remarks: If you're working on Linux, BSD or MacOS, you might not have to compile CDO yourself, have look here. If this is not the case, the IO libraries might be available as packages and you can configure CDO with ./configure --with-netcdf=/usr (for netcdf lib).

hth
ralf

RE: GRIB2 to NetCDF - Added by Chris Brundick about 11 years ago

Disregard. I was able to install grib_api and configure. Thanks.

RE: GRIB2 to NetCDF - Added by Chris Brundick about 11 years ago

Thanks for the quick responses. I was able to install the grib_api libs using (apt-get install libgrib-api-dev) and then configure with the --with-grib_api=yes, make, and make install. I was then able to successfully convert a grib2 file to the grib1 format. My only remaining question is with regard to a bunch of warning messages I received during the conversion. I got (probably on the order of 100) warnings that all said something like:

Warning (cgribexDefParam) : Can't convert GRIB2 parameter ID (2.2.0) to GRIB1, set to 2.2!

Any idea what this means?

RE: GRIB2 to NetCDF - Added by Ralf Mueller about 11 years ago

GRIB1 and GRIB2 are not totally exchangeable. have you checked the debian cdo package? It should be available on debian-related systems.

BTW, did you also install the libgribapi-data package? I guess it's needed

RE: GRIB2 to NetCDF - Added by Chris Brundick about 11 years ago

I did not install the libgribapi-data package. Things seemed to function fine without it, unless you're suggesting that these warnings could be resolved with this additional library?

    (1-10/10)