Back to home page

MITgcm

 
 

    


Warning, /verification/natl_box/input/lookat.m is written in an unsupported language. File is not indexed.

view on githubraw file Latest commit 7e819019 on 2005-04-29 18:47:03 UTC
7e819019d5 Dimi*0001 nx=20; ny=16; nz=23;
                0002 
                0003 fld1=readbin('KPPviscA.0000000010.data',[nx ny]);
                0004 fld2=readbin('KPPviscAz.0000000011.data',[nx ny]);
                0005 clf, subplot(311),mypcolor(fld1');colorbar
                0006 subplot(312),mypcolor(fld2');colorbar
                0007 subplot(313),mypcolor(fld2'-fld1');colorbar
                0008 
                0009 fld1=readbin('KPPdiffS.0000000010.data',[nx ny]);
                0010 fld2=readbin('KPPdiffKzS.0000000011.data',[nx ny]);
                0011 clf, subplot(311),mypcolor(fld1');colorbar
                0012 subplot(312),mypcolor(fld2');colorbar
                0013 subplot(313),mypcolor(fld2'-fld1');colorbar
                0014 
                0015 fld1=readbin('KPPdiffT.0000000010.data',[nx ny]);
                0016 fld2=readbin('KPPdiffKzT.0000000011.data',[nx ny]);
                0017 clf, subplot(311),mypcolor(fld1');colorbar
                0018 subplot(312),mypcolor(fld2');colorbar
                0019 subplot(313),mypcolor(fld2'-fld1');colorbar
                0020 
                0021 fld1=readbin('KPP_ghat.0000000010.data',[nx ny]);
                0022 fld2=readbin('KPPghat.0000000011.data',[nx ny]);
                0023 clf, subplot(311),mypcolor(fld1');colorbar
                0024 subplot(312),mypcolor(fld2');colorbar
                0025 subplot(313),mypcolor(fld2'-fld1');colorbar
                0026 
                0027 fld1=readbin('KPP_hbl.0000000010.data',[nx ny]);
                0028 fld2=readbin('KPPhbl.0000000011.data',[nx ny]);
                0029 fld3=readbin('KPPmld.0000000010.data',[nx ny]);
                0030 clf, subplot(311),mypcolor(fld1');colorbar
                0031 subplot(312),mypcolor(fld2');colorbar
                0032 subplot(313),mypcolor(fld3');colorbar
                0033 
                0034 fld1=readbin('KPPfrac.0000000010.data',[nx ny]);
                0035 mypcolor(fld1');colorbar
                0036 
                0037 %%%%%%%%%%%%%%%
                0038 delZ=[0 10 10 15 20 20 25 35 50 75 100 150 200 ...
                0039       275 350 415 450 500 500 500 500 500 500 500];
                0040 top=cumsum(delZ(1:23));
                0041 bot=cumsum(delZ(2:24));
                0042 dpt=-(top+bot)/2;
                0043 MLD=readbin('KPPmld.0000000010.data',[nx ny]);
                0044 T=readbin('T.0000000011.data',[nx ny nz]);
                0045 S=readbin('S.0000000011.data',[nx ny nz]);
                0046 R=rho(S,T,0*T);
                0047 DR=rho(S(:,:,1),T(:,:,1)-.8,0)-R(:,:,1);
                0048 mld=0*MLD;
                0049 for i=1:nx
                0050   for j=1:ny
                0051     if DR(i,j)>0
                0052       tmp=squeeze(R(i,j,:)-R(i,j,1));
                0053       in=closest(DR(i,j),tmp,0);
                0054       mld(i,j)=(dpt(in(1))*abs(tmp(in(2))-DR(i,j)) + ...
                0055                 dpt(in(2))*abs(tmp(in(1))-DR(i,j))) / ...
                0056                abs(R(i,j,in(2))-R(i,j,in(1)));
                0057     end
                0058   end
                0059 end
                0060 clf, subplot(311),mypcolor(fld3');caxis([0 70]),colorbar
                0061 subplot(312),mypcolor(-mld');caxis([0 70]),colorbar
                0062 subplot(313),mypcolor(-mld'-fld3');colorbar
                0063 
                0064 %%%%%%%%%%%%%%%%%%%%%%%
                0065 ix=10; iy=8;
                0066 s=squeeze(S(ix,iy,:));
                0067 t=squeeze(T(ix,iy,:));
                0068 p=pressure(abs(dpt),26);
                0069 r=rho(s,t,0);
                0070 dr=
                0071 clf, plot(s,dpt,t,dpt,r-r(1),dpt,it,dpt,dr+dpt*0,dpt,'linewidth',3)
                0072 legend('S','T','\sigma','dr',4)
                0073 axis([0 37 -5450 0]), grid
                0074 title(MLD(ix,iy))