Compilation

From OCG Test Wiki

Jump to: navigation, search

Contents

[edit] Compilation

[edit] libdap, libnc-dap and nco

Here we briefly mention for reference the commands necessary to compile these components.

libdap, libnc-dap, nco

cd <dir>
./configure
make 
make install

nco

cvs -z3 -d:pserver:anonymous@nco.cvs.sf.net:/cvsroot/nco co -r nco-3_1_0 -d nco-3.1.0 nco
cd nco-3.1.0
./configure CPPFLAGS="-DNC_64BIT_OFFSET=0"
make 
make install

[edit] NetCDF

cd netcdf-3.6.1/src
./configure --prefix=/usr/local CPPFLAGS=-Df2cFortran CC=gcc CXX=g++ FC=g77 CFLAGS="-O2 -fPIC" CXXFLAGS="-O2 -fPIC" 
make
make install

The option -fPIC is necessary on x86_64 and ia64.

[edit] Octave

./configure --prefix=/opt/octave-2.9.9/ --enable-dl --disable-static
make -j 10
make install

[edit] Octave's packages

The octave package octcdf and geometry need to be installed.

>>pkg install octcdf-1.0.1.tar
>>pkg install geometry-1.0.1.tar

Due to a bug in pkg, the octave packages must be uncompressed. Version geometry-1.0.0 has a bug in griddata.

[edit] loadgrid

 make clean
 make

[edit] ufill

ifort -o ufill_f.o -c ufill.f90
FLIBS="-L/opt/intel/fc/9.0/lib -lifcore_pic  -lguide" mkoctfile -v  ufill.cc ufill_f.o

[edit] download

mkoctfile download.cc $(curl-config --libs)

download is to be replaced by urlwite in octave 2.9.10


[edit] wgrib2

wget -O - ftp://ftp.cpc.ncep.noaa.gov/wd51we/wgrib2/wgrib2.tgz | tar -xzvf -
cd grib2
make
cp  -i wgrib2/wgrib2 ~/WFSFCS/bin