Linux system
The following software is required to successfully compile, link and run all of the libRadtran tools:
- GNU make. The compilation might work with other make programs, but usually it doesn't.
- The GNU C compiler (gcc). Other compilers might also work.
- A Fortran compiler that is compatible with the C compiler. If a C compatible Fortran compiler is not available, f2c will do the job.
- Flex - The Fast Lexical Analyzer. Is usually available for all flavours of Linux, under Mac, and for cygwin, but not necessarily installed by default. You may have to select installation of flex manually.
- The Perl programming language, version 5.004 or later, is required to run the automatic test.
- The netcdf library, including development package.
- The GNU Scientific Library (GSL), including development package.
Finally, download the libRadtran source code from the official libRadtran website at the Download section (http://www.libradtran.org/doku.php?id=download).
The source-code packages are zipped in .tar.gz files. Download the libRadtran-2.0.2.tar.gz file in a folder where you want to unzip and compile the source code e.g.,
C:\Program Files (x86)\libradtran.
Users of Windows operating systems can also install libRadtran with a little more effort than on a Unix system. This is possible by installing the Cygnus Development Suite (cygwin). Cygwin is a port of GNU C compiler gcc and contains all tools necessary for the compilation of libRadtran, in particular make and a port of the Unix bash. This package allows the compilation of libRadtran as on a Unix system without any changes. Aside from being able to compile libRadtran, you will get one of the best compilers available to date
for free.
Start downloading the Cygnus Develoment Suite from http://cygwin.com. The downloaded setup program (setup-x86_64.exe for 64-bits or setup-x86.exe for 32-bits) will allow you to perform a fresh install or to update an existing installation, which is particularly useful if you need to install new libraries. Double-click on the setup .exe file to open the Cygwin Setup. In the first screen, you will have to select the source of the installed Cygwin libraries. Choose the default option to Install from Internet and click next:

In the next two screen, select the first the directory in your computer where you want to install Cygwin (e.g., C:\cygwin). Then you will select the directory where you will download the installation files. Notice that you can later remove these files once Cygwin has correctely been installed (and libRadtran can be run).


Next, the setup will require you to specify the option you want to use to connect to the internet. After clicking next, you will be able to choose the the website from which you will download the installation packaged of the cygwin libraries.

After clicking next, you will see a progress bar showing the status of the download:

The next window is the core of the Cygwin setup program and it allows you to select the libraries or packages (and their versions) that you want to install (or update) with Cygwin. You can use the Search text box to look for specific packages. Once you find one, click on the deployable menu and select the desired version. You can also choose among the options Unistall to remove some un-used package or Reinstall in case a download has been corrupted. The packages set to Skip are not downloaded nor installed in Cygwin. You can always run again the Cygwin setup to update the installed packages.

As for the compilation of libRadtran in Linux systems, the following packages are needed for the compilation of libRadtran using Cygwin:
- GNU make. The compilation might work with other make programs, but usually it doesn't.
- The GNU C compiler (gcc). Other compilers might also work.
- A Fortran compiler that is compatible with the C compiler. If a C compatible Fortran compiler is not available, f2c will do the job.
- Flex - The Fast Lexical Analyzer. Is usually available for all flavours of Linux, under Mac, and for cygwin, but not necessarily installed by default. You may have to select installation of flex manually.
- The Perl programming language, version 5.004 or later, is required to run the automatic test.
- The netcdf library (libnetcdf devel version 4.6.1-2 and libnetcdf-fortran devel version 4.4.4-3), including development package and the tool to compare netcdf files nccmp.
- The GNU Scientific Library (libgsl devel version 2.3-2), including development package.
- The cygwin devel.
- The Python Development Environment python.
- Other libraries: cygwin-devel version 2.11.2-1, file-devel version 5.32-1, libgmp-devel version 6.1.2-1, liblapack-devel version 3.8.0-1, libuuid-devel version 2.32.1-1, zlib-devel version 1.2.11-1, and m4
In principle, the version number is not important.
Finally, download the libRadtran source code from the official libRadtran website at the Download section (http://www.libradtran.org/doku.php?id=download).
The source-code packages are zipped in .tar.gz files. Download the libRadtran-x.yy.tar.gz file (where x.yy is the version number) in a folder where you want to unzip and compile the source code e.g.,
C:\Program Files (x86)\libradtran.