# Retrieval Overview¶

The basic idea behind retrievals is pretty simple and relies on the following:

1. We have an instrument that took a measurement, y, with the atmosphere in an unknown state.
2. We can simulate the measurement, this is called F, and if the assumed atmospheric state is the same as the true state y and F will also be equal.
3. If y and F don’t agree our atmospheric state was assumed incorrectly and needs to be updated.

y and F are are not required to be radiances. Instead y and F are typically combinations of measurements at different altitudes or wavelengths to minimize the dependence on properties of the atmospheric state that are unknown. The measurements themselves are also not required to be radiance, and may be integrated quanties, or radiances transformed by an instrument in some other fashion.

The idea behind the retrieval software is then to simulate measurements and update the atmospheric state until y is as close to F as possible. In order to do this, we need four things:

meas_inst
This is a class capable of providing the information required to calculate y. It can either be a simulated instrument or a container for data for a real instrument
ret_inst
This class provides the information to calculate F. Typically ret_inst will support calculate_radiance() which uses a radiative transfer model to get the information required for F
species

species is a class capable of taking in an instrument (either meas_inst, or ret_inst) and converting the raw data (usually radiance) to a measurement vector. The species and instrument type are loosly coupled together, for example, the H2OShow species is unlikely to be compatible with the OSIRIS instrument. However, it is possible to write species which are compatible with more than one instrument.

When the retrieval starts, species.configure_instrument_and_method() is called, which gives the species a chance to configure the instruments and method for the specific retrieval task at hand.

The species is also responsible for updating the atmosphere, typically through an update_profile() call

method

The iteration method used to push the solution in a good direction. Typically the general algorithm is as follows

• call ret_inst.calculate_radiance() to prepare the instrument
• call species.measurement_vector() to get F
• Compare F and y to figure how much to update the profile by (This is usually where the key differences between methods are)
• Tell the species how much to change the profile
• Repeat

The method is very loosely coupled to the species. Methods like Levenberg-Marquardt require that the Jacobian of the measurement vector be calculated, and the species will need to be capable of that for Levenberg-Marquardt to work. However, usually the same method can be reused for many species.

The techniques these four objects use to accomplish their tasks has been abstracted out of the retrieval, this is to ensure that this class will be compatible for essentially any limb retrieval.

The current way that all retrievals are done is with the help of two classes,

A wrapper to a radiative transfer model. Basically the radiative transfer wrapper just has add_line_of_sight() and calculate_radiance(). ret_inst holds a copy of this class and uses it to calculate radiances required
A wrapper class for specifying the atmosphere. For SASKTRAN radiative transfer models this is typically just a list of climatologies, opticalproperties, and guids. Usually this class has a function add_to_engine() which adds the current atmosphere to the radiative transfer model. Copies of this class are held in the radtran class, and also the species class, which uses it to update the atmosphere.
Where the retrieval method, for example levenberg-marquardt, is used to compare y and F to generate the step size, $$\delta$$. The retrieval species uses $$\delta$$ to update the species profile. This allows the species to use internal parameters such as limiting the altitude range of the retrieval, and what to do above/below the retrieval limits. The updated profile is then passed to the atmosphere.