iteration - portland state university

16
Chapter 4 Iteration 4.1 introduction Iteration is the process of performing the same mathematical operation repeatedly, usually for the purpose to refining the outcome of a particular calculation, until some criterion is met. In general, iterative computations are required in the solution of non-linear equations and are also used in the solution of large systems of simultaneous equations. Where y is the exact solution to dy dx = a (x) y (4.1) we compute approximate solutions y 1 , y 2 ,..., y n ,. . . that converge toward y. Framing the solution of a non-linear equation in iterative form in effect recasts it as a linear equation. Because iterative solutions rely on an initial estimate of unknown quality and proceed until a convergence criterion is met, they can proceed for an unpredictable number of calculations. Different initial estimates may yield different results and a very poor initial estimate may yield no solution at all. Many iterative techniques are available. Selection of an appropriate technique depends on the nature of the equation(s) to be solved. We don’t have time in this class to discuss iterative techniques in any detail. The goal of this lab assignment is to gain some experience in using iteration in a computational model and to introduce the idea of a zero-dimensional model. 4.2 the basics 4.2.1 control or flow A control flow statement in a computer program results in a choice (the control) about which of two or more paths (the flow) should be followed. Implementation can be a simple repetition of a 63

Upload: others

Post on 14-Apr-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Iteration - Portland State University

Chapter 4

Iteration

4.1 introduction

Iteration is the process of performing the same mathematical operation repeatedly, usually for thepurpose to refining the outcome of a particular calculation, until some criterion is met. In general,iterative computations are required in the solution of non-linear equations and are also used in thesolution of large systems of simultaneous equations.

Where y is the exact solution to

dy

dx= a (x) y (4.1)

we compute approximate solutions y1, y2, . . . , yn,. . . that converge toward y. Framing the solutionof a non-linear equation in iterative form in effect recasts it as a linear equation. Because iterativesolutions rely on an initial estimate of unknown quality and proceed until a convergence criterionis met, they can proceed for an unpredictable number of calculations. Different initial estimatesmay yield different results and a very poor initial estimate may yield no solution at all.

Many iterative techniques are available. Selection of an appropriate technique depends on thenature of the equation(s) to be solved. We don’t have time in this class to discuss iterativetechniques in any detail. The goal of this lab assignment is to gain some experience in usingiteration in a computational model and to introduce the idea of a zero-dimensional model.

4.2 the basics

4.2.1 control or flow

A control flow statement in a computer program results in a choice (the control) about which oftwo or more paths (the flow) should be followed. Implementation can be a simple repetition of a

63

Page 2: Iteration - Portland State University

64 CHAPTER 4. ITERATION

set of commands for a predetermined number of times, or a more sophisticated evaluation of theprogress of a calculation using relational operators and logic. The latter might be used to stop acalculation when a certain threshold is met. The flow of control in numerical models can becomequite involved. As always, the time you spend writing implementation and pseudocode algorithmswill be saved when it comes to writing your program. The more complicated the flow becomes,the more likely the programmer is to make a mistake.

The Matlab flow control commands include: if, else, elseif, end, for, while, switch.

A paired for and end causes a statement or group of statements to be repeated a fixed numberof times. A paired while and end repeats a group of statements an indefinite number of times,according to a logical condition. A paired if and end evaluates a logical expression and executesa group of statements when the expression is true. Optional elseif and else commands allow theexecution of alternate groups of statements:

whi le l o g i c a l e v a l u a t i o ns t a t emen t s

end

A paired if and end evaluates a logical expression and executes a group of statements when theexpression is true. Optional elseif and else commands allow the execution of alternate groups ofstatements.

i f l o g i c a l e v a l u a t i o ns t a t emen t s

e l s e i f r e l a t i o n a l e v a l u a t i o ns t a t emen t s

e l s es t a t emen t s

end

Flow control statements are accompanied by relational and logical operators that are used todetermine when some criterion has been met.

The six relational operators are:

