%Computing hydrometeor fallspeeds
Z = 10.^(dbz/10);            %mm^6/m^3

rhos = 1.275;               %kg/m^3 (Wallace and Hobbs, 1977)
H = 6.90;                   %km, scale height (Wallace and Hobbs, 1977)

rho = rhos.*exp(-1*zc1/H);

density = (rhos./rho).^0.45; %dimensionless
density = repmat(density,size(Z,1),1);

u = -1.5;
No = 100;
in = 7 + u;
denom = No*10^6*gamma(in);


%Fallspeed for rain based on Ulbrich and Chilson (1994), m/s
vr = (9.65 - 10.3*(1 + 6*(Z/denom).^(1/in)).^(-1*in)).*(density);

