There are many supplemental libraries that are required to enable various features in the GrADS executable. Building all these libraries from source is not necessarily easy; this page provides some guidance and suggestions that have led to success on COLA's unix systems (64-bit linux running CentOS, and Mac OSX). COLA's objective in building GrADS is to make our binary releases portable, so we strive to build all the libraries from scratch, disabling features GrADS doesn't need, and then link statically when building GrADS. If you are building GrADS from source but not planning to distribute your build, then you may find that many of these libraries are already installed on your system and you can link with them dynamically. In this case, use the --enable-dyn-supplibs option with the GrADS configure script. Please post questions about building from source to the GrADS Users Forum. If you have the proper privileges, you may install these anywhere on your system instead of $HOME, just be sure to change the commands listed in the table below to accomodate your own installation.
To begin, make a directory top level directory for the supplibs under your $HOME, or some other suitable directory:
mkdir $HOME/grads/supplibs
setenv SUPPLIBS $HOME/grads/supplibs
Make a subdirectory where you will store the tar files containing the library source code:
mkdir -p $SUPPLIBS/tarfiles
Make a subdirectory where you will store the source code when unpacking the tar files:
mkdir -p $SUPPLIBS/src
These are the directories where the compiled libaries, pkgconfig files, include files, and any executable utilities will be installed. This will be created automatically by the library software, there is no need to create them manually.
$HOME/supplibs/lib
$HOME/supplibs/include
$HOME/supplibs/bin
This seems to be necessary in order to link the libraries dynamically to create the shared object file (libgradspy.so) for the python interface:
setenv CFLAGS -fPIC
When you are done, unpack the GrADS source code tarball under $HOME. Change into the new GrADS directory you just created, and type ./configure. When the configuration is done, it will show a summary of which features have been enabled. Then type 'make install' and look for your executables in the ./bin directory.
Good Luck!!
Library | Version | Why GrADS needs it | How to configure and install it for GrADS |
readline | 5.0 | Enables command line editing. |
cd $SUPPLIBS/src |
ncurses | 5.7 | Required by readline. |
cd $SUPPLIBS/src |
zlib | 1.2.8 | General compression library. |
cd $SUPPLIBS/src |
libpng | 1.5.12 | PNG reference library. home page |
cd $SUPPLIBS/src |
jpeg | 6b | Image compression library. home page |
cd $SUPPLIBS/src |
gd | 2.0.34 | GD Graphics Library. Requires: zlib, libpng, jpeg home page |
cd $SUPPLIBS/src tar xvfz ../tarfiles/gd-2.0.34.tar.gz cd gd-2.0.34 ./configure --prefix=$SUPPLIBS --with-png=$SUPPLIBS --with-jpeg=$SUPPLIBS make install |
jasper | 1.900.1 14ubuntu3.2.debian |
For image coding and manipulation home page |
cd $SUPPLIBS/src |
g2clib | 1.6.0 | Decodes data in GRIB2 format. |
cd $SUPPLIBS/src Note1: There is no configure script in this library, so you must edit the makefile manually. Change the "INC" variable as indicated below. Be sure to write out $SUPPLIBS explicitly: Note2: Version 1.6.0 of the grib2 C library introduced a new output file naming convention that includes a version number. When manually installing in it the $SUPLLIBS/lib directory, rename it to the old (static) filename. It is also necessary to manually install the grib2.h file in the $SUPPLIBS/include directory. make |
udunits | 1.11.7 | Supports units of physical quantities. |
cd $SUPPLIBS/src |
hdf | 4.2r3 | Hierarchical Data Format library, version 4. Requires: zlib, udunits, jpeg, szip home page |
cd $SUPPLIBS/src |
hdf5 | 1.8.11 | Hierarchical Data Format library, version 5. Requires: zlib home page |
cd $SUPPLIBS/src |
curl | 7.35.0 (7.19.6 also ok) |
For enabling OPeNDAP access. home page |
cd $SUPPLIBS/src Note: When accessing secure (https) opendap servers it is necessary to have the SSL feature of the curl library enabled. Use "--without-ssl" if you do not have the openSSL library installed on your local system. ./configure --prefix=$SUPPLIBS --with-ssl --without-libidn
\ |
netcdf | 4.3.3 | Network Common Data Form library. Requires hdf5, zlib, szip, curl. home page |
cd $SUPPLIBS/src Note: before running configure, set the following environment variables (remove the "-lssl" from $LIBS if you did not build curl with SSL enabled): Note: After the library is built, you can unset the environment variables: |
tiff | 3.8.2 | Enables handling of image data in the Tag Image File Format. home page |
cd $SUPPLIBS/src tar xvfz ../tarfiles/tiff-3.8.2.tar.gz cd tiff-3.8.2 ./configure --prefix=$SUPPLIBS make install |
geotiff | 1.2.5 | Enables handling georeferenced raster imagery.
Requires: tiff. home page |
cd $SUPPLIBS/src |
shapelib | 1.2.10 | Enables handling of shapefiles home page |
cd $SUPPLIBS/src Installation to $SUPPLUBS is done manually. The utilities are copied to the $SUPPLIBS/bin directory in case they might be useful to the user -- GrADS doesn't explicitly need them. /bin/cp -f ./.libs/libshp.a $SUPPLIBS/lib |
xml2 | 2.9.0 | An XML parser and toolkit. |
cd $SUPPLIBS/src |
Xrender | 0.9.6 | A helper tool used when compiling applications and libraries.
Required for Cairo. home page |
cd $SUPPLIBS/src |
pkgconfig | 0.23 | A helper tool used when compiling applications and libraries.
Required for Cairo. home page |
cd $SUPPLIBS/src |
dap | 3.7.8 (use the modified version for newer flavors of unix) | Open-source Project for a Network Data Access Protocol (OPeNDAP). Requires: xml2, curl. home page |
cd $SUPPLIBS/src |
gadap | 2.0 or 2.1 (for newer flavors of unix) | Enables OPeNDAP access of in situ data. Requires dap, curl, and xml2. |
cd $SUPPLIBS/src N.B. You will need to make sure $SUPPLIBS/bin is in your path so the configure script can find the utility dap-config, which is part of the dap library package setenv PATH $SUPPLIBS/bin:$PATH |
pixman | 0.34.0 | A pixel manipulation library for |
cd $SUPPLIBS/src |
freetype | 2.4.10 | A software font engine.
Required by Cairo. home page |
cd $SUPPLIBS/src |
fontconfig | 2.9.0 | A library for configuring and customizing font access.
Required by Cairo. home page |
cd $SUPPLIBS/src N.B. After configuration, edit config.h to set USE_ICONV = 0 |
cairo | 1.14.10 | A 2D graphics library with support for multiple output devices. Requires pkgconfig, zlib, xml2, libpng, pixman, fontconfig, freetype, and Xrender. home page |
cd $HOME/supplibs/src |