The latest page is at itmetr.net.
last modified:
05:06 PM MDT, Sun 15 Jun 2008
Your first stop should perhaps be at the official GrADS Home Page. GrADS is GRIB-friendly, and Gentry has access to about 40 Gigabytes of reanalysis data in GRIB format, from the NCEP/NCAR Global Reanalysis Project. Currently we have years 1953-2001. Here is the datalist and filelist, showing the data we have. For a sample of what GrADS plot looks like, you may want to check my rather limited GrADS-powered online reanalysis plotter. Fortunately, you can use the data fairly easily without becoming an expert on GRIB. This succinct introduction to GRIB, GrADS, and wgrib has a plug for GrADS. Recall the wgrib utility can be used to extract and convert GRIB data to familiar text and binary forms. Using wgrib with GRIB files was introduced in Faster Python with Numeric. Using wgrib to extract a times series was done with a modified version, wgrib_hacked.c, in Statistical Analysis of Norman Temperature. GrADS can open and read GRIB files with simple commands. You might be able to get your work done, without a need for either Python or wgrib. That should be the true for the task here, but a Python alternative to the GrADS scripting is also demonstrated. For my own purposes, I don't really need GrADS anymore. I would prefer to use wgrib to extract the data, Python to process the data, and the basemap toolkit (within matplotlib) to plot the result. Plotting with basemap was demonstrated in my NetCDF tutorial. But your boss may want you to use GrADS. Also, you may appreciate Python more after you try GrADS. The task here is pure GrADS.
Using GrADSThe GrADS software is installed on Gentry. In the main "readme" file distributed with the CDROMS, (which is how we got our data), we are given the following instructions (which I have shortened and modified for our Linux installation with the data on the local file system):
One goal in the design of this CD-ROM was to make it fast
to use. Suppose you happen to be interested in the weather
on February 2, 1972. You should be able to take the CD-ROM
for 1972, put it into your computer, and be looking at the
500 mb heights in half a minute.
1) type "grads", a "ga>" prompt should appear. (4 seconds)
2) Open a control file (5 seconds)
in SOM: ga> open /REANALYSIS/1972/ctl/at00z12z/hgt.prs
Note: to check the contents of the file, type
ga> query file
3) Display a plot (5 seconds)
example:
ga> set time 2feb72
ga> set lev 500
ga> d hgt
This brings up my first annoyance with GrADS: If any part of the plot window is temporarily
covered by the terminal window in which you are typing in the GrADS commands, when you bring
the plot window to the foreground, the part that was covered is blank. I don't know of
any other plotting software that has that problem.
Some Advice for Writing GrADS scripts
Grab my grads_scripts.tar.gz. There are several subdirectories within grads_scripts, which contain various plotting tasks. Here is a compendium of the plots. There are Readme files to view within grads_scripts, but here are some additional comments about one of the first you should study, t2m.gs. The script t2m.gs is essentially the same GrADS script that is written by a Python CGI script behind online reanalysis plotter. There are a few comments to read in t2m.gs. I recall suffering quite a bit trying to get the darn thing to work, and desperately reading the GrADS Listserv Archive, which these days I cannot even access. As introduced above, the scripting language has some unusual syntax: Lines that also would work interactively with GrADS must be in ' '. Lines that are part of the GrADS scripting language (which do not seem to work interactively) do not have the quotes. Similarly, the variables produced by these scripting lines, still with no ' ' around them, can be concatenated with quoted strings by simply placing them next to each other in the script line. You will need the script cbar.gs to be in the same directory as t2m.gs. Then, from the unix command line type (or from a Python or Perl script): grads -blc "run t2m.gs" If the grads.metafile was output by the above command, rather than from the PNG, then to convert to encapsulated postscript: gxeps -c -i grads.metafile -o temp.eps The online GrADS Scripting Language is your main source of information, but also be sure to read about batch processing on this page. GrADS version 1.8 or later can use printim to make PNG files directly, without going through a metafile. See the lines to uncomment near the end of t2m.gs. gxeps is one of several commands that act on the grads metafiles. These commands work from the Unix command line, independently of grads. Previous tasks now offered as examples
Some other GrADS scripts(Some things here are not for GrADS, but I am keeping them here so that I do not lose them.)
Links
NCEP/NCAR Global Reanalysis Project |