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

Home » Public Forums » archive » Re: Read_grib under IDL 7.0
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: Read_grib under IDL 7.0 [message #63335] Wed, 05 November 2008 18:01 Go to next message
Andrew Cool is currently offline  Andrew Cool
Messages: 219
Registered: January 1996
Senior Member
On Nov 5, 2:12 pm, ray.laymon...@gmail.com wrote:
> All,
>
> Solution should be easy but I couldn't figure out and couldn't find
> the solution in the user forum. I would appreciate any help.
>
> I have been using the read_grib.pro scripts of  Andy Pursch (over
> ittvis user community downloads). For the past year I didn't have
> problem running it under IDL 6.3. Since the read_grib package contains
> 5 scripts, I have been compiling each script via "resolve_routine"
> commend before calling "read_grib.pro" in my scripts.
>
> So far, I didn't have any problem, but when I tried to run the same
> script under IDL7.0 I had an error saying
>
> Stat = IDL_GRIB(file, Count = LCount)
>                              ^
> % Syntax error.
>   At: /home/usr/bin/read_grib.pro, Line 612
>
>     Stat = IDL_GRIB(File, Image, Dump = GetRecords[I], $
>                                        ^
> % Syntax error.
>   At: /home/usr/bin/read_grib.pro, Line 631
> % Compiled module: READ_GRIB.
> % Attempt to call undefined procedure/function: 'READ_GRIB'.
> % Execution halted at: $MAIN$             96 /home/usr/bin/
> read_the_grib_file.pro
>
> And when I run the same script under IDL 6.3, (without editing a dot),
> it runs without any problem.
> Could anyone possibly help me what would be the reason?
>
> Cheers,
> Ray

You do remember that there are DLL and DLM files that need to be
copied into the appropriate
folders, e.g. C:\RSI\IDL63\bin\bin.x86 on a WIndows box?

That's why the READ_GRIB function is failing - it can't find the DLL/
DLM files.

Check out the Help that comes in the IDL_GRIB zip file.


Andrew
Re: Read_grib under IDL 7.0 [message #63349 is a reply to message #63335] Wed, 05 November 2008 04:57 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
ray.laymon064@gmail.com writes:

> I have been using the read_grib.pro scripts of Andy Pursch (over
> ittvis user community downloads). For the past year I didn't have
> problem running it under IDL 6.3. Since the read_grib package contains
> 5 scripts, I have been compiling each script via "resolve_routine"
> commend before calling "read_grib.pro" in my scripts.

Oh, dear. It always amazes me what contortions people
go through to run IDL programs. Believe me when I say
running RESOLVE_ROUTINE is *never* necessary. (At least
I've never used it in 20+ years of IDL programming.)

> So far, I didn't have any problem, but when I tried to run the same
> script under IDL7.0 I had an error saying
>
>
> Stat = IDL_GRIB(file, Count = LCount)
> ^
> % Syntax error.
> At: /home/usr/bin/read_grib.pro, Line 612
>
> Stat = IDL_GRIB(File, Image, Dump = GetRecords[I], $
> ^
> % Syntax error.
> At: /home/usr/bin/read_grib.pro, Line 631
> % Compiled module: READ_GRIB.
> % Attempt to call undefined procedure/function: 'READ_GRIB'.
> % Execution halted at: $MAIN$ 96 /home/usr/bin/
> read_the_grib_file.pro
>
>
> And when I run the same script under IDL 6.3, (without editing a dot),
> it runs without any problem.
> Could anyone possibly help me what would be the reason?

This is simply an IDL path problem. Here is what to do.
Right click on all of your IDL projects under IDL 7
and under Properties -> IDL Project Properties turn off
the button that offers to "Update IDL path when project
is opened or closed".

When you have gotten IDL out of the business of thinking
for you, find the Preferences button and go to IDL Preferences->
Paths and start to enter the directories where you keep your
IDL files. These could be files in your projects, or just IDL
files (such as the READ_GRIB) files that you just want to have
available to you.

That's it. That's all you have to do. All of those programs
should now be found without having to do one more single thing!
(Sometimes you have to rearrange the directories in your path,
if you have files with the same name, etc. But rearranging
your path to put your directories before IDL's is about
all I've ever found necessary.)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Read_grib under IDL 7.0 [message #63350 is a reply to message #63349] Wed, 05 November 2008 00:47 Go to previous messageGo to next message
prm is currently offline  prm
Messages: 2
Registered: November 2008
Junior Member
Hello, Ray

In short, your problem seems that IDL does not find the correct file.
You are not alone!

As far as I know (for I am a newbie and I have only used IDL from
version 7.0) path management is radically different - at least inside
Eclipse. For this reason I use a simple procedure in each project to
cd into the project directory and to ensure that the current path is
where I know it is. I then reference each file to compile relative to
this known location.

I hope this helps...

Pablo Rodríguez


On 5 nov, 05:12, ray.laymon...@gmail.com wrote:
> All,
>
> Solution should be easy but I couldn't figure out and couldn't find
> the solution in the user forum. I would appreciate any help.
>
> I have been using the read_grib.pro scripts of  Andy Pursch (over
> ittvis user community downloads). For the past year I didn't have
> problem running it under IDL 6.3. Since the read_grib package contains
> 5 scripts, I have been compiling each script via "resolve_routine"
> commend before calling "read_grib.pro" in my scripts.
>
> So far, I didn't have any problem, but when I tried to run the same
> script under IDL7.0 I had an error saying
>
> Stat = IDL_GRIB(file, Count = LCount)
>                              ^
> % Syntax error.
>   At: /home/usr/bin/read_grib.pro, Line 612
>
>     Stat = IDL_GRIB(File, Image, Dump = GetRecords[I], $
>                                        ^
> % Syntax error.
>   At: /home/usr/bin/read_grib.pro, Line 631
> % Compiled module: READ_GRIB.
> % Attempt to call undefined procedure/function: 'READ_GRIB'.
> % Execution halted at: $MAIN$             96 /home/usr/bin/
> read_the_grib_file.pro
>
> And when I run the same script under IDL 6.3, (without editing a dot),
> it runs without any problem.
> Could anyone possibly help me what would be the reason?
>
> Cheers,
> Ray
Re: Read_grib under IDL 7.0 [message #63420 is a reply to message #63335] Thu, 06 November 2008 08:41 Go to previous message
ray.laymon064 is currently offline  ray.laymon064
Messages: 8
Registered: July 2008
Junior Member
On Nov 5, 9:01 pm, Andrew Cool <andrew.c...@dsto.defence.gov.au>
wrote:
> On Nov 5, 2:12 pm, ray.laymon...@gmail.com wrote:
>
>
>
>> All,
>
>> Solution should be easy but I couldn't figure out and couldn't find
>> the solution in the user forum. I would appreciate any help.
>
>> I have been using the read_grib.pro scripts of Andy Pursch (over
>> ittvis user community downloads). For the past year I didn't have
>> problem running it under IDL 6.3. Since the read_grib package contains
>> 5 scripts, I have been compiling each script via "resolve_routine"
>> commend before calling "read_grib.pro" in my scripts.
>
>> So far, I didn't have any problem, but when I tried to run the same
>> script under IDL7.0 I had an error saying
>
>> Stat = IDL_GRIB(file, Count = LCount)
>> ^
>> % Syntax error.
>> At: /home/usr/bin/read_grib.pro, Line 612
>
>> Stat = IDL_GRIB(File, Image, Dump = GetRecords[I], $
>> ^
>> % Syntax error.
>> At: /home/usr/bin/read_grib.pro, Line 631
>> % Compiled module: READ_GRIB.
>> % Attempt to call undefined procedure/function: 'READ_GRIB'.
>> % Execution halted at: $MAIN$ 96 /home/usr/bin/
>> read_the_grib_file.pro
>
>> And when I run the same script under IDL 6.3, (without editing a dot),
>> it runs without any problem.
>> Could anyone possibly help me what would be the reason?
>
>> Cheers,
>> Ray
>
> You do remember that there are DLL and DLM files that need to be
> copied into the appropriate
> folders, e.g. C:\RSI\IDL63\bin\bin.x86 on a WIndows box?
>
> That's why the READ_GRIB function is failing - it can't find the DLL/
> DLM files.
>
> Check out the Help that comes in the IDL_GRIB zip file.
>
> Andrew

Yes, I did copy the idl_grib.dlm and idl_grib.so files
under /usr/local/itt/idl/bin/bin.linux.x86 (running under linux)..
at first I also thought about these two files, but still didn't work.

One thing I learned is I really didn't need the resolve_routine
commend (thx David).

Actually I also copied all necessary grib scripts under the working
directory.
Library path looks fine. I copied the necessary .dlm & .so files.. I
don't
understand why I can read the files under v6.3 but still not under
v7.0..
Thanks all,
Ray
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: CVS Project Downgrade
Next Topic: How to sum matrices of "fits" images in IDL?

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

Current Time: Wed Oct 08 15:18:03 PDT 2025

Total time taken to generate the page: 0.01218 seconds