hurricane='isabel';
rep='meanless\vert';
radar_files=dir(['C:\Documents and Settings\lorsolo\My Documents\research\',hurricane,'\data\modified\',rep,'\*.dat']);



L=length(radar_files)
for i=2%:length(radar_files)
    data=load(['C:\Documents and Settings\lorsolo\My Documents\research\',hurricane,'\data\modified\',rep,'\',radar_files(i).name]);
    wind=load(['C:\Documents and Settings\lorsolo\My Documents\research\',hurricane,'\data\total_wind\',radar_files(i).name(1:length(radar_files(i).name)-4),'_wind.dat']);
    el=str2num(radar_files(i).name(30:32));
    [li,col]=size(data);
    az=data(li,:);
    az=az';
    vel=data(1:li-1,:);
    [vel_row,vel_col]=size(data);
    
    for rg=1:length(vel)
        
        wd_mean=wind(rg,2);
        ws_mean=wind(rg,1);
        if isnan(wd_mean)==1
            mean_radial_vel_tower1(rg,1:vel_col)=NaN*ones(1,1:vel_col);
            meanless(rg,1:vel_col)=NaN*ones(1,1:vel_col);
        else
            beta=abs(az-wd_mean);
            
            u_toward=find(beta < 90  | beta >= 270);
            toward=-ws_mean*cos(deg2rad(beta(u_toward)));
            
            
            u_away=find(beta >= 90  & beta <270);
            beta(u_away)=abs(beta(u_away)-180);
            away=ws_mean*cos(deg2rad(beta(u_away)));
            
            
            mean_radial_vel_tower1(rg,u_away)=away';
            mean_radial_vel_tower1(rg,u_toward)=toward';
            
            
            ratio(rg,:)=vel(rg,:)./mean_radial_vel_tower1(rg,:);
        end
    end
    
    
    w=find(az >=270 & az <360);
    a=az;
    a(w)=360-a(w)+90;
    w=find(az>=0 & az<270);
    a(w)=90-a(w);
    az=a;
    LL=249;
    rge=33.35:66.7:LL*66.7+33.35;%125:250:49*250+125;%
    [th,r]=meshgrid(deg2rad(az),rge);
    [x,y]=pol2cart(th,r);
    h=figure;
    
    pcolor(x,y,ratio(1:LL+1,:));
    shading flat
    v=[-10e-8 10e-8];
    caxis(v);
end