--- MITgcm_contrib/bbl/lookat_output.m 2011/03/06 02:11:04 1.3 +++ MITgcm_contrib/bbl/lookat_output.m 2013/08/27 21:02:21 1.4 @@ -1,7 +1,6 @@ -% cd ~/mitgcm/bbl/MITgcm +% cd MITgcm lon=0:.48:11.6; lat=-70:.16:-67.7; dpt=72:144:3600; Depth=readbin('run/Depth.data',[25 15]); -colormap(cmap), cx=[29.99 30.1]; % find bottom kbot=ones(25,15); @@ -10,7 +9,6 @@ kbot(find(s1(:,:,k)>0))=k; end -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % compare baseline, downslope, and bbl colormap(cmap), cx=[29.99 30.1]; s1=zeros(25,15,25); s2=s1; s3=s1; @@ -21,49 +19,43 @@ clf, subplot(311) mypcolor(lat,-dpt/1e3,squeeze(s1(10,:,:))'); caxis(cx), thincolorbar title(['baseline salinity section on day ' int2str(ts*1200/60/60/24)]) - hold on, plot(lat,-Depth(10,:)/1e3,'r.-'), ylabel('depth (km)') + ylabel('depth (km)') subplot(312) mypcolor(lat,-dpt/1e3,squeeze(s2(10,:,:))'); caxis(cx), thincolorbar title(['downslope salinity section on day ' int2str(ts*1200/60/60/24)]) - hold on, plot(lat,-Depth(10,:)/1e3,'r.-'), ylabel('depth (km)') + ylabel('depth (km)') subplot(313) mypcolor(lat,-dpt/1e3,squeeze(s3(10,:,:))'); caxis(cx), thincolorbar title(['bbl salinity section on day ' int2str(ts*1200/60/60/24)]) - hold on, plot(lat,-Depth(10,:)/1e3,'r.-'), ylabel('depth (km)') - xlabel('latitude (deg)'), pause(.5) + ylabel('depth (km)'), xlabel('latitude (deg)') + pause(.1) end -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % look at some diagnostics from bbl integration +colormap(cmap), cx=[29.998 30.03]; for ts=216:216:7200 + clf + subplot(321) s1=35+readbin(['run.bbl/SALTanom.' myint2str(ts,10) '.data'],[25 15 25]); - clf, subplot(321), mypcolor(lat,-dpt/1e3,squeeze(s1(10,:,:))'); caxis(cx), thincolorbar + mypcolor(lat,-dpt/1e3,squeeze(s1(10,:,:))'); caxis(cx), thincolorbar title(['salinity section on day ' int2str(ts*1200/60/60/24)]) + subplot(322) s2=kbot; for i=1:25, for j=1:15, s2(i,j)=s1(i,j,kbot(i,j)); end, end - subplot(322), mypcolor(s2'); caxis(cx), thincolorbar + mypcolor(s2'); caxis(cx), thincolorbar title('salinity of bottom grid box') + subplot(323) + eta=readbin(['run.bbl/BBLeta.' myint2str(ts,10) '.data'],[25 15]); + mypcolor(eta'); caxis([0 144]), thincolorbar + title('bbl thickness') + subplot(324) s3=readbin(['run.bbl/BBLsalt.' myint2str(ts,10) '.data'],[25 15]); - subplot(323), mypcolor(s3'); caxis(cx), thincolorbar + mypcolor(s3'); caxis(cx), thincolorbar title('salinity of bbl') - subplot(324), mypcolor(s3'-s2'); thincolorbar - title('bbl salinity minus bottom salinity') - tendS=readbin(['run.bbl/BBLtendS.' myint2str(ts,10) '.data'],[25 15]); - subplot(325), mypcolor(tendS'); caxis([-1 1]*3e-9), thincolorbar - title('bottom salinity tendency due to bbl'), pause(.1) -end - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% check that tendency integrates to zero -RAC=readbin('run.bbl/RAC.data',[25 15]); -hFacC=readbin('run.bbl/hFacC.data',[25 15 25]); -for i=1:25 - for j=1:15 - RAC(i,j)=RAC(i,j)*hFacC(i,j,kbot(i,j)); - end -end -for ts=216:216:7200 - eta=readbin(['run.bbl/BBLeta.' myint2str(ts,10) '.data'],[25 15]); + subplot(325) tendS=readbin(['run.bbl/BBLtendS.' myint2str(ts,10) '.data'],[25 15]); - tmp=RAC.*tendS; - disp([ts sum(tmp(:))]), pause(1) + mypcolor(tendS'); caxis([-1 1]*3e-9), thincolorbar + title('bottom salinity tendency due to bbl') + subplot(326) + mypcolor(s3'-s2'); thincolorbar + title('bbl salinity minus bottom salinity'), pause end