Sunday, October 27, 2013

Enough hockey sticks for a team

One of the persistent denier myths is that the Hockey Stick (usually meaning Mann, M. E., R. S, Bradley, and M. K. Hughes. 1999. Northern Hemispheric Temperatures During the Past Millenium: Inferences, Uncertainties, and Limitations. Geophysical Research Letters. 26:759-762) has been discredited.  Not only is that myth false but Mann et al. (1999) has been validated through the publication of numerous hockey stick graphs since 1999.  Here is a brief list of the ones I know:

Crowley, T. J. 2000. Causes of Climate Change Over the Past 1000 Years. Science 289:270-277: Used both his own and Mann et al. (1999)'s hockey sticks to examine the cause of temperature changes over the past 1,000 years.  Found that natural forcings could not explain twentieth century warming without the effect of greenhouse gases.

Huang, S, H. N. Pollack, and P. Shen. 2000. Temperature Trends over the past five centuries reconstructed from borehole temperatures. Nature 403:756-758: Reconstructed global average temperatures since AD 1500 using temperature data from 616 boreholes from around the globe.

Bertrand, C., M. Loutre, M. Crucifix, and A. Berger. 2002. Climate of the Last Millenium: A Sensitivity Study. Tellus 54A:221-244.: Reconstructed solar output, volcanic activity, land use changes, and greenhouse gas concentrations since AD 1000, then computed the expected temperature changes due to those forcings.  Compared the computed temperature changes with two independent temperature reconstructions.

Esper, J., E. R. Cook, and F. H. Schweingruber. 2002. Low-frequency Signals in Long Tree-ring Chronologies for Reconstructing Past Temperature Variability. Science 295:2250-2253: Reconstructed Northern Hemisphere temperatures between AD 800 and AD 2000 using tree ring chronologies.

Cronin, T. M., G. S. Dwyer, T. Kamiya, S. Schwede, and D. A. Willard. 2003. Medieval Warm Period, Little Ice Age and 20th Century Temperature Variability from Chesapeake Bay. Global and Planetary Change 36: 17-29: Reconstructed temperatures between 200 BC and AD 2000 around Chesapeake Bay, USA, using sediment core records.

Pollack, H. N. and J. E. Smerdon. 2004. Borehole Climate Reconstructions: Spatial Structure and Hemispheric Averages. Journal of Geophysical Research 109:D11106: Reconstructed global average temperatures since AD 1500 using temperature data from 695 boreholes from around the globe.

Esper, J., R. J. S. Wilson, D. C. Frank, A. Moberg, H. Wanner, and J. Luterbacher. 2005. Climate: Past Ranges and Future Changes. Quarternary Science Reviews 24:2164-2166: Compared and averaged five independent reconstructions of Northern Hemisphere temperatures from AD 1000 to AD 2000.

Moberg, A., D. M. Sonechkin, K. Holmgren, N. M. Datsenko, and W. Karlen. 2005. Highly Variable Northern Hemisphere Temperatures Reconstructed from Low- and High-resolution Proxy Data. Nature 433:613-617: Combined tree ring proxies with glacial ice cores, stalagmite, and lake sediment proxies to reconstruct Northern Hemisphere temperatures from AD 1 to AD 2000.

Oerlemans, J. 2005. Extracting a Climate Signal from 169 Glacier Records. Science 308:675-677: Reconstructed global temperatures from AD 1500 to AD 2000 using 169 glacial ice proxies from around the globe.

Rutherford, S., M. E. Mann, T. J. Osborn, R. S. Bradley, K. R. Briffa, M. K. Hughes, and P. D. Jones. 2005. Proxy-based Northern Hemisphere Surface Temperature Reconstructions: Sensitivity to Method, Predictor Network, Target Season, and Target Domain. Journal of Climate 18:2308-2329: Compared two multi-proxy temperature reconstructions and tested the results of each reconstruction for sensitivity to type of statistics used, proxy characteristics, seasonal variation, and geographic location.  Concluded that the reconstructions were robust to various sources of error.

