How to attach library to the CDO installation in mac
Added by Hera Gudlaugsdottir about 10 years ago
I´m having troubles installing the cdo with the libraries I want, hdf5, zlib and netcdf. First I configure the netcdf with zlib and hdf5. Then when I do:
$ sudo port install cdo
everything seems to be OK but the command:
$ cdo -v
gives "No operator given!"
I´m relatively new at this so excuse me if this problem is obvious, but I would be thankful for any tips.
Hera
Replies (2)
RE: How to attach library to the CDO installation in mac - Added by Matt Thompson about 10 years ago
Did you install netcdf, hdf5, and zlib with port as well? I'm surprised that 'port install cdo' wouldn't have done that for you.
Still, if all is working, that is the start of what you should see with 'cdo -v':
$ ./cdo -v No operator given! usage : cdo [Options] Operator1 [-Operator2 [-OperatorN]] Options: -a Generate an absolute time axis -b <nbits> Set the number of bits for the output precision (I8/I16/I32/F32/F64 for nc/nc2/nc4/nc4c; F32/F64 for grb2/srv/ext/ieg; P1 - P24 for grb/grb2) Add L or B to set the byteorder to Little or Big endian -f, --format <format> Format of the output file. (grb/grb2/nc/nc2/nc4/nc4c/srv/ext/ieg) -g <grid> Set default grid name or file. Available grids: n<N>, t<RES>, tl<RES>, global_<DXY>, r<NX>x<NY>, g<NX>x<NY>, gme<NI>, lon=<LON>/lat=<LAT> ... SNIP ... ymonvar ymonvar1 yseasavg yseasmax yseasmean yseasmin yseaspctl yseasstd yseassum yseasvar zaxisdes zonavg zonmax zonmean zonmin zonpctl zonrange zonstd zonsum zonvar CDO version 1.6.4, Copyright (C) 2003-2014 Uwe Schulzweida This is free software and comes with ABSOLUTELY NO WARRANTY Report bugs to <http://code.zmaw.de/projects/cdo>
It's essentially spitting out the help message you get with 'cdo -h' with a warning that you haven't given it anything to do.
Now, did you mean the version number? If so that is 'cdo -V' or 'cdo --version':
$ ./cdo -V Climate Data Operators version 1.6.4 (http://code.zmaw.de/projects/cdo) Compiled: by USERNAME on COMPUTER (x86_64-unknown-linux-gnu) Aug 22 2014 14:13:19 Compiler: mpicc -std=gnu99 -fPIC version: unknown Features: PTHREADS NC4 OPeNDAP SZ Z UDUNITS2 Libraries: Filetypes: srv ext ieg nc nc2 nc4 nc4c CDI library version : 1.6.4 of Aug 22 2014 14:12:57 CGRIBEX library version : 1.6.4 of Jun 27 2014 14:00:04 netCDF library version : 4.3.2 of Aug 22 2014 13:36:46 $ HDF5 library version : 1.8.12 SERVICE library version : 1.3.2 of Aug 22 2014 14:12:53 EXTRA library version : 1.3.2 of Aug 22 2014 14:12:50 IEG library version : 1.3.2 of Aug 22 2014 14:12:51 FILE library version : 1.8.2 of Aug 22 2014 14:12:50
Note that this example is not on my Mac, but on a Linux box where I built from scratch. That's why it has SZ support and was built with mpicc (because I built parallel HDF5 and, thus, netCDF requires MPI, so CDO does).
Matt
PS: If you want the full cdo with every whizbang feature, I think "port install cdo +magicspp +grib_api +szip" would do it...though that magicspp has a lot of dependencies with dependencies. The cdo port already requires netcdf, udunits2 and proj47.
RE: How to attach library to the CDO installation in mac - Added by Hera Gudlaugsdottir about 10 years ago
Thank you for your reply.
This made me realise that I needed Xcode installation for mac. The Xcode command toolbox allows to configure cdo in mac using ./configure --with-paths-to-libraries-needed (somehow the "sudo port install cdo" did not work).
At least I could finally install what I needed.
Hera