Documentation of corr_ct_mlcurl


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


Help text

tim = 551:1000;
tim = 101:1000;

Cross-Reference Information

This script calls

Listing of script corr_ct_mlcurl


clear
lev = 1; 
tim = 101:550;

vortlims = [165 190 37.5 50];
%vortlims = [150 180 37.5 52.5];
[u, v] = getnc('taux', 'tauy', vortlims, lev, tim);
[latu, lonu] = getll('taux', vortlims);

ctlim = [180 270 -6 6];
[temp] = getnc('temp', ctlim, lev, tim);

wstplim = [190 205 30 37.5];
heat = getnc('temp', wstplim, 1, tim);

[ntim, nlat, nlon] = size(u);

clear vor;
for i = 1:ntim;
  vor(i,:,:) = sph_curl1(u(i,:,:), v(i,:,:), latu, lonu, 0);
end;

vor = squeeze(mean(mean(shiftdim(vor, 1))));
ct = squeeze(mean(mean(shiftdim(temp, 1))));
wstp = squeeze(mean(mean(shiftdim(heat, 1))));

vor = detrend(vor);
ct = detrend(ct);
wstp = detrend(wstp);

%  Lowpass filter

[b, a] = butter(6, 2/10);
vorlp = filtfilt(b, a, vor);
ctlp = filtfilt(b, a, ct);
wstplp = filtfilt(b, a, wstp);

lags = -25:25;
for i = 1:length(lags);
  cv(i) = corr(ctlp, vorlp, lags(i));
  cw(i) = corr(ctlp, wstplp, lags(i));
  cc(i) = corr(ctlp, ctlp, lags(i));
end

figure(3); figure_orient
subplot(3,1,1);
  bar(lags, cc);
  axis([-26 26 -.6 1.1])
     set(gca, 'YTick', -1:.25:1);
  grid on
  title('Lagged Autocorrelation for CT');
  xlabel('Lag')
subplot(3,1,2);
  bar(lags, cv);
  axis([-26 26 -.6 .6])
     set(gca, 'YTick', -1:.25:1);
  grid on
  title('Lagged Correlation between CT and CURL(TAU) [165W to 165E, 37.5N to 50N]');
  xlabel('Lag:  Lag < 0 ==> CT leads; Lag > 0 ==> CURL(TAU) leads');
subplot(3,1,3);
  bar(lags, cw);
  axis([-26 26 -.6 .6])
     set(gca, 'YTick', -1:.25:1);
  grid on
  title('Lagged Correlation between CT and NP [190W to 205E, 30N to 37.5N]');
  xlabel('Lag:  Lag < 0 ==> CT leads; Lag > 0 ==> NP leads');
 

%  Look at western boundary current

lev = 1:3;
wbclims = [105 155 15 35];
[wbc, lat, lon] = getheat(3:5, tim, wbclims, 'v');

[ntim, nlat, nlon] = size(wbc);
for tind = 1:ntim;
  for yind = 1:nlat;
    wbc2(tind,yind) = wbc(tind,yind,min(find(~isnan(wbc(tind,yind,:))))); 
  end
end

wbc = squeeze(mean(shiftdim(wbc2, 1)));
wbc = detrend(wbc);
wbc = filtfilt(b, a, wbc);