Sunday, November 20, 2016

[CDO] CDO installation

Struggling with anaconda cdo, I try to install on my own based on this website: http://www.studytrails.com/blog/install-climate-data-operator-cdo-with-netcdf-grib2-and-hdf5-support/

Packages downloads:
  1. Download CDO from https://code.zmaw.de/projects/cdo/files.
  2. Download NetCDF from http://www.unidata.ucar.edu/downloads/netcdf/index.jsp. Use the C version.
  3. Download Grib API from https://software.ecmwf.int/wiki/display/GRIB/Releases.
  4. Download Jasper from http://www.ece.uvic.ca/~frodo/jasper/#download.
  5. Download HDF5 and zlib from ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.
Building the programs one by one:
  • Create a directory that will hold the installation libs and include files. In this case, it's DIR=/home/Programs/cdo-1.7.2-install.
  • Install zlib using
  1. ./configure –prefix=$DIR
  2.  ‘make’, ‘make check’ and ‘make install’
  1. ./configure –with-zlib=$DIR –prefix=$DIR CFLAGS=-fPIC --enable-shared --enable-hl --enable-threadsafe --enable-unsupported
  2. ‘make’, ‘make check’ and ‘make install’
  1. CPPFLAGS=-I/DIR/include LDFLAGS=-L/DIR/lib ./configure –prefix=DIR CFLAGS=-fPIC
  2. ‘make’, ‘make check’ and ‘make install’ 
  • Install Jasper using
  1. ./configure –prefix=DIR  CFLAGS=-fPIC
  2. ‘make’, ‘make check’ and ‘make install’
  • Install grib using
  1. ./configure –prefix=DIR CFLAGS=-fPIC  –with-netcdf=DIR –with-jasper=DIR
  2. ‘make’, ‘make check’ and ‘make install’
  • Install cdo using
  1. ./configure -prefix=DIR CFLAGS=-fPIC -with-netcdf=DIR -with-jasper=DIR -with-hdf5=DIR -with-grib_api=DIR
  2. ‘make’, ‘make check’ and ‘make install’
 FINALLY, write DIR/bin to alias to call cdo globally

No comments:

Post a Comment