## grads

`grads [ - ] b|l|p [ -c 'command ]`

Where:

`-l` run grads in landscape mode. The orientation question is not asked.

`-p` run grads in portrait mode. The orientation question is not asked.

`-b` run grads in batch mode. No graphics output window is opened.

`-c 'command'` execute the supplied `'command'` as the first GrADS command after GrADS is started. For example:

  `grads -c 'query'`

  execute the query command after GrADS is started.

`grads` is an interactive desktop tool that is currently in use worldwide for the analysis and display of earth science data.

GrADS implements a 4-Dimensional data model, where the dimensions are usually latitude, longitude, level and time. Each data set is located within this 4-Dimensional space by the use of a data descriptor file. Both gridded and station data may be described. Gridded data may be non-linearly spaced; Gaussian grids and variable resolution ocean model grids are directly supported. The internal data representa- tion in a file may be either binary or GRIB.

Operations may be performed on the data directly, and interactively, by entering FORTRAN-like expressions at the command line. A rich set of built-in functions are provided.

In addition, users may add their own functions as external routines written in any programming language. The expression syntax allows complex operations that range over very large amounts of data to be performed with simple expressions.

GrADS is freely distributed over the Internet.

### Usage Notes

Some environment variables must be set before starting the GrADS.

`GADDIR` points to the directory containing the GrADS package.

`GASCRP` held a list of directories containing GrADS utility scripts and user scripts.

`GAUDFT` points to the user defined function table. If this variable is not set, the function table will not be read.

`PATH` the environment variable PATH must be expanded by GADDIR.

For example:

C-shell

`example% setenv GADDIR /ford1/local/lib/grads
example% setenv GASCRP $HOME/grads/scripts
example% setenv GAUDFT $HOME/grads/udf/table
example% setenv PATH $PATH":$GADDIR"`

Bourne shell

`example% GADDIR=/ford1/local/lib/grads; export GADDIR
example% GASCRP=$HOME/grads/scripts; export GASCRP
example% GAUDFT=$HOME/grads/udf/table; export GAUDFT
example% PATH=$PATH:$GADDIR; export PATH`

## Examples

1. `example% grads -pc 'open data.ctl'`

   start grads and open data descriptor file `data.ctl`.

2. `example% grads -bpc 'run script.gs'`

   running grads in batch mode, executing the GrADS script `script.gs` in portrait mode.