cdo grib-api support
Added by Palina Lapo almost 9 years ago
Hello! I tried to install cdo-1.7.1 with support of Grib-api and HDF5, NetCDF, Jasper. I have problems when I set option --with-grib_api. I have preinstalled GRIB_API on my computer. Every time I have error message
checking for library containing grib_get_message... no
configure: error: Could not link to grib_api library
configure: error: ./configure failed for libcdi
When I run configure I use these parameters:
LDFLAGS="-L/data/RHMC/users/models/wrf/WRFV3.7/data/GRIB/GRIB_API/lib/ -L/RHMC/soft/jasper/lib -L/data/RHMC/users/models/wrf/WRFV3.7/data/NETCDF/lib -L/data/RHMC/users/models/wrf/WRFV3.7/data/cdo/libs4cdo-0.0.11/hdf5-1.8.15/lib -L/usr/local/lib/openjpeg-2.1 -L/data/RHMC/users/models/wrf/WRFV3.7/data/cdo/cdo-1.7.0/libcdi/lib"
CPPFLAGS="-I/data/RHMC/users/models/wrf/WRFV3.7/data/GRIB/GRIB_API/include/ -I/RHMC/soft/jasper/include -I/data/RHMC/users/models/wrf/WRFV3.7/data/NETCDF/include -I/data/RHMC/users/models/wrf/WRFV3.7/data/cdo/libs4cdo-0.0.11/hdf5-1.8.15/include -I/usr/local/include/openjpeg-2.1 -I/data/RHMC/users/models/wrf/WRFV3.7/data/cdo/cdo-1.7.0/libcdi/include"
./configure --with-netcdf=/data/RHMC/users/models/wrf/WRFV3.7/data/NETCDF/lib --with-hdf5=/data/RHMC/users/models/wrf/WRFV3.7/data/cdo/libs4cdo-0.0.11/hdf5-1.8.15/lib --with-grib_api=/data/RHMC/users/models/wrf/WRFV3.7/data/GRIB/GRIB_API/
What should I do for succesfull installation cdo with GRIB_API support?
With best regards
config.log (116 KB) config.log |
Replies (17)
RE: cdo grib-api support - Added by Ralf Mueller almost 9 years ago
Hi!
- the configure options --with-netcdf/--with-hdf5 and so on need the root installation directory of the libraries, i.e. where lib and include can be found. This configure call works because of the LDFLAGS and CPPFLAGS setup.
- the grib_api test from the uploaded config.log is successfull: line 1551 of config.log and before
the only failure is from the libcdi configure call. You should upload the config.log from that subdir.
cheers
ralf
RE: cdo grib-api support - Added by Ralf Mueller almost 9 years ago
your C compiler is from 2010. To get the most out of CDO, it should get an update.
RE: cdo grib-api support - Added by Palina Lapo almost 9 years ago
Which compilers should I use?
config_libcdi.log (167 KB) config_libcdi.log |
RE: cdo grib-api support - Added by Ralf Mueller almost 9 years ago
GCC is fine, it just a little old. Performance could benefit from using a new version (4.9 or above). Esp. remapping will speed up.
RE: cdo grib-api support - Added by Ralf Mueller almost 9 years ago
You used
-L/usr/local/lib/openjpeg-2.1in your LDFLAGS. This might be wrong. (On my machine, there are only some cmake files)
/usr/local/lib/openjpeg-2.1
probably does not contain the openjpeg shared library (libopenjpeg.so
), but /usr/local/lib
should. Rerun it with
-L/usr/local/lib -lopenjpeg
RE: cdo grib-api support - Added by Palina Lapo almost 9 years ago
I try to find and use compilers =>4.9. And what about problem with libcdi?
RE: cdo grib-api support - Added by Palina Lapo almost 9 years ago
When I use -L/usr/local/lib -lopenjpeg
I receive the message
checking whether the C compiler works... no
configure: error: in `/data/RHMC/users/models/wrf/WRFV3.7/data/cdo/cdo-1.7.0':
configure: error: C compiler cannot create executables
See `config.log' for more details
config_2.log (11.8 KB) config_2.log |
RE: cdo grib-api support - Added by Ralf Mueller almost 9 years ago
Ok, than we have to find out, where the openjpg library is stored. Check this
ldconfig -p | | grep openjpeg
RE: cdo grib-api support - Added by Palina Lapo almost 9 years ago
I have the list of the libraries, but I don't have the openjpeg in this list, only
libjpeg.so.62 (libc6,x86-64) => /usr/lib64/libjpeg.so.62
But I know that I installed openjpeg (2.1) by cmake ., make, make install
/usr/local/lib/openjpeg-2.1
Inside this dir rw-r--r- 1 root root 1327 Jan 26 16:20 OpenJPEGConfig.cmakerw-r--r- 1 root root 1146 Jan 26 14:18 OpenJPEGTargets.cmakerw-r--r- 1 root root 1768 Jan 27 2016 OpenJPEGTargets-noconfig.cmake
RE: cdo grib-api support - Added by Ralf Mueller almost 9 years ago
so there is no /usr/local/lib/libopenjpeg.so
?
RE: cdo grib-api support - Added by Palina Lapo almost 9 years ago
I have
lrwxrwxrwx 1 root root 15 Jan 26 13:17 libopenjp2.so -> libopenjp2.so.7
-rwxr-xr-x 1 root root 343783 Jan 27 2016 libopenjp2.so.2.1.0
lrwxrwxrwx 1 root root 19 Jan 26 13:17 libopenjp2.so.7 -> libopenjp2.so.2.1.0
Actually I need to use cdo for convert netCDF files to grib1 or grib2?
Can I do this without using grib_api?
RE: cdo grib-api support - Added by Ralf Mueller almost 9 years ago
Palina Lapo wrote:
I have
lrwxrwxrwx 1 root root 15 Jan 26 13:17 libopenjp2.so -> libopenjp2.so.7
-rwxr-xr-x 1 root root 343783 Jan 27 2016 libopenjp2.so.2.1.0
lrwxrwxrwx 1 root root 19 Jan 26 13:17 libopenjp2.so.7 -> libopenjp2.so.2.1.0
which dir?
Actually I need to use cdo for convert netCDF files to grib1 or grib2?
Can I do this without using grib_api?
not sure, if I get it right: Do you want to convert things to grib2? Do you want to read in grib2 data files?
RE: cdo grib-api support - Added by Palina Lapo almost 9 years ago
1)/usr/local/lib/libopenjp2.so.2.1.0
2)I have file in netCDF format, and I need to convert it to grib1 format
RE: cdo grib-api support - Added by Ralf Mueller almost 9 years ago
Palina Lapo wrote:
1)/usr/local/lib/libopenjp2.so.2.1.0
rerun with
-Lusr/local/lib -lopenjp2
2)I have file in netCDF format, and I need to convert it to grib1 format
in this case, grib_api
is not needed at all. grib1 is implemented in CDO itself
RE: cdo grib-api support - Added by Palina Lapo almost 9 years ago
Ok. In this case, I installed cdo without grib_api support succesfully.
But when I try to convert netcdf file to grib, I have distortion grid.
cdo -f grb -setparam,65.1 snownc1.nc snow_2.grb
In netcdf file I use Lambert projection.
How can I convert my file to grb?