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:

CPPFLAGS="-I/my/netcdf/include" LDFLAGS="/my/netcdf/libnetcdf.so" ./configure

./configure --with-netcdf=/my/netcdf --prefix=/my/libcf && make check install > output.txt

Where /my/netcdf is the root install directory of the netCDF library you want to use, and /my/libcf is the root directory where you want libcf installed. (They may be the same directory.) If unspecified, the prefix defaults to /usr/local.

If you wish to use netCDF-4, you must also have HDF5 and libz, the compression library, installed. In this case, configure libcf like this:

./configure --with-netcdf=/s/n4_new1/install --enable-netcdf-4 --with-hdf5=/home/ed/local/s && make check install > output.txt

If the build does not work for you, please email libcf support: support-libcf@unidata.ucar.edu. Please send the complete output of the configure and build output, in ASCII (the output.txt file produced by the above build commands), and the file config.log, which is generated by the configure script.

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

