%rep=input('enter directory to work on \n','s') 
 hurricane='rita';
 PRF=200000;
 rep='';
 files=dir(['C:\Documents and Settings\lorsolo\My Documents\research\',hurricane,'\data\',rep,'\*.nc']); 
% sweepfile=input('enter filename \n','s')
for sc=35
%   for fil=2%length(files)%211:294%
%   sweepfile=files(fil).name;
%   rep2=sweepfile(30:32);
%   el=str2num(sweepfile(30:32));
%   time=sweepfile(12:17);
 
ncload(['C:\Documents and Settings\lorsolo\My Documents\research\',hurricane,'\data\',rep,'\',sweepfile]);
I=di(sc,:,:);
I=squeeze(I);
Q=dq(sc,:,:);
Q=squeeze(Q);
P=power(sc,:,:);
P=squeeze(P);
P=P';
lambda=(3*10^8)/(13.5*10^9);
Vr=-(lambda*PRF*atan(Q./I))/(4*pi);
az=encoder(sc,:);
az=az';

az=az';
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;
 
%  u_o=find(mod_data==0);
%  mod_data(u_o)=NaN;
 
P=10*log10(P);

rge=15:30:199*30+15;
     [th,r]=meshgrid(deg2rad(az),rge(70:109));
[x,y]=pol2cart(th,r);
figure
Vr=Vr';
pcolor(x,y,Vr(70:109,:));
shading flat
axis equal
colorbar
end
%(-cos((az+R))*sin(H)*cos(inc)*sin(Pit)+cos(H)*sin((az+R))*cos(inc)+sin(H)*cos(Pit)*sin(inc))*Vp*sin(T)+(-cos((az+R))*cos(H)*cos(inc)*sin(Pit)-sin(H)*sin((az+R))*cos(inc)+cos(H)*cos(Pit)*sin(inc))*Vp*sin(T)+cos (Pit)*cos(inc)*cos((az+R))+sin(Pit)*sin(inc)*wt;