Showing posts with label temperature. Show all posts
Showing posts with label temperature. Show all posts

11 March 2010

How can annual average temperatures be so precise?

The comments on what should be reproducible raise the subject's question -- since a given thermometer reading is only within, say, 0.8 degrees, how can we claim to know the annual average temperature to 0.01 degrees for the globe?

One thing to remember is that the 0.8 is not the size of the error on every single observation.  Some will be extremely close to correct, and some will be 0.4 off -- large, but not the 0.8.  The 0.8 error is the range that we expect to see 95% of the observations be better than.  Still, with errors that large, how can we get a global average that's within 0.01?

I hit on an experimental way to demonstrate this, without requiring you all to set up thousands of meteorological stations around the world and then collect observations for a year.  Namely, get yourself 8 coins.  If you prefer making computers do things, a spread sheet will work as well, or you can write the program from scratch.

07 January 2010

CO2 and temperature for 800,000 years

First, the figure gives the answer on CO2 and temperature over the last 800,000 years:



Here we have each value of CO2 plotted against the temperature deviation from reference values -- with the temperature being for 1000 years before the corresponding CO2 value. The correlation for this is about 0.89 (R), meaning that you could explain 79 percent (0.89*0.89) of the variation (R^2) in CO2 by looking at the temperature. As is mentioned in my post Does CO2 correlate with temperatures, where we saw equally high correlation between temperature and CO2 (even higher if you give CO2 a 20-30 year lead on temperature), and quite a few times in the comments, correlation is not causation. Could be that both temperature and CO2 are pushed around by something else. More about that in a moment.

It's common to see the claim that temperature 'leads' CO2. Loosely speaking, this means that temperatures generally change before CO2 does, and that there is a consistent pattern to the connection -- if temperature rises, CO2 does as well. This is true; it leads by about 800 years [Caillon and others, 2003]. The amount of lead also seems to depend on whether you're in a glacial period or (as we are now) an interglacial. The correlation between temperature and CO2 is lower (by a very small amount) if you take their values for the same time (drops to 0.88). And it drops by more if we take the temperatures for 2000 years before the CO2 value, to 0.87, indicating from this very simple approach that the lead is between 0 and 1000 years, probably closer to 1000 -- as is found from the more serious approach in the reference.

So there's some interesting science to do, to understand why that lead exists, why it is many hundred years (rather than a few dozen years, or a few thousand), and why the lead time depends on whether you're in a glacial period or an interglacial period. Oddly, to me, most of the time that people mention this lead relationship, they are not referring to any of this.

03 April 2009

How much detail is there really?

