Docs

IDL

 

Share via

Using IDL on JASMIN

What is IDL?  

IDL  stands for Interactive Data Language. It is a licensed data manipulation toolkit made available on JASMIN.

Availability of IDL on JASMIN  

IDL is available on all scientific analysis servers and LOTUS.

To get started with IDL, login to one of scientific analysis servers and do as follows:

Check which versions are available:

module avail idl

-------------------------------------------- /apps/jasmin/modulefiles -----------------------------------------------
  idl/8.9 idl/9.1 (D)    midl/20140411

  Where:
   D:  Default Module

The current default version is labelled with (D) and can be loaded using just module load idl. Alternatively, load a specific version by adding its version string to the command:

module load idl # or idl/8.9 to specify the version
idl
IDL 8.9.0 (linux x86_64 m64).
(c) 2023, L3Harris Geospatial Solutions, Inc.
% Error initializing graphics device GL.
Licensed for use by: UKRI Centre for Environmental Data Analysis
License: 492635

You can then type commands at the IDL prompt:

print,1+4
  5
exit

For help on the idl module you can type the following:

module help idl
----------- Module Specific Help for 'idl/8.9' --------------------
         Adds IDL 8.9 to your environment variables,

Making efficient use of IDL development licences  

We have a large pool of run-time licences but a much more limited pool of development licences. In each case, these consist of floating licences shared between JASMIN sci machines and the LOTUS cluster.

Users are welcome to run multiple instances of IDL code, but for that purpose please make use of the run-time licences by compiling your code using a single development session and then running the pre-compiled code using the -rt flag. An example of this is shown in the next section (below).

Please try not to run more than one or two simultaneous IDL development sessions. However, for licence purposes, each unique combination of username, hostname, counts as a single session. So for example, if you run idl (development mode) in one window, then suspend it with CTRL-Z and start another development session in the same window, this still is only counted as one session by the licence server because the username and hostname are all identical between the two processes.

Using IDL on LOTUS (via the run-time licences)  

IDL run-time licences are available for use on the LOTUS cluster. In order to specify use of the run-time licences please follow the instructions here. You need to compile your IDL code in order to run in run-time mode.

Example program  

The example program, foo, depends on some other functions.

======== foo.pro =======
    pro foo  
    print, doubleit(10) end 
========================
        


===== doubleit.pro ===== 
function doubleit, n   
return, two() * n 
end 
========================
        


======= two.pro ======== 
function two   
return, 2 
end 
========================

You must save a compiled version of the code in order to run it.

1. Compile the program:

Compiles top-level routine only

.compile foo
% Compiled module: FOO.

2. Use resolve_all to compile routines it depends on:

Recursively search for and compile modules called

resolve_all
% Compiled module: DOUBLEIT.
% Compiled module: TWO.

3. Save all compiled routines to a file:

save, /routines, file='foo.sav'

4. To run the program, using a run-time licence only:

idl -rt=foo.sav
IDL Version 8.5 (linux x86_64 m64). (c) 2015, Exelis Visual Information Solutions, Inc., a subsidiary of Harris Corporation.
Installation number: 406672.
Licensed for use by: Science & Technology Facilitie
  20

To see what routines are present in the save file:

.reset_session     <=== removes any existing compiled modules

help               <=== show compiled modules (and variables); there shouldn't be any
#% At $MAIN$
#Compiled Procedures:
#$MAIN$

#Compiled Functions:

restore,'foo.sav'   <=== load contents of save file

help
% At $MAIN$
Compiled Procedures:
$MAIN$  FOO                     <=== this was loaded from foo.sav

Compiled Functions:
DOUBLEIT    TWO            <=== so were these

Passing arguments  

You can also pass arguments in to your code as follows:

In your code, use function command_line_args, for example:

argsarray = command_line_args(count = nparams)

Call the code with -args flag:

idl -rt=foo.sav -args 10 20 30

command_line_args returns a string array, so convert type as required, e.g. n = fix(argsarray[0])

How to call IDL from Python using idlpy  

It is possible to call IDL from Python using the idlpy library as illustrated in the following example:

module load jaspy
module load idl
python
>>> import sys
>>> import os
>>> sys.path.append(os.path.join(os.environ["IDL_DIR"], "lib/bridges"))
>>> from idlpy import IDL
>>> IDL.print("hello world")
hello world
>>> a = IDL.findgen(12)
>>> a
array([ 0.,  1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9., 10., 11.],
dtype=float32)

Further reading  

  • Vendor documentation: Using IDL  (although may be for a newer version than on JASMIN)
  • The related software MIDL is no longer available on JASMIN.
Last updated on 2025-09-22 as part of:  Fix site build, removing mentions to NAG (610d7c1c3)
Follow us

Social media & development