Re: [Matplotlib-users] function to create netcdf file

2009-11-11 Thread John
It's actually just a nice part of the python language, setattr(a, > 'foo', 'bar') is the same code as a.foo = bar. When working with > NetCDF, the only time I've needed to use setarr (or getattr) is when > the name of the attribute I want isn't a valid python identifier (like > if an attribute has

Re: [Matplotlib-users] function to create netcdf file

2009-11-11 Thread Ryan May
On Wed, Nov 11, 2009 at 9:26 AM, John wrote: > No problem.. just wanted to make sure it would work and is 'pythonic'. > > I guess the biggest concern is that for others using the netcdf file, say > from matlab or somewhere else, will be able to access the attributes. > > It seemed so easy to do it

Re: [Matplotlib-users] function to create netcdf file

2009-11-11 Thread John
No problem.. just wanted to make sure it would work and is 'pythonic'. I guess the biggest concern is that for others using the netcdf file, say from matlab or somewhere else, will be able to access the attributes. It seemed so easy to do it this way, I was curious why the tutorials suggest using

Re: [Matplotlib-users] function to create netcdf file

2009-11-11 Thread Ryan May
On Wed, Nov 11, 2009 at 7:31 AM, John [H2O] wrote: > > Hello, I'm trying to write a function to create a 'vanilla' NetCDF file to > which I can add data. > > So far I have created the following, which is designed to set up a netcdf > file for the addition of global or at least lat/lon datasets. My

[Matplotlib-users] function to create netcdf file

2009-11-11 Thread John [H2O]
Hello, I'm trying to write a function to create a 'vanilla' NetCDF file to which I can add data. So far I have created the following, which is designed to set up a netcdf file for the addition of global or at least lat/lon datasets. My question has to do with attribute setting. Is it valid to do