Hi everyone,
I just stumbled upon the following problem after switching from __dict__
to attributes for access to NetCDF attributes with PyNIO.
It seems that the "attributes" dict is not updated after writing new
(global) attributes to a NetCDF file when accessing it through the
"attributes" attribute. "__dict__" on the other hand is updated
instantly. To get the new attributes into the "attributes" dict, I have
to close and reopen the file.
I have only tested this for global attributes so far, so I don't know if
it works on variable attributes or not.
Attached is a small script that shows the problem on my system (64bit
Debian/GNU Linux stable with PyNIO 1.4.0)
So as a workaround I just close and reopen the files if I want to read
the new attributes from them for now.
Is this a known bug or in any way intended to behave like that? It seems
a little inconsistent to me.
Cheers,
Michael
-- Michael Decker Forschungszentrum Jülich ICG-2: Troposphäre E-Mail: m.decker@fz-juelich.de
_______________________________________________
pyngl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
This archive was generated by hypermail 2.1.8 : Mon Oct 04 2010 - 09:57:00 MDT