D'Arrigo, R. R. Wilson, and G. Jacoby. 2006. On the Long-term Context for Late Twentieth Century Warming. Journal of Geophysical Research 111:D03103: Reconstructed Northern Hemisphere temperatures between AD 700 and AD 2000 from multiple tree ring proxies using a new statistical technique called Regional Curve Standardization.  Concluded that their new technique was superior to the older technique used by previous reconstructions.

Osborn, T. J. and K. R. Briffa. 2006. The Spatial Extent of 20th-century Warmth in the Context of the Past 1200 Years. Science 841-844: Used 14 regional temperature reconstructions between AD 800 and AD 2000 to compare spatial extent of changes in Northern Hemisphere temperatures.  Found that twentieth century warming was more widespread than any other temperature change of the past 1,200 years.

Hegerl, G. C., T. J. Crowley, M. Allen, W. T. Hyde, H. N. Pollack, J. Smerdon, and E. Zorita. 2007. Detection of Human Influence on a New, Validated 1500-year Temperature Reconstruction. Journal of Climate 20:650-666: Combined borehole temperatures and tree ring proxies to reconstruct Northern Hemisphere temperatures over the past 1,450 years.  Introduced a new calibration technique between proxy temperatures and instrumental temperatures.

Juckes, M. N., M. R. Allen, K. R. Briffa, J. Esper, G. C. Hegerl, A. Moberg, T. J. Osborn, and S. L. Weber. 2007. Millenial Temperature Reconstruction Intercomparison and Evaluation. Climate of the Past 3:591-609: Combined multiple older reconstructions into a meta-analysis.  Also used existing proxies to calculate a new Northern Hemisphere temperature reconstruction.

Wahl, E. R. and C. M. Ammann. 2007. Robustness of the Mann, Bradley, Hughes Reconstruction of Northern Hemisphere Surface Temperatures: Examination of Criticisms Based on the Nature and Processing of Proxy Climate Evidence. Climatic Change 85:33-69: Used the tree ring proxies, glacial proxies, and borehole proxies used by Mann et al. (1998, 1999) to recalculate Northern Hemisphere temperatures since AD 800.  Refuted the McIntyre and McKitrick criticisms and showed that those criticisms were based on flawed statistical techniques.

Wilson, R., R. D'Arrigo, B. Buckley, U. Büntgen, J. Esper, D. Frank, B. Luckman, S. Payette, R. Vose, and D. Youngblut. 2007. A Matter of Divergence: Tracking Recent Warming at Hemispheric Scales Using Tree Ring Data. Journal of Geophysical Research 112:D17103: Reconstructed Northern Hemisphere temperatures from AD 1750 to AD 2000 using tree ring proxies that did not show a divergence problem after AD 1960.

Mann, M. E., Z. Zhang, M. K. Hughes, R. S. Bradley, S. K. Miller, S. Rutherford, and F. Ni. 2008. Proxy-based Reconstructions of Hemispheric and Global Surface Temperature Variations over the Past Two Millenium. Proceedings of the National Academy of Sciences 105:13252-13257:  Reconstructed global temperatures between AD 200 and AD 2000 using 1,209 independent proxies ranging from tree rings to boreholes to sediment cores to stalagmite cores to Greenland and Antarctic ice cores.

Kaufman, D. S., D. P. Schneider, N. P. McKay, C. M. Ammann, R. S. Bradley, K. R. Briffa, G. H. Miller, B. L. Otto-Bliesner, J. T. Overpeck, B. M. Vinther, and Arctic Lakes 2k Project Members. 2009. Recent Warming Reverses Long-term Arctic Cooling. Science 325:1236-1239: Used tree rings, lake sediment cores, and glacial ice cores to reconstruct Arctic temperatures between 1 BC and 2000 AD.

von Storch, H., E. Zorita, and F. González-Rouco. 2009. Assessment of Three Temperature Reconstruction Methods in the Virtual Reality of a Climate Simulation. International Journal of Earth Science 98:67-82: Tested three different temperature reconstruction techniques to show that the Composite plus Scaling method was better than the other two methods.

Frank, D., J. Esper, E. Zorita, and R. Wilson. 2010. A Noodle, Hockey Stick, and Spaghetti Plate: A Perspective on High-resolution Paleoclimatology. Climate Change 1:507-516: A brief history of proxy temperature reconstructions, as well as analysis of the main questions remaining in temperature reconstructions.

