Home > atmlab > mie > phasefunav_phi.m

phasefunav_phi

PURPOSE ^

Legendre coefficients gi of phase function p(costeta)

SYNOPSIS ^

function result = phasefunav_phi(m,x,factor);

DESCRIPTION ^

 Legendre coefficients gi of phase function p(costeta) 
 in Mie Theory (e.g. gl in
 Meador and Weaver, 1980 J. Atm. Sci. 37, pp. 630-643)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

phasefunav_phi.m

SOURCE CODE ^

0001 function result = phasefunav_phi(m,x,factor);
0002 
0003 % Legendre coefficients gi of phase function p(costeta)
0004 % in Mie Theory (e.g. gl in
0005 % Meador and Weaver, 1980 J. Atm. Sci. 37, pp. 630-643)
0006 
0007 % Input:
0008 % m: refractive index, x: size parameter
0009 % nj: number of gi values (use about nj=2.5*(x+1))
0010 % nsteps: number of angular values between 0 and pi
0011 % (take about nsteps = 20*nj)
0012 % C. M�zler, July 2003
0013 
0014 nj=ceil((x+1.5)*2.3);
0015 nsteps=factor*nj
0016 dteta=pi/nsteps;
0017 m1=real(m); m2=imag(m);
0018 nx=(1:nsteps);
0019 teta=(nx-0.75)*dteta; u=cos(teta); s=sin(teta);
0020     for j = 1:nsteps, 
0021         a(:,j)=mie_S12(m,x,u(j));
0022         SL(j)= real(a(1,j)'*a(1,j));
0023         SR(j)= real(a(2,j)'*a(2,j));
0024         A(j)=(SL(j)+SR(j)).*s(j);
0025     end;
0026 Q=mie(m,x);
0027 Qext=Q(1); Qsca=Q(2); asy=Q(5); w=Qsca/Qext;
0028 AA=dteta*A./Qsca/x.^2;
0029 
0030 L=[];
0031 for jj=1:nj,
0032     x0=legendre(jj-1,u);
0033     x=x0(1,:);
0034     L=[L,x'];    % Legendre Polynom(teta), Order jj-1 in Column jj
0035     gj(jj)=x*AA'; % gj are the coefficients gl in Mead-Weav
0036     gj2(jj)=gj(jj)*(2*jj-1);
0037 end;
0038 for j1=1:nsteps,
0039     for j2=1:nsteps,
0040         ab(j1,j2)=gj2.*L(j1,:)*L(j2,:)';
0041     end;
0042 end;
0043 %test:
0044 ptest=dteta*s*ab(:,1)
0045 % ab is the matrix of (symmetrical) p(mu0,mus) values
0046 result.teta=teta;
0047 result.ab=ab;

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005