- Linix install. Must be in this order, especially to use shared libraries.
% cd /unsup/netcdf
% tar -xvf zlib-1.2.3.tar.gz
% cd zlib-1.2.3
% ./configure --prefix=/unsup/netcdf
% make check install CFLAGS=-fPIC
% cd /unsup/netcdf
% tar -xvf hdf5-1.8.4.tar.gz
% cd hdf5-1.8.4
% ./configure --with-zlib=/unsup/netcdf --prefix=/unsup/netcdf
% make clean-recursive
% make check install CFLAGS=-fPIC
% cd /unsup/netcdf
% tar -xvf netcdf-4.1.1.tar.gz
% cd netcdf-4.1.1
% ./configure --with-hdf5=/unsup/netcdf --with-zlib=/unsup/netcdf --prefix=/unsup/netcdf
% make clean-recursive
% make check install CFLAGS=-fPIC
- R package install.
% R CMD INSTALL --configure-args="--with-netcdf_incdir=/unsup/netcdf/include --with-netcdf_libdir=/unsup/netcdf/lib --with-nc-config=/unsup/netcdf/bin/nc-config" ncdf4_1.0.tar.gz
% cp /unsup/netcdf/lib/libhdf5_hl.so.6 ~/R/x86_64-unknown-linux-gnu-library/2.10/ncdf4/libs
% setenv LD_LIBRARY_PATH /unsup/netcdf/lib
- The "LD_LIBRARY_PATH" line should actually go in your .cshrc (or .cshrc.local) file. Now invoke R
> library(ncdf4)
- If you want to use Yandell's version on AFS at UW, put the following in your .cshrc.local file:
R_LIBS_USER="/u/y/a/yandell/R/x86_64-unknown-linux-gnu-library/2.10"