comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Re: HDF attribute extract

Re: HDF attribute extract
type: item
description: Hi Sheldon, :-) without the possibility to easily check, but the loc_id in the call to H5A_OPEN should be "An integer representing the identifier of the group, dataset, or named datatype containing the attribute within." So there must at least be one call H5D_OPEN before it to receive a valid ID of an object which can contain attributes. In your example, loc_id is the file ID, and the file itself seems not to carry any attributes. BTW, are you sure that satellite_id is in fact an attribute and not a dataset? Have you just tried the good old READ_HDF routine? Cheers, Peter
date: 2006-01-05T14:58:23-00:00

Re: HDF attribute extract
type: item
description: Hi Peter, Good to see that you are still around. I an pretty sure that the satellite_id is an attribute. The hdf_parse showed this and hdf_browser showed this as well. These attributes are located on the same level as that dataset for the cloudmask. H5dump gives: HDF5 "CFCin2004123121091300700125010D.hdf" { GROUP "/" { ATTRIBUTE "version" { DATATYPE H5T_STRING { STRSIZE 19; STRPAD H5T_STR_NULLTERM; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; } DATASPACE SCALAR } ATTRIBUTE "description" { DATATYPE H5T_STRING { STRSIZE 128; STRPAD H5T_STR_NULLTERM; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; } DATASPACE SCALAR } ATTRIBUTE "satellite_id" { DATATYPE H5T_STRING { STRSIZE 7; STRPAD H5T_STR_NULLTERM; CSET H5T_CSET_ASCII; CTYPE H5T_C_S1; } I thought this was very simple and I looked at your READ_HDF program but it seemed like using an elephant gun to kill an ant. Now this ant seems like an elephant. I am pretty sure it is an attribute. I have tried just opening the file and then using H5A_READ/H5D_READ but to no avail. Logically or otherwise, I am issing something. I will look at the READ_HDF now if you cannot no other suggestions. Thanks, Sheldon
creator: Liberum
date: 2006-01-05T15:24:03-00:00

Re: HDF attribute extract
type: item
description: Thanks Peter, I got it - and the answer lied, indeed, in read_hdf. I had to used h5g_open(file_id, '/') and then get the number of attributes and then names. Thanks. Hope the new job is all that it promised to be.
creator: Liberum
date: 2006-01-05T15:50:29-00:00