cd ~dmenemen/llc_2160/regions/Michael

%nx=240; ny=641;
%nx2=480; ny2=1282;
%for fld={'Depth','DXG','DYC','DYU','RAC','XC','YC', ...
%         'DXC','DXV','DYG','hFacC','RAZ','XG','YG'}
%    fnm=['grid/' fld{1} '_240x641'];
%    tmp=readbin(fnm,[nx ny]);
%    mypcolor(tmp')
%    colorbar
%    title(fld{1})
%    pause
%end

fx='_oceTAUX_8401.4633.1_240.641.1';
fy='_oceTAUY_8401.4632.1_240.641.1';
fu='_U_8401.4633.1_240.641.1';
fv='_V_8401.4632.1_240.641.1';
fk='_KPPhbl_8401.4633.1_240.641.1';
fx2='_oceTAUX_16801.9265.1_480.1282.1';
fy2='_oceTAUY_16801.9264.1_480.1282.1';
fu2='_U_16801.9265.1_480.1282.1';
fv2='_V_16801.9264.1_480.1282.1';
fk2='_KPPhbl_16801.9265.1_480.1282.1';
clf reset
%orient landscape
colormap(cmap)

for ts=1142400:80:1159000
    clf
    fnm=['oceTAUX/' myint2str(ts,10) fx];
    flx=readbin(fnm,[nx ny]);
    fnm=['oceTAUY/' myint2str(ts,10) fy];
    fly=readbin(fnm,[nx ny]);
    subplot(161)
    mypcolor(sqrt(flx.^2+fly.^2)')
    title('1/24 |\tau|')
    caxis([0 .5])
    colorbar('h'), set(gca,'xtick',[],'ytick',[])

    fnm=['U/' myint2str(ts,10) fu];
    flx=readbin(fnm,[nx ny]);
    fnm=['V/' myint2str(ts,10) fv];
    fly=readbin(fnm,[nx ny]);
    subplot(163)
    mypcolor(sqrt(flx.^2+fly.^2)')
    title('1/24 |u|')
    caxis([0 1])
    colorbar('h'), set(gca,'xtick',[],'ytick',[])

    fnm=['KPPhbl/' myint2str(ts,10) fk];
    flx=readbin(fnm,[nx ny]);
    subplot(165)
    mypcolor(flx')
    title('1/24 hbl')
    caxis([0 50])
    colorbar('h'), set(gca,'xtick',[],'ytick',[])

    pnm='~dmenemen/llc_4320/regions/Michael/';
    ts2=1240704+(ts-1142400)/80*144;
    fnm=[pnm 'oceTAUX/' myint2str(ts2,10) fx2];
    flx=readbin(fnm,[nx2 ny2]);
    fnm=[pnm 'oceTAUY/' myint2str(ts2,10) fy2];
    fly=readbin(fnm,[nx2 ny2]);
    subplot(162)
    mypcolor(sqrt(flx.^2+fly.^2)')
    title('1/48 |\tau|')
    caxis([0 .5])
    colorbar('h'), set(gca,'xtick',[],'ytick',[])
    
    fnm=[pnm 'U/' myint2str(ts2,10) fu2];
    flx=readbin(fnm,[nx2 ny2]);
    fnm=[pnm 'V/' myint2str(ts2,10) fv2];
    fly=readbin(fnm,[nx2 ny2]);
    subplot(164)
    mypcolor(sqrt(flx.^2+fly.^2)')
    title('1/48 |u|')
    caxis([0 1])
    colorbar('h'), set(gca,'xtick',[],'ytick',[])
    
    fnm=[pnm 'KPPhbl/' myint2str(ts2,10) fk2];
    flx=readbin(fnm,[nx2 ny2]);
    subplot(166)
    mypcolor(flx')
    title('1/48 hbl')
    caxis([0 50])
    colorbar('h'), set(gca,'xtick',[],'ytick',[])
    text(-6.5*nx2,-ny2/3.5,ts2dte(ts,45,2011,1,17),'fontsize',30)
    eval(['print -djpeg figs/frame' myint2str((ts-1142400)/80,4)])
end
