If you will use IMD with a licensed copy of IDL, and you choose not to install the imd directory inside of the user_contrib directory in the main IDL directory, then you must edit the file imdsiteconfig.pro, located in the imd directory. The file imdsiteconfig.pro contains executable IDL code (although the program itself will not run if you just type .run imdsiteconfig.pro at the IDL prompt.) You must change the value of the imdhome variable in this file so that it refers to the actual IMD installation directory.
There are several other parameters you can adjust in this file:
For specular optical functions, the largest arrays that IMD will attempt to create to perform the actual computation are proportional to (number of wavelengths) x (number of angles) x (number of layers). So if you get the 'Not enough memory' message when computing specular optical functions as a function of multiple angles or wavelengths, you can try DECREASING the sp_max_array_size parameter.
For non-specular reflected intensities, the 'Not enough memory' error is most likely to occur when using the Omega/Nu/N PSD model, if you have defined large Nu values or Omega values equal to zero. In this case, IMD will need to create arrays that are proportional to (number of angles) x (number of layers) x (number of layers), where (number of angles) is equal to the number of incidence angles for Rocking and Offset scans, and the number of scattering angles for Detector scans. So if you get the 'Not enough memory' message when computing non-specular reflected intensities as a function of multiple angles using the Omega/Nu/N PSD model under the circumstances just mentioned, you can try DECREASING the ns_max_array_size parameter.
Also, these parameters can be decreased if you find that your computer is using a lot of virtual memory (i.e., spending a lot of time swapping to disk). Note, however, that decreasing sp_max_array_size or ns_max_array_size too low will result in a large speed penalty.
If you need to conserve disk space, there are a number of files that are included in the imd distribution that are optional, and can be safely deleted. Specifically, the examples.dir directory contains many examples files, all of which can be deleted. Also, three versions of the IMD binary file are shipped: one to be used with IDL version 5.1, called imd_51, another to be used with IDL version 5.2, called imd_52, and another to be used with IDL version 5.3 or higher, called imd_53. If you are sure you will only use one version of IDL (V5.1, V5.2, or V5.3 or higher), then you can delete whichever IMD binary files are not going to be used. Finally, this hypertext documentation is non-essential, and so the entire docs.dir directory can also be removed.