segmentation fault: gasdf.c:3237, index out of bound

Jennifer Adams jma at COLA.IGES.ORG
Fri Feb 22 19:28:39 EST 2008


On Feb 22, 2008, at 6:16 PM, Ryo Furue wrote:

> Hi Jennifer,
>
> Thank you for your help.
>
> | The seg fault happens when you try to display the 3-dimensional
> | variable tr with the Z dimension set to something other than 1. That
> | is a bug in the sdfopen code in GrADS 1.9. That code is no longer in
> | version 2.0, and I am unlikely to spend any time debugging it since
> | the problem is readily fixed if you use a 'dtype netcdf' descriptor
> | file:
>
> Um, I'm a bit confused.  I guess you say two things:
>
> 1. The bug is fixed in 2.0 and you don't want to fix it in the 1.9
>   series.
> 2. The bug can be circumvented in GrADS 1.9 by using a 'dtype netcdf'
>   descriptor file.
>
> Correct?
Yes.

> I certainly understand that you don't want to fix a bug
> in an old version that is already fixed in a newer one.
  It's not that the bug is fixed, it's that the buggy I/O code in
sdfopen is completely gone. Just think of 2.0 as the fix for the
problems in 1.9. Bugs in 2.0 will be fixed as quickly as possible.

> But, creating a descriptor file for a netCDF file is like
> adding English subtitles to an English-speaking movie!
I disagree. Many self-describing files have inadequate metadata and
clients such as GrADS and Ferret have difficulty handling them
without any guidance. Descriptor files give the user control over
which metadata to use and how to interpret the data. Without that
option you are handicapped by what the data provider put in the file.
Consider the file you submitted -- none of your variables has a
'long_name'. Wouldn't you consider that important piece of
information about the data in your file?

> (They are useful for people with hearing disability,
>  but that's not the point here . . .)  Anyway, I can live
> with the workaround. I don't want to push this case.
OK. I will let it go too, because I could rant for a long time about
bad metadata in self-describing files...

> |     So, unless GrADS bothers to transpose the temperature array
> |
> | GrADS bothers to do this when you have 'options zrev' in your
> | descriptor file or 'positive down' as a netcdf attribute.
>
> Aha!  Thanks for the explanation.  That's clear.  Probably GrADS
> doesn't actually transpose arrays on memory (which would be some
> extra computation, which isn't really necessary), but it presents
> such a "view" to the user.
That's right. By the way, you can always use 'set yflip' if you want
to draw your z-axis upside down.

> My confusion was because I'm not
> familiar with that view.  I usually use Ferret, where array indices
> never change whether the axis is positive down or not.
> The attribute "positive down" affects only how Ferret plots
> the field.
That is one of many subtle differences between the two programs. It
can be little confusing to go back and forth between them.

--Jennifer

--
Jennifer M. Adams
IGES/COLA
4041 Powder Mill Road, Suite 302
Calverton, MD 20705
jma at cola.iges.org



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20080222/79ae29e0/attachment.html 


More information about the gradsusr mailing list