cd ~dmenemen/llc_4320/regions/GulfMexico
nx=960;

fnm='Theta/0000017712_Theta_14401.8801.1_960.960.90';
Theta=readbin(fnm,[nx nx]);
figure(1)
clf
mypcolor(Theta');
caxis([27 30])
colorbar

ts=dte2ts('15-Oct-2012',25,2011,9,10);
fnm='Salt/0001385856_Salt_14401.8801.1_960.960.90';

Salt=readbin(fnm,[nx nx]);
figure(2)
clf
mypcolor(Salt');
caxis([34.5 36.5])
colorbar

fnm='grid/XC_960x960';
XC=readbin(fnm,[nx nx]);
fnm='grid/YC_960x960';
YC=readbin(fnm,[nx nx]);
ix=find(XC(:,1)>=-97.57&XC(:,1)<=-82.76);
iy=find(YC(1,:)>=24.14&YC(1,:)<=30.55);

figure(3)
clf
mypcolor(Theta(ix,iy)');
caxis([27.5 30])
colormap(cmap)
colorbar

figure(4)
xc=XC(ix,iy)';
yc=YC(ix,iy)';
tmp=Salt(ix,iy)';
tmp(~tmp)=nan;
clf reset
orient tall
wysiwyg
subplot(311)
pcolorcen(xc,yc,tmp);
caxis([33.5 37.5])
colormap(bone)
colorbar
print -dpng MissippiDelta
