library(fields) wcdivlocs = matrix(scan("http://civil.colorado.edu/~balajir/CVEN6833/R-sessions/session2/files-4HW2/WesternUS-coords.txt"),ncol=5,byrow=T) lats = wcdivlocs[,3] lons = wcdivlocs[,4] ###### #### 2 (ii) PCA of SST correlated with climate div pcp ## for sample I correlated PC2 of SST (which is the ENSO) with precip and plot below.. ### the ENSO teleconnection pattern is apparent - out of phase correlations ## between south western US and N. W. US expert SOURCES .NOAA .NCDC .CIRS .ClimateDivision .pcp T (Nov 1900) (Dec 2012) RANGE T 12 splitstreamgrid T (Nov) (Dec) (Jan) (Feb) (Mar) VALUES [T]average IDIV 201 202 203 204 205 206 207 401 402 403 404 405 406 407 502 504 505 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 2401 2402 2403 2404 2405 2406 2407 2601 2602 2603 2604 2901 2902 2904 2905 2906 2907 2908 3501 3502 3503 3504 3505 3506 3507 3508 3509 4201 4202 4203 4204 4205 4206 4207 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 VALUES T2 /T renameGRID SOURCES .KAPLAN .EXTENDED .v2 .ssta T (Nov 1900) (Mar 2012) RANGE T 12 splitstreamgrid T (Nov) (Dec) (Jan) (Feb) (Mar) VALUES [T]average T2 /T renameGRID [T]standardize [X Y][T]svd ev 2 RANGE .Ts [T]correlate ######### plot the correlations in R.. pc2tpcpcorr=scan("http://iridl.ldeo.columbia.edu/expert/SOURCES/.NOAA/.NCDC/.CIRS/.ClimateDivision/.pcp/T/%28Nov%201900%29%28Dec%202012%29RANGE/T/12/splitstreamgrid/T/%28Nov%29%28Dec%29%28Jan%29%28Feb%29%28Mar%29VALUES%5BT%5Daverage/IDIV/201/202/203/204/205/206/207/401/402/403/404/405/406/407/502/504/505/1001/1002/1003/1004/1005/1006/1007/1008/1009/1010/2401/2402/2403/2404/2405/2406/2407/2601/2602/2603/2604/2901/2902/2904/2905/2906/2907/2908/3501/3502/3503/3504/3505/3506/3507/3508/3509/4201/4202/4203/4204/4205/4206/4207/4501/4502/4503/4504/4505/4506/4507/4508/4509/4510/4801/4802/4803/4804/4805/4806/4807/4808/4809/4810/VALUES/T2//T/renameGRID/SOURCES/.KAPLAN/.EXTENDED/.v2/.ssta/T/%28Nov%201900%29%28Mar%202012%29RANGE/T/12/splitstreamgrid/T/%28Nov%29%28Dec%29%28Jan%29%28Feb%29%28Mar%29VALUES%5BT%5Daverage/T2//T/renameGRID%5BT%5Dstandardize%5BX/Y%5D%5BT%5Dsvd/ev/2/RANGE/.Ts%5BT%5Dcorrelate/data.ch") quilt.plot(-lons, lats, pc2tpcpcorr,xlim=range(-125,-100)) US(add=TRUE, col="grey", lwd=2,xlim=range(-125,-100))