Results_olr_sst_Yang

Olr and SST

2. Field1 means and variances: space, time, spacetime

 * 1) The GRAND (space+time) **mean** of my x and y: ** 239.97310 W/m^2 and 27.574347 ℃  **
 * 2) The GRAND (space+time) **variance** of my x and y: ** 551.15393286487233 (W/m^2)^2 and  2.9325581808603829 ( ℃)  ^2 .**
 * 3)  The GRAND standard deviations are : ** 23.476667839897388 W/m^2 and 1.7124713664351829 ℃  **
 * 4) The SPATIAL variance of my TIME MEAN longitude section is: ** 333.94925493906339 (W/m^2)^2 and 1.8427171833924376 (℃)  ^2 .   **
 * 5) The TEMPORAL variance of my LONGITUDE MEAN time series is: **23.780019839519809(W/m^2)^2 and 0.36159856763265452 **** ( ℃)  ^2 . **

3. (the assignment part)

 * 1) **Confirm that the 20-year mean of the anomalies as defined above is 0. Write math (on paper, for yourself) that proves it/ shows why.2.Is the spatial mean of the climate anomalies (as defined above) 0?**
 * 2) **Is it the same as the time series of the spatial mean of the raw data? Or is it a new object?**
 * ** X[144,12,20]; X[lon,mon,year] **
 * ** climate anomalies=X-[X]year **
 * ** [climate anomalies]year=[x]year-X]year]year=[X]year-[X]year=0 .*** **[climate anomalies]lon=[X]lon-[[X]year]lon ≠ [X]lon ** * ** This is a new object!! picture shows this: ** [[image:untitled.jpg width="767" height="399"
 * 3.My CLIMATOLOGICAL ANNUAL CYCLE has variance:** <span style="color: #008000; font-family: 'Arial','sans-serif'; font-size: 10pt;">410.56W/m^2
 * 4.My INTERANNUAL ANOMALY ARRAYS has variance:**<span style="color: #008000; font-family: 'Arial','sans-serif'; font-size: 10pt;">140.59W/m^2
 * 5.Fill out a variance decomposition table for field 1: **


 * =  ||= **olr** ||
 * < **a) total variance of x** ||= <span style="color: #008000; font-family: 'Arial','sans-serif'; font-size: 10pt;">**551.154** ||
 * < **b) purely spatial (variance of TIME mean at each lon)** ||= <span style="color: #008000; font-family: 'Arial','sans-serif'; font-size: 10pt;">**333.949** ||
 * < **c) variance of (x minus its TIME mean at each lon)** ||= <span style="color: #008000; font-family: 'Arial','sans-serif'; font-size: 10pt;">**217.205** ||
 * < **d) purely temporal (variance of LON mean at each time)** ||= <span style="color: #008000; font-family: 'Arial','sans-serif'; font-size: 10pt;">**23.780** ||
 * < **e) variance of (x minus its LON mean at each time)** ||= <span style="color: #008000; font-family: 'Arial','sans-serif'; font-size: 10pt;">**527.374** ||
 * < **f) remove both means (space-time variability)** ||=  ||
 * < **g) mean seasonal cycle** ||= **410.563** ||
 * < **h) deseasonalized anomalies** ||= ** 140.591 ** ||
 * < **i) variance of longitudinal mean of h** ||= **6.478** ||
 * < **j) h minus i** ||= **134.113** ||
 * __6. Discuss your results__:**

<span style="display: block; margin: 0cm 0cm 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-outline-level: 2; mso-pagination: widow-orphan; text-align: left;"> **<span style="font-family: 'Arial','sans-serif';">4. Further decomposition of anomx by scale (using rebinning). ** <span style="display: block; margin: 0cm 0cm 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-pagination: widow-orphan; text-align: left;"><span style="display: block; font-family: 'Arial','sans-serif'; line-height: 0px; overflow: hidden; text-align: left;">
 * (a) = (g) + (h)=(b)+(c)=(d)+(e)
 * 1) Based on the variance_by_scalefactor diagram you make, what space and time scales (units: degrees and months) have an especially prominent lot of variance in your anomx field? These are the scales at which averaging over them reduces variance the most. Make a contour plot of anomx, or use Milan's total plots in Getting data -- can you see these "characteristic" scales by eye?
 * Annotate the contour plot with some scale indications of about the right size (ovals in powerpoint may be easiest).

<span style="color: #008000; font-family: 'Arial','sans-serif'; font-size: 10pt;">For OLR the largest variance is in the bottom Left corner. This indicates more small time scale structures. Also, the variance decay fast in time than in longitude rebinning, which means average along longitude is more likely to keep the variance. In this case, at least even average at 8 grids by 8 grids in longitude, you still keep the variance in spatial. <span style="color: #008000; font-family: 'Arial','sans-serif'; font-size: 10pt;">Here is the picture of the original variance and the timely and spatial rebined ones:

