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.
pochas says:
September 11, 2013 at 6:53 am
That fundamental of 170.7 years speaks strongly of the Jose cycle.If Patterson knew about it …
I do not. I did a cursory google search for “170 year climate cycle” but couldn’t find anything relevant, I would appreciate a reference if you have one.
If we’re dealing with harmonics of 170 years, there is a millenial signal that is missing.
@Greg Goodman – Box car decimation is simply dividing the recorded into N equal length segments and taking the average of each segment as the new sample (thus decimating by N). Unlike MA averaging, it introduces no correlation between samples.
I agree with Greg Goodman.
There are some rather astonishing propositions here.
The first seems to be a fundamental misubderstatnding of the relationship between the Fourier Transform and the Discrete (complex exponential) discrete Fourier series i.e. the FFT. In the former case there is an infinite resolution in frequency but requires the signal to be observed from – to + infinity. In the case of the FFT, if the fundamental frequency is determined by the length of the record. One might try to infer the presence of lower frequencies, but this lacks any formal justification.
The anti-aliasing processing does not seem to be correct and is using data that may be aliased.
The processes involved are almost certainly non-stationary.
This approach says that because the earlier record looks like a sine wave, we assume that is what will happen in the future. If you perturb a low-pass system, such as an ARMA system, you will get trends whose magnitudes depend on the persistance of the process. I am very suspicious of the autocorrelation function presented here – I suspect that it is artefactually widened due to prior filtering – an elementary mistake and that persistance is overestimated:
http://judithcurry.com/2012/02/19/autocorrelation-and-trends/
Jeff Patterson says:
September 11, 2013 at 7:01 am
“I do not [know about the Jose cycle]. I did a cursory google search for “170 year climate cycle” but couldn’t find anything relevant, I would appreciate a reference if you have one.”
http://www.ann-geophys.net/18/399/2000/angeo-18-399-2000.pdf
or simply Google (Jose cycle)
I am really curious how well would this method “predict” second half of the record from the first half.
@Jeff Patterson
So the artifacts will not overlap, but they’re still there. The only window filter that I know of that has no artifacts is a Gaussian window. It produces no sidebands.
Then why don’t we always use a Gaussian window instead of Boxcar? Because its spectral resolution is less than a boxcar. So we generally put up with the sidebands to get that extra resolving power.
😐
Suggested improvements :
1. triple RM filter at 24m before 12m decimation would be correct anti-alias.
2. why decimate anyway? data is not cumbersome and any aliasing that in the monthly data will not go away by further filtering.
3. Use land or sea (or both separately) not amalgam dataset.
4. work on rate of change dT/dt (from first difference of data) since what we want to know is temp change anyway. This will remove the slope (and likely much of the odd harmonics) whilst preserving any true 170y or other cycles.
@Greg Goodman – I’ve addressed your 1st concern elsewhere. The others are concerns about aliasing which is of course always a concern. I disagree with your statement regarding box care filtering – the zeros of the filters transfer function lie exactly on the aliasing spectral lines. It is a very effective re-sampling filter. Of course it can’t do anything for the aliases already present in the data, but as you can see from the PSD plots (e.g. Figure 9), the high frequencies are rolled of by some 40dB so any aliasing will be insignificant.
richardscourtney says:
September 11, 2013 at 6:14 am
Friends:
I second the request of Mike Lewis at September 11, 2013 at 5:41 am; viz.
If the same method was applied to data just through 1980, would it accurately predict the warming in the 80′s and 90′s?
I note the strong caveat in the above essay concerning the possible inappropriateness of extrapolation of the obtained curve. However, if it is assumed that the curve fit does capture the form of the temperature changes, then failure of the method to predict the temperature curve after 1980 would imply the temperature changes are internal variability of the climate system and are not externally forced.
Richard
Yes, but step 1 should be to determine how accurately those temperature changes have been recorded. We know that there has been a warm bias, and that needs to be subtracted.
the sun’s motion around the solar system barycenter roughly repeats every 171.4 years as measured by its angular momentum. this is remarkably close to the author’s 170.7 year cycle length in the Hadcrut3 temperature data.
if one sets aside the argument over the mechanism by which climate oscillates with a period of 170 years, and simply accept that there is evidence for such an oscillation in the observed data, then one can go forward and accept that prediction is possible.
humans learned to predict the seasons long before we understood the mechanism. why then should we assume that we cannot predict climate without understanding the mechanism?
history shows that almost always the prediction comes BEFORE the understanding. when the prediction is shown to be correct by observation, this suggest the mechanism. and from there we investigate to discover the mechanism that governs the prediction.
for example, the motion of the planets in the heavens. we learned to predict this with amazing accuracy long before we discovered that gravity was the mechanism. modern science would tell us that such a thing was impossible, you cannot predict without a mechanism.
the facts are that humans invent mechanisms to explain predictions, and more often than not these mechanism are later shown to be false. this in no way affects the accuracy of the prediction. right answer, wrong reason is still a right answer.
@Greg Goodman says work on rate of change dT/dt (from first difference of data) since what we want to know is temp change anyway. This will remove the slope (and likely much of the odd harmonics) whilst preserving any true 170y or other cycles.
First difference processing suppresses low frequencies and greatly extenuates high frequencies (it’s transfer function match a continuous-time differentiator across most of the Nyquist band). It also introduces frequency dependent phase shifts which would adversely effect the reconstruction.
John Day:” Then why don’t we always use a Gaussian window instead of Boxcar? Because its spectral resolution is less than a boxcar. So we generally put up with the sidebands to get that extra resolving power.”
The transition is a little slower on gaussian but not so as it’s going to change “resolving power”.
The main disadvantage is it requires a wider window to make a better filter (whatever one you chose). But that’s cost of not screwing up the data.
No, It’s mostly because people that use running mean (which is commonly called boxcar because of the rectangular weighting) don’t even know what a filter is, how to specify one or what is a good or a bad one.
Everyone understands an average, right? So a running average must be OK. ( Plus it’s nice and easy to calculate and I get frightened that I might not know how to program a gaussian , sound complicated. 🙁 )
You miss the point about Fourier Extrapolation.
Figure 13 is simply a re-run of the 20th century – i.e.: a periodicity. There is no theoretical justification for this approach – it simply says that the future will be a repeat of the past. What you have done here is to apply some extremely artificial constraints on the system by assuming that:
a) You have characterised the system correctly
b) The inputs to the system are stationary.
RC Saumarez says:
The first seems to be a fundamental misubderstatnding of the relationship between the Fourier Transform and the Discrete (complex exponential) discrete Fourier series i.e. the FFT. In the former case there is an infinite resolution in frequency but requires the signal to be observed from – to + infinity. In the case of the FFT, if the fundamental frequency is determined by the length of the record. One might try to infer the presence of lower frequencies, but this lacks any formal justification.
I don’t think I misubderstatnd 🙂 anything. I’m only using Fourier analysis (indirectly via the PSD function) to guess the fundamental. Given the fundamental we assume only the presences of its harmonics and solve for the unknown amplitude and phases to a given order (in this case 5).
I addressed your record-length concern in the paper (see the section on record periodization).
JP “First difference processing suppresses low frequencies and greatly extenuates high frequencies (it’s transfer function match a continuous-time differentiator across most of the Nyquist band). It also introduces frequency dependent phase shifts which would adversely effect the reconstruction.”
It’s true that differential attenuates as 1/f but this does not remove the 170 as I found in my Curry article linked above, from which this comes. (I found 164 years)
http://curryja.files.wordpress.com/2012/03/icoads_monthly_adj0_40-triple1.png
Working on monthly resolution would make the phase shift minimal but you could use a three point diff to retain a symmetrical kernel and avoid the phase shift problem. (-0.5, 0, +0.5)
A 3-sig gaussian of sigma=12m should remove most of the annual and could be combined with the above into a gauss-diff kernel to do it all in one operation with better approximation of the true (non discrete) differential.
RC Saumarez says:
September 11, 2013 at 7:28 am
You miss the point about Fourier Extrapolation.
>>Figure 13 is simply a re-run of the 20th century – i.e.: a periodicity.
Figure 13 contains 500 paths. They can’t all match the single path of the 20th century,
>>There is no theoretical justification for this approach – it simply says that the future will be a repeat of the past.
Which will be partially true in a the mean sense if the periodicity is present. As I took pains to point out though, that’s a big if and any projection depends on the major climatic parameters remaining constant over the projection period. I thought I was pretty clear on that.
What you have done here is to apply some extremely artificial constraints on the system by assuming that:
a) You have characterised the system correctly
b) The inputs to the system are stationary.
I am confused by (b). The projection assumes a periodic input process (and stationary climate process). Periodic signal + noise is decidedly a non-stationary process. Interesting though, the residual of the fit passes the Unit Root Test with a p vaule of ~ 10^-12. And the decimated record is at least weakly stationary (p = 10^-6).
If you perturb a low-pass system, such as an ARMA system, you will get trends whose magnitudes depend on the persistance of the process.
Exactly the point of the second half of the paper where I shown that the probability of achieving similar goodness of fit results to an ensemble of AR process outputs is small (but not insignificant).
Note that I get even better results (i.e. lower probability of fluke) with an ARMA process although I can’t explain why.
JP: “I’m only using Fourier analysis (indirectly via the PSD function) to guess the fundamental. Given the fundamental we assume only the presences of its harmonics and solve for the unknown amplitude and phases to a given order (in this case 5).”
But in fitting your five harmonic model to the time series with no linear component you are just modeling the general slope with a truncated FS based on 170. RC point about repetition still stands. Plot your model out over 1000 years , it will be 170 year saw-tooth , more or less.
Greg Goodman says: It’s true that differential attenuates as 1/f
Actually it’s 1/f^2. Low frequency attentuation is extreme.
“The 113 sample record examined above is not long enough to attribute statistical significance to the fundamental 170.7 year period”
.
And that is where the essay should have stopped. You simply can’t make any meaningful long term projection of periodic behavior based on too little data. Sorry, but this analysis is 100% unconvincing.
Ken Coffman:
Your post at September 11, 2013 at 6:47 am says in total
Eh? What gives you that idea? Please explain?
Richard
@Jeff Patterson
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).
There is a lot going on behind the scenes in this paragraph that I thinks needs more explanation.
“The data is” What data? The time series? [I think] Or the resulting PSD?
“regressed” how?
“about a line connecting the record endpoints”.
Did you draw a line from Point 1 to point 113? Did you do a least squares regression line across the [time-based?] data?
Figure 3, to 4
“Dropping the last point”. Fourier analysis has to assume that the time based data record repeats. You must think of the time series as a chart recorder plot where you wrap the end to the beginning as a cylindrical plot. There will be a splice where Point 113 meets Point 1. Dropping the last point doesn’t remove the splice. I don’t see what good that does.
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
Huh? Why should we conclude the peaks [in the Fig. 4 PSD] are harmonically related? Why use the eighth to estimate the fundamental harmonic? What if we used the 5th, 3rd, of 7th? This is not obvious.
The x-axis of Fig 3, Fig 4, Fig 7, Fig 9a, Fig 9b need some labels and units. They leave too much work for the reader.
From inspection of the PSD we form the harmonic model
I need more.
fit the model to the original (unperiodized) data
I give you credit for putting the 6 line parameter function of this step in the paper, but an illustration would have been nice.
Fig. 10 spaghetti graph.
What was allowed to vary between trials? What stayed the same?
Bearing mind also that much of the 60y cycle was inserted by Hadley ‘corrections’. (Rightly or wrongly).
http://curryja.files.wordpress.com/2012/03/hadsst3-cosine-fit1.png
Mr. Courtney, you don’t see a span that includes a cooling anomaly in the projection? I do. Watch and see, this is a theme you’ll see pop up here more and more: the recognition that that data does not exclude the fact that the overall effect of adding CO2 to the atmosphere could be cooling, not heating.