Getting Started with Win32e GrADS

Version 1.8SL11

GrADS logoDAO logo

Last Update: December 5, 2002


Contents

Introduction

Win32e GrADS is a port of Brian Doty 's popular Grid Analysis and Display System (GrADS) to the x86 PC running 32-bit MS Windows operating sytems (win9x, winNT, win2000), without the need for installing an X server.

This implementation of Win32e GrADS has most of the functionality of all Unix versions. Supported features include:

Choosing a PC Version of GrADS

The Table below compares some of the features available with the different PC versions of GrADS:
 
Feature
X/Win32 GrADS
Win32e GrADS
PC/X11e (MSDOS)
Command line editing (readline) X X (partial)
NetCDF support X X X
HDF support X X  
DODS support X  X  
LATS X X X
Athena Widget GUI X    
Image Magick (wi command) X    
Image printing (printim command) X X X

As can be seen, X/Win32 GrADS has all of the functionality found in the Unix versions of GrADS. However, it requires the installation of an X server. This version (Win32e GrADS) does not require an X server, but currently lacks Athena GUI and Image Magick support which may be required by some users. The MS-DOS version of GrADS is the least featured; however it has the fastest graphics and runs well on low end PCs (I've heard of users running it on ancient 386 boxes). The choice is yours. For GrADS download information, consult http://grads.iges.org/grads/downloads.html  .

Note: The directory structure of the PC GrADS binaries is designed in such a way that all PC versions could be installed on the same machine, sharing the same dat/ (fonts and map datasets) and lib/ (script library) directories. The particular version of "grads" to be executed would depend on how you have your PATH set.

System Requirements

Win32e GrADS is a 32-bit application. You must have the following hardware/software:

This Distribution

In this installation you will find the following sub-directories: Sample data files are not included in this distribution; a small collection of sample gridded and station data files can be downloaded from ftp://grads.iges.org/grads/sprite/tutorial/ . The GrADS binaries and executables in win32/ as well the documentation files under doc/ are further described below.

You Don't Need an X Server

Unlike the Win32 GrADS v1.7 (now called X/Win32 GrADS in v1.8), this version does not require the installation of an X server. However, there are a few things that you need to keep in mind:
  1. The size of the graphics window is controlled by the environment variable DISPLAY.  The general format for setting DISPLAY is  (width)x(height)x(# colors). By default, the graphics window has  a width of 640 pixels and a height of 480 pixels, with 256 colors. Depending on your screen resolution, your options for setting DISPLAY are:

  2.        set DISPLAY=320x240x256
            set DISPLAY=640x480x256
            set DISPLAY=800x600x256
            set DISPLAY=1024x768x256
            set DISPLAY=640x480x16M
            set DISPLAY=800x600x16M
            set DISPLAY=1024x768x16M
  3. Once you start Win32e GrADS with a given DISPLAY size, you will not be able to enlarge this window, although you are allowed to make it smaller. When shrinking the size of the graphics window, GrADS will not rescale your plot accordingly as it does on Unix or with X/Win32 GrADS. For resetting the size of your plots you have to use the GrADS command set xsize width height where width/height are the desired width and height (in pixels) of plotting area. The command line option -g can also be used to set initial size of the plotting area within the graphics window.

 
Using Win32e GrADS

If you are new to GrADS you may want to start with the GrADS Tutorial .The following applications are available with Win32e GrADS:
 

Application Description
Grads Win32 GrADS with the classic command line interface (ga-> prompt).  This version is the same as GradsNC below and can read and write NetCDF files (but no HDF-SDS files); see sdfopen , xdfopen
GradsC  Win32 GrADS with the classic command line interface (ga-> prompt), but without NetCDF/HDF-SDS, LATS, Athena GUI or Image support through the wi command. This version can read IEEE and GRIB files. This is the smallest version of Win32 GrADS and requires the least amount of memory. 
GradsHDF  Win32 GrADS built with NCSA's MFHDF (Multi-file HDF) library. With this configuration GrADS can read both NetCDF and HDF-SDS files (see sdfopen , xdfopen ), but can only write HDF-SDS files (but cannot write NetCDF files). IEEE and GRIB files are fully supported. 
GradsNC  Win32 GrADS built with Unidata's NetCDF library. With this configuration GrADS can read (see sdfopen , xdfopen ) and write NetCDF files, but cannot handle HDF-SDS files. IEEE and GRIB files are fully supported. 
Gv32  Windows' based GrADS metafile viewer.
Gxtran Classic metafile viewer (Gv is nicer).
Gxeps Converts GrADS metafiles to enscapsulated postscript (faster). You may want to obtain the Windows version of Ghostview (gsview), freely available from http://www.cs.wisc.edu/~ghost/gsview/. Gsview will allow you to preview and print PostScript documents on win95/NT. Highly recommended.
Gxps Converts GrADS metafiles to postscript level 1 (slower) 
Gribmap GRIB file mapping utility 
Gribscan GRIB file scan utility 
Wgrib Wes Ebisuzaki's GRIB utility (it slices, dices) 
Stnmap Station mapping utility 
Ncdump Convert NetCDF/NDF-SDS files to ASCII form (CDL). For source code and additional information consult http://www.unidata.ucar.edu/packages/netcdf .
Ncgen From a CDL file generate a netCDF file, a C program, or a Fortran program. For source code and additional information consult http://www.unidata.ucar.edu/packages/netcdf .
HDFdump Similar to Ncdump , but can read HDF-SDS files. Note: avoid using this utility for NetCDF files due to a bug related to packed NetCDF files. For source code and additional information consult http://hdf.ncsa.uiuc.edu.
Hdfgen  Similar to Ncgen , but output is in HDF-SDS format.For source code and additional information consult http://hdf.ncsa.uiuc.edu.
sh Win32 port of the GNU Bourne Again Shell (bash). This utility is needed for executing shell commands from grads, e.g., ! ls. For documentation of GNU software consult http://www.gnu.org/doc/doc.html. For source code and additional information, consult http://www.cygnus.com/gnu-win32. 
rxvt
 
A nice terminal for replacing Windows COMMAND.COM. For running it you may need to create the directory c:\cygwin\tmp .
Once started, you can start GrADS from it; the default is the Unix shell  sh.
ls, cp, rm. mv, pwd, cat Assorted GNU file utilities to facilitate porting GrADS scripts from Unix to Win32. For documentation of GNU software consult http://www.gnu.org/doc/doc.html For source code and additional information, consult http://www.cygnus.com/gnu-win32. 
*.dll  These are Dynamic Link Libraries (DLL) needed by the applications above. If you move them to a different directory, make sure they remain in your PATH. The DLL files above are usually not visible from the Win32 GrADS Program Group. You can change this default behavior from the View/Properties menu of the Windows Explorer

You can also start Win32e GrADS or any of the applications above from the DOS command line, e.g.,

c:\> grads
Recall that DOS is case insensitive, so grads is the same as GrADS. You may want to put the GrADS binary directory (usually c:\progra~1\pcgrads\win32e ) on your path. You can optionally set the DISPLAY environment variable as explained above.

Documentation

The sub-directory doc/ contains several documentation files of interest.
 
Document
Description
User's Guide As of version 1.8, an on-line version of the GrADS User's Guide is available. For convenience a copy is also provided here, along with an alphabetical index. It is recommend that you consult the on-line version for up to date information. A tutorial is also available.
cards/ Quick reference cards for GrADS commands and GrADS scripting language in PostScript, both in A4 and US Letter sizes: 
  • refv1.7-a4.ps -GrADS reference card (DIN A4) 
  • refv1.7-scl-a4.ps - GrADS scripting language reference card (DIN A4)
  • refv1.7-letter.ps -GrADS reference card (US Letter)
  • refv1.7-scl-letter.ps -GrADS scripting language reference card (US Letter) 
Thse cards are contributed by Karin Meier-Fleischer (meier-fleischer@dkrz.de). The official site for these cards is ftp://ftp.dkrz.de:/pub/visu/grads/doc .

You may want to obtain the Windows version of Ghostview (gsview), freely available from http://www.cs.wisc.edu/~ghost/gsview/. Gsview allows you to preview and print PostScript documents on win95/NT. Highly recommended. 

etc/  Unix style manual pages/text documents for several utilities: 
  • grads.html - GrADS Unix manual page for version 1.6.beta.4. Please notice that there is no need for setting the environment variables GADDIR, GASCRP, etc in this WIn32 version.
  • grib.txt - Text file with information about working with GRIB files 
  • grib2ctl.html - Local copy of grib2ctl home page. 
  • grib2ctl.txt - Text documentation for grib2ctl
  • gribmap.html - Unix manual page
  • gribscan.html - Unix manual page
  • gxeps.html - Unix manual page
  • gxps.html - Unix manual page
  • gxtran.html - Unix manual page
  • proj.txt - Text file with information about working with map projections 
  • ncdump.html - Unix manual page
  • ncgen.html - Unix manual page
  • outxwd.txt - Describes the outxwd command which produces an X window dump of the GrADS graphics screen
  • stnmap.html - Unix manual page
  • wgrib.html - Local copy of wgrib's home page
  • wgrib.txt - Text documentation for wgrib
     

Getting Help

A list server is available for GrADS users to exchange information on problem solving, script refinements, user defined functions, etc. Messages typically contain requests for help and ideas for solutions from users who have faced similar problems. Reference is frequently made to upgrades to GrADS and how to obtain them. All posts to the listserver are automatically dispatched to all subscribed users. In order to keep out spammers and internet marketers, subscription is no longer automatic. Send an email to the address below giving your affiliation, electronic and postal addresses, phone, etc. and you will be added by the system administrator.

To join, send email to: gradsusr-request@list.cineca.it

Once subscribed, carefully read and archive the important information regarding the use of the listserver and how to send messages. Before posting to the listserver, check the online archive to see if your question has already been answered. 

When reporting bugs or problems, please include the following information in your post: 
  1. The version of GrADS you are running (it is a good idea to include all the output from 'q config') 
  2. The platform you are running GrADS on (e.g. SunOS, DEC Alpha, Windows95...) 
  3. A brief description of the problem 
  4. The simplest possible script that illustrates the problem 
  5. The error messages from GrADS 
  6. The output from running "ncdump -c" on your NetCDF file if you're having trouble getting GrADS

  7. to read the file. 
If nobody responds to your post, it may be because you didn't provide enough information. In order to get the answers you want from the GrADS community, you have to ask the questions in the right way. Of course, it may also be the simple case that nobody has an answer.If a week has gone by and there is still no reply, try reposting again, making sure that you've included all the items from the list above, and noting that it is your 2nd request. 

Acknowledgements

This Win32 port was contrinuted by Arlindo da Silva from the Data Assimilation Office (NASA/GSFC).  Win32eGrADS is built with the Cygwin tools, GRX graphics library version 2.4.3 by Csaba Biegl and others.
Xlibemu version 0.31 by Ulrich Leodolter, an emulation version of MIT's X11/Release 5 library, modified by Michael Goffioul (goffioul@emic.ucl.ac.be) and Arlindo da Silva. Mike Fiorino provided invaluable help during the initial phase of this port. Don Hooper helped porting the SDF interface; Steve Emmerson provided guidance with UDUNITS. Gary Love tested some of the grads widget features. Many thanks to all.



| DAO Home Page | DAO Reanalyses | DOLMS | DAO People | GrADS Home Page |


Data Assimilation Office / Code 910.3 / NASA - Goddard Space Flight Center


Office Head: Robert Atlas
Page Author: Arlindo da Silva