Radiative Transfer Modelling software is fun stuff! Decoding cryptic fortran docs is such a great time. So here's me spoiling all that fun for you, (hopefully) making it easy. Or at least easier.
I got it all going on a dual-core 64-bit AMD processor running a fresh install of Ubuntu 12.04. Most of this should be applicable to other platforms and linux-based operating system. Maybe even some other unix-based systems.
Atmospheric Radiative Transfer.
All three RTM programs are written in Fortran, so you'll need a Fortran compiler! And actually make that three different Fortran compilers because you're awesome.
SBDART is written in FORTRAN77, so we need a compiler which compiles FORTRAN77 code. No kidding. Ubuntu doesn't have one by default so we need to install it.
The program 'fort77' is currently not installed. You can install it by typing: sudo apt-get install fort77
Then you don't have it yet; proceed with the following instructions. If it says
gfortran: fatal error: no input files compilation terminated
then you're already done here!
After this operation, 2,986 kB of additional disk space will be used. Do you want to continue [Y/n]?
If that's still true, type 'Y' and hit enter. fort77 (and its dependencies) will install. That's it. Yep, installing programs in Ubuntu rocks.
Guess what? gfortran installs in exactly the same way as fort77!
Boom.
(Tip: basically anything you want in linux installs this way. SBDART doesn't because it's a very obscure piece of software which isn't in Ubuntu's repository. But a shocking wealth of software is readily available from the repository!)
I had no luck compiling RRTM with either gfortran or fort77, but they have a makefile specifically for The Portland Group's fortran compiler. It's not free, but there is a free trial period; good enough for our purposes. (note to self: look into the license I agreed to and see if there are any extra stipulations on the use of the trial version...)
Installation complete.
Celebrate!
And then test it
phil@ubuntu:~/pgi$ pgf90 No command 'pgf90' found, did you mean: Command 'pdf90' from package 'pdfjam' (universe) pgf90: command not found
Nooooooooooo
Don't panic, bash just doesn't know where to find it yet. Let's try it with the absolute path:
phil@ubuntu:~/pgi$ /opt/pgi/linux86-64/12.4/bin/pgf90 pgf90-Warning-No files to process
Ok, now is the time to celebrate.
I decided not to bother adding that directory to my PATH or anything, since I just need it for this one build. So we're done!
No, not actually. We need to get our license files.
Get the hostid by opening a terminal and typing ifconfig eth0. My output looked like this:
phil@ubuntu:/opt/pgi/linux86-64/12.4/bin$ /sbin/ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:0c:29:30:4c:1e inet addr:192.168.65.128 Bcast:192.168.65.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe30:4c1e/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:608040 errors:0 dropped:0 overruns:0 frame:0 TX packets:310314 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:913047840 (913.0 MB) TX bytes:17318408 (17.3 MB)
It's that HWaddr part that we need, in my case 00:0c:29:30:4c:1e. Keep that code handy, and head over to https://www.pgroup.com/license/trialkey.php and copy it in. You should get a page with a link called "Save trial keys as a file on my computer". Click it, and you should be presented with the option to save a file called license.dat. Save it.
Now move it to the right place...
sudo cp ~/Downloads/license.dat /opt/pgi/license.dat
(you may have to enter a password for sudo, since /opt is protected)
And now, finally, at long last, we're there. Done.
Get the SBDART source code. It's all in one file. Either right-click that link and Save link as..., or open it up in the browser, and then select File -> Save As.... Save it somewhere convenient, like on your desktop. Or somewhere better, like inside a folder called sbdart in your home directory.
If you don't already have a terminal open, hit ctrl-alt-t to get one. Navigate to the directory where you put the sbdart code (so cd ~/Desktop if you saved it on the desktop, or cd ~/sbdart if you saved it in a folder called sbdart in your home directory. If this is confusing, you may wish to brush up on your linux terminal skills.)
I like to double-check I'm in the right place by typing ls, which should simply return sbdart.f if you're in the right directory (there may be other things listed there as well, just make sure sbdart.f is in there!).
To compile sbdart, enter this command:
f77 sbdart.f -o sbdart
It should output a couple hundred lines of stuff very quickly to the terminal, and then leave you back at a prompt after a couple moments. Get a directory listing again to see if it worked (ls), and if you now see sbdart sbdart.f, then you're done!
SMARTS is a little trickier than SBDART to get up and running (the source code is more than just a single file like SBDART!), but still very simple.
First you'll need to register with NREL. They'll email you a username and password to download the source.
Then you can grab the code here. At this time of writing, the current version is 2.9.5, which is available for linux in a 3MB.tar.gz file.
Extract that file somewhere, like say a new folder called smarts in your home directory.
Make the executable, executable!
After I extracted SMARTS, I found I couldn't execute the program. This is what my try looked like:
phil@ubuntu:~/smarts/SMARTS_295_Linux$./smarts295 bash:./smarts295: No such file or directory
Bizarre. It's there -- I can see it with ls. ll shows that it's set to executable, so doing chmod +x smarts295 had no effect. I don't know why it doesn't work, but they give us the source code, so grab the gfortran compiler (see above) and let's go!
Navigate into the Source_code directory. For me that meant
cd ~/smarts/SMARTS_295_Linux/Source_code
Compile
gfortran smarts295.f -o smarts
It should complete in a couple moments. Move our new executable back out of the Source_code folder
mv smarts../
Go up a level to try it out...
cd../
Hold your breath... ./smarts
phil@ubuntu:~/smarts/SMARTS_295_Linux$./smarts *********************************** Welcome to SMARTS, version 2.9.5! *********************************** $$$ SMARTS_295> Use standard mode with default input file? [If YES (or Y), execution will start immediately using the default input file smarts295.inp.txt] (Y/N) ==>
Hooray, we're done, it seems to work!
There are four versions of RRTM, as you can see here. We wanted the Short-Wave version, and the stand-alone model, so RRTM_SW. Get the code via the Code and Examples link on the left frame. Here is a direct link to that page (it's frame-less so that link loses all the page navigation).
Grab the source code and makefiles. They'll prompt you for your email address, name, etc. If you really don't want to part with that info, they don't validate the fields (you could just enter a, b, c. But be nice).
Extract that archive somewhere. I made a new folder in my home directory called (you guessed it) rrtm.
Copy the appropriate makefile up a level in order to use it
phil@ubuntu:~$ cd ~/rrtm/rrtm_sw/makefiles phil@ubuntu:~/rrtm/rrtm_sw/makefiles$ cp make_rrtm_sw_linux_pgi../ phil@ubuntu:~/rrtm/rrtm_sw/makefiles$ cd../ phil@ubuntu:~/rrtm/rrtm_sw$ ls linux_pgi_pgf90_dbl.o make_rrtm_sw_linux_pgi src makefiles rrtm_sw_instructions update_rrtm_sw_v2.5.txt
At this point make sure you've installed the PGLinux Fortran compiler. See a couple sections up in this document for help with that.
If you remember, bash didn't know where to find the executable pgf90 after we installed it, and since we haven't fixed that issue, it's easier to just edit the makefile. Lets open it up in gedit:
phil@ubuntu:~$ cd ~/rrtm/rrtm_sw/ phil@ubuntu:~/rrtm/rrtm_sw$ gedit make_rrtm_sw_linux_pgi
Now find the lines where it says FC = pgf90 and CDOTO = $(PLATFORM)_$(FC)_dbl.o
############################### # Set variables ############################### PLATFORM = linux_pgi VERSION = v2.5 FC = pgf90 FCFLAG = -fast -r8 -i8 OUTPUT = rrtm_sw_$(PLATFORM)_$(VERSION) CPATH = src CDOTO = $(PLATFORM)_$(FC)_dbl.o
And change them to FC = /opt/pgi/linux86-64/12.4/bin/pgf90 and CDOTO = $(PLATFORM)_pgf90_dbl.o, respectively.
############################### # Set variables ############################### PLATFORM = linux_pgi VERSION = v2.5 FC = /opt/pgi/linux86-64/12.4/bin/pgf90 FCFLAG = -fast -r8 -i8 OUTPUT = rrtm_sw_$(PLATFORM)_$(VERSION) CPATH = src CDOTO = $(PLATFORM)_pgf90_dbl.o
And finally....
phil@ubuntu:~/rrtm/rrtm_sw$ make -f make_rrtm_sw_linux_pgi ----------------- rrtm_sw_linux_pgi_v2.5 Makefile ----------------- This Makefile was designed for the linux_pgi platform. It uses the /opt/pgi/linux86-64/12.4/bin/pgf90 compiler, with the following options: -fast -r8 -i8 The object files used are as follows: rrtm.o RDI1MACH.o rtrdis.o rrtatm.o setcoef.o taumoldis.o ErrPack.o util_linux_pgi.o extra.o LINPAK.o disort.o cldprop.o k_g.o rrtm_sw_linux_pgi_v2.5 make in progress... NOTE: your trial license will expire in 14 days, 7.45 hours. NOTE: your trial license will expire in 14 days, 7.45 hours. NOTE: your trial license will expire in 14 days, 7.45 hours. NOTE: your trial license will expire in 14 days, 7.45 hours. NOTE: your trial license will expire in 14 days, 7.45 hours. NOTE: your trial license will expire in 14 days, 7.45 hours. NOTE: your trial license will expire in 14 days, 7.45 hours. NOTE: your trial license will expire in 14 days, 7.45 hours. NOTE: your trial license will expire in 14 days, 7.45 hours. PGF90-W-0155-The type of FLOAT is now double precision with -r8 (src/setcoef.f: 140) 0 inform, 1 warnings, 0 severes, 0 fatal for setcoef NOTE: your trial license will expire in 14 days, 7.45 hours. NOTE: your trial license will expire in 14 days, 7.45 hours. NOTE: your trial license will expire in 14 days, 7.45 hours. NOTE: your trial license will expire in 14 days, 7.45 hours. NOTE: your trial license will expire in 14 days, 7.45 hours. NOTE: your trial license will expire in 14 days, 7.45 hours. NOTE: your trial license will expire in 14 days, 7.45 hours. NOTE: your trial license will expire in 14 days, 7.45 hours. NOTE: your trial license will expire in 14 days, 7.45 hours. NOTE: your trial license will expire in 14 days, 7.45 hours. NOTE: your trial license will expire in 14 days, 7.45 hours. NOTE: your trial license will expire in 14 days, 7.45 hours. PGF90-W-0155-The type of FLOAT is now double precision with -r8 (src/disort.f: 473) 0 inform, 1 warnings, 0 severes, 0 fatal for disort NOTE: your trial license will expire in 14 days, 7.45 hours. NOTE: your trial license will expire in 14 days, 7.44 hours. PGF90-W-0155-The type of FLOAT is now double precision with -r8 (src/cldprop.f: 155) 0 inform, 1 warnings, 0 severes, 0 fatal for cldprop NOTE: your trial license will expire in 14 days, 7.44 hours. NOTE: your trial license will expire in 14 days, 7.44 hours. NOTE: your trial license will expire in 14 days, 7.44 hours. ================= Makefile done ================= phil@ubuntu:~/rrtm/rrtm_sw$ ls linux_pgi_pgf90_dbl.o make_rrtm_sw_linux_pgi~ src makefiles rrtm_sw_instructions update_rrtm_sw_v2.5.txt make_rrtm_sw_linux_pgi rrtm_sw_linux_pgi_v2.5 phil@ubuntu:~/rrtm/rrtm_sw$./rrtm_sw_linux_pgi_v2.5 INVALID INPUT_RRTM
WOOOOOOOOOOOOHOOOOOOOOOOO!!!! Now is celebration time.
| License | CC-BY-SA-3.0 |
|---|---|
| Cite as | P.schleihauf (2012–2026). "Installing RTM Software on Linux". Appropedia. Retrieved October 4, 2026. |