Kellerhals, T., S. Brütsch, M. Sigl, S. Knüsel, H. W. Gäggeler, and M. Schwikowski. 2010. Ammonium Concentration in Ice Cores: A New Proxy for Regional Reconstruction? Journal of Geophysical Research 115:D16123: Used ammonium concentration in a glacial ice core to reconstruct tropical South American temperatures over the past 1,600 years.

Ljungqvist, F. C. 2010. A New Reconstruction of Temperature Variability in the Extra-tropical Northern Hemisphere During the Last Two Millenia. Geografiska Annaler: Series A Physical Geography 92:339-351  : Reconstructed extra-tropical Northern Hemisphere temperatures from AD 1 to AD 2000 using historical records, sediment cores, tree rings, and stalagmites.

Thibodeau, B., A. de Vernal, C. Hillaire-Marcel, and A. Mucci. 2010. Twentieth Century Warming in Deep Waters of the Gulf of St. Lawrence: A Unique Feature of the Last Millenium. Geophysical Research Letters 37:L17604: Reconstructed temperatures at the bottom of the Gulf of St. Lawrence since AD 1000 via sediment cores.

Tingley, M. P. and P. Huybers. 2010. A Bayesian Algorithm for Reconstructing Climate Anomalies in Space and Time. Part I: Development and Application to Paleoclimate Reconstruction Problems. Journal of Climate 23:2759-2781.

Tingley, M. P. and P. Huybers. 2010. A Bayesian Algorithm for Reconstructing Climate Anomalies in Space and Time. Part II: Comparison with the Regularized Expectation Maximum Algorithm. Journal of Climate 23:2782-2800.  Both Tingley and Huybers papers revolved around the same reconstruction, in which they derived and used a Bayesian approach to reconstruct North American temperatures.

Büntgen, U., W. Tegel, K. Nicolussi, M. McCormick, D. Frank, V. Trouet, J. O. Kaplan, F. Herzig, K. Heussner, H. Wanner, J. Luterbacher, and J. Esper. 2011. 2500 Years of European Climate Variability and Human Susceptibility. Science 331:578-582:  Used tree ring proxies to reconstruct Central European temperatures between 500 BC and AD 2000.

Kemp, A. C., B. P. Horton, J. P. Donnelly, M. E. Mann, M. Vermeer, and S. Rahmstorf. 2011. Climate Related Sea-level Variations Over the Past Two Millenia. Proceedings of the National Academy of Sciences 108:11017-11022: Reconstructed sea levels off North Carolina, USA from 100 BC to AD 2000 using sediment cores.  They also showed that sea levels changed with global temperature for at least the past millennium.

Kinnard, C. C. M. Zdanowicz, D. A. Fisher, E. Isaksson, A. de Vernal, and L. G. Thompson. 2011. Reconstructed Changes in Arctic Sea Ice Over the Past 1,450 Years. Nature 479:509-512: Used multiple proxies to reconstruct late summer Arctic sea ice between AD 561 and AD 1995, using instrumental data to extend their record to AD 2000.

Martín-Chivelet, J., M. B. Muñoz-García, R. L. Edwards, M. J. Turrero, and A. L. Ortega. 2011. Land Surface Temperature Changes in Northern Iberia Since 4000 yr BP, Based on δ13C of Speleothems. Global and Planetary Change 77:1-12: Reconstructed temperatures in the Iberian Peninsula from 2000 BC to AD 2000 using stalagmites.

Spielhagen, R. F., K. Werner, S. A. Sørensen, K. Zamelczyk, E. Kandiano, G. Budeus, K. Husum, T. M. Marchitto, and M. Hald. 2011. Enhanced Modern Heat Transfer to the Arctic by Warm Atlantic Water. Science 331:450-453 : Reconstructed marine temperatures in the Fram Strait from 100 BC to AD 2000 using sediment cores.

Esper et al. 2012: Used tree ring proxies to reconstruct Northern Scandinavian temperatures 100 BC to AD 2000.  May have solved the post-AD 1960 tree ring divergence problem.

