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

Home » Public Forums » archive » Re: Unable to open HDF in IDL
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: Unable to open HDF in IDL [message #35969] Tue, 05 August 2003 16:29 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Roy writes:

>>> % Compiled module: $MAIN$.
>>> % Compiled module: HDF.
>>> % Loaded DLM: HDF.
>>>
>>> IDL stops at the end line.
>>>
>>> I have checked out my HDF file and it appears to be fine
>>>
>>> Does anyone have any suggestions as to why this is happening?

This whole business of "Compiled module: $MAIN is suspicious.

Are you sure you don't have another END statement in that
file? I think you are running an empty main program rather
than the program you *think* you are running. :-)

Try just compiling the HDF file by itself:

IDL> .compile HDF

If you don't get an "Compiled module: $MAIN" nonsense,
then just run the HDF file itself:

IDL> HDF

I suspect that will work.

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Unable to open HDF in IDL [message #35970 is a reply to message #35969] Tue, 05 August 2003 16:17 Go to previous messageGo to next message
sjarn1 is currently offline  sjarn1
Messages: 3
Registered: August 2003
Junior Member
"Liam Gumley" <Liam.Gumley@ssec.wisc.edu> wrote in message news:<bgoe53$nqb$1@news.doit.wisc.edu>...
> "Roy" <sjarn1@student.monash.edu.au> wrote in message
> news:7a599348.0308042335.51c08575@posting.google.com...
>> Hello,
>>
>> I am using IDL 5.4 on linux. I was able to open my HDF files without
>> any problems using the following program:
>>
>> PRO hdf,geo,rain
>>
>> file = hdf_sd_start('2A25.971231.535.5.HDF')
>> indexa = hdf_sd_nametoindex(file, 'geolocation')
>> indexb = hdf_sd_nametoindex(file, 'nearSurfRain')
>> varida = hdf_sd_select(file, indexa)
>> varidb = hdf_sd_select(file, indexb)
>> hdf_sd_getdata, varida, geo
>> hdf_sd_getdata, varidb, rain
>> hdf_sd_endaccess, varida
>> hdf_sd_endaccess, varidb
>> hdf_sd_end, file
>>
>> return
>> end
>>
>> However, I have now moved to a new computer attached to the same
>> servers and now I cannot get past:
>>
>> % Compiled module: $MAIN$.
>> % Compiled module: HDF.
>> % Loaded DLM: HDF.
>>
>> IDL stops at the end line.
>>
>> I have checked out my HDF file and it appears to be fine
>>
>> Does anyone have any suggestions as to why this is happening?
>
> What is the "end line"?
> Can you post the full IDL output from the computer where the program fails?
> Have you tried reading just one SDS?
>
> The "return" statement in your program is not required by the way.
>
> Cheers,
> Liam.
> Practical IDL Programming
> http://www.gumley.com/


By "end line" I meant "% Loaded DLM: HDF."

There is no further output from IDL. But rather than returning me to
the IDL prompt, it just stays at that line.

If I enter each line individually, the problem occurs at the line:

file = hdf_sd_start('filexxx.HDF')

This happens regardless of the HDF file I use, although they all
previously opened on a different machine.
Any further ideas?

Thanks
Re: Unable to open HDF in IDL [message #35979 is a reply to message #35970] Tue, 05 August 2003 07:14 Go to previous messageGo to next message
Liam E. Gumley is currently offline  Liam E. Gumley
Messages: 378
Registered: January 2000
Senior Member
"Roy" <sjarn1@student.monash.edu.au> wrote in message
news:7a599348.0308042335.51c08575@posting.google.com...
> Hello,
>
> I am using IDL 5.4 on linux. I was able to open my HDF files without
> any problems using the following program:
>
> PRO hdf,geo,rain
>
> file = hdf_sd_start('2A25.971231.535.5.HDF')
> indexa = hdf_sd_nametoindex(file, 'geolocation')
> indexb = hdf_sd_nametoindex(file, 'nearSurfRain')
> varida = hdf_sd_select(file, indexa)
> varidb = hdf_sd_select(file, indexb)
> hdf_sd_getdata, varida, geo
> hdf_sd_getdata, varidb, rain
> hdf_sd_endaccess, varida
> hdf_sd_endaccess, varidb
> hdf_sd_end, file
>
> return
> end
>
> However, I have now moved to a new computer attached to the same
> servers and now I cannot get past:
>
> % Compiled module: $MAIN$.
> % Compiled module: HDF.
> % Loaded DLM: HDF.
>
> IDL stops at the end line.
>
> I have checked out my HDF file and it appears to be fine
>
> Does anyone have any suggestions as to why this is happening?

What is the "end line"?
Can you post the full IDL output from the computer where the program fails?
Have you tried reading just one SDS?

The "return" statement in your program is not required by the way.

Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/
Re: Unable to open HDF in IDL [message #36059 is a reply to message #35969] Wed, 06 August 2003 17:48 Go to previous message
sjarn1 is currently offline  sjarn1
Messages: 3
Registered: August 2003
Junior Member
Hi All,

The problem appearred to be an incompatibility issue with Red Hat 9
and opening HDF in IDL 5.4. The files/scripts all work fine on
machines running older versions of Red Hat

avid Fanning <david@dfanning.com> wrote in message news:<MPG.1999ebdcafcdf45f9896cc@news.frii.com>...
> Roy writes:
>
>>>> % Compiled module: $MAIN$.
>>>> % Compiled module: HDF.
>>>> % Loaded DLM: HDF.
>>>>
>>>> IDL stops at the end line.
>>>>
>>>> I have checked out my HDF file and it appears to be fine
>>>>
>>>> Does anyone have any suggestions as to why this is happening?
>
> This whole business of "Compiled module: $MAIN is suspicious.
>
> Are you sure you don't have another END statement in that
> file? I think you are running an empty main program rather
> than the program you *think* you are running. :-)
>
> Try just compiling the HDF file by itself:
>
> IDL> .compile HDF
>
> If you don't get an "Compiled module: $MAIN" nonsense,
> then just run the HDF file itself:
>
> IDL> HDF
>
> I suspect that will work.
>
> Cheers,
>
> David
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: 32bit to 64bit conversion
Next Topic: Image display

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

Current Time: Wed Oct 08 15:13:26 PDT 2025

Total time taken to generate the page: 0.00683 seconds