We present a new numerical code, Mexican MAX-DOAS Fit (MMF), developed to retrieve profiles of different trace gases from the network of MAX-DOAS instruments operated in Mexico City. MMF uses differential slant column densities (dSCDs) retrieved with the QDOAS (Danckaert et al., 2013) software. The retrieval is comprised of two steps, an aerosol retrieval and a trace gas retrieval that uses the retrieved aerosol profile in the forward model for the trace gas. For forward model simulations, VLIDORT is used (e.g., Spurr et al., 2001; Spurr, 2006, 2013). Both steps use constrained least-square fitting, but the aerosol retrieval uses Tikhonov regularization and the trace gas retrieval optimal estimation. Aerosol optical depth and scattering properties from the AERONET database, averaged ceilometer data, WRF-Chem model data, and temperature and pressure sounding data are used for different steps in the retrieval chain.
The MMF code was applied to retrieve NO2 profiles with 2 degrees of freedom (DOF = 2) from spectra of the MAX-DOAS instrument located at the Universidad Nacional Autónoma de México (UNAM) campus. We describe the full error analysis of the retrievals and include a sensitivity exercise to quantify the contribution of the uncertainties in the aerosol extinction profiles to the total error. A data set comprised of measurements from January 2015 to July 2016 was processed and the results compared to independent surface measurements. We concentrate on the analysis of four single days and additionally present diurnal and annual variabilities from averaging the 1.5 years of data. The total error, depending on the exact counting, is 14 %–20 % and this work provides new and relevant information about NO2 in the boundary layer of Mexico City.