Instructions for use of GrADS software to display EMC

Radar and Gauge Precipitation Analyses

Requires Access to:

perl5 (at NCEP available on workstations from /usr/gnu/bin/perl)

c compiler

most recent versions of grads, Grads1.7Beta6

wgrib program and grib2ctl script written by Wesley Ebisuzaki of CPC

(commands in bold type are to be typed by the user)

A. Grads

Obtain the latest version of grads software version 1.7 from:


cd /pub/fiorino/grads/beta


get GrADS-1.7Beta6.X.bin.tar.Z

(Where X = your hardware and operating system version)

cd ../dat

get grads.dat.16.tar

cd ../lib

get grads.lib.tar


uncompress and untar the files following the directions in the README file

set up paths in .cshrc file according to directions in README file

B. wgrib.c

Obtain the latest version of wgrib c program from


cd pub/wgrib

get wgrib.c

get porting.txt


compile and test using instructions found in porting.txt


Obtain the latest version of the perl script from


cd pub/wgrib.scripts



if necessary, modify path of perl location found at top line of script

Displaying files with GrADS

For example, to view the USAggmmddyyhh.Grb 4 km gauge files

where mm = 2 digit month

dd = 2 digit day

yy = 2 digit year

hh = 2 digit hour

1. Use to create grads .ctl file

determine the time of the first file in the time series you wish to create, and substitute the actual time of the first file USAgg* for the mmddyyhh in the following command USAggmmddyyhh.Grb > USAgg.ctl

Edit the grads control file:

* replace the actual time mmddyyhh with %m2%d2%y2%h2

* add the word template after yrev in the 6th line

* modify the time parameter from 1 to the number of files in the time series, for example 24 for the entire day from 12 UTC to 12 UTC

* see the example script attached, USAgg.ctl

2. Use gribmap to make the index file for the entire time series of similar files

gribmap -i USAgg.ctl -verif

3. At shell prompt, to verify that the image is okay, type:

gradsnc -l

(After grads Type either -p option for portrait, or -l for landscape)

at the ga> prompt type:

open USAgg.ctl

set gxout shaded

d apcpsfc

(after the image is displayed, type:)


4. Run the example script, USAgg.script to display the gauge image for 1 specific hour.

gradsnc -l

at the ga> prompt type:

exec USAgg.script

(after the image is displayed and you are finished, type:)


To print postscript copy of metafile, type:

gxps -c


A color postscript file named is created

6. Attached scripts and tables

Three scripts and one table are required to run grads with the instructions above: = color table = color bar script

USAgg.ctl = example control file

USAgg.script = example script to display one gauge analysis