Package: cdat-lite
Contents1cdat-lite versioning2Installing cdat-lite2.1Dependencies2.2Selecting your NetCDF installation2.3Running the installer2.4Installing as an unprivileged user2.5Platform-specific installation notes3Testing the installation4FAQ4.1What is CDAT?4.2What is the difference between CDAT and cdat-lite?4.3What has changed between cdat-lite-4.x and cdat-lite-5.x?4.4How does cdat-lite track changes to CDAT?4.5How can I use CMOR2 with cdat-lite?4.6How can I use OPeNDAP with cdat-lite?4.7How do I install cdat-lite as an unprivileged user?4.8Which versions of NetCDF does cdat-lite support?Cdat-lite is a Python package for managing and analysing climate
science data.  It is a subset of the Climate Data Analysis Tools
(CDAT) developed byPCMDIat Lawrence Livermore National Laboratory.Cdat-lite aims to complement CDAT by focusing on its core data
management and analysis components and by offering a radically
different installation system to CDAT.  As a result it is much more
lightweight (hence the name): CDAT’s source distribution is the order
of 1Gb whereas cdat-lite is under 5Mb.Cdat-lite is designed to work with theCF checkerpackage.1cdat-lite versioningCdat-lite is a project that tracks versions of 2 other projects (CDAT
and cdunifpp).  From version 6.0rc1 the cdat-lite version will not be
based directly on the CDAT version.  This is because CDAT updates its
version very seldom and stays as an “alpha” distribution for long
periods when the parts included in cdat-lite are generally stable.Full details of which versions of CDAT and cdunifpp a cdat-lite
distribution includes is available in the setup.py file and the
PKG_INFO metadata.2Installing cdat-litecdat-lite is distributed as a tarball available from thecdat-lite
homepageon theNERC Data Grid wiki.  It is also installable
using theeasy_installtool.  If you are familiar witheasy_installtry this super-quick installation recipe:$ export NETCDF_HOME=/usr/local/netcdf
# Required if using a NetCDF4 compiled with HDF5
$ export HDF5_HOME=/usr/local/hdf5
$ easy_install cdat_lite2.1DependenciesTo install cdat-lite you will need:1.Python 2.5.x.  cdat-lite has not been tested on 2.6 but may
work (feedback would be gratefully received).  It is unlikely to work on 3.0.2.setuptools.  cdat-lite will attempt to download and install
setuptools if it is missing but it is safer to install it first.3.NetCDF-3.xor greater.  cdat-lite should work with any
relatively modern NetCDF3 installation on your system provided it is
compiled as a shared library.  It will also work with NetCDF4
configured in various different ways, including embedded OPeNDAP
mode.If you want to run the short test suite you will neednose2.2Selecting your NetCDF installationcdat-lite will work with NetCDF3 or NetCDF4 but because it is
referenced by shared libraries (the python C extension modules) it
must be compiled as position independent code.  If you have a NetCDF4
installation you almost certainly are using shared libraries and even
if you wish to use NetCDF3 it is probably easiest to install NetCDF as
a shared library (use--enable-sharedin the NetCDFconfigurescript).  Alternatively, you can configure NetCDF with:$ ./configure --with-pic ...If you are using NetCDF4 you will also need to configure HDF5 with--enable-sharedor--with-pic.If you have the commandnc-configin your path cdat-lite will
detect all library and include dependencies.  Otherwise cdat-lite will
look for a NetCDF installation in several places.If your NetCDF is installed somewhere unusual, or if you want to
select a specific installation, set the NETCDF_HOME variable.  E.g.:# sh users
$ export NETCDF_HOME=/usr/local/netcdf
# csh users
$ setenv NETCDF_HOME /usr/local/netcdfIf you are using NetCDF4 cdat-lite will also look for your HDF5
installation which you can configure in a similar way:# sh users
$ export HDF5_HOME=/usr/local/hdf5
# csh users
$ setenv HDF5_HOME /usr/local/hdf5For compatibility with thenetcdf4-pythonpackage cdat-lite also acceptsNETCDF4_DIRANDHDF5_DIRas synonims for these environment variables.Note, you don’t need these environment variables set to run cdat_lite,
although the libraries must be findable by your system’s dynamic
linker.  This can be configured by settingLD_LIBRARY_PATHor usingldconfig.2.3Running the installerIf you have all the dependencies in place you can try usingeasy_installto automatically download and install cdat_lite.  Make sure you have access to the internet, with the appropriate HTTP proxy settings, and do:$ easy_install cdat-liteAlternatively you might want to see what you are installing :-).  In
this case either download thetarballor useeasy_installto do it for you:$ easy_install -eb . cdat-lite
# The cdat-lite tarball will be downloaded unpacked into you current directoryNow from the distribution directory run the build and install steps separately:$ python setup.py bdist_egg
$ easy_install dist/cdat-lite*.egg2.4Installing as an unprivileged userIf you don’t have write access to your python distribution you can use
the toolvirtualenvto create a local python environment with
its owneasy_installexecutable which you can then use to install
cdat-lite.  In combination withNETCDF_HOME,HDF5_HOMEandLD_LIBRARY_PATHit should be possible to install all dependencies
of cdat-lite locally.  See thevirtualenvfor details on
installation or try this recipe after downloading the virtualenv:# From virtualenv distribution directory
$ ./virtualenv.py <virtualenv-path>
$ cd <virtualenv-path>
$ source bin/activate
(venv)$ easy_install cdat-lite2.5Platform-specific installation notesOS XChristopher Lee contributed the following experiences installing on OS X 10.6.7.My particular Macbook has an Intel CPU, and the default on the Mac is
to compile for the architecture x86_64. In order to override this
(because python is 32 bit, and the netcdf libraries I use are also 32
bit) I needed to pass in “-arch i386” to the compiler. I also needed
the little endian flag ‘-DBYTESWAP’ when compiling the netcdf
interface (inside libcdms). The -DBYTESWAP flag should be included by
the libcdms configure script, where there is a section for ‘darwin’
(OS X), but it’s currently configured without BYTESWAP (line
6182). The problem here is that OS X used to run on PowerPC CPUs,
which don’t need the BYTESWAP flag. I’m not sure if this is your
configure script or if it’s from the cdat package.I included the -arch i386 and -DBYTESWAP in the setup.py in the
libcdms section, and the setup works fine.After running python setup.py build ; python setup.py install ; I
still get an error when importing cdms2. This problem is caused by the
way that libcdms is linked to the netcdf libraries. The ‘normal’ Mac
method is to link with absolute paths, but libcdms is linked with
relative paths (the libraries are references with @rpath). The result
is that LD_LIBRARY_PATH environment variable is often empty. I’m not
sure how to fix this in the ‘Mac’ way with absolute paths, but I added
my $NETCDF_HOME/lib directory to the variable and cdms2 now imports
without error.3Testing the installationcdat-lite ships with a small set of tests designed to verify that it
has been built successfuly.  These tests require the testing frameworknose.  Once cdat-lite is installed just run:$ nosetests cdat_liteWhen run from cdat-lite’s distribution directory nosetests will run
slightly differently, running some tests that are known to fail at the
moment.  To disable this behaviour do:$ nosetests –config=’’4FAQ4.1What is CDAT?CDATis a large suite of open source tools distributed byPCMDIfor
the management and analysis of climate data.  It includes several
visualisation components and the graphical user interface VCDAT.4.2What is the difference between CDAT and cdat-lite?Differences between CDAT and cdat-lite can be classified as
differences in scope, i.e. which packages are included, and installation system.cdat-lite contains the ‘cdms2’ package and a few related
packages.  It does not include the ‘vcs’ visualisation package or the
VCDAT graphical user interface.  As of v5.1.1-0.3pre3 the included
packages are:cdms2cdtimecdutilgenutilncmlPropertiesregrid2unidataaxmgraceCDAT bundles virtually all dependencies together in its source
distribution – even Python itself.  This has its advantages as it
simplifies satisfying dependencies and avoids version conflicts
between dependencies.  However, if you want to integrate CDAT’s data
management components into your existing Python architecture CDAT can
be overkill.4.3What has changed between cdat-lite-4.x and cdat-lite-5.x?If you are a cdat-lite-4 user (or a CDAT 4 user) you have a big
migration job on your hands.  CDAT-4 uses theNumericpackage for
arrays which has been out of date and unmaintained for a long time
now.  It is known to have problems on 64bit architectures.4.4How does cdat-lite track changes to CDAT?cdat-lite tries to release major new versions shortly after new
versions of CDAT.  Sometimes CDAT-trunk contains important fixes that
should be applied so that the latest cdat_lite can run ahead of
official CDAT releases (although sometimes CDAT recommends you build
from trunk anyway).The one exception is the UK Met. Office PP file support which is
usually updated in cdat_lite before CDAT.  In all cases the exact
build versions of CDAT and cdunifpp will be stated in the
distribution’ssetup.pyfile.4.5How can I use CMOR2 with cdat-lite?We are interested to hear any with experience of using CMOR2 with
cdat-lite but it should be as simple as downloading the distribution
and installing it in parallel with:# From the CMOR install directory
$ python setup.py install4.6How can I use OPeNDAP with cdat-lite?OPeNDAP support is an experimental feature of cdat-lite at the moment.
Unlike CDAT you don’t select OPeNDAP explicitly during installation
but cdat-lite will inherit any OPeNDAP support embedded into the
NetCDF4 library.  Recent beta releases of NetCDF4 provides a switch to
transparently use OPeNDAP.4.7How do I install cdat-lite as an unprivileged user?Seeinstalling locally4.8Which versions of NetCDF does cdat-lite support?TODO