Ljungqvist et al. 2012: Used a network of 120 tree ring proxies, ice core proxies, pollen records, sediment cores, and historical documents to reconstruct Northern Hemisphere temperatures between AD 800 and AD 2000, with emphasis on proxies recording the Medieval Warm Period.

Melvin, T. M., H. Grudd, and K. R. Briffa. 2012. Potential Bias in 'Updating' Tree-ring Chronologies Using Regional Curve Standardisation: Re-processing 1500 Years of Torneträsk Density and Ring-width Data. The Holocene 23:364-373: Reanalyzed tree ring data for the Torneträsk region of northern Sweden.

Abram, N. J., R. Mulvaney, E. W. Wolff, J. Triest, S. Kipfstuhl, L. D. Trusel, F. Vimeux, L. Fleet, and C. Arrowsmith. 2013. Acceleration of Snow Melt in an Antarctic Peninsula Ice Core During the Twentieth Century. Nature Geoscience 6:404-411: Reconstructed snow melt records and temperatures in the Antarctic Peninsula since AD 1000 using ice core records.

Marcott, S. A., J. D. Shakun, P. U. Clark, and A. C. Mix. 2013. A Reconstruction of Regional and Global Temperature for the Past 11,300 Years. Science 339:1198-1201: Reconstructed global temperatures over the past 11,000 years using sediment cores.  Data ended at AD 1940.

PAGES 2k Consortium. 2013. Continental-scale Temperature Variability During the Past Two Millennia. Nature Geoscience 6:339-346: Used multiple proxies (tree rings, sediment cores, ice cores, stalagmites, pollen, etc) to reconstruct regional and global temperatures since AD 1.

Rohde, R., R. A. Muller, R. Jacobsen, E. Muller, S. Perimutter, A. Rosenfeld, J. Wurtele, D. Groom, and C. Wickham. 2013. A New Estimate of the Average Earth Surface Land Temperature Spanning 1753 to 2011. Geoinformatics and Geostatistics: An Overview 1:1-7: Used proxy and instrumental records to reconstruct global temperatures from AD 1753 to AD 2011.

Wilson, R.,  K. Anchukaitis, K. R. Briffa, U. Büntgen, E. Cook, R. D'Arrigo, N. Davi, J. Esper, D. Frank, B. Gunnarson, G. Hegerl, S. Helama, S. Klesse, P. J. Krusic, H. W. Linderholm, V. Myglan, T. J. Osborn, M. Rydval, L. Schneider, A. Schurer, G. Wiles, P. Zhang, and E. Zorita. 2016. Last Millennium Northern Hemisphere Summer Temperatures from Tree rings: Part I: The Long Term Context. Quarternary Science Reviews 134:1-18. Introduces and details the new N-TREND2015 temperature reconstruction using 54 proxy records.

The proper response to someone who asserts that the Hockey Stick has been falsified is to ask "Which one?"  As for what most of the temperature reconstructions show, the data from Marcott et al. (2013) combined with 30-year smoothed HadCRUT4 data is fairly representative:


Update:  I've posted two lengthy responses rebutting "Anonymous" in the comments.  Quite frankly, none of "his" numerous claims stand up to scrutiny.  Part 1, Part 2.

Sunday, October 20, 2013

How to spot outliers in regression analysis

Much of the debate over the possible pause in surface temperatures since 1998 really hinges on 1998 being an outlier.  And not only an outlier but an influential data point, which means that its very presence changes the overall regression trend.  In this post, I'll show how to identify outliers, high-leverage data points, and influential data points.

First, some basic definitions.  An outlier is any data point that falls outside the normal range for that data set, usually set as being 2 standard deviations from the average.  In regression analyses, an outlier is any data point where its residual falls outside the normal range.  High leverage data points are made at extreme values for the independent variables such that there are few other data points around, regardless of whether or not those data points change the overall trend.  An influential data point is an extreme outlier with high leverage that alters the overall trend.

Now for the analysis, starting with the basics.  First, create the regression model, using the subset argument to limit the time period.

Model=lm(UAH~Time, data=Climate, subset=Time>=1998)
summary(Model)
Call:
lm(formula = UAH ~ Time, data = Climate, subset = Year.1 >=
    1998)

