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

Home » Public Forums » archive » Funny thing - HDF_DFSD_GETINFO
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
Funny thing - HDF_DFSD_GETINFO [message #8558] Thu, 03 April 1997 00:00 Go to next message
David.Adair is currently offline  David.Adair
Messages: 1
Registered: April 1997
Junior Member
Hello All,

We've run into a very odd thing happening and I want to pass it by you to see
if you can explain it. I have simplified the program to display only the error
we are getting.

Here is the code....

pro test
on_error,2

cd, current=current

file = pickfile(title='Select HDF file', filter = '*.hdf',
path=current)
print, file
help, file

HDF_DFSD_GETINFO, file, dims=dims
; HDF_DFSD_GETINFO, file <---THIS WORKS

end

The progam works fine the first time you run but subsequent runs cause an
error that reads.....

IDL> test
D:\users\n3amask.hdf
FILE STRING = 'D:\users\n3amask.hdf'
% HDF_DFSD_GETINFO: Could not read dimensions from file: FILE
% Error occurred at: TEST 13 D:\its\idl_pro\test.pro
% $MAIN$
% Execution halted at: $MAIN$

It seems to be trying to read from a file called "FILE" rather than from the
filename pointed to by the variable FILE.

Another thing is the if you take the DIMS keyword off, as is shown in the
commented line below it works fine.

We've recreated this on both an NT machine and our Sun.

I've attached an HDF file in case you don't have any lying around.

Any ideas as to what going on???
Thanks in advance.
DAVE
Re: Funny thing - HDF_DFSD_GETINFO [message #8697 is a reply to message #8558] Sat, 05 April 1997 00:00 Go to previous message
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
David Adair wrote:
[stuff deleted]
> HDF_DFSD_GETINFO, file, dims=dims
> ; HDF_DFSD_GETINFO, file <---THIS WORKS
>
> The progam works fine the first time you run but subsequent runs cause an
> error that reads.....
>
> IDL> test
> D:\users\n3amask.hdf
> FILE STRING = 'D:\users\n3amask.hdf'
> % HDF_DFSD_GETINFO: Could not read dimensions from file: FILE
> % Error occurred at: TEST 13 D:\its\idl_pro\test.pro
> % $MAIN$
> % Execution halted at: $MAIN$
>
> It seems to be trying to read from a file called "FILE" rather than from the
> filename pointed to by the variable FILE.

I'll give you some hints.

(1) Make sure you are using IDL 4.0.1b - earlier versions had bugs in
the HDF library.

(2) Unless you absolutely *have* to, don't use the HDF_DFSD interface.
It is obsolete, and very difficult to use. The HDF_SD interface is
current, somewhat easier to use, and more reliable.

(3) Check out David Fanning's HDF information at
http://www.dfanning.com/tips/hdf_documentation.html

(4) Check out my resources for doing HDF in IDL at
http://cimss.ssec.wisc.edu/~gumley/sds_read.html
http://cimss.ssec.wisc.edu/~gumley/idltips.html

Cheers,
Liam.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Memory needed for IDL/Linux?
Next Topic: Anybody know the filename variable?

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

Current Time: Wed Oct 08 19:13:00 PDT 2025

Total time taken to generate the page: 0.00607 seconds