Bug in 'reinit' or vector drawing?

Masatake E. Hori mehori at CLIMATE.JP
Tue Sep 20 02:13:48 EDT 2005


Hello GrADS users,

I have come across a weird bug when drawing a vector field
on a y-z plane and a polar stereographic figure in a single
GrADS script.

Running this script twice (without quitting GrADS) yields
a different result even through the script contains a
'reinit' command at the top.

I have made a small test data and script for this issue which
you can download from,

  http://air.geo.tsukuba.ac.jp/~eddie/grads-bugtest.tar.gz
  (about 250KB compressed by tar + gz)

How to reproduce the bug:
1. Running GrADS in portrait mode, run the test script '00test.gs'.
   Two figures will be drawn.
    (http://air.geo.tsukuba.ac.jp/~eddie/test-run1.png)

2. WITHOUT quitting, run the script again, and the vector field
   becomes different (as in test-run2.png)
   It looks convincing, but the result is not true.
    (http://air.geo.tsukuba.ac.jp/~eddie/test-run2.png)

Some interesting points.

 *This bug does not occur when ONLY the upper panel
  y-z cross section is drawn

 *This bug does not occur when the map projection of the
  second figure is 'latlon'.
  Only when the projection of the second figure is 'nps' or 'sps'
  it becomes an issue

 *Note that the shading in the top figure (denoting the
  vertical component of the vector) does not change in
  either case.
  A simple 'fwrite' showed that the data itself hasn't
  changed across the first and second run of the script.

I tried this script on GrADS 1.8s11 and 1.9b4 on both
Linux and Mac OS X and the result was the same.

This issue can be a problem when producing multiple pages
of figures in a single GrADs script.

I am now looking into the source code to find the reason
for this behavior. If this is a known issue or a simple error on my part,
I would appreciate any input.

Thanks!

---------------------------------------------------------------
Masatake E. Hori (mehori at climate.jp / mhori at mri-jma.go.jp)
Atmospheric Environment and Applied Meteorology Research Dept.
Meteorological Research Institute, Japan Meteorological Agency



More information about the gradsusr mailing list