Introduction
SBDART (Planar Parallel Radiation Transfer Mode) is a software tool used to calculate the plane parallel radiation transmission of the earth's atmosphere and surface under cloudless and cloudy conditions. For a general description and comment on the program, please refer to Ricchiazzi's 1998 note.
Searching on the Internet can find its online version or Matlab version. Unfortunately, both of these are no longer available. The offline version will be compiled and used below. SBDART is a radiation transmission model written by FORTRAN. The FORTRAN development environment needs to be configured before installation. It has been introduced in detail in the previous blog post. The next step will focus on the installation and testing of SBDART.
Download, compile and install
download
Open Github and search for SBDART, and you can see the program released by paulricchiazzi as the first one.
Click to open it and you can see that it comes with installation instructions. The installation method is relatively simple, provided that the required compilation environment is installed, otherwise the compilation room will not be possible. After downloading, unzip it and you can see:
Compile and install
(1) Open the terminal, set the working path, enter the following command in the terminal, and press Enter
cd 解压后的SBDART-master路径
(2) Enter make,
press Enter to compile, and the compiling is finished in about 5 seconds. After compiling, you can see the generated sbdart program.
(3) Test, because it is a Fortran executable program, therefore, the program can be called by typing ./sbdart in the terminal.
(4) Open the TestRuns file and modify the sbdart program path to run it.
Generate UI through Python code and use SBDART through graphical interaction
MacOS comes with Python2.7, so there is no need to reinstall Python and configure the environment. Open the RunRT folder to find the RunRT.py file, modify the 29th line of code, and assign the value of the variable sbdartexe to the absolute path of the sbdart generated just now.
Next, enter the following command in the terminal to
generate the UI interface
example
Example 1
Calculate the irradiance of the top of the atmosphere and the surface (bottom of the atmosphere) with a wavelength between 0.25 and 1 micron.
INPUT file parameters:
$input
idatm=4, isat=0, wlinf=.25, wlsup=1.0, wlinc=.005, iout=1,
$end
effect:
Example 2
#!/local/gnu/bin/bash
############################################################
# shell script for Example 2
# vary optical depth and surface albedo
############################################################
#
rm -f sbchk.2
foralbconin0.2.4.6.81 ;do for tcloud in 0 1 2 4 8 16 32 64 ; do echo "
&INPUT
tcloud=$tcloud
albcon=$albcon
idatm=4
isat=0
wlinf=.55
wlsup=.55
isalb=0
iout=10
sza=30
/" > INPUT
sbdart >> sbchk.2
effect:
Example 3
rm -f sbchk.3
for tcloud in 0 1 5 ; do
echo " &INPUT
tcloud=$tcloud
zcloud=8
nre=10
idatm=4
sza=95
wlinf=4
wlsup=20
wlinc=-.01
iout=1
/" > INPUT
sbdart >> sbchk.3
done
effect: