Thursday, August 25, 2011

Condensation Point

Suppose a body of moist air rises from the surface of the sea. The weight of air pressing down upon it decreases as it rises. Its pressure drops. It expands and cools adiabatically (see Adiabatic Balloons). So long as no condensation occurs, its temperature drops by 1°C for each 100 m that it ascends (see Tempearture, Pressure, and Altitude). Will the water vapor eventually condense into droplets?

If we know the initial concentration of water vapor in grams of water per kilogram of air, this concentration will remain constant as the air moves upwards. As the temperature of the air drops, however, perhaps there will come a time when the concentration of water vapor exceeds the saturation concentration, and at that point droplets will form. In Evaporation Rate we presented a graph of saturation concentration versus air temperature. But the data points of this graph correspond to measurements taken on the surface of the Earth, where air pressure is 100 kPa. What will the saturation concentration be at the lower pressures that apply to our rising body of air?

The pressure exerted by a gas is the force exerted by its molecules bouncing off whatever surface they encounter. The pressure of moist air is the sum of the pressures exerted by its nitrogen, oxygen, water, and all other molecules. The pressure exerted by the nitrogen molecules is the partial pressure of nitrogen. The pressure exerted by the water molecules is the partial pressure of water. It turns out that the maximum possible partial pressure of water molecules depends only upon temperature. This maximum is the saturation pressure of water at a particular temperature. Regardless of the other gases that might be mixed with the water vapor, the saturation pressure is always the same at a particular temperature. The graph below gives saturation pressure versus temperature, as indicated by an empirical formula we found here.



Water vapor is a gas just like nitrogen and oxygen. Its pressure depends only upon its volume and temperature. Water vapor in moist air will be at the same temperature as the air. It will share the same volume as the air. If the air pressure halves, so does the partial pressure of water vapor. For concentrations below a few percent, the concentration of water vapor at various air pressures is given by:

x = pwRw/pR = 0.62 pw/p,

where x is the concentration of water vapor, pw is its partial pressure, Rw is its specific gas constant, or 462 J/kgK, p is the air pressure, and R is the specific gas constant for air, or 287 J/kgK.

Consider moist air near the surface of the Earth at temperature 300 K, pressure 100 kPa, and water vapor partial pressure 2 kPa, which corresponds to concentration 12 g/kg. The water vapor pressure is roughly half the saturation pressure of 3.8 kPa shown on our graph. Suppose our moist air rises to 2000 m. Its cools to 280 K (1 K per 100 m) and its pressure drops to 80 kPa (adiabatic expansion of air). The concentration of water vapor remains 12 g/kg and its partial pressure drops slightly to 1.6 kPa. At 280 K, however, the saturation pressure has dropped all the way to 1 kPa, which corresponds to a concentration of only 7.6 g/kg. Thus each kilogram of air contains 4.4 g more water than it can hold as water vapor. This excess water must condense to form water droplets.

We would like a simple formula that will allow us to calculate the amount of water that must condense from moist, rising air in our Circulating Cells program. We combine the saturation concentration approximation of our Evaporation Rate post with the specific gas constants of air and water vapor, and with the assumption that the water vapor concentration is small, to arrive at the following approximation.

xs = (T−250)2p/8000

Here xs is the saturation concentration of water vapor in g/kg, p is the air pressure in kPa, and T is the temperature of the air in K. At 280 K and 80 kPa, this formula gives us 9 g/kg, which corresponds to a partial pressure of 1.2 kPa. This 1.2 kPa is close enough to the 1.0 kPa shown in the graph above.

The partial pressure of water vapor in moist air decreases as the air rises. But at the same time, the rising air cools by adiabatic expansion, and this cooling depresses the saturation pressure of water vapor so rapidly that condensation will eventually take place. With our approximate formula for saturation concentration with pressure and temperature, we will be able to simulate the condensation of water in moist, rising air.

Wednesday, August 17, 2011

Evaporation Rate

We are preparing to add evaporation from surface water to our Circulating Cells program. Water will leave the surface and enter the atmosphere as water vapor. The rate at which water evaporates depends upon the humidity and movement of the air above. The following empirical equation, which we found here, tells us the approximate rate at which water will evaporate into air, assuming the air is at roughly the same temperature as the water.

w = (0.007 + 0.005v)(xs − x),

