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

Home » Public Forums » archive » CDF question
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: CDF question [message #14933 is a reply to message #5405] Mon, 12 April 1999 00:00 Go to previous messageGo to previous message
Harald Frey is currently offline  Harald Frey
Messages: 41
Registered: March 1997
Member
Harald Frey wrote:

> I started working with CDF files and encountered two problems/questions.
>
> 1.
> IDL> id=cdf_open('WIC')
> IDL> cdf_control,id,variable='epoch',get_var_info=info
> % CDF_CONTROL: Must specify a variable via VARIABLE keyword.
> % Execution halted at: READ_THE_WIC_CDF 26 read_the_wic_cdf.pro
> % $MAIN$
>
> I think I have specified a variable 'epoch'?
>
> 2. I have several variables in a CDF record of different size (2D
> arrays, single numbers etc.). The procedure CDF_VARGET requires keywords
> interval and offset. How do I specify these vectors in a universal
> manner?
>
> I would very much appreciate getting an example program.
>
> Harald Frey
> Space Sciences Laboratory
> UC Berkeley
>
> hfrey@ssl.berkeley.edu

I found at least the solution for the first problem. In some way IDL is
sensitive to upper/lower case
statements in that case. I have a variable in the cdf-file 'EPOCH'.

IDL> print,!version
{ sparc sunos unix 5.1 Apr 13 1998}
IDL> id=cdf_open('WIC')
IDL> result2=cdf_varinq(id,1)
IDL> print,result2.name
EPOCH
IDL> var=result2.name
IDL> cdf_control,id,variable=var,get_var_info=info
IDL> help,info,/struc
** Structure <83850>, 7 tags, length=28, refs=1:
EXTENDRECS LONG 0
MAXALLOCREC LONG 3
MAXREC LONG 3
MAXRECS LONG 3
NINDEXENTRIES LONG 2
NINDEXRECORDS LONG 1
PADVALUE INT 0

Everything works in this case. However, if I specify the variable var in
lower
case letters, then I get this stupid and misleading error message.

IDL> var='epoch'
IDL> cdf_control,id,variable=var,get_var_info=info
% CDF_CONTROL: Must specify a variable via VARIABLE keyword.
% Execution halted at: $MAIN$

I don't fully understand this behaviour. Maybe it's UNIX related? But
cdf-files
should be platform compatible. However, I found my way around it and don't
care
much more.

Harald
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: spline_p help
Next Topic: CW_PDMENU, changing

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

Current Time: Wed Oct 08 19:34:37 PDT 2025

Total time taken to generate the page: 0.00524 seconds