1 |
% cd MITgcm |
2 |
lon=0:.48:11.6; lat=-70:.16:-67.7; dpt=72:144:3600; |
3 |
Depth=readbin('run/Depth.data',[25 15]); |
4 |
|
5 |
% find bottom |
6 |
kbot=ones(25,15); |
7 |
s1=35+readbin(['run.bbl/SALTanom.' myint2str(216,10) '.data'],[25 15 25]); |
8 |
for k=2:25 |
9 |
kbot(find(s1(:,:,k)>0))=k; |
10 |
end |
11 |
|
12 |
% compare baseline, downslope, and bbl |
13 |
colormap(cmap), cx=[29.99 30.1]; |
14 |
s1=zeros(25,15,25); s2=s1; s3=s1; |
15 |
for ts=216:216:7200 |
16 |
s1(:,:,1:25)=35+readbin(['run/SALTanom.' myint2str(ts,10) '.data'],[25 15 25]); |
17 |
s2(:,:,1:25)=35+readbin(['run.down_slope/SALTanom.' myint2str(ts,10) '.data'],[25 15 25]); |
18 |
s3(:,:,1:25)=35+readbin(['run.bbl/SALTanom.' myint2str(ts,10) '.data'],[25 15 25]); |
19 |
clf, subplot(311) |
20 |
mypcolor(lat,-dpt/1e3,squeeze(s1(10,:,:))'); caxis(cx), thincolorbar |
21 |
title(['baseline salinity section on day ' int2str(ts*1200/60/60/24)]) |
22 |
ylabel('depth (km)') |
23 |
subplot(312) |
24 |
mypcolor(lat,-dpt/1e3,squeeze(s2(10,:,:))'); caxis(cx), thincolorbar |
25 |
title(['downslope salinity section on day ' int2str(ts*1200/60/60/24)]) |
26 |
ylabel('depth (km)') |
27 |
subplot(313) |
28 |
mypcolor(lat,-dpt/1e3,squeeze(s3(10,:,:))'); caxis(cx), thincolorbar |
29 |
title(['bbl salinity section on day ' int2str(ts*1200/60/60/24)]) |
30 |
ylabel('depth (km)'), xlabel('latitude (deg)') |
31 |
pause(.1) |
32 |
end |
33 |
|
34 |
% look at some diagnostics from bbl integration |
35 |
colormap(cmap), cx=[29.998 30.03]; |
36 |
for ts=216:216:7200 |
37 |
clf |
38 |
subplot(321) |
39 |
s1=35+readbin(['run.bbl/SALTanom.' myint2str(ts,10) '.data'],[25 15 25]); |
40 |
mypcolor(lat,-dpt/1e3,squeeze(s1(10,:,:))'); caxis(cx), thincolorbar |
41 |
title(['salinity section on day ' int2str(ts*1200/60/60/24)]) |
42 |
subplot(322) |
43 |
s2=kbot; for i=1:25, for j=1:15, s2(i,j)=s1(i,j,kbot(i,j)); end, end |
44 |
mypcolor(s2'); caxis(cx), thincolorbar |
45 |
title('salinity of bottom grid box') |
46 |
subplot(323) |
47 |
eta=readbin(['run.bbl/BBLeta.' myint2str(ts,10) '.data'],[25 15]); |
48 |
mypcolor(eta'); caxis([0 144]), thincolorbar |
49 |
title('bbl thickness') |
50 |
subplot(324) |
51 |
s3=readbin(['run.bbl/BBLsalt.' myint2str(ts,10) '.data'],[25 15]); |
52 |
mypcolor(s3'); caxis(cx), thincolorbar |
53 |
title('salinity of bbl') |
54 |
subplot(325) |
55 |
tendS=readbin(['run.bbl/BBLtendS.' myint2str(ts,10) '.data'],[25 15]); |
56 |
mypcolor(tendS'); caxis([-1 1]*3e-9), thincolorbar |
57 |
title('bottom salinity tendency due to bbl') |
58 |
subplot(326) |
59 |
mypcolor(s3'-s2'); thincolorbar |
60 |
title('bbl salinity minus bottom salinity'), pause |
61 |
end |