Project

General

Profile

NetCDF4 data not being read in

Added by Ashwin D about 7 years ago

Hello,
I am building CDO on a brand new box from scratch - Ubuntu 16.04 LTS with gfortran and gcc. I had no issues with the build and this is the options I specified with the build process
./configure --enable-netcdf4 --enable-zlib --with-netcdf=/usr/local/lib --with-hdf5=/usr/local/lib

When I type nc-config --all I get this output

This netCDF 4.5.0 has been built with the following features:

--cc        -> gcc
--cflags -> -I/usr/local/include
--libs -> -L/usr/local/lib -lnetcdf
--has-c++   -> no
--cxx ->
--has-c++4  -> no
--cxx4 ->
--has-fortran-> yes
--fc -> gfortran
--fflags -> -I/usr/local/include
--flibs -> -L/usr/local/lib -lnetcdff -lnetcdf -lnetcdf
--has-f90 -> no
--has-f03 -> yes
--has-dap   > yes
--has-dap4 -> yes
--has-nc2 -> yes
--has-nc4 -> yes
--has-hdf5 -> yes
--has-hdf4 -> no
--has-logging
> no
--has-pnetcdf-> no
--has-szlib -> no
--has-parallel -> no
--has-cdf5 -> no
--prefix    > /usr/local
--includedir
> /usr/local/include
--libdir -> /usr/local/lib
--version -> netCDF 4.5.0

The netCDF version is 4.5.0 and CDO version is 1.9.1. When I run the command
cdo timmean input output this is the message I get -

"cdo timmean: Open failed on >uwnd_850_2017_5_11_00Z.nc<
Unsupported file type (library support not compiled in)
CDO was build with a NetCDF version which doesn't support NetCDF4 data!"

Can somebody please let me know where I am going wrong ?

Regards,
Ashwin.


Replies (4)

RE: NetCDF4 data not being read in - Added by Ashwin D about 7 years ago

I have seen this thread - https://code.mpimet.mpg.de/boards/1/topics/1445 and I did do a make distclean and I did recompile CDO.

Here is the thing. When I run cdo -V I get this

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
Features: DATA PTHREADS OpenMP4 HDF5 SSE2
Libraries: HDF5/1.10.1
Filetypes: srv ext ieg grb1 nc1 nc5
CDI library version : 1.9.1 of Nov 17 2017 16:03:47
CGRIBEX library version : 1.9.0 of Sep 29 2017 10:16:02
NetCDF library version : 4.5.0 of Nov 16 2017 15:15:23 $
SERVICE library version : 1.4.0 of Nov 17 2017 16:03:39
EXTRA library version : 1.4.0 of Nov 17 2017 16:03:36
IEG library version : 1.4.0 of Nov 17 2017 16:03:38
FILE library version : 1.8.3 of Nov 17 2017 16:03:36

As far as I am concerned there is no nc5 data type. So I am not sure where I am going wrong.

RE: NetCDF4 data not being read in - Added by Ashwin D about 7 years ago

Ashwin D wrote:

I have seen this thread - https://code.mpimet.mpg.de/boards/1/topics/1445 and I did do a make distclean and I did recompile CDO.

Here is the thing. When I run cdo -V I get this

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
Features: DATA PTHREADS OpenMP4 HDF5 SSE2
Libraries: HDF5/1.10.1
Filetypes: srv ext ieg grb1 nc1 nc5
CDI library version : 1.9.1 of Nov 17 2017 16:03:47
CGRIBEX library version : 1.9.0 of Sep 29 2017 10:16:02
NetCDF library version : 4.5.0 of Nov 16 2017 15:15:23 $
SERVICE library version : 1.4.0 of Nov 17 2017 16:03:39
EXTRA library version : 1.4.0 of Nov 17 2017 16:03:36
IEG library version : 1.4.0 of Nov 17 2017 16:03:38
FILE library version : 1.8.3 of Nov 17 2017 16:03:36

As far as I am concerned there is no nc5 data type. So I am not sure where I am going wrong.

nc-config --has-nc4 command says yes.

RE: NetCDF4 data not being read in - Added by Ashwin D about 7 years ago

I got this to work as shown below by running cdo -V

Climate Data Operators version 1.9.1 (http://mpimet.mpg.de/cdo)
Compiled: by root on winash12-OptiPlex-7050 (x86_64-unknown-linux-gnu) Nov 18 2017 14:15:50
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
Features: DATA PTHREADS OpenMP4 HDF5 NC4/HDF5 OPeNDAP SSE2
Libraries: HDF5/1.10.1
Filetypes: srv ext ieg grb1 nc1 nc2 nc4 nc4c nc5
CDI library version : 1.9.1 of Nov 18 2017 14:14:06
CGRIBEX library version : 1.9.0 of Sep 29 2017 10:16:02
NetCDF library version : 4.5.0 of Nov 16 2017 15:15:23 $
HDF5 library version : 1.10.1
SERVICE library version : 1.4.0 of Nov 18 2017 14:13:58
EXTRA library version : 1.4.0 of Nov 18 2017 14:13:55
IEG library version : 1.4.0 of Nov 18 2017 14:13:57
FILE library version : 1.8.3 of Nov 18 2017 14:13:55

Where did I go wrong ? Well I was installing GRIB_API and that requires you to specify /usr/local/lib for netCDF and Jasper but CDO requires you to specify only upto
/usr/local for netCDF and HDF5.

However there are still issues. I have downloaded udunit2 from UCAR. While I run .configure I specify the location of udunits2 but while configure runs when I type make it fails.

Then I also include GRIB_API along with the configure command line. It does not pick it up. There is a single test that fails with make check for netCDF4.

RE: NetCDF4 data not being read in - Added by Ashwin D about 7 years ago

I have enclosed both the relevant logs.

    (1-4/4)