Residuals:
     Min       1Q   Median       3Q      Max
-0.47575 -0.11244  0.01165  0.09604  0.53415

Coefficients:
                      Estimate      Std. Error    t value    Pr(>|t|)
(Intercept)   -11.176493    5.631428    -1.985     0.0487 *
Time            0.005656     0.002808     2.015     0.0454 *
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.1741 on 186 degrees of freedom
Multiple R-squared: 0.02135,    Adjusted R-squared: 0.01609
F-statistic: 4.059 on 1 and 186 DF,  p-value: 0.04539
par(mfrow=c(2,2)  #Create a 2 x 2 plot matrix
plot(Model)  #Default diagnostic plots 



The default diagnostic plots reveal a good fit except for several months during 1998, which is especially obvious in the Residual vs Fitted plot.  Digging deeper requires more tools than the default offers, which the car package (Companion to Applied Regression) offers.
install.packages(car)
library(car)
influencePlot(Model, id.method="identify", main="Influence Plot", sub="Circle size is proportional to Cook's Distance")


Standardized residuals above 2 and below -2 are outliers.  Points with Hat-Values above 0.025 and standardized residuals between -2 and 2 are high leverage points.  Data points with Hat-Values above 0.025 and standardized residuals above 2 and below -2 are influential points that significantly alter the overall trend.  According to this analysis, there are multiple outliers, with two influential points and one boarderline.  In R, the code I gave will allow you to directly identify the points by clicking on them.  The two influential points are numbers 2989 and 2990 which can then be pulled out of the main data frame.
Climate[2989,]
          Year  Month Time  GISS  UAH   HadCRUT4   NCDC   HadSST3    RSS    PDO    AMO
2989  1998     1       1998     0.6     0.47       0.488          0.5967     0.419       0.55     0.83      0.15
            MEI    Sunspots      TSI         AOD    Arctic.Ice    Antarctic.Ice    CO2
          2.483       31.9        1365.913  0.004      14.67             4.46            365.18
Climate[2990,]
          Year    Month    Time     GISS   UAH   HadCRUT4   NCDC   HadSST3   RSS    PDO   AMO
2990   1998     2        1998.08   0.86     0.65         0.754        0.8501       0.478      0.736  1.56    0.311
           MEI     Sunspots      TSI         AOD     Arctic.Ice   Antarctic.Ice    CO2
          2.777       40.3        1365.808   0.0037       15.7          2.99             365.98
The boarderline point is 2992.
Climate[2992,]
          Year   Month    Time      GISS   UAH   HadCRUT4   NCDC   HadSST3    RSS    PDO   AMO  
2992  1998     4         1998.25   0.62     0.66       0.621          0.7371      0.489       0.857    1.27    0.315
            MEI    Sunspots      TSI          AOD      Arctic.Ice    Antarctic.Ice     CO2
           2.673     53.4        1365.928   0.0031         14.84             6.85           368.61
Now that those points are identified, we can determine how much they influence the trend by rerunning the analysis while excluding those points.
Climate.ex = Climate[c(-2989, -2990, -2992),]
Model.2 = lm(UAH~Time, data=Climate.ex, subset=Time>=1998)
summary(Model.2)
Call:
lm(formula = UAH ~ Time, data = Climate.ex, subset = Time >= 1998)

Residuals:
     Min       1Q   Median       3Q      Max
-0.45049 -0.11412  0.01253  0.08884  0.46394

Coefficients:
                    Estimate        Std. Error    t value    Pr(>|t|)  
(Intercept)   -17.174211   5.429297     -3.163     0.00183 **
Time              0.008642    0.002707      3.193     0.00166 **
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.1639 on 183 degrees of freedom
Multiple R-squared: 0.05277,    Adjusted R-squared: 0.0476
F-statistic:  10.2 on 1 and 183 DF,  p-value: 0.001658

Excluding just those three points raised the estimated trend from 0.005656ºC per year to 0.008642ºC, showing that those three outliers artificially tilted the trend toward showing less warming and demonstrating the main problem with either starting or ending regression trends with extreme outliers.

A sharp observer may ask why I did not use a generalized least squares (gls) analysis from the nlme package to factor out autocorrelation for my examples.  The reason is simply that the tools in the car package are not built to handle gls analyses.  Additionally, autocorrelation does not really matter for identifying outliers, high-leverage points, and influential points.

Friday, October 18, 2013

A primer on the greenhouse effect

Looking back at my first posts, I realized that I had neglected to explain the greenhouse effect.  This post is intended to rectify that omission.

First a basic principle: All energy that enters or leaves the Earth's atmosphere must be in the form of radiation.  And yes, that includes heat.  There's no atmosphere in space so heat cannot be lost from the planet via conduction and convection.  The general process is as follows.

1) Energy from the sun (including ultraviolet and visible radiation) enters the atmosphere.