equal ==

not equal ˜=

less than <

greater than >

less than or equal <=

greater than or equal >=

The common logical operators are:

and &

or |not ˜

Page 3: Iteration - Portland State University

4.2. THE BASICS 65

4.2.2 an example

Suppose we have an exact equation for the dependent variable x:

x = a + b (4.2)

where the coefficient a depends on x:

a = cx12 (4.3)

and the coefficients b and c are constant.

The solution to equation (4.3) must be found iteratively. The simplest pathway forward is to userepeated substitution:

1. Make an initial estimation a1

2. Use a to compute the corresponding value of x.

3. Use the new x to update the estimate of a.

4. Compare the old value a1 with the new value of a.

While a1 and a differ by more than a specified convergence criterion, replace a1 with theupdated value a and return to step 2.

Other, more sophisticated schemes are possible. The speed with which the iteration converges ona solution to the equation depends in part on the quality of the initial estimate. A good strategyis to use a likely value of the dependent variable to make your first estimate of the coefficient uponwhich you are iterating.

The steps outlined above are easy to implement in Matlab using a while statement and a relationalevaluation.

% program to s o l v e x = a+b where a = cx ˆ(1/2)

b=2; % cons t an tc=2; % cons t an t

a=2; % i n i t i a l gue s sa1=0; % updated v a l u ea t o l =0.0001; % to l e r a n c e f o r conve rgence t e s t

t a l l y =1; % coun t e r to keep t r a c k o f the number o f e s t ima t e s

whi le ( a−a1 )/ a > a t o la1=a ;x=a1 + b ;a=c∗x ˆ ( 1/2 ) ;t a l l y=t a l l y +1;

end

Page 4: Iteration - Portland State University

66 CHAPTER 4. ITERATION

It is important to remember that the solution you find depends on both the initial estimate andthe convergence criterion you set. Here are a few solutions to equation with different tolerancesand initial estimates of a. The above program, with an initial estimate of a = 2 and a tolerance of0.0001 finds a solution x = 7.46 and a = 5.46 in 11 steps (including the initial estimate). With atolerance of 0.01, a solution of x = 7.39 and a = 5.44 is found in 6 steps.

4.3 a zero-dimensional planetary energy balance model

You may encounter the word simple associated with a computational model of an Earth system.In this context, simple means low dimensional, low order, or low complexity. Low order means amodel with limited resolution and low complexity means that complicated mathematical expres-sions or detailed processes have been approximated with parameterized expressions that embracekey elements in a manageable way. While these models may be “simple,” they are often quiteelegant and can lead to important insights into physical processes.

Zero-dimensional models are ones in which the spatial dimensions of a physical system have beencollapsed to one single point. These models are generated by approximating spatially-varyingproperties with mean properties of a system, thereby avoiding the need to integrate derivatives ofdependent variables. The zero-dimensional approximation may at first blush seem overly simplebut in fact, these models are quite useful. They are easy to implement and allow us to studybroad-scale characteristics of a system. The American Institute of Physics has published a veryinteresting history of simple climate modeling and its importance to climatology at http://www.aip.org/history/climate/simple.htm

In this section, a zero-dimensional model of planetary energy balance is derived. The modeldescribes the balance among the radiative energy (solar) incident at the surface of a planet’satmosphere, its reflection, absorption, and re-radiation. The model can be used to study howphenomena such as the greenhouse effect, ice-albedo feedback, and perturbations such as volcaniceruptions effect global mean temperature. Zero-dimensional and one-dimensional (zonal) energybalance models were very important to early computational studies of Earth’s climate and are stillwidely employed today.

4.3.1 conservation of energy

The first law of thermodynamics is a statement of the conservation of energy. The change in theenergy of a system is equal to the amount of heat added to the system minus the work done bythe system on its surroundings.

For our problem, we need to consider heat flow in and out of the planet due to radiative transfers.Our conservation of energy statement is:

dEdt

