

%Compute mask
y(1) = 1.5;
y(2) = 52;

y(3) = y(2);
y(4) = y(1);

x1(1) = datenum('15-Apr-2005 14:59:23');
x1(3) = datenum('20-Apr-2005 20:59:23');

x1(2) = x1(1);
x1(4) = x1(3);

  
f = figure('Visible','off');
hold on;
[C,h] = contourf(time,bZ,BTemp,20);
set(h,'LineStyle','none')
foo = axis;
foo(3) = 0;
axis(foo);
set(gca,'xtick',[time(1):7:time(end)])
datetick('x','keeplimits','keepticks');

set(gca,'YDir','reverse');
colorbar;
ylabel('depth (m)');
xlabel('GMT');
title('Temperature (deg C)');

set(f,'Units','pixels');
rect = get(f,'Position');
rect(3) = 550;
rect(4) = 200;
set(f,'Position',rect);
set(f,'PaperPositionMode','auto');

print -dpng Temp
print -depsc2 Temp

f = figure('Visible','off'); hold on;

[C,h] = contourf(time,bZ,BSal,20);
set(h,'LineStyle','none')
foo = axis;
foo(3) = 0;
axis(foo);
set(gca,'xtick',[time(1):7:time(end)])
datetick('x','keeplimits','keepticks');

h2 = fill(x1,y,[.9,.9,.9]);
set(h2,'LineStyle','none')

set(gca,'YDir','reverse') ;
colorbar;
ylabel('depth (m)');
xlabel('GMT');
title('Salinity (PSU)');

set(f,'Units','pixels');
rect = get(f,'Position');
rect(3) = 550;
rect(4) = 200;
set(f,'Position',rect);
set(f,'PaperPositionMode','auto');

print -dpng Sal
print -depsc2 Sal

f = figure('Visible','off');  hold on;
[C,h] = contourf(time,bZ,BFluor,20);
set(h,'LineStyle','none')
foo = axis;foo(3) = 0;axis(foo);
caxis([0 5]);
set(gca,'xtick',[time(1):7:time(end)])
datetick('x','keeplimits','keepticks');

h2 = fill(x1,y,[.9,.9,.9]);
set(h2,'LineStyle','none')

set(gca,'YDir','reverse') ;
colorbar;

ylabel('depth (m)');
xlabel('GMT');
title('Fluorometer (0-5V)');

set(f,'Units','pixels');
rect = get(f,'Position');
rect(3) = 550;
rect(4) = 200;
set(f,'Position',rect);
set(f,'PaperPositionMode','auto');

print -dpng Fluor
print -depsc2 Fluor


f = figure('Visible','off');  hold on;
[C,h] = contourf(time,bZ,BOxygen,20);
set(h,'LineStyle','none')
foo = axis; foo(3) = 0; axis(foo);
caxis([0 5]);
set(gca,'xtick',[time(1):7:time(end)])
datetick('x','keeplimits','keepticks');
set(gca,'YDir','reverse') ;
colorbar;

h2 = fill(x1,y,[.9,.9,.9]);
set(h2,'LineStyle','none')

ylabel('depth (m)');
xlabel('GMT');
title('Oxygen (0-5V)');

set(f,'Units','pixels');
rect = get(f,'Position');
rect(3) = 550;
rect(4) = 200;
set(f,'Position',rect);
set(f,'PaperPositionMode','auto');

print -dpng Oxygen
print -depsc2 Oxygen

f = figure('Visible','off'); hold on;
[C,h] = contourf(time,bZ,BTrans,20);
set(h,'LineStyle','none')
foo = axis; foo(3) = 0; axis(foo);
set(gca,'xtick',[time(1):7:time(end)])
datetick('x','keeplimits','keepticks');
set(gca,'YDir','reverse') ;
colorbar;

h2 = fill(x1,y,[.9,.9,.9]);
set(h2,'LineStyle','none')

ylabel('depth (m)');
xlabel('GMT');
title('Transmissometer (0-5V)');

set(f,'Units','pixels');
rect = get(f,'Position');
rect(3) = 550;
rect(4) = 200;
set(f,'Position',rect);
set(f,'PaperPositionMode','auto');

print -dpng Transmissometer
print -depsc2 Transmissometer


!cp Temp.png W:/MOOSVP/.
!cp Sal.png W:/MOOSVP/.
!cp Fluor.png W:/MOOSVP/.
!cp Oxygen.png W:/MOOSVP/.
!cp Transmissometer.png W:/MOOSVP/.

disp(['Done at ' datestr(clock)]);
