3zpzti

NCAR/TN-121 +STR NCAR TECHNICAL NOTE 4 July 1977

The -Eddington Approximation for a Vertically Inhomogeneous Atmosphere

W. J. Wiscombe

ATMOSPHERIC ANALYSI ANAND PREDICTION DIVISION -~P---P·-·~---~~I----II~-~-YU~ ~eger -- 1~-~ II~- -·IC-- ~ e - -~ - I I I I -- C a NATIONAL CENTER FOR ATMOSPHERIC RESEARCH BOULDER, COLORADO

iii

ABSTRACT

The delta-Eddington approximation of Joseph, Wiscombe, and

Weinman (1976) is extended to an atmosphere divided up by internal levels into homogeneous layers. Flux continuity is enforced at each level, leading, as the mathematical essence of the problem, to a penta-diagonal system of linear equations for certain unknown con- stants. Fluxes (up, direct down, diffuse down, and net) are then pre- dicted at each level. Unphysical results of the model are examined in detail. Potential numerical instabilities in the solution are noted and corrected, and an extremely fast, well-documented computer code resulting from this analysis is described and listed. Actual computed fluxes are given for several test problems.

v

PREFACE

It has always been painfully obvious, in my multi-spectral- interval, multi-layer, and multi-angle computer models of solar and

IR radiative transfer, that the angular part of the calculation was the pacing item. Since my interest has primarily been in fluxes, it always seemed particularly unfortunate to spend the lion's share of computing time on obtaining angular information, which was then used only to compute fluxes. It would obviously have been preferable to calculate fluxes directly, but none of the existing approximations for so doing (variants of two-stream and Eddington) seemed sufficiently flexible - for in marching through the solar and IR spectrums, and vertically upward through an atmosphere, one encounters huge varia- tions in optical depth and single-scattering albedo, and the existing approximations were only valid for restricted ranges of these para- meters. Even worse, they seemed not to be to handle the asym- metric phase functions typical of clouds and aerosols very well.

Then J. H. Joseph, J. A. Weinman and I (1976) discovered the excellent accuracy of the delta-Eddington approximation (which cal- culates flux directly) for all phase functions, no matter how asym- metric, and for all optical depths and single-scattering albedos; but we investigated only homogeneous layers. It was therefore only natural for me to work up a multi-layer version, which I used to replace adding-doubling in my spectrally-detailed radiation models for a cloudy atmosphere. The solar flux changes from so doing were

-5-15 watts/m 25(on the order of present uncertainty in the solar vi

constant), and could equally well be caused by almost undetectable variations in the effective radius of the cloud drops. [These results were presented in August, 1976, at the Symposium on Radiation in the

Atmosphere in Garmisch-Partenkirchen, West Germany.] I concluded from these results that the multi-level delta-Eddington approximation was potentially of great utility to a wide variety of users who wanted radiative fluxes of roughly 1% accuracy. This was the motivation for publishing the present document.

I would like to thank Dr. V, Ramanathan for his careful review of and suggestions for improving this publication.

Warren J. Wiscombe May 1977 vii

TABLE OF CONTENTS

Page

1. ONE-LAYER FORMULAS ...... 0 0 0 0 0 0 0 1

2. ALBEDO OF A SEMI-INFINITE LAYER . . 0 *I 0 0 0 0 0 0 a 6

3. MULTI-LAYER FORMULATION ...... 0 0 0 0 0 0 10

4. THE COMPUTER CODE ...... 0 0 16

4o1 ELIMINATION OF w=1 BRANCH ...... 16 4.2 MULTIPLE DIRECTIONS OF INCIDENCE ..... 18 4.3 SOLVING THE LINEAR SYSTEM ...... 18

4.4 ILL-CONDITIONING ...... I 20 4.5 SPURIOUS AND NEGATIVE FLUXES IN HIGHLY ABSORBING CASES ...... 22 4.6 FAILURE TESTING ...... 27 4.7 SPEEDING UP THE CODE ...... 27

5. ACCURACY ...... 29

REFERENCES ...... 30

APPENDIX A: LISTING OF COMPUTER CODE FOR THE MULTI-LAYER DELTA-EDDINGTON APPROXIMATION ...... 31

APPENDIX B: TEST PROBLEMS 1-11 ...... 53

APPENDIX C: COMPARISON OF DELTA-EDDINGTON AND ADDING-DOUBLING FLUX COMPUTATIONS ...... 63 1

1. ONE-LAYER FORMULAS

The delta-Eddington formulas for a single homogeneous layer will be required in the multi-layer formalism. Let us therefore derive them, using the notation:

w = scaled single scattering albedo of layer

g = scaled asymmetry factor of layer

T = scaled optical depth within layer

AT = total scaled optical depth of layer

\P = cosine of zenith angle of monodirectional beam incident upon top of layer

S = incident-beam flux

A = surface albedo.

The scaling relationships are

= * 2 fl-e* )0*2 g T = ( w*g**g*2)T* )* , (1 - ) -*- +l~ g - w*g*W*~~g1 where g*, T*, a* are the actual values of the layer's optical parameters.

If we follow the procedure outlined in the paragraph following

Eq. (16) of Joseph et al. (1976), we arrive at two differential equa- tions, which are:

dG 3 3 3ST/g 0 dT + 2 (l-g)H = wSgpe (la)

dH 1 -T/P0 d + 2(1-w)G = wSe (lb)

where G, H are proportional to the i0, i1 of Joseph et al.,

E G -E i0 , H -2 ri (2) 2

The solution of these equations is straightforward when w and g do not vary with T. There are two cases which arise:

(1) w < 1

G = cle + c2 ae O (3a)

X- -XT T/1Oi H = -Pcle + Pc2e / - e (3b) 2

where cl, c2 are arbitrary constants and

X = /3(1-o)(l-wg) (3c)

I ..... (3d) 2 = X | (3d) p 3 1-cgX , - ,

3 1 + g(l-) (3e) 4 2 2 (l/po)-X

3g(l-w)pO0 + (1/p0) =3 WS 2 2 - (3f) 2 2 (1/) X

(2) = 1

G = c1 - (l-g)c 2 T - 4 Se (4a)

2 1 S-/ 0 H = c 2 - Spe 0 (4b)

where cl, c2 again are arbitrary constants.

The solution (3a-f) is invalid when p0 = 1/X, for then the particular and homogeneous solutions of the differential equations

(la-b) coincide. Eqs. (3a-b) do approach a finite limit as p0 - 1/X, but computational overflows will occur in practice, since the limit 3

> is of the form 0/0. However, D 0 can only equal 1/% if X 1, or if

g+l - - g + 1 w - l = 2g

< Since dol/dg 0, and since wo1 equals 2/3 at g = 0, it is clear that we need never concern ourselves with this case if w > 2/3. Even

should it arise, it can easily be avoided by changing pO slightly.

Only upon attempting an analytic integration over pO might it be

necessary to bear this case in mind (numerical integration could

simply avoid picking pO = 1/X as a quadrature point).

Diffuse up, diffuse down, and net fluxes for the layer are given

by the following expressions:

-1 -1 F = 27 r pi(T,11) dp = 27 1 (Di0 + i12i1 ) dl 0 0

2 = 7(i 0 - i1 ) = G- H (5a)

+, .1 2 F = 27 (5b) I pli(T,v) dp = Tr(i 0 + il) = G + H 0

-T/PO + F + -T/pO F = p Se + F - F = p Se + 2H (5c)

Note from Eqs. (5c) and (lb) that

