=====Scattering phase function as function of particle size (water cloud)===== Perform Mie calculations at one wavelength (e.g. 550 nm) for gamma distributions with effective radii in the range from 1 to 20 µu. Use the option 'pmom' to output the Legendre polynomials of the phase function. Use the tool 'phase' to calculate the phase function. Finally plot the phase functions for the various particle sizes and describe the results! Important: Please change in mie.c line 674 to radmax = 5.00 * input.r_eff_max; and line 684 to dx=0.03; and recompile in order to speed up the calculations! Here is an input file for a Mie calculation including a size distribution which gives the Legendre polynomials as output (please see the libRadtran user manual for detailed description of the options): mie_program MIEV0 # use Mie program MIEV0 by Wiscombe refrac water # use refractive index of water r_eff 10 # Specify effective radius wavelength 550 550 # Specify wavelength nmom 1000 # Number of Legendre polynomials to be calculated distribution GAMMA 7 # Specify gamma distribution with veff=1/(GAMMA+3) output_user pmom # Output Legendre polynomials The mie tool is executed as follows: mie < mie.inp > mie.out In order to calculate the phase function of the Legendre polynomials use phase -c -d -s 0.1 mie.out > phase.dat To get help try phase -h ===== Solution (Benjamin, Daniel, Florian) ===== We want to investigate the mie scattering of water droplets with the libradtran tool //mie//.\\ For that the phase function is expanded into a series of Legendre polynomials which is for practical purposes truncated after a defined number of polynomials. The output of //mie// depends on wavelength (here 550nm) and the droplet size spectrum (gamma distribution, effective radius) as the scattering does. The input values are defined in the //mie.inp// file. We use the output of //mie// (the Legendre polynomials) to calculate the scattering phase function with the libradtran tool "phase" for each effective radius value (ranging from 1 to 20 µm). We replaced the effective radius in the input file by the variable "reff" and used a shell script to call the different libradtran tools as well as a python plotting routine. # shell skript for reff in 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0 20.0 ##ersetze Reff do sed 's/REFF/'$reff'/g' < mie.inp > tmp/mie$reff.inp ##rufe mie auf ./mie < tmp/mie$reff.inp > tmp/mie$reff.out ## rufe phase auf ./phase -c -d -s 0.1 tmp/mie$reff.out > tmp/phase$reff.dat ### plotte python phase_all.py done from pylab import * from matplotlib import pyplot # save or show? ### dont use show if run by shell-script!!! save=1 # to show set 0, to save set 1 img_filename='phase_all.png' for reff in range(1,20): filename='tmp/phase'+str(reff)+'.0.dat' print 'plot ...' data=loadtxt(filename) mu=data[:,0] phasefct=data[:,1] pyplot.semilogy(mu,phasefct,label=reff) #pyplot.title('g='+str(g)+' # moments='+str(nrofmoments)) pyplot.xlabel('theta') pyplot.ylabel('phasefunction') if save==0: pyplot.legend() pyplot.show() if save==1: print 'save plot ...' pyplot.savefig(img_filename) exit() The results are shown in the following plot (y-axises are logarithmic): {{:teaching:radiative_transfer:phase1.0.png|}} reff=1µm {{:teaching:radiative_transfer:phase10.0.png|}} reff=10µm {{:teaching:radiative_transfer:phase20.0.png|}} reff=20µm {{:teaching:radiative_transfer:phase_all.png|}} reff from 1 - 20µm As you can see, the curves show more peaks when the effective radius gets bigger. You can see backward and forward scattering, but the forward scattering dominates. In general a low number of photons is scattered to the sides. This minimum can be seen more clearly with increasing effective radius. At approximately 140° the rainbow is clearly visible especially for larger water droplets. At 125° another - but smaller - peak occurs with increasing droplet size.