What's New in 1.7.beta.7

Mike Fiorino
fiorino@pcmdi.llnl.gov

Program for Climate Model Diagnosis and Intercomparison
Lawrence Livermore National Laboratory
University of California
P.O. Box 808 L-264
Livermore, CA 94551
510-423-8505 (voice) 510-422-7675(fax)


29 January, 1998


Introduction

This update to beta7 is more than bug fixes and was prompted by the leapyear problem. Namely, that some beta6 had the fix and some didn't. I also got in all of Arlindo's configuration and code for the win32/DOS builds so that beta7 is a complete code base for all platforms. I've also included new interface code (gaimg.c) that implements Arlindo's "wi" or "write image" command, and new output from 'q gxinfo' courtesy of Gary Love and Jonathan Allen of NRL Monterey. The gaimg.c code works with both ImageMagick and XA image tools and libraries.

Bug Fixes

There are a number of bug fixes in this beta. None were particularly serious.

setting the leapyear

Perhaps the biggest reason for declaring a new beta is that how leapyears (e.g., options 365_day_calendar in the .ctl file) are handled was different within beta6 builds. Thus, it would behave correctly in some versions and not in others. This version now correctly handles leap years.

using index in .ctl file for station data

I stepped on this bug when using the keyword index in a station data .ctl file. I got a seq fault because gaddes.c was decodeing the stnmap file as if it were a gribmap file. Duh. The code now errors out if one tries doing something like this

-v -q options in stnmap

The 1.7.beta.6 stnmap runs in verbose mode always. I basically did not clean my code up, but it's working properly now.

gxtran seg fault - size of static polygon file vertices array increases

This was a classic example of old code (gxtran.c) conflicting with new code. gxtran seq faulted whn trying to dray a .gm file with polygons with a lot of sides. The float array holding the vertices of polygons was statically set to a small number. I simply increased it float xybuf[10000]; from 1000 to 10,000

readline missing #include


Hoop's version of readline needed, 

#include <stdlib.h>

in readline.c to compile under irix6.4

New Features

New info from q gxinfo

Gary Love and Jonathan Allen of NRL, Monterey extended the output from gxinfo to give external applications critical information on the GrADS display window. Here's a sample of the new output

Last Graphic = Clear
Page Size = 11 by 8.5
X Limits = 0 to 11
Y Limits = 0 to 8.5
Xaxis = None  Yaxis = None
Mproj = 2
Window ID = 37748737
Window X = 4
Window Y = 28
Window Width = 512
Window Height = 395
Window Border = 0

The new output has the word "Window" and gathers information only when invoked.

The "wi" output command

"wi" is a new command meaning "write image". It is a way to immediately (i.e., without having to invode an external program" dumping the image in the X window to a file in a convenient format such as GIF. Arlindo wrote the original interface code (gaimg.c and .h), and I extended it to use either the ImageMagick libaries or the "XA" libs.

I also changed gacfg.c to show what version you have.

I spent a lot of time flailing with the XA code and in the end gave up and used IM. I suspect that the XA code is actually more powerful, but because it has not been ported to many platforms, I had a lot of problems getting it built and more importantly getting it to work properly. The big advantage of XA is that the GIF images are about 8% smaller than those using the IM library. Here is what you get when 'q config' from wi-enabled grads:


Config: v1.7Beta7 32-bit big-endian readline im/image-output

Grid Analysis and Display System (GrADS) Version 1.7Beta7
Copyright (c) 1988-1997 by Brian Doty 
Center for Ocean-Land-Atmosphere Studies
Institute for Global Environment and Society 

This version of GrADS has been configured with the following options:

   o This is a 32-bit BIG ENDIAN machine version.
   o Command line editing (readline) ENABLED.
   o CIRES/CDC (http://www.cdc.noaa.gov) SDF/XDF interface DISABLED. 
     This version is NOT configured to read NetCDF/HDF-SDS files.
   o PCMDI (http://www-pcmdi.llnl.gov) LATS interface DISABLED.
     This version is NOT configured to write GRIB or NetCDF/HDF-SDS files.
   o DAO (http://dao.gsfc.nasa.gov) Athena Widget GUI DISABLED.
   o DAO/PCMDI ImageMagick Image Output ENABLED.
     Use "wi filename.format (gif,jpeg,tiff)" to output X window to an image file

For additional information please consult http://grads.iges.org/grads/

The usage for the IM version of wi is

wi filename.format

e.g.,

wi test.gif

and for XA:

wi filename format

e.g.,

wi test.gif gif

The IM version uses a feature of IM where the output format can be set by the filename extension. Also, if one tries running wi in batch mode:

ga-> wi test.gif
IMG Error: image functions not available in batch mode

Build Improvements

Docmentation

http://www-pcmdi.llnl.gov/fiorino/grads/grads.build.guide.htm gives a fairly complete description of how to build GrADS. The guide was designed for people with good unix background, but not experts. It should serve as the INSTALL doc for future source distributions of GrADS as I believe source distribution will be required given the wide variation in unix environments.

Creating IM and XA binary distributions


config.sh now produces

tar.im.dist.bin.sh
tar.xa.dist.bin.sh

to bundle up the IM and or XA utilties

Creating support libraries that include image libs

A new sh script creates support library file that includes image libs.

Developer Resources


ftp:/sprite.llnl.gov/pub/fiorino/grads/dev

contains,

ftp:/sprite.llnl.gov/pub/fiorino/grads/dev/lib        - support libs
ftp:/sprite.llnl.gov/pub/fiorino/grads/dev/libsrc     - lib source
ftp:/sprite.llnl.gov/pub/fiorino/grads/dev/imglib     - image lib source (jpeg and tiff)
ftp:/sprite.llnl.gov/pub/fiorino/grads/dev/win32      - win32 stuff



New Issues

hdf on irix6.4

I had to rebuild udunits, libsx and netcdf on our new irix6.4 box. It was REALLY painful to build with "old" 32 bit (-32) code, so I now run with the default -n32 (new 32 bit). I wasn't going to tackle hdf so my irix6 builds do not include gradshdf.

readline in irix6.4 version does not work under irix6.2

This is another case of shared libraries. The good news is irix5.3 binaries work under 6.2 and 6.4. And people complain about windoze...



Send Comments to Mike Fiorino fiorino@llnl.gov, PCMDI, LLNL

Last updated 29 January, 1998
LLNL Disclaimers
UCRL-MI-NNNNN