LibCF - A library to aid in the creation, processing and sharing of scientific 
data files that conform to the Climate and Forecast (CF) conventions

How to build libCF
------------------

1) C library only
.................

You must have autotools installed (libtool, autoconf and automake).

You must have either netCDF-3 (or netCDF-4) installed. Any reasonably 
recent version of netCDF should work.

Get the latest version of the libcf tarball at the libcf ftp site: 
ftp://ftp.unidata.ucar.edu/pub/libcf/libcf-daily.tar.gz

Unpack the tarball, and run:

autoreconf -fi
CPPFLAGS="-I`nc-config --includedir`"
LDFLAGS=`nc-config --libs`
./configure

You might have to specify the location of the LAPACK and BLAS libraries
./configure \
--with-lapack-lib=/my/liblapack.so --with-blas-lib=/my/liblbas.so

Run

./configure --help

to see the full set of options.

2) Python extension
...................

It is possible to build LibCF as a Python extension

python setup.py install

Be sure to have nc-config in your path as this command will be used to extract the 
location of the NetCDF and library and include paths, as well as the libraries upon
which NetCDF depends on. 

The location of the LAPACK and BLAS libraries can be set using the LAPACK_LIBRARIES 
and BLAS_LIBRARIES environment variables, e.g.

LAPACK_LIBRARIES=/usr/lib64/liblapack.so python setup.py install


How to test libCF
-----------------

make check

