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.
NOTE: The netcdf-hdf
mailing list is no longer active. The list archives are made available for historical reasons.
Hi Ed, Sounds like a reasonable idea to me. With Bob leaving soon, someone here (possibly me :-) needs to take over our dimension scale data model. Any takers? Quincey > I have been using dimension scales to store dimension data. The > dimension scale code puts several attributes on the datasets to store > dimensional metadata. This fragment from h5dump illustrates: > > DATASET "Distance" { > DATATYPE H5T_IEEE_F32LE > DATASPACE SIMPLE { ( 3 ) / ( 3 ) } > DATA { > (0): 0, 0, 0 > } > ATTRIBUTE "CLASS" { > DATATYPE H5T_STRING { > STRSIZE 16; > STRPAD H5T_STR_NULLTERM; > CSET H5T_CSET_ASCII; > CTYPE H5T_C_S1; > } > DATASPACE SCALAR > DATA { > (0): "DIMENSION_SCALE" > } > } > ATTRIBUTE "NAME" { > DATATYPE H5T_STRING { > STRSIZE 9; > STRPAD H5T_STR_NULLTERM; > CSET H5T_CSET_ASCII; > CTYPE H5T_C_S1; > } > DATASPACE SCALAR > DATA { > (0): "Distance" > } > } > ATTRIBUTE "REFERENCE_LIST" { > DATATYPE H5T_COMPOUND { > H5T_REFERENCE "dataset"; > H5T_STD_I32LE "dimension"; > } > DATASPACE SIMPLE { ( 2 ) / ( 2 ) } > DATA { > (0): { > DATASET 4392 /Adam/Able/Billy_goat_gruff , > 2 > }, > (1): { > DATASET 9088 /Adam/Cain/Grumpy_the_camel , > 2 > } > } > } > } > > > This shows a dimension scale with attributes named CLASS, NAME, and > REFERENCE_LIST. > > Might I suggest that the names of the attributes be preceded with an > underscore? (For example _NAME instead of NAME.) > > The reason is that these attribute names will not be available to > users. If the user tries to create an attribute named NAME, he will > get an error because one already exists. (This is true in both netCDF > and HDF5). > > It's certain that some users somewhere have used attributes called > "NAME." That's why an underscore would be a good idea. > > Thanks! > > Ed > -- > Ed Hartnett -- ed@xxxxxxxxxxxxxxxx >
netcdf-hdf
archives: