Results_Brian_olr_precip

=Results and IDL code for them all vs. all:=

[|HW4_cospectra.pro]

All against all: just make a loop. Here are some examples, actually all the files are uploaded so any page member can link your favorite one here (edit this page).

[|cospec.olr.slp.ps] [|cospec.olr.uwnd.ps] [|cospec.slp.olr.ps] [|cospec.slp.precip.ps] [|cospec.slp.slp.ps] [|cospec.slp.uwnd.ps] [|cospec.sst.precip.ps] [|cospec.uwnd.slp.ps] ==

To interpret phase, let's just time-shift SST and do the cospectum vs. itself so see what is lead and what is lag

==

Key lines of cospectrum code:
powX = abs(xhat)^2 powY = abs(yhat)^2 xyspec = conj(xhat)*yhat

P = float(xyspec) Q = imaginary(xyspec)

P4 = rebin(P, 120/4) Q4 = rebin(Q, 120/4) powx4 = rebin(powx, 120/4) powy4 = rebin(powY, 120/4) freq4 = rebin(freq, 120/4)
 * Rebin P and Q and power by a factor of 4 (spectral bands) before computing coherence

coh4 = (P4^2 + Q4^2) /powX4 / powY4 phase4 = atan(Q4/P4) *180./!pi ;;; degrees