data = data';


mtm2_time = data(1,:)-data(1,1)+732059 - 0.5/24;  % Convert from Excel days to Matlab days, and adjust to middle of last hour...
mtm2_windpower = clean(data(3,:), 10000, 1);
mtm2_solarpower = clean(data(2,:), 10000, 1);

% Wind generator is 46" or 1.14 m in diameter.  
% Model Air Industrial serial number 47986 

% ------------------------------------------------------------------------
% --- Now lets get set to compare MTM2 data with NDBC data (taken at 1/6th
% the rate)

wp = smooth(mtm2_windpower, 6);   % Average data first..
ndbc_mtm2_wp = interp1(mtm2_time, wp, ndbc_wind_time);  % Now interp to NDBC time

% Lets make some variable that have just the portion of the timeline where
% there is both MTM2 data and NDBC data...

ok = find(~isnan(ndbc_mtm2_wp));
t = ndbc_wind_time(ok);
pwp = ndbc_wind_power(ok);
mwp = ndbc_mtm2_wp(ok);
mw = ndbc_wind_speed(ok);

pwp = clean(pwp, 10000, 1);

hold off; plot(t, pwp, 'r'); hold on; plot(t, mwp);
