Documentation of regress_taux_hanom


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


Help text

  eta/h = 6e-4;

Cross-Reference Information

This script calls

Listing of script regress_taux_hanom


clear
lims = [180 270 -5 5];
tim = 1:1000;
[lat, lon, depth] = getll('temp', lims);
[lat, lon, depthw] = getll('wl', lims);
hctop = getheat(lims, 1:5, tim);
hcbot = getheat(lims, 6:9, tim);
hcmt = mean(mean(mean(hctop)));
hcmb = mean(mean(mean(hcbot)));
Ht = depthw(5);
Hb = depthw(9) - depthw(5);
rho = 1e3;
c = 4.218e3;
Ttop = hcmt./(rho*c*Ht);
Tbot = hcmb./(rho*c*Hb);
delt = Ttop - Tbot;
hctot = getheat(lims, 1:9, tim);
ct = getnc('temp', lims, 5, tim);
hctot = mean(mean(hctot, 2), 3);
ct = mean(mean(ct, 2), 3);
h = 100 * hctot ./ (delt * rho * c);
lims2 = [165 210 -5 5];
tx = getnc('taux', lims2, 1, tim);
tx = mean(mean(tx, 2), 3);
h = detrend(h);
tx = detrend(tx);
h = 6e-3*h;

subplot(2,1,1)
%plot(tanh(h/(2*std(h))), tx, '.');
plot(h, tx, '.');
axis('square')
axis([-1.5 1.5 -.20 .20]);
line([-3000 3000], reg_coef*[-3000 3000]);
grid on

subplot(2,1,2)
%plot(tanh(h/std(h)), 100*tx, '.');
plot(h, tx-fitted, '.r')
axis('square')
axis([-3000 3000 -.20 .20]);
line([-3000 3000], reg_coef*[-3000 3000]);
grid on
hold off

reg_coef = (tx' * tanh(h/(2*std(h)))) ./ ...
        (length(tx) * std(tanh(h/(2*std(h))))^2);
cor_coef = corr(tx, tanh(h/(2*std(h))));

[beta, expv, fval, fitted] = regress(h,tx);

temh = std(tx) * tanh(h/(2*std(h)))/std(tanh(h/(2*std(h))));




reg_coef = (tx' * h) ./ (length(tx) * std(h)^2);
cor_coef = corr(tx, h);

title(['Regression Coefficient = ' num2str(round(1e7 * reg_coef)/100) ...
       'x10^-^5 dynes cm^-^2 cm^-^1;  Correlation Coefficient = ' ...
        num2str(round(100*cor_coef)/100)]);
ylabel('Zonal Wind Stress (10^-^3 N m^-^2)');
xlabel('Depth anomaly of 18 K Isotherm (m)');

cd /home/disk/hayes2/dvimont/ocean/matlab_data
load zon_eof.mat


%  Check std of h in actual uncoupled runs

cd /home/disk/hayes2/dvimont/ocean/data
nc = netcdf('sal_gauss.cdf', 'nowrite');
  h2 = nc{'h'}(:,1, 50:53, 52:101);
nc = close(nc);
h2 = squeeze(mean(mean(h2, 3), 4));





dranold = 0;
drannew = coef1*dranold+coef2*(rand-0.5);
for i = 2:10000;
  drannew(i) = coef1*drannew(i-1)+coef2*(rand-0.5);
end