comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: HDF attribute extract
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: HDF attribute extract [message #46798] Thu, 05 January 2006 07:24 Go to next message
Liberum is currently offline  Liberum
Messages: 48
Registered: September 2005
Member
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
Re: HDF attribute extract [message #46799 is a reply to message #46798] Thu, 05 January 2006 06:58 Go to previous messageGo to next message
peter.albert@gmx.de is currently offline  peter.albert@gmx.de
Messages: 108
Registered: July 2005
Senior Member
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
Re: HDF attribute extract [message #46897 is a reply to message #46799] Thu, 05 January 2006 07:50 Go to previous message
Liberum is currently offline  Liberum
Messages: 48
Registered: September 2005
Member
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.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: HDF attribute extract
Next Topic: JOB: IDL Developer - Boulder, CO

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:17:37 PDT 2025

Total time taken to generate the page: 0.04054 seconds