Documentation of lagged_filt_ct_regressions


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


Help text

  ctlim = [110 300 -75 65];

Cross-Reference Information

This script calls

Listing of script lagged_filt_ct_regressions


clear
filin = 'temp_A_L1-10.nc'
tim = 101:550;
cd /home/disk/hayes2/dvimont/csiro/data
nc = netcdf(filin, 'nowrite');
  lat = nc{'latitude'}(:);
  lon = nc{'longitude'}(:);
  ctlim = [-.1 360 -90 90];
  [xk, yk] = keep_var(ctlim, lon, lat);

  temp1 = nc{'temp'}(tim,1,yk,xk);
  mv = nc{'temp'}.missing_value(:);
nc = close(nc);

cd /home/disk/tao/dvimont/matlab/CSIRO
temp1 = squeeze(temp1);
temp1(find(temp1 == mv)) = NaN * ones(size(find(temp1 == mv)));
[ntim, nlat, nlon] = size(temp1);

[temp1, clim] = remove_mean(temp1);
kp = find(~isnan(clim));
temp1 = temp1(:, kp);
temp1 = detrend(temp1);
get_global; default_global;

cd /home/disk/tao/dvimont/matlab/CSIRO/Data
load butter_4.5_ctstar.mat    

yr = [5 10 15 20 30 50];
lag = [1 2 3 5 5 10 10];
for i = 1:7;
figure(fnum); figure_landscape(1); clf;

  ct = ctstar(tim);
  if i == 1;
    [b, a] = butter(6, 2/yr(i));
    ct = ct - filtfilt(b, a, ct);
    tem = temp1 - filtfilt(b, a, temp1);
    tit = [num2str(yr(i)) ' yr HP'];
  elseif i > 1 & i < 7;
    [b1, a1] = butter(6, 2/yr(i-1));
    [b, a] = butter(6, 2/yr(i));
    ct = filtfilt(b1, a1, ct) - filtfilt(b, a, ct);
    tem = filtfilt(b1, a1, temp1) - filtfilt(b, a, temp1);
    tit = [num2str(yr(i-1)) ' - ' num2str(yr(i)) ' yr BP'];
  elseif i == 7;
    [b1, a1] = butter(6, 2/yr(i-1));
    ct = filtfilt(b, a, ct);
    tem = filtfilt(b, a, temp1);
    tit = [num2str(yr(i-1)) ' yr LP'];
  end
  stdct = std(ct);
  ct = (ct - mean(ct)) ./ std(ct);

  tempat = NaN * ones(1, nlat*nlon); 
  tempat(kp) = ct((lag(i)+1):ntim)' * tem(1:(ntim-lag(i)),:) ./ (ntim-lag(i));
  tempat = reshape(tempat, nlat, nlon);

  gcont(tempat, [-5:.025:5]);
  dc
  title([tit ':  Temp regressed on CT']);
  xlabel(['Contour Interval:  0.025 K std^-^1;  STD(CT) = '...
           num2str(round(100*stdct)/100) ' K']);

end