Re: zero length attrributes...

NOTE: The netcdf-hdf mailing list is no longer active. The list archives are made available for historical reasons.

Hi Bob,

[ Charset ISO-8859-1 unsupported, converting... ]
> On 2003.11.11 11:31 Quincey Koziol wrote:
> > 
> > 
> >   3 - The most elegant solution is to add a "empty" ("nil", "null",
> > anyone have
> >         an opinion on the name?  I like "empty") dataspace to HDF5.
> > This would
> >         just be a dataspace with no elements in it.  Obviously, there
> > would be
> >         no way to perform I/O on it and it would use no storage space
> > for the
> >         raw data, etc.
> 
> I'm not sure that "elegant" would be the first word that leaps to mind.
    :-)

> But if you are going to do this, make the "algebra" of dataspaces and
> selections work right.  Also, I would want a SCALAR with 0 dims to be 
> equivalent to EMPTY, and a SIMPLE with 0 dims to be equivalent to EMPTY. 
    Scalars have 0 rank and no dimensions, so there is no way to make them
equivalent to empty dataspaces.  And, we currently issue an error for setting
the size of non-extendible dataspaces to 0, and I don't think we'd want to
change that at this point (although I think it's a good idea and I would go
for it if other people thought it was sensible).

    What I was planning to do was to create empty dataspaces the same way we
create scalar dataspaces:
    scalar_space_id=H5Screate(H5S_SCALAR);  /* Create a scalar dataspace */

only use a new constant:
    empty_space_id=H5Screate(H5S_EMPTY);    /* Create an empty dataspace */

    Additionally, I think it would be a good idea to have two dataspaces that
are created by the library: H5S_SPACE_SCALAR and H5S_SPACE_EMPTY, which would
avoid the need for users to create these dataspaces (as outlined above) and
could be used directly in creating datasets or attributes:

    
dataset_id=H5Dcreate(fid,"/Dataset",H5T_NATIVE_INT,H5S_SPACE_EMPTY,H5P_DEFAULT);

    This would need support in the tools, the FORTRAN & C++ APIs, etc...

    Quincey

> Make sure that selections work sensibly:
> 
>     EMPTY AND SPACE = ??
>     EMPTY OR SPACE = ??
>     SPACE - EMPTY = SPACE
>     EMPTY - SPACE = ??
> 
> etc. 
    Hmm, you can't operate between two dataspaces, so these don't make any
sense.  Also, since there are no elements in the dataspace, there is no way
to perform I/O on an empty dataspace.

    Quincey
>From owner-netcdf-hdf@xxxxxxxxxxxxxxxx 12 2003 Nov -0700 09:22:19 
Message-ID: <wrxwua5d0as.fsf@xxxxxxxxxxxxxxxxxxxxxxx>
Date: 12 Nov 2003 09:22:19 -0700
From: Ed Hartnett <ed@xxxxxxxxxxxxxxxx>
In-Reply-To: <200311121531.hACFV6MD092438@xxxxxxxxxxxxxxxxxxxxxx>
To: Quincey Koziol <koziol@xxxxxxxxxxxxx>
Subject: Re: zero length attrributes...
Received: (from majordo@localhost)
        by unidata.ucar.edu (UCAR/Unidata) id hACGMLEl019417
        for netcdf-hdf-out; Wed, 12 Nov 2003 09:22:21 -0700 (MST)
Received: from rodney.unidata.ucar.edu (rodney.unidata.ucar.edu 
[128.117.140.88])
        by unidata.ucar.edu (UCAR/Unidata) with ESMTP id hACGMKOb019413;
        Wed, 12 Nov 2003 09:22:20 -0700 (MST)
Organization: UCAR/Unidata
Keywords: 200311121622.hACGMKOb019413
Cc: netcdf-hdf@xxxxxxxxxxxxxxxx
References: <200311121531.hACFV6MD092438@xxxxxxxxxxxxxxxxxxxxxx>
Lines: 41
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

Quincey Koziol <koziol@xxxxxxxxxxxxx> writes:

>     What I was planning to do was to create empty dataspaces the same way we
> create scalar dataspaces:
>     scalar_space_id=H5Screate(H5S_SCALAR);  /* Create a scalar dataspace */
> 
> only use a new constant:
>     empty_space_id=H5Screate(H5S_EMPTY);    /* Create an empty dataspace */
> 
>     Additionally, I think it would be a good idea to have two dataspaces that
> are created by the library: H5S_SPACE_SCALAR and H5S_SPACE_EMPTY, which would
> avoid the need for users to create these dataspaces (as outlined above) and
> could be used directly in creating datasets or attributes:
> 
>     
> dataset_id=H5Dcreate(fid,"/Dataset",H5T_NATIVE_INT,H5S_SPACE_EMPTY,H5P_DEFAULT);
> 
>     This would need support in the tools, the FORTRAN & C++ APIs, etc...
> 
>     Quincey
> 
> > Make sure that selections work sensibly:
> > 
> >     EMPTY AND SPACE = ??
> >     EMPTY OR SPACE = ??
> >     SPACE - EMPTY = SPACE
> >     EMPTY - SPACE = ??
> > 
> > etc. 
>     Hmm, you can't operate between two dataspaces, so these don't make any
> sense.  Also, since there are no elements in the dataspace, there is no way
> to perform I/O on an empty dataspace.
> 
>     Quincey

Quincey,

It sounds terrific to me, but don't forget that we also need to use
this space for creating attributes, which currently are more
restrictive than dataspaces.

Ed

>From owner-netcdf-hdf@xxxxxxxxxxxxxxxx 12 2003 Nov -0700 09:34:04 
Message-ID: <wrxr80dczr7.fsf@xxxxxxxxxxxxxxxxxxxxxxx>
Date: 12 Nov 2003 09:34:04 -0700
From: Ed Hartnett <ed@xxxxxxxxxxxxxxxx>
To: netcdf-hdf@xxxxxxxxxxxxxxxx
Subject: my understanding of HDF5 changes, in (guessed) completion order...
Received: (from majordo@localhost)
        by unidata.ucar.edu (UCAR/Unidata) id hACGY5EK029803
        for netcdf-hdf-out; Wed, 12 Nov 2003 09:34:05 -0700 (MST)
Received: from rodney.unidata.ucar.edu (rodney.unidata.ucar.edu 
[128.117.140.88])
        by unidata.ucar.edu (UCAR/Unidata) with ESMTP id hACGY4Ob029795
        for <netcdf-hdf@xxxxxxxxxxxxxxxx>; Wed, 12 Nov 2003 09:34:04 -0700 (MST)
Organization: UCAR/Unidata
Keywords: 200311121634.hACGY4Ob029795
Lines: 23
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

Hello HDF Cowboys!

Here's my mental list of the changes to come in HDF5:

1 - Dimension scales (i.e. shared dimensions)

2 - Access by creation order index (i.e. ability to access datasets,
dimension scales, and attributes by indexes 0, 1, 2, ..., where the
index is also the creation order for each class of object.)

3 - Conversion between float/int, with netcdf-like range checking.

4 - Zero-length attributes.


Anything I missed?

Are all these going to be packaged into a version number? Certainly we
will need a HDF5 version number which will be the earliest released
version of HDF5 which works with netcdf-4. Any idea what that version
number is going to be? 1.6.2?

Ed


  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-hdf archives: