GrADS Script Library

basemap.gs Overlays a land or ocean mask that exactly fits the coastal outlines. Requires the following supplemental data files:
lpoly_lowres.asc and lpoly_mres.asc and lpoly_hires.asc
opoly_lowres.asc and opoly_mres.asc and opoly_hires.asc
See instructions in script header for using lpoly_US.asc to mask out non-US areas.
box_and_whisker.gs Demonstrates how to use gxout bar and errbar to draw a box and whisker plot

cbar.gs and
cbarn.gs
cbarm.gs

Scripts to draw a long rectangular color legend next to shaded plots.
cbar.gs is the original version -- just the filled rectangles with labels
cbarn has some added features and arguments -- it draws outlines and triangular endpoints
cbarm will look better if using 30+ colors -- labels are drawn at appropriate intervals
cbarc.gs Draws a small fan-shaped color legend in the corner of shaded plots.
cbar_l.gs
cbar_line.gs
cbar_line2.gs
Scripts to draw a legend for line graphs.
cmap.gs
Creates a color table. See additional documentation.
connect_the_dots.gs
Draws a line connecting user's mouse clicks.
define_colors.gs
Defines a variety of colors using the set rgb command.
defval_demo.gs
Illustrates the use of q defval and set defval commands.
draw_pdsi.gs Demonstrates a way to use the shapefile interface in GrADS by drawing the Palmer Drought Severity Index (PDSI) values for U.S. climate divisions.
font.gs
Displays all the characters in a font set.
isen.gs
Displays a field interpolated to a specified isentropic level.
lats4d.gs
Writes NetCDF, HDF-SDS or GRIB files from GrADS. See additional documentation.
makebg.gs Creates a background map image that shows topographic texture. It requires a DODS-enabled version of GrADS and also uses the external ImageMagick utility "combine".
map.gs
Automates settings for a variety of useful map projections.
mconv.gs
Calculates moisture convergence.
meteogram_eta.gs
meteogram_gfs.gs
meteogram_gfsb.gs
These scrips draw meteograms based on NCEP forecast data, which is accessed through the GrADS-DODS Server. You must use a DODS-enabled version of GrADS for these scripts to work.
narropen.gs This script uses command line arguments to build a data descriptor file to open pre-projected (lambert conformal) NARR netCDF data in GrADS (version 1.9b4 or later).
panels.gsf and
panels_demo.gs
Scripts to create global variables that contain the 'set vpage' commands for a multi-panel plot. These also illustrate the dynamic loading of script functions.
script_math_demo.gs
Illustrates the use of the scripting language math funcitons.
pinterp.gs
Displays a field interpolated to a specified pressure level.
plotskew.gs
Draws a SkewT/LogP Diagram.
rgb255.gs (Version 2.0.a6) Defines a set of rainbow colors and draws a demo plot; uses cbarm.gs to draw a color bar
sdfopent.gs This script simulates the old 3-arg sdfopen for templating
stack.gs
Delays display while command sequence is entered by user, then executes all at once.
string.gs
Draws a string located at position of user's mouse click.
sweat_index.gs
Calculates the SWEAT Index given relative humidity, temperature, and wind components.
traj.gs
Draws forward and backward trajectories in the horizontal plane.
use.gs
Similar to open except it checks the list of current files to see if the specified file has already been opened. If it has been opened, it changes the default file number to the previously opened file instead of opening the same data file again.
wxsym.gs
Displays available weather symbols.
xanim.gs
Controls an animated display.
zinterp.gs
Displays a field interpolated to a specified height level.
zoom.gs
A simple way to zoom into a plot.