Refractive index inversion using analytic models of the atmosphere