%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
%   Program to read and plot Hilbre wind data for the perod mid 2004 to end 2008
%       Jon Williams May 2009
%>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
clear;pack;
cd 'E:\Jon_work\X-Beach\All Test cases\Sefton\SEFTON DATA\Wind data';
load wind
% The seral data time starts from 01/01/2002: so obtain the correct date axis
    time = datenum(2002,01,01)+ 1+ wind_data(:,1);
    speed = wind_data(:,2);
    power = wind_data(:,3);
    direction = wind_data(:,4);
    skip_points = 100;
figure
    subplot(3,1,1)
        plot(time(1:skip_points:length(time)),speed(1:skip_points:length(speed)),'-k'); datetick('x');set(gca,'fontsize',11,'FontName','arial'); title('Mean wind speed'); 
        xlabel('Time'); ylabel('m/s');axis([min(time)-120 max(time)+50 0 30]);
    subplot(3,1,2)
        plot(time(1:skip_points:length(time)),power(1:skip_points:length(power)),'-r'); datetick('x');set(gca,'fontsize',11,'FontName','arial'); title('Mean wind power'); 
        xlabel('Time'); ylabel('m^3/s^3');axis([min(time)-120 max(time)+50 0 2e4]);
    subplot(3,1,3)
        plot(time(1:skip_points:length(time)),direction(1:skip_points:length(direction)),'.b'); datetick('x');set(gca,'fontsize',11,'FontName','arial'); title('Mean wind direction'); 
        xlabel('Time'); ylabel('degrees');axis([min(time)-120 max(time)+50 -20 400]);
        
        nstart = datevec(time(1));
        nend = datevec(time(length(time)));
