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

Home » Public Forums » archive » Re: How can I know all the information of a CDF file?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How can I know all the information of a CDF file? [message #66149 is a reply to message #66146] Thu, 16 April 2009 11:56 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
litongmu@gmail.com writes:

> I am not sure whether there is anyone who is working on CDF files. But
> if there is, I want to ask how you get the variable information, like
> the variable name. I know how to do that in Matlab. But as to
> manipulating CDF files, Matlab is not as powerful as IDL. So I want to
> switch to IDL. But I do not want to use them both. Because one of my
> machine do not have a Matlab license. So please tell me if you know
> the answer.

I've not done this, but I think you would do
it something like this:

PRO CDFVARNAME
fID = CDF_Open(filename)
info = CDF_Inquire(fID)
nvars = info.nvars
FOR j=0,nvars-1 DO BEGIN
varInfo = CDF_VarInq(fID, j)
Help, varInfo, /Structure
Print, 'Variable Name: ', varInfo.name
ENDFOR
CDF_Close, fID
END

Cheers,

David
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: bug or feature?
Next Topic: Reading in data question

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

Current Time: Sat Oct 11 14:37:19 PDT 2025

Total time taken to generate the page: 1.35838 seconds