where w is the evaporation rate in grams per second for each square meter of water surface (g/m2s), v is the velocity of the air in meter per second (m/s), xs is the saturation concentration of water vapor in grams of water per kilogram of dry air (g/kg) for air at the same temperature as the water, and x is the actual concentration of water vapor in grams per kilogram of dry air (g/kg) in the air above the water.

In our simulation, we know the temperature of the surface water, and when we simulate a planet with a water surface using CC8, we find that the surface gas cells are within a few degrees of the temperature of the surface water. Our previous work on impetus for circulation suggests that the velocity of our gas cells is of order 4 m/s. When we implement evaporation, we will keep track of the water vapor concentration in each cell, so we will know x. What remains for us to determine is xs, the saturation concentration of water vapor in air at the surface temperature.

The following graph shows measured values of saturation concentration in g/kg for a range of temperatures in Kelvin, based upon data we found here. To see the same plot in Centigrade, see here.



Also plotted on the graph is a parabolic approximation to the measured data, which is based upon two reference points: 0 g/kg at 250 K and 45 g/kg at 310 K. This approximation is good enough for our purposes, and will simplify our program. Thus our evaporation equation becomes:

w = [(T−250)2/80 − x] / 40

For example, if we have dry air over a lake at 290 K (14°C), water will evaporate at 0.5 g/m2s. In one hour, 1.8 kg of water will evaporate from each square meter. Our gas cells have mass 330 kg/m2, so after an hour over the lake, the gas will acquire water vapor concentration 5 g/kg, which is well below the saturation concentration of 20 g/kg given by our approximation. Its relative humidity will be 25%.

Wednesday, August 10, 2011

Island Inversion

We invite you to download Circulating Cells, Version 8.4 by clicking here so that you can watch it simulate air movement above an island in the sea. Start the program and set it to Cycle mode with Q_sun set to 700 W/m2. Download this file and read it into the simulation with the Load button. You will see the an island of sand at the center of the surface blocks, surrounded by water on the left and right. The saved state of the cell corresponds to midnight, so you can start the simulation right away.

Just before dawn, at solar time 5.5 hr, you will see that the temperature of the air resting upon the sand of the island is slightly cooler than the air above. The following figure is a close-up of the air above the sand, in which ran the program with max_T set to 300 K and min_T set to 260 K in the source code so as to make the cool layer more obvious. Note that the orange-lined surface blocks are sand and the blue-lined ones are water.



Our simulation produces the inversion of atmospheric temperature that we discussed in Surface Cooling, Part IV. In that post, we proposed that the leaves of a forest would cool at night by radiation. Air in contact with the leaves would descend to the ground and drag warmer air down from above. We suggested that this process might cool the first ten to a hundred meters of air above the treetops, producing temperature inversion. Perhaps that is indeed what happens over a forest. But in our simulation, whenever the surface is cooler than the air resting upon it, we set the heat transfer by convection and conduction to zero. How, then, does inversion occur over our simulated island?

The sandy island cools by roughly 50°C to −12°C at night. At this temperature, it radiates only 260 W/m2. Of this, 130 W/m2 is absorbed by the bottom layer of the atmosphere, because we have transparency fraction set to 0.5. Meanwhile, the bottom layer of our simulated atmosphere radiates heat both night and day. At the start of the night, its temperature is around 300 K and it radiates 230 W/m2 to the sand below, which is half the heat a black body at that same temperature would radiate. By radiation alone, we see that the cells above the sand are losing 100 W/m2.

The mass of our cells is 330 kg/m2, and their heat capacity at constant pressure is 1 kJ/kg, so 100 W/m2 will cool them by roughly 1°C/hr. This is what we see during the night above our island. Inversion does not occur over the water because the water surface in our simulation has ten times the heat capacity as the sand, and so cools ten times less at night. The water continues to warm the lower atmosphere with its radiation during the night. Thus we see how back-radiation and a surface with low heat capacity work together to produce temperature inversion.

Wednesday, August 3, 2011

Back Radiation

In our Rotating Greenhouse post, we use CC5 to simulate the alternation between day and night by varying the Solar power delivered to the gas cells resting upon our simulated planet surface. But we did not simulate the surface itself, nor did we distinguish between the temperature of the surface gas and the radiating temperature of the planet surface: we used the same temperature. But the CC8 program we introduced in our previous post does simulate the planet surface, so we can see how the temperature of the sand itself varies with day and night.