2) About 30% of the sun's radiation is reflected back into space by aerosols in the air (produced by volcanoes and coal-fired power plants) or via snow, ice, and other light-colored surfaces.  Of the 70% that reaches the ground, most is visible light as most ultraviolet is absorbed by the ozone layer.

3) When visible light reaches the ground, the energy is absorbed by the surfaces on the ground.  That absorbed energy is reradiated as infrared radiation (also known as heat).  This is how your car heats up on a sunny day, especially in the summer, as the dashboard, steering wheel, and seats all absorb visible light and reradiates that energy as heat.

4) The rate at which the absorbed energy is reradiated is determined by concentration gradients.  The greater the gradient, the faster heat is lost, as we all have experienced.  You lose far more heat when you go outside without a jacket at 10ºC (50ºF) than you do at 25ºC (77ºF) because the gradient between your skin temperature and the air is far greater at an air temperature of 10ºC than at 25ºC.

5) Infrared is absorbed by tri-atomic molecules (H2O, CO2, NO2, O3) or higher (CH4) in the atmosphere, which then reradiate that energy in all directions, including back toward the Earth's surface.  Diatomic molecules (N2, O2) are invisible to infrared radiation and so do not have any role in the greenhouse effect.

6) The infrared that is reradiated back to the surface warms the Earth by decreasing the concentration gradient between the surface of the Earth (including the surface of the oceans) and the air just above the surface.  This slows the rate at which heat is lost from the surface, causing the surface to retain more of the heat and raising the temperature.

7) Eventually, the infrared makes it back out of the atmosphere into space.

While the term "greenhouse effect" is better known, I personally think a better analogy is "blanket effect" as in reality the greenhouse effect keeps the Earth warm in a similar way to the way a blanket keeps a person warm.  A blanket does not produce any heat on its own but merely absorbs a person's radiated heat and then reradiates that heat in all directions, including back toward the skin.  That decreases the temperature gradient between the skin and the surrounding air, causing less heat to escape from the skin and more of that heat to be retained inside the body.

For the Earth to maintain thermodynamic equilibrium, the amount of infrared lost must equal the amount of solar energy that reaches the surface.  If there is an imbalance, the Earth will either warm if the imbalance is positive or cool if the imbalance is negative.

Detailed diagram of the greenhouse effect from Trenberth et al. 2009

Tuesday, October 8, 2013

On the failure of US scientific education.

Listening to the public discourse in the US, one cannot help but think that basic science education in this country has failed.  Oh, sure, we have good science teachers (and bad), and textbooks filled with knowledge, but as a nation we have utterly failed to grasp the most fundamental lessons of science.  And I think that reflects poorly on scientists and science educators (myself included).

The first lesson we have failed to impart is that people must know scientific facts.  "Fact" in science means data as revealed through experiments and observations.  In essence, we have failed to teach the data.  It's much easier and faster to present the theories as in the textbook with a few supporting facts, especially given the limited time to cover any one topic in most general education science courses.  And for most topics (i.e. sliding filament theory of muscle contraction, optimal foraging theory, germ theory, general theory of relativity, etc), that is sufficient.  However, for evolution and climate change, that approach is insufficient.

