Global Index (short | long) | Local contents | Local Index (short | long)
Weight by cosine lat:
This script calls | |
---|---|
clear limslp = [165 225 20 45]; cd /home/disk/hayes2/dvimont/csiro/data nc = netcdf('spsl_qm1_0036-0365.nc', 'nowrite'); [lat, lon, yk, xk] = get_nclatlon2(limslp, nc); slp = nc{'psl', 1}(1:330, 1:12, yk, xk); nc = close(nc); [nyr, nmo, nlat, nlon] = size(slp); slp2 = NaN*ones(nyr*nmo, nlat, nlon); for i = 1:nyr; ind = 12*(i-1)+[1:12]; slp2(ind,:,:) = slp(i,:,:,:); end slp = slp2; clear slp2; [ntim, nlat, nlon] = size(slp); tem = ones(2, nlat, nlon); slp = cosweight(slp, lat); tem = cosweight(tem, lat); tem = squeeze(tem(1,:,:)); slp_tim = sum(sum(slp, 2), 3)./sum(sum(tem)); % Load variables for regression lims = [89 306 -79 79]; cd /home/disk/hayes2/dvimont/csiro/data nc = netcdf('spsl_qm1_0036-0365.nc', 'nowrite'); [lat, lon, yk, xk] = get_nclatlon2(lims, nc); slp = nc{'psl', 1}(1:330, 1:12, yk, xk); nc = close(nc); nc = netcdf('stax_qm1_0036-0365.nc', 'nowrite'); [lat, lon, yk, xk] = get_nclatlon2(lims, nc); tax = nc{'tax', 1}(1:330, 1:12, yk, xk); nc = close(nc); nc = netcdf('stsu_qm1_0036-0365.nc', 'nowrite'); [lat, lon, yk, xk] = get_nclatlon2(lims, nc); tsu = nc{'tsu', 1}(1:330, 1:12, yk, xk); nc = close(nc); [nyr, nmo, nlat, nlon] = size(slp); slp2 = NaN*ones(nyr*nmo, nlat, nlon); tax2 = NaN*ones(nyr*nmo, nlat, nlon); tsu2 = NaN*ones(nyr*nmo, nlat, nlon); for i = 1:nyr; ind = 12*(i-1)+[1:12]; slp2(ind,:,:) = slp(i,:,:,:); tax2(ind,:,:) = tax(i,:,:,:); tsu2(ind,:,:) = tsu(i,:,:,:); end clear slp tax tsu; slp2 = annave(slp2); tax2 = annave(tax2); tsu2 = annave(tsu2); slp2 = detrend(slp2); tax2 = detrend(tax2); tsu2 = detrend(tsu2); % Mess with slp_tim again slp_tim = annave(slp_tim); slp_tim = detrend(slp_tim); % 2-12 mo [b, a] = butter(9, 2/12); tim = slp_tim - filtfilt(b, a, slp_tim); [pat1aa, c1aa] = regress_eof(slp2, tim); [pat2aa, c2aa] = regress_eof(tax2, tim); [pat3aa, c3aa] = regress_eof(tsu2, tim); % 12-24 mo [b2, a2] = butter(9, 2/12); [b, a] = butter(9, 2/24); tim = filtfilt(b2, a2, slp_tim) - filtfilt(b, a, slp_tim); [pat1bb, c1bb] = regress_eof(slp2, tim); [pat2bb, c2bb] = regress_eof(tax2, tim); [pat3bb, c3bb] = regress_eof(tsu2, tim); % 24-Inf mo [b, a] = butter(9, 2/24); tim = filtfilt(b, a, slp_tim); [pat1cc, c1cc] = regress_eof(slp2, tim); [pat2cc, c2cc] = regress_eof(tax2, tim); [pat3cc, c3cc] = regress_eof(tsu2, tim); % Plot data default_global; FRAME = [95 300 -75 75]; [tem, tem, tem, lm] = getll('temp', lims); figure(1); fl(1); clf; clim = 0.1; subplot(3,3,1); gcont(-pat1aa, 0.5); dc2(lm, 0.5, -1000); color_shade(squeeze(c1aa.^2), clim, 0.7*[1 1 1]); t1 = title('< ML\_SLP, SLP >'); y1 = ylabel('2-12 Mo.'); set(y1, 'fontsize', 9); set(gca, 'fontsize', 8); set(t1, 'fontsize', 9); h = drawbox(limslp, 'k'); set(h, 'linewidth', 2); subplot(3,3,2); gcont(-pat2aa, 0.01, 1); dc2(lm, 0.5, 1000); color_shade(squeeze(c2aa.^2), clim, 0.7*[1 1 1]); t1 = title('< ML\_SLP, TAUX >'); set(gca, 'fontsize', 8); set(t1, 'fontsize', 9); subplot(3,3,3); gcont(-pat3aa, 0.05); dc2(lm, 0.5, 1000); color_shade(squeeze(c3aa.^2), clim, 0.7*[1 1 1]); t1 = title('< ML\_SLP, SST >'); set(gca, 'fontsize', 8); set(t1, 'fontsize', 9); subplot(3,3,4); gcont(-pat1bb, 0.25); dc2(lm, 0.5, -1000); color_shade(squeeze(c1bb.^2), clim, 0.7*[1 1 1]); t1 = title('< ML\_SLP, SLP >'); y1 = ylabel('12-24 Mo.'); set(y1, 'fontsize', 9); set(gca, 'fontsize', 8); set(t1, 'fontsize', 9); subplot(3,3,5); gcont(-pat2bb, 0.0025, 1); dc2(lm, 0.5, 1000); color_shade(squeeze(c2bb.^2), clim, 0.7*[1 1 1]); t1 = title('< ML\_SLP, TAUX >'); set(gca, 'fontsize', 8); set(t1, 'fontsize', 9); subplot(3,3,6); gcont(-pat3bb, 0.05); dc2(lm, 0.5, 1000); color_shade(squeeze(c2bb.^2), clim, 0.7*[1 1 1]); t1 = title('< ML\_SLP, SST >'); set(gca, 'fontsize', 8); set(t1, 'fontsize', 9); subplot(3,3,7); gcont(-pat1cc, 0.25); dc2(lm, 0.5, -1000); color_shade(squeeze(c1cc.^2), clim, 0.7*[1 1 1]); t1 = title('< ML\_SLP, SLP >'); y1 = ylabel('24-Inf Mo.'); set(y1, 'fontsize', 9); set(gca, 'fontsize', 8); set(t1, 'fontsize', 9); subplot(3,3,8); gcont(-pat2cc, 0.0025, 1); dc2(lm, 0.5, 1000); color_shade(squeeze(c2cc.^2), clim, 0.7*[1 1 1]); t1 = title('< ML\_SLP, TAUX >'); set(gca, 'fontsize', 8); set(t1, 'fontsize', 9); subplot(3,3,9); gcont(-pat3cc, 0.05); dc2(lm, 0.5, 1000); color_shade(squeeze(c3cc.^2), clim, 0.7*[1 1 1]); t1 = title('< ML\_SLP, SST >'); set(gca, 'fontsize', 8); set(t1, 'fontsize', 9); nfft = 64*12; nover = 7*nfft/8; [p, f] = spectrum(slp_tim, nfft, nover); f2 = f*6; n2 = nfft/2; rho = (corr(slp_tim, slp_tim, 1)+sqrt(corr(slp_tim,slp_tim,2)))/2; rn = (1-rho^2) ./ (1-2*rho*cos((pi/n2)*(0:n2))+rho^2); rn = rn / mean(rn); rn = rn * mean(p(:,1)); rner1 = rn * 2.05; rner5 = rn * 1.68; ind = [1:n2]+1; figure(4); fl(1); subplot(2,1,1); plot(log(f2(ind)), f2(ind).*p(ind,1), '-k', ... log(f2(ind)), f2(ind).*rn(ind)', '--k'); plot(f2, p(:,1), 'k', f2, rn, '--k'); % Determine equal variances n2 = 4096; rho = (corr(slp_tim, slp_tim, 1)+sqrt(corr(slp_tim,slp_tim,2)))/2; rn = (1-rho^2) ./ (1-2*rho*cos((pi/n2)*(0:n2))+rho^2); rn = rn / mean(rn); rn = rn * mean(p(:,1)); ftem = 6*[0:(1/n2):1];