d = -Se + dH +/0 ^ -= - - 2 = -(1-c) (Se 0 + 4G 1 (6)

This shows that when there is no absorption, w = 1, the approximation 4

conserves flux. Furthermore, when absorption is present, w < 1, the approximation guarantees positive absorptivities, dF/dT < 0, provided

G > 0. [Clearly G, being proportional to mean intensity, should be positive on physical grounds.] The differential equation satisfied by G, from Eqs. (la-b), is

2 3 -T/P0 G" - X G = - w [l+g(l-o)]Se

Because the right-hand side is negative, G cannot have a relative minimum at which it is negative or zero; for at such a minimum, G" > 0

and X2 G < 0, which is impossible. Hence

G(O) > 0 and G(AT) > ==0 G(T) 0 for O < T < AT because otherwise G would, upon leaving G(O) 2 0 and becoming negative, have to 'turn back,' constituting thereby a relative minimum, to reach

G(AT) 2 0.

One can argue for G(O) 2 0 as follows. The top boundary condi- + tion, prescribing a diffuse down-flux F0 at T = 0, is

G(0) + H(O) = F0 . (7)

But physically the net flux at the top of the layer cannot exceed the

incident flux 10S + F0 , which, from Eq. (5c), implies H(O) < - F .

Therefore G(O) > 0 from Eq. (7). [This is not, of course, a rigorous

proof, in that it draws on an assumption not properly part of the

equations.]

Given G(0) > 0, one can argue rigorously for G(AT) > 0. Let + as Lambert there be a prescribed up-flux F 0 at T = AT, as well 5

reflection with albedo A(p ):

G(AT) - H(AT) = F0 t + A(D 0 ) G(AT) + H(AT) + p 0Se i (8)

[The reason for a p0 dependence in A is explained later.] Eq. (la)

allows this to be reduced to a boundary condition involving G alone,

G'(AT) + Y1G(AT) = where all we need to know about y1 and y2 is that they are positive.

Suppose G(AT) < 0. Then G'(AT) > 0 from the last equation. It follows

that G(T) must have a negative relative minimum in order to turn up and

reach G(0) 2 0. Since this is impossible, G(AT) > 0 is proved by con-

tradiction. In sum, positivity of G(0) establishes positivity of G,

and therefore of absorptivities, at all optical depths. 6

2. ALBEDO OF A SEMI-INFINITE LAYER

We examine the albedo of semi-infinite layers in the delta-

Eddington approximation, both out of intrinsic interest, and because it relates to ill-conditioning in the code and to possible unphysical cases which can arise.

Consider a semi-infinite layer with single-scattering albedo less than one (the case where it equals one being trivial). If we take the delta-Eddington solution, Eq. (3), with boundary conditions (7) and + (8), setting F0 = 0, then the layer albedo,

-o) G(O) - H(O) a(a )+( P0S + F0

becomes, in the limit XAT + oo,

(l-P)F0 + 2(6-Pa) ao (p) 0 (9)9= (l+P)(GoS+Fo )

This limit is actually reached, for all practical purposes, when

e << 1 .(10)

Eq. (10) is precisely the situation in which ill-conditioning arises in the multi-layer code, as described in Section 4.4.

Note that the surface albedo, A(p 0 ), does not appear in Eq. (9); from this we conclude that levels above a layer satisfying condition

(10) are completely unaffected by levels below it. Radiative 7

+ communication is effectively blocked. [Of course, a large enough F could make itself felt even through such a damping layer, but we have + considered that F = 0 in Eq. (9).]

Consider the numerator of Eq. (9) (the denominator is always positive because P > 0). The coefficient of F0 may be negative in the following circumstance:

1 - P < O w < 4 - 3g which is easily deduced from Eq. 3(d). The second inequality holds for both scaled (w,g) and unscaled (w*,g*) variables, on account of similarity relation (17b) of Joseph et al. (1976). For g* = 0.85, this inequality becomes o* < 0.69, and as g* -+ 1, it tends to w* < 1.

Thus, the more asymmetric the phase function, the larger the range of w* over which 1 - P < 0. Clearly, if only a diffuse flux F is inci- dent on the semi-infinite layer, the delta-Eddington albedo (9) will be negative when the single-scattering albedo is sufficiently below unity. Its largest possible negative value, assumed at w = 0, is -7.2%, i.e.

min = 1- = -0.072 0

For the second term in the numerator of Eq. (9), we have the following expression:

1 B- P = +? ( - Pg0 )0s 1 + XP0 2 0 0~g~O~O 8

< which is always positive because P i /3, g 1/2, and p0 ' 1. Hence, if only a direct flux poS is incident on the semi-infinite layer, the delta-Eddington albedo (9) will always be positive.

Negative albedos can arise at any level within a multi-layer delta-Eddington calculation where (a) at least some diffuse down-flux exists, and (b) the total of all layers below that level is fairly highly absorbing and "semi-infinite" in the sense of Eq. (10). Test

Problems 7-9, Appendix B, illustrate negative up-fluxes at internal levels arising from simultaneous satisfaction of conditions (a) and

(b). Fortunately, in many problems of practical interest, including the earth's cloudy atmosphere, condition (b) is seldom if ever met.

The above considerations clearly point up an inconsistency in the delta-Eddington approximation for semi-infinite layers. If we regard the diffuse flux F as made up of numerous direct fluxes, then the semi-infinite albedo with only diffuse flux incident should be an inte- gral over p of Eq. (9) with F = 0. But the latter integral is always positive, while the former quantity is sometimes predicted to be nega- tive by Eq. (9) with S = 0.

While one should be aware of the problems associated with Eq. (9), we nevertheless suggest that, in two circumstances, it may be useful in specifying surface albedo, i.e. A(p0) = ao(P):

(1) when the "surface" is just an internal level (e.g., a cloud

top);

(2) when the surface can be modeled as a multiple scattering

medium, as, e.g., snow (cf. Bohren and Barkstrom, 1974) or

loose dust. 9

In both cases one must estimate w* and g* for the medium beneath the

"surface," and, to avoid negative albedos, these should satisfy w* > 1/(4 - 3g*). 10

3. MULTI-LAYER FORMULATION

Let us assume an arbitrary inhomogeneous layer to be subdivided in such a way that W and g are constant, or at least sensibly so, within each sublayer. Then the situation will be as in Fig. 1, i.e., the complete layer is modeled as a concatenation of N-1 homogeneous sub- layers with single-scattering albedos i., optical depths (AT)i, and asymmetry factors gi (all of which are scaled, remember). By imposing top and bottom boundary conditions, Eqs. (7) and (8), and requiring flux continuity across interior levels, we shall arrive at a set of penta-diagonal linear equations for the unknown constants cl, c2

[Eqs. (3a-b)] in each layer.

S

level 1 -.. T1 = 0 wl, gl (AT)1

level 2 - T

2 ,g2 , (AT)2

level 3 ------3

level N-l -. ------1 ---- T N-' gN-' ()N- 1

level N / / / / / / / / N

Fig. 1 11

The solution for layer i (i = 1, .,N-l), valid for Ti < T is s oi i ii+ 1 where Ti is scaled optical depth from the top to level i, is

il -. T G i = 2i-le + 2ie - ie (lla)

X.T -X.T H. = -P2- e + Pix ie (llb) i ix2i-1 2 - Bie

where the unknown constants for layer i are written in the notation

2i-lx =c 1(i) X ,2i -=2i c 2(i)

in order that the usual matrix-vector notation (Cx=d) for a linear system might subsequently be applicable. All told, there are 2N-2 of these unknown constants.

The interior flux continuity conditions, supplemented by top and bottom boundary conditions, Eqs. (7) and (8), are

G1 (0) + H1 (0) F

Gl (T2 ) - G2(T2 ) = 0

Hl(T 2 ) - H2 (T2 ) = 0

(12)

0 GN_2 (N- 1)GN- N- 1 =

0 HN_2 (,TN_ 1 )-HNl1 (TN 1) =

N O [^(P~o^^N-1(N = F + A(W )Se [1-A(p0)I]GN (TN)-[l+A(li0)1]- (TN) = F0 + A(p0 )p0 Se 12

This is the system of 2N-2 linear equations one must solve for the unknown constants x.. Note that we have written the flux continuity conditions in Eq. (12) in terms of G and H, rather than F (=G-H) and

F (=G+H). This is because, by so doing, the coefficients have a simpler form, and, more importantly, numerical ill-conditioning is avoided.

, Note that, by properly specifying F0 in the first equation in

(12), level 1lmay be taken somewhere below the top of a scattering atmosphere. Similarly, by properly specifying A(pO) in the last equation in (12), level N may be taken above the actual surface, for + example at a cloud top. F 0 can be used to account for a genuine source of radiation (e.g., thermal) below or at level N.

Our first attempts to solve Eq. (12) directly for the x. led to insurmountable ill-conditioning problems for layers, however subdivided, with total optical depths T such that X.T exceeded about 14. This was XiT -XiT directly traceable to the exponentials e and e in Eqs. (lla-b), which become very large and very small, respectively, in such circum- stances. However, we observed that the flux formulas at each level required, not the bare quantities xi, but rather

- iT i+l x i = e Xi- (13a) X2i-l E x2i-

ii+li- e x (13b) x2i = x2i 13

in terms of which the requisite flux formulas are

1-P + =X + (14a) F1 (l+P1 )elx 2 - (oi+3i)

l+P (1AP e F x + (1-P1 ) e1x2 (14b) 1 e 1

-Ti+l/PO (14c) F+1 = (1-Pi)x2i-l + (l+Pi)x 2i - (ai+6i)e

(14d) +l = (l+Pi) + (1-Pi) 2i - (oi-Si)e

for i=l, *,N-l, and where

.i(AT)i e E e (15)

Eqs. (14) proceed straightforwardly from Eqs. (5), (11), and (13). The only ambiguity is that flux at level i+l can be calculated from either

Gi+l, Hi+l or Gi, H i; we arbitrarily choose the latter way, since

Eq. (12) guarantees it to be equivalent to the former.

In terms of the new unknowns x. [Eq. (13)], the linear system (12) may be written out explicitly as follows: 14

1-P --- -1 x + el 1 (1+P 1) eix 2 = a + + +

A 1e ^ -T2/P 0 x + - -x - 1 X2 e3 e2 (al-ot ) "2

^ 2 - 4 -Pl + P1X2 +- e x3 -P 2 e2 x 4 = U B -- )e e2 3

^ 1 ^ -T i+v / + x2 - Ai+l2 x2i-1xi- 2i ei+l xi+l2i+ ei+lX2i+2 = (a -a+)e0

+ P ix2iA .i+ljH. ^^A ( B ,-T+l / -Pix2i-+ Pix2i ei+ X2i+l i+lei+lX2i+2 = (Si- ± i+1)e

(16)

[1-A+(l+A)PN 1 ]x 2 N_3 + [1-A-(l+A) PN 1 ]x2N 2

p -ATN/ 0 [N- N-i+A(0 S-ONl Ni)]eN + F0

The coefficient matrix,which we shall call C,has the following penta- diagonal form: 15

lC11NCl2N 13NN = C12 5 | 17 C C C C c 21 c22 °23 24 31 32 33 34

C~ C C c C |i42| 43 44 45 46

C= 5 3 C54 C55 5 6

0M1-2..M- 2 M-2,M-2 M-2,M-1 M-2,M

CM-1,M-3 M-1,M-2 M-1,M-1 M-1,M

where 2N st ian.M-2 M-

where M = 2N-2 is the size of the matrix, and all the boxed elements vanish. 16

4. THE COMPUTER CODE

We present below the special features of the computer code

(Appendix A) which solves the 6-Eddington equations of Section 3. Test problems (Appendix B), and cases of numerical ill-conditioning and un- physical results, are described. Note that, while most of the test problems consider layers all having identical values of w, g, and AT, the formulation and computer code are in no way restricted to such cases.

4.1 ELIMINATION OF w=l BRANCH

For layers with w*===l, the solution has an entirely different functional form, Eq. (4), than it does when o

Clearly this procedure introduces error, in particular spurious absorption. The only question is, is it tolerable? Test Problems 1 and 2, Appendix B, address this point; they are for non-absorbing homo- geneous layers of optical depth 1000 and 100, respectively. [Layers of lesser optical depth than these cases will obviously incur correspond- -13 ingly smaller errors.] £ is taken to be 10 , or roughly 10 times our

CDC 7600 precision. In Test Problem 1, with a zero surface albedo, com- puted fluxes agree to all the five figures edited with the correct w=l solution from Eq. (4). Net flux is constant to at least five significant figures. In Test Problem 2, with a surface albedo of 100%, net flux is practically zero at all levels, as it should be; it fluctuates randomly 17

at a level corresponding to imprecision in the LEQT1B solution (Sec- tion 4.3) and/or round-off error. Test Problem 2 also furnishes other tests of the code, namely: (a) the albedo at every level should be 100%, which it is; and (b) a static situation, in which fluxes do not vary from level to level, should develop in the interior, which it does.

Note that sometimes total downward flux can exceed incident flux, a realistic physical effect which the model is able to reproduce in both

Test Problems 1 and 2 for the 0 = 1 case.

In all cases, the errors introduced by the w=l + w=l-E replacement are considerably below what one normally incurs from using 6-Eddington rather than a more exact radiative transfer method, as discussed in

Section 5.

To understand why using w=l- in Eqs. (3a-f) does not lead to serious ill-conditioning or round-off problems, we must have a closer look at the structure of the differential equations (la-b). If these equations are written in matrix form,

y' = By + b then it turns out that the eigenvalues of B are +X:

+ + By = +Xy where X is defined in Eq. (3c) and y are the eigenvectors. The solution

(3a-b) becomes undefined precisely when these eigenvalues go to zero, but note that the rate at which they go to zero as w+1 is only as /71--. Thus the ill-conditioning of Eqs. (3a-b) as 0w+1 is strongly damped.

N.B. £ (code variable PREC) must be set properly for the user's com- puter, or the code WILL NOT WORK. E.g., one would take - 10- 7 for IBM single precision. 18

4.2 MULTIPLE DIRECTIONS OF INCIDENCE

Note that the coefficient matrix C, Eq. (17), depends on p0 only when A(p0) does. If A is independent of p0, the incident direction p0 occurs only on the right-hand side, d, of the linear equations Cx = d.

Then, once C is inverted, little extra computation is required to get

t solutions for many p0 S, over what would be required for just one. The code takes advantage of this fact when A(P0) is independent of pO; it pre-inverts C, then solves Cx = d in a loop over pO (i.e., over d) in which the inversion is presupposed.

4.3 SOLVING THE LINEAR SYSTEM

The penta-diagonal linear system Cx = d [Eq. (16)] is solved by the algorithm of Martin and Wilkinson (1967), as implemented in sub- routine LEQT1B from the IMSL Library (1975). LEQT1B makes the standard

L-U (lower triangular, upper triangular) decomposition of a row-wise permutation of C, arrived at by row equilibration and partial pivoting, and/or solves Cx = d. The "or" feature is useful in the situation des- cribed in Section 4.2 above. The "and" feature is used when A(p0) does depend on pO, since then the last row of C is a function of pO and pre-inversion of C before looping over P0 is not possible.

Note that LEQT1B allows all the right-hand sides d to be entered at once, which would avoid calling LEQT1B repeatedly as we do in the present code. But this entails adding a second dimension, for %O,to several arrays, and we felt that the speed advantage was more than

cancelled by the extra storage requirements. 19

Note also that LEQT1B destroys the matrix C. Therefore the code

takes precautions to save C, in a separate array, before calling

LEQT1B. Other idiosyncrasies of LEQT1B are described in its opening comment cards.

Comment cards in the code indicate how a second IMSL sub- routine, LEQT2B, may be used in place of LEQT1B. LEQT2B performs

iterative improvement on the solution generated by LEQT1B. On our

computer (CDC 7600 with "14 significant digits) this improvement never

changed the first four significant digits of any flux for any test

problem. The fifth significant digit was sometimes changed by ±1 when

w was near or equal to unity. LEQT2B called LEQT1B anywhere from 2 to

4 times in test problems, with more iterations being required when

w=l than when w

penalty for using LEQT2B (since calls to LEQT1B are a pacing item in

the code), with no useful increase in accuracy. We mention all this

only for the benefit of users with lower-precision computers than ours,

who may at least want to try LEQT2B to make sure that they don't need

it. If LEQT2B is used, the second dimension of the WORK array must

be increased from 3 to 10. [LEQT2B helped one user with a lower-

precision computer, in that, by taking its error exit, it showed him

that he had not properly set the variable PREC.]

LEQT2B and LEQT1B require the matrix C, Eq. (17), to be sub-

mitted in "band storage mode," which simply means that the diagonals

of C are submitted as successive columns: 20

0 0 C11 C12 0 C2 1 C22 C23 C24

C31 C32 C33 C 34

C43 C44 C45 C46

C53 C5 4 C55 C5 6

0

CM-2. M-41 CM-2,M-3 M-2,M-2 M-2 ,M-1 CM-2,M 0O CM-1,M-3 M-1 ,M-2 CM-1,M-1 CM-1,M 0 0 M.M-2 CM,M-1 CMM b

The elements of all but the first and last rows of this matrix are set in a DO-loop over row pairs, with the first row of each pair having a leading zero, the second a trailing zero.

Vis a vis the error exits in LEQT1B and LEQT2B, we may note that numerical (algorithmic) singularity simply means failure on account of a small pivot element. The matrix C may or may not be mathematically singular in such a case.

4.4 ILL-CONDITIONING

One advantage of using LEQT1B and LEQT2B is that they check for ill-conditioning in the linear system Cx = d. That this is a wise safe- guard, is shown by the fact that these routines have detected three instances of ill-conditioning already. The first two were mentioned in Section 3, namely (1) formulating continuity conditions, Eq. (12), in terms of F and F rather than G and H, and (2) trying to solve 21

for the actual unknown constants x rather than the exponentially-

scaled ones x.

The third instance of ill-conditioning arises from the simultan-

eous presence of exp[Xi(Ar)i ] and exp[-Xi(Ar) i] in the coefficient matrix C of Eq. (16). If iX(AT)i > A0 (A0 ~ 14 for our computer) for

any i, these two exponentials differ by many orders of magnitude, and

C is regularly flagged as ill-conditioned. Such a layer of course has

a large absorption optical depth, and is "semi-infinite" in the sense

of Eq. (10).

Initially we dealt with such layers by making the upper boundary

of the uppermost one the new "surface," and zeroing fluxes at all lower

levels. This, however, raised the problem of specifying the albedo

A(po) of the new "surface." The obvious choice was A(p0 ) = a(p 0 )

[Eq. (9)]. But a ('0 ) depends on the mix of diffuse and direct radia-

tion striking the new "surface." That mix in turn depends on ao(P0).

Thus we were forced to determine A(p 0) by an iterative procedure.

While this iteration converged rapidly in several test problems, it

necessitated several solutions of the n-layer problem (albeit with a

reduced number of layers), and furthermore sometimes converged to

negative values of A(p0 ), for the reasons put forward in Section 2.

Therefore we abandoned the iterative procedure in favor of one

which is both simpler and faster; namely, subdividing each layer with

Xi(AT)i > A 0 into K equal sublayers, such that

(AT)i i o * 22

This subdivision is invisible to the user in the computer code of

Appendix A; fluxes are returned only at the originally-specified levels. The only danger is that the added internal layers may cause array dimensions to become inadequate; if this happens, an internal check in the code stops execution.

Test Problem 3 shows the effectiveness and stability of the sub- dividing scheme in a difficult case in which there are 10 layers, each of optical depth 100 and single-scattering albedo 0.8. The scheme must divide each layer into 4 sublayers. While all the fluxes below level 1 are practically zero, the important point is that they are calculated in an entirely well-conditioned way.

N.B. The variable A0 (CUTPT in the code) is machine-dependent.

Computers of lower-precision than ours will require A 0 to be propor- tionately smaller than the value, 14, which we use.

4.5 SPURIOUS AND NEGATIVE FLUXES IN HIGHLY ABSORBING CASES

Consider, in the one-layer 6-Eddington formulas (3), a purely absorbing w*=w=O case. Then, since there is no scattering, there should be no diffuse down-flux if there is none incident (F0 0).

But we can only have F 0 in Eq. (5b) when cl = c2 - 0 in Eqs, (3a-b).

Since the 6-Eddington approximation will always predict non-zero values for cl and c2 when surface albedo A # 0, it is clear that a spurious diffuse downward flux F+ 0 is predicted when w = 0 and A # 0.

Furthermore, F is negative, and negative values of F can be found all the way up to 0w0.5 in certain special cases. Because negative fluxes are unphysical, and because their occurrence tends to shake 23

faith in the whole 6-Eddington approximation, we explore them here in some depth.

+ If we solve for F2 , Eq. (14c), for an w=0 layer of optical depth AT, we arrive at

+ / 2 2 F2 = ( - -)x + ( +-)x

= 43i F0 (F0 + AO Se )sinh(/3 AT) (18) where

D = (A+7)sinh(/3 AT) + 4/3 cosh(/3 AT)

Now D > 0, so F < 0 when

0 < 0(F+ Ap0Se (19) (F<± 0 , (19)

+ +4- -AT/1 0 Thus F < 0 when F =0, and F > 0 when F ASe = 0 (in 2 2 particular if F = 0 and only diffuse flux is incident on the layer).

Other cases depend on inequality (19), Loosely speaking, the greater the proportion of diffuse flux incident on top of a layer, the less likely that F2 < 0. Note that the right-hand side of (19) grows exponentially with AT if p0 > l//3 or F0 #0 and decays exponentially with AT if p < 1//3 and F0 = 0. Thus (19) is much less likely to be satisfied in the latter case; furthermore the p0 = 0.2 < 1//3 and

P0 = 1.0 > 1//3 cases in the test problems are sharply distinguished. 24

+ When F0 = 0, which is true for all our test problems, it follows from Eq. (18) that

+ -AT/p0 F 0 F2 + loSe > 0 so that total downward flux is always positive - only its diffuse part may become negative. [This seems to be true for all single-scattering albedos, not just w=0.]

Test Problem 4 shows negative values of F predicted for a 10- layer case in which each layer has w=0 and AT=0.1. The surface albedo is 100%. This problem has the largest (in magnitude) negative F we have ever seen, and it is only -0.02, or 2% of the incident flux S=l.

F always becomes less negative as either A falls or W rises. For example, Test Problem 5 is like Test Problem 4 except w* has been raised to 0.2, and this clearly and sharply reduces instances of nega- tive F.

Test Problem 6 shows nearly the largest value of w* (0.4) at which we have ever observed negative F . Note that this is an optically thin case. For optically thicker cases, e.g., Test Problem 5, negativity disappears at considerably smaller values of w*. However, this nega- tivity threshhold in w* rises as the asymmetry factor rises, so for g* exceeding the value 0.85 used in our test problems, it would be larger.

If the layers in Test Problems 4-6 are surmounted by a "flux- diffusing" layer, i.e., a layer which significantly scatters the inci- dent beam, then negative fluxes are reduced in extent and magnitude, or even eliminated, depending on the diffusing power of that layer. In 25

general, our argument following Eq. (19), to the effect that increasing

incident diffuse flux mitigates the negative F problem, is borne out

for all single-scattering albedos, not just L0=0.

In mitigating negative down-fluxes, however, a diffusing layer may

force negative up-fluxes to appear, as in Problem 7. The reasons for

this have been explained in Section 2 (while Section 2 dealt with semi-

infinite layers, in practice fairly small optical depths may trigger the

negativity effects described there). Problem 7 considers a non-absorbing

layer of optical depth 0.1 surmounting 10 purely-absorbing layers, each

of optical depth one. Most of the up-fluxes in Problem 7 are negative,

and one may observe a particularly bizarre case (for P0 = 1) where nega-

tive up- and down-fluxes occur together -- although never at the same

level. Such cases are very rare, since direct radiation causes one

type of negativity, diffuse radiation the other, and only a very narrow

range of the diffuse-direct mix can excite the two types of negativity

simultaneously.

Test Problems 8 and 9 are aimed at showing negative up-fluxes,

and how they can persist up to values of 0.6 or so in single-scattering

albedo. We have 10 layers, each of unit optical depth, and a surface

albedo of zero. The single-scattering albedo is 0.2 in Problem 8,

0.6 in Problem 9. Negative up-fluxes exist at both incident direc-

tions in Problem 8, but only for the more grazing direction in

Problem 9.

No negative fluxes, either up or down, have ever been observed for

> 2 0.8. Thus they will never be seen in a goodly number of cases of 26

practical interest, including clouds and most aerosols in the solar spectrum.

Negative fluxes represent only a particularly glaring and unplea- sant aspect of error in the delta-Eddington approximation. Positive fluxes may also be in error, obviously. One's primary concern should really be with the size of the error; and on this score, the news is good. In the most pernicious negative flux cases we have been able to manufacture, error has never exceeded about 5% of the incident flux S.

Typical errors are much, much smaller. The typical situation is that the correct flux is positive and very small, while the corresponding delta-Eddington negative flux is also very small in magnitude. Many examples of this are furnished by Test Problems 4-9. Indeed, most of the negative fluxes which one normally encounters are so small that they are completely and utterly negligible.

A warning: do not yield to the temptation to set negative fluxes to zero. The price is loss of guaranteed flux conservation and heating rate positivity. Most fluid dynamic models want fluxes only at the top and bottom, where negativity is least likely to arise. They want only heating rates in intermediate layers, and since heating rates are delta-Eddington's forte, it would be the height of foolishness to meddle with them by enforcing flux positivity. Indeed, one may turn the tables and regard the negative fluxes as necessary in order to attain the more important goal of positive (and accurate) heating rates. 27

4.6 FAILURE TESTING

We took to heart the maxim of Johnson (1976) that no code should be accepted as satisfactory until it has been stressed, pushed to the breaking point if possible -- a procedure he calls "failure testing."

That is how we uncovered some of the quirks of the delta-Eddington method which were discussed above.

Two other sets of "failure tests" deserve mention. The first set occurred naturally in the course of doing 80-spectral-interval, cloudy- atmosphere solar radiation calculations [Wiscombe (1976)]. Here, with- out ever failing or giving bad results, the delta-Eddington code of

Appendix A handled a wide variety of optical depths (including numerous thin-thick juxtapositions), asymmetry factors, and solar zenith angles.

Single-scattering albedos were, however, mostly contained within the range 0.9 to 1.0, except for clear regions of pure water-vapor absorp- tion for which c=0.

The second set of tests selected random numbers for optical depths and/or single-scattering albedos, in a wide variety of ways, for a

40-layer atmosphere. Again, no failures could ever be provoked. Thus one may have confidence that Appendix A furnishes quite a 'robust' code.

4.7 SPEEDING UP THE CODE

For applications in which computer time is critical, there are two principal ways one may speed up the delta-Eddington code. First, use a fast exponential, of lower precision, rather than the normal software

"EXP" routine. Second, adapt LEQT1B particularly to penta-diagonal systems with one right-hand side, transmit its argument list through a 28

common block, and explicitly take account of the alternating zeroes in the outermost diagonals. 29

5. ACCURACY

Joseph et al. (1976) discuss delta-Eddington errors for single layers at some length. Errors for multi-layer cases are shown in

Wiscombe (1976) and in Lenoble (1976). Since the author performed the comparisons for the Lenoble report, and since that report may not be readily available to many readers, we have taken the liberty of repro- ducing these comparisons in Appendix C. Details are given there. One may perhaps summarize by noting that accuracy deteriorates somewhat at

interior levels, as compared to the top and bottom boundaries where

the errors shown by Joseph et al. (1976) and Wiscombe and Joseph (1977)

are more typical. Flux errors at interior levels may be as large as 5%

or so of the incident flux at the top boundary. Heating rates across

interior layers are generally somewhat more accurate than interior

fluxes.

Lenoble observes that, among the many approximate methods com-

pared, delta-Eddington and one other are tied for the best overall

performance. Thus, in the cases where one finds delta-Eddington to

be not terribly accurate, one may rest assured that other methods of

comparable simplicity are probably worse. 30

REFERENCES

Bohren, C. F. and B. R. Barkstrom, 1974: Theory of the optical pro-

perties of snow. J. Geophys. Res. 79, 4527-4535.

International Mathematical and Statistical Libraries, Inc., 1975:

Library 3, Edition 5 Reference Manual (IMSL LIB3-0005). Avail-

able from Sixth Floor, GNB Bldg., 7500 Bellaire Blvd., Houston,

Texas 77036.

Johnson, T. H., 1976: Failure testing: a proposal for increasing

confidence in the results of numerical simulations. J. Comp.

Phys. 21, 245-250.

Joseph, J. H., W. J. Wiscombe and J. A. Weinman, 1976: The delta-

Eddington approximation for radiative flux transfer. J. Atmos.

Sci. 33, 2452-2459.

Lenoble, J., ed., 1976: Standard Procedures to Compute Atmospheric

Radiative Transfer in a Scattering Atmosphere: Numerical Com-

parisons of the Methods. Under auspices of Radiation Commission,

International Assoc. of Meteor. and Atmos. Phys. (I.U.G.G.),

available from Universite des Sciences et Techniques de Lille,

U.E.R. de Physique Fondamentale, Laboratoire d'Optique Atmos-

pherique, B.P. 36-59650, Villeneuve d'Ascq, France.

Martin, R. S. and J. H. Wilkinson, 1967: Solution of symmetric and

unsymmetric band equations and the calculation of eigenvectors

of band matrices. Numer. Math. 9, 279-301.

Wiscombe, W. J., 1976: Radiative fluxes in a cloudy atmosphere using

the delta-Eddington approximation. Abstract Volume, Symposium on

Radiation in the Atmosphere, Garmisch-Partenkirchen, West Germany.

Wiscombe, W. J. and J. H. Joseph, 1977: The range of validity of the

Eddington approximation. Icarus (accepted for publication). 31

APPENDIX A:

LISTING OF COMPUTER CODE FOR THE

MULTI-LAYER DELTA-EDDINGTON APPROXIMATION 32

MAIN PROGRAM (DRIVER)

Set input variables (common block IN)

Call subroutine DELTED

Edit computed fluxes (common block OUT) 33

PRoGRAt DPIVFR C C CALL DELTA-EDnINGTON POUTINE AND EDIT COMPUTED FLUXES THEREFROM C REAL MLUIUN LOGICAL MUDEPT COMMON/TN/OTAU(5n),*OM cO),,G(S0), MUSUN(20n) ALB(20) SOLFLX*FDINC, * FFUINCMlJDEPTq7Z,N71M ,NSOLNLFV COMMON/OUIT/D TR (n ,O) ,FLXU (50 ;on ,FLXD (,n ,20) C LEVEL DIMENSION DATA NLFV/50/ C SUN ANGLE DIMFNSION (TN ARRAYS MUSUN, IR*FLXDFLXU, FLXSUNALB ) DATA NSUN/0O/ DATA NZ/11./ DATA G/lnO0.RS/ DATA NSOL/?/, MUSlJ/n .,91 .O/ DATA MUDFPT/.FALqE./. ALR/O./ DATA SOLFLX/../, FOINC/ 0 ,/. FUTNC/O,/ C NZMI = N7-1 IF'(NZ.GT.NLPV .OP. NqOL.GT.N;SU\l) STOP OTMERR C DO 5n00 NT = 1 , UTA = l0.*(NT-3' Dn 5 I = 1,N7M1 5 DTAU(I) = OTA DO 500C NO 1, DO 10 I = 1,NZl1 10 OM(I) , .^.NO UO 50o00 t,14 1,2 IFO(!TA.rtT.11, .AhlD. eM(1).LT.0.7Q) GO TO 5000 IF(NA, EQ.1 ) aLB(i') = O. IF(NA.EO.?) ALR(1) = 1.0 C WpITE OUT INPl!T VART!ALES wRITE (f.lc()0 N7.SOLFLXgFDINCFltNCNSOL, (MUSUN(NP),NP=1,NSOI.) IF (MIJnDT).MALB - ISOL 1F .NOi.MLDEPT) !Ale = 1 WR I TE (6 1 0 ) ( A R I) T =1 NA LB) WRI rF (6 100?) (T .DTAU (I) OM ) ,G I ), I=1 ,NZM1 C CALL OELTFD C C FDIT qFrSLLTS C UO 600 \IP = 1,NSnL WRTT F( 6,?nOO) MUI.JI (NP) D) 60 I = 1 .N7 C rDOW!FL TOTAL DOWN-FLU.IX AT LEVEL -I- (DIR+FLXD) C FLJX NFT FLUJX AT LEVEL -I- (DTP+FLXD-FLXU) DOwNF. nDTR ¢I.NP) FI.XO (I NP) r-LI.X = DOWNFLXFLYUI INP) 600 WRTTF (f,001) IDIR(ItNP)LXDNPFLXD,NP)DOWNFLFLXU(INP)FLUX 5000 CONTINUE C 34

CALL EXTT 1000 FORMAT (Il, 55(1Ht ) / ?X, *RADIATIVE FLUXFS FOR VERTICALLY. , *INHOMOGENEOUq*/2X,,*LAYEREn ATMOSPHERE BY DELTA-EDDINGTON ,* * *APFPOXIMATIONs / 5( 1H*) //* NUMBER OF LEVELS-- NZ r*I4/ * * INCIDENT DIPFCTr-EAM FLUX"- SOLFLX*E1 2.4/ * ·* INCTOFNIT DIFFUSF DOWN-FLUX-. FDINr=*E2l.4/ * t INCIDENT DIF'USE UP-FLUX AT ROTTOM ROUNDARY-- FUINC=*E12.4/ ** * NUMBER OF DTrFCT-BEAM ZENITw ANGLES-- NsOL=*I4/ * * COSINES OF rIPEC.T-REA4 ZENITH ANGLFS-- MUSUN=*(10F,.4)) 1001 FORMAT(* S$UJFACE AI.BFDO(S)-- ALR=* (OFR.4)) 1002 FORMAT( / * LAYEQ,.4X,*OP DEPTH.4X,*SIlNGSCAT ALB#,4X,ASYM FAC*/ * (I5 ,F13.4,F17.4.F2. 4 )) ?ooo FORMAT( // * MUSUIN =*F8.4/13X,* nTRECT*,cXt*DIFFUSE*97X,*TitOTAL .SX, *TFFULSE*/* LEVEL*, 8x ,i *Fl X* ,5X O WN-FLUX4, 4XX DOWN-FLUX* * 6X. LJUP-FLLJUX*,5X. *i.IET FLUX*) o001 FOpMAT(It,SE13.. END 35

SUBROUTINE DELTED

X AT > A0

Subdivide layer into N sublayers, each of optical depth AT/N, where X AT/N < A0 , and set X, P, etc. for each sublayer

YES

STOP

RETURN 36

SURROUTINE DELTFr) c= C CALCULATF UP- ANn nOWN-FLUXES OF RADIATTnN IN A VERTICALLY INHOMO- C (E.NEOUS ATMOSPHEPE USING THE DELTA,-EDDINGTON APPROXIMATION C AUTHOr-- WJ1. WTICOMBE C NATIONAL CENTER FOR ATMOSPHERIC RESEARCH C p.O. ROX 300n C ROULDER, COLORADO 80303 C C INPUT VARIARLES C NZ NUMRER OF LFVF'LS (LEVEL I S THE TO OF THE ATMOSPHERE, C LEVEL NZ IS THE SURFACE) C DTAU(I), I=] ,...,N7-1 OPTICAL rEPTH OF LAYER BETWEEN LEVELS I AND 1+1 C OM(I), I=1,....NZ-1 = SINGLE-SCATTERING ALBEDO OF LAYER BETWEEN C LEVELS I AND 1+1 C G(I), I_- , ... NZ, 1 - ASYMMETRY FACTOR FOR LAYER BETWEEN. LEVELS I AND 1+1 C NSOL - NUMREQ OF INCTDENT-BEAM 7?NITH ANGLES C MUSUN(I)*I=1 .... NSOL = COSINE(S) OF INCIDENT-BEAM ZENITH ANGLE(S) C ALB (I) I=i .... KNSOL = SURFACE AiBEDO C MUDEPT = TRUE9 ALB(I) CORRESPONr)S TO MUSIIN(I). FALSE, ALB(1) IS C USED FOR ALL VALUES OF MUSUN(I', C SOLFLX = INCIDENT-REAM FLUX (NO.MAL TO REAM) AT LEVEL 1 C THE BEAMl) AT THE TOP OF THE ATMOSPHERE C FDINC = TNCIDENT DTFFUSE DOVWNr-FLX AT LFVEL 1. C FUINC = TNCIDENT DTFFUSE UP-FLUlx AT LEVEL NZ C NLEV = LFVEL DIMFNSION (OF ARRAYS DTAU9 FTC,) C C OUTPUT VARIARLES (IN SAME LUNITS AS SOLFLX, FDINC, AND FUINC) C DTR (T ,NP) DTPFCT FLUX AT LEF\EL -I- FOR SUN ANGLE -NP- C (NOTE--IN THE DELTA-EDDINGTON APPROXN, BECAUSF OF THE C TQUNICATION OF THE FORWARD SCATTERING PEAK. THIS C QIl.AMTTTY INCLUDES SCATTERED RADIATION TRAVELLING IN C VFPY NEARLY THE SAME DIRFCTION AS THE ACTIJAL DIRECT C FLU X. E.G., IT INICLUDES THE AUREOLE AROUND THE SUN.) C FLXD (T ,NP) rDFFUSE DOWN-FLIXJ AT LEVFL -I- FOR SUN ANGLE -NP. C (NOTE--THIS$ WILL nE LESS THAN THE ACTUAL DIFFUSE C DOwN-FLUX BY THF SAME AMOUNT THAT THE DIRECT FLUX C -DTR- IS AUGMENTFD.) C FLXU (T ,NP) DTFFUSE UP-FLUX AT LEVEL -I- FOR SUN ANGLE -NP- C C INTERNIAL C CODE VAPTARLF DESCRIPTION (OR NAME IN WRITE-UP) C GP G-PPI:ME (TRANSFORMED ASYMMETRY PARAMETER) C OMP ONMFA-PP,,ME (TRANSFORMED SINGLE SCATTERING ALREDO) C DTAUlP DFLTA-TAU-PRIME (TRANSFORMED LAYER OPTICAL DEPTH) C CUlMuLATIVF OPTICAl DEPTH FROM TOP (I=1) TO LEVEL I C LAMBRDA-SUR-I C PP(I) P-S!IB-I C LMDTAU LM (! ) *OTA(.UP C EX(I) EXP (LMrTAU) c EXSUN(T) FyP t-TAJ (I)/MULIUN NP) ) Cc AL'PH I) AL PHA SUB-I C BETA (I) R TA -SUR- C TX(I) O,.7 *SOLL.LX*OMP f 1'.,GP *( .-OMP)) C Ty(I) On.. SnLFL XOMP TZ(I) 3.*GSP ,(1 .-OMP) 37

C (TX,TYT7 APE MFRFLY INTERMEDIATE QUANTTTIES FOR COMPUTING ALPH, BETA) C ISAV ARRAY OF LEVEL INDICES. FLUXESARE CALCULATED ONLY C AT THFSE LEVELS. C FLXSUN (NP) INCIDDFNT FLUX MUSUN(NP)*SOLFLX AT LEVEL 1 C PREC A NU!MBER SOMEWHAT LARGER THAN THE COMPUTER PRFCISION, C SIURTRACTED FROM ANY SINGLE-SCATTERING ALBEDOS WHICH C APE EXACTLY EQI'JAL TO ONE. C CUTPT ANY LAYER FOR WHICH LMDTAIJ.GT.CUTPT IS SUBDIVTDED C INTO EQIUAL SUBLAYFRS, ALL OF WHICH HAVE LMDTAU.LT.CUTPT C NSU9 NiIMREq OF SUBLAYEpS INTO WHICH AN OFFENDING LAYER C IS DIVIDFD (THE WHOLE PROCESS BEING TRANSPARENT C Tn THE USER) C N L2 2*NLEV-? (INPUT Tn RANDED MATRIX SUBROUTINE) C C$SS(NL? (NL~ ,ST) ) THF PENTA-DIAGONlAI. MATRIX C, IN BAND STORAGE MODE C CC (NL? ,;) SAMF AS -SS- ARRav. USED TO SUBMIT .SS- TO LFQT1B. C WORK(NL?,3) . TEMPORARY STOPAGE ARRAY USED RY SUBROUTINE LEQT1B C X (i L2) THE VECTOR (X-HAT). ALSO TEMPORARILY STORES C PH.S, ) IN LINEAR SYSTEM C*(X-HAT) = D, C C -- NOTE-. THTS COnE IS NOT PERFECTLY OPTTMIZED, EITHER IN TERMS OF C COiF STOPRGF OR EXECUTTnN SPEEn, BUT IT SHOULD RE NnTED THAT, C TN GENEQAL9 THE LIONS SHARE OF COMPUTING TIME Is OCCUPIED IN C THE EXPONENTIALS AND THF PENTA-nIAGONAL SOLUTION ROUTINES, C SO FLIMINATING A FEW OpERATIONS HERE OR THERE HAS ALMOST C NO IMPACT- ON RUNNING TTME. C REAL MlUSUN LOGICAL MIt.jEPT COMMON/TN/DrTAU(S.) ,OM (50 ) ,,G (0 ),,MUSUN(2n' ,ALB (P0O) SOLFLX,FDINC, * FUINC,MIIDEPT . kN7Ml NSOLNLF\I COMMION/OtIT/DTR (nO ,n ) ,Fr'XJ (5 ;,n ) ,*FLXD (; ,20 ) REAL LM COMMON/TNTFPN/SS'f e9Q) ,CC(9g8,,) .wAORK (98,') ,X(98) ,TAU(50) ,LM(50) PP (5o), X(O') , ExSUN (50), ALPH (50) RETA (O'), , TX (50,TV0) * TZ(Sn), .SAV(50), FLXSUN(?O)20 NL? REAL LMTAUJ DATA Cl/p,6666666666667/ C 0 i***t0************* n X COMPUTER PRPCIS ION ******************* DATA PRFC/T.F-13/ C '4*"*'*"***'***CUT-OFF POTNT FOR LM (I) *TAUP *s****##***# DATA CUTPT/14,/ C C SET ICIrDENT F, IJw AT TOP OF ATMOSPHERF DO 5 NP = 1 ,SOl 5 FLXSUN(NP) MUSUN(NP)*SOLFLX C NL2 = 2*NLFV-2 C C SCALE OPTICAL DEPTH, SING-SCAT ai BEDO' AND ASYMMETRY FACTOR C AMND CALCULATE VARTOUS FCNS OF THESF VARIaBLES

TAu(1)I 0. DO 10 I = 1.NZMI FF = G (T)** GP = G(T)/( .,+G(T)) SCALF = I .- FFOOM (I ) 38

UMP (1 .- FF) OM(I )/SCALE IF (OM(I). F0Q .10) OMP = .,-PREC TI = 1-OMP#GP LM(I) - SQRT(3.*(1.-OMP)*T.). PP I) = C *LM (I) T1. T1 = GP*(1.-OMP) TX(I) = 0,75 SOLFLX ,nMP (1.+Tl) TY(I;) = n .54*SOLFLX* OMP TZ(I) = ..tT1 ISAV(I) T UTAUP = SCALF*DTAU(I) LMDTAU = LM(T)*r)TAUP C TEST FOR A LAyER WHICH IS SO HIGHLY ARSORBING THAT IT WOULD C CAUSE ILL-CON ITInNING IN THE PENTA-DTAGONAL.MATRIX. I F ONE C IS FOI!ND, SUBDIVIDnE IT APPROPRIATELY. IF('LMDTAlUGT.CUTPT) GO TO 15 EX(I) = FXP(LMDTAUtJ TAU(I+1) TAU(.lT+rTTA.UP 10 CONTINUE ISAV(NZ) - MZ C C NORMAL CALCUt'ATION C IF NZ EQ.2) CALL ONELAY 1F(N7.GT.2) CALL NLAYDE(NZ) GO TO 500 C C SIDESTEP POTENTIAL ILL-CONDITIONING BY SUBDIVIDING OFFENDING C LAYER, ANn ANy nTHERS LIKE IT. C 15 LAYERS = N7M1 KTR = I C 20 NSIJB = LMDTA/CIJTPT 4 1. DTAUP = DTAJP/FLOAT (kS!.J)B EX(I) = ExP(LM(InTA UP) TAu(I+I) = TAU(I)I nTAUP IP1 = I+1 IUP = I4NSUP IUPM1 = IUP-1 DO 30 IIP] ,IpM1 LM(II) I M(I) PP(II) = PP(T) TX(II). TX(T) TY(II) = TY(T) TZTII) = T7(I) E.X II) = FX (I) 30 'AUL(II+ ) = TAU(TJ) + OTAUP KTR = KTR+¥ ISAV(KTP) = ISAV(KTR-1)+NSUB LAYERS = LAYFRS+NS!'B-1 IF(LAYERS.GTNLF\') STOP DIMERR C IF(IUP.rT.LAYERSI (Sn TO 100 DO 50 I IlP,LAYFPS FF = G(KTR)**2 39

GP = G(KTP)/(I!,+,(KTP)) SCALE = 1.-FF*OM(KTR) OMp = (1 .- FF) *OM (KTR)/SCALE 1F(OM(KT) .EO..?e,) OMP - 1.-PREr Ti : i,-OMP*GP LM(I) = SORT(3. (1 -OMP) *T1 ) PP(I) = Cr*LM(I)/T1 T1 = GP*(l. -OMP) TX(I) = 0.75?SOLFLX*OMP( 1.+T!') TY(I) = O).;*SOLFLXOMP- TZ'(I) = 3S.T1 DTAUP = SCALE*DTAU(KTR) LMOTAU - LM(T)*DtAIIP C TEST FOP A LAvE WHICH IS SO HIGHLY ARSORBING THAT IT WOULD C CAUSE ILL-CONnITIONING IN THF PENTA-DrAGONAL MATRIX. IF ONE C IS FOUND., SULJAIVIDE IT APPROP RIATELY. IF (LMDTAlJ.GT.CUTPT') O TO 20 EX(I) = FXP(LMDTAL.I TAU(I+Il = TAtJ(I'. OTAIJP KTp = KTP+] ISAV(KTP) = TIAV'KTR-1)+1 50 CONTINUE C ]00 CALL NLAYDE(LAYEpSI1) C 500 CONTINUE RETURN END 40

SUBROUTINE ONELAY

C DO ONE-LAYER CASF SEPARATELY, STNCF MULTT-LAYER FORMALISM BREAKS C uiOWN FOR ONE LAYFR (SYSTEM IS NO LONGER PENTA-DIAGONAL)r C REAL U$USU LOGICAL MIJDEPT COMMON/IN/DTAU(5n,) ,OQ(50) G(50) ,MUSUN (2noALB (20 ) SOLFLX,FDINC, * FUI NC, MUDFPT, K7.N7M1 *NSOLNLFV COMMON/O!T/D IR (5 ,p? ) , LXU (5Q ,On ) ,FLXD (5n ,24) .2... REAL LM COMMON/TNTERN/SS'(9Rq) CC(98.5) ,WORK(98,3) X(98) ,TAU(50) ,LM (.0 , * Pp(5n), Ex(xO', ES(N(50) ALPH(50), 9ETA (50 , TX(50), TY(50) TZ(5), ISAV(50), FLXSUN(20), NL2 C PP1 = 1.+PP(I) PM1 = 1-PP(1 ) All = Pql1/EX (1) Al? = PP1,EX(1) IAL = 1 DO 10 NP = 1,NSOI. RMUO s 1./MUSUN(NJP) T1 = RM.JL I** -LM (1 ) 4,P iF(T lEO.U.) STOP SI^JGI ALPH( ) TX (1)/'1 BETA (1) - TY (1 ) (MIJSUN (NP) 4TZ (1 )RMUO)/T1 SOLEXP = FXP(-RMHIO*ITAU(J ) IF(MUDEPT) IAL - NP A21 = PP1 - ALB (TAL) *PM1 A2? = PM1 - ALB(TAL)*PPl Dl = ALPH ) .BETA(1) *FrnINC U? = FUTNC + SOLFXP*(ALPH(l')-BETA(1) + ALB(IAL)*(FLXSUN(NP) * -ALPH ()-BF¢TA(1))) X(]) = (D144A22-D?,I12)/ AlliA2?.AA?21A12) X(2) = (1-A41 l*X l) )/Al DIR(1,NP) = FLXSIJN NP) DI(P?,NP) = FLXSJN(NPD) *SOLEXP FLXD(1,NP) = FDINC FLXD(2,MP) = PM1,X(l) + PP1iX(?) - (ALPH(1)+BETA(1)) SOLFXP FLXU(1,t IP) = PP1/FX(1)* X(!) + Pm v*EX(1)*X(?2)-(ALPH(1)-BFTA(1)) FLXU(2,NP) = PP1*X(1) + PMI)X(P) - (ALPH(1)-BETA(1))*SOLEXP 10 CONTINuF C RETURN ENn 41

SUBROUTINE NLAYDE

r-I Set first row of coefficient matrix C (Eq. 16) 1

I~ ______00I ~ ~ a- Set middle rows of matrix C in loon over row pairs

dA/dVp + 0 dA/dpo = 0

dA/dp0 0

Set last row of matrix C

I> Save C

[ Solve Cx=d for x (Eq. 13)

ICalculate fluxes (Eq. 14)

End loop over 1O

RETURN 42

SUBROUTTNE L,.AYr)F(TB') C C MULTI-LAYER DELTA-EDDTNGTON C IB = NUMBER OF LEVELS C C THE TOP AND BOTTOM qOIJNDARY CONIITIONS PLUS THE FLUX CONTINIJITY C CONrDITTONS AT EACH TNTLRIOR LEV-L FORM A PENTA-DIAGONAL SYSTEM C nF 2?IR-? EQUATIONS FOR THE UNKNOWN CONSTANTS (p FOR EACH LAYER). C THE COLIMNS OF THE -SS- ARRAY CONTAIN THE DIAGONALS OF THE COEFFI- C CIENT hMATPIX. THE LOWERMOST DIAGONAL IN COLUMN 1, ETC, 'THIS IS THE C SO-CALLED 9AND sTnRAGE MODE REQIUIRED By IMSL ROUTINE LEQT2B), C REAL MULJUN LOGICAL MIOFPT COMMON/TN/DTAU (n ) , OM (0 , G (c0 ) ,MUSUN (2n'\ ,ALB (20) ,SOLFLX ,FDINC. 4 FUINC,M.JDEPT, NZ N7Ml NSOL,NL.FV COMMON/OLIT/D!R (n5o,0) ,FxU (50 ,n ,FLXD (; ,20 ) HEAL LM COMMON/TNTFRN/SS S ,)CC(98 .) ,IAORK (98, ,) ,X (9) .TAU (50) ,LM (0) * PP(50), EX(0;). ExSUN (S'), 4A. H(50), ETA (50), TX(50), TY(50), * TZ(5n') , ISAV(50', FLXSU (?0), NL2 C IBM1 =TP-1 LAST ?2*TR-? SS(1,1) = SS(1*, ) =t .S(1,5)=n, SS(1,3) =(1,-PP(T'))/mX(1) SS(1,4) =(1 ,PP (1)) X (1) LASTM? = LAST-P DO 100 j = ,LASTMP, 1 = J/2 IPl = I+1 SS(J,1) = 0. SS(J,2) = 1., SS(J,3) = .n SS (J,4) = - ].O/rX (1 1) SS(J,5) = - FX(TP1) 5S(J+1,1) = PP(T) SS(J+l,?) = PP(I) SS(J+1 ,') = PP( IPi)/FX(IP ) SS(J+1,4) = -PP(TPl) *FX(IP1) SS(J+,1 .) = n 100 CONTINUF SS(LAST,1): SSS(LAST.4) = SS(LAST,_c) - o. IF (MUDEPT) GO TO 10 SS'(LAST,2) 1.+PP(TRMl) - ALR(1)*(1.-PP(IBM1)) SS(LAST3.) I=.- PP(TRM1) - AL (1) (1,*.PP (IBM1)) C C CALCULATE THE L-I DECOMPOSITION OF PENTA-DIAGONAL MATRIX -SS- C C LEQT?R CALL FOR TFSTING PU.JPOSES C CALL LE(T?R (SSLAST r,.2,NL2, X 1 IL2 1 ,WORK,NL?,WORK(1 8)) c c LEQT1R DESTROS; THE INPUT COFfF MATRIX, SO SINCE WE Ml.ST c PRESFRPVE -SS-, wE MUST LET IT DESTROY -CC- INSTEAD. DO 120 TC = 1T, UO 120 TR = 1 ,LAQT 43

120 CC(IRIC) = SS(!,TC) CALL LEOTIc(CCLAST,?,2,NL2 ,X,1,NL2, 1 .WORK) C C FOR EACH SUN ANnLF, CALCULATE THE R.H.S, OF THE BANDED SYSTEM, C SOLVE, AND USE THE SOLUTION TO rONSTRUCT THE FLUXES AT EACH LEVEL C 150 DO 400 NP - 1 NS.L RML!O = I1 /MUJUN(NP) T1 = RMLU0I.*-LM (l)** IF(Tl*EO.O.) STOP S.INGU ALPH( ) r. TX(1)/T1 bETA (1) = TY (I.) (MUSJN (NP) *TZ (1 ) RMUO )/T1 X(1) S AL.H (] ) +nrTA (1 ) +DINC C DO 2o0 J = ?,LASTMPf? I = J/2 IPl = I+1 T1 = RMI.Jn ? -LM ( TP1 ) * ALPH (IP) TX (IPI)/T1 HETA (IPI) , TY(ITP1)*(IMUSUN(NP)*T7(IP1)+RMUO)/T1 EXSUN(IPI) = EXPf-PMIJO*TAU(IP ) ) X(J) = ALPH(I ) -ALPHIP1 ) * EXq;JN(IPI) X(J+i) = (9ETA(I)-RPETA(IP1)) * vySUIN(IPl 200 CONTTNUF LXsUN(IR) FXP(-.PMUn*TAU(IR)) C IF(MLJOEPT) (O TO ?c() ALPOO = ALR(1) IJOB = GO TO 27; 250 ALPDO = ALR(NP) IJOB = n SS (LAST ,) = 1,+pp(IRPM) - ALBI(!P)(I].-PP(IBM1)) 5S(LAST,3) = 1.-PP(IlMI) - ALB (!P)*(1i+PP (IBM1) ) DO 260 T(C = 1 , DO 260 TP = 1 ,LAT 260 CC(IRPIC) = SS(IP,TC) C 275 X(LAST) = (ALPH(TRM1)-qETA(IBM]) + ALBDO*(FLySUN(NP) ·* -ALPH(I-M1 )-BFKTA (IBM1) ) )*EXSIN\ (IR) + PUINC C C SOLVE PFNTA-DIAGnNAL SYSTEM JTTH RH.c. -X-. SOLN GOES INTO _X- C C CALL LEOT?R(SS,LASTg,,2,NL2,XlNL2,IJOP.WORKNL,.WORK(1,8))

CALL LEOTI R (CCLAST ?,2,NL2 X, 1 .*lL2 IJOPWORK) C DIP ( ]NP) = FLXS5lN NP) FLXD(1,qMP) - FDTlC FLXU( 1 KP) (11).=PP ( )/EX (1) X ( ) + (1 -PP (1) )EX () X (2) -ALPw (1 ) +RFTA (1 ) KTR = ? DO 3Z0 T = 1.IRMI 1F(I+1 .NF. ISAVKTRF)) GO TO 3ln DIPR(KTRP.NP) = FLxYSIN NP)* EXSLUN (T* ) FLXD(KTP.NP) = (T,-PD(t )*X (2*T-1) *(1.+PP(I) )*X (2T) 44

- (ALPH (I) +RF TA t I) ) *EXSUN(T+ 1 ) FLXU (KTP.NP) = (1 .PP (I )) X (21'.I. 1) . (1 .- PP (T.)) 4*X(2*I) *- - (ALPH (I ) -RETAFI) ) *EXSUN (T 4') KTR = KTR+1 350 CONITI-NUF 400 CONTTNUF C RETURN END 45

SUBROUTINE L E-QTi8(A, NNLC,UilC, IA,B,M, I8,IJOB, XL) C LFEIB1C020 C-LEQT i3 ------S ------LIBRARY -3------" LE 18 CCU30 C C FUNCTION - MATRIX DECOMPOSITION, LINEAR EQUATION LE180C50 C SOLUTI ON - SPACE ECONOM' rS' S-OLU TI ON '- LE-I8BG'C6C C 3AN3 STORAGE MODE LE180070 C USAGE - CALL LEQTia (ANNLCNUC',IAB MIIJO3"XL, ta-0 C IER) LE 18G09C C PARAMETERS "v - "A r P ST ' C (NUC+NLC+i) SEE PARAMETER IJOB. LEiB311C C N - ORDER OF MATRIX A'AN'J THE NU'M3ER OF'-ROWS IN" LEI'B. 20 C 3. (INPUT) LEIB013O C NLC --'NU-.ER OF LO WER COOIAGONALS IN M'AT RIX A.". LEl9I.14 C (INPUT) LE1B0150 C ...... N UC - .NUMBER OF UPPER CO'D A'AsTO'NAL'S TN T I X .r"'A"'- . tB .'E'Ci6' C (INPUT) LE 1B 170 C : '' ' IA- - -*A- POW-'-OIMENSIONC OF'A AS SPFCIFI'ED IN THE ' L.E'i BO'ia c C CALLING PROGRAM. (INPUT) LE1BC1i3 C 9 - 'INOUT/OUTPUT/OT ATRIXOF O IM!SNSION N BY M. LEiB82ZC C ON INPUT, 9 CONTAINS THE M RIGHT-HANO SIOES LE13021C C .. OF T-E EQUATION AX - B. ON OUTPUT, 'T . LEt'ri'22t C SOLUTION MATRIX X REPLACES 3. IF IJOB = 1 LE18323C C 3 IS NOT USEfC. LEBR-324C C M - NUMBER OF RIGHT HANO SIDES (COLUMNS IN B). LE1t30250 C (-INPUT) L E1i3C 26C C S1 - ROW DOIMEMSION OF B AS SPEC.FIEO IN THE L 18 270 C . CALLING "-PROGRAM. (INPUT) 'LE1Bn;'28-' C IJO0 - IN:rtT OPTION PARAMETER. IJOB = i ITPLIES WHEN LE1F3C290 C I = 3 FACTOR THE MATRIX A AND SOLVE THE LEiBT.C30 C EQUATION AX = 3. ON INUT, A CONTAINS THE LE1B0310 C COEFFICIENT MATRIX OF THE EQUATION AX := ,LE19Q32G C WH-ER A IS ASSUMED TO QE AN N 3Y N BAND LEB15033 C ..... MATRIX. A IS STOR'ED I'N IAN37'STORAGE M.3OOF LE1BC3i40 C ANO THERFORr E HAS DIIMENSIONN N Y LEIRG 350 C (NLC+NUC+1). ON OUTPUT, A IS REPLACE LE1B036D C 3Y THE U MATRIX OF THE L-tU OECOMPOSITION LE180370 C OF A ROWWISE PERMUTATION OF MA TRX A. iJ ISLE'I.J33C C STORED IN 9ANDt STORAGE MODE. LF16C39C C I = 1, FACTOR THE iMATRIX A., A CONTAINS"HE L't1BC4+C C SAME INPUT/OtJiPUT INFOIMATION AS IF LE1BC41C C IJOB = 0. LF4Bi842t C I = 2, SOLVE THE EOflATION AX = B. THIS LE13043C C OPTION IMPLI'ES THAT L-EQTi' 1AS AS ALREADY LE13440 C 3EEN CALLED USING IJO = O 1 SO THAT LE13045C C THE 'MATRIX A HAS ALREADTY f3EFN -FACTODfEn. ' L 413 4E6C C IN THIS CASE, OUTPUT MATRICES A AND XL LE13C:470 C MUST HAVE BEEN SAVED FOR REUSE IN THE LE13 '48C C CALL TO LEQT19. LE19'g90 C XL - WORK A'.EA OF DIMENSION Ni(NtC+l) , THE FI.ST LE13BC5Og C NLC"1'4 LOCATIONS OF XL CONTAIN COMPCNONTS OF LE13051C C TH " L *IATRTX OF THF 'L-Ut OECOf m OSITION-- O A t1E103520 C - OCWJISE PEERMUTATIO,IS~~~~~~~~~~~~'H LASOF A. T-. LAST N T LE1._LE1i 530 3 46

C -t -... - ^ ^^ATt0 ^ ^,pSp^^^^^ I ES. .O...f,THZPTOT"'LEI^-.TC , ~C______,______-_ _-_-,-.------.-„~----~--,~-LE1B0632 C L ATEST REVISION " -- NOVF1R -27fl9r73 --- tf8E64 C L E1 06C 5 0 oDIENSIONIt- -^. - A A--IA-t ^XcTwT-, BTI3I .- ",^LE"' DATA ZERO/0,/,ONE/I O0/ LE180670

JBEG = N:LC+1 LE18690 NLC1 =JBEG ..--- . - - IF (IJOR .EQ* 2) GO TO 80 LE130710 RN N ... ."...... ----- * - C R-ESTRUCTURE THE MATRIX LE180730

C ; ' wsFt. .w . . - b Fi.ssS *S_*_; r t+RCtR0 I C:t tT4 Tr1 '' C ABSOLUTE VALUE IN ROW I LEiB0750 I ...... 1. . . . . _ 7 NC = J3EG+NUC LE B137 C NN NC - .,. JEND = NC LE1B8790 IF' - ,1q',.E. ... ';"OR; tc r. TT ....01 ..r GTT0U'2TO5' *.Nt F .. ,'Eli, UD'I..u.S 5 K = 1 LE 19 0810 P = ZERO -- . " ------. -- -- .. - L'E '3 ..8 2C..L O0 10 J = JFEGJENO LE1 0 830 A(I,K) = A(I,J) - - - - LE190'84C Q ABSS(A(I, K)) LE1885 IF - n .GT'. P) =P Q ...... tL t 8 6 K = K-+i LE 19i.8: 10 CONTINUE- - - LEItBO,80 ' IF (P ,tQ. ZERO) GO TO 135 LE 13C89G XL(tI NLC1) " ONE/P ' ' L- ?091 IF (K .GT, NC) GO TO 20 LF1B0910 00 15 J = K',NC ...... L ' C 2' A(I,J) = ZERO LE IBC93 15 CONTINUE - LE' 1I3940L 20 I =. I+1 L'E1C950 J8EG = J8EG-1 - - -I 1i99650 IF (.IEND-JBEG .EQ N) JEN3 = JEND-1 LE109?7C IF. (I .LL . NLC) GO'TOTO 5 .- . ... ,...... l' J3EG = I LE 18990 NN = JENO - LE IB100 25 JEND = N-NIJC :LtEIBO1 DO 40 I = J8EG,N - LEE1S1020 P = ZERO LE1R1C3G 90 3 J-:- " 1,.NN -- - -...... --- ...... U-....It.-04t Q = A3S(A(I,J)) LE181050 IF (Q .GT. P)PP Q -- -. LE181060I 30 CONTINUE LE181070 IF (P .EQ. ZERO) GO -TO 135 - LE1R1t1E9iO30 XL(I,NLC1) = ONE/P LE1B1090 IF (I;,EQ, JENO)- GO TO 3? - . - - ..'' t.tEi81t0 IF (I ,LT. JEN3O) GO TO 40 LE31Q110 K = NN+i1 LE1B126 00 35 J = KNC LE1 1130 A(I,J) = ZERO LE19114 35 CONTItNUE LEi 11150 37 NN = NN-1 LE .1160 40 CONTINUE LE--1170 47

