NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
In [22]: dir(timedata)Out[22]: ['__class__', '__delattr__', '__delitem__', '__doc__', '__getattr__', '__getattribute__', '__getitem__', '__hash__', '__init__', '__len__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setitem__', '__str__', '_assign_vlen', '_get', '_grpid', '_iscompound', '_isprimitive', '_isvlen', '_nunlimdim', '_put', '_varid', 'assignValue', 'chunking', 'dimensions', 'dtype', 'endian', 'filters', 'getValue', 'group', 'maskandscale', 'ncattrs', 'ndim', 'set_auto_maskandscale', 'shape', 'size']
In [25]: print timedata.shape (1680,) In [26]: print timedata.size 1680 In [29]: print timedata.ndim 1 In [30]: print timedata.dtype float64In any event, it seems that not all the attributes are being read. My system:
netCDF4-0.8.2.tar.gz curl-7.19.6.tar.gz netcdf-4.1-beta2.tar.gz hdf5-1.8.3-snap2.tar.gzall installed according to instructions here: http://netcdf4-python.googlecode.com/svn/trunk/docs/netCDF4-module.html
OS is RedHat Enterprise Linux 5. One last detail: I can't access the data itself: In [32]: tas = datobj.variables['tas'] In [33]: tas.shape Out[33]: (1680, 90, 144) In [34]: testdat = tas[0,:,:] --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) /home/amg/work/nhmm/<ipython console> in <module>()/home/amg/usr/local/cdat/trunk/lib/python2.5/site-packages/netCDF4.so in netCDF4.Variable.__getitem__ (netCDF4.c:14286)()
/home/amg/usr/local/cdat/trunk/lib/python2.5/site-packages/netCDF4.so in netCDF4.Variable._get (netCDF4.c:18945)()
RuntimeError: NetCDF: Variable has no data in DAP request ----------------------- Thanks much for following up on this. Best, Arthur Jeff Whitaker wrote:
Dennis: If I openhttp://esgcet.llnl.gov/dap/ipcc4/20c3m/gfdl_cm2_1/pcmdi.ipcc4.gfdl_cm2_1.20c3m.run1.atm.mo.xmlwith netcdf-4.1-beta2, then get the time variable, it appears there are no attributes associated with it. Browsing the xml filehttp://esgcet.llnl.gov/aggregates/ipcc4/20c3m/gfdl_cm2_1/pcmdi.ipcc4.gfdl_cm2_1.20c3m.run1.atm.mo.xmlit does appear these attributes are defined, but somehow the client is not getting them.Is it a bug in the way there are serving the data, or a bug in the opendap client in netcdf-4.1?-Jeff
-- *^*~*^*~*^*~*^*~*^*~*^*~*^*~*^*~*^*~*^*~*^*~*^*~*^*~*^*~*^*~*^*~* Arthur M. Greene, Ph.D. The International Research Institute for Climate and Society The Earth Institute, Columbia University, Lamont Campus Monell Building, 61 Route 9W, Palisades, NY 10964-8000 USA Tel: 845-680-4436 | Fax: 845-680-4864 amg@xxxxxxxxxxxxxxxx | http://iri.columbia.edu *^*~*^*~*^*~*^*~*^*~*^*~*^*~*^*~*^*~*^*~*^*~*^*~*^*~*^*~*^*~*^*~*
begin:vcard fn:Arthur M. Greene n:Greene;Arthur M. email;internet:amg@xxxxxxxxxxxxxxxx tel;work:845-680-4436 tel;fax:845-680-4865 x-mozilla-html:FALSE version:2.1 end:vcard
netcdfgroup
archives: