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.
There are a number of bug fixes in this beta. None were particularly serious.
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.
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
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.
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
Hoop's version of readline needed, #include <stdlib.h> in readline.c to compile under irix6.4
q gxinfo
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 = 0The new output has the word "Window" and gathers information only when invoked.
"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 gifThe 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
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.
config.sh now produces tar.im.dist.bin.sh tar.xa.dist.bin.sh to bundle up the IM and or XA utilties
A new sh script creates support library file that includes image libs.
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
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.
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...