% plot_swh.m - plot siginificant wave height data
%
% 'descrip' variable:
%  Hs_y: 'ASIS 1 (Yankee) significant wave height (m), 30 min avg'
%  Hs_r: 'ASIS 2 (Romeo) significant wave height (m), 30 min avg'
%  time_yd: 'Time in 2006 yeardays (_r=Romeo,_y=Yankee)'
%  time_dn: 'Time in matlab datenum format (_r=Romeo,_y=Yankee)'
%  note: 'outliers (when present) replaced by NaN'

load SW06_SWH

figure(1); clf

subplot(2,1,1)
plot(time_dn_y,Hs_y)
datetick('x',2)
ax=axis;
axis([time_dn_y(1) time_dn_y(end) ax(3:4)])
title('SW06 ASIS 1 (Yankee) - Significant Wave Height - 30 minute averages')


subplot(2,1,2)
plot(time_dn_r,Hs_r)
datetick('x',2)
ax=axis;
axis([time_dn_r(1) time_dn_r(end) ax(3:4)])
ylabel('Significant Wave Height (m)')
xlabel('Date')
title('SW06 ASIS 1 (Romeo) - Significant Wave Height - 30 minute averages')

print -dpng SW06_SWH



return

% ----------------------------------------
%  zoom in for valery

s_tm = datenum(2006,08,01,00,00,00);
e_tm = datenum(2006,08,06,00,00,00);

ndx = find (time_dn_y >= s_tm & time_dn_y <= e_tm);

figure(2); clf
subplot(2,1,1)
plot(time_dn_y(ndx),Hs_y(ndx))
datetick('x',2); grid on
ax=axis;
% axis([time_dn_y(1) time_dn_y(end) ax(3:4)])
title('SW06 ASIS 1 (Yankee) - Significant Wave Height - 30 minute averages')


ndx = find (time_dn_r >= s_tm & time_dn_r <= e_tm);


subplot(2,1,2)
plot(time_dn_r(ndx),Hs_r(ndx))
datetick('x',2); grid on;
ax=axis;
% axis([time_dn_r(1) time_dn_r(end) ax(3:4)])
ylabel('Significant Wave Height (m)')
xlabel('Date')
title('SW06 ASIS 1 (Romeo) - Significant Wave Height - 30 minute averages')

print -dpng sw06_swh_aug1-5.png