...... L = NLC -iL ...- ...... U E.. ...ICOM... .POSITION...... C L-U DECOMPOSITION LEI1I3190 19, 1 2~Oi 9 0 DO 7'5 K = i 'N P = AS(A (K, 1)) XL (KNLC1) LEiRI2IC I K LE 13 1 2220 IF (L *LT. N) L = L+1 LE131230L E i IB 23 ,,* ._... *._.:, *"K i =. .X 1...- . *** , .. ***,1"* - . - : , . .. - ..... IF (KI .GT. L) GO TO 50 DO 4 5 J = - - - ...... L.EIM~2TC Q = A3S(A(J-1v)).XL(JNLC1) LE1 iR128C, IF (Q .LE. P) -GO T'O' 45 LE13129C LF 18 1 29 C P = q

45 CONTINUE LF181310 50 XL(I, NLC) = -XLK, Nt'LCi) '" ' : L E 13 13 ~20O XL(KNLC1) = I LLEI El B133041330i 3 C SINGULARITY FOUNO IF (RN+P .EQ. RN) GO TO 135 LE1P,35G INTTR'CHANGE ROW'. .'AT IF (K .EQ. I) GO TO 60 LE IB13 70 00 55 J = i,NC - " LE1i3L 33C P = A(K,J) LEIEi1390 A(K,J) = A(I,J) L13:.140C L-El 11~14 i C A(I,PJ) = P 55 .CONTINUE 60 IF (Kl .GT. L) GO TO 75 LE I 1B430 0O 70 I = K1,L L E R 1 4Qej P - A(I,1)/A(Kl) LE1~1t4i.Z IK = I-K XL(K1,IK) = P 30 65"J = 2,NC A(I ,J -1) A(1,J)-P*A

