Groups | Search | Server Info | Login | Register
| Newsgroups | comp.lang.idl |
|---|---|
| Date | 2017-10-31 11:23 -0700 |
| References | <621b4dd3-e5ac-4ef8-807d-26ea2dbd5c10@googlegroups.com> <c3dc2242-c346-459f-9b30-474d1d4f00d2@googlegroups.com> <2c1c5776-87a1-4554-a9fc-4e15fa2cb28d@googlegroups.com> |
| Message-ID | <78b63d62-77d8-43eb-b00f-5fb34c009f30@googlegroups.com> (permalink) |
| Subject | Re: IDL not recognizing procedure in expanded path |
| From | nelson.kevin09@gmail.com |
On Tuesday, October 31, 2017 at 12:28:30 PM UTC-5, nelson....@gmail.com wrote:
> On Wednesday, October 25, 2017 at 9:12:55 AM UTC-5, benjamin....@gmail.com wrote:
> > On Friday, October 20, 2017 at 11:46:25 AM UTC-6, nelson....@gmail.com wrote:
> > > Hello,
> > >
> > > I have a problem on my hands I haven't been able to find a solution for. Here are the basics:
> > >
> > > I'm creating a centralized library for my research group of IDL procedures and routines that we can call to avoid re-inventing the wheel and not have to include the @procedure_path statements at the beginning of out programs.
> > >
> > > I was able to get IDL to recognize the path to all of the routines in the centralized library by following David Fanning's page (http://www.idlcoyote.com/code_tips/installcoyote.php). When I use IDL's PrintPath function, it returns the correct path to the directory:
> > >
> > > IDL> PrintPath
> > > ...
> > > /cloud/code_ro/lib/idl/io_lib/gps_io
> > > ...
> > >
> > > The full file path is then: /cloud/code_ro/lib/idl/io_lib/gps_io/get_ncdf_atmPrf_ucar_cosmic2013.pro
> > >
> > > IDL>
> > >
> > > I have a program I wrote just to test why these particular routines won't automatically compile and run inside the main program as well by giving it a file path and then calling the routine, which amounts to:
> > >
> > > file_name = foo (this is super long with the whole path)
> > > get_ncdf_atmPrf_ucar_cosmic2013, foo, ...
> > > END
> > >
> > > The result I get when I run this is:
> > >
> > > IDL> .run test.pro
> > > % Compiled module: $MAIN$.
> > > % Attempt to call undefined procedure: 'GET_NCDF_ATMPRF_UCAR_COSMIC2013'.
> > > % Execution halted at: $MAIN$ 4 /home/knelson12/test.pro
> > > IDL>
> > >
> > > However, I can run the following, and it recognizes the routine just fine:
> > >
> > > IDL> .compile get_ncdf_atmPrf_ucar_cosmic2013
> > > % Compiled module: GET_NCDF_ATMPRF_UCAR_COSMIC2013.
> > > IDL>
> > >
> > > Does anyone have any thoughts on this? Thank you in advance.
> > >
> > > - Kevin
> >
> > Hi Kevin,
> >
> > First, the PrintPath.pro procedure is not a first-party program that comes with IDL, so I can't comment on that.
> >
> > The error you are getting still suggests the path is not being recognized. Try using "!PATH" at the IDL command line or console. Does this show the directory containing GET_NCDF_ATMPRF_UCAR_COSMIC2013.pro ?
> >
> > This is the correct way to modify IDL Paths:
> > !PATH = EXPAND_PATH('<IDL_DEFAULT>:+/home/joeuser/myidllib')
> >
> > NOTE: Use the "+" sign to include all subdirectories.
> >
> > Here is more information: http://www.harrisgeospatial.com/Support/SelfHelpTools/HelpArticles/HelpArticles-Detail/TabId/2718/ArtMID/10220/ArticleID/16156/Quick-tips-for-customizing-your-IDL-program-search-path.aspx
> >
> > Hope this helps.
> >
> > Ben C
> > IDL Team
> > Harris Geospatial Solutions
> > Boulder, Colorado
>
> Hi Ben,
>
> Thank you for replying to the group. It's good to know that Harris is helping out since they took over.
>
> In regard to the first point, I didn't realize that PrintPath wasn't native. I looked it up and it's part of the Coyote Library.
>
> When I use '!PATH', the path to the routines in question is given: ":/cloud/code_ro/lib/idl/io_lib/gps_io:" with the other directories I've added (that work fine from what I can tell) and there are no subdirectories in this location. All of the files in this directory (and the working ones) are -rw-r--r-- (644) permissions.
>
> My current setup is a command in my .tcshrc file as follows:
> setenv IDL_STARTUP /cloud/code_ro/lib/idl/xielab_idl_startup.pro
>
> This startup file is copied here, since I can't attach it. It follows the directions provided by David Fanning (http://www.idlcoyote.com/code_tips/installcoyote.php#UNIX_INSTALL):
> !PATH = EXPAND_PATH('+/cloud/code_ro/lib/idl/coyote/') + ':' + $
> EXPAND_PATH('+/cloud/code_ro/lib/idl/catalyst/') + ':' + $
> EXPAND_PATH('+/cloud/code_ro/lib/idl/io_lib/ncdf_hdf/') + ':' + $
> EXPAND_PATH('+/cloud/code_ro/lib/idl/atmos_phys/') + ':' + $
> EXPAND_PATH('+/cloud/code_ro/lib/idl/idl_xie/') + ':' + $
> EXPAND_PATH('+/cloud/code_ro/lib/idl/motley/') + ':' + $
> EXPAND_PATH('+/cloud/code_ro/lib/idl/plt/') + ':' + $
> EXPAND_PATH('+/cloud/code_ro/lib/idl/math/') + ':' + $
> EXPAND_PATH('+/cloud/code_ro/lib/idl/helpful_routines/') + ':' + $
> EXPAND_PATH('+/cloud/code_ro/lib/idl/jhop_phys/') + ':' + $
> EXPAND_PATH('+/cloud/code_ro/lib/idl/collocation/') + ':' + $
> EXPAND_PATH('+/cloud/code_ro/lib/idl/geophysics/') + ':' + $
> EXPAND_PATH('+/cloud/code_ro/lib/idl/graphtools/') + ':' + $
> EXPAND_PATH('+/cloud/code_ro/lib/idl/gridding/nbyn_grid/') + ':' + $
> EXPAND_PATH('+/cloud/code_ro/lib/idl/gridding/' + $
> 'equal_area_grid_ISCCP/') + ':' + $
> EXPAND_PATH('+/cloud/code_ro/lib/idl/idlusr/') + ':' + $
> EXPAND_PATH('+/cloud/code_ro/lib/idl/integration/') + ':' + $
> EXPAND_PATH('+/cloud/code_ro/lib/idl/interpolation/') + ':' + $
> EXPAND_PATH('+/cloud/code_ro/lib/idl/io_lib/') + ':' + $
> EXPAND_PATH('+/cloud/code_ro/lib/idl/pblh_clim/') + ':' + $
> EXPAND_PATH('+/cloud/code_ro/lib/idl/satimg/') + ':' + $
> EXPAND_PATH('+/cloud/code_ro/lib/idl/scripts/') + ':' + $
> EXPAND_PATH('+/cloud/code_ro/lib/idl/terrain/') + ':' + $
> EXPAND_PATH('+/cloud/code_ro/lib/idl/time_conversion/') + ':' + $
> EXPAND_PATH('+/cloud/code_ro/lib/idl/utilities/') + ':' + $
> EXPAND_PATH('+/cloud/code_ro/lib/idl/hurricanes_hbl/') + ':' + $
> !PATH
>
> In the meantime, I will add the IDL_DEFAULT portion and see if that changes anything.
>
> Thank you for your help.
>
> - Kevin
I tested adding the <IDL_DEFAULT>: to the EXPAND_PATH commands as well, and it did not change the result.
- Kevin
Back to comp.lang.idl | Previous | Next — Previous in thread | Find similar
IDL not recognizing procedure in expanded path nelson.kevin09@gmail.com - 2017-10-20 10:46 -0700
Re: IDL not recognizing procedure in expanded path benjamin.castellani@gmail.com - 2017-10-25 07:12 -0700
Re: IDL not recognizing procedure in expanded path nelson.kevin09@gmail.com - 2017-10-31 10:28 -0700
Re: IDL not recognizing procedure in expanded path nelson.kevin09@gmail.com - 2017-10-31 11:23 -0700
csiph-web