<div class="gmail_quote">On Feb 18, 2008 4:40 AM, Ryo Furue <<a href="mailto:furue@hawaii.edu">furue@hawaii.edu</a>> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Dear GrADS maintainers,<br><br>I'd like to report a bug.<br><br>For a netCDF file, line 3237<br><br> 3237 fgrid[ginx] = fakefgrid[indx] ;<br>
<br>of gasdf.c causes a segmentation fault. It turns out that ginx<br>gets a negative value, which in turn is caused by<br><br> 3230 ginx = (gtinx - gridptr->dimmin[GTINDEX]) * zyxsize +<br> 3231 (gzinx - gridptr->dimmin[GZINDEX]) * yxsize +<br>
3232 (gyinx - gridptr->dimmin[GYINDEX]) * gxsize +<br> 3233 (gxinx - gridptr->dimmin[GXINDEX]) ;<br><br>where<br><br> gtinx == 1<br> gridptr->dimmin[GTINDEX] == 1<br> gzinx == 1<br> gridptr->dimmin[GZINDEX] == 30<br>
gyinx == 1<br> gridptr->dimmin[GYINDEX] == 1<br> gxinx == 1<br> gridptr->dimmin[GXINDEX] == 1<br><br>Another, probably related oddity is that GrADS seems to be confused<br>about a vertical axis with an attribute 'positive = "down" '.<br>
Index 1 of my depth coordinate corresponds the shallowest level<br>and index 30 corresponds to the deepest. But, in GrADS, z = 1<br>corresponds to the deepest level. I suspect this is the reason<br>for gridptr->dimmin[GZINDEX] == 30 and gzinx == 1 .<br>
<br>Here is how the vertical axis is defined (from ncdump -h):<br><br> float dep(dep) ;<br> dep:units = "meters" ;<br> dep:axis = "Z" ;<br> dep:positive = "down" ;<br><br> dep = 5, 15, 25, 35, 45, 55, 65, 75, 85, 95, 105, 115.9789, 129.7985,<br>
148.0428, 171.8625, 201.8625, 238.0428, 279.7985, 325.9789, 375, 425,<br> 491.1513, 604.1757, 790.2066, 1068.231, 1448.231, 1930.207, 2504.176,<br> 3151.151, 3845 ;<br><br>I can send you my netCDF file as well as an instruction on how to<br>
reproduce the segmentation fault.<br><br>I'm using grads-1.9b4 on Linux.<br></blockquote>
<div> </div>
<div>Is this bug still in the v1.9.0-rc1 binaries? </div></div><br> <a href="http://sourceforge.net/project/showfiles.php?group_id=161773&package_id=182392">http://sourceforge.net/project/showfiles.php?group_id=161773&package_id=182392</a><br clear="all">
<br>-- <br>Arlindo da Silva<br><a href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</a>