I'm thinking about sea surface temperature (SST) these days, but the approach here is one that can be applied to many situations, even ones outside weather and climate. A common, important, and not always easy, questions is -- just how much detail do you need? The more detail, the more expensive it is to make a good product, whether that's an analysis of sea surface temperature, a climate model, or a surface in a video game. Of course, what I'd like is the sea surface temperature every few meters over the entire globe. If that's more than necessary at some time, I could average it down. But ... it would take an awful lot of storage to save temperatures every few meters (my back yard, my neighbor's, my front yard, ...) over the whole globe.

Let's start by looking at an actual high resolution global product, though not every few meters! The SST analysis at http://polar.ncep.noaa.gov/sst/ gives a value every 1/12th of a degree in latitude and longitude, one about every 9 km (6 miles). It has about 9 million values. Let's also suppose that this is fine enough resolution that everything important is represented.

The worst resolution is to use 1 number for the entire globe, the average for all ocean points. To measure how bad this is, I'm going to compute the root mean square error. (Those who know what this is can skip to the next paragraph.) It is often abbreviated rmse. To find it, we go through every ocean point in the grid and find the difference between the value there and the average. Then we multiply this difference by itself (square it -- this avoids the marksmen statistician story*). Then add up these squares for every ocean point. This is a big and not interesting number. One thing that would be more interesting is the average value of the squared error -- the mean square error. So we divide by the number of points that were involved. This also tells us the error variance. Since we think more in terms of temperature and temperature changes than squares of temperature changes, we take the square root of the mean square error -- get the rmse. This is a figure which represents a typical magnitude of how far off we expect to be. We could be either warmer or colder by this much, but this is the magnitude.

* Two statisticians went to a shooting range and each fired at the target. The first missed by 1 meter to the left (-1 meter). The second missed by 1 meter to the right (+1 meter). They then congratulated each other on their fine marksmanship because on average they had hit the bullseye. Their average error was indeed zero. But their rms error was 1 meter.

When I compute the RMSE for using global mean temperature instead of the full resolution grid, I find 12 C. That's ... enormous. The difference between water at 20 C (68 F) and 32 C (90 F) is pretty large! So, clearly, we can't be satisfied with an RMSE of 12 C. But now we have a method for looking at the resolution we need, and a notion of how bad you can get.

Then I made my program average over smaller boxes than the whole globe, say 90 degrees on a side -- London to Chicago, equator to pole -- and found the RMSE comparing those box averages to the original temperatures in the full resolution grid. No surprise that boxes that large were pretty bad. But ... once I got down to boxes 2 degrees on a side (which is something like 200 km, or 120 miles), the RMSE was down to 0.5 degrees.

This is still definitely not zero, but it isn't bad. When a typical satellite used for the job -- such as the AVHRR instrument on NOAA-18 -- is used to make an observation, it has an RMSE (compared to a buoy's thermometer at about the same location at about the same time) of about 0.5 degrees. In other words, with boxes 2 degrees on a side, the average represents what is happening in sea surface temperature about as well as getting a single observation from satellite. We've also managed to reduce our RMS error by about 95% as compared to using only a single number. On the other hand, even though we've captured 95% of what's going on, we only need to use 16,200 numbers -- instead of the 9,331,200 we started with. 95% of the information of the full grid, with only 0.2% as much data.

We've caught 90% of what is happening (reduced the rmse by 90%) when the boxes are 6 degrees on a side (600 km, 360 miles). And it's 99% once we're down to boxes only 0.5 degrees (50 km, 30 miles) on a side (which means only about 3% as many data points are needed to represent the full data set to 99% accuracy).

Now, let's translate this back to some situations we might care about. In trying to construct climatologies of sea surface temperature, we run in to the problem that as we go back in time, there are fewer and fewer data points. On the other hand, if we have 1 observation in each box 6 degrees on a side, we've managed to capture 90% of what is happening in the sea surface temperature. In other words, a much sparser data set than we might imagine could indeed represent an awful lot of what is happening in the ocean. A global grid at 6 degrees resolution has only 1800 points, so we need only 1800 observations to fill it in our simple-minded way.

At 2 degrees resolution, we've captured 95% of what happens in sea surface temperature (at least to this quick little glance -- I only looked at 1 day, as analyzed by 1 center, etc.) So, if we had a good global ocean model at 2 degree resolution, we'd actually be pretty far along in being able to predict sea surface temperatures (model climate, etc.) well. In practice, there are processes that happen in smaller areas than the 2 degree box which can change the whole box's average and we, therefore, want finer resolution than 2 degrees. More about that in a different post.

In thinking about observing systems, if we only 'need' 1 observation every 200 km or so, and we have satellites that can take an observation every 4 km (like the one above) we're all done, right? Unfortunately, no. The problem is, that satellite looks for clouds. If there are clouds -- and cloudy areas can easily stretch for 1000 km -- the satellite can't see the sea surface to tell us what the temperature is down there. So we need other data sources -- ships, buoys, other sorts of satellite (ones that can see through clouds) to fill in even just the 200 km (2 degrees latitude-longitude) boxes each day. Plus we need to observe the detail in the oceans that are involved in those other processes I mentioned. It isn't just for models that they're important -- fishing also cares.

05 January 2009

Results on deciding trends

No, the delay was not because the results came out differently than I'd expected. Just the more mundane business that I've been doing a number of different things and getting the figures done up reasonably is taking some time as I change my mind about what constitutes reasonable.

In brief (in a journal paper, this would be the 'abstract'):
  • You need 20-30 years of data to define a climate trend in global mean temperature
  • Forward and backward trends are markedly different
  • Therefore, to discuss climate trends in global mean temperature, you need to use 20-30 years of data centered on the date of interest.
