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, but this page provides some guidance and suggestions that have led to success on COLA's systems (64-bit linux running CentOS, and Mac OSX). 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:
mkdir $HOME/supplibs
Make a subdirectory where you will store the tar files containing the library source code:
mkdir -p $HOME/supplibs/src/tarfiles
Get the src from COLA's FTP server:
cd $HOME/supplibs/src/tarfiles
ftp iges.org
<login as anonymous>
cd grads/Supplibs/2.0/src
mget *
quit
These are the directories where you will install the compiled libaries, the necessary include files, and any executable utilities from the libraries that GrADS may need:
mkdir $HOME/supplibs/bin
mkdir $HOME/supplibs/lib
mkdir $HOME/supplibs/include
Move through the list of libraries in the table below, building them in order listed. Instructions for configuring and installing in the $HOME/supplibs directory are given for each library.
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 $HOME/supplibs/src/ |
ncurses | 5.7 | Required for readline. |
cd $HOME/supplibs/src/ |
zlib | 1.2.3 | General compression library Links: home page local copy of source code |
cd $HOME/supplibs/src/ tar xvfz ./tarfiles/zlib-1.2.3.tar.gz cd zlib-1.2.3/ ./configure --prefix=$HOME/supplibs/src/zlib-1.2.3 make make install cp ./lib/libz.a $HOME/supplibs/lib mkdir $HOME/supplibs/include/zlib cp ./include/zlib.h $HOME/supplibs/include/zlib |
libpng | 1.2.18 | PNG reference library. Links: home page local copy of source code |
cd $HOME/supplibs/src/ tar xvfz tarfiles/libpng-1.2.18.tar.gz cd libpng-1.2.18/ ./configure --disable-shared \ --prefix=$HOME/supplibs/src/libpng-1.2.18 make make install cp ./lib/libpng12.a $HOME/supplibs/lib mkdir $HOME/supplibs/include/libpng12 cp ./include/libpng12/*.h $HOME/supplibs/include/libpng12 |
jpeg | 6b | Image compression library. Links: home page local copy of source code |
cd $HOME/supplibs/src/ |
gd | 2.0.34 | GD Graphics Library. Requires: zlib, libpng, jpeg Links: home page local copy of source code |
cd $HOME/supplibs/src/ tar xvfz tarfiles/gd-2.0.34.tar.gz cd gd-2.0.34 ./configure --disable-shared \ --with-png=$HOME/supplibs/src/libpng-1.2.18 \ --with-jpeg=$HOME/supplibs/src/jpeg-6b \ --prefix=$HOME/supplibs/src/gd-2.0.34 make make install cp ./lib/libgd.a $HOME/supplibs/lib/ mkdir $HOME/supplibs/include/gd cp ./include/* $HOME/supplibs/include/gd |
jasper | 1.701.0 | Library for coding and manipulation of images. Links: home page local copy of source code |
cd $HOME/supplibs/src/ |
g2clib | 1.1.8 | Decodes data in GRIB2 format. |
There is no configure script in this library, so you must edit the makefile to change three lines identified below (INC, CC and ARFLAGS). Write out $HOME explicitly in the makefile. INC=-I/usr/include -I$HOME/supplibs/src/jasper-1.701.0/include -I$HOME/supplibs/src/libpng-1.2.18 -I$HOME/supplibs/src/zlib-1.2.3/include make |
szip | 2.1 | General purpose lossless compression library. Links: home page local copy of source code |
cd $HOME/supplibs/src/ |
udunits | 1.11.7 | Supports units of physical quantities. |
cd $HOME/supplibs/src/ |
hdf | 4.2r3 | Hierarchical Data Format library, version 4. Requires: zlib, udunits, jpeg, szip Links: home page local copy of source code |
cd $HOME/supplibs/src/ tar xvfz tarfiles/HDF4.2r3.tar.gz cd HDF4.2r3/ ./configure --disable-netcdf --disable-shared --disable-fortran \ --with-zlib=$HOME/supplibs/src/zlib-1.2.3 \ --with-jpeg=$HOME/supplibs/src/jpeg-6b \ --with-szip=$HOME/supplibs/src/szip-2.1 \ --prefix=$HOME/supplibs/src/HDF4.2r3 make make install cp lib/libdf.a $HOME/supplibs/lib cp lib/libmfhdf.a $HOME/supplibs/lib mkdir $HOME/supplibs/include/hdf cp ./include/*.h $HOME/supplibs/include/hdf/ |
hdf5 | 1.8.4-patch1 | (GrADS 2.0.a7+) Hierarchical Data Format library, version 5. Requires: zlib, jpeg, szip Links: home page local copy of source code |
cd $HOME/supplibs/src/ |
curl | 7.19.6 | A library for handling files with URL syntax. For enabling OPeNDAP access. Links: home page local copy of source code |
cd $HOME/supplibs/src tar xvfz tarfiles/curl-7.19.6.tar.gz cd curl-7.19.6/ ./configure --without-ssl --without-libidn \ --enable-static --disable-shared \ --disable-ldap --prefix=$HOME/supplibs/src/curl-7.19.6 make make install cp ./lib/libcurl.a $HOME/supplibs/lib |
netcdf | 4.1.1 | (GrADS 2.0.a8+) Network Common Data Form library. Requires hdf5, zlib, szip, curl. Links: home page local copy of source code |
cd $HOME/supplibs/src |
xml2 | 2.6.16 | An XML parser and toolkit. For enabling OPeNDAP station data access. Links: home page local copy of source code |
cd $HOME/supplibs/src |
dap | 3.7.8 | Open-source Project for a Network Data Access Protocol (OPeNDAP). Requires: xml2, curl. Links: home page local copy of source code |
cd $HOME/supplibs/src N.B. You may need edit configure.ac so it won't use pkg-config to find curl (libdap_pkgconfig_libcurl=no) then run
autoreconf. This is only necessary if curl is installed someplace else on your system without the special configure options outlined above for building curl. ./configure --disable-shared \ |
gadap | 2.0 | Enables OPeNDAP access of in situ data. Requires dap, curl, xml2. Links: local copy of source code |
cd $HOME/supplibs/src |
tiff | 3.8.2 | (GrADS 2.0.a5+) Library for storing image data in the Tag Image File Format. Links: home page local copy of source code |
cd $HOME/supplibs/src/ tar xvfz tarfiles/tiff-3.8.2.tar.gz cd tiff-3.8.2/ ./configure --disable-shared \ --prefix=$HOME/supplibs/src/tiff-3.8.2 make make install cp lib/libtiff.a $HOME/supplibs/lib/ mkdir $HOME/supplibs/include/tiff cp ./include/*.h $HOME/supplibs/include/tiff |
geotiff | 1.2.5 | (GrADS 2.0.a5+) Library for reading, and writing georeferenced raster imagery. Requires: tiff. Links: home page local copy of source code |
cd $HOME/supplibs/src/ tar xvfz tarfiles/libgeotiff-1.2.5.tar.gz cd libgeotiff-1.2.5/ ./configure --enable-incode-epsg \ --enable-static --disable-shared \ --with-libtiff=$HOME/supplibs/src/tiff-3.8.2 \ --prefix=$HOME/supplibs/src/libgeotiff-1.2.5 make make install cp ./lib/libgeotiff.a $HOME/supplibs/lib mkdir $HOME/supplibs/include/geotiff cp ./include/* $HOME/supplibs/include/geotiff |
shapelib | 1.2.10 | (GrADS 2.0.a8+) Enables handling of shapefiles Links: home page local copy of source code |
cd $HOME/supplibs/src/ |