This DSP engineer is often tasked with extracting spurious signals from noisy data. He submits this interesting result of applying these techniques to the HadCRUT temperature anomaly data. Digital Signal Processing analysis suggests cooling ahead in the immediate future with no significant probability of a positive anomaly exceeding .5°C between 2023 and 2113. See figures 13 and 14. Code and data is made available for replication. – Anthony
Guest essay by Jeffery S. Patterson, DSP Design Architect, Agilent Technologies
Harmonic Decomposition of the Modern Temperature Anomaly Record
Abstract: The observed temperature anomaly since 1900 can be well modeled with a simple harmonic decomposition of the temperature record based on a fundamental period of 170.7 years. The goodness-of-fit of the resulting model significantly exceeds the expected fit to a stochastic AR sequence matching the general characteristic of the modern temperature record.
Data
I’ve used the monthly Hadcrut3 temperature anomaly data available from http://woodfortrees.org/data/hadcrut3vgl/every as plotted in Figure 1.
Figure 1 – Hadcrut3 Temperature Record 1850-Present
To remove seasonal variations while avoiding spectral smearing and aliasing effects, the data was box-car averaged over a 12-month period and decimated by 12 to obtain the average annual temperature plotted in Figure 2.
Figure 2 – Monthly data decimated to yearly average
A Power Spectral Density (PSD) plot of the decimated data reveals harmonically related spectral peaks.
Figure 3 – PSD of annual temperature anomaly in dB
To eliminate the possibility that these are FFT (Fast Fourier Transform) artifacts while avoiding the spectral leakage associated with data windowing, we use a technique is called record periodization. The data is regressed about a line connecting the record endpoints, dropping the last point in the resulting residual. This process eliminates the endpoint discontinuity while preserving the position of the spectral peaks (although it does extenuate the amplitudes at higher frequencies and modifies the phase of the spectral components). The PSD of the residual is plotted in Figure 4.
Figure 4 – PSD of the periodized record
Since the spectral peaking is still present we conclude these are not record-length artifacts. The peaks are harmonically related, with odd harmonics dominating until the eighth. Since spectral resolution increases with frequency, we use the eighth harmonic of the periodized PSD to estimate the fundamental. The following Mathematica (Mma) code finds the 5th peak (8th harmonic) and estimates the fundamental.
wpkY1=Abs[ArgMax[{psdY,w>.25},w]]/8
0.036811
The units are radian frequency across the Nyquist band, mapped to ±p (the plots are zoomed to 0 < w < 1 to show the area of interest). To convert to years, invert wpkY1 and multiply by 2p, which yields a fundamental period of 170.7 years.
From inspection of the PSD we form the harmonic model (note all of the radian frequencies are harmonically related to the fundamental):
(*Define the 5th order harmonic model used in curve fit*)
model=AY1*Sin[wpkY1 t+phiY1]+AY2*Sin[2*wpkY1* t+phiY2]+AY3*
Sin[3*wpkY1* t+phiY3]+AY4*Sin[4*wpkY1* t+phiY4]+AY5*
Sin[5*wpkY1* t+phiY5]];
vars= {AY1,phiY1,AY2,phiY2,AY3,phiY3,AY4,phiY4,AY5,phiY5 }
and fit the model to the original (unperiodized) data to find the unknown amplitudes, AYx, and phases, phiYx.
fitParms1=FindFit[yearly,model,vars,t]
fit1=Table[model/.fitParms1,{t,0,112}];
residualY1= yearly- fit1;{AY1→-0.328464,phiY1→1.44861,AY2→-
0.194251,phiY2→3.03246,AY3→0.132514,phiY3→2.26587,AY4→0.0624932,
phiY4→-3.42662,AY5→-0.0116186,phiY5→-1.36245,AY8→0.0563983,phiY8→
1.97142,wpkY1→0.036811}
The fit is shown in Figure 5 and the residual error in Figure 6.
Figure 5 – Harmonic model fit to annual data
Figure 6 – Residual Error Figure 7 – PSD of the residual error
The residual is nearly white, as evidenced by Figure 7, justifying use of the Hodric-Prescott filter on the decimated data. This filter is designed to separate cyclical, non-stationary components from data. Figure 8 shows an excellent fit with a smoothing factor of 15.
Figure 8 – Model vs. HP Filtered data (smoothing factor=3)
Stochastic Analysis
The objection that this is simple curve fitting can be rightly raised. After all, harmonic decomposition is a highly constrained form of Fourier analysis, which is itself a curve fitting exercise that yields the harmonic coefficients (where the fundamental is the sample rate) which recreate the sequence exactly in the sample domain. That does not mean however, that any periodicity found by Fourier analysis (or by implication, harmonic decomposition) are not present in the record. Nor, as will be shown below, is it true that harmonic decomposition on an arbitrary sequence would be expected to yield the goodness-of-fit achieved here.
The 113 sample record examined above is not long enough to attribute statistical significance to the fundamental 170.7 year period, although others have found significance in the 57-year (here 56.9 year) third harmonic. We can however, estimate the probability that the results are a statistical fluke.
To do so, we use the data record to estimate an AR process.
procY=ARProcess[{a1,a2,a3,a4,a5},v];
procParamsY = FindProcessParameters[yearlyTD["States"],procY]
estProcY= procY /. procParamsY
WeakStationarity[estProcY]
{a1→0.713,a2→0.0647,a3→0.0629,a4→0.181,a5→0.0845,v→0.0124391}
As can be seen in Figure 9 below, the process estimate yields a reasonable match to observed power spectral density and covariance function.
Figure 9 – PSD of estimated AR process (red) vs. data Figure 9b – Correlation function (model in blue)
Figure 10 – 500 trial spaghetti plot Figure 10b – Three paths chosen at random
As shown in 10b, the AR process produces sequences which in general character match the temperature record. Next we perform a fifth-order harmonic decomposition on all 500 paths, taking the variance of the residual as a goodness-of-fit metric. Of the 500 trials, harmonic decomposition failed to converge 74 times, meaning that no periodicity could be found which reduced the variance of the residual (this alone disproves the hypothesis that any arbitrary AR sequences can be decomposed). To these failed trials we assigned the variance of the original sequence. The scattergram of results are plotted in Figure 11 along with a dashed line representing the variance of the model residual found above.
Figure 11 – Variance of residual; fifth order HC (Harmonic Coefficients), residual 5HC on climate record shown in red
We see that the fifth-order fit to the actual climate record produces an unusually good result. Of the 500 trials, 99.4% resulted in residual variance exceeding that achieved on the actual temperature data. Only 1.8% of the trials came within 10% and 5.2% within 20%. We can estimate the probability of achieving this result by chance by examining the cumulative distribution of the results plotted in Figure 12.
Figure 12 – CDF (Cumulative Distribution Function) of trial variances
The CDF estimates the probability of achieving these results by chance at ~8.1%.
Forecast
Even if we accept the premise of statistical significance, without knowledge of the underlying mechanism producing the periodicity, forecasting becomes a suspect endeavor. If for example, the harmonics are being generated by a stable non-linear climatic response to some celestial cycle, we would expect the model to have skill in forecasting future climate trends. On the other hand, if the periodicities are internally generated by the climate itself (e.g. feedback involving transport delays), we would expect both the fundamental frequency and importantly, the phase of the harmonics to evolve with time making accurate forecasts impossible.
Nevertheless, having come thus far, who could resist a peek into the future?
We assume the periodicity is externally forced and the climate response remains constant. We are interested in modeling the remaining variance so we fit a stochastic model to the residual. Empirically, we found that again, a 5th order AR (autoregressive) process matches the residual well.
tDataY=TemporalData[residualY1-Mean[residualY1],Automatic];
yearTD=TemporalData[residualY1,{ DateRange[{1900},{2012},"Year"]}]
procY=ARProcess[{a1,a2,a3,a4,a5},v];
procParamsY = FindProcessParameters[yearTD["States"],procY]
estProcY= procY /. procParamsY
WeakStationarity[estProcY]
A 100-path, 100-year run combining the paths of the AR model with the harmonic model derived above is shown in Figure 13.
Figure 13 – Projected global mean temperature anomaly (centered 1950-1965 mean)
Figure 14 – Survivability at 10 (Purple), 25 (Orange), 50 (Red), 75 (Blue) and 100 (Green) years
The survivability plots predict no significant probability of a positive anomaly exceeding .5°C between 2023 and 2113.
Discussion
With a roughly one-in-twelve chance that the model obtained above is the manifestation of a statistical fluke, these results are not definitive. They do however show that a reasonable hypothesis for the observed record can be established independent of any significant contribution from greenhouse gases or other anthropogenic effects.
Discover more from Watts Up With That?
Subscribe to get the latest posts sent to your email.
Matthew R Marler says:
September 13, 2013 at 9:36 am
“His decision to focus on sine curves is totally unprincipled,”
Was Fourier equally unprincipled when he showed that any arbitrary waveform can be decomposed into sine waves?
“unless there is strong external evidence that the system has to be periodic”
The PSD suggested a harmonic relationship between spectral components. A non-linear system (such as the climate) produces harmonics when driven by a periodic signal. That was the motivating principle.
Matthew R Marler says:
September 13, 2013 at 9:36 am
“pochas: Since a sine wave has two variables, amplitude and phase,
A sine wave has three variables: amplitude, phase and period. The claim that you only need 2 points to estimate a sine wave depends on the assumption that one of those is known.”
Right. You do need 3 points to specify a sine wave.
“””””…..pochas says:
September 13, 2013 at 8:20 am
Since a sine wave has two variables, amplitude and phase, all you need to determine it is two points giving two equations which you solve simultaneously. You can in principle generate a sine wave with a period of one year from two points days apart…….”””””
So my two points are exactly 24 hours apart in time. First point has a value of +1, second point has a value of -1.
So what is the frequency (or period) of this sine wave; what is the peak to peak amplitude of the sine wave, and what is the next point in time when the value will be exactly zero ???
You are the only person I know of, who can answer any one of those three questions.
Jeff Patterson: Was Fourier equally unprincipled when he showed that any arbitrary waveform can be decomposed into sine waves?
No.
That was a couple centuries ago. Since then lots of orthonormal bases have been invented. You have provided not a single reason to believe that sines are better for this problem than Chebysheff polynomials or anything else.
The following is well-expressed: Curve fitting can be used to make predictions given a set of assumptions about the underlying system. The prediction is only as good as those assumptions, which were explicitly stated. The analysis in no way addressed the validity of those assumptions and so the projection should be taken with a grain of salt, unless and until those assumptions (stated simply, that the climate can be modeled as a non-linear response to a period external forcing function). What curve fitting can provide, is a clue as to where to look for validation. In other words, as I have stated elsewhere, any model (curve fit, GCM or WAG) is properly used only in forming a hypothesis, hypothesis which must be validated empirically.
E. M. Smith has tried to relate your results to lunar cycles. Maybe that will work out.
Jeff Patterson: The bandwidth limitation constrains the maximum slope and amplitude, squeezing your infinite solution space down to just one.
A sine curve can only be estimated from 2 data points if there is a strong constraint on at least one of the parameters. Here you constrain maximum slope and amplitude. Nyquist sampling is a necessary condition in a constrained problem, not a sufficient condition generally.
Jeff Patterson says:
September 13, 2013 at 10:24 am
Thanks for the reply, Jeff. I fear I still don’t see it, likely my error. To recap, you say that if we have two points, and we know that they are separated by less than half of the shortest cycle in the data, we can only put one sine wave through them. In your words:
OK, so say we have two points at (0,0), and at (1.3, 0.9), and we know that the shortest period in the data is say 4.2. Here’s a graph of the situation:

