results_precip_SLP_Te(d^2)yA(l^2)en

= __**PART ONE:**__ = **What is the fundamental (lowest) frequency possible in this time series?** The lowest possible frequency is defined as the fundamental frequency. This is represented by one cycle per total length of time series. In this case, the lowest possible resolvable frequency for our given time series is one cycle per 20 years ( 2 pie / 240 months). This is also known as wavenumber one, k=1.

The bandwidth is the frequency between adjacent frequency bands and is defined by 2pie/T, where T is the length of the time series record. This is the same thing as one cycle per length of time series for the entire spectrum, which is the definition of the fundamental frequency. So, the bandwidth of the spectrum is the fundamental frequency.
 * What is the //bandwidth// or spectral resolution (Δf) of the spectrum you will create from it?**

The Nyquist frequency is defined as one cycle per twice the time interval of the series ( 1 cycle / (2 DELTAt) ). In this case, the highest resolvable frequency is 1 cycle per 2 months since delta t is one month ( or half cycle per month). This is also known as wavenumber 120, k=120.
 * What is the Nyquist (highest resolvable) frequency in this time series?**

The array should account for the entire bandwidth of the spectral series: 20 years to 2 months. However, since the power spectrum is symmetric, then only half of the spectral series can be plotted. Thus, one can create an array from 0 to 120.
 * Based on the above, make a 1D frequency array f to use as the x axis on your plots in part 2.**

__**//JUST PLAYING AROUND ( What Brian did NOT ask for) ://**__ For me, filtering time series data and looking at power spectrums is one of the coolest aspects of data analysis. So, I took a quick look at filtering a general ENSO (3-7 year) signal from my data at 5E. I expect there to be little if any ENSO signal in the data in this region. I acknowledge that the 3-7 year ENSO filter is generic and very generalized. OK, I admit, I picked this location because of my desire to surf in that region sometime soon, so, might as well get to know the area a little better than just what The Lonely Planet has to say! Gabon has some sweet world class left point breaks...

LOCATION: see red box on the Google Earth image.

The above shows little power between the ENSO related 2.9 - 6.7 wavenumbers. ( Wavenumber is how many complete waves will cycle through the given time series. Wave number 1 has a period of 240 months in this case and wavenumber 120 has a period of 2 months. Thus, a 3-7 year time period has wavenumbers between 2.9 and 6.7. ) We do see two somewhat dominant spectral peaks at the 20 and 40 wavenumber interval. This corresponds to the annual and semi-annual cycle; 20 wavenumbers = 240months/20 = 12 months = annual cycle. //WAIT A SECOND....is that an ENSO signal in SLP? Look at 1982/1983, 1987/1988, and 1997/1998 filtered SLP!// The last row of the above figure shows the time series with the "ENSO" signal removed or filtered out from the original series. I suppose if one wanted to be more accurate, they would first detrend the original dataset prior to filtering. Since power is better represented through bar plots and not a time-series point curve, I have re-plotted the above 2nd row of the figure below. Same info, just a more accurate depiction. The above figure was produced in IDL with this script:. This was written in pre IDL 8.0 code. The above plots were produced in IDL 8.0 using the varibles from the IDL fourier_HW4.pro script above. Notice the difference between the call to plot in IDL 7.2 vs IDL 8.0.
 * NOTE** The above power spectrums are NOT examples of a power spectral density plot. Because I plotted only one half of the symettric power spectrum, I should have multiplied the values by 2 in order to capture the variance (or total power) or the total area under the curves for the entire symmetric power spectrum.

IDL> b1 = ** BARPLOT **(** SHIFT **(k, n/** 2 **-** 1 **), ** SHIFT **(** ABS **(g), n/** 2 **-** 1 **), /YLOG, fill_color= 'red' ,XRANGE = [** 0 **, n/** 2 **],TITLE= 'precip. power spectrum' ,xtitle= 'wavenumber (k)' ,ytitle= 'mm^2 / k' ) IDL> b2 = ** BARPLOT **(** SHIFT **(k, n/** 2 **-** 1 **), ** SHIFT **(** ABS **(g1), n/** 2 **-** 1 **), /YLOG, fill_color= 'blue' ,XRANGE = [** 0 **, n/** 2 **],TITLE= 'SLP power spectrum' ,xtitle= 'wavenumber (k)' ,ytitle= 'hPa^2 / k' )

For comparison sakes, below I have plotted PSD in terms of frequency, period, and wavenumber:

In addition, one can get a sense of the power distribution from a wavelet diagram:

= __**PART 2:**__ = Bandwidth = spectral resolution = delta f = fundamental frequency = 2pi/T = 2pi/240.
 * Plot the spectrum as a power spectral density PSD = Δ(variance)/Δf = Pow//Δf vs. frequency f. Label the axes with the right values and units. Area under the curve should be proportional to total power (total variance).//**

It is evident that the annual and semi-annual cycles in SLP dominate the PSD. The above plots were calculated from building off of the above fourier_HW4.pro script:

;to calculate Power Spectral Density for the precip time seriesXX = ** fft **(ts1nm) ;FFT the time averaged removed time series fftXX = XX[*,** 0 **:** 119 **] ;only consider half since it is symmetric PowX = ** abs **(fftXX)^** 2 ** ;calculate power (this is actually power spectral density since it is power per unit bin) The above plots represent the power spectral density since power is calculated from only half of the symmetric FFT.

**Plot the spectrum as an indefinite integral (cumulative power) vs. period or log period** The above plots represent cumulative power for each time series. Notice the big jumps at both the annual and semi-annual cycles. ...continuing from the IDL thread above cumPowX = ** TOTAL **(PowX,/CUMULATIVE) p1 = ** plot **(cumPowX,symbol= '+' ,color= 'red' ,thick=** 2. **,title = 'CUMULATIVE POWER precip. at 5E', xtitle = 'wavenumber (k)' , ytitle = 'Variance [(mm)^2]' )p1.sym_color = 'blue'
 * Plot the spectrum as f*power vs. log(f). Area under the curve should still be proportional to total power (variance)**


 * Plot the spectrum as f*power vs. log(period).**

The annual and semi-annual power is apparent in both fields above**.** **THE PLOTS ABOVE ARE NOT CORRECT....! Work in progress? Any ideas? Shouldn't power and frequency be inversely related???** You mean period and frequency are inversely related. Yes. Try using the /xlog keyword, instead of using alog(period) or alog(frequency) as the x axis. Then the x axis will be logarithmic, but still be labeled in your normal frequecy or period units.


 * Plot the spectrum as log(Pow) vs. log(f).**
 * Plot the spectrum in your favorite format, after rebinning**
 * Plot the spectrum in your favorite format,** **overplotting** the PSD you get //when you **pad the ends of the time series with zeroes**//.

= __PART 3.__ = = =  The lag-1 autocorrelation value (r1) is +0.4144 (precip) and +0.7667 (SLP). The above plots are the autocorrelation plots for both precip and SLP.

Curious to know what a guess at how to calculate red noise looks like? Well, today is your lucky day. Look above and rejoice. If you believe the plot above, then we can conclude that the dominant spectral peaks at wavenumbers 20 and 40 are not the result of "happenstance".