The Grid Analysis Display System (GrADS) is an interactive desktop tool that is used for easy access, manipulation, and visualization of earth science data. GrADS has two data models for handling gridded and station data. GrADS supports many data file formats, including binary (stream or sequential), GRIB (version 1 and 2), NetCDF, HDF (version 4 and 5), and BUFR (for station data). GrADS has been implemented worldwide on a variety of commonly used operating systems and is freely distributed over the Internet.
How to Use GrADS Scripts
Steps for Launching and Running the Script
- To launch GrADS, type
gradsat the command line.
- You will be prompted by the question Landscape Mode?
To have a graphics window with landscape orientation, hit return, or type
nto 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.
To run GrADS scripts with the GrADS scripting language (scripts with
doloops 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
execcommand. Only animation.gs and cbar.gs require the
- To advance to the next page/plot, type
cin a GrADS script to clear the screen and advance the script to the next plot page. As you are running the scripts, you may have to hit return to advance the script to the next plot.
- Data indexing in GrADS: All indexing starts with 1 (1 ... n ) -- unlike NCL, which uses indices from data sets from 0 (0 ... n-1). For example,
set t 1sets the time index to the first time slice in the file.
GrADS Tips and Tricks
Reversing the vertical coordinate:
set yflip on
This is useful when making crossections with the new Genesis files in which the vertical levels are ordered 1 (.005 ) to 18 (.993).
Please be aware the documentation for the vint function is not correct. The order of the arguments is given as
vint(expire,psexpr,const), but should be:
The explanation for these arguments in the documentation is still valid. Using the arguments in the improper order may give unexpected results, so if you are using
vint, please verify you are using it correctly.
Say we have a netCDF data file with specific humidity (q) at the 1000, 900, 850, 700, 500, 400, 300, and 200 mb levels and a surface pressure field (ps) in mb. We can calculate the vertically integrated water vapor:
This NCL script allows you to convert sigma level data to pressure level data and also gives the surface pressure field necessary for the vint function.
Making title font smaller
\ before title and after.