%% Figure Volume changes wrt to Jarkus 2007 
% Jarkus method
 figure
 set (gcf,'position',[ 9    71   824   896])
 
  subplot(212)
plot(datenum(dates(pairs(:,1),:)),(Vtotal-VJtotal(1))/1E6,'.-r')
hold on;
windowSize = 3;
Vtotal_f=filtfilt(ones(1,windowSize)/windowSize,1,Vtotal)
plot(datenum(dates(pairs(:,1),:)),(Vtotal_f-VJtotal(1))/1E6,'-k', 'linewidth',1.5)



%%% Plot Jarkus surveys
% plot(Jarkus(1,1).Mdate,VJtotal(1)-VJtotal(1),'*k')
% plot(Jarkus(2,1).Mdate,VJtotal(2)-VJtotal(1),'*b') Bad data only till -6
% plot(Jarkus(3,1).Mdate,VJtotal(3)-VJtotal(1),'*m') % During construction
% plot(Jarkus(4,1).Mdate,VJtotal(4)-VJtotal(1),'vk')

xlim([ datenum(dates(pairs(1,1),:)) datenum(dates(pairs(end,1),:)) ])
xlim([datenum(['06/01/2009'],'mm/dd/yyyy') datenum(['10/02/2012'],'mm/dd/yyyy')])

datetick('x','mmm ''yy','keeplimits')
%title('Sediment volume at Vlugtenburg beach')
grid on

ylabel({'Additional volume in survey area';'wrt June 2007 [10^6 m3] '})
legend('Monthly survey data','3 months moving average','location','northeast')
xlabel('Date')


load F:\check_outs\tudelft\vlugtenburg\scripts\Matthieu\WaveHeightAnalysis\Pdaily.mat
load F:\check_outs\tudelft\vlugtenburg\scripts\Matthieu\WaveHeightAnalysis\Pperiod.mat
subplot(211)

plot(dailyP(:,1),dailyP(:,2),'m') 

hold on
%  windowSize = 90;
% dailyP_f=filtfilt(ones(1,windowSize)/windowSize,1,dailyP(:,2))
%   plot(dailyP(:,1),dailyP_f,':g', 'linewidth',3) 
%   
   plot(Pperiod(:,3),Pperiod(:,4),'.-k', 'linewidth',1) 
  
xlim([datenum(['06/01/2009'],'mm/dd/yyyy') datenum(['10/02/2012'],'mm/dd/yyyy')])
datetick('x','mmm ''yy','keeplimits')
grid on
legend('Daily wave power','Mean power between surveys','location','northwest')
ylabel ('Wave Power ')

set(gcf,'PaperPosition',[0  0  25 20])
hold off