During the day, most of the heat passing into the surface gas cells does so by convection. But convection occurs only when the gas above is cooler than the surface below. In our discussion of atmospheric inversion we saw how the ground can be colder than the surface air at night, which can lead to a pocket of cold air sitting near the ground, with warmer air up above. In our simulation, we set the convection transfer to zero when the surface is colder than the surface gas.

At night, therefore, a sandy surface will radiate its heat into space, and receive no warmth from the sun. But it will receive warmth from the atmosphere, in the form of the back-radiation we described in our previous post. During the day, we found that our surface gas was radiating 226 W/m2 down to the surface. This radiation will slow the cooling of the surface at night.

We ran our simulation with Cycle heating on a sandy planet surface, 700 W/m2 solar heat during the day, daylight fraction set to 0.50, convection coefficient 20 W/m2, and transparency fraction 0.50. You will find the equilibrium state of the cell array at midnight stored in a text file here. The following graph shows the average temperature of the sand blocks, the surface gas cells, and the tropopause gas cells during two complete day-night cycles. We plot the deviation of each temperature from its average value during the cycles, which is why we call the plots "anomalies".



The temperature of the surface sand varies by almost 50°C, dropping as low as −12°C just before dawn. The temperature of the air a hundred meters above the sand, at the center of the bottom row of gas cells, varies by 9°C, dropping as low as 23°C. The tropopause responds far less to the day-nigh cycle, with a variation of only 2°C. These results are consistent with our observations of the desert, which we discussed at length in our Surface Cooling posts.

When we turn off the back-radiation in our simulation, the temperature of the surface sand drops by another 50°C at night, in a manner reminiscent of the Moon. And so we conclude that our atmosphere, by means of back-radiation, keeps us warm at night.

Thursday, July 28, 2011

Simulated Planet Surface

Our Circulating Cells Version 8.3 simulates the planet surface with a row of blocks. You can download the latest code here. These blocks can be sand or water. If they are sand, they have low heat capacity and warm up quickly in the Sun's light. If they are water, they have high heat capacity and warm up slowly. By clicking upon one of the blocks, we change it from one type to the other.

In the long run, we will implement evaporation from the water blocks, but for now we concentrate upon the heat exchange between the surface and the atmosphere. In previous versions of our program, we allowed sunlight to pass directly into the surface gas cells. Now we allow sunlight to pass all the way through the entire atmosphere to be absorbed at a solid or liquid surface. Real water reflects 4% of short-wave radiation, and sand reflects something like 10%, but our simulated water and sand absorbs all short-wave radiation.

Both sand and water are near-perfect emitters of long-wave radiation, so we allow our surface blocks to radiate heat according to Stefan's Law. We also allow heat to leave the surface blocks by convection. We determine the convection heat loss by multiplying the temperature difference between the surface and the gas by a convection coefficient. This heat leaves the surface block and enters the gas cell above.

As we described in our previous post, our simulated atmosphere is partially-transparent, to an extent specified by the transparency fraction, τ. The gas above a surface block absorbs a fraction 1−τ of the block's radiation, and the remainder passes out into space. We add the absorbed heat to the gas cell above the surface block.

Now we come to a component in the heat exchange between the atmosphere and the surface that we have not simulated or calculated before. The atmosphere itself will radiate heat downwards towards the surface, and the surface, being a perfect absorber of such radiation, will absorb all of it. The heat radiated downward by the atmosphere is often called back-radiation or downward long-wave radiation. To calculate the back-radiation, we use the same equation we applied to the tropopause in our previous post. When the transparency fraction is 0.5, the gas radiates half as much heat as a black body at the same temperature.

We ran our simulation with Day heating of 350 W/m2, all surface blocks made of sand, convection coefficient 20 W/m2K, and transparency fraction 0.50. The following figure shows the equilibrium state of the array. The surface blocks are color-coded for temperature in the same way as the gas cells, but they have an orange border to mark them as sand. A water cell has a blue border. You will find the equilibrium state of the array saved as a text file here.



As in our previous simulations, the temperature drop from the surface gas cells to the tropopause gas cells is very close to 50 K. The sandy surface settles to 303.0 K, at which temperature it radiates 480 W/m2. Of this, 240 W/m2 passes directly into space and 240 W/m2 is absorbed by the gas above. The tropopause settles to 249.0 K and radiates 110 W/m2 into space. The total radiation into space is 350 W/m2, which is the amount that is arriving from the sun, so our planet is in thermal equilibrium.

