Re: Bug With getvardims and NetCDF4

From: Wei Huang <huangwei_at_nyahnyahspammersnyahnyah>
Date: Fri Jul 18 2014 - 09:18:56 MDT

Walter,

Yes, it is a bug, which an internal variable is not properly initialized,
which result the empty file returned, here for your code, the "dummy"
dimension.

We have fixed this problem, and the new fix will be in the next release.
In the meantime, if you need the fixed version immediately, please let us
know.

Thanks,

Wei

================================================
1850 Table Mesa Dr.
Boulder, CO 80307
Phone: 303-497-8924


On Fri, Jul 18, 2014 at 8:16 AM, Wei Huang <huangwei@ucar.edu> wrote:

> Walter,
>
> We'll take a look and get back to you soon.
>
> Thanks,
>
> Wei
>
> ================================================
> 1850 Table Mesa Dr.
> Boulder, CO 80307
> Phone: 303-497-8924
>
>
> On Thu, Jul 17, 2014 at 10:50 PM, Walter Kolczynski <
> walter.kolczynski@noaa.gov> wrote:
>
>> I believe I've found a bug with getvardims and NetCDF4 files. If a file
>> is created using the NetCDF4 format and then getvardims is called on
>> another variable that has named dimensions, subsequent calls of getvardims
>> on the file handle will report the dimension names of the variable rather
>> than reporting missing. I was able to reproduce this with the following
>> short test code (also attached):
>>
>> setfileoption( "nc", "Format", "NetCDF4" )
>> outfile = addfile( "getvardim_bug.nc", "c" )
>>
>> a = ispan(0,4,1)
>>
>> print( getvardims(outfile) ) ; missing, as expected
>> dummy = getvardims( a ) ; without dim name, has no effect
>> print( getvardims(outfile) ) ; still missing
>> delete(dummy)
>>
>> a!0 = "test"
>> a&test = ispan(0,40,10)
>>
>> print( getvardims(outfile) ) ; missing, as expected
>> dummy = getvardims( a ) ; test
>> print( getvardims(outfile) ) ; erroneously prints test
>>
>> The same code works as expected if the first line is commented out (which
>> uses the older NetCDF format). This bug was found using v 6.1.2, but I
>> didn't see any notes about a fix in the notes for v 6.2.0 (though it could
>> be part of "Numerous improvements and bug fixes have been made to the
>> NetCDF-4 file I/O").
>>
>> - Walter Kolczynski
>>
>>
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>

Received on Fri Jul 18 03:19:37 2014

This archive was generated by hypermail 2.1.8 : Fri Aug 01 2014 - 15:10:55 MDT