Installing GDL an IDL alternative

The Gnu Data Language is an interactive interpreter/incremental compiler for the GNU Data Language, which is primarily used in scientific, astronomical, medical and geo-science data processing applications. It supports graphical output and is intentionally designed to be highly compatible with the commercial IDL language. GDL is a free IDL (Interactive Data Language) compatible incremental compiler (ie. runs IDL programs). For a list of functions / compatability try this list.

Installation

To install on Ubuntu search the ‘Ubuntu Software Center’ or ‘Synaptic Package Manager’ or from the command line:

sudo apt-get install gnudatalanguage

File Locations (Ubuntu 10.10)

On installation, GDL is installed with various libraries in .pro files under:

/usr/share/doc/gnudatalanguage/examples/pro/*

Environment Variables / GDL_STARTUP

To ensure the libraries above are available to GDL when you run it, you can make use of the GDL_STARTUP environment variable. Set it as follows (bash):

export GDL_STARTUP=~/.gdl_startup

Or add that line to the bottom of your .bashrc file so it is run automatically on log in. To do this graphically open a text editor Applications > Accessories> Text Editor. Choose File > Open and show hidden files by pressing Crtl-H on the keyboard. Open the .bash_rc file and add your export line at the bottom.
Now that we have set the GDL_STARTUP variable to point to a file we need to create that file: Use vi, Text Editor (gedit) or any other text editor to create the file: /home/jonny/.gdl_startup
and add the following contents:

!PATH=!PATH + ':/usr/share/doc/gnudatalanguage/examples/pro/'
!PATH=!PATH + ':/usr/share/doc/gnudatalanguage/examples/pro/dicom/'
!DIR='/home/jonny/gdl'
print, '%** Personal settings are loaded and active **';

This sets the working directory to /home/jonny/gdl, we need to make sure that that exists. We can then reference files for input and output relative to this directory.

GDL Gnu Data Language

7 Responses to “Installing GDL an IDL alternative”

  1. Andrew

    Thank you very much for these articles. They helped clarify things immensely for me.

    Reply
  2. stargzrblog

    I’ve been an IDL user for over 2 decades (gah — I’m feeling old!). Never heard of GDL until a few days ago. I’m looking forward to trying it out. Thanks for the series of GDL posts! (I’m guessing that GDL has improved even more since these 2011 posts were published!)

    Reply
  3. Sachin

    can someone help me with my case of missing “examples directory”. my gnudatalanguage folder does not consist of the examples folder, all the .pro files are stored at /usr/share/gnudatalanguage/lib , but these are inbuilt procedure files such as factorial.pro, appleman.pro . i have been searching all of my system for those examples but all in vain. and some inbuilt .pro files too are missing such as binomial.pro, cramer.pro

    Reply

Leave a Reply to bhuvi

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>