%
%  Overlays b-deck track on event set. "Alltrplot.m" must be run first.
%
%  Copyright WindRiskTech, L.L.C., October, 2010
%
%-------------------------------------------------------------
%
if storm(1:2) == 'AL'
    stormlc='al';
elseif storm(1:2) == 'EP'
    stormlc='ep';
elseif storm(1:2) == 'WP'
    stormlc='wp';
elseif storm(1:2) == 'IO'
    stormlc='io';
elseif storm(1:2) == 'SH'
    stormlc='sh';
end
stormnew=storm;
stormnew(1:2)=stormlc;
file=strcat('b',stormnew,datea(1:4),'.dat');
fid=fopen(file,'r');
C=textscan(fid,'%s %f %d %*s %*s %*d %s %s %f %*[^\n]','delimiter',',');
st=fclose(fid);
bas=C{1};
dates=C{3};
xlats=C{4};
xlongs=C{5};
nend=max(size(xlats));
lats=zeros(1,nend);
longs=zeros(1,nend);
hemi=zeros(1,nend);
for i=1:nend,
    clear ulats ulongs
    ulats=char(xlats(i));
    ulongs=char(xlongs(i));
    mend=max(size(ulats));
    lats(i)=0.1.*str2num(ulats(1:mend-1));
    mend=max(size(ulongs));
    longs(i)=0.1.*str2num(ulongs(1:mend-1));
    hemi(i)=ulongs(mend);
end    
ws=C{6};
%
if char(hemi(1)) == 'W'
    longs=360-longs;
end    
hold on
k=m_plot(longs,lats,'y','linewidth',3);
k1=m_plot(longs,lats,'.b');
hold off