Project

General

Profile

netCDF4 problems

Added by Andreas Hilboll over 11 years ago

Hi,

I have some problems with cdo-1.5.8 which I compiled on my Ubuntu 12.04 system yesterday. This is my configuration:

$ cdo -V
Climate Data Operators version 1.5.8 (http://code.zmaw.de/projects/cdo)
Compiler: gcc -std=gnu99 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -fPIC -pthread
version: gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
with: PTHREADS Z JASPER UDUNITS2 PROJ.4
Compiled: by pbuilder on elara.iup.uni-bremen.de (x86_64-unknown-linux-gnu) Nov 1 2012 17:13:27
CDI library version : 1.5.8 of Nov 1 2012 17:13:23
GRIB_API library version : 1.9.9
netCDF library version : 4.1.1 of Nov 7 2011 11:35:16 $
HDF5 library version : 1.8.4
SERVICE library version : 1.3.1 of Nov 1 2012 17:13:21
EXTRA library version : 1.3.1 of Nov 1 2012 17:13:19
IEG library version : 1.3.1 of Nov 1 2012 17:13:20
FILE library version : 1.8.0 of Nov 1 2012 17:13:19

When I try to open a netCDF4 file, I get this error:

$ cdo info /mnt/data/tph/tph_2011.nc 
cdo info: Open failed on >/mnt/data/tph/tph_2011.nc<
Unsupported file type (library support not compiled in)

The netCDF4 file was created using the Python bindings for netCDF4:

ncFile = netCDF4.Dataset(start.strftime("/misc/decagon/data/tropopause/tph_%Y.nc"), 'w', clobber=True, format='NETCDF4')
tph_v = ncFile.createVariable('tropopause_altitude', 'f4', ('time', 'lon', 'lat',), zlib=True)

Any help resolving this issue is greatly appreciated ...

Cheers, Andreas.


Replies (36)

RE: netCDF4 problems - Added by Ralf Mueller about 7 years ago

the config log looks good: nc-config is found. But now I need the make error, type:

 make 2>&1 > make.log

and upload the make.log

RE: netCDF4 problems - Added by Ralf Mueller about 7 years ago

and

 make install 2>&1 > make-install.log

RE: netCDF4 problems - Added by Ralf Mueller about 7 years ago

I cannot see any error in these files, although the installation should look different. you may post the whole error output here...

RE: netCDF4 problems - Added by Sanita Dhaubanjar about 7 years ago

Attached is what I get. I got a lot more messages when I ran make earlier, now it just gives a few lines.

RE: netCDF4 problems - Added by Ralf Mueller about 7 years ago

try

make LIBS=-lhdf5
or
 make LDFLAGS='-L/usr/local/Cellar/hdf5/1.10.0-patch1/lib -lhdf5'

and then

make install

RE: netCDF4 problems - Added by Sanita Dhaubanjar about 7 years ago

That worked! Thanks a lot. Now i can also see thr HDF5 library when I call cdo -V and I am able to read and merge my nc4 files.


Compiler: gcc -g -O2 -D_THREAD_SAFE -pthread
version: Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
Features: DATA PTHREADS HDF5 NC4/HDF5 OPeNDAP SSE3
Libraries: HDF5/1.10.0
Filetypes: srv ext ieg grb1 nc1 nc2 nc4 nc4c
CDI library version : 1.8.1 of Mar 31 2017 17:55:55
CGRIBEX library version : 1.7.6 of Dec 20 2016 19:55:24
NetCDF library version : 4.4.1.1 of Mar 31 2017 11:34:28 $
HDF5 library version : 1.10.0
SERVICE library version : 1.4.0 of Mar 31 2017 17:55:39
EXTRA library version : 1.4.0 of Mar 31 2017 17:55:33
IEG library version : 1.4.0 of Mar 31 2017 17:55:37
FILE library version : 1.8.2 of Mar 31 2017 17:55:34

RE: netCDF4 problems - Added by Jay Su almost 6 years ago

Used conda to install CDO. Where should I do this

./configure --with-netcdf=<NetCDF4 root directory>

I do know <NetCDF4 root directory>

Thanks,
Jay

RE: netCDF4 problems - Added by Ralf Mueller almost 6 years ago

the conda installation for CDO comes with netcdf enabled by default (on Linux)

RE: netCDF4 problems - Added by Jay Su almost 6 years ago

It's a Mac.

RE: netCDF4 problems - Added by Ralf Mueller almost 6 years ago

the conda build is very limited at the moment - I recommend using macports instead. Depending on what you want to do, the docker-based solution might also work.

hth
ralf

(26-36/36)