As with any abstract, it's too brief to show you why any of these are true, just some simple declarations. Now, if you trust me absolutely (which I don't recommend -- and if I'm talking science, you don't need to), you can stop and move on to some other reading. But let's take a look at the whys. As before, I'm putting the data and programs on my personal web site and you can run the analysis yourself, and modify the programs to work on different assumptions, methods, data sets.

Let's consider the first point -- how long it takes to determine a climate trend in global mean temperature. We could define a trend with 2 minutes of data -- temperature at one minute, temperature at the next minute, and draw a straight line through the two numbers. We'd wind up with wildly varying trends, though, from minute to minute through the year. This is weather and turbulence. Make it daily or monthly averages, and we still have the wildly varying trends, and the magnitude of those trends will depend on what time period we chose. Rather than declare that 'this is the right period', we'll determine it by looking at the data itself.

If
it is meaningful to talk about climate as opposed to weather, there has to be a time span over which our result for describing climate does not depend much on how long a time span we choose. For average climate temperature, we found 20-30 years as the appropriate time span. I didn't show the figures then, but it's in the program and output you can pick up from my web site that this is also the appropriate time span for deciding a climate temperature variance (how much scatter there is about the average; even if the average didn't change, we would probably consider it a climate change to have winter lows vary from -30 to +15 instead of -10 to -5).

Figure 1 here shows the trends for all years (remember I'm lopping off the first 31 and last 31 from the NCDC record) that I computed trends for, by all 3 methods, in terms of the length of data record used. So at 36 (months) we see a range in the computed trends between +15 C/century and -15 C/century. These are enormous values cmpared to what we think of for climate change. If I wanted to give you a wrong impression about climate, then, I could use such short records. The range declines as we take longer periods. And then flattens out for trend periods of 252-372 months (21-31 years -- remember I took only odd averaging periods). In this part of the display, the range is about +1.5 C/century to -1.5 C/century -- and it is independant of how long an average I took. This, then, supports that a) there is such a thing as a climate temperature trend and b) that you need 21-31 years to find it (we can round to 20-30, given how 19 years is close to 21 also, we expect 20 even to be so as well).



Statistical aside: To compute variance, we find the deviation of each observation from the mean, square it, and then add this value up for all observations and divide by the number of observations. (Or use the appropriate function in your spreadsheet.) This is a fundamentally meaningful quantity. If we then take the square root of this number, and the numbers have a normal distribution, then we have a standard deviation. We can always take the square root of the variance, but it will not always be a standard deviation.

In figure 2, I plot instead the maximum and minumum trends, and the square root of variance -- again in terms of how long a period is used to compute the trends. This shows fundamentally the same information, but perhaps a little more clearly. Aside: It's a good idea to look at your data from several different vantages. Sometimes the display method you use in one step can hide something that's blindingly obvious in another method. Again, we see that the figures (maximum trend, minimum trend, average trend, square root of variance in trend) all stabilize once the data length used is 20-30 years. And, conversely, that for periods of 3-13 years, the figures all depend sensitively on how long an averaging period you choose.



Choose is a key word in doing science. We try to avoid having choices. Choices can be made differently by different people, for different reasons, and not all those reasons will turn out to be good ones. Finding a scientific principle and then looking for how to satisfy that principle is far better. Here, the principle is that the length of data used should not affect your conclusion about what the climate trend is. This is a strong principle. So when you see someone violating it (say by using a 7 year span without doing some real work to justify it -- work like I'm doing here), they're probably not doing good science.

Now, in figure 3, let's look at what the trends are like if we use 7 years of data, versus using 25 years. I'm computing all these by using centered information -- data evenly on either side of the time of interest. We'll get to why this is best in a minute. The main thing I think this shows is that if you use the short period, you present a false impression that climate is highly variable, trends changing from some very high positive value to a high negative value in a span not terribly longer than the 7 years' data you used in either case. This makes no sense for climate, but does for weather, or for misleading people. Weather, we know, does change rapidly. We can be warmer than usual for a few days (or months, or years) and then cool a few days/months/years later. Nobody (scientific) has ever said weather was going to end. Go out to the 25 year data period trends and we see, instead, that the trends have more stable behavior. They do change, which is reasonable since we do expect that climate changes. But it's no longer large magnitude flip-flops. That, too, makes sense as climate is a big beast and turning on a dime has to be a rare if ever occurrence.



To look a little differently at it ... if someone shows you a trend over 3 years, about 90% of what they're showing you is weather (real trends of up to 1.5 C/century, 3 year trends of up to 15 C/century -- 90% of that 15 C/century is weather). For a 7 year trend, it's about 70% weather. Weather is interesting, but if you're interested in climate, and they're claiming to be talking about climate, then they're misleading you by those 70-90% of weather they've thrown in by using such short spans.


On to which data to use for computing trends (or, for that matter, averages, but I'm focusing on trends today). Figure 4 shows trends in degrees per century as computed with data forward from the date given, backwards from the date given, and centered on the date shown. It also shows, and this is why I went to degrees per decade -- the magnitudes come out comparable, the NCDC monthly anomalies. I computed the trends using 25 years of data (300 months).



We immediately see that, indeed, the forward and backward trends are quite different, as expected in the planning note 'deciding climate trends'. The curves themselves are actually the same -- but shifted by 25 years (the period used to compute the trend -- when I use 31 years, it's shifted by 31 years, and so on). The centered trends show, again, the same behavior, but now 12.5 years (half my data period) off from the forward, or backward trends. So, look at the data for anomalies versus the different trends as computed. If we look at, say, 1945 (month 780) -- a generally warm year, we see a modestly negative trend from the centered trends, an extremely negative trend if we look forward, and extremely positive if we look backward. What's happening? And which makes most sense for thinking about the 1945 climate trend?

Climate is about normal, our expectations. For 1945, then, would we describe the typical change as one of rapid warming? rapid cooling? a modest cooling? If we look around then, the best description of the tendency is that there's a modest cooling going on. 1930s were warm, 1945 was a particularly warm year, but going in to the 1950s, temperatures were cooler. The large trends, in opposite directions, the forward and backward trend computations give us, even though for an appropriate period, mislead us. The centered trend computation gives us the right idea of what is going on around 1945. Repeat this inspection for other years, and think you'll rapidly come to the conclusion that the best description of what is going on around any given time is the one from a centered computation. If a trend is downwards (negative numbers), then we expect that times before our year of interest are generally warmer than later times. If it's upwards (positive trend), the we expect later years to be warmer. Only the centered computation consistently gives us this result.

We now have 2 conclusions: trends should be computed with 20-30 years of data, and they should be centered on the date of interest. Let's see how it works, applied to as much data as possible. To cover the greatest time span possible, I'll take the shortest data length reasonable for computing trends -- 20 years. Since I'm doing centered computations, this lets me get to within 10 years of the start and end of the record (remember I had been skipping the first and last 31 years so that all three methods could be used, and because I didn't know if some number shorter than 31 years would be long enough). Figure 5 gives the result, in degrees per decade, and with the NCDC monthly anomalies as well.



The most recent year we can compute a good quality trend for is 1998. The trend then is a warming of 0.19 degrees per decade, 1.9 per century. We see that the trend is higher towards the end of the record (i.e., towards the present) than at other times, though we'd have to do additional work to decide whether the difference was physically meaningful. The thing which surprised me about the curve is that most of the time -- from 1890 to 1998 that we can compute a quality trend for -- the climate trend has been a warming. Not a matter of sometimes up, sometimes down, but rather a basically up except for a bit of down in mid-20th century. 70% of the time, we've been seeing warming.

By way of summary, or postscript, or some such ...
  • Whether it is to compute the average climate temperature, the variance of climate temperature, or the trends in climate temperature, we need 20-30 years of data.
  • On the other hand, it is possible to compute a climate with 20-30 years of data. This didn't have to be the case. I'll show in a later post a curve with no climate in the sense I've been talking about.
  • Most of the time for the period of data, we've been experiencing a climate warming.
Conclusions are, of course, limited by how data were analyzed. In this analysis, I looked only at the global mean temperature data themselves. If I'd done something more sophisticated, like carefully removing the effects of some 'weather' (short term or from outside the climate system) processes such as El Nino-La Nina oscillations, volcanoes, and solar variability, and then looking at how long was needed to get a stable estimate of the mean, or trend, I might wind up with a shorter period. On the other hand, that shorter period would only apply when people did indeed do a careful analysis of the effects of those things on global mean temperatures. This can be done, but is more sophisticated than I wanted to start with. It's also vastly more sophisticated than the many blogs and such out there which are misleading people by doing sloppy short term analysis and pretending that it's climate they're talking about.

Update  13 February 2010: The data file I worked on and the program I used are in a tar file.  You'll need a fortran compiler for this, or translate it to a language of your choice.  Nothing very fortran-ish is being done and the program is short.

24 September 2008

Atmospheric Lapse Rates

The question place is serving its purposes, one of which is to bring up points that warrant some discussion in a fuller post. At hand is the atmospheric lapse rate, which Bart brought up by way of his question:
2) I read elsewhere (I can only research what I read, I don't really have the ability to check much of this for myself) that models assume a constant lapse rate. Chris said the lapse rate is required for the greenhouse effect, but from everything I look at people only catgorize in "Dry" or "Moist" cases, but doesn't it vary everywhere over the globe?


There are models, somewhere, that assume anything one could mention, so I suppose there are some which assume the lapse rate. As you correctly notice, though, lapse rates depend on conditions, and those conditions vary over the globe. A serious climate model couldn't assume the lapse rate. And, in truth, they don't. More in a moment, but something to look back at is my description of the 16 climate models

Let's start with the lapse rate itself. What it is, is the change in temperature with elevation. Through the troposphere, the lapse rate is a negative number (cooling with elevation). In the stratosphere, it turns to zero and then positive (warming with elevation). In the mesosphere, we go back to cooling with elevation. This is a strictly observational issue. You can find temperature profiles, say from the Standard Atmosphere (a specific thing; Project: take a web look for it and see what they look like; they've changed through time, by the way). And then find the temperature difference between two levels, and divide by the elevation difference. That'll give you the average lapse rate. You can also find, radiosonde soundings of temperature. (I'd start my search for this project at the National Climatic Data Center.) This will let you see how the lapse rates vary day to day at a location, and between locations.

On the theoretical side, we go back to Conservation of Energy. We start with a completely dry (meaning no water vapor) blob of air, in an insulating bag that prevents it from radiating, conducting, or convecting energy to or from the surroundings. Then we lift it through the atmosphere. As we do so we'll find that its temperature drops. This happens because our blob does work in expanding. The energy for that work comes from its own thermal energy store. We can compute exactly how much the air would cool under this circumstance. It is about 10 K per km near the surface of the earth. This is what we are referring to in talking about the Dry Adiabatic Lapse Rate. The 'adiabatic' refers to our insulating bag around the air blob.

The polar regions, particularly the Antarctic plateau, are not bad approximations to that situation. But most of the atmosphere has fairly significant amounts of water vapor. We start, now, with a slightly different bag. It still prevents heat to be added or lost to the bag from outside. But now there's a second energy source inside the bag. Water vapor can condense, and when it does, it will release energy. We take the approximation that all the heat energy goes to the gases in the bag, and that the newly-formed liquid water is immediately moved outside the bag.

Now when we lift the bag, things go a bit differently. Let's start with air at 70% relative humidity, a typical global mean value. As we lift the air, it first acts 'dry', so cools at the about 10 K per km rate. But after a while, we have cooled to the point of being at 100% relative humidity. When we start to lift any further, water starts condensing and releasing heat. The condensation only happens if we're still cooling, so it can't reverse that tendency. But it can greatly slow the rate of cooling. This gives us a Moist Lapse Rate. Note that I dropped 'adiabatic' from the description. Since material is leaving the bag, it isn't an adiabatic process any more. It is pseudoadiabatic (a term you'll see) -- almost adiabatic, as the loss of mass isn't large. But not entirely adiabatic.

As a typical ballpark value, we take 6.5 K per km as the moist lapse rate. But this obviously will depend a lot on how much water was in the bag to begin with, and the temperature. If we start with a very warm, saturated, bag of air, then the lapse rate can be even lower than the 6.5 K per km. If we start, though, with a cold blob of air, even if it is saturated, we are still close to 10 K per km lapse rate. The thing is as we get colder, there's less water vapor present, which gives less condensation, then less heating. Consequently even in the tropics, the lapse rate heads towards the dry adiabatic value as you get high above the surface.

Whether moist or dry, the lapse rate computed this way is an idealization. In the real atmosphere, radiation does move energy around, and blobs of air do mix with each other (even when rising). Still, it's derived from a strong scientific principle (conservation of energy), and it turns out to give us good ideas (in reasonable accord with observation) about what the atmosphere should look like in the vertical.


For the modelling, let's think back to the 16 models. First, many of them are never used, so we'll ignore the longitude-primarily models. That leaves us with the 0 dimensional model I've already given an example of, and there's not even the opportunity to impose or even make use of a lapse rate in that. The 4 dimensional model definitely doesn't assume a lapse rate -- doing so would force violations of conservation of energy. Radiative-convective models can't force the lapse rate for the same reason. For a discussion of such models, to which I'll be returning in another post about water vapor's greenhouse contribution, see Ramanathan and Coakley, 1978. As of that era, one did specify a critical lapse rate. This isn't the lapse rate that the model had to have, rather, it was a limit. If the limit were violated, something has to happen. That something is to conserve energy by mixing the layers that violated the limit. And Energy Balance Models, as I expected, don't even mention lapse rate. See North, 1975 for a discussion of energy balance models.

Either the models are too simple to know about lapse rates (0 dimensional, Energy Balance), or they compute the lapse rate (Radiative Convective, 4 dimensional). Either way, the lapse rate is not assumed before hand. It's an interesting after the fact diagnostic for the Radiative Convective or 4d models, or impossible to speak to.


One thing to do is find some better sources for you to read. I taught an introductory (freshman level) physical geology class with Lutgens and Tarbuck, and liked the text there. They have a text at that level for meteorology, but I haven't read it myself. It should be good, though. John M. Wallace and Peter V. Hobbs, Atmospheric Science: An Introductory Survey is an excellent book. In half the chapters, comfort with multivariate calculus is assumed. But the other half are descriptive/physical rather than quantitative/mathematical so should be approachable already. A second edition is now out, I used the first. Does anyone have suggestions for a good freshman level introduction to meteorology/climate?

16 September 2008

Sea Ice Packs

I've already mentioned types of sea ice, but that's only a bare scratch on the surface of the subject of sea ice. Another bit of vocabulary before diving in to today's sea ice: a chunk of sea ice is called a 'floe'. Not a flow, nor a sheet, a floe. Ice sheet is something quite different.

When we get a bunch of floes together, we start to have an ice pack. Three terms come up for describing a region of the ice pack (or maybe the entirety): concentration, area, and extent. Ice pack area makes the most intuitive sense -- add up the area of all ice floes, and that's the area of the ice pack. Concentration and extent are a little more removed. For concentration, draw a curve around some region you're interested in. Then divide the area of sea ice by the total area of the region bounded by your curve. Two common 'curves' used in the science are the footprint of a satellite sensor, and the area of a grid cell. The latter is what you'll see presented on any of the graphics at the sea ice sites I link to. For extent, you then take your grid and for every cell that has more than some concentration (which you'll specify), you add up the area of the entire grid cell. Extent will always be greater than area.

The usual concentration cutoff, and the one to assume if it isn't specified, is 15%. Below this, the ice is not reliably detected by the most commonly-used sensors, and it is a greatly smaller practical problem for ships. Not that ships appreciate bashing in to ice floes, but that at this concentration or lower, it can be manageable to move around them (and get out of the ice pack you were surprised by!).

The most common type of sensor to use for detecting sea ice from space uses passive microwaves. The ice (it turns out) emits microwave energy much more effectively than the ocean around it. This gives it a higher brightness temperature. Between that and some other details, we can get back an estimate of the concentration of sea ice that the satellite was looking at. A word, though, as we're coming out of summer: the method relies on the difference between ice and water. If you have ponds of water sitting on the ice floes, which can happen on thick ice such as the Arctic can have, then your concentration (area) estimate will be biased low. The extent is probably still not too bad. The reason is, by the time you're falling below 15% cover, the thick floes will have been storm-tossed enough that the ponds will have been emptied, or that it's late enough in the season that the melt pond melted its way through the ice floe and there really isn't any ice under the apparent water any more.

In looking at the NSIDC and Cryosphere Today pages on the Arctic melt, one thing to keep in mind is that one uses extent and the other uses area. Their numbers aren't directly comparable. They also differ in how they compute their estimates, in that one uses a longer averaging period than the other. The longer period gives you more confidence about the value (weather over the ice, or ocean, can give you false readings, but it moves pretty fast compared to the ice cover), but will miss some of the details in time.

More to come ... (bwahaha) But, in the mean time, questions you have about sea ice are welcome here.

31 July 2008

Earth temperature 1

The earth's temperature is something I'll probably come back to a few times as it is a lot more involved than you might think. So this is the first part -- the temperature as observed from space.

'Observed from space' shows our first complexity. Satellites can't drop a thermometer into the earth's atmosphere, oceans, etc., to find out what the temperature is. So what can they measure from up there? Fundamentally, they can measure voltages, resistances, currents, counts of an oscillator -- electrical/electronic things like that. Not very helpful at the start. But we can arrange it so that the things we can measure have something to do with what we want to know about.

This is actually how some thermometers work. Think of a traditional old mercury thermometer. It doesn't measure 'temperature', whatever that may be; it measures the length of a thread of mercury. Alcohol thermometers use alcohol instead, but in the same idea. 'Temperature' is the property, then, which makes materials expand (when hotter) or contract (when colder). It was discovered first as a practical matter that materials do expand with temperature in a sense in agreement with our own physical ideas of hot and cold (ex. Mr. Fahrenheit and M. Celsius). So temperature could be equated to expansion of materials. In the 1800s, a firm theoretical basis for which it should be like that (and sometimes not like that at all) was laid down.

For the satellites, a similar process of trying to match up what could be measured to what was desired was involved. The little 'aim it in your ear' thermometers are a little like the satellite method. What they do (satellites more thoroughly, home ear thermometers only in a small color zone) is arrange a detector so that it gets hotter as more radiation falls on it, then measure the resistance/voltage/... of this hotter detector wall.

The satellite detector I've described relies on the Stefan-Boltzmann law to decide temperature -- it measures the energy (which causes the detector to heat up) coming from the earth, and then with the law (Energy = s * T^4, s = the Stefan-Boltzmann constant, wonder why), converts that measured energy to a temperature. That temperature is the 'Black Body' temperature of the earth. If the earth were an ideal black body, the observed amount of energy is what would be seen if the earth were radiating at the given temperature.

We can also make detectors which measure the amount of energy that's within a certain small wavelength interval (blue, for instance). This is how the ear thermometer works, except it uses infrared. Given that observation, and Planck's law (more involved than Stefan-Boltzmann, look it up), we can compute the temperature your inner ear would have to be to be radiating that much energy -- if your inner ear were a black body. It's a fair approximation to one.

In either case, we have a 'Brightness Temperature' -- the temperature the thing you're looking at would have to be to give the observed brightness (energy). In the case of the earth, it is about 255 K, -18 C, 0 F. For Venus it's about 232 K, a good deal colder than the earth. Seriously, check http://nssdc.gsfc.nasa.gov/planetary/factsheet/venusfact.html
to verify, or find some others.

What happened? Venus is supposed to be hot! The earth is seldom as cold as -18 C or 0 F anywhere, much less for a planetary average. Well, Venus is hot (over 400 C at the surface) and the earth's surface is rather warmer (about 33 C or 60 F) than the brightness temperature (black-body equivalent temperature -- same thing).

The thing is, we have to pay attention to what the satellites observe -- radiation. If that radiation comes from the surface, we see a surface temperature. But in general, the radiation comes from somewhere up in the atmosphere. For Venus, it is a very long way from the surface, so very much colder. For the earth it is typically several km (or miles) up from the surface.

If you think this is indirect and complicated, wait 'til we talk about trying to observe the temperature of layers within the atmosphere from space!