function [Vtheta,Vr,x_fill, z_fill]=uv_recalculator(input_data)

[lat0,long0]=center_w_file(input_data);



if length(input_data.path1)==0
    path1=['C:\Documents and Settings\sylvie.lorsolo\My Documents\research\HRD research\Gamache_soft\wfiles\',input_data.hurricane,'\',input_data.jour];
else
    path1=input_data.path1;
end

filename=dir([path1,'\*.w']) ;
fichier=filename(input_data.file_number).name;
file_info=dir([['C:\Documents and Settings\sylvie.lorsolo\My Documents\research\HRD research\Gamache_soft\wfiles\',input_data.hurricane,'\',input_data.jour(1:2)],'\*',fichier(10:13),'*leg*']); 
%file_center=dir(['C:\Documents and Settings\sylvie.lorsolo\My Documents\research\HRD research\Gamache_soft\wfiles\',input_data.hurricane,'\',input_data.jour(1:2)],'\*',fichier(10:13),'*center*']); 

fichier2=['C:\Documents and Settings\sylvie.lorsolo\My Documents\research\HRD research\Gamache_soft\wfiles\',input_data.hurricane,'\',input_data.jour(1:2),'\',file_info.name];
%fichier3=['C:\Documents and Settings\sylvie.lorsolo\My Documents\research\HRD research\Gamache_soft\wfiles\',input_data.hurricane,'\',input_data.jour(1:2),'\',file_center.name];
        leg_data=textread(fichier2,'%s','bufsize', 8191);
        
        
        
        if length(strfind(fichier,'inbound_vert.w'))~=0
            azi=str2num(cell2mat(leg_data(17)));
            uc=str2num(cell2mat(leg_data(28)));
            vc=str2num(cell2mat(leg_data(29)));
        else
            
            azi=str2num(cell2mat(leg_data(22)));
            uc=str2num(cell2mat(leg_data(28)));
            vc=str2num(cell2mat(leg_data(29)));
        end
        

        
        [ws,radwind,tangwind,w,dbz, x_fill, y_fill, z_fill,L]=read_w_files(input_data);
        % u, v computation
        u1= radwind * sin(deg2rad(azi));
        v1= radwind * cos(deg2rad(azi));
        u2= tangwind * sin(deg2rad(azi+270));
        v2= tangwind * cos(deg2rad(azi+270));
        
        u = u1 + u2;
        v = v1 + v2;
        
            
       rge_deg = distdim(x_fill','m','deg');

       [lat_grid,long_grid] = reckon(lat0*ones(length(x_fill),1),long0*ones(length(x_fill),1), rge_deg,azi*ones(length(x_fill),1));
       
        %[lat_new,long_new]=load(fichier3);
        
        lat_new = 26.39;
        long_new = -88.7;
        
        
        
        new_range = distance(lat_new*ones(length(x_fill),1),long_new*ones(length(x_fill),1),lat_grid,long_grid);
        new_range = distdim(new_range,'deg','km');
        new_az = azimuth(lat_new*ones(length(x_fill),1),long_new*ones(length(x_fill),1),lat_grid,long_grid);
        new_az = new_az*ones(1,length(z_fill));
        [wd]=wind_direction_deg(u,v, length(x_fill),length(z_fill));
        ws1 = sqrt(u.^2 + v.^2);
        Vr = radial(ws1,wd,new_az);
        Vtheta = sqrt(ws.^2 - Vr.^2);