GrADS Scripts
Some people are lazy and lazy people write scripts. Here are some
of my GrADS scripts.
Calculates the anomaly and climatology of a GrADS expression (1991-2020 climatology).
example 1: set time jan2023
anom.gs u ugrdprs
u is the anomaly of ugrdprs for jan2023
clim is the climatology of ugrdprs
example 2: set time jan1980 dec2020
set lat 0
set lon 0
anom.gs gblt aave(tmpprs, g)
gblt is a time series of the global temperature anomaly
clim is the jan1991-dec2020 global temperature climatology
restrictions: anom.gs is only for monthly data
monmask.gs
is a script to help plot time series of monthly fields. For example, you have
40 years of monthly data and you just want to plot a time series of
January values.
Instructions
are included.
map.gs
is a script to change the type of map. The script is easy to use,
just type "run map" and answer the prompt. Once you figured out the
various maps, you can save time by typing "run map [map type]".
Updated (5-28-97).
page.gs
is an easy way plot multiple graphs. For example, "run page left" will
set vpage to the left side of the page. There are many
options.
pagetrans.gs
is very similar to page.gs. The only difference is that the margins are
set for viewgraphs.
rgbset.gs v2
modification of rgbset.gs (by Jae Schemm). Defined grey, black, white and
sets default colors. (Added 5-18-97)
rgbset.gs
sets up the color table (by Jae Schemm).
loop.gs
is a GrADS do-loop. For example, "run loop i 0 20 2" will run the next
N GrADS commands for i=0,20,2 where "i" is an element of (lat, lon, lev, t, x, y, z).
d_uv.gs
is a GrADS script to display wind barbs. This script dynamically
sets the skip parameter based on the plot dimensions. Doesn't
do a great job on polar stereographic plots.
colorps.gs
takes the current image and saves it in /tmp/meta.ps as a color postscript file.
This script is easily modified for DOS and/or to print the resulting postscript file.
wanim.gs
animates better than the simple "d hgt". Does contour
labels, time stamps, double buffering and even has selectable speeds.
The script needs to be configured.
Go to https://ftp.cpc.ncep.noaa.gov/wd51we/grads.
I needed to make a number of view graphs for a talk. Most of my view graphs
had multiple plots per page. In the past, I wrote scripts that used
pagetrans.gs to make the plots. This time I wanted to be more efficient!
I wanted to combine plots that I had already made. Rather than use a
color photocopy machine I looked for a software solution. PSutils and
a small perl script solved my problems.
Download:
grads_pstools.tar (70k)
Some GrADS links.
GrADS (v1.5) has a bug in its postscript files. The background color fill
doesn't cover the whole page (it leaves a 1/2" border). This UNIX script
will fix the postscript file so that the background color fill will
fill the whole page. This script only works on US letter-size paper only.
People using A4 paper will have to modify the script. The script
is named postfix
and is used by
colorps.gs.
As always, these scripts are "as is". Send comments to
Wesley.Ebisuzaki@noaa.gov.
|