Home > atmlab > mie > cloudphasefunbeta0.m

cloudphasefunbeta0

PURPOSE ^

"beta0" of phase function in Mie Theory (s. Eq. 9 of

SYNOPSIS ^

function result = cloudphasefunbeta0(lamda, rc, teta0, factor);

DESCRIPTION ^

 "beta0" of phase function in Mie Theory (s. Eq. 9 of
 Meador and Weaver, 1980 J. Atm. Sci. 37, pp. 630-643)
 for a cloud with a mod'gamma-size distribution, with
 mode radius rc, wavelength lamda, both in micron, 
 beta0 is a function of incidence angle teta;
 the whole function is computed, and for a given
 value of teta0, the function value is given as beta00
 C. M�zler, July 2003

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

cloudphasefunbeta0.m

SOURCE CODE ^

0001 function result = cloudphasefunbeta0(lamda, rc, teta0, factor);
0002 
0003 % "beta0" of phase function in Mie Theory (s. Eq. 9 of
0004 % Meador and Weaver, 1980 J. Atm. Sci. 37, pp. 630-643)
0005 % for a cloud with a mod'gamma-size distribution, with
0006 % mode radius rc, wavelength lamda, both in micron,
0007 % beta0 is a function of incidence angle teta;
0008 % the whole function is computed, and for a given
0009 % value of teta0, the function value is given as beta00
0010 % C. M�zler, July 2003
0011 
0012 dn0=0.7;    % Teta-Versatz der St�zwerte: 0 bis < 1
0013 xc=2*pi*rc/lamda;
0014 nj=ceil((xc+1.5)*2.3);
0015 nsteps=factor*nj;
0016 n2=2*nsteps;
0017 dteta=pi/n2;
0018 nx=(1:n2);
0019 teta=(nx-dn0)*dteta;
0020 u=cos(teta); s=sin(teta);
0021 AA=[];
0022 for j=1:n2,
0023     ct=u(j); st=s(j);
0024     cc=cloud_phasefunction(lamda, rc, ct, 5);
0025     AA=[AA;0.5*dteta*cc(1)*st];
0026 end;
0027 L=[];
0028 for jj=1:nj,
0029     x0=legendre(jj-1,u);
0030     x01=x0(1,:);
0031     L=[L,x01'];    % Legendre Polynom(teta), Order jj-1 in Column jj
0032     gj(jj)=x01*AA; % gj are the coefficients gl in Mead-Weav
0033     gj2(jj)=gj(jj)*(2*jj-1);
0034 end;
0035 for j1=1:n2,
0036     for j2=1:n2,
0037         ab(j1,j2)=gj2.*L(j1,:)*L(j2,:)';
0038     end;
0039 end;
0040 ptest=dteta*s*ab(:,1)   % ptest should be 2
0041 nx2=(1:nsteps);
0042 teta2=teta(1:nsteps);
0043 s2=s(1:nsteps);
0044 c2=cos(teta2);
0045 L2=L(1:nsteps,:);
0046 Q=0.5*dteta*s2*L2;
0047 for j=1:nsteps,
0048     beta0(j)=1-gj2.*L(j,:)*Q';  % beta0(teta0), MeadWeav 1980, Eq. 9
0049 end;
0050 % treatment of boundary values at teta=0 and teta=pi/2:
0051 teta2=[teta2,pi/2]; beta0=[beta0,0.5]; c2=[c2,0]; s2=[s2,1];
0052 nsteps=nsteps+1;
0053 plot(c2,beta0,'k-'), xlabel('mu0'),ylabel('beta0'),
0054 title(sprintf('lamda=%g micron, rc=%g micron',lamda,rc));
0055 % interpolation to find value beta00=beta0(teta0):
0056 t2=min(find(teta2>teta0));
0057 t1=max(find(teta2<=teta0));
0058 if t2==1,
0059     beta00=beta0(1);
0060 elseif t1==nsteps,
0061     beta00=0.5;
0062 elseif t1==nsteps-1,
0063     dt=teta0-pi/2;
0064     beta01=beta0(nsteps-1);
0065     beta02=0.5; dteta=pi/2-teta2(nsteps);
0066     beta00=beta02+dt*(beta02-beta01)/(pi/2-teta2(nsteps-1));
0067 else,
0068     dt=teta0-teta2(t1);
0069     beta01=beta0(t1);
0070     beta02=beta0(t2);
0071     beta00=beta01+dt*(beta02-beta01)/dteta;
0072 end;
0073 result.beta0=beta00;
0074 result.mu0=c2;
0075 result.beta0fun=beta0;

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