netcdf-hdf mailing list is no longer active. The list archives are made available for historical reasons.
Hi Ed, > Here's a snippet of code: > > /* Create a space for the memory, just big enough to hold the slab > we want. Then select it all. */ > if ((mem_spaceid = H5Screate_simple(var_info.ndims, count, NULL)) < 0) > BAIL(NC_EHDFERR); > if (H5Sselect_all(mem_spaceid) < 0) > BAIL(NC_EHDFERR); > > Do I need to select the space, or will it automatically be selected > when created? The default selection for dataspaces is the "all" selection, so the H5Sselect_all() call is not needed. Quincey >From owner-netcdf-hdf@xxxxxxxxxxxxxxxx 10 2003 Nov -0700 11:45:04 Message-ID: <wrxwua8qczz.fsf@xxxxxxxxxxxxxxxxxxxxxxx> Date: 10 Nov 2003 11:45:04 -0700 From: Ed Hartnett <ed@xxxxxxxxxxxxxxxx> To: netcdf-hdf@xxxxxxxxxxxxxxxx Subject: zero length attrributes... Received: (from majordo@localhost) by unidata.ucar.edu (UCAR/Unidata) id hAAIj6dv003131 for netcdf-hdf-out; Mon, 10 Nov 2003 11:45:06 -0700 (MST) Received: from rodney.unidata.ucar.edu (rodney.unidata.ucar.edu [220.127.116.11]) by unidata.ucar.edu (UCAR/Unidata) with ESMTP id hAAIj5Ob003122 for <netcdf-hdf@xxxxxxxxxxxxxxxx>; Mon, 10 Nov 2003 11:45:05 -0700 (MST) Organization: UCAR/Unidata Keywords: 200311101845.hAAIj5Ob003122 Lines: 32 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-netcdf-hdf@xxxxxxxxxxxxxxxx Precedence: bulk Howdy all! The topic of the day is the perhaps mythical zero length attribute. Why would one want a zero length attribute? I will leave that question for the philosophers among us. Does anyone really use zero-length attributes in the netcdf universe? Probably there is someone out there who does, since there are a large number of users out there. Meanwhile, netcdf supports a zero length attribute, but HDF5, apparently, does not. When I try to create one I get: HDF5-DIAG: Error detected in HDF5 library version: 1.6.1 thread 0. Back trace follows. #000: H5S.c line 1708 in H5Screate_simple(): zero sized dimension for non-unlimited dimension major(01): Function arguments minor(05): Bad value Woops! So that doesn't work. My reading of the manual on H5Acreate informs me that: Currently only simple dataspaces are allowed for attribute dataspaces. So I can't use an extensible attribute. What do you think, Quincey, is there a way to have a zero length attribute in HDF5? Thanks! Ed