function [V_NT,V_TH] = AnnualWindSpeed(filename,shtname)

%%% AnnualWindSpeed
%%% Dec 12, 2016, Sejun Park @NIST
%%% This script reads NIST wind speed data files and selects the time-
%%% series of annual peaks of thunderstorm and non-thunderstorm wind.

%% Inputs required

if isempty(filename) || isempty(shtname)
    % Specify filename of wind speed dataset
    filename = 'Bakersfield_723840'; % Name of Excel file
    shtname  = 'Sheet1';             % Name of sheet including data
end

%% 1. Reads the dataset

% Reads Excel dataset
eval(sprintf('[num,~,~] = xlsread(''%s.xlsx'',''%s'');',filename,shtname));

% Remove unnecessary rows
num(1:3,:) = [];

% Comments on the required dataset from the matrix [num] 
% all rows  = number of data
% column 2  = wind speed (standardized, mph)
% column 10 = annual max (non-thunderstorm)
% column 11 = annual max (thunderstorm)

%% 2. Makes a matrix for the time-series of annual peaks

% Finds a row number when column 10 is unity (for non-thunder)
r_index_NT = find(num(:,10) == 1);
V_NT      = num(r_index_NT,2);

% Finds a row number when column 11 is unity (for thunder)
r_index_TH = find(num(:,11) == 1);
V_TH      = num(r_index_TH,2);


end