cd ~dmenemen/llc_4320/regions/CalSWOT
pn='~dmenemen/llc_4320/regions/CalSWOT/run_template3b/MITgcm/run/';
nx=7680; ny=10240; ts=44800;
fn=[pn 'Theta.' myint2str(ts,10) '.data'];
T=readbin(fn,[nx ny]);
pn='~dmenemen/llc_4320/regions/CalSWOT/run_template3b/data/';
lat=readbin([pn 'LATC.bin'],[nx ny]); lat=lat(1,:);
lon=readbin([pn 'LONC.bin'],[nx ny]); lon=lon(:,1);

figure(1)
clf reset
colormap(cmap)
ix=3755:4850;
iy=5795:6700;
mypcolor(T(ix,iy)');
caxis([9.9 14.1])
h=thincolorbar;
set(h,'ytick',10:14)
axis('equal')
xticklabel={'125W','124W','123W'};
xtick=[closest(-125,lon(ix)) ...
       closest(-124,lon(ix)) ...
       closest(-123,lon(ix))]; 
yticklabel={'37N','38N'};
ytick=[closest(37,lat(iy)) ...
       closest(38,lat(iy))]; 
set(gca,'xtick',xtick,'xticklabel',xticklabel, ...
        'ytick',ytick,'yticklabel',yticklabel);
print -dtiff -r300 SST1
print -djpeg -r300 SST1
lat1=lat(iy(1));
lat2=lat(iy(end));
lon1=lon(ix(1));
lon2=lon(ix(end));

pn='~dmenemen/llc_4320/regions/CalSWOT/run_template1/MITgcm/run/';
fn=[pn 'Theta.' myint2str(ts*24/100,10) '.data'];
T=readbin(fn,[nx/8 ny/8]);
pn='~dmenemen/llc_4320/regions/CalSWOT/run_template1/data/';
lat=readbin([pn 'LATC.bin'],[nx/8 ny/8]); lat=lat(1,:);
lon=readbin([pn 'LONC.bin'],[nx/8 ny/8]); lon=lon(:,1);

figure(2), clf
colormap(cmap)
ix=8:858;
iy=450:1150;
mypcolor(T(ix,iy)');
caxis([8.8 18.2])
thincolorbar
axis('equal')

xticklabel={'130W','125W','120W'};
xtick=[closest(-130,lon(ix)) ...
       closest(-125,lon(ix)) ...
       closest(-120,lon(ix))]; 
yticklabel={'35N','40N'};
ytick=[closest(35,lat(iy)) ...
       closest(40,lat(iy))]; 
set(gca,'xtick',xtick,'xticklabel',xticklabel, ...
        'ytick',ytick,'yticklabel',yticklabel);
hold on
iy1=closest(lat1,lat(iy));
iy2=closest(lat2,lat(iy));
ix1=closest(lon1,lon(ix));
ix2=closest(lon2,lon(ix));
plot([ix1 ix2 ix2 ix1 ix1],[iy1 iy1 iy2 iy2 iy1])
print -dtiff -r300 SST2
