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:



ftp sprite.llnl.gov

cd /pub/fiorino/grads/beta

get README

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

quit



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



ftp wesley.wwb.noaa.gov

cd pub/wgrib

get wgrib.c

get porting.txt

quit



compile and test using instructions found in porting.txt





C. grib2ctl.pl



Obtain the latest version of the perl script grib2ctl.pl from



ftp wesley.wwb.noaa.gov



cd pub/wgrib.scripts

get grib2ctl.pl

quit



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





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 grib2ctl.pl 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



grib2ctl.pl 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:)

quit







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:)

quit



To print postscript copy of metafile, type:



gxps -c

USAgg97112714

USAgg97112714.ps



A color postscript file named USAgg97112714.ps is created



6. Attached scripts and tables



Three scripts and one table are required to run grads with the instructions above:



rgbset.gs = color table

cbarmerc1.gs = color bar script

USAgg.ctl = example control file

USAgg.script = example script to display one gauge analysis