As you can see, I’ve drawn two sine waves through the two specified points, and per your specs, they are separated in time by less than half the shortest period in the data.
What am I missing?
OK. So I assume the shortest period in the data is a year? And you are saying that you can figure out a 170-year cycle from two points that are four months apart?
Again, what am I missing here?
w.
Willis:
I write with affection. It is nearly 1 am here and you are blogging while on holiday with your ladies.
I repectfully suggest you have other priorities. Your ladies are more important than writing for us. And they will need to to be awake througout the day.
Richard
Sorry, Not “to to be awake” but ‘you to be awake’
Jeff Patterson says:
September 13, 2013 at 10:44 am
Sure. It starts when you say:
You are generating a large number of random realizations, but not just of any process—of an AR process … but the problem is, we have no guarantee that the climate data is well-represented by an AR process. That is only an assumption.
The assumption is made when you generated the random pseudo-data to use in the Monte Carlo analysis. For example, you could also “use the data record to estimate” an MA process, or an ARMA process, or an ARIMA process, or a white-noise process … that’s the joke, that you think you’ve exhausted the possibilities by generating an AR process.
What you call a “stochastic analysis” is known in climate science as a “Monte Carlo” analysis, where you test your assumptions against random pseudo-data … but for the test to be valid, the pseudo-data must be of the same nature as the real data. And for that, your choice of model for the pseudo-data is of critical importance. You can’t just assume it’s say white noise, and claim you’ve proven your case.
And you haven’t even begun to exhaust the possibilities by just looking at AR data, nor have you justified your choice of AR data as opposed to the many other models that you could use for your Monte Carlo analysis …
All the best,
w.
pochas says:
September 13, 2013 at 8:20 am (Edit)
Huh? A sine wave has THREE variables—frequency, amplitude and phase.
w.
Matthew R Marler says:
September 13, 2013 at 1:05 pm
“A sine curve can only be estimated from 2 data points if there is a strong constraint on at least one of the parameters. Here you constrain maximum slope and amplitude. ”
If we’re getting just two samples per period (the nyquist criteria) we know the frequency is the nyquist frequency (i.e.the sample frequency /2). The amplitude and phase can then be derived from the fourier coefficients (assuming just a sine wave, no d.c. term)
e.g.
DFT[{1,-1}] = {0,Sqrt[2]}
D.C. term =0 so phase = 90degs, Freq = Nyquist, Amplitude is correct
DFT[{1,.9}] = {1.3435, .0707}
D.C. term =1.34, Freq = Nyquist, Amplitude is the sum of the two terms 1.3+.07=Sqrt[2]
phase is 2*pi*(d.c. term)/Sqrt[2]
There is a profound reason for preferring sinusoids as an orthonormal basis in modeling geophysical time series: they constitute the first-order analytic solution to many physical problems, especiaily those involving oscillatory behavior. In fact, they often appear in the solution of a very wide class of differential equations known as Sturm-Liouville problems. Offhand, no example of successful modeling of any physical time series by, say, Chebysheff polynomials comes to mind. The essence of the problem here is the presumption of a DISCRETE set of finite-amplitude sinusoids, which individually have U-shaped ordinate histograms, instead of an CONTINUUM of infinitesimally small-amplitude sinusoids that, upon integration over a frequency-band, produce a gaussian random process.
There are also profound physical reasons for rejecting ideas that the dracionian or Saros lunar cycles produce any harmonic effects upon surface temperatures. In particular, suharmonics require not only a nonlinear system, but one that is resonant with a high Q-factor. The differential eqations of thermodynamics are invariably first-order, which makes any resonance well-nigh impossible. It requires far more than the approximate matching of “periodicities” to make a persuasive physical case for causation.
Jeff Patterson:
The issue at hand is not the mathematical possibility of determining the amplitude and phase at Nyquist frequency from two sample points. It is the identification of the 170-yr “fundamental” as a DISCRETE sinusoid, rather than (a fairly narrow-band) gaussian process whose power density peaks near that period.
BTW, the PSD of the GISP2 proxy data, which I’ve analyzed over the last ~8000 years, does not show any truly harmonic sequence of spectral peaks
1sky1 says:
September 13, 2013 at 5:10 pm
“In particular, suharmonics require not only a nonlinear system, but one that is resonant with a high Q-factor.”
Parmetric non-linearities can produce subharmonics (i.e. an oscillator whose resonance is a function of output voltage). But in any case, couldn’t a sinusoidal driving function produce harmonics (as opposed to sub-harmonics?
“The differential eqations of thermodynamics are invariably first-order, which makes any resonance well-nigh impossible.” This is interesting and surprising to me. I would have thought transport delays in the many feedback loops could easily cause resonances.
This is probably naive (when all you have is hammer…) but has anyone ever explored the possibility that the climate is an unstable system injection-locked to the celestial forcing? Such systems are highly stable in the phase domain (phase-locked in essence), exhibit high sensitivity (i.e. gain) to the forcing function and do produce sub-harmonics (this feature is exploited in mixer based frequency dividers which are among the cleanest know to man). Would the climate physics preclude this?
1sky1 says:
September 13, 2013 at 5:23 pm
Jeff Patterson:
“The issue at hand is not the mathematical possibility of determining the amplitude and phase at Nyquist frequency from two sample points.”
Yes, we got off into the weeds over my attempt to provide an approachable explanation of the Nyquist criteria. The discussion you referenced has nothing to do with the analysis, or the 170 year cycle which is highly oversampled.
Willis Eschenbach says:
September 13, 2013 at 4:44 pm
“What am I missing”
You actually have three sample points (they also cross at zero) and note that they are not equally spaced. If you picked your intersection points s.t. they were equally spaced in time (we’re assuming uniform sampling here) you’d see that the sine waves would have to be harmonically related (no beat) and only one would satisfy the nyquist criteria.
BTW, how did you embed the graph? That’s cool.
Willis Eschenbach says:
September 13, 2013 at 5:04 pm
“For example, you could also “use the data record to estimate” an MA process, or an ARMA process, or an ARIMA process, or a white-noise process”
I actually did use an ARMA process and got even better results (lower probaility of fluke), I posted the more conservative of the two. But I really don’t see your point. An AR process is just an IIR filter driven with noise, a MA process is just an FIR filter, an ARMA is the cascade of the two and ARIMA has a pure integration (which doesn’t match the data at all). In any case, they are all just filters. What other effect could the process have that wouldn’t be reflected in the PSD and covariance of the output? If these closely match the observed data, why wouldn’t they make good test cases?
@Willis
I see you are a Mathematica user. You wouldn’t happen to have an SSA routine coded up by chance? I’m struggling a bit with the grouping part of the algorithm.
JP
Jeff Patterson says:
September 13, 2013 at 5:45 pm
No, I do NOT have three sample points, I only have two points specified—(0,0), and (1.3, 0.9). I have neither sampled nor specified a third point. Yes, they happen to cross again, but that’s not a sampled point.
So my objection still stands. Given two and only two points, which fit your criterion of being closer together than half the shortest period, I have fitted two sine waves to them.
Again … what am I missing?
w.
Jeff Patterson says:
September 13, 2013 at 5:45 pm
I fear I can only do that because I am a official site contributor approved by Anthony. However, if you need to add graphs, post them up on the web somewhere (I use Photobucket), and then put them in as links, and when I see them, I’ll convert them to the underlying graphs.
w.
Jeff Patterson says:
September 13, 2013 at 6:03 pm
A good choice … the important issue, however, is that you got different results with the two.
If the processes were actually equivalent, you would not have gotten different results … therefore we can assume that, contrary to your claim, they are NOT equivalent.
My point is that in a Monte Carlo analysis, you are assuming a model of the data. AR, ARIMA, white noise, whatever, it is an assumed model of what is actually going on. Now this is neither good nor bad … it’s just a fact.
And sadly, the validity of the Monte Carlo analysis depends on whether your data actually IS a realization of the process that you have chosen.
Above, you say that:
This is a necessary but not sufficient condition. In particular, climate data often contains cycles which appear and disappear for no apparent reason. The rate of sea level change, for example, contains clear cycles for the last fifty years … but not for the fifty years before that. Why? No one knows, but there they are.
And unless your Monte Carlo data is similarly structured and has such appearing and disappearing cycles, it will give you erroneous results.
Best regards, and as before, my thanks for your replies and explanations, which have been more gracious than I likely deserve. Keep’m coming …
w.
PS—I suspect that part of the difficulty is that you are used to using Fourier Transforms on a signal of essentially infinite length. But in climate, we’re forced to use the Discrete Fourier Transforms on very short samples of the signal. In those, accuracy drops as the cycle length increases. As I said above, I do not trust any results (from DFT or any other method, I often use Periodicity Analysis) which have periods longer than about a third of the length of the dataset, and I would recommend this limit to others as well.
And I am absolutely skeptical about the possibility of extracting a 170-year signal (or even more improbably a 170.7 year signal) from a 110-year dataset. I think you may be mistaking the Nyquist limit of sampling a long signal at twice the frequency desired to be found, with the current condition of sampling a short dataset twice … but that’s just a guess.
Jeff Patterson says:
September 13, 2013 at 6:11 pm
Sadly, I fear that I struggle with Mathematica. I can do the simpler stuff … but more than that is something I tackle rarely.
I actually use R a lot in preference to Mathematica. R has a package, Rssa, for doing singular spectrum analysis.
R is free, handles matrices and arrays effortlessly, runs on all platforms, and has packages for just about anything. I learned it at the urging of Steve McIntyre six or eight years ago, and it was one of the best moves I’ve made in a while.
w.
Jeff Patterson: If we’re getting just two samples per period (the nyquist criteria) we know the frequency is the nyquist frequency (i.e.the sample frequency /2).
Well, ,,, , that is what I wrote: if you know 1 of the 3 parameters — here the frequency is assumed known — then you can estimate the amplitude and phase.
Some comments suggested I do a Singular Spectrum Analysis (SSA) on the data. I have done so with the results available at http://montpeliermonologs.wordpress.com/2013/09/14/singular-spectrum-analysis-of-hadcrut3/ . I am new to SSA but am very impressed with its capability.
The results seem consistent with those found above. The fundamental frequency came out at 180 years with a strong 3rd at 60 years (note to Willis, I’ve taken your suggestion re significant figures to heart). The hindcast is good for 25 years or so. Interestingly, deviations from the model seem coincident with impulsive events in the climate record (e.g. the spike at 1878, the rapid cooling in the 1940’s, and the ENSO event of 1997). Whether this indicates an issue with the methodology of indicative of climate phase-state changes I cannot say.
Comments and suggestions are welcome as usual.
Specifically, the [IPCC Summary] draft report says that “equilibrium climate sensitivity” (ECS)—eventual warming induced by a doubling of carbon dioxide in the atmosphere, which takes hundreds of years to occur—is…… “
This statement leads to a condundrum from the IPCC.
Any concept that it “takes hundreds of years” requires that the earth has a predictable system response that is not chaotic. If so, then the system response to any impulse is centuries long and predictions can be made from historical impulses already in the system. Fourier Analysis can be done on such a system —- provided you have the data of long enough to deconvolve a system response from known inputs. We don’t, not if the system response is centuries long.
On the other hand, if this were true, then missing the pause is doubly embarrassing. The only explanation is that the pause is the result of a system response that derives from impulses as far back as the LIA. The further means that any action taken by us today to mitigate climate change won’t have much effect for hundreds of years. Try selling that to the world.
Conversely, if the climate is chaotic, largely unpredictable, and Fourier Analysis is a waste of time, then statements like “takes hundreds of years to occur” are blather. The climate can turn on a dime. Or not. No matter what the world does.
Other possibilities present the IPCC with other problems. The system response is decades long, but GHG is not a primary driver, it is something else. Oops. Or the system response is predictable and short … again the pause shows that CO2 sensitivity is tiny to insignificant with other significant factors unrecognized.