=∫

sQ ds (4.4)

Page 5: Iteration - Portland State University

4.3. A ZERO-DIMENSIONAL PLANETARY ENERGY BALANCE MODEL 67

where E represents the energy stored in the system, t represents time, Q represents the heat flow,and s is the surface area of the planet. Making the zero-dimension simplification, we replace theintegration with the sum of heat flows into and out of the planet:

dEdt

= Qin − Qout (4.5)

where we have adopted a sign convention with positive flows into the planet and negative flows outof the planet.

4.3.2 heat flow to the planet

The intensity of solar radiation arriving at the top of a planet’s atmosphere is proportional to theinverse of the square of the distance between the planet and its sun. We will use the mean distancein this derivation, but note that the model we construct could accommodate annual or longer timescale variations in the sun-planet distance. The solar constant Se at the top of Earth’s atmosphereis 1370 W m−2. The intensity of the solar radiation at any other planet in our solar system maybe computed:

Sp = Ser2er2p

(4.6)

where the subscript e denotes Earth and the subscript p indicates another planet. One astronomicalunit (AU) is defined to be the mean distance between Earth and our sun.

Some portion of the incoming radiation is reflected directly back to space by atmospheric aerosolsand by the land surface. The albedo of a material is the fraction of incoming radiation that itreflects. The net amount of solar radiation is then Se(1 − α) where α represents the albedo.Albedos for some typical Earth surfaces are listed in Table 1.

A spherical planet appears as a disk over the long distance between Earth and the sun. The surfacearea over which incoming heat is collected is the area of that disk. The total amount of heat flowinto the planet is thus:

Qin = π R2e Se (1− α) (4.7)

where Re represents the mean radius of Earth.

4.3.3 heat flow out from the planet

Any object that is warmer than absolute zero (0 Kelvin) radiates energy in proportion to the fourthpower of its temperature. This relationship was discovered experimentally by Jozef Stefan in 1879and derived theoretically by Ludwig Boltzmann in 1884. The Stefan-Boltzmann Law tells us thatthe outgoing heat flow is:

Page 6: Iteration - Portland State University

68 CHAPTER 4. ITERATION

surface type albedoclouds 0.01 to 0.70ocean 0.05soil 0.05 to 0.40deciduous forest 0.13desert 0.25Antarctica 0.80new snow 0.90

Table 4.1: Albedos of some typical earth surfaces

Qout = ε σ T 4(4 π R2

e

)(4.8)

where ε is the emissivity of the radiating object, σ is the Stefan-Boltzmann constant, T representsthe temperature of the planet’s surface, Re is Earth’s mean radius and the term in parentheses isthe surface area. The value of σ in mks units is 5.67 x 10−8 W m−2K−4. The emissivity ε of anideal blackbody is 1. Objects with emissivities of less than 1 are called greybody objects.

4.3.4 energy balance for a blackbody planet

The steady-state temperature of an object is a temperature such that the heat flow into the objectisequal to the heat flow out of the object. That is,

dEdt

= 0. (4.9)

In this case, the steady-state version of equation (4.4):

Qin = Qout

(4.10)

πR2e S

2e (1− α) = ε σ T 4

(4 π R2

e

)(4.11)

is easily solved for the mean surface temperature T

T =(Se (1− α)

4 ε σ

) 14

(4.12)

Page 7: Iteration - Portland State University

4.3. A ZERO-DIMENSIONAL PLANETARY ENERGY BALANCE MODEL 69

constant value unitsσ 5.67× 10−8 W m−2 K−4

ε 1Se 1370 W m−2

αEarth 0.31To 273.15 degrees

Table 4.2: constants for planetary energy balance

4.3.5 radiative transfer in the atmosphere

Earth’s mean surface temperature according to equation (4.10) with the coefficients defined aboveis about 254 K (-19 ◦ C). Earth’s measured mean surface temperature is about 288 K. The sourceof the difference is Earth’s atmosphere.

