No more IE!請試著使用FirefoxGoogle Chrome等瀏覽器瀏覽
標頭的可愛Alaskan Malamute來自維基百科~

2015年1月12日 星期一

Install climate data operators (cdo) on Ubuntu with netCDF4 and hdf5 support

Nikolay Koldunov
CDOs can be installed from Ubuntu repositories, but they are compiled without netCDF4 and HDF5 support. As a result you can get:

Unsupported file type (library support not compiled in)

error. To solve this we have to compile cdo by ourselves.

Uninstal cdo if you have them installed from Ubuntu repositories:sudo apt-get purge cdo

Install netcdf andf HDF5 libraries:sudo apt-get install libnetcdf-dev libhdf5-dev

Download latest stable version of cdo from here

Unpack it

cd to unpacked directory

If you want to install cdo in to your system directory:./configure --enable-netcdf4 --enable-zlib --with-netcdf=/usr/ --with-hdf5=/usr/ make sudo make install

If you don't have administrative rights, of would like to have installation of cdo in other folder for any other reason, you can provide prefix:./configure --enable-netcdf4 --enable-zlib --prefix=/dir/where/to/put/cdo --with-netcdf=/usr/ --with-hdf5=/usr/ make make install

In the last case you should also add this path to your $PATH in .bashrc file:export PATH=/dir/where/to/put/cdo/bin:$PATH

note bin at the end!

Hope it will work for you :)