Results_sst_precip_Johnna

=**Click Here for Grade Argument Example**=

**SST and Precip**

 * Field1 means and variances: space, time, spacetime – SST is my Field1, Precip is Field2**
 * 1) The GRAND (space+time) mean of my x and y: 27.5744 deg C, 4.7379 mm/d
 * 2) The GRAND (space+time) variance of my x and y: 2.9326, deg C^2 12.6278 (mm/d)^2
 * 3) The GRAND standard deviations are: 1.7125 deg C, 3.5536 mm/d
 * 4) The SPATIAL variance of my TIME MEAN longitude section is: 1.8427 deg C^2, 5.7562 (mm/d)^2
 * 5) The TEMPORAL variance of my LONGITUDE MEAN time series is: 0.3616 deg C^2, 0.9405 (mm/d)^2

**Further decomposition of spacetime variations: Mean seasonal cycle and 'climate anomaly'**

 * 1) Confirm that the time mean of the anomalies as defined above is 0. Yes, climxbar=0
 * 2) Is the spatial mean of the anomalies (as defined above) 0? No
 * 3) Is it the same as the time series of the spatial mean of the raw data? Or is it a new thing? See graphs of the Longitudinal Mean of SST Anomaly vs. the Longitudinal Mean of SST raw data below:



Can see a similar shape as far as peaks/dips in data between the two but they are not the same.


 * **My CLIMATOLOGICAL ANNUAL CYCLE have variance:**
 * var( climx12,1) 2.4852 (SST)
 * var( climy12,1) 7.9339 (precip)
 * **My INTERANNUAL ANOMALY ARRAYS have variance:**
 * var( anomx,1) 0.4473
 * var( anomy,1) 4.6939

**Fill out a variance decomposition table for field 1: feel free to add columns if you can define other parts.**

 * = **Variance in Deg C^2 or (mm/day)^2** ||= ** SST ** ||= **Precip** ||
 * a) total variance of x || 2.9326 var( x,1) || 12.6278 ||
 * b) purely spatial (variance of TIME mean at each lon) || 1.8427 var( mean(x,2) ,1) || 5.7562 ||
 * c) temporal anomalies (x minus its TIME mean at each lon) || 1.0898 var( x,1)-var(mean(x,2),1) || 6.8716 ||
 * d) purely temporal (variance of LON mean at each time) || 0.3616 var( mean(x,1) ,1) || 0.9405 ||
 * e) spatial anomalies (x minus its LON mean at each time) || 2.5710 var( x,1)-var(mean(x,1),1) || 11.6873 ||
 * f) remove both means (space-time variability) || 0.7282 var( x,1)-var(mean(x,1),1)-var(mean(x,2),1) || 5.9311 ||
 * g) mean seasonal cycle || 2.4852 var( climx12,1) || 7.9339 ||
 * h) deseasonalized anomalies || 0.4473 var( anomx,1) || 4.6939 ||
 * i) variance of longitudinal mean of part h) || 0.1025 var( mean(anomx,1),1) || 0.2475 ||
 * j) h minus i (anomalies from both space and monthly-climatological means) || 0.3448 0.4473-0.1025=0.3448 || 4.4464 ||

**Discuss your results:**
(a)=(g)+(h) 2.9326=2.4852+0.4473 Yes, it checks out.

**Further decomposition of anomx by scale (using rebinning).**
What space and time scales (units: degrees and months) have the most variance in your anomx field? Matlab prints it (using brians code and displaying variance by scalefactor) variance_by_scalefactor = 0.4473 0.4428 0.4333 0.4167 0.3826 0.1663 0.4221 0.4187 0.4112 0.3976 0.3683 0.1604  0.3860 0.3835 0.3780 0.3672 0.3431 0.1497  0.3265 0.3247 0.3208 0.3130 0.2949 0.1305  0.1874 0.1864 0.1841 0.1796 0.1697 0.0755  0.0504 0.0500 0.0493 0.0475 0.0447 0.0178

Plots of Variance by Scalefactor and Variance Distribution by Scale Reduction Factor: Largest gradients in both cases are in the lower right hand corner of the variance distribution by scalefactor graph, corresponding to a large time scalefactor and small space scalefactor, vice versa for the smaller gradient in SST. In Precip the lower gradient corresponds to a large space and time scalefactor. This can be seen in Milan's plots of SST and Precip, where in SST we see alternating areas of warm and cold SSTs on the right hand side of the graph, and a similar shape in precip of alternating lower and higher precipitation periods. The plots show variance in time rather quickly, but not as quickly in space, which is consistent with the results found in the above plots. This can also be seen with a contour plot of the anomalies of SST, below, with the rectangle roughly marking the variation in space vs. time.

** ﻿ 5. Scatter plot, correlation and covariance, regression-explained variance**
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). Now consider the covariance and correlation of the two subset arrays entering your scatterplot.

Scatter plot at 250 longitude line of anomalies in x (SST) vs. anomalies in y (precip), climatologies, and x vs y data - Longitude line chosen because it slices through some of the higher anomalous areas in the above plot, picked this hoping something interesting would come up. The climatology is expectedly uninteresting, and x vs. y data seems to show some correlation (that last plot).


 * What is the correlation coefficient corresponding to this scatter plot? rho = corrcoef(x,y)
 * 1.0000 0.7946
 * 0.7946 1.0000
 * What are the standard deviations of your two data subsets? std(x)
 * x: 1.7092
 * y: 2.1440
 * 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.
 * correlation^2 * variance of the y subset (thanks Greta!). Variance of y subset is: 4.5778, explained variance: 1.4835, explained fraction: 0.3241%
 * 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.
 * Variance of x subset: 2.9093, explained variance: 0.9428, explained fraction: 0.3241% Same as y.
 * n value is 0.9967 ??? not sure if I did this correctly.
 * Now add uncorrelated (random) noise with variance 1 to one of your variables. This might be like observation error. noisey = y + random('Normal',0,1,size(y))
 * How did the variance of y change when this noise was added? var(y) var(noisey)
 * var(y): 5.9718
 * var(noisey): 5.9718
 * How did the correlation change? rho = corrcoef(x,noisey)
 * 1.0000 0.7121
 * 0.7121 1.0000
 * 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?
 * Variance of noisey subset in y: 5.9469, explained variance: 3.0158, fraction: 0.5071
 * n value is 1.0181 ??? still not sure if I did this right.

Hint: all these could be answered without using the computer, but it may help to confirm with data

**6. Lagged correlation, covariance, and cross-covariance: questions**

 * Show the zero-lag spatial covariance and correlation structures for your primary field, like OLR_anoms_covar_correl.BEM.Matlab.png this for OLR. (please label the axes better than I did!) Interpret the results.
 * Plots axis are lon/lon. High correlation from about 200longitude to about 300longitude, which corresponds to the area where ENSO events are seen.


 * 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
 * Axis are lag in months on x from -24 to 24 months, vs longitude on y (oops). Again we see a strong ENSO signal.
 * Share a longitude-lag slice of your lagged co-variance matrix for your TWO fields. Label it, interpret it.
 * Axis are again lag in months on x from -24 to 24 months, vs longitude on y.