The wavelength at which a material radiates energy depends on its temperature. Earth receivesshortwave radiation from our sun because the sun’s surface is very hot. Earth’s surface is relativelycool so when it radiates energy back to space, it does so at longer wavelengths. Wien’s displacementlaw shows the inverse relationship between the peak emission wavelength λmax and the temperatureof a blackbody object:

λmax =0.002898

T

where the empirical constant has mks units of m K. (Review Plank’s law of blackbody radiationfor a more complete understanding of this relationship.)

How a material interacts with that radiation depends on its molecular structure. For the mostpart, the gasses that make up Earth’s atmosphere do not absorb energy at short wavelengths sothe radiation passes through the atmosphere and is absorbed by surface materials. An exception isozone (O3), which absorbs ultraviolet radiation. Several of the gasses in Earth’s atmosphere (H2O,CO2, N2O, CH4, O3, CCl3F, and CCl2F2) are strong absorbers at the longer, outgoing energywavelengths. These greenhouse gasses absorb the outgoing longwave radiation and reradiate it,warming the atmosphere. In order to correctly simulate planetary energy balance, our model mustaccount for this radiative transfer in the atmosphere.

A complete atmospheric radiative transfer model would integrate from the initial energy radiationfrom the planet’s surface to the near-surface air, up to the top of the atmosphere, wavelength bywavelength, molecule by molecule. Such models must include atmospheric attributes includingthe different physical properties of the greenhouse gasses, changing atmospheric temperature andpressure (and thus gas density) with altitude, the roles of various atmospheric particulates, and thevarious properties of different cloud types. Such models are difficult to build and time-consumingto run. They also play an important role in understanding global warming and climate change.

We will adopt a simple, linearized formulation to embody radiative transfer in the atmosphere.This empirical expression will take the place of the blackbody term in equation (4.8):

Page 8: Iteration - Portland State University

70 CHAPTER 4. ITERATION

Qout =(4 π R2

e

)(A + BTC) (4.13)

in which A is a constant, the coefficient B expresses the temperature-dependence of the radiativetransfer, and TC is now the temperature in degrees Celsius.

The derivation of (A+BTC) makes use of a handy trick from Calculus, binomial expansion. Thequantity (1+x)n is approximately equal to (1+nx) if x is much smaller than 1. So for the radiativepart of equation (4.8) we can use the binomial expansion to re-write T ,

T 4K = (To + TC)4

T 4o = T 4

o

(1 +

TC

To

)4

' T 4o

(1 +

4 TC

To

)(4.14)

in which To is the value used to convert from Kelvin to degrees Celsius, 273.15. Equation (4.14) isthen used to rewrite the radiative transfer:

ε σ T 4o

(1 +

4 TC

To

)C

It is easy to see that the coefficients are A = ε σ T 4o and B = 4 ε σ T 3

o for a blackbody planet.

The linearization is a reasonable simplification for the troposphere, where temperature and pressuredecrease linearly with altitude. Ozone chemistry in the stratosphere causes it to warm, relative tothe top of the troposphere. Fortunately, 80% of the mass of Earth’s atmosphere (and most of thegreenhouse gas content) is in the troposphere so we can neglect everything above the tropopause.

The formulation in equation (4.13) was first proposed by Mikhail Budyko (1920-2001), a clima-tologist at the Leningrad Geophysical Observatory. His work, from the 1940’s onward, movedclimatology from the qualitative to the quantitative. Budyko calculated values for the coefficientsA and B using on observations of outgoing longwave radiation and surface temperature at a fewhundred locations (Budyko, 1969). Since that time, additional observations have improved thepresent-day estimates of A and B. It is important to recognize that the empirical coefficientsimplicitly contain a dependence on the atmospheric greenhouse gas concentrations. Values for thecoefficients for various scenarios can also be derived from the output of radiative transfer models.