-TO" CONTINUWE -, ^ L-* „tE 105 CONTINUE L 1B17T C 'S -B- --- K S-STITUTOU OW - LE7R176-UL3AC JBEG = NUC+N4C LE 11770 30 - 125 J = i,-' --- -.-.-. - L = 1 LEII3179 ...... ,..b.N ;,"N: ..... -w...Y....Y-..__-- ^ r - .- -...... R T.,.'.'_"'ri^_' B". .r. DO 120 I = i,N LE131810

P -= (,KJ) LE£191i83 IF (L ,EQ.- I)" GOQ- - L-- - -I1I ... 00 110 KK = 2,L LE1 31850 ...... : ...... I .. .'_...... ^^* "I~ ..-, ....- r. et :: *^e._ t s S:-.'R t.KI~ ...... 3 L ' ' P = P-A(KKK)' 8(IK-1iJ) LE 18187 l11i0 "'E CONTINUE -- - - - E 115 3(K J) = P/A(KI) LE1B1890 *IF (L .LE. JBE'G)" " -L - - ...... 31. .+1C 120 CONTINUE LE1i1919 i25 COONTINUE -*

90105 RETURN ......

135 CO-NTINUE WRITE ( 6,1J 0) 10 00 FORMAT(//f LtEQTI19 EPPOR- -1A'TTX AL GORITH"M'tCALLY SINT-GtLAR')` - -...... - .. STOP ENOD- - LET 19RO 49

SU3ROUTINE LEQT238(AN,NLC, NUCIAB M,I 3,IJO0 ,UIU, XL) C ...... C... ..* ...... - ...... b0^ _-...... C-LEQT29 .---.--- S -. LIfBqARY 3 .---- ....-- "----....------"""". LE28§00.33

C FUNCTION - MATRIX DECOMPOSITION, LINEAR EQUATION LE2BG005 C '...' ' '''l''ULT...- ION CHIH .A-CCU RA"CY SOLUT IN - .L'E23'006 C BAN) STORAGE MODE LOE 2B G070 C USAGE ' -CALL LEQT29(ANiNLCNUCIA,8 MBIJO U LE23008 C XL, IER) L'2803090 C ... PARAMETERS A .T rIC . T4 TT FAI t C AX = 8, WHERE A IS ASSUMED TO BE AN N BY N LE280110 C ' 3' A'NO 'M'ATRIX.- -A I'S ST ')OREOIN. 'B"A-ND .. S'TOR"'AGE ' ' .E2' P 02ti C MODE ANO THEREFORE HAS OIMENSICN N BY LE 2R013 C ' ('NLC +NUJC + I'. (I ) ' 9NPU"T14 C N - OROER OF A AND THE NUMBER OF ROWS IN 8. (INPUTLE2BC.150 C ' NLC -. NUMWE "'OF 'LOO'ER' 'C''TA'ONALS..TLN- iATRIX.A.'' '' .... ' C (INP!JT) LE230170 C NUC - NUMBER OF UPPER CODIAGONALS IN MATRIX -A."' LE"2Bi'8'8C C (INP')T) LE2B 190 C IA -'ROW OIWENSION OF~ A AS SPECITFI.O IN THE CALLTNGLt2B'C2Q0 C PRO,RA -1. (INPU") LE2B"210 C '' - INPUT/OUTPU'T' MATR'IX OF DIMENSION N 'Y ...... 220 C ON INPUT, 1 CONTAINS Tt E RIGHT HAND SInES LE280230 C OF T'E EQUATIO! AX = a* OaN OUTPUT, TH;E LE28B0.24.' C SOLUTION MATRIX X REPLACES 3. IF IJOS 1 , LE2BC250 C 3 I'S NOT USED-. L'E28260 C M - NU1gER OF RIGHT HAND SIDES (COLUMNS IN L).LE2BC270 C ...' ' '.. ""(INPUT) 'L"' ' " '0' " ' '- ' '-." '' ' ''- " LEZ 2280 C IB - ROW DI31ENSION OF MATRIX AAS SPEFCIFI--O IN LE 239290 C THE 'CALLING PROGRA., (INPUT) LE2B3i3' C IJ03 - INPUT OPTION PARAMETER. IJO. = I IMPLI-S WHEN LE2R 31G C I = 3, FACTOR THE' MATRIX A AND SOLVE THE LFE2B032- C EQUATION AX = 3. LE2B 330 C -' I I, ..FACTOR THE- MATRIX A, " LET32334C C I = 2, SOLVE THE EQUATION AX RB. THIS LE2BC35Z C OPTTION IMPLIFS THAT MATRIX A HAS ALREAOY E'EZB3360 C 3EEN FACTOREO 3Y LEQ,29 USINGt LE239C37C C I39 = 0 OR 1. TN THIS CAS- THE OUTPUT LE:23.-38D C 1ATRICES U AND XL MUST HAVE B:EE'N SAVED LE280393 C - FO:R ?E$S IN THE CALL TOTtEZB ...... 40l ' C U - OUTPUT MATRIX OF DIMENSION N ,3Y (N(JC+NLC+3) LE233410 C CONTAINING MATRIX U OF THE L-U OE-COMPOSITIONLE2:CN420 C OF A ROWWISE PERUITATION OF MATRIX A. U IS LE2B3430 C STORED IN 'AND STORAGE MODE OCCUPYING THE 'LE-2BC+44C C FIRST N'(NUC+NLC+I) LOCATIONS. THE R2:AI NItGLE2 L450 C ?'2 N LOCATIONS'ARE USE'D AS WORKING S7TOr, AGE. L't-E2'3'460'' C IU O-Ow9 OI"3ENSION OF MATRIX U AS SPECIRI'- IN THE LE2 C470 C CALLING PROGRAM. (INPUT) LE 2848C C XL - WORK A EA OF DIMENSION NI'(NLC+l). THrE FIRST LRE23490 C NL'CN LOCATIONS OF XL CONTAIN COMPOMN't4TS 0'F LF23L5OCC C THE L-U DECOMPOSITION OF A ROWNWISr LE 2C51C C 0 F' IR1t1T'ATION OF A, TE. LAST N tOCATIOMS- LE35' C CONTAIN THE PIVOT INDICES. LE2Gu53C 50

C LATEST REVISION - OECEM ER 11,1973 LE28G660

DIMENSION A(IA,1) , U(IU, ) tXL(N ,1) ,B(I9,1i) LE2B068C DOUB'LE PRECISI'ON- '"SUKt ...... -...... * L - S^90 DATA ZERO/. 0/,ITMAX/50/ LE28t70 0

NLCPI = NLC+1 LE2BC720 NCC NUC+NLCPI -- T""-73"" NLCP2 = NLC+2 LE2B074C NM NU C -- -N UC -= 75 NU2 = NCC+I LE2B0760 ' NU'3NU-3 ' NNCC047C CG"+? ...... "...4a...-.W r....-)..*< ....- .. ..lliG-.T.UO....*l ...... *...... lm.i >. t~ 'E"Ut7'7a ... IF (IJOB .EQ. 2) GO TO 15 LE2 0780 C ...... -... ^ -.. SAV "-^M'ATRI X- A' " ^- -. . . E' 8B 0£C79g'..-- DO 10 I = 1iN LE2 8800 0O'5 J 1 ,N'CC" -. U(IJ) A(I,J) LE2B0820 5 C ONTI NUE ------.. ,; -..-.-.... 3.....,,...,.... 10 CONTINUE LE2B084C C - -- FACTOR M-lAT'RIX A -- - LE 2BO0 850 CALL LEQT1 (U, NNLC, NUC, IU, ,M, I,1, XL) IF (IJB ' .*EQ. 1) GO TO 9035 tE 2 q08-C. SAVE THE RIGH9T HAND SIDOS LE290890 C .,.... i. 15 00 60 J'= 1, ' ". ..-t E7'. 0-9 O ' O0 20 I = 1 N LE2 0J91.0 U(I,NU2) = B(I,J) LE2B 592D 20 CONTINUE LE 2 G9 &0 C - t JBTAIN A SOLUTION CALL LEQT13(UNNLC NUC IU U( 1NU2) ,1, IU,2,XL) ^...... C...... -OMPU'TE rHE 'NOmM.R O F THF. SOLUT-ITOctn XN>ORM = ZERO LEZB0930 D0 25 I 1,N .' 2E3 1020 C XNORM := AMAXi1IXN3RM, A :S(U(I,NU2) ) ) 25 CONTINUE LE2B1iCOLE 28 9730 IF (XNORM .EQ. ZERO) GO TO 60 C -. COMPUTE-THE.... RESIOtJAtS.. -- - - - L 28.1C40 O045 ITER = 1,ITMAX NC NCC LE23B1350 KK ;= 1 LtE231S2 00 35 I = 1,N ... SUM = (IJ) L = NLCP2-I * LE 21 1105 IR = 'AXOIL,1) LE2B3 090 IF (L .LE. 0) KK =-KK+i .L£29 110· K KK LE29 113i DO 30 JJ - IRNC L2831120LE2811590 SUM = SUM -ORL (A(I,JJ) ) 3LE U(K, NJ2)) = (+t L E 2 8 114 C 30 CONTINUE LE 231170 U3I,NU3) SUM - IF (I ,GE, NMNUC) NC = NC-1 35 CONJTINUE LE23t 11' CALL LEQTIB(UNNLCNUC,IU,U(1,NU3),1,IUt,2,XL) DOXNORM = ZEROs. LE 2B 123t C UPDATE THE SOLUTION _E23 121G 51

0O 40 = 1,N - .... LE2B122C U(INU2) = U(INU2)+U(I,NU3) LE2012 30 3XNORM AMAXi(DOXNO'RM, A S (U'(INU3))) LE'2824CA 40 CONTINUE LE 28125C IF (XNORM+OXNORM *E'. X'NOR-} GO TO'50 LE2 1 260 45 CONTINUE LE291270 GOG TO '9000 C STORE THE SOLUTION LE2B9 290 50 DO 55 JK = iN L£23'130i. 3(JKtJ) = U(JKNU2) L' 2B13i2 55 CONTINUE LE2B 1320 ,134C 60 CONTINUE , ...... t 5 .. .1...,,^.,' 2. ... t C 9005 RETU RN C 9000 WRITE(6,iOO0) 1000 FORMAT(//* LEQT23 ERROR--ITERATIVE IMPROVEMENT FA'IL'EC TO CONV-ER- . *GE SECAUSE BANDEO MATRIX IS TOO ILL-CONDITION£E,) 'ST OP ...... ENO LE2 13390

53

APPENDIX B:

TEST PROBLEMS 1-9 54

.* .**.* * * *1' * ' , * , * , , *' **, , * * * 4 * 41,.* * * * * , *, * * *.. 4*¢* * 41 * * * RADIATIVE FLUXES FOR VERTICALL Y INHOMOGENrOUS LAYERED ATMnSPHERE BY DELTA-En)DINGTON APPPOXIMATIONH TEST PROBLEM 1

NUMRER OF LE'ELS-- NZ = 11 INCIDENT DIRFCT-BEAM FLUX-- SoLFLX = 1.0000E+00 INtCIDENT DIFFUSE DOWN-FLUX-- FDINC= 0,6 INCIDENT DIFFUSE UP-FLIJX AT BOTTOM BOUNDARY-- FUINC= 0,0 NUMRER OF DIRECT-BEAM 7ENITH ANGLES-- NSOL- 2 COSINES OF DTRECT-BEAM ZENITH ANGLES-- MISUNs .?20o 1 .0000 SURFACE ALBEDO(S)-- ALB= 0.OnOO

LAYER OP nEPTH "S ING-SCAT ALB ASYM FAC 1 100,0000 1.ooo00 2 1 00 , 0000 .8500 100,0000 3 1.6ooo O . 50 () 100.0000 4 10o0.0000 1.'00oo i. Roo * 8500 65 100.0000 100.00 1,nOOO R.500 7 n00.0000 1. o000 8 1.nOOO1. noOO * 8500 9 100.()000 .R500 In0 100.0000 106000 .8500

MUSUN = n 00 nIFECT DIFFUSE TOTAL DTFFUSE LEVEL FLUX. DOWN-FLUx DOwN-iLIJX JUP-FL JX NET Fl UX 1 ,OOnnoE-0 1 0.0 22.OOOOE-Ol O0 0 F Ln I 1.98A5F-nl 1 1454F-n3 2 1.1032F-61 1 ,711E-O1 1 1711E- 1 1.1 597F- 1 1 .14 5 4F-03 3 6,ns. ;7 122 1 .0423E-01 1.0423E-01 1 .0308F-01 1,1454Fn03 4 3.3570-182 9.1344EE-0 9. 1344 -? 1.1454Fn3 5 1.851 8-42 7.8458E-0? 7 8458K-n0? 7.731 3F-n2 1 1454F,03 6 no0 6.5573E-09 6 .5573E-n? A. 44?7Fr-i r 1.1454r.n3 7 n.0 5.2687E-0, 5,2687E-0? 5.1542F-n2 1.1454F-03 8 n0 3.9802E-0O 3 9R80E-n? 3.866Fr-02 1.1454F-03 9 0,00 2.691 6E-0 2.6916E-n? 2.5771F-n2 1.1454F-03 10 n.o ].4n31E-0o 1 4031e-0n 1 .2R8eF-n2 1.1454F-03 11 n.n 1,1454E-n0 1 14454E-n3 3,63n oF-i? 1.1454F-03

MUSIJN = l .ono nI ECT DIFFUSE TOTAL DTFFUsE LEVEL F LJX DOWN-FLUX DOwN-FLJUX UP-FLi X NET Fl UX 0 1 1.OnnOOO+F 0.0 1,0 EE+on 9. 8899F-1 lnl 3F1n 2 R.*8733-13 1.l?^1E++0 1 12?6iE+nn 1,ll~]F+60 1.1013F-0~ 3 7,8A?4r-25 1, 00?2E+On 1 002?E+on q.9119F-nl 1 lollF-0? 4 6.99P?r-37 8.7830E-01 8 7830E- 8,6739F-ll 4 7 5441E- 1 1.1 13F-n2 5 ^,2132?E- 9 7.5441E-01 1 .1013F-0? 6 5.551 A-61 6,3051E-01 6.3o51F-nl f. 194QF-nl 7 4.8974F-73 5. o61E-01 5.0661E-o13 .8 676 1 E - Q 1 4, 95s9;F-nl 1 1013F-02 8 3.8271E-01 3.8271E-n0 llnlF-n2 4.34A1F-85 3.7170F-nl 1 .lolF-n2 9 3.86n03r-97 2.58R1E-01 2.5R81E-nl P,47tnOF-ml 1 0 3.4?73 0 9 1 3491E-01 1 3491r-nl 1 .23nF-nl 1 l~l3F-0?.l 3F-0? 11 3.n049-121 1 .1. 13E-o 1.1 13E-o? 2.91 n4F-1 1 1.1013~-n2 55

RADIATIVE FLUXES FOR VERTICALLY INHOMOGENEOUS LAYERED ATMOS:HERE BY DELTA-EDDINGTON APPROXI4ATION TEST PROBLEM 2

NUMRER OF LEVELS--NZ - 1 INCIDENT DIRFCT-BEAM FLUX-- SOLFLX= 1.0000E00 INCIDENT DIFFUSE DOWN-FLUX-- FDINC= 0.0 INCIDENT DIFFUSE UP-FLUX AT BOTTOM BOUNDARY-- FUINC- 0.0 NUMBER OF DIYECT-BEA4 7ENYITH ANGcLES-- NSOL- 2 COSINES OF DYRECT-BEAM ZENITH ANGLES-- MUSUN!J .2000 1 .0000 SURFACE ALBEDO(S)-- ALB= 1.OnOO

LAYER OP nEOTH SING-SCAT ALB ASYM FAC 1 10,0000 .8500 1.l ooo 2 10 0000 .9500,500 3 10 0000 .B500 4 10 0000 1 .o000 5. 10.0000 .R500a9 500 6 10 0000 .9500 7 10.0000 .B500 R 10.0000 1.1 . o000 O0 O O 8500 9 10.0000 1 .6 o o 1.io000oon0000 .8500 10 10 .0000 a's 8500 F;0

MUSUN = *.2?n rnIECT DIFFUSE TOTAL DTFFUqE LEVEL FLUX DOWN-FLUY DOWN-FLUX UP-FL IX NET Fl UX 1 .OOOnOE-n0 0.0 2,0000E F-1 ?.OOOnF-nl 1 .55 4 'F-12 2 1.8845E-07 1.3000E-01 1 3000E-01 1 .3000E-01 1.3829F-12 3 1,77?7F-13 1.3000E-01 1 . 3 00E-n] 1,3ooo0F-1 1 .2301F 1 2 4 1.6731E-19 1 .300QE-01 1 3000E-O0 1.3000F-01 1.075AF-12 5 1 .5765E-25 1 .3000E-01 1 .3000E-o1 1.3000F-01 9.2193F-13 6 1.*4Q 4 E-31 1.3000E-01 1 3000E-ol 1 .3000F-01 7.691 AF-1 3 7 1 .3996-37 1 3000E-01 1 3000F-n1 .1462F-1 3 8 1.31PQE- 4 3 1 ,,3000E-01. 1 3000E-01 1 .3000F-nl 4.6185F-13 9 1 .24?26-49 1.3000E-01 1,3000F-n 1,.3000F-01 3.07 lF.1,3 10 I.,1709E-55 1.3000E-01 1 3000E-01 1,3000F-01 1.5365F-1 3 ]1 1,1ln02-61 1 ,3000E-O0 1 30oOo-01 1.3onorFn1 0.0

MUsuN = l.nno OIRECT DIFFUSE TOTAL DTFFUqE LEVEL FlUX r)ON-FLUy DOWN-FLilX . P - FL,')X NET FlIUX 1 i.nnoc+Oo0 0.0 1 0000E+n0 1 00onF+nO0 1 4559F' 1 7 2 2.?349E-02 1.17?1E+00 1 2344E+00 1 2344F+n0 1 33? -lPlT 2 9 3 3.8875E-03 1 .2451E.OO 1 4 0E+On 1 24Q0F+iO 1 .1823F-11 4 ?9,4?23-04 11.2497EOn . 2497E +0 n 1 2499E+nn 1 034Fr.1 1 5 1.5112r-05 1 25)0E+00 1 2500E+00 1 .2500F+00 8 .86n0F-12 6 9.4?P5r-07 1,2530E+00 1 2500E+00 1 2500F+00 7.3825F-12 7 5.8749E-08 1.2500E*0o 1.2 500F+00 5,9117F-12 8 3.66P9F-09 1.2500E+00 1 .200E+00 1 2500F+00 4.4267F-12 9 ?.?SlrE-10 1 ,2 500E 0 1.2500E+no 2.9488F-12 1 250OF+00 1t0 1.4P40F-11 1.2500E+00 1 .2500E+00 1 .25noF+o00 1 .477F-1? 11 R.87F 3 E-13 1.2500E+00 1.2500E+00 ] ,2500=+00 -7 ln54F-15 56

RAOIATIVE FLUXES FOR VERTICALLY INHOMOGENEOUS LAYERED ATMnSOHERE BY DELTA-EnDINGTON APPROXIMATIONk TEST PROBLEM 3

NUMRER OF LFVELS-- NZ = 11 INCIDENT DIPFCT-BEAM FLUX-- SnLFLX = 1.OoE+n0 INCIDENT DIFFUsE DOWN-FLUX-- F DINC 0.0 INCIDENT DIFFUSE UP-FLUX AT BOTTOM BOUNDARY-- FUINC- 0.0 NUMRER OF DIPECT-BEAM 7ENITH ANIGLES-- NSOLs ? COSINES OF DTRECT-BEAM ZENITH ANGLES-- MUS[jl= ,20n0 1 .0000 SURFACE ALBEDOO(S)-- ALB= O.0o00

LAYER OP- nETH SING-SCAT ALB ASYM FAC 1 100.0000 ,~000 .B500 I 10o .0000 . 000 .0500 3 100.0000 .8500 ,p000 ,8500 4 100.0000 .R000 1 00 0000 .Q000 .8500 * A 100.0000 .ROO0 7 100.0000 .9000.TOO .0500 8 100. 000 ,R00 9 10.,0000 . 500 .oOO 10 10o.0000 .8500

MUSUN = .?*no OnIECT DIFFUSE TOTAL DTFFUSE LEVEL FLUX nOWN-FLUX DOWN-FLUX IJP-FL IX NET FL UX 1 .OOnOE-01 0 .0 2 .0000 - 1 q .981 4F-02 1 .601lF-nl 2 4.6??7F-93 7,1421E-21 7.1421E-P1 3.2531F-?2 6.8 168F-21 3 1 .0n5-184 6.660OE-4n 6 6680E-40 3.0372F-41 6.3641F-40 4 ?. 466.276 6,2253E-59 6 2253E-59 ? 8356F-60 5,9418.F59 5 0.0 5 .81 1E-7R 5 8121E-7P .6473F-79 5.5474F-79 6 0.0 5 4263E-97 5 .463E-97 ?.471.F-98 5.1791F-97 7 0.0 5.0661-11l 5.0661-1 16 2.3075-117 4.83s3_1 16 8 n.0 4,7298-13c; 4 7298-135 2.1544-136 4,5143.135 9 0,0 4.4158-15a 4.4158-154 2.0113-155 4.21471 54 10 0.0 4.12?7-173 4 1227-173 1.8778-174 3.9349-173 11 0.0 3.8410-19? 3 8410-192 7.78Aq-208 3.8410n.Q2

MUSUN = 1.0n MIRECT DI FFUSE TOTAL DTFFUSE LEVFL FLUX nOWN-FLUJ DOWN-FLUX UP-FL'IX NET Fi U)X 1 1.OOnOc+00 0.0 1.OOOE+00 5.0037F-n2 9 49qrAF-l1 2 4.7n07?-19 4.4203E-1R 4 8910E- 8 ?,4R09F-19 4 666F-1 8 3 P.?21 E-37 2.4935E-3F 2.715lE-3 1 .24A6F--7 .59;4F.36 4 1.0n431F-55 1.21?3E-54 1 3166E-54 6.0417F-56 1 .256?F.54 5 4.91n1E-74 5.74>6E-7i 6.2336E-73 2.08614F-74 5 9474F-73 6 ?.3113F-92 2.7n66E-91 2 9377E.Q1 1.34A5F-92 2 ,80AF-91 7 1 .o08-110 1 .2744-10O 1 3832-109 6.3490-1l1 1 .31971 09 8 5.117-129 5.9992-12? 6.5113-1p8 2,988-1?29 6 .21-1?8 9 , 41 A9-147 2.8240-146 3 0651-146 1.4069-147 2 9244-146 10 1.1349-165 1.3294-164 1 4428-164 6 .62?9-1A6 1 .3766-164 11 5.3493-184 6,2435-183 6.7777-1q3 3.3444-1 8 6,7777-183 57

* **s* 41 44*4*4141* 4* *i*tit***t*i * ***4***t*** 4****4**414*** * *** RADIATIVE FLUXES FOR VERTICALLY INHOMOGENEOUS TEST PROBLEM 4 LAYERED ATMnSPHERE BY DELTA-EnDINGTON APPROXIMATION * * i*414*441i*4 * ****** *4i*4t* 4*4i*44 *4$1t4144 ***41*4$* ****4t*41*

NUMBER OF LEVELS-- NZ s 11 INCIDENT DIRFCT-BEAM FLUX-- SOLFLX= 1.0000E+00 INCIDENT DIFFUSE DOWN-FLUX-- FDINC= 0,0 INCIDENT DIFFUSE UP-FLUX AT BOTTOM BOUNDARY-- FUINCa 0.0 NUMBER OF DTRECT-BEAM 7ENITH ANGLES-- NSOL= 2 COSINES OF DTRECT-BEAM ZENITH ANGLES-- MUSUJN= .2000 1.0000 SURFACE ALBEDO(S)-- ALB= 1.OnOO

LAYER OP nEPTH STNG-SCAT ALB ASYM FAC 1 .1000 o.00oo F8500 .1000 0.0000 .8500 53 ..1000ooI o oO o.nooo 4 .1000 0.6000 .8500 O,.OO 0 5 .0oo0 .SO0 6 .1000 o.aoooOnOO0 7 .1000 O.OO00 ,R5O0.6500 R .1000 0.0000 9 .1000 .m500 1 ..lInOO o.1 oo00 O.onOOO *8500

MUSIJN = .?no rIRECT DIFFUSE TOTAL )TFFUSE LEVEL FLUX nOWN-FLUX DOWN-FLUX UJP-FL IX NET Fl UX 1 .Onn0QE-01 0.0 2.000UE-01 ?221lOF-n4 1.9978F-rT 2 1.2131E-01 -5.57?7E-0h 1.2130E-nl 2.64l4Pr-n4 1.21n4F-61 3 7.3576E-02 -1.1313E-0O 7.3565E-n2 3. 1443F-n4 7.325nF0n? 4 4.46'6E-02 -1.7394E-O0 4,4609E-0? 3.741 F-0n4 4.4234F-n2 5 ?.7nOA^-02 -2.3997E-0 2.7043E-n? 4,4517F-04 2.659RF-02 6 1 6417E-02 -3.1323E-0s 1.6386E-n? 5 2956F-n4 1.58sAF-n2 7 9,9574E-03 -3.9590E-05c 9.9178E-n3 .29A7F-n4 9.2879F-03 8 6.035SE-03 -4.9048E-05 5.9904E-03 7.4913F-04 5.24T13Fn03 9 3,6631E-03 -5.99R-1E-0 3.6o31-n3 8.909?F-n4 2.7122F-03 10 ?.?18E-03 -7.2719E-0; 2.1491E-03 1 . 5OQE-n3 1.089^.F03 11 1 .3476F-03 -8.7643E-05 1 .2599F-03 1 .5QQF-n3 1.3878F-1 7

MUSUN = l.nnno nIRECT DIFFUSE TOTAL DTFFUSE LEVEL FLUX nOWN-FLUy DOWN-FLUX UP-FL! IX NET Fl UX 4 1 1.onnn oo00 0.0 10000OE+00 A 0549F-0 2 9.39 5F-nT 2 9.n04A4-01 -1.5213E-03 9 .033?E-o1 7,?lnFF-02 8 3121 -01 3 .R1873E-01 -3.0884E-01 8,1564E-01 9.5817F-n? 7.2981F-01 4 7.40?E-01l -4.74q3E-03 7 3607E-ol 0.215F-nl 6.339?F-01 5 6,70n?-01 -6.551nE-03 6.6377E-n1 5.4224F-01 6 6.06q3E-01 -8.5508E-01 5 9798E-01 1.4447F-nl1 4 5341F-01 7 S.4RR1E-01 -1.08n8E-0, 5.300E-n1 1.71QF-nl 3 6605F-n1 8 4.9659E-01 -1.3390E-0? 4 8320E-01 ?.04S1F- 1 2.786QF-0r1 9 4.4.Q3F-01 -1.6374E-07 4.3?95E-n1 2,43?lF- 1 1 8974F-01 10 4.0A67P-01 -1 981E-0? 3 .872E-0o 9,7484F.n? 11 3.67R8E-01 -2.3926E-0? 3,4395E-nl 3.43SF-mnl1 1 7764F-15 58

* * * * * 41 41*t *4 i t*1 **it*41 is i**41**4t *4tit* i 4* t 4t *1 ****1** *4I RADIATIVE FLUXES FOR VERTICALLY INHOMOGENFOUS TEST PROBLEMI 5 LAYERED ATMnSPHERE BY DELTA-EnDINGTON APPPOXIMATION'

NUMRER OF LEVELS-- NZ = 1 INCIDENT DIRFCT-BEAM FLUX-- SnLFLX= 1.OOOOE+00 INCIDENT DIFFJSE DOWN-FLUX-- FDINC= 0,0 INCIDENT DIFFUSE UP-FLUX AT BOTTOMBOUNDARy-- FUINCs 0.0 NUMBER OF DITECT-BEAM 7ENTTH ANGLES-- NsOL- 2 COSINES OF OTRECT-BEAM ZENITH ANGLES-- MUSUNL ,2On 1.0000 SURFACE ALBFDO(S)-- ALB= 1,On00

LAYER OP nEPTH SING-SCAT ALB ASYM FAC 1 .1000oo .;:POO .8500 2 .1000 .,000 ,~000 .8500 3 . I noo .?000 . 500 4 ,?000 .8500 5 .1000 .,000 .8500 6 .1 000 .2000 .8500 7 .1000 .8500 ?000 . nson 8 .1000 .,000 .8500 9 .1000 .1000 . 8R500tSOO 10 8500

MUSIJN = n nIRECT DIFFUSE TOTAL DTFFUsE LEVEL FLUJX DOWN-FLUY DOWN-FLJX UP-FLfUX NET Fl UX 2 1 .?.onE-01 0.0 ,000 E-01 5 08A,4F-n3 1 94qlF.-n 2 1.3n09E-01 2.310 4E-03 1 ,3?7E-nl 3,78q?F-n3 1 2892F-ll 3 .5n 4E- 02 3.501.6E-03 8 8516E-n 3 0497F-n3 8.546AF-0n 4 c,.547F-02 4.0031E-01 5,9430E-o? ? .6945F-rn3 5,673^6F-0 5 3.6lt'7 -02 4.0891E-03 4,0226E-n2 2,6014F-n3 3,762rF-o? 6 2.3560E-02 3.9337E-03 2 7494E-n? 2.69A^F-n3 2 4798F-0? 7 1 .531F-02 3.6464E-0'; 1 9 007F-n2 2,93?9F-n3 1 6074F-02 8 1,onlSE-02 3.2945E-0O 1 3309E-n2 3,2R^1F-n3 1.003F-n2 9 6,5PQ4E-03 2.9189E-0O 9.4483E-n3 3.74?8F-o3 5.7057F-03 10 4.2570E-03 2.5431E-03 6. 8002E-03 4.29PF-n3 2,5020n-03 11 7.77q5E-03 2,18nl1E-0 4.9556E-n3 4.959AF-n3 2.7756F-1 7

MUSUN = 1,nno nIRECT DIFFUSE TOTAL DTFFUqE LEVEL FLUX DOWN-FLUY DOwN-FLUX UP-FLl!X NET Fl.UX 1 1 .nnOoE+00 0o0 1 .00OOE+n 1 .34AF-nl 8.96 5 4F-n1 2 q .181E-01 2.3481E-0i 9,2036E-nl 1 .184lr-nl 8.0194F-01 3 R.4274E-01 3,7747E-0O 8.4651E-.1 1 .3576^F-ol 7.10o76F-l 4 7 73A4E-01 4 ,3875E-01 7 7803F-n1 1 .5584F-n1 6.2219F-nl 5 7.10?1.-01 4.2718E-01 7 1 448E-nl 1 7906F-01 5.354pF-n1 6 6S5197E-01 3,49?2E-01 6.5547E-nl 2 .0587r-nl 4.496nFo.l 7 , 9852E-01 2.0945E-0q 6.0061E-nl 3.638nF-01 8 ;* 4944F-01 1 0716E-04 5 4955E-n1 ?2,7-1 .7?c; I-n -n 1 2,7704F-n0 9 ,049gE-01 -2. 4576E-03 5.0194E-01 3 .138Fr- 1 1 8828F-nl 10 4,63n4E-01 -5. 6 5E-0 4.5743E-n1 ,3.618F-01 9 6355F-n2 11 4,25n7F-01 -9 3497E-0O 4 1572E-h 4 1,72F-nl1 1 .0658F-14 59

RADIATIVE FLUXES FOR VERTICALLY INHOMOGENEOUS TEST PROBLEM 6 LAYERED ATMOSPHERE 'Y "DELTA-EnDINGTON APPROXIMATION

NUMBER OF LEVELS-- NZ = 11 INCIDENT DIRFCT-BEAM FLUX-- SOLFLX= 1.00OOE00 INCIDENT DIFFUSE DOWN-FLUX-- FDINC= 0,0 INCIDENT DIFFUSE UP-FLUX AT BOTTOM BOUNDARY-- FUINC= 0.0 NUMBER OF DIRECT-BEAM 7ENITH ANGLES-- NsOL= COSINES OF 'DIRECT-BEAM ZENITH ANGLES-- MUSUNs .20n) i.0o00 SURFACE ALBEDO(S)-- ALB= 1.On00

LAYER OP nEPTH SING-SCAT ALB ASYM FAC 1 .0l00 .4000 2 .0100 ,4000 Ra500 3 .0)100 @4000 .R500 4 .0100 *4000 5 .0100 .4000 .8500 6 .0100 .4000 .8500 7 .0100 .4000 .R500 8 .0100 .4000 .RS00 9 .0100 4 000 .8500 10 .0100: 0 1 0 ,4000 .R500

MUSUN = . nof0 nIPECT DIFFUSE TOTAL DTFFUSE LEVEL FLUX DOWN-FLUY DOWN-FLUX UP-FL(JX NET Fl UX 1 .oo0noE-O1 0.0 2,000E-01 1 32 70F-01 6.7300F.np 2 1 93n01E-1 4,77 1E-04 1 9349E-n1 1 33AqF-nl 5.9804F-n? 3 1.867?E-01 9.2803E-04 1 8720E-n1 1,3470F-r1 5,2497F-02 4 1,7977F-01 1.3514E-O0 1,8112E-01 1 3575F-o1 4.5371F-0n 5 1.7349F-01 1 7489E-0O 1 7524E-n1 1 .36A?F-nl 3.84TSFn-02 6 1.6743F-01 2.1216E-03 1.6955E-n1 1 3792F-nl 3.1633F-02 7 1,618rE-01 2.4704E-O0 1 6405E-01 1 .394F-01 2.5009F-n2 8 1.59Q4-01 2 7962E-03 1 5874E- 1 1 .40?F-nl 1.854nF-02 9 l.50 4 9E-01 3.0998E-03 1 5359E-01 1 4137F-n1 1.2219F-0? 10 1. 454E-01 3 3821E-0. 1 4862E-ol 1 .4258F- 1 6.0416nF-03 11 1.4n16E-01 3,6438E-03 1 43 8 1E-Ol 1 43R1F-n1 1.77A4F-15

MUSULN = 1.n00 ntRECT DIFFUSE TOTAL DIFFUSE LEVEL FLUX DOWN-FLUX DOWN-FLIUX UP-FLIX NET FLUX 1 1,00OE+00 0.0 1 OOo0E+o0 R.36T1F-nl 1 6385R-fl1 2 9,9PQ?-01 5,119QE-Oc 9.9?97E-01 8,4518F-01 1 .4779F-Ol 3 Q 85R8E-01 8,5755E-05 9.8597E-01 8,5432?F-nl 1 3165F-01 7 4 9, 8qOF-01 1.0332E-04 9.70qOE-ol 8 6395F-nl 1 1545F-01 5 Q.71Q6E-01 1,0549E-04 9,7?07E-01 8.72R9F-n1 9.9176F-0? 6 9 .6n7rEOl 9.0902E-0O 9.6517E-01 8 8233F-nl 8.2833F.02 7 9. 5R4E-01 6.0 56E-O.0 9.5830E-n1 8.9!8RF-01 6.6417F-02 8 9,5145E-01 1 3366E-05 9.5146E-01 9.013F-1nl 4.9927F-02 9 9 4471E-01 -4.9359E-09 9.4466E-n1 9 1130F-p1 3336PE-02 10 9. 3 nl0E-01 -1.2791E-04 9.3789E-n0 9.211 7E-n 1 6720F-02 11 9,3137E-01 -2.2220E-04 9.3115E-01 9 31 15F -0 1 * 0658F14 60

RADIATIVE FIUXES FOR VERTICALLY INHOMOGENEOUS TEST LAYERED ATMOSPHERE BY DELTA-EnDINGTON APPROXIMATION PROBLEM 7

NUMBER OF LEVELS-- N7 = 12 INCIDENT DIRFCT-BEAM FLUX-- SoLFLX= 1.0000E+00 INCIDENT DIFFUSE DOWN-FLUX- FDINC= 0 .0 INCIDENT DIFFUSE UP-FLUX AT BOTTOM BOUNDARY-- FUINC= 0.0 NUMBER OF DIPECT-BEAM 7ENITH- ANGLES-- NSOL 2 COSINES OF DTRECT-BEAM ZENITH ANGLES-- MUSuN .2000 1 .0000 SURFACE ALBEOO(S)-- ALB = 1.On00

LAYER OP nEPTH SING-SCAT ALB ASYM FAC 1 1.nOOO 2 .1 000 .8500. .n 3 1.0000 0.6000 .8500 4 0000 0nOOO 1 .8500 5 1.0000 * 8500 6 o nooo .0000 .8500 7 1.00001 0,6ooo .8500 1 0000 RSO 0 9 1 0000 o.nooo 10 1,.0000 o.o-io o00 a A5 0 11 1.0000 0 PF n

MUSUN = .?n00 nIRECT DIFFUSE TOTAL DniFFUE LEVEL FLUX_ DOWN-FLUx DOWN-FLUX UP-FLt X NET FLJUX 1 .0onnooF01 0 0 2 0000E.0 1 1 *014F-n2 1 8985F.01 2 1.74n9E-01 1 4706E-OP 1 8880E-ol -1 .055QF-3 1 .8985F-'01 3 1.17 oE-03 2,6018E-03 3 7749E-n3 -1 86ROF-04 3.9617F-03 4 7.9n6E-=06 4 .632E-04 4 ,623F_-4 -3 3onrF-n5 5.0128AF04 5 5-3254E-08 8,1441E-0;O 8 1494E-05 -5 .847?F-06 8 7341F-05 6 3.58R2E-10 1 4409E-05 1 4409E-n5 -1 0345cF-n6 1 5443F-05 4 7 7 . 1 77E-12 2 5492E-O0 2 5492En-6 -1 83nF-07 2 7322F-06 8 1.6291E-14 4,51OOE-07 4,5100E-07 -3,23a8F-n8 4 8339F-07 0 9 1 977E-16 7 9792E-O0 7,9792E-n8 -5 72s4F-n9 8.5519Fr08 10 7. 39q9F'19 1.4116E-0O 141 16E-n8 -9 997?F-10 1.5i1lF-n8 4 11 4.98_3E-21 2,4920E-Oq 2 920F-n9 -1 0114F-10 2.5931F-09 12 1,3577E-23 4 11l5E-ln 4.10olE-1n ,10114F-10 4.9631 -2 4

MUSIJN = .OnOo I RECT DIFFUSE TOTAL DTFFUCE LEVEL FLUX nOWN-FLUy DOWN-FLUX IIP-FL IX NET Fl..UX 1 1.OOnOE+00 0,0 1 .OOOE+00 P 725F-n3 9. 9727F.o7 2 9.7263E-01 2,2991E-0O 9.9562E-nl -1 6507F-03 9.9727F.0n 3 3.5771E-01 4.0677E-0o 3,6188E-1l -2? .9o4F-04 3.6217F-01 4 1.31 3E-01 7.1965E-04 1, 3 235E-nl -5 .1 6gQ. 5 1.3240Fo01 5 4.84?4E-02 1.2732E-04 4.8552E-02 - .1411F-06 4.8561F-0? 6 1.7814E-02 2.5?6E-0c 1.7837E-n? -1 .61AoF-n6 1 7839F-02 7 6.555E-03 3.9848E-06 6.5575E-03 -2 78qq9F-7 6.557Fn-03 8 ?.410n9E03 7.021 9E-07 2,4J16E-03 -1,0257F-i8 2, 41T Fn0 9 8.8Q,3E-04 1.0836E-07 8,8703E-04 2.19?oF-n7 8 8681F.-4 10 32.6?PE-04 -7,05POE-08 3,2621E-n4 7.28nFF-n6 3 24 9 ?Fn04 11 1.20n3E-04 -5.1943E-07 1]1951E-n4 7 .28oF-o^5 1 12?F36 04 4 12 4, 1;7E-05 2 ,9573E-06 41200OE-05 4, 12n nrF-5 4 33 6 8F-19 61

RADIATIVE FLUXES FOR VERTICALLY INHOMOFENFOUS LAYERED ATMOS:HERE BY DELTA-ErDINGTON APPROXIMATIOm TEST PROBLEM 8

NUMBER OF LEVE.S-- NZ = 11 INCIDENT DIPFCT-BEAM FLUX-- S3LFLX=s 1.000E+O INCIDENT DIFFUSE DOWN-FLUX-- FDINC= 0O.0 INCIDENT DIFFUSE UP-FLUX AT BOTTOM BOUNDARY-- FUINC- 0.0 NUMRER OF DIPECT-BEAM 7ENITH ANGLES-- NSOL= 2 COSINES nF ODTrCT-BEAM ZENITH ANGLES-- MUSUtN= ,20n 1.0000 SURFACE ALBEDO(S)-- ALB= 0.0000

LAYER OP E'rTH: ''STNG-SCAT ALB ASYM FAC 1 1.0000 0?000 *8500 2 1 .0000 * 000 .8500 3 1.0000 ,?000 .8500 4 0,000 .8500 5 1 . no000 .?000 .8o500 6 1.0000 .?000 7 1 . 0 0 O .8500 1.n000 .?000 8 .8500~ .~ 9 1.0000 .,000. ?000 .,w000 .8500 10 1.1.0000 nooo

MUSUN = .?nO0 nI ECT DIFFUSE TOTAL DTFFUqE LEVEL FLUX DOWN-FLUy DOWN-FLLUX UJP-FL tX NET FLUX 1 ,.OnnOOE-1 0.0 2 .o0OE-on ,.8579F-n3 1 96l4F-nl 2 2,7755E-03 2.4781E-0O 5 2536E-03 -1 .01ARF-n4 5.355?F-0o3 3 3.8516e-05 6.3897E-04 6 .7708F-04 -3. 92R4F--5 7.1634F.n4 4 g,345n0-07 1 5616E-04 1 .5670E-n4 -9.771nF-n6 1 6647r-04 7 5 .4174E-09 3.8080E-05 3,8088E-ns -2,381;OF-n6 4 0473Fn05 6 1. n03E-10 9.?843E-OA 9.2844E-06 -5 81 C F-; 7 9.8659F-06 7 1 ,4R84-12 2.2636E-06 2 2636E-06 -1 .417RF-n7 ? .453Fo6 9 8 ?3cE-14 5.5187E-07 5,5187E-n7 -1.45c;9M-n8 5 864rF-07 9 .75n9r16 1.3455E-07 1 3455E-07 -8,3977F-n9 1 429 c F-0n7 ]0 3.81 75c-18 3.2796E-0O 3.2796E-n8 -1 .93F~-n9 3 4739F-n R 11 5.2977r-2o 7.9664E-09 7 9664E-n9 -3.6644F-?4 7 9664F-nQ

MUSUN = l.nnoo nI ECT DIFFUSE TOTAL DTFFUSE LEVEL FUX rOWN-FLUy DOWN-FLUX UD-FL.IX NET FLUX 1 1.non0 o ,00 0.0 1 .00OUE00 P?50r9F-n3 9.97 4QF;.n 2 4.?5,n7-01 1.5140E-0O 4 4 o 2 1 Enl 1 .1847F-04 4.40.09~Frl1 3 1.80n9r-01 .0127E-O? 1 .9081E-lo -1 .804F-n4 1.9nqqF- 1 4 7.6A04E-02 5.2045E-0^ 8 . 2o0E-n? -1.334F- n4 8.2142Fn2? 5 3.?647E-02 2.4317E-03 3.So7q9E-n -7.037RF-n5 3.5149F-n2 6 1 .377E-02 1.0871E-0O 1 ,464F-n? -3.3?&F.-n5 1.4998F-0? 7 B.8988E-03 4.751 E-04 6,3740E-03 -1 .499AF-n5 6.3889r-n3 8 ?.5074--03 2.0515 E-04 2 7126F-n3 -6.54Q6F-o6 2,7191F-03 9 1.06q8e-03 8.7978E-00 1 1538E-03 -2.8049F-06 1 .1566F0o3 9 10 4,5305s-04 3.7579E-OS 4 0o63F-n4 -1 .09n4F-n 4.9172r-04 11 1.9?;3r-04 1.5990E-0 2 O857E-n4 -. 77?F3F-?l 2.0857F0n4 62

41, * *K* * * * * **4* * * *4* * * *¢* * ¢** * * * * * 41'# * 41* * * *¢* * 4 * 4 * * 4 * 4 * * ~* 41' * RADIATIVE FLUXES FOR VERTIC ALLY INHOMoG'NE'OU TEST PROBLEM :9 LAYERED ATMOSPHERE 9Y DELTA-EnDINGTON APPROXINMATION *** * ** * ** **0* * * * *4 *4 **4 * *4* *44** 4 *

NUMRER OF LEVELS-- NZ i11. INCIDENT DIPFCT-BEAM FLUX-- SoLFLX- 1.0000F00 INC DENT DI FFJ'SE .DOWN-FLUX''- FDI NC= 0 .0 INCIDENT DIFFUSE UP-FLUX AT BOTTOM BOUNDARy-- 'tJINC= 0,0 NUMBER OF DTIRET-BEAM 7EN!'TH ANGLES-- _NSOL= COSINES OF DTRECT-BEAM ZENITH ANGLES-- MUSUN= ,20oO 1.0000 SURFACE ALBFEDOS)-- ALB= O.n00

LA'YER- 'OP hE'TH SING-SCAT ALB ASYM FAC 1 1.0000 .AOOO *8500 2 .8500 1.o000 ,. 000 3 .8500 .(000 4 1.00005.*0000 8500 5 .^000 8500 6 .is000 .8500 7 1 .0000 * 6000 .8500 ,000 g 1.0000 .....ooo * 8500 9 1.0000 .* ooo,o00 .8500 In 1.00oooo (^000 * 8500

MUSUN = nooo n I ECT DIFFUSE TOTAL ODFFUSE LEVEL FLUX DOWN-FLUX U)OWN-FLL)X UP-FL' X NFT Fl UX 1 .0n010E01 .0 2 ,0) E -01 1 .9 3 q4F-o? 1 2,8o6?r-n 2 J 1773C-02 1 .8477E-0 3.0250E-n2 7 4966F-o4 2 95^0oF-? 3 6,93n3r-04 9.6700E-01 1 0363E-02 -1 37A6F- 4 1 0501F-02 4 4.07Q6 -05 4 5557E-0O 4,596SE-03 -9 .543F-'5 4 6890F_03 5 ? '.4014.E-06 2.1198E-03 2 1222E-n3 -4 .4665F-65 2 1669F-03 6 1.4136e-07 9.8487E-04 9 850 1E-04 -2?.088F-n5 1 .o0058F-03 7 .3214E-09 4 5748E-04 4 5748F-n4 -9 .6685F-06 4 6715F-04 8 4.89R4FP10 2.1 249E-04 2 ,1 4 9E-n4 ,4 .458R-8P6 2.1695F-n4 9 2 .8835E-11 9 .8700E-0c 9 8700E-05 -1 9934F-0o 10 1.6974-12 4 5842E-0o 4 5 824 ?E-n5 -7.61snF-o7 4 66i3Fno5 11 99*9917r-14 2.1286E-0O 2, 186E-n5 -? ,69n5F-l1 ?.12R6F-0n

MUStJN = 1.nno nTIECT DIFFUSE TOTAL DTFFUSE LEVEL FLUX DOWN-FLUtJ O WN-FLUX UP-FL! X NFT FLUX 1 1,nnnoro00 0.0 1 0 0 00E+On 1 *717?2r-.2 9,28Fn-T1 2 95671r-01 7 2034E-0? 6.3954E-1n 8 21q7F-03 6.31] ?F-n 3 3.2?n7'-01 7.4339E-0O 3,9640E-01 3 .95^n0F-n3 3. 9245F-o 4 1.8277-o01 5 77?9E-0O 2. 4o5oE-nO 1.91 cSRr-n3 2 3859Fr-1 5 1 0373E-01 3.9981E-0l 1 .3 7 1E- n 9 3471F-n4 1 42 7 7rF-i 6 5 88S6E-02 2 6043E-0p 8 4908E-o? 4 .58QoF-n4 8 4449Frn? 7 3.34n07--02 1 .6337E-0O 4 9744F-02 2 .?26F?F-n4 4.9517F.O? 8 1.8959E-02 9 9948E-0O 2.8953E-n 1 .124F-n4 2 8841F-0? 9 1, 0 7n9?-02 6 0082E-0 1 .6767E-n? 5.4237F-n5 1 6713r-02 1.0 l.1n9O-03 3.5659E-0O 9 671RE-n3 2 23 n7F-05 9.64QSFn03 11 3461;E-03 2.0964E-03 5 5616E-03 F .421 n-PO 5.561^F-n3 63

APPENDIX C:

COMPARISON OF DELTA-EDDINGTON AND

ADDING-DOUBLING FLUX COMPUTATIONS

We consider five problems, each referring to a homogeneous layer with a decidedly asymmetric phase function. The characteristics of these problems are as follows:

Problem Phase function (AT)* a* 0

1 Haze L (X=0.7p, m=1.33) 1 1 1 2 Haze L (X=0.7p, m=1.33) 1 0.9 1 3 Haze L (X=0.7p, m=1.33) 1 0.9 0.5 4 Cloud C1 (X=0.7p, m=1.33) 64 1 1 5 Cloud C1 (X=0.7p, m=1.33) 64 0.9 1

A= F =0 0 S = T F = 0

X is wavelength, m is aerosol or cloud drop index of refraction, (AT)* and w* are (unscaled) optical depth and single-scattering albedo, and the Haze L and Cloud Cl size distributions are given by Deirmendjian.

1Deirmendjian, D., 1969: Electromagnetic Scattering on Spherical Polydispersions. American Elsevier, New York. 64

The adding-doubling results, which are the 'exact' ones for the 2 purposes of this comparison, proceed from the Grant-Hunt algorithm. 3 The doubling part follows the development of Wiscombe and uses the diamond initialization. The phase function is treated using the 4 delta-M method [Wiscombe ], an extension of delta-Eddington to arbi- trarily high orders of angular approximation.

The comparisons are presented in Tables C.1 and C.2. The largest reflected-flux error in Table C.1 is 18%, for Problem 2, the next largest is 14%, for Problem 1; the rest are considerably smaller. But note that these large percent errors occur in relatively small numbers.

As percentages of the incident flux af, they fall to 0.7% and 0.8%, respectively. The largest transmitted-flux error in Table C.1 is 6.9%, for Problem 3; the rest are considerably smaller. But again, relative

to the incident flux T/2, this maximum error falls to 3.5%. Among the net fluxes in Table C.2, the largest significant error is 6.6% (two very small fluxes in Problem 5 have larger errors) but this error is only 0.4% of the incident flux.

Grant, I. P., and G. E. Hunt, 1969: Discrete space theory of radia- tive transfer I. Fundamentals. Proc. Roy. Soc. London, A313, 183-197.

Wiscombe, W. J., 1976: On initialization, error, and flux conserva- tion in the doubling method. JQSRT, 16, 637-658.

Wiscombe, W. J., 1977: The delta-M method: Rapid yet accurate radia- tive flux calculations for strongly asymmetric phase functions. J. Atmos. Sci. (submitted for publication). 65

Table C1. Comparison of adding-doubling (parenthesized) and delta-Eddington (unparenthesized) predic- tions of reflected and diffuse transmitted flux for the five test problems.

Problem F [F[T*=0O] F+ [T*=(A) *]

1 0.198 1.787 (0.173) (1.813) 2 0.147 1.500 (0.124) (1.516) 3 0.219 0.858 (0.226) (0.803) 4 2.668 0.473 (2.662) (0.480) 5 0.354 0.000 (0.376) (0.000)

Table C2. Comparison of adding-doubling (parenthesized) and delta-Eddington (unparenthesized) predic- tions of net flux at 7 levels, for the five test problems.

Net Flux Problem 1 2 3 4 5

T*=O 2.943 2.995 1.352 0.473 2.787 (2.968) (3.018) (1.345) (0.480) (2.766)

(A-)*/20 2.943 2.977 1.334 0.473 1.614 (2.968) (3.001) (1.326) (0.480) (1.605)

(AT)*/10 2.943 2.960 1.317 0.473 0.826 (2.968) (2.983) (1.306) (0.480) (0.830)

(AT)*/5 2.943 2.926 1.284 0.473 0.183 (2.968) (2.948) (1.266) (0.480) (0.196)

(AT)*/2 2.943 2.822 1.193 0.473 0.0013 (2.968) (2.842) (1.157) (0.480) (0.0022)

3(AT)*/4 2.943 2.738 1.128 0.473 0.0000 (2.968) (2.755) (1.079) (0.480) (0.0001)

(AT)* 2.943 2.656 1.071 0.473 0.0000 (2.968) (2.671) (1.016) (0.480) (0.0000) 66

There is abundant evidence in Tables C.1 and C.2 that the delta-

Eddington approximation is particularly accurate for heating rates (net flux differences). It is somewhat less accurate for up- and down-flux separately. It should be particularly valuable for radiative energy budget studies, in which flux errors are required to be small compared to the incident flux (from the sun, say).