Project

General

Profile

compile CDO with netCDF4 error

Added by Jim Maas almost 10 years ago

Ubuntu 14.04 Linux system,

I'm new to all of this. I've downloaded and install the latest version of netCDF

$ nc-config --version
netCDF 4.3.3.1

My understanding is that this version has netCDF4 support built in?

and then tried to compile CDO using this

cdo-1.7.1rc1$ ./configure --with-netcdf=/usr/local/lib

and it appears to compile correctly, however when I try to merge two files I get this error

Unsupported file type (library support not compiled in)
CDO was build with a netCDF version which doesn't support netCDF4 data!

Obviously I've done something wrong, any suggestions on how to troubleshoot most welcome.

Thanks

J


Replies (3)

RE: compile CDO with netCDF4 error - Added by Uwe Schulzweida almost 10 years ago

NetCDF4/HDF5 must be enabled during the netCDF4 installation. The default is no netCDF4/HDF5 support for the netCDF4 library.
Please check it with:

nc-config --all

RE: compile CDO with netCDF4 error - Added by Jim Maas almost 10 years ago

Thanks, did some digging around, and rebuilt cdo and netcdf and now have the following from nc-config --all, however still get same error listed further below.

This netCDF 4.1.3 has been built with the following features:

--cc        -> gcc
--cflags -> -I/usr/include -DgFortran
--libs -> -L/usr/lib -lnetcdf
--cxx       -> g++
--has-c++ -> yes
--fc        -> gfortran
--fflags -> -g -O2 -I/usr/include
--flibs -> -L/usr/lib -lnetcdff -lnetcdf
--has-f77 -> yes
--has-f90 -> yes
--has-dap   > yes
--has-nc2 -> yes
--has-nc4 -> yes
--has-hdf5 -> yes
--has-hdf4 -> no
--has-pnetcdf
> no
--has-szlib ->
--prefix    > /usr
--includedir
> /usr/include
--version -> netCDF 4.1.3

===============================
cdo merge: Open failed on >CEH_GEAR_daily_GB_2013.nc<
Unsupported file type (library support not compiled in)
CDO was build with a netCDF version which doesn't support netCDF4 data!

RE: compile CDO with netCDF4 error - Added by Jim Maas almost 10 years ago

I got it fixed, had some old libraries installed and was confusing things.

I uninstalled all versions of cdo, netcdf and hdf5,

then installed the netcdf andf HDF5 libraries from the Ubuntu repositories:
sudo apt-get install libnetcdf-dev libhdf5-dev

then downloaded cdo-1.7.0, and configured it as
./configure --enable-netcdf4 --enable-zlib --with-netcdf=/usr/ --with-hdf5=/usr/
make
sudo make install

and it all seems to work fine.

Thanks for help.

J

    (1-3/3)