No edit summary
mNo edit summary
Line 1: Line 1:
RRTM (Rapid Radiative Transfer Model) provided by ARM is an open-soucre program which predicts the radiative transfer in the atmosphere in a series of 16 dicrete wavelength bands.  
RRTM (Rapid Radiative Transfer Model) provided by ARM is an [[open-source]] program which predicts the radiative transfer in the atmosphere in a series of 16 discrete wavelength bands. This is useful for [[solar energy]] modeling in general and solar [[photovoltaic]] modeling specifically.


*The program can be downloaded at:  http://rtweb.aer.com/rrtm_frame.html
*The program can be downloaded at:  http://rtweb.aer.com/rrtm_frame.html


*In order to install it the PGI Accellerate compiler is required, which can be found on a 14 day trial at: http://www.pgroup.com/
*In order to install it the PGI Accelerate compiler is required, which can be found on a 14 day trial at: http://www.pgroup.com/


This compiler runs in the cygwin environment, which is required for the compiling of the code.  
This compiler runs in the cygwin environment, which is required for the compiling of the code.  
Line 9: Line 9:
*Once the rrtm .tar.gz file has been downloaded, uncompress it to c:/rrtm_sw (for ease of addressing later)  
*Once the rrtm .tar.gz file has been downloaded, uncompress it to c:/rrtm_sw (for ease of addressing later)  


Inside this file is the makefiles directory, contianing "make" files for linux, sun and sgi systems, and the src directory, containing the fortran source code of rrtm.
Inside this file is the makefiles directory, containing "make" files for [[Linux]], sun and sgi systems, and the src directory, containing the fortran source code of rrtm.


A make file is a set of system commands which directs the complier in what order and where to complie the program. The file "make_rrtm_sw_linux_pgi" is close to what can be run on a windows machine, but requires some modifications. Instead download Makefile WIN.odt from this site, [[file:Makefile WIN.odt]] which is modified to work on windows. This file should be copied into a raw text file called "makefile" located in the rrtm_sw directory.  
A make file is a set of system commands which directs the complier in what order and where to compile the program. The file "make_rrtm_sw_linux_pgi" is close to what can be run on a windows machine, but requires some modifications. Instead download Makefile WIN.odt from this site, [[file:Makefile WIN.odt]] which is modified to work on windows. This file should be copied into a raw text file called "makefile" located in the rrtm_sw directory.  


*Download "make_rrtm_sw_WIN" into the base (c:/rrtm_sw) folder.
*Download "make_rrtm_sw_WIN" into the base (c:/rrtm_sw) folder.
Line 21: Line 21:
*three files: "rrtm_sw_linux_pgi_v2.5", "rrtm_sw_linux_pgi_v2.dwf", and "rrtm_sw_linux_pgi_v2.pdb" will be created. In order to run rrtm, enter "./ rrtm_sw_linux_pgi_v2.5" into the cygwin bash shell.  
*three files: "rrtm_sw_linux_pgi_v2.5", "rrtm_sw_linux_pgi_v2.dwf", and "rrtm_sw_linux_pgi_v2.pdb" will be created. In order to run rrtm, enter "./ rrtm_sw_linux_pgi_v2.5" into the cygwin bash shell.  


This methodology has sucessfully recreated the "input_rrtm_sw_trp" test case on a Windows 7X64 machine  
This methodology has successfully recreated the "input_rrtm_sw_trp" test case on a Windows 7X64 machine  


=Using RRTM as a batch program with MATLAB
=Using RRTM as a batch program with MATLAB=


The file which has been compiled will only run properly if run through the cygwin environment. In order to run batch processes of this program through MATLAB, MATLAB must first call the cygwin bash shell, and execute the program through this shell. This call can be completed in one line with the system command:
The file which has been compiled will only run properly if run through the cygwin environment. In order to run batch processes of this program through MATLAB, MATLAB must first call the cygwin bash shell, and execute the program through this shell. This call can be completed in one line with the system command:
Line 31: Line 31:
*C:\cygwin\bin\bash --login -c  This sets the current working directory to the location of the CYGWIN bash shell. Therefore if cygwin is located elsewhere, this should be modified
*C:\cygwin\bin\bash --login -c  This sets the current working directory to the location of the CYGWIN bash shell. Therefore if cygwin is located elsewhere, this should be modified