The reason is simple.  There is a lot of misinformation about the basic facts about both climate change and evolution.  People honestly believe that CO2 is not a greenhouse gas, that adding more CO2 won't affect climate, that volcanoes produce more CO2 than human technology, that humans coexisted with dinosaurs, that all geologic strata were laid down in one calendar year, that evolution cannot happen, and that the radiometric decay is variable.  Combating that sort of misinformation requires starting at the basic facts, even if it means reviewing in detail facts discovered centuries earlier, i.e. superimposition (1669), faunal succession (1799),  the greenhouse effect (1820s), index fossils (1830s), the laws of thermodynamics (1824-1912), CO2 is a greenhouse gas (1861), the Stefan-Boltzmann law (1870s), etc.

The second lesson that, in my opinion, we've failed to impart is that nothing happens by magic.  There is always a physical cause.  I'm most familiar with magical thinking about the current global warming.  One common example is a claim that global warming is due to natural cycles.  What makes that claim "magical" thinking?  First, citing "natural cycles" without specifying exactly which natural cycle is the cause simply means that you don't really have any cause.  Second, there's no evidence that natural cycles are sufficient to cause the current global warming and multiple published papers that show that natural cycles aren't sufficient (i.e. Meehl et al. 2004).  You cannot just wish that evidence away.

Another example of magical thinking in the global warming "debate" is the claim that global warming is due to water vapor.  Why is this "magical" thinking?  Well, there's the fact that water vapor is controlled by air temperature and therefore cannot control air temperature by itself (remember the Clausius-Clapeyron relation?).  Then there's the fact that if water vapor is causing global warming, you must explain why water vapor suddenly started acting to warm the planet since AD 1900, after a 5,000 year period of a cooling trend.  Just citing water vapor and not stating what caused water vapor to suddenly warm the planet is pure magical thinking as everything must have a physical cause.

As for the evolution "debate", magical thinking abounds, from claims that a 1-year, worldwide flood could magically change the rate of radiometric decay to the claim that the geologic column is due to a single flood to claims that information theory disproves evolution.  The Talk Origins website has an extensive catalog debunking various creationist claims.   The claim about radiometric decay is particularly ludicrous in light of the amount of heat produced.  The average rate of heat from radiometric decay that reaches the Earth's surface today is 47 trillion Joules/second (Davies and Davies 2010).  Accelerating that by 1 billion would mean an average of 47 septillion Joules/second of heat—more than enough heat to vaporize the oceans and melt the planet.  As for the geologic column–flood claim, there are several rock layers scattered throughout the geologic column which are laid down slowly and only in quiet water (i.e. shales) and therefore could not have been formed by a flood.  The information theory claim has been debunked multiple times (i.e. here, here, and here), mainly because neither Shannon information theory or Kolmogorov-Chaitin theory truly apply to living organisms.

Last and most glaringly, we've failed to teach critical thinking.  Critical thinking is the ability to ask "Does this {new discovery, data, opinion, etc} make sense in light of what we already know about this subject?"  What we mostly teach in science class is simply rote memorization—we teach theories and facts but don't teach students how to tie those facts and theories together.  Are there exceptions to this generalization?  Certainly.  But those are unfortunately the exception rather than the rule.  And it's the lack of critical thought that magnifies deficiencies in teaching the basic facts and the magical thinking.

As for how to correct these issues,  I suggest a two-pronged approach.  First, rather than rote memorization, I have started presenting facts, then asking students to evaluate those facts based on their prior knowledge, and then to draw conclusions based on the total body of knowledge.  When covering evolution (haven't reached that section yet), I will be spending more time laying out step-by-step the discoveries that lead to our current understanding of the geologic column before diving into natural selection and the Hardy-Weinberg Theorem.  For global warming at the end of the ecology section, I've already started rewriting my lecture to include more of the basic facts and concepts (i.e. the laws of thermodynamics), and history of the discovery of the greenhouse effect and the gases that comprise it.  Yes, this approach takes more time and effort, but I believe I'll have better informed students at the end.  Ideally, this process would begin in elementary school rather than the first year of college but better late than never.

Second, we simply need more scientists to get involved explaining the basics to the general public, countering the misinformation coming from climate science denier and creationist camps.  I know that most scientists are more comfortable hiding in laboratories and behind computer screens but it's really the only way we're going to change the course of public debate in the US.