The 110 W/m2 radiated by the tropopause must pass up through the atmosphere by convection. The surface gas is at an average temperature of 298.5 K, radiating 226 W/m2 back to the surface. Thus a net 14 W/m2 passes from the surface to the atmosphere by radiation. The remaining 96 W/m2 passes into the atmosphere by convection at the surface. The surface is on average 4.5 K warmer than the gas, for which we expect only 90 W/m2 to flow by convection. But the gas cells warm by roughly 8 K while they sit upon the sand. When they first arrive from above, they are almost 10 K cooler, and 200 W/m2 flows into them by convection. Just before they rise up, they are only 2 K cooler, at which point only 40 W/m2 flows into them. When we get the program to print out the convection rate, we obtain an average of 96 W/m2, so all the heat from the Sun is accounted for.

We note that almost all the heat flowing from the surface to the atmosphere is carried by convection. The heat radiated by the surface and absorbed by the atmosphere is nearly balanced by the radiation returned by this same atmosphere. The difference is only 14 W/m2, compared to 96 W/m2 passing into the gas by convection. In our next post, we will simulate night and day over a sandy desert and see if we come up with reasonable variations in temperature at the sandy surface, the air above the surface, and the air high up in the tropopause.

Wednesday, July 20, 2011

Simulated CO2 Doubling

In Planetary Greenhouse we considered an atmosphere transparent to some long-wave radiation and opaque to others. In Circulating Cells Version 8.2, which you can download here, we simulate such an atmosphere with the new transparency fraction parameter.

For the moment, we ignore the temperature difference that must exist between the planet surface and the lower atmosphere (see Surface Cooling, Part VI). We assume that the solid or liquid surface beneath one of the bottom gas cells will be at the same temperature as the gas itself. Ever since our Earth Radiator post, we have assumed that the surface of a planet is a black body radiator. If a bottom cell is at 300 K, the surface below will be at 300 K also, and by Stefan's Law it will radiate 460 W/m2. At 303 K, the radiated power increases to 480 W/m2. Black-body radiation increases as the fourth power of the temperature, so a 1% increase in temperature causes a 4% increase in radiated power.

The absorption spectrum of the Earth's atmospheric layers varies in a complex and dramatic way with wavelength, as you can see here. What made our Total Escaping Power calculation so complicated was that we had to deal with the partial absorption of some wavelengths by each atmospheric layer, and therefore the partial emission of these same wavelengths by the same atmospheric layers. We want to avoid the complexity of partial absorption at a given wavelength, so we assume that the gas in our CC8 simulation has a spectrum that vacillates between perfect transparency to perfect opacity, and does so every fraction of a micron on the wavelength scale. As a result of this vacillation, a gas cell will absorb none of the radiation at a particular wavelength, or all of it. When we look at the fraction of black-body radiation that passes through a cell, this fraction is a constant property of the cell, regardless of its temperature or pressure. We call it the transparency fraction in the CC8 program, and here we will call it τ.

By the principle of radiative symmetry, each gas cells will radiate heat at the same wavelengths it absorbs. But because all the cells around it have the same absorption spectrum, none of the heat radiated by a cell will escape into space, except for the heat radiated by the cells in the top row, which we call our tropopause. These cells radiate directly into space. The power they radiate is the power that a black body would radiate, multiplied by 1−τ.

The incoming heat from the Sun, meanwhile, passes straight through our atmosphere, because we assume that the gas is perfectly transparent to short-wave radiation. The Sun's heat warms the planet surface, which for the moment we assume is something like sand. The sand heats up rapidly until it is losing heat by radiation and convection at the same rate it is gaining heat by absorption of the Sun's light. Some heat it radiates directly into space. The rest passes into the lower atmosphere and must be transported up to the tropopause by convection, where it is radiated into space.

Bottom Gas Cell Temperature = TB
Planet Surface Temperature = TS = TB
Stefan's Constant = σ = 5.7 × 10−8 W/m2/K4
Emitted Surface Radiation = σ(TS)4
Escaping Surface Radiation = τσ(TS)4
Top Gas Cell Temperature = TT
Emitted Tropopause Radiation = σ(1-τ)(TT)4

We set τ=0.50 and ran CC8 with Day heating and the Sun's power set to 350 W/m2. After ten million iterations we are confident that we have reached equilibrium, and we obtain this array. The average temperature of the bottom cells is 301.1 K (28°C) and of the top cells is 252.1 K (−21°C). The heat radiated by the surface is 468.5 W/m2, of which 234.2 W/m2 escapes directly into space. That leaves 115.7 W/m2 of the Sun's heat to be transported up through the atmosphere. The heat radiated by the tropopause is 115.1 W/m2, leaving 0.7 W/m2 unaccounted for, which is well within the range of our rounding errors and the random fluctuations in our cell temperatures.