William Sellers, at the University of Arizona, built on Budyko’s recognition of the importance ofgreenhouse gasses and albedo to global climate (Sellers, 1969). The simple, elegant class of zero-(and one-) dimensional models are often called Budyko-Sellers models, recognizing the importantcontributions of both scientists. Interestingly, Budyko, who worked at the Leningrad GeophysicalObservatory, was concerned about the possibility that albedo-temperature feedbacks (section 4.3.6)

Page 9: Iteration - Portland State University

4.3. A ZERO-DIMENSIONAL PLANETARY ENERGY BALANCE MODEL 71

Figure 4.1: Scatter plot of OLR versus surface temperature from 30◦N to 90◦N from the 10 yeardata set. By Graves et. al.

Page 10: Iteration - Portland State University

72 CHAPTER 4. ITERATION

could lead the way to another ice age, and saw the warming of the planet, and consequent reductionof Arctic sea ice, as a positive development for the Soviet Union. Sellers’ concern was the opposite.His 1969 paper warned that “man’s increasing industrial activities may eventually lead to a globalclimate much warmer than today.”

The energy balance equation can be re-written to include radiative heating in the atmosphere usingequations (4.7), (4.10), and (4.13):

π R2e Se (1 − α) =

(4 π R2

e

)(A + BTC) (4.15)

and rearranged to solve for T :

T = To +

(14Se (1− α)−A

)B

(4.16)

in mks units of Kelvin.

4.3.6 adding a temperature-albedo feedback

4.3.6.1 temperature-dependent albedo

One of the early, important, uses of zero-dimensional energy balance models was to explore theconnection between global temperature and global albedo. The essence of this idea is that as theplanet cools, the fraction of its land surface covered by ice increases, and visa versa. There are anumber of ways to implement this notion, with varying levels of sophistication. We will consider asimple rule in which albedo varies with temperature between two threshold values. Below the coldthreshold temperature Ti, albedo is fixed at a value αi that represents a snow and ice-covered landsurface and an ocean with widespread sea-ice cover. Above the warm threshold Th, the albedo isfixed at a value αh slightly lower than the present-day albedo. Mathematically, we can write thisrule:

α =

αi if T < Ti

αi + (αh − αi) T − TiTh−Ti

if Ti < T < Th

αh if T > Th

(4.17)

The inclusion of the albedo-temperature feedback creates a non-linearity in the energy balanceequation. We now have a coefficient that depends on the dependent variable. Equation (4.14)must be solved iteratively. The feedback also gives rise to the possibility of multiple steady-statesolutions. The recognition of multiple steady states in zero- and one-dimensional energy balanceclimate models led to the suggestion that Earth may have experienced extreme cold and extremewarm conditions in the past. The geologic record suggests that “snowball Earth” conditions mayhave existed in the Precambrian (700 Ma) and the Huronian (2000 Ma), although this notion iscontroversial.

Page 11: Iteration - Portland State University

4.3. A ZERO-DIMENSIONAL PLANETARY ENERGY BALANCE MODEL 73

4.3.6.2 the iteration

In order to solve equation (4.16) for the global mean temperature T , we must iterate on the albedoα until a match between T and α is found. A Matlab script to perform the iteration is includedbelow. An initial α is used to generate a first approximation of the steady-state T . That valueof T is then used to update the value of α. If the initial and second values of α agree withinsome tolerance, then the computation is complete, the steady-state T has been found. If not, theiteration continues. A while loop is used to control the iteration.

Note that ellipsis notation . . . is used to continue a math statement from one line to the next inthe Matlab script.

% zero−d imen s i o n a l ene rgy ba l ance model% p l a n e t w i th an Earth− l i k e atmosphere and temperature−dependent a lbedo

c l e a rSe=1370; % s o l a r c on s t an t W/mˆ2 , Ear th = 1370

A=202.1; % r a d i a t i v e heat l o s s c o e f f i c i e n tB=1.9; % r a d i a t i v e heat l o s s c o e f f i c i e n t

