tclgrads

Installation

Requirements

Tclgrads requires Tcllib, and GrADS (Version 1.9.0 or later) or any OpenGrads release.

Downloading the software

The source tclgrads-<version>.tgz distribution comes with an INSTALL file that contains the installation instructions, a set of examples to illustrate the basic functionality, and with a README file that list the available procedures and their usage.

In addition there are binary packages for FreeBSD and CentOS, in tbz and rpm formats respectively, that can be installed with the native package management tools (e.g., rpm, pkg_add).

Installing from Packages

Binary packages exist for FreeBSD (tbz) and CentOS (rpm). Since tclgrads is written entirely in Tcl and no compilation is involved, the rpm packages should work anywhere rpm is the package management tool.

The packages, available from download area or the software section at noaaport.net, can be installed with the native package management tools (e.g., rpm, pkg_add):

Installation using the Makefile

This boils down to executing

./configure.sh
make install-dirs
make install

inside the tclgrads distribution directory.

Manual installation

Tclgrads is written entirely in Tcl, so there is no compilation involved. The package consists of a single file grads.tcl and the accompanying index file pkgIndex.tcl.

Perhaps the best option is to create a directory tclgrads at the same as the tcllib directory, and put both of the above files in that directory.

The files can be saved anywhere, for example

/usr/local/lib/tcl_site

Any script that will use the package can then add the line

lappend auto_path "/usr/local/lib/tcl_site"

before the

package require grads

and it will be found.

Usage

A script will typically be of the form


#!/usr/local/bin/tlsh8.5

package require tclgrads;

::grads::init;
::grads::open "filename";

<tcl commands>

::grads::end;

where filename stands for a data file that GrADS knows how to read, and <tcl commands> for the set of Tcl commands that form the core of the script. The complete set of procedures contained in the package are listed and described in the README file mentioned above, and here we mention a few, taken from the examples that are provided with the distribution and the packages.