Next: , Previous: The SPA, Up: The SPA


2.1 Installation of the SPA

The SPA relies on several optional packages for full functionality, although the package can be built in a stand-alone format. The optional packages include ARMNLIB (for RPN Standard File processing), GEMPAK (for GEMPAK file processing), NetCDF (for NetCDF file processing), NCAR Graphics (for high-quality plotting), NCAR Spherepack (for highly-accurate computations on global domains), and Perl/Tk (for graphical interfaces). These packages, if required, should be installed in standard (system-dependent) locations before the SPA is configured.

The SPA uses GNU autotools to ensure platform-independence. In general, there are only a few steps involved in the installation process: configuration, building, and installing. The commands issued to perform these actions are (from the top level directory of the package):

     ./configure --prefix=/path/to/install
     make all >& make.out
     make install >&install.out

The configure script included with the distribution will usually do a good job of determining the setup of your machine. However, you may need to provide additional information (a list of options is available by running configure --help), especially if you are linking to a GEMPAK library built using different compilers from those used for the SPA build. Specifically, if FORTRAN77 compilers were used to build GEMPAK, then a set of undefined reference errors may occur when configure tries to link to the GEMPAK libraries. In order to address this problem, the EXTRALIBS variable is provided so that platform-specific conversion libraries can be appended to the library list for linking. For example, Sun Solaris platforms often require:

     ./configure --prefix=/path/to/install EXTRALIBS='-lF77 -lM77'

if native FORTRAN77 compilers have been used for compilation of the GEMPAK package. On Linux machines (depending on the compilers), it may look something more like:

     ./configure --prefix=/path/to/install EXTRALIBS='-lg2c'

if the G77 compiler was used for the GEMPAK build. Other FORTRAN77 compilers on Linux boxes may require links to the libf2c.a library instead (ie: EXTRALIBS='-lf2c'). On SGI machines, the problem is even more acute since the object file architecture is actually different for the native FORTRAN77 (o32) and FORTRAN90 (n32) compilers. Although we've had some luck using the -n32/o32 compiler flags, it's best to build the GEMPAK library with FORTRAN90 from scratch on SGI workstations.

If GEMPAK is compiled with FORTRAN90 compilers, then no additional library definitions (EXTRALIBS) should be required. This is the best way to ensure the compatibily of the two packages; however, the FORTRAN90 build of the GEMPAK package can be a bit problematic.

For highly-accurate global calculations, the SPA supports an interface to NCAR SpherePack, a package which remaps and computes global values on a sphere rather than on the native grid of the dataset. The SpherePack package is well-tested and performs very well on global calculations within the SPA environment. Installation of SpherePack is, however, problematic since the source (available at www.scd.ucar.edu/css/software/spherepack hereis licenced under a highly-restrictive copyright that forbids the redistribution of the SpherePack source. It is therefore up to the installer of MetCal/SPA to download (for free) SpherePack and install it as libsphere.a somewhere on the default library path (/usr/local/lib is a favourite). If libsphere.a is installed in a non-standard directory, then this directory path can be given to configure at configuration-time as SPHERELIB=/path/to/libsphere/directory . A makefile for the SpherePack library can be found at www.atmos.albany.edu/facstaff/rmctc/spherepack here. This makefile eases the installation process for the SpherePack package my allowing the user to enter make all; make install to install SpherePack to /usr/local/lib (must have write permission in this directory or install under a non-standard path such as make all; make install PREFIX=$HOME to install in $HOME/lib. Once libsphere.a has been properly installed, MetCal/SPA should be configured as outlined above for full functionality of the transparent SpherePack interface.