*"cd /cygdrive/c/rrtm_sw ; ./rrtm_sw_linux_pgi_v2.5" are two lines of bash shell code, seperated by a semi-colon which acts as a line break. The first sets the working directory of cygwin to the location of the rrtm code (again this should be modified depending on the location on your machine.) The second line of code calls the rrtm program.
*"cd /cygdrive/c/rrtm_sw ; ./rrtm_sw_linux_pgi_v2.5" are two lines of bash shell code, separated by a semi-colon which acts as a line break. The first sets the working directory of cygwin to the location of the rrtm code (again this should be modified depending on the location on your machine.) The second line of code calls the rrtm program.




Line 37: Line 37:


[[Category:Rob Andrews Thesis]]
[[Category:Rob Andrews Thesis]]
[[category: Queens Applied Sustainability Group Lab Protocols]]
[[category:photovoltaic]]

Revision as of 11:20, 15 June 2011

RRTM (Rapid Radiative Transfer Model) provided by ARM is an open-source program which predicts the radiative transfer in the atmosphere in a series of 16 discrete wavelength bands. This is useful for solar energy modeling in general and solar photovoltaic modeling specifically.

  • In order to install it the PGI Accelerate compiler is required, which can be found on a 14 day trial at: http://www.pgroup.com/

This compiler runs in the cygwin environment, which is required for the compiling of the code.

  • Once the rrtm .tar.gz file has been downloaded, uncompress it to c:/rrtm_sw (for ease of addressing later)

Inside this file is the makefiles directory, containing "make" files for Linux, sun and sgi systems, and the src directory, containing the fortran source code of rrtm.

A make file is a set of system commands which directs the complier in what order and where to compile the program. The file "make_rrtm_sw_linux_pgi" is close to what can be run on a windows machine, but requires some modifications. Instead download Makefile WIN.odt from this site, File:Makefile WIN.odt which is modified to work on windows. This file should be copied into a raw text file called "makefile" located in the rrtm_sw directory.

  • Download "make_rrtm_sw_WIN" into the base (c:/rrtm_sw) folder.
  • Open PGI accelerate bash shell and enter "cd /cygdrive/c/rrtm_sw" to make the base folder the working directory
  • input "make" into the bash shell. This will call the makefile in the rrtm_sw directory and compile rrtm. Note that everytime this is run it will create the folder "linux_pgi_pgf90_dbl.o". This folder must be erased before the makefile is re-run.
  • three files: "rrtm_sw_linux_pgi_v2.5", "rrtm_sw_linux_pgi_v2.dwf", and "rrtm_sw_linux_pgi_v2.pdb" will be created. In order to run rrtm, enter "./ rrtm_sw_linux_pgi_v2.5" into the cygwin bash shell.

This methodology has successfully recreated the "input_rrtm_sw_trp" test case on a Windows 7X64 machine

Using RRTM as a batch program with MATLAB

The file which has been compiled will only run properly if run through the cygwin environment. In order to run batch processes of this program through MATLAB, MATLAB must first call the cygwin bash shell, and execute the program through this shell. This call can be completed in one line with the system command:

system('C:\cygwin\bin\bash --login -c "cd /cygdrive/c/rrtm_sw ; ./rrtm_sw_linux_pgi_v2.5"')

  • C:\cygwin\bin\bash --login -c This sets the current working directory to the location of the CYGWIN bash shell. Therefore if cygwin is located elsewhere, this should be modified
  • "cd /cygdrive/c/rrtm_sw ; ./rrtm_sw_linux_pgi_v2.5" are two lines of bash shell code, separated by a semi-colon which acts as a line break. The first sets the working directory of cygwin to the location of the rrtm code (again this should be modified depending on the location on your machine.) The second line of code calls the rrtm program.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.