Documentation of composite


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


Help text

  dc2(lm);

Cross-Reference Information

This script calls This script is called by

Listing of script composite


clear
lims = [100 300 -60 60 ];
tim = 101:1000;
[lat, lon, depth, lm] = getll('temp', lims);
ct = getct(tim);
ct = detrend(ct);
temp = getheat(lims, 4:7, tim);
temp = detrend(temp);
temp2 = getheat(lims, 1:3, tim);
temp2 = detrend(temp2);
[b, a] = butter(9, 2/10);
temp = temp - filtfilt(b, a, temp);
temp2 = temp2 - filtfilt(b, a, temp2);
ct = ct - filtfilt(b, a, ct);
ct = ct./std(ct);
lag = 0;
warm = squeeze(mean(temp(find(ct > 2)+lag,:,:)));
cold = squeeze(mean(temp(find(ct < -2)+lag,:,:)));
subplot(2,1,1);
  gcont(warm, 5e7);
  dc2(lm);
subplot(2,1,2);
  gcont(cold, 5e7);
  dc2(lm);
lags = -5:5;
M = moviein(length(lags)+3);
clev = 1e8*[-7 -5:.25:5 7];
for i = 1:length(lags);
  warm2 = squeeze(mean(temp2(find(ct(1:884) > 2)+lags(i),:,:)));
  cold2 = squeeze(mean(temp2(find(ct(1:884) > 2)+lags(i),:,:)));
  warm = squeeze(mean(temp(find(ct(1:884) > 2)+lags(i),:,:)));
  cold = squeeze(mean(temp(find(ct(1:884) < -2)+lags(i),:,:)));
  tem = [warm; NaN*ones(3, size(warm, 2)); warm2];
  contourf(tem, clev);
  caxis(1e8*[-5 5]);
  M(:,i) = getframe;
end
contourf(lm, [.01 .01])
M(:,i+1) = getframe;
M(:,i+2) = getframe;
M(:,i+3) = getframe;