%∗ c on s t a n t s f o r temperature−dependent a lbedo p a r ame t e r i z a t i o na l b e d o i =0.6 ; % albedo o f i c e & snow s u r f a c ea l b edo h =0.3 ; % albedo o f l and s u r f a c e

T i =263; % mean s u r f a c e t empe ra tu r e f o r s nowba l l e a r t hT h=283; % mean s u r f a c e t empe ra tu r e f o r sma l l− i c e e a r t hTnot =273.15; % conve r t from K to deg r e e s C

a lbedo =0.4 ; % i n i t i a l v a l u e f o r a l bedoa l b e d o e s t =0; % a r r a y to t r a c k e s t ima t e s o f a l bedoa l b e d o t o l =0.05; % to l e r a n c e f o r p r e c i s i o n i n a lbedo e s t ima t e

t a l l y =1;

% temperature−dependent a lbedo

whi le abs ( ( a lbedo−a l b e d o e s t ( t a l l y ) )/ a lbedo )> a l b e d o t o la l b e d o e s t ( t a l l y +1)=a lbedo ;

T=Tnot + (0 .25∗ Se∗(1− a lbedo )−A)/B;T es t ( t a l l y )=T;

a lbedo=(T<T i )∗ a l b e d o i . . .+ (T>T i \& T<T h )∗ ( a l b e d o i + ( a lbedo h−a l b e d o i ) . . .∗ ( (T−T i )/ ( T h−T i ) ) ) + (T>T h )∗ a l b edo h ;

t a l l y=t a l l y +1;end

Page 12: Iteration - Portland State University

74 CHAPTER 4. ITERATION

a l b e d o e s t =[ a l b e d o e s t ( 2 : t a l l y ) a l bedo ] ;T es t =[ T es t T ] ;

f i g u r e (2 )c l fp lot ( a l b e do e s t , T est , ’ b . : ’ )hold onp lot ( a lbedo , T, ’ ro ’ )x l a b e l ( ’ a l b edo ’ )y l a b e l ( ’ t empe ra tu r e (K) ’ )legend ( ’ g u e s s e s ’ , ’ s t eady−s t a t e ’ )t i t l e ( ’ i t e r a t i o n to s teady−s t a t e t empe ra tu r e w i th temperature−dependent \a lbedo ’ )

4.3.6.3 a few words about equilibrium solutions discovered by iteration

Our albedo-temperature feedback model has found a solution when the value of the albedo ceases tochange from update to update. In nonlinear models (models with feedbacks between the dependentvariable and coefficients) in is possible that more than one such equilibrium exists. It is also possibleto choose an initial estimate that will never lead to a stable solution. Simple models of the sortwe have developed here are especially likely to find multiple solutions. It is important to evaluatethe significance and the stability of these solutions in the post-model analysis phase of your work.Formal mathematical stability analyses are possible but we can also examine the stability of oursolutions by following a more immediately accessible definition: a solution is stable if the systemreturns to that solution after a small perturbation. You will have an opportunity to examine thisissue in exercise 3, below.

4.4 exercises

1. The Matlab code presented in section 4.3.4 is easily expanded to compute steady-stateblackbody temperatures for other planets in our solar system. The intensity of incomingsolar radiation arriving at any planet is computed by scaling Se according to the ratio of thesquares of the mean distances between the sun and Earth re and the sun and the planet rp,according to equation (4.8).

Variation in albedo from planet to planet must also be considered. A Matlab script thatcomputes the steady-state blackbody temperature for Earth and four other planets is writtenbelow. The script may be downloaded at the class website. The script stores the parametersneeded to solve equation (4.12) for each planet in arrays called rp and albedo. Formattinginformation and labels used to plot the results are stored in arrays called rps and rls .

(a) Please expand this script to include one additional planet. In your answer to thisexercise, report the name of the planet, the sun-planet distance in AU, and the valueyou used for the planet’s mean albedo. Please also include a plot of the steady-state

