- To: netcdfgroup@xxxxxxxxxxxxxxxx
- Subject: Re: [netcdfgroup] Naming conflict using python netCDF4 module
- From: Jeff Whitaker <jswhit@xxxxxxxxxxx>
- Date: Wed, 16 Nov 2011 10:01:10 -0700
On 11/16/11 9:31 AM, Pan, Jianfu (GSFC-610.2)[ADNET SYSTEMS INCORPORATE]
wrote:
Hi,I use python netCDF4 module to read a netCDF file. One of the attributes of the variables in the netCDF file is called "filters", and this conflicts with the built-in method of the variable object of netCDF4 module. It looks like this attribute is ignored when netCDF4 load my file, and I'm unable to access my "filters" attribute. Anyone might have an idea how to deal with this? Thanks.Jianfu Pan
Jianfu: If 'var' is your variable object, you can do
var.getncattr('filters')
instead of
var.filters
and you will get the netcdf attribute instead of the filters method.
-Jeff
--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@xxxxxxxx
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
- Follow-Ups:
- Re: [netcdfgroup] Naming conflict using python netCDF4 module
- From: Pan, Jianfu (GSFC-610.2)[ADNET SYSTEMS INCORPORATE]
- Re: [netcdfgroup] Naming conflict using python netCDF4 module
- References:
- [netcdfgroup] Naming conflict using python netCDF4 module
- From: Pan, Jianfu (GSFC-610.2)[ADNET SYSTEMS INCORPORATE]
- [netcdfgroup] Naming conflict using python netCDF4 module