# Trouble getting IDL to "see" coda

**URL:** https://forum.atmospherictoolbox.org/t/trouble-getting-idl-to-see-coda/646
**Category:** CODA
**Tags:** idl
**Created:** [May 10, 2023, 8:14am UTC](https://forum.atmospherictoolbox.org/t/trouble-getting-idl-to-see-coda/646 "2023-05-10T08:14:41Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![mariliza](https://forum.atmospherictoolbox.org/letter_avatar_proxy/v4/letter/m/c77e96/32.png) [@mariliza](https://forum.atmospherictoolbox.org/u/mariliza)
#### Post date: [May 10, 2023, 8:14am UTC](https://forum.atmospherictoolbox.org/t/trouble-getting-idl-to-see-coda/646/1 "2023-05-10T08:14:41Z")

</div>

Good morning Sander,

The question relates to a linux machine with the latest harp 1.17 installed, both for use at the command line as well as via IDL/python.

I wish to use coda\_open() from an IDL script, which is running fine so far with harp\_import() for e.g… However, I cannot convince IDL that coda is also installed. In my .bashrc file, I had the following so far.

export IDL\_PATH=‘\<IDL\_DEFAULT\>:’/usr/local/exelis/idl84/  
export CODA\_DEFINITION=/usr/local/share/coda/definitions/  
export IDL\_DLM\_PATH=‘\<IDL\_DEFAULT\>:’/usr/local/lib/harp/idl  
export IDL\_STARTUP=~/idl/idlstartup.pro  
export UDUNITS2\_XML\_PATH=/usr/local/share/harp/udunits2.xml

If I also add coda to the IDL\_DLM\_PATH, as suggested in the coda installation, for e.g.

export IDL\_DLM\_PATH=‘\<IDL\_DEFAULT\>:’/usr/local/lib/coda/idl:/usr/local/lib/harp/idl

I still get a % Variable is undefined: CODA\_OPEN error.

Our sys admin cannot think of anything else to try.

Any ideas?

Many thanks,  
MariLiza

---

<div class="post-metadata">

### Author: ![sander.niemeijer](https://forum.atmospherictoolbox.org/user_avatar/forum.atmospherictoolbox.org/sander.niemeijer/32/5_2.png) [@sander.niemeijer](https://forum.atmospherictoolbox.org/u/sander.niemeijer)
#### Post date: [May 10, 2023, 12:11pm UTC](https://forum.atmospherictoolbox.org/t/trouble-getting-idl-to-see-coda/646/2 "2023-05-10T12:11:15Z")

</div>

This looks ok.

Some things to check:

- did you actually configure+build+install coda with `--enable-idl`? Do you actually have files present in `/usr/local/lib/coda/idl`
- what is the content of your `~/idl/idlstartup.pro`? Does it perhaps modify dlm paths as well?

---

<div class="post-metadata">

### Author: ![mariliza](https://forum.atmospherictoolbox.org/letter_avatar_proxy/v4/letter/m/c77e96/32.png) [@mariliza](https://forum.atmospherictoolbox.org/u/mariliza)
#### Post date: [May 10, 2023, 12:17pm UTC](https://forum.atmospherictoolbox.org/t/trouble-getting-idl-to-see-coda/646/3 "2023-05-10T12:17:26Z")

</div>

> [@sander.niemeijer](#):
>
> /usr/local/lib/coda/idl

Hi Sander,

Thanks for getting back to me.

Yes, I confirmed with the sys admin, he did use --enable-idl when configure+build+install coda

Yes, there are files in /usr/local/lib/coda/idl, however there appear to be duplicates from a previous installation:

(base) ls -ltr /usr/local/lib/coda/idl  
total 4296  
-rw-r–r–. 1 root root 1241 Mar 26 2018 coda-idl.dlm  
-rwxr-xr-x. 1 root root 4251136 Mar 26 2018 coda-idl.so  
-rwxr-xr-x. 1 root root 965 Mar 26 2018 coda-idl.la  
-rw-r–r–. 1 root root 1241 May 8 19:12 coda\_idl.dlm  
-rwxr-xr-x. 1 root root 129872 May 8 19:12 coda\_idl.so  
-rwxr-xr-x. 1 root root 988 May 8 19:12 coda\_idl.la

I am guessing that the older, 2018, files should not be there, right? there is a change from hyphen to underscore in the file names I see.

Finally, ~/idl/idlstartup.pro just contains a few directories with IDL subroutines so I don’t call them all the time, i.e.

(base) more idlstartup.pro  
!PATH = Expand\_Path(‘+/usr/local/exelis/idl84/lib/coyote’) + ‘:’ + !PATH  
!PATH = Expand\_Path(‘+/home/mariliza/TROPOMI/Programs/astrolib’) + ‘:’ + !PATH

Shouldn’t cause any trouble, right? it’s the David Fanning Coyote Library and the NASA IDL Astronomy Users Library.

Thanks!  
MariLiza

---

<div class="post-metadata">

### Author: ![sander.niemeijer](https://forum.atmospherictoolbox.org/user_avatar/forum.atmospherictoolbox.org/sander.niemeijer/32/5_2.png) [@sander.niemeijer](https://forum.atmospherictoolbox.org/u/sander.niemeijer)
#### Post date: [May 10, 2023, 1:34pm UTC](https://forum.atmospherictoolbox.org/t/trouble-getting-idl-to-see-coda/646/4 "2023-05-10T13:34:01Z")

</div>

The older coda installation is likely the problem. Please remove all the old files from 2018 and then things will likely work.

---

<div class="post-metadata">

### Author: ![mariliza](https://forum.atmospherictoolbox.org/letter_avatar_proxy/v4/letter/m/c77e96/32.png) [@mariliza](https://forum.atmospherictoolbox.org/u/mariliza)
#### Post date: [May 10, 2023, 2:32pm UTC](https://forum.atmospherictoolbox.org/t/trouble-getting-idl-to-see-coda/646/5 "2023-05-10T14:32:13Z")

</div>

Will ask sys admin to delete and let you know!  
Many thanks  
MariLiza

---

<div class="post-metadata">

### Author: ![mariliza](https://forum.atmospherictoolbox.org/letter_avatar_proxy/v4/letter/m/c77e96/32.png) [@mariliza](https://forum.atmospherictoolbox.org/u/mariliza)
#### Post date: [May 12, 2023, 6:57am UTC](https://forum.atmospherictoolbox.org/t/trouble-getting-idl-to-see-coda/646/6 "2023-05-12T06:57:38Z")

</div>

Just confirming that the old files were indeed causing the issue,  
Thanks!  
MariLiza