Page 13: Iteration - Portland State University

4.4. EXERCISES 75

blackbody temperatures for Mercury, Venus, Earth, Mars, Saturn, Neptune, and theplanet of your choosing.

(b) The mean annual temperature at Earth’s surface is about 287 K and the mean annualtemperature at the surface of Mars is about 210 K (from http://en.wikipedia.org).Compare those temperatures with the temperatures computed by the steady-state black-body model. What can you infer about the Martian atmosphere from this comparison?

% zero−d imen s i o n a l s t e ady s t a t e ene rgy ba l ance model% f o r a b lackbody p l a n e t

s igma =5.67e−8; % Stefan−Boltzmann cons tant , W/mˆ2/Kˆ4e p s i l o n =1; % e m i s s i v i t y f o r b l ackbody o b j e c tSe=1370; % s o l a r c on s t an t W/mˆ2 , Ear th = 1370

r e =1; % d i s t a n c e from sun to Earth i n AU% l i s t o f p l a n e t s

rp =[0.387 0 .723 r e 1 .524 9 .529 3 0 . 0 8 7 ] ;% mean a lbedo o f p l a n e t s u r f a c e

a lbedo =[0.12 0 .65 0 .31 0 .15 0 .47 0 . 4 1 ] ;%p l o t t i n g i n f o

r p s =[ ’ ro ’ ; ’ go ’ ; ’ co ’ ; ’ bo ’ ; ’mo ’ ; ’ r+ ’ ] ;r l s =[ ’ Mercury ’ ; ’ Venus ’ ; ’ Ear th ’ ; ’ Mars ’ ; ’ Saturn ’ ; ’ Neptune ’ ] ;

Tnot =273.15; % conve r t between K and deg r e e s C

% zero−D steady−s t a t e b lackbody t empe ra tu r eT=(0.25∗( Se∗ r e ˆ2 ./ rp .ˆ2) .∗ (1 − a lbedo )/ e p s i l o n / s igma ) . ˆ ( 1 / 4 )

f i g u r e (1 )c l fa x i s ( [ 0 max( rp ) min (T)−5 max(T)+5])hold onf o r n=1: length (T)

p lot ( rp ( n ) , T( n ) , r p s (n , : ) )endy l a b e l ( ’ t empe ra tu r e (K) ’ )x l a b e l ( ’ d i s t a n c e from Sun (AU) ’ )t i t l e ( ’ b l ackbody t empe r a tu r e s o f s o l a r system ob j e c t s ’ )legend ( r l s )

2. The energy balance equation for a planet with an atmosphere, (4.15) can be used to investi-gate the global temperature effects of changes in any of its coefficients. Easy implementationfor sensitivity studies is one of the many attractive features of zero-dimensional models. Inorder to implement the improved model, we must add some parameters to our basic Matlabcode (in section 4.3.4) and modify the equation that it solves.

% zero−d imen s i o n a l ene rgy ba l ance model% p l a n e t w i th an Earth− l i k e atmosphere and temperature−dependent a lbedo

Se=1370; % s o l a r c on s t an t W/mˆ2 , Ear th = 1370

Page 14: Iteration - Portland State University

76 CHAPTER 4. ITERATION

a lbedo =0.31; % cons t an t a lbedo , Ear th = 0.31A=202; % r a d i a t i v e heat l o s s c o e f f i c i e n tB=1.45; % r a d i a t i v e heat l o s s c o e f f i c i e n tTnot =273.15; % conve r t from K to deg r e e s C

% zero−D steady−s t a t e t empe ra tu r eT=Tnot + (0 .25∗ Se∗(1− a lbedo )−A)/B;

(a) Graves et al., (1993) suggest radiative heat loss coefficients of A = 202.1 W m−2 and B= 1.9 W m−2K−1. North et al. (1981) estimated pre-industrial values for the coefficientsto be A = 203.34 W m−2 and B = 2.09 W m−2K−1. Use the zero-order energy balancemodel to compute the mean global temperature change from pre-industrial to the 1970’s.Use an albedo of 0.32. How does your model-derived temperature change compare to theobserved global mean warming over that time period? (Try looking up “global warming”at http: // en. wikipedia. org .)

(b) Before we get too excited about the result of exercise 2a (or of any model result), weneed to examine how sensitive our model is to the selection of values for its variouscoefficients. The numbers for A and B depend on combinations of observation andcomplicated radiative transfer models that are beyond our grasp. We can, however, testout values suggested by other climatologists. Repeat the calculation in exercise 2a usingBudyko’s (1969) original values of A = 202 W m−2 and B = 1.45 W m−2K−1. Whatdo Budyko’s parameters suggest about global warming?

(c) So we better not make any dramatic predictions about next year’s temperatures basedon the zero-dimensional model. That’s OK, that’s not what zero-dimension models arebuilt to do, they are built to study sensitivity of a system to variations in its parameters.One final question, then. Using the Graves et al. (1993) values for A and B, computeEarth’s mean temperature sensitivity to changes in the energy balance for a globalalbedo of 0.32. Your result should have units of K per W m−2. How does the sensitivitychange when you use the North et al. (1981) values for A and B?

3. In section 4.3.6, we changed the model so that it could be used to investigate temperature-albedo feedbacks. A script at the course website called zeroD ebm aa ss.m implements thatmodel. Use the Graves et al. (1993) values for A and B.

(a) Run the model with tolerance of 0.05 for the iteration on the albedo and an initial albedoestimate of 0.4. What are the final, steady-state albedo and temperature?

(b) What happens when you change the tolerance to 0.01?

(c) An important conceptual outcome of the positive feedbacks in the temperature-depen-dent albedo model (cooling reinforces cooling and warming reinforces warming) is thatmultiple steady states are possible. Run zeroD ebm aa ss.m for a range of initial albedosand a tolerance of 0.01. How many steady-state albedo and temperature combinationsdo you find and what are they?

You can answer this question by changing the initial estimate of the albedo manuallyand re-running the model or you can modify the script to test many initial values

Page 15: Iteration - Portland State University

4.5. REFERENCES 77

sequentially. To do the latter, you would need to define an array of the initial estimates:alb init =[0.3:0.01:0.4];

and then construct a for loop around the while loop:

% temperature−dependent a lbedof o r n=1: length ( a l b i n i t )

a l bedo=a l b i n i t ( n ) ;a l b e d o e s t =0;T es t =0;t a l l y =1;

whi le abs ( ( a lbedo−a l b e d o e s t ( t a l l y ) )/ a lbedo )> a l b e d o t o l

%impor tan t s t u f f he r e

end

a l b e d o e s t =[ a l b e d o e s t ( 2 : t a l l y ) a l bedo ] ;T es t =[ T es t T ] ;

f i g u r e (2 )p lot ( a l b e do e s t , T est , ’ b . : ’ )hold onp lot ( a lbedo , T, ’ ro ’ )

endg r i d on

The figure plotting commands have been simplified in order to preserve the results ofeach calculation.

(d) Are all the steady-state solutions you found in exercise 3c stable? Please explain yourreasoning.

4.5 References

Budyko, M.I., 1969, The effect of solar radiation variations on the climate of the Earth, Tellus 21,611-619.

Graves, C.E., W.H. Lee and G.R. North, 1993, New parameterizations and sensitivities for simpleclimate models”, J. Geophy. Res., 98 (D3), 5025-5036.

Sellers, W. D., 1969, A global climatic model based on the energy balance of the Earth-atmospheresystem, J. Applied Meteorology, 8, 392-400.

North,G.R., Cahalan, R.F. and Coakley, J.A., 1981. Energy balance climate models. Review ofGeophys. and Space Phys., 19, 91-121.

Page 16: Iteration - Portland State University

78 CHAPTER 4. ITERATION