Automatic Lidar and Ceilometer


Lidar simulator


The ALCF uses a modified version of COSPv1 for lidar simulation, which can be found at The ACTSIM lidar simulator included in COSP has been modified to account for the different viewing geometry and wavelength of a ground-based lidar.

If you want to add support for another lidar in the ALCF, you might have to calculate Mie scattering parameters for the lidar wavelength, if it is different from ones already implemented (532, 910, 1064 nm). The code for calculating the parameters is located in Below is documentation on how to use this code.

Mie scattering code

The mie_scattering directory in the ALCF contains code for calculation of Mie scattering parameters required by the COSP/ACTSIM lidar simulator. The code requires Python 3 and GNU Fortran (gfortran) for running. The code is independent from the rest of the ALCF.


The code uses the Mie scattering code MIEV by Dr. Warren J. Wiscombe to calculate extinction efficiency, scattering efficiency and the scattering phase function at 180 degrees as function of particule radius. The output of MIEV is then used as input in calc_k, which calculates the backscatter-to-extinction ratio k (the inverse of the lidar ratio) by integrating over a range of radii, assuming a certain theoretical distribution of particle radii. The calculated backscatter-to-extinction ratio is used as a lookup table in the COSP/ACTSIM lidar simulator code (actsim/mie_backscatter_*.F90 files included from actsim/lidar_simulator.F90). The lidar ratio can be plotted by plot_lr.

The code should be used in the following order:

The variable k in the NetCDF file produced by calc_k should be the content of the lookup table actsim/mie_backscatter_*.F90, and the lookup table should be included from actsim/lidar_simulator.F90.


miev contains the MIEV Mie scattering code by Dr. Warren J. Wiscombe (see miev/MIEV.doc for documentation). We use MIEV to calculate the extinction efficiency, scattering efficiency and the scattering phase function at 180 degrees for a range of spherical particle radii. main.f90 contains code to calculate and print these parameters.

Build (requires gfortran):

cd miev


./miev <wavelength_nm>


The output contains a line with metadata:

followed by a header line (r qext qsca p180), followed by lines containing four space separated columns:

The particle radii range from 0.1 μm to 100 μm by 0.1 μm, and radii identified as “spikes” by MIEV are ignored (not printed).


miev/miev 532 > out/miev_532
miev/miev 910 > out/miev_910
miev/miev 1064 > out/miev_1064


Plot theoretical particle size distribution (log-normal or Gamma).

Usage: bin/plot_size_dist { <type> <reff> <sigmaeff> }... <output> [num: <num>]




bin/plot_size_dist { lognorm 20 10 } { lognorm 20 5 } { lognorm 10 5 } plot/size_dist_lognorm.pdf
bin/plot_size_dist { gamma 20 10 } { gamma 20 5 } { gamma 10 5 } plot/size_dist_gamma.pdf


Calculate the backscatter-to-extinction ratio k (inverse of the lidar ratio) by integrating Mie scattering parameters over a range of particle radii.

Usage: bin/calc_k <input> <type> <output> [sigmaeff_ratio: <sigmaeff_ratio>]



bin/calc_k out/miev_532 lognorm out/
bin/calc_k out/miev_910 lognorm out/
bin/calc_k out/miev_1064 lognorm out/
bin/calc_k out/miev_532 gamma out/
bin/calc_k out/miev_910 gamma out/
bin/calc_k out/miev_1064 gamma out/


Calculate the backscatter-to-extinction ratio k based on the original COSP polynnomials (Chepfer et al., 2007; Fig. 9).

Usage: bin/orig_cosp_poly <type> <output>




bin/orig_cosp_poly liq out/
bin/orig_cosp_poly ice out/
bin/orig_cosp_poly ice_ns out/

The original COSP polynomials are (polpart in actsim/lidar_simulator.F90):

where x is the effective radius.


Plot lidar ratio calculated by calc_k.

Usage: bin/plot_lr <input>... <output> [xlim: { <xmin> <xmax> }] [ylim: { <ymin> <ymax> }]



bin/plot_lr out/k_*.nc plot/lr.pdf

Figure 1 shows the result of plot_lr for k calculated by calc_k and orig_cosp_poly.

Plot of lidar ratio as a function of the effective radius
Figure 1: Lidar ratio as a function of the effective radius.