How to Use Grads Scripts
Note: Commands that you enter are in red type; messages from GrADS are in green type.
To launch GrADS, type grads at the command line. You will be prompted by the question Landscape Mode? To have a graphics window with landscape orientation, simply hit the return key, or type n to have a portrait-oriented window. Some of our scripts (especially those with multiple plots on a page) have dimensions specific to landscape or portrait mode. If you choose landscape, and the script has portrait coordinates, you will get an error message like this (and the script will stop running):
SET Error: vpage values beyond real page limits
EXEC error: error in my_script.gs. EXEC stopped.
To run a GrADS script: Type exec scriptname at the GrADS prompt.
Example: exec sfcwind.gs.
To run GrADS scripts with the GrADS scripting
language (scripts with do loops and other programming in them, such
as animation.gs), type run
scriptname at the GrADS prompt. Most of
the scripts on the GrADS scripts pages use the exec
command. Only animation.gs
and cbar.gs require the run
To advance to the next page/plot: A c in a GrADS script clears the screen and advances the script to the next plot page. As you are running the scripts, you may have to hit the return key to advance the script to the next plot.
Data indexing in GrADS: All indexing starts with 1 (1 ... n ) -- unlike NCL, which indexes data sets from 0 (0 ... n-1). For example, set t 1 sets the time index to the first time slice in the file.