Project

General

Profile

how to configure netcdf and hdf5?

Added by Wi Du about 6 years ago

Hello, everyone,
I install cdo 1.9.2. But it is very tough to configure the netcdf and hdf. I checked using cdo -V:
CXX Compiler: g++ -std=gnu++11 -g -O2 -fopenmp
CXX version : g++ (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609
C Compiler: gcc -g -O2 -fopenmp
C version : gcc (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609
F77 Compiler: f77 -g -O2
F77 version : unknown
Features: 15GB Fortran DATA PTHREADS OpenMP4 SSE2
Libraries:
Filetypes: srv ext ieg grb1
CDI library version : 1.9.2 of Jan 27 2018 17:54:28
CGRIBEX library version : 1.9.0 of Sep 29 2017 10:16:02
SERVICE library version : 1.4.0 of Jan 27 2018 17:54:22
EXTRA library version : 1.4.0 of Jan 27 2018 17:54:17
IEG library version : 1.4.0 of Jan 27 2018 17:54:20
FILE library version : 1.8.3 of Jan 27 2018 17:54:17

Obviously, it cannot support tthe netcdf file and hdf file. But I have install netcdf:
This netCDF 4.4.0 has been built with the following features:

--cc        -> /usr/bin/x86_64-linux-gnu-gcc
--cflags -> -I/usr/include -I/usr/include/hdf5/serial
--libs -> -L/usr/lib -L/usr/lib/x86_64-linux-gnu/hdf5/serial -lnetcdf -lhdf5_hl -lhdf5 -lpthread -lsz -lz -ldl -lm -lcurl
--has-c++   -> no
--cxx ->
--has-c++4 -> no
--cxx4 ->
--fc        -> 
--fflags ->
--flibs ->
--has-f90 -> no
--has-dap   > yes
--has-nc2 -> yes
--has-nc4 -> yes
--has-hdf5 -> yes
--has-hdf4 -> no
--has-pnetcdf
> no
--has-szlib -> no
--prefix    > /usr
--includedir
> /usr/include
--version -> netCDF 4.4.0

Then I configured it using ./configure --enable-netcdf4 --enable-zlib --with-netcdf=/usr/include/netcdf --with-hdf5=/usr/include/hdf5
But it was failed.
Can anyone help me? Thanks a lot!
Also, how to uninstall the cdo 1.9.2 in Ubuntu. It only uninstall cdo 1.7.0 when I use sudo apt-get remove cdo.
Thank you very much!