Skip to main content

Topic: Compiling netcdf library (Read 3270 times) previous topic - next topic

  • hpbenton
  • [*][*][*]
Compiling netcdf library
Why compile
You will only need this if your UNIX/Linux does not provide libnetcdf, e.g. SLES. Debian based systems like Ubuntu provide libnetcdf. It can be installed using
Code: [Select]
##terminal :
sudo apt-get install libnetcdf4 libnetcdf-dev
On Mac OSX netcdf isn't needed if you install xcms using the tgz binary file. However, if you want to alter the code or install from source you will need to install netcdf using the following terminal code:
Code: [Select]
curl -O http://r.research.att.com/libs/netcdf-4.0.1-darwin89-bin4.tar.gz
sudo tar fvxz netcdf-4.0.1-darwin89-bin4.tar.gz -C /
There is also netcdf-4.1.1 but some users report errors when installing xcms. To check if there are any updates check R Research AT&T

Compiling the netcdf library for XCMS from source
Download netcdf libraries, version 4.1.1 http://www.unidata.ucar.edu/downloads/netcdf/index.jsp

Compile using the --enable-shared option
Copy the executables, libraries and headers to a place where R can find it, e.g. /usr/local.
It might also be necessary to have the libraries in both, /usr/local/lib and /usr/local/lib64.

Test: the library ncdf.
Code: [Select]
## R code
install.packages("ncdf")
#and load
library(ncdf)
~~
H. Paul Benton
Scripps Research Institute
If you have an error with XCMS Online please send me the JOBID and submit an error via the XCMS Online contact page