Documentation of ML_projections


Global Index (short | long) | Local contents | Local Index (short | long)


Help text

 First, project rlds and lds onto slp and slpc, respectively
   Start by normalizing rlds and lds

Cross-Reference Information

This script calls

Listing of script ML_projections


clear
data
load ML_SLP_eof_npac.mat; 
back
csirod
load RAW_SLP_NP_EOF.mat
load ML_ANN_slp.mat 
back
slpc = getflx('psl', ctlim);
[xk, yk] = keep_var(lims, lon, lat);
slp = slp(:, yk, xk);
slp = detrend(slp);
slpc = detrend(slpc);

wgt = sqrt(diag(rlds'*rlds));
rlds = rlds ./ (ones(size(rlds, 1), 1) * wgt');
wgt = sqrt(diag(lds'*lds));
lds = lds ./ (ones(size(lds, 1), 1) * wgt');

[ntim, nlat, nlon] = size(slp);
slp = reshape(slp, ntim, nlat*nlon);
mpcs1 = slp * rlds;
mppcs1 = slp * lds;

[ntim, nlat, nlon] = size(slpc);
slpc = reshape(slpc, ntim, nlat*nlon);
dpcs1 = slpc * lds;
dppcs1 = slpc * rlds;

%  Now do the same for the pattern from the CT index

ct = getct;
ct = detrend(ct);
csirod; load ML_ANN_sst.mat; back
[xk, yk] = keep_var([180 270 -6 6], lon, lat);
ctm = squeeze(mean2(mean2(shiftdim(sst2(:,yk,xk), 1))));
ctm = detrend(ctm);

%  Get regression patterns associated with ct and ctm

regd = regress_eof(slpc, ct);
regm = regress_eof(slp, ctm);
regd = reshape(regd, nlat, nlon);
regm = reshape(regm, nlat, nlon);

global RADIAN; RADIAN = pi/180;
[xk, yk] = keep_var(lims, lon, lat);
wgt = cos(RADIAN*lat(yk))*ones(1, nlon);
regd = regd.*wgt;
regm = regm.*wgt;

%  Get time series associated with regression patterns

regd = reshape(regd, nlat*nlon, 1);
regm = reshape(regm, nlat*nlon, 1);
wgt = sqrt(regd'*regd); regd = regd./wgt;
wgt = sqrt(regm'*regm); regm = regm./wgt;

mctppcs1 = slp * regm;
dctppcs1 = slpc * regd;



%  Remove pc1 of DYN NP_SLP from CT index, look at what's left

a1 = ct'*pcs(:,1)/900;
ctnopc1 = ct - pcs(:,1)*a1;

%  Look at regressions on ctnopc1

csirod
load ML_ANN_slp.mat; slp2 = slp; load ML_ANN_sst.mat;
back
slp = getflx('psl', [-0.1 360 -90 90], 101:1000);
sst = getnc('temp', [-0.1 360 -90 90], 1, 101:1000);

[reg1, c1] = regress_eof(sst, ctnopc1, 0);
[reg2, c2] = regress_eof(slp, ctnopc1, 0);

[lat, lon, depth, lm] = getll('temp', [-0.1 360 -90 90]);

default_global; FRAME = [0 360 -90 90];
figure(1); fo(1); clf;
sptalk(2,1,1);
  gcont(reg1, 0.05);
  dc2(lm);
sptalk(2,1,2);
  gcont(reg2, 0.1);
  dc2(lm, .55, -100);

[reg1, c1] = regress_eof(sst, ct, 0);
[reg2, c2] = regress_eof(slp, ct, 0);

[lat, lon, depth, lm] = getll('temp', [-0.1 360 -90 90]);

default_global; FRAME = [0 360 -90 90];
figure(2); fo(1); clf;
sptalk(2,1,1);
  gcont(reg1, 0.05);
  dc2(lm);
sptalk(2,1,2);
  gcont(reg2, 0.1);
  dc2(lm, .55, -100);


%  Do the same for lowpass filtered data
%  Remove pc1 of DYN NP_SLP from CT index, look at what's left

csirod; load LP9_SLP_NP_EOF.mat; back;
[b, a] = butter(9, 2/9);
ctlp = filtfilt(b, a, ct); pcslp = pcs;
a1 = ctlp'*pcslp(:,1)/900;
ctnopc1 = ctlp - pcslp(:,1)*a1;

%  Look at regressions on ctnopc1

csirod
load ML_ANN_slp.mat; slp2 = slp; load ML_ANN_sst.mat;
back
slp = getflx('psl', [-0.1 360 -90 90], 101:1000);
sst = getnc('temp', [-0.1 360 -90 90], 1, 101:1000);

[reg1, c1] = regress_eof(sst, ctnopc1, 0);
[reg2, c2] = regress_eof(slp, ctnopc1, 0);

[lat, lon, depth, lm] = getll('temp', [-0.1 360 -90 90]);

default_global; FRAME = [0 360 -90 90];
figure(3); fo(1); clf;
sptalk(2,1,1);
  gcont(reg1, 0.05);
  dc2(lm);
sptalk(2,1,2);
  gcont(reg2, 0.1);
  dc2(lm, .55, -100);

[reg1, c1] = regress_eof(sst, ctlp, 0);
[reg2, c2] = regress_eof(slp, ctlp, 0);

[lat, lon, depth, lm] = getll('temp', [-0.1 360 -90 90]);

default_global; FRAME = [0 360 -90 90];
figure(4); fo(1); clf;
sptalk(2,1,1);
  gcont(reg1, 0.05);
  dc2(lm);
sptalk(2,1,2);
  gcont(reg2, 0.1);
  dc2(lm, .55, -100);