Re: Bug With getvardims and NetCDF4

From: Wei Huang <huangwei_at_nyahnyahspammersnyahnyah>
Date: Fri Jul 18 2014 - 08:16:26 MDT

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 02:17:04 2014

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