Global Index (short | long) | Local contents | Local Index (short | long)
Look at lagged regressions
This script calls | |
---|---|
clear cd /home/disk/hayes2/dvimont/csiro/matlab_data load 6yrLP_PAC_NATL_CEOF.mat cd /home/disk/hayes2/dvimont/csiro/data clear temp depth filin = ['temp_A_L1-10.nc']; tim = [101:550]; nc = netcdf(filin, 'nowrite'); ind = 1:10; lind = ind; % 2*(ind-1) + 1; depth = nc{'depth'}(lind); lat = nc{'latitude'}(:); lon = nc{'longitude'}(:); ctlim = [110 300 -30 30]; ctlim = [-0.1 17.5 47.5 80]; ctlim = [300 360 47.5 80]; temp = nc{'temp'}(tim,lind,:,:); mv = nc{'temp'}.missing_value(:); nc = close(nc); temp(find(temp == mv)) = NaN * ones(size(find(temp == mv))); [ntim, nlev, nlat, nlon] = size(temp); weight1 = std(real(pcs)); weight2 = std(imag(pcs)); pcs = real(pcs).*(ones(ntim, 1)*(1./weight1)) + ... j*imag(pcs).*(ones(ntim, 1)*(1./weight2)); temp = reshape(temp, ntim, nlev*nlat*nlon); regmap = pcs.' * temp ./ ntim; regmap = reshape(regmap, 10, nlev, nlat, nlon); get_global; default_global; num = 1; lind = 5; clev = [-.3:.05:.3]; sp(1) tem = squeeze(real(regmap(num,lind,:,:))); contourf(XAX, YAX, tem, clev); dc; colorbar sp(2) tem = squeeze(imag(regmap(num,lind,:,:))); contourf(XAX, YAX, tem, clev); dc; colorbar clear cd /home/disk/tao/dvimont/matlab/CSIRO/Data load butter_4.5_ctstar.mat cd /home/disk/hayes2/dvimont/csiro/data filin = ['temp_A_L1-10.nc']; tim = [101:550]; nc = netcdf(filin, 'nowrite'); ind = 1:10; lind = ind; % 2*(ind-1) + 1; depth = nc{'depth'}(lind); lat = nc{'latitude'}(:); lon = nc{'longitude'}(:); ctlim = [110 300 -30 30]; ctlim = [-0.1 17.5 47.5 80]; ctlim = [300 360 47.5 80]; temp = nc{'temp'}(tim,lind,:,:); mv = nc{'temp'}.missing_value(:); nc = close(nc); temp(find(temp == mv)) = NaN * ones(size(find(temp == mv))); [ntim, nlev, nlat, nlon] = size(temp); temp = reshape(temp, ntim, nlev*nlat*nlon); clim = mean(temp); kp = find(~isnan(clim)); temp = temp(:,kp); yr = 6; [b,a]=butter(6,(2/yr)); temp = filtfilt(b, a, temp); ct = filtfilt(b, a, ctstar(tim)); temp = detrend(temp); yr = 50; [b,a]=butter(6,(2/yr)); temp = temp - filtfilt(b, a, temp); ct = ct - filtfilt(b, a, ctstar(tim)); get_global; default_global; for i = 1:2; fnum = 2*(i-7); l = fnum - 2; if l >= 0; temtime = ct(1:(ntim-l)); tem1 = temtime' * temp((1+l):ntim,:,:) / (ntim-l); xlab = [' leads by ' num2str(abs(l)) ' years']; ptit = ['lead' num2str(l)]; else temtime = ct((1-l):ntim); tem1 = temtime' * temp(1:(ntim+l),:,:) / (ntim+l); xlab = [' lags by ' num2str(abs(l)) ' years']; ptit = ['lag' num2str(abs(l))]; end tem = NaN * ones(1, nlev*nlat*nlon); tem(kp) = tem1; tem = reshape(tem, nlev, nlat, nlon); lind = 5; sp(i); gcont(squeeze(tem(lind,:,:)), [-1:.01:1]); dc; title(ptit) end