IDL startup files

161 views
Skip to first unread message

Gallagher James

unread,
Feb 15, 2011, 7:34:15 PM2/15/11
to Ned Gardiner, support@opendap.org support
Ned,

Can you tell me how to write a startup file that IDL will use by default? If there's no such beast, because you have to use some preference thing in the GUI version, then can you tell me what most IDL users will feel comfortable with?

I think I'm close, although you'll see my email to IDL support - they've cleverly bundled an old version of a dependency with IDL and that's causing some issues. It might not be the only problem though....

James
--
James Gallagher
jgallagher at opendap.org
406.723.8663

Ned Gardiner

unread,
Feb 15, 2011, 7:43:07 PM2/15/11
to Gallagher James, support@opendap.org support
James,

You can write a file with any extension and pass it as an argument to idl from the command line. For example, I have a processing file ("process.bat") that looks like this:
-bash-3.2$ cat process.bat
.reset_session
!path = expand_path('+/home/ned/data/idl') + ';' + !path
j_ncep2image, basedir = '/mnt/ft2/clouds/2011/002/'
j_combine_ncep_4km, indir='/mnt/ft2/clouds/2011/002/tiff_04km/', file_spec='*.tif', outdir='/mnt/ft2/clouds/2011/002/filled_04km/', startfile='/mnt/ft2/clouds/2011/001/tiff_04km/ncepIR04km_201101012330.tif'
j_apian, basedir='/mnt/ft2/clouds/2011/002/'
exit

If idl is in your PATH, you can issue a comman such as
$ idl process.bat
to run such a script with the side effect of setting whatever global variables you want then issuing a sequence of commands before exiting idl.

Regarding your earlier question, I use the default environment that IDL 8 imposes on me when I fire up IDL from the finder. I have never messed with an environment.plist file at all. I have, however, been using IDL in 32-bit mode by running it from the command line with
$ idlde -32
This allows me to read GRIB files using a third party script.

However, I don't believe I was in 32-bit mode when I ran into this problem with OPeNDAP.

Thanks,
Ned

Gallagher James

unread,
Feb 15, 2011, 7:57:41 PM2/15/11
to Ned Gardiner, support@opendap.org support
SUCCESS!

IDL Version 8.0.1, Mac OS X (darwin x86_64 m64). (c) 2010, ITT Visual Information Solutions
Installation number: 230982.
Licensed for personal use by James Gallagher only.
All other use is strictly prohibited.

IDL> !path = expand_path("+/usr/local/share/idl" + ":" + !path)
IDL> stat = OPENDAP_GET(url, data)
% Compiled module: OPENDAP_GET.
% Compiled module: OPENDAP_GET_DATA.
% Loaded DLM: OPENDAP.
% Compiled module: OPENDAP_HANDLE_NODE.
% Compiled module: OPENDAP_FIX_NAME.
% Compiled module: OPENDAP_HANDLE_CONTENT.
IDL> help, /str, data
** Structure <36732b28>, 5 tags, length=23216, data length=23208, refs=1:
   U               STRUCT    -> <Anonymous> Array[1]
   V               STRUCT    -> <Anonymous> Array[1]
   LAT             STRUCT    -> <Anonymous> Array[1]
   LON             STRUCT    -> <Anonymous> Array[1]
   TIME            STRUCT    -> <Anonymous> Array[1]
IDL> help, /str, data.u
** Structure <3672c278>, 2 tags, length=11472, data length=11472, refs=2:
   U               INT       Array[21, 17, 16]
   DIMENSION_NAMES STRING    Array[3]
IDL> 

What I did:
0. I fixed some issues in the idl-client-3.6.1 source code (so that I got a .so and not a .dylib)
1. I built and installed Ocapi and the idl-client using the default prefix
2. I copied (ugh) the libidl_opendap.so and .dlm into /Applications/itt/idl/idl80/bin/bin.darwin.x86_64/
3. I took the libcurl files in that directory and I renamed then with the extension '.never' so the dyld linking loader won't find them.
4. I ran the commands you see above.

So, I'll wait to here from IDL about the library conflict. Clearly, removing the libs that come with IDL is not a good plan, so we'll see. My guess is that this will take me another two days - I have some fires going that will need attention tomorrow - but I can see a way around most of the issues (build binaries on 10.5; fix the makefile.am and issue a patch/release; modify the README & INSTALL so they make sense and include the bit about a startup file).

Thanks for bringing this up - I think you're the first 8.0 user.

James
Reply all
Reply to author
Forward
0 new messages