This section of the CD-ROM contains additional material supporting the information in 

Chapter 16: 
Modelling UV-B Irradiance In Canada

of the book:  
Modeling Solar Radiation at the Earth's Surface.
Recent Advances

published by Springer-Verlag, Heidelberg

November 2007
-------------------------------------

Software for calculating UVB spectral irradiance
                              
     We provide source code and a common data file for
calculating spectral UVB irradiances using the delta-
Eddington DE and the discrete ordinates DO algorithms to
solve the radiative transfer equation. The user should
consult Joseph et al (1976) and Stamnes et al (1988) for the
theoretical background to the methods and visit the download
site ftp://climate.gsjc.gov/pub/wiscombe/Multiple_Scatt/
for instructions for implementing these widely used
radiative transfer codes. This site provides also the latest
versions of the codes and instructions for using them. We
stress strongly that users of our codes study information on
this site, download newer versions if necessary and run the
test programs that are provided on the machines to be used
in the UVB calculations. This is particularly important for
the discreet ordinates program. The versions (version 1) of
the two codes that we provide have worked flawlessly for
over a decade and we have no compelling reason to replace
them with newer versions.
     All our applications have used PCs with FORTRAN
compilers from Lahey Computer Systems. The codes we provide
run under Fortran 90. They are written in Fortran 77 with
some Fortran 90 extensions. If you use an older compiler
that does not recognize such oddities, you will have to
modify the code. On the other hand, this might be an
incentive to upgrade to a Fortran 90 compiler. It will run
Fortran 77 programs.
     Our codes are written explicitly in double precision
rather than in single precision then invoking the compilers
doubling capability. This stems from our early computations
with Lahey compilers which lacked that option.
     Our UV-B calculations have been for Canada but the
codes are applicable generally. As in most parts of the
world inputs for the calculations must be estimated since
there are few direct measurements of spectral optical
properties. We require two primary inputs cloud amount and
total ozone depth. Surface temperature, pressure and
humidity are also used but they are of secondary importance.
We use surface-based hourly cloud observations and once-
daily Brewer spectrophotometer measurements of the latter
although we have used TOMS measurements. Virtually all other
data are climatological including McClatchey atmospheres and
the Shettle and Fenn aerosol catalogue as listed in LOWTRAN
7. These can be replaced with other available data.
Extraterrestrial spectral radiation measurements from the
Solar Ultraviolet Spectral Irradiance Monitor (SUSIM) on
board the ATLAS-3 space shuttle mission launched on November
13, 1994 are used.
     We provide separate setup files (DE.DAT and DO.DAT) for
specifying station height, cloud optical properties, model
atmospheres, aerosol types and number of streams for DO and
one data file (DAY.DAT) to be used with both codes. The
latter contains Brewer spectral irradiance measurements for
one day (1 April, 1995 at Churchill, Manitoba) and
meteorological observations and measurements interpolated
linearly for times of Brewer measurements from hourly
observations. Merging of Brewer and meteorological data is
performed in another program that is not provided since it
is only useful with Canadian data. The Brewer instrument
provides no more than two spot radiation measurements per
hour. Users should run these programs and compare results
files with those we provide (DE.RES and DO.RES). The
programs use identical code for reading input data and for
calculating spectral optical properties for a 49-layer
atmosphere.
     The delta-Eddington code (DE.FOR) is self contained and
needs no comment. The DO code (DO.FOR) requires the linear
algebra library LINPACK which is included. The last line of
DO.FOR is
     INCLUDE DSORDLIN.FOR
which adds on the discrete ordinates and LINPACK programs.
DSORDLIN.FOR can be compiled separately to form a library
file which can is accessed by DO.FOR during linking.
      Version 1 of DO sets machine constants from an
extensive list within the program MACHINE.CON. Since this
did not contain constants for the PC we discarded the
routine and entered appropriate constants into the code. The
test programs performed correctly. Newer versions of DO
provide a program to calculate constants for any machine but
if Fortran 90 is used this task can be accomplished simply
by intrinsic functions. Documentation on the download site
describes this procedure.
     We anticipate that the DE program will run with little
or no modification. The DO program may cause problems. We
are not prepared to troubleshoot such problems. If the
program does not work, you should download the DO test
program from the site referred to above and try first to
reproduce the answers that it provides. Problems may arise
from inappropriate machine constants. Apart from changing
machine constants you modify the DSORDLIN.FOR code at your
peril.
     The following files are provided:
1.   DE.FOR         Fluxes using the delta-Eddington
          algorithm
2.   DO.FOR         Fluxes using the DISORT algorithm
3.   DSORDLIN.FOR   Discrete ordinates code+LINPACK
4.   DE.DAT         Input data file for delta-Eddington
5.   DO.DAT         Input data file for DISORT
6.   DAY.DAT        Sample day of meteorological data
7.   DE.RES         Results from DE.FOR
8.   DO.RES         Results from DO.FOR

       