In our previous post, we ran our simulation for an opaque atmosphere, which corresponds to τ=0.00, and the surface temperature rose to 355 K (59°C). We see that τ=0.50 allows the surface to cool by 31°C to 28°C. In With 660 ppm CO2, we showed that doubling the CO2 concentration in the Earth's atmosphere will cause a 2% drop in the total escaping power. So now we set τ=0.49, so as to cause a 2% drop in the power escaping directly from our simulated planet surface into space. We arrive at a this array, in which the surface has warmed by 0.9°C to 302.0 K and the tropopause has warmed by 0.4°C to 252.5 K.

As a check, we run with τ=1.00, in which case the atmosphere is perfectly transparent and the surface radiates all its heat directly into space. The surface cools to 280 K (7°C). The atmosphere assumes the dry adiabatic lapse profile. But now we turn on the cell mixing by setting the mixing fraction to 0.2, and after a few hundred thousand iterations we see the entire atmosphere warm up to 280 K. This is the warm atmosphere we described in our original Greenhouse Effect post and again in Adiabatic Magic. When the atmosphere is not transporting heat to the tropopause, there is no greenhouse effect, and the atmosphere mixes until it arrives at a uniform temperature equal to the surface temperature.

We see that CC8 can simulate the effect of changing the concentration of a greenhouse gas like CO2, simply by making small changes to its transparency fraction. Once we have included evaporation, clouds, and rain into our simulation, we will be able to estimate the effect of changes in CO2 upon the average temperature of our planet surface.

Wednesday, July 13, 2011

Black-Body Tropopause

Our CC7 program provides six different ways to heat the atmospheric cell array. In CC8, we eliminate most of these and replace them with only three: Day, Night, and Cycle. The others were useful in checking the performance of the simulation, but are no longer necessary. Because we now have a good understanding of the relationship between simulation time, impetus for circulation, and program iterations, we are now able to express the Sun's heat in W/m2 instead of the less realistic K/iteration of our earlier programs. We represent the incoming solar power with Q_sun instead of the previous Q_heating. Furthermore, we can use Stefan's Law directly upon the top cells, as if they were black and the gas above them were transparent. Our program now contains a value for Stefan's Constant, which we set to 5.7×10−8.

For our convenience, we display the time of day in hours in the main window. Time 12.0 hr is noon, when the Sun is certain to shine, and midnight is 0.0 hr. We display the current solar power in W/m2. Previously, we applied a sinusoidal variation in the Sun's power during the day, but now we simply turn the Sun's power on to Q_sun during daylight hours, and to zero during the night. As before, however, the Sun will shine for a fraction of the day given by day_fraction.

We run the program with Day heating and the Sun's power set to 350 W/m2. We have ke_fraction at 0.0 and we un-check left_only. Our cells have mass 333 kg/m2. Their specific heat capacity at constant pressure is 1 kJ/K. Thus the lower cells warm up at 0.001 K/s, which matches our previous Q_heating of 0.001 K/iteration. We allow the array to reach equilibrium, which takes a long time: five million iterations, or one hours on our lap-top. You will find the equilibrium state in Day_1.txt. You can load it into CC8 with the Load button. At equilibrium, the top row's average temperature is 280.0 K. Applying Stefan's Law, the top cells should radiate 350 W/m2, which is what we expect, since that's what we are putting in. The surface cell average temperature is 335.4 K, giving us the 55-K drop from the surface to the tropopause. This drop is consistent with our previous results.

We run the program with Q_sun set to 700 W/m2 and Cycle heating to simulate day and night. We have day_fraction set to 0.5. After a million iterations we see the temperature of the bottom and top rows varying by a few degrees during night and day, as we did in Rotating Greenhouse.

The equilibrium surface temperature of 59°C (335 K) is much hotter than the surface of the Earth (around 14°C), even though 350 W/m2 is the average power of the Sun. The Earth is cooler because its surface and lower atmospheric layers are able to radiate almost half their heat directly into space, assuming there is no cloud cover (see Total Escaping Power and subsequent posts).

Our next step is to allow the surface cells to radiate directly into space, and we will see how the surface cools down as a result. We must implement the surface and tropopause radiation before we can model the effect of clouds.