teaching:radiative_transfer:mie_reff_dep_ice

Optical properties of ice for various effective radii

  • Perform Mie calculations for wavelengths from 100 to 10000 nm for the gamma distributions with effective radii from 1 to 20. Plot the real and the imaginary part of the refractive index, the extinction coefficient, the asymmetry parameter, and the single scattering albedo. Use the refractive index of ice.

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 (please see the libRadtran user manual for detailed description of the options:

mie.inp
mie_program MIEV0     # use Mie program MIEV0 by Wiscombe
refrac ice            # use refractive index of water
r_eff SSS             # Specify effective radius 
wavelength  wvl.dat   # File including wavelengths to be calculated
distribution GAMMA 7  # Specify gamma distribution with veff=1/(GAMMA+3)

A file including the wavelengths for the calculations: wvl.dat

The mie tool is executed as follows:

 mie < mie.inp > mie.out

Describe the results!

Shell script:

mie.sh
libradtran_path='/local/libRadtran-1.5-beta/bin'
 
for var in 1 5 10 15 20 ; do
 sed 's/SSS/'$var'/' mie.inp > mie$var.inp
 $libradtran_path/mie < mie$var.inp > tmp_mie/mie$var.out
done

Python script:

mie.py
from pylab import *
 
i=5
l=4
mie_r1=loadtxt('/home/users/lainer/Strahlung/Mie/tmp_mie/mie1.out')
semilogx(mie_r1[:,0], mie_r1[:,i], label='reff=1nm') # change 1 to desired variable
 
 
title('Ice particles - variation of asymmetry parameter g')
xlabel('wavelength [nm]')
ylabel('g')
legend(loc=l)
 
 
mie_r5=loadtxt('/home/users/lainer/Strahlung/Mie/tmp_mie/mie5.out')
semilogx(mie_r5[:,0], mie_r5[:,i], label='reff=5nm') # change 1 to desired variable
#ylim(0,1.1)
legend(loc=l)
 
 
mie_r10=loadtxt('/home/users/lainer/Strahlung/Mie/tmp_mie/mie10.out')
semilogx(mie_r10[:,0], mie_r10[:,i], label='reff=10nm') # change 1 to desired variable
legend(loc=l)
 
 
 
mie_r15=loadtxt('/home/users/lainer/Strahlung/Mie/tmp_mie/mie15.out')
semilogx(mie_r15[:,0], mie_r15[:,i], label='reff=15nm') # change 1 to desired variable
legend(loc=l)
 
 
 
mie_r20=loadtxt('/home/users/lainer/Strahlung/Mie/tmp_mie/mie20.out')
semilogx(mie_r20[:,0], mie_r20[:,i], label='reff=20nm') # change 1 to desired variable
legend(loc=l)
 
 
savefig('mie_ssa.png')
"mie.py" 41L, 1031C

teaching/radiative_transfer/mie_reff_dep_ice.txt · Last modified: 2018/05/04 08:40 (external edit)