==5. Scatter plot, correlation and covariance, regression-explained variance== I calculated all the correlation coefficient by making a loop to see at which longitute happened the most correlated OLR and SST . <span style="display: block; margin: 0cm 0cm 0pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-pagination: widow-orphan; text-align: left;">
 * 1) Based on your data fields (which you've seen pictures of), **make subsets of your 2 variables** x and y and **make a scatter plot of these showing the strongest (positive or negative) correlation of one field with the other you can find**. The subset might simply be all (x,t) values if your fields are very similar (olr, precip), or maybe the 240 time values at one longitude, or 144 longitudinal values in the time mean, or time series at different longitudes if some variability is offset in your two fields (like pressure and wind)
 * 1) Now consider the covariance and correlation of the two subset arrays entering your scatterplot.
 * What is the correlation coefficient corresponding to this scatter plot? <span style="color: #008000; font-family: 'Arial','sans-serif'; font-size: 10pt; margin: 0cm 0cm 0pt;">**rho= -0.806**
 * What are the standard deviations of your two data subsets? <span style="color: #008000; font-family: 'Arial','sans-serif'; font-size: 10pt;">**<span style="font-family: 'Arial','sans-serif';">xstd=10.938(OLR), ystd=1.23 (SST) **
 * What fraction of the variance of y can be 'explained' by linear regression on x (y = mx + b)? How does this relate to rho? How much y variance is explained? (variance: with units of y squared) What is m? //Hint: these are simple questions: use the math formula, not a computer code (Hsieh section 1.4.2, Eq. 1.33). //
 * <span style="display: block; margin: 0cm 0cm 0pt; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-pagination: widow-orphan; tab-stops: list 108.0pt; text-align: left;"> **<span style="font-family: 'Arial','sans-serif'; font-size: 10pt;">In the equation y=mx+b, m= rho*stdev(y)/stdev(x). **
 * <span style="display: block; margin: 0cm 0cm 0pt; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-pagination: widow-orphan; tab-stops: list 108.0pt; text-align: left;"> **<span style="font-family: 'Arial','sans-serif'; font-size: 10pt;">std(e)^2=std(y)^2*(1-rho^2), where (1-rho^2) is the fraction of variance of y not accounted for by the linear regression. Thus the fraction that is explained is simply rho^2. **
 * <span style="display: block; margin: 0cm 0cm 0pt; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-pagination: widow-orphan; tab-stops: list 108.0pt; text-align: left;"> **<span style="font-family: 'Arial','sans-serif'; font-size: 10pt;">Variance explained by regression = 64.97% **
 * <span style="display: block; margin: 0cm 0cm 0pt; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-pagination: widow-orphan; tab-stops: list 108.0pt; text-align: left;"> **<span style="font-family: 'Arial','sans-serif'; font-size: 10pt;">m = -0.0907 **
 * What fraction of the variance of x can be 'explained' by linear regression on variable y? (x = nx + a)? How does this relate to rho? What is n? //Hint: these are simple questions, use the math formula not computer code.//
 * <span style="display: block; margin: 0cm 0cm 0pt; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-pagination: widow-orphan; tab-stops: list 108.0pt; text-align: left;"> **<span style="font-family: 'Arial','sans-serif'; font-size: 10pt;">In the equation x=ny+a, n= rho*stdev(x)/stdev(y). The fraction of variance of x can be explained by this linear regression is rho^2=64.97% **
 * <span style="display: block; margin: 0cm 0cm 0pt; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-pagination: widow-orphan; tab-stops: list 108.0pt; text-align: left;"> **<span style="font-family: 'Arial','sans-serif'; font-size: 10pt;">n = -7.165 **
 * 1) Now add uncorrelated (random) noise with variance 1 to one of your variables. This might be like observation error. <span style="color: #008000; font-family: 'Arial','sans-serif'; font-size: 10pt;">ynoisy=y+**randomn**(seed,**144**,**240**,/normal)
 * How did the variance of y change when this noise was added?<span style="color: #008000; font-family: 'Arial','sans-serif'; font-size: 10pt;">**The original variance of y is 2.933. The variance increases to 3.935 when random noise is added. Noise almost increases it by one.**
 * How did the correlation change? <span style="color: #008000; font-family: 'Arial','sans-serif'; font-size: 10pt;">**The correlation coefficient dropped from -0.806 to -0.642. The correlation gets weaker.**
 * How do these changes affect the regression of y on x? How much (y+noise) variance is explained by linear regression on x? What is the new value of m in the new (noisey = mx + b) regression?Hint: all these could be answered without using the computer, but it may help to confirm with data
 * <span style="display: block; margin: 0cm 0cm 0pt; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-pagination: widow-orphan; tab-stops: list 108.0pt; text-align: left;"> **<span style="font-family: 'Arial','sans-serif'; font-size: 10pt;">The regression coefficient and constant do not change much **
 * <span style="display: block; margin: 0cm 0cm 0pt; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-pagination: widow-orphan; tab-stops: list 108.0pt; text-align: left;"> **<span style="font-family: 'Arial','sans-serif'; font-size: 10pt;">Variance explained by regression is rho^2 = 33.41% **
 * <span style="display: block; margin: 0cm 0cm 0pt; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; mso-pagination: widow-orphan; tab-stops: list 108.0pt; text-align: left;"> **<span style="font-family: 'Arial','sans-serif'; font-size: 10pt;">m_new = -0.0782 **

6. Lagged correlation, covariance, and cross-covariance: questions
 * 1) Show the zero-lag spatial covariance and correlation structures for your primary field


 * 1) Show longitude-lag sections of the covariance or correlation of this field, for a base point at some longitude of interest. Like this for OLR at a central Pacific longitude: [|OLR.lagregression.BEM.jpg] (Please label the axes better than I did in this example! I hate Matlab). Better in IDL: [|olr_lag_covariances.gif]



Here, I did longitude-time lag covariance at 5 specific longitude for OLR. By looking at the zero lage line, we can tell 120W has positive correlation with 180. 60W, 120E they all have negative correlation with 180. By looking at specific longitude, signal at 60E tends to have shorter time structure than at other 4 longitude. Around lon=180, the maximum covariance happened under the negative time-lag (zero to one year) condition. This shows when the olr is one year ahead sst, they are positively correlated, in other words, the olr leads sst.
 * 1) Intepret the results in terms of the characteristic space and time scales of your anomalies. Can you see these characteristic scales in your original raw data？
 * 1) Share a longitude-lag slice of your lagged co-variance matrix for your TWO fields. Label it, interpret it.[[image:sst-olr.jpg width="480" height="384"]]