Inversion of tropospheric proﬁles of aerosol extinction and HCHO and NO 2 mixing ratios from MAX-DOAS observations in Milano during the summer of 2003 and comparison with independent data sets

. We present aerosol and trace gas proﬁles derived from MAX-DOAS observations. Our inversion scheme is based on simple proﬁle parameterisations used as input for an atmospheric radiative transfer model (forward model). From a least squares ﬁt of the forward model to the MAXDOAS measurements, two proﬁle parameters are retrieved including integrated quantities (aerosol optical depth or trace gas vertical column density), and parameters describing the NO 2 mixing ratios are only slightly affected. These ﬁndings are in basic agreement with radiative transfer simulations.

The MAX-DOAS inversion results are compared to independent measurements: (1) aerosol optical depth measured at an AERONET station at Ispra; (2) near-surface NO 2 and HCHO (formaldehyde) mixing ratios measured by long path DOAS and Hantzsch instruments at Bresso; (3) vertical profiles of HCHO and aerosols measured by an ultra light aircraft. Depending on the viewing direction, the aerosol optical depths from MAX-DOAS are either smaller or larger than those from AERONET observations. Similar comparison results are found for the MAX-DOAS NO 2 mixing ratios versus long path DOAS measurements. In contrast, the MAX-DOAS HCHO mixing ratios are generally higher than those from long path DOAS or Hantzsch instruments. The comparison of the HCHO and aerosol profiles from the aircraft showed reasonable agreement with the respective MAX-DOAS layer heights. From the comparison of the results for the different telescopes, it was possible to investigate the internal consistency of the MAX-DOAS observations.
As part of our study, a cloud classification algorithm was developed (based on the MAX-DOAS zenith viewing directions), and the effects of clouds on the profile inversion were investigated. Different effects of clouds on aerosols and trace gas retrievals were found: while the aerosol optical depth is systematically underestimated and the HCHO mixing ratio is systematically overestimated under cloudy conditions, the 1 Introduction MAX-DOAS instruments measure scattered sun light from different, mostly slant elevation angles, thus having a high sensitivity to trace gases and aerosols located close to the Earth's surface (e.g. Hönninger et al., 2002;Van Roozendael et al., 2003;Wittrock et al., 2004;Wagner et al., 2004;Brinksma et al., 2008 and references therein). In addition to the retrieval of trace gas mixing ratios or aerosol extinction close to the surface, information on vertical profiles and vertically integrated quantities (vertical trace gas column density (VCD) or aerosol optical depth (AOD)) can be retrieved.
In recent years, several algorithms for the quantitative retrieval of trace gas and aerosol properties from MAX-DOAS observations have been developed and applied by different research groups (e.g. Heckel et al., 2005;Irie et al., 2008;Clémer et al., 2010;Li et al., 2010), and also some comparison studies with independent data sets have been performed (Heckel et al., 2005;Irie et al., 2008;Li et al., 2010;Zieger et al., 2011). Currently, the development and application of profile retrieval algorithms for MAX-DOAS observations is a very active field of research; recently a comprehensive measurement campaign with contributions from many research groups was conducted in Cabauw, The Netherlands (Cabauw Intercomparison campaign of Nitrogen Dioxide measuring Instruments (CINDI), http://www.knmi.nl/samenw/cindi/) (see Roscoe et al., 2010 and references therein). Usually MAX-DOAS inversion algorithms use a two-step approach: in the first step, aerosol extinction profiles are retrieved from the measured absorption of the oxygen dimer O 4 (e.g. Heckel et al., 2005;Sinreich et al., 2005;Li et al., 2010;Clémer et al., 2010). In a second step, trace gas profiles are retrieved from the measured trace gas absorptions, taking into account the aerosol properties retrieved in the first step.
The information content of MAX-DOAS observations in the UV is typically limited to 2-3 independent pieces of information for the retrieved vertical profiles (see Frieß et al., 2006;Clémer et al., 2010). Thus, most inversion algorithms are based on the optimal estimation method making explicit use of a-priori profiles and associated uncertainties (Rodgers, 2000). In this study we apply a MAX-DOAS inversion algorithm for trace gases and aerosols, which uses a different strategy and does not include explicit a-priori profile information and associated uncertainties, but instead assumptions on the relative profile shapes only. This method was recently introduced by Li et al. (2010); here we apply a slightly modified version. It should be noted that both retrieval methods (optimal estimation and the parameterisation approach) have their advantages and disadvantages, and that the importance of these advantages and disadvantages is seen differently by different research groups. In our opinion, a main disadvantage of our approach is that it can not retrieve "complex" profile shapes like e.g. two layer profiles. One of the main advantages is that it is a very stable and robust method (see below).
Our forward model uses a simple profile parameterisation scheme with only three parameters (for details see Sect. 3.1), which is used as input for a radiative transfer model. The actual profile inversion process consists of a least squares fit of the forward model results to the results of the MAX-DOAS measurement. The fit yields the profile parameters (and associated uncertainties), which fit best to the measurements.
One general problem with all inversion algorithms for MAX-DOAS observations is the difficulty to accurately determine the errors of the profile inversion results. This difficulty is caused by several reasons. First, the information content of the measurement is limited and thus only averaged quantities (e.g. the average trace gas concentration for a specified layer) can be retrieved. Second, ambiguities arise because in principle quite different atmospheric profiles could cause similar MAX-DOAS results. Third, especially for the trace gas profile inversion, the retrieval process is complex: the trace gas results do not only depend on the measured trace gas absorptions, but also on the results of the aerosol profile inversion (first step of the profile inversion). Fourth, simplified assumptions are used in the forward model, e.g. horizontal homogenous distributions. However, in reality horizontal gradients and transport of air masses might exist, which affect the MAX-DOAS retrievals. Fifth, the measurements can be affected by systematic errors (e.g. wrong trace gas absorption cross sections, wrong aerosol optical properties, wrong adjustments of the telescopes, or the presence of clouds). Due to all of these reasons, deriving a reliable error estimation from the MAX-DOAS inversion process is difficult. Here it should be noted that this is also true for retrievals using optimal estimation. One important way to quantify the errors is thus validation by the results of independent measurements.
In this study we apply our profile inversion algorithm to MAX-DOAS observations during the FORMAT-II campaign in Milano (Italy) in late summer 2003 (for details see Sect. 2). Note that an initial study on MAX-DOAS retrievals for a limited period was already conducted by Heckel et al. (2005) and Wittrock (2006). Measurements during the FORMAT-II campaign are well suited to assess the accuracy of the profile retrieval, because several independent measurements are available for comparison: HCHO and NO 2 mixing ratios were measured by a long path (LP-) DOAS instrument (see Sect. 2.1); HCHO was also measured by a Hantzsch instrument at ground. Vertical profiles of HCHO and aerosol concentrations are available from observations from an ultra light aircraft (see Sect. 2.2). AOD was measured by a sun photometer at the AERONET station at Ispra (http://aeronet.gsfc.nasa.gov/new web/index.html, also see Holben et al., 2001).
Another advantage of the MAX-DOAS instrument used in this study is that simultaneous measurements are performed from three different azimuth directions. From the comparison of the respective results, information on the consistency of our inversion algorithm can be obtained.
In this study we also investigated the effects of clouds on the MAX-DOAS observations. We developed a cloud discrimination scheme, which is based on the O 4 absorptions and radiances observed from the zenith. By this scheme three types of measurement conditions can be discriminated: clear sky conditions, "thin" clouds, and "thick" clouds. Based on this scheme, the MAX-DOAS observations during the FORMAT-II campaign are classified, and the effects of clouds on the MAX-DOAS observations are investigated. Cloud effects are also simulated by radiative transfer modeling.
The paper is organised as follows with in Sect. 2 an overview of the measurement campaign. In Sect. 3 the MAX-DOAS inversion algorithm is described. Section 4 discusses the basic effects of clouds on MAX-DOAS observations and introduces the cloud discrimination scheme. Section 5 presents selected retrieval results and a systematic comparison to independent measurements. In Sect. 6 the main findings are summarised.

FORMAT-II campaign
We investigate MAX-DOAS observations performed in September 2003 during the FORMAT-II campaign ("Formaldehyde as a tracer for oxidation in the troposphere", see www.nilu.no/format/). The FORMAT project focused on measuring, modelling and interpreting HCHO in the heavily polluted region of the Po-Valley in Northern Italy (see e.g. Hak, 2006;Liu et al., 2007;Junkermann, 2009). During the campaign various in-situ and remote sensing measurements were performed at different groundbased stations in the region of Milano and from different aircraft-based instruments. The MAX-DOAS measurements used in this study were made at Bresso (45.5 • N,9.2 • E, located in the northern part of Milano, Italy) from 4 to 26 September 2003. The results of the MAX-DOAS measurements are compared to the results from two other instruments also located at Bresso: NO 2 and HCHO mixing ratios from a long path DOAS (LP-DOAS) instrument (Hak, 2006) and HCHO mixing ratios from a Hantzsch instrument (Junkermann, 2009). The locations and viewing directions of these instruments, along with the MAX-DOAS, are shown in Fig. 1; the instrumental details are described in the following sections. The MAX-DOAS results are also compared to HCHO and aerosol profiles from an ultra light aircraft and to total aerosol optical depth observations from the AERONET station at Ispra (45.8 • N,8.6 • E), about 50 km north-west of Bresso (http://aeronet.gsfc.nasa.gov/new web/index.html, also see Holben et al., 2001). During the FORMAT-II campaign, three periods with different weather conditions can be distinguished: before 15 September and after 22 September, variable conditions prevailed, while between 15 and 22 September a period with stable conditions, clear skies, and relatively high temperature occurred (Steinbacher et al., 2005a;Hak, 2006;Junkermann, 2009).

Long Path DOAS
With the active Long Path DOAS (LP DOAS) instrument, trace gases present along a defined absorption path can be measured. The LP DOAS applies a 500 W Xenon highpressure lamp as artificial broad-band light source. Absolute concentrations can be determined from the measured column densities by knowing the length of the absorption path between the sending and receiving telescope (see Platt and Stutz, 2008) and an array of retro reflectors.
During the FORMAT-II campaign, long path DOAS systems of different types were applied at three different sites Hak, 2006). At Bresso, an instrument capable of simultaneously transmitting and receiving multiple light beams was used (see Pundt and Mettendorf, 2005 for details). The data used here was obtained from a light beam directed to a church 1330 m north of the measuring site. The measurements cover the wavelength range 283-372 nm. The spectra integration time was typically between 40 and 100 s. The absorption spectra were evaluated in the range 300-360 nm, applying the DOAS method (Platt and Stutz, 2008). The accuracy of a DOAS measurement is influenced mostly by the accuracy of the used reference cross-section of the investigated species, i.e. ∼6 % for HCHO and ∼4 % for NO 2 . For the LP DOAS measurements, the detection limits for HCHO and NO 2 during the FORMAT-II period were 0.9 ppbv and 0.6 ppbv, respectively.

Hantzsch
The Hantzsch technique is based on a sensitive liquid phase detection following a continuous transfer of HCHO from ambient air into a washing solution in a temperature controlled stripping coil. A reaction with 2,4-pentanedione (i.e. acetylacetone) in ammonium acetate buffer solution forms 3,5-diacetyl 1,4-dihydrolutidine (DDL), which can be detected with high sensitivity by fluorescence (Kelly and Fortune, 1994). The technique is the basis for a commercial instrument: AL4001 (AERO-LASER GmbH, Garmisch-Partenkirchen, Germany) having a detection limit of <50 ppt and a time resolution of 90 s. The accuracy and precision are indicated as ±15 % or 150 pptv and ±10 % or 150 pptv, respectively . These instruments were used for ground-based measurements at three field sites during FORMAT-II. Additionally an upgraded lightweight version of the instrument (Junkermann and Burger, 2006) was flown several days on an ultra light research aircraft to measure the horizontal distribution of formaldehyde in the greater Milano area and its vertical profiles north of Milano up to ∼3000 m a.s.l. The instrument on the ultralight aircraft is an upgraded system with a new small size fluorimeter with better temperature stabilization than the commercial instruments used at the ground. The better temperature stabilization results in both, improved precision and accuracy. For this instrument the accuracy is 10 % or 100 ppt (Junkermann and Burger, 2006). Besides HCHO, also profiles of the aerosol concentration were measured (Junkermann, 2009).

MAX-DOAS instrument and spectral retrieval
The MAX-DOAS instrument observes scattered sun light from three telescopes, which are connected via glass fibre bundles to a spectrograph with a two dimensional CCDdetector (see Wagner et al., 2004Wagner et al., , 2009. Before 12 September 2003 all telescopes were directed towards the south (azimuth angle of 185 • with respect to north, see Fig. 1). After 12 September 2003, one telescope continued measurements in southerly direction, but the others were now directed to north and west (azimuth angles of 5 • and 250 • with respect to north, respectively). During the whole campaign, each telescope sequentially scanned 5 different elevation angles: 3 • , 6 • , 10 • , 18 • and 90 • (zenith); a single measurement took about 90 s (a full sequence including motor movements thus taking about 10 min). The measurements cover the wavelength range 320-457 nm with a spectral resolution of about 0.75 nm (FWHM).
The MAX-DOAS spectra were analysed using the DOAS method (Platt and Stutz, 2008), details can be found in Wagner et al. (2004Wagner et al. ( , 2009. From the spectral analysis the integrated trace gas concentration along the atmospheric absorption path, the so called slant column density (SCD) is retrieved. In this study we analyse the DSCDs of NO 2 , HCHO and the oxygen dimer O 4 . To remove the strong Fraunhofer lines dominating the measured spectra, another spectrum is also included in the spectral analysis (usually referred to as Fraunhofer reference spectrum). Thus, the result of the DOAS analysis represents the difference of the SCDs of the measured spectra and the Fraunhofer reference spectrum, often referred to as differential SCD or DSCD. There exist two basic choices of Fraunhofer reference spectra: often a fixed Fraunhofer reference spectrum is used to analyse all measured spectra during a selected period (e.g. a complete measurement campaign). If a fixed reference spectrum is used, the retrieved DSCDs not only represent the effects of the different viewing angles, but also the variations of the atmospheric trace gas concentrations and the solar zenith angle between the time of the measured spectra and the Fraunhofer reference spectrum. Another choice would be to use the respective 90 • elevation spectra for individual elevation sequences to analyse the spectra of the same elevation sequence. For this choice the retrieved DSCD simply represents the effects of the different viewing geometry and are referred as dSCD α (with α the elevation angle) in the following (while DSCD is used in a general sense). dSCD α can be directly used for the profile inversion.
In this study we use a fixed Fraunhofer reference spectrum (one for each telescope) for the complete campaign. Thus before the DSCDs of an elevation sequence are used for the profile inversion, the DSCD for the 90 • measurements of the same elevation sequence is subtracted to derive the respective dSCD α (see Sects. 3.4 and 3.5).
The Fraunhofer reference spectrum in this study was recorded at noon on 14 September 2003. On this day, clouds were absent and the aerosol load was small (AOD: 0.14 at the AERONET station at Ispra).
From the retrieved O 4 DSCDs (in contrast to NO 2 and HCHO) so called air mass factors (AMFs) can be directly calculated. The AMF is defined as the ratio of the SCD and the vertically integrated trace gas concentration (VCD) (see e.g. Solomon et al., 1987): Since the atmospheric O 2 profile is known (it varies slightly with temperature and pressure), the O 4 VCD can be calculated from atmospheric temperature and pressure profiles (see e.g. Greenblatt et al., 1990). For the O 4 VCD at Bresso in this study a value of 1.3 × 10 43 molec 2 cm −5 was used for the conversion of the O 4 SCDs into O 4 AMFs (see Wagner et al., 2009). The influence of changing air pressure on the O 4 VCD is below 2 % and can be neglected. Also the effect of changing temperature is expected to be negligible, but more difficult to be quantified, because of the rather large uncertainty of the temperature dependence of the O 4 cross section (see e.g. Wagner et al., 2002). The advantage of the conversion O 4 SCDs into O 4 AMFs is that the measured O 4 AMF can be directly compared to the output of the radiative transfer simulations (see Sect. 3.2).
Similar to the definitions of the DSCD and dSCD α , also a differential AMF (DAMF or dAMF α ) can be defined: (2) dAMF α derived in this way are used for the profile inversion (see Sect. 3.4). Note that the retrieved O 4 AMFs (or DAMF or dAMF α ) were corrected by a constant factor of 0.79. This correction was found to be necessary to bring our model results and measurements under almost aerosol and cloud free conditions into agreement (see Wagner et al., 2009;. The reason for this correction factor is still not understood. In contrast to O 4 , the atmospheric profiles of NO 2 and HCHO are highly variable, and the respective VCDs are not known beforehand. Thus no DAMF (or dAMF α ) can be directly calculated from the DSCDs (or dSCD α ). As will be shown in Sect. 3.5, the VCDs of NO 2 and HCHO are obtained from the profile inversion process.
For the interpretation of the profiles retrieved from the MAX-DOAS observations it is important to know the horizontal range, for which the MAX-DOAS observations are sensitive: the larger the sensitivity range is the higher is the probability that horizontal gradients affect the profile inversion. The measurement sensitivity to aerosols and trace gases depends on the distance from the instrument location, varies with several parameters (e.g. viewing geometry, wavelength, aerosol and trace gas profiles), and is thus difficult to quantify. Also there is a systematic geometric relationship between the probed altitude and distance for each elevation angle: the sensitivity for the lowest atmospheric levels is highest close to the instrument. In the Supplement the horizontal range for which the MAX-DOAS observations are sensitive sensitivity are estimated for various conditions. It typically ranges between a few kilometres and about 20 km. Note that in our inversion algorithm horizontal homogenous conditions are assumed.

MAX-DOAS inversion algorithm
The inversion scheme used in this study follows a two-step approach as suggested by Sinreich et al. (2005) or Heckel et al. (2005). First an aerosol extinction profile is determined using the O 4 dAMF α analysed from the MAX-DOAS observations. In a second step, profiles of trace gas concentrations are determined from the respective trace gas dSCD α , also taking into account the aerosol extinction profiles determined in the first step. For both steps, similar profile parameterisations and inversion strategies are used, which are described in the following sections. Our profile inversion scheme is a modified version of the algorithm originally introduced by Li et al. (2010). It should be noted that the profile information from our retrieval is limited. Besides the integrated quantities (trace gas vertical column density or aerosol optical depth) usually only a characteristic layer height is derived, and one could speculate whether this information is sufficient to characterise a vertical profile. Nevertheless, in our opinion the retrieval of a layer height from passive remote sensing is a unique and very important information. Thus we will use the term profile for the results of the MAX-DOAS inversions presented in this study.

Profile parameterisation
The trace gas and aerosol profiles used in this study are defined by only three parameters: -VCD or AOD. They describe the vertically integrated profile amounts, i.e. the vertically integrated concentration (VCD, see Eq. 1) for trace gases, or the total aerosol optical depth (AOD) for aerosols.
-Layer height, L. This parameter (sometimes the indexed symbols L aer , L tracegas , L NO 2 , or L HCHO are used) describes the altitude, below which the trace gas concentration or aerosol extinction is assumed to be constant (except for S > 1, see below). The values of the aerosol extinction or trace gas concentration above that layer decrease, depending on the third parameter: -Shape parameter, S. The shape parameter describes the relative shape of the aerosol or trace gas profiles (sometimes the indexed symbols S aer , S tracegas , S NO 2 , or S HCHO are used). For shape parameters S between 0 and 1, the value of S describes the fraction of the trace gas VCD or AOD within the layer (see Li et al., 2010). The remaining fraction is assumed to be located above the layer, where an exponential decrease is assumed (Fig. 2 left). Note that in contrast to Li et al. (2010), who assumed a fixed height parameter for the exponential layer, we use a variable scale height with the boundary condition of a continuous transition of the exponential function at the top of the layer. However, since the sensitivity of MAX-DOAS observations decreases with increasing altitude, these differences have little influence on the profile retrieval. A shape parameter of unity describes a "box" profile with constant trace gas concentration or aerosol extinction within the layer, and zero above (Fig. 2 center).

Elevated layers
To describe another important type of profiles with increased aerosol extinction or trace gas concentrations at higher altitudes (elevated layers), we extended the range of the shape parameter S to values >1. Like for shape parameters S < 1, a general constraint is that for S → 1, the respective profiles have to merge the box profile (S = 1). This condition is necessary to allow a smooth convergence of the fit.  Fig. 2 Parameterisation of (relative) profile shapes used in this study. The layer height parameter L is set to 1km for all profiles. Also the vertically integrated profiles have the same value (1 artificial unit describing either AOD or trace gas VCD). For a shape parameter S = 1, a 'box'-profile is obtained with zero values above L. For S < 1, part of the aerosol or trace gas amount is located at altitudes > L with an exponential decrease; Shape parameters S > 1 describe elevated layers. In this study we investigate two profile parameterisations for elevated layers: linear increasing profiles or profiles with two layers (see text).
38 Fig. 2. Parameterisation of (relative) profile shapes used in this study. The layer height parameter L is set to 1 km for all profiles. Also the vertically integrated profiles have the same value (1 artificial unit describing either AOD or trace gas VCD). For a shape parameter S = 1, a "box"-profile is obtained with zero values above L. For S < 1, part of the aerosol or trace gas amount is located at altitudes > L with an exponential decrease; Shape parameters S > 1 describe elevated layers. In this study we investigate two profile parameterisations for elevated layers: linear increasing profiles or profiles with two layers (see text).
Elevated profiles probably do not occur very frequently, because most sources of aerosols and trace gases are located close to the surface. Nevertheless, elevated profiles can occur, if air masses at different altitudes have different origins (e.g. a residual layers from the previous day). In addition, aerosols or trace gases might be formed from primary pollutants apart from their sources, e.g. in elevated layers by photochemical processes (see e.g. Matsui et al., 2010). In such cases, parameterisations for elevated layers are appropriate to describe the corresponding vertical profiles.
Several parameterisations for profiles with elevated layers are possible. However, one major problem arises from the fact that according to the limited information content of UV measurements, only up to one shape parameter can be independently determined in the fitting procedure (measurements at additional wavelengths can in principle enhance the information content). One consequence of this limitation is that profile parameterisations depending only on one parameter might not be appropriate for different situations. For example, a chosen profile parameterisation might be well suited for specific height profiles, but might fail to describe height profiles for different atmospheric situations. The advantages and disadvantages of different possible parameterisations are briefly described in the following: -Linear profiles. The advantage of a linear parameterisation is that profiles with slightly increasing values with altitude can be well described. Such profiles might occur if aerosols or trace gases are produced while their precursors are transported upwards. An important limitation of this parameterisation is that no steep vertical gradients and no vertically extended uplifted layers can be described (e.g. distinct layers with largely differing average values).
-Exponential profiles. Either "convex" or "concave" altitude profiles can be described by exponential parameterisations. Compared to the linear parameterisations, such parameterisations allow a change of the vertical gradient with altitude; thus e.g. vertically extended uplifted layers could be well described. However, with such parameterisations it is not possible to describe linear profiles at the same time. Exponential profiles have to be optimised for the description of either smooth profiles (quasi linear) or steep vertical gradients (similar to distinct layers). Exponential profiles might thus be interesting if two shape parameters could be independently determined in the fitting process (e.g. for measurements using different wavelengths, see Frieß et al., 2006).
-Two-layer profiles. In many cases, aerosol profiles with two separate layers (both with independent vertical extension and average aerosol extinction or trace gas concentration) might be a good choice. However, since only up to one shape parameter can be determined by the inversion routine, either the vertical extension or the average value of the second layer has to be kept fixed, while the other parameter could be determined by the inversion process. Both possibilities are well suited to describe distinct layers, but fail if smooth vertical gradients (e.g. linear gradients) have to be described, because of the discontinuity between the two layers.
In this study, we use two parameterisations for elevated layers (linear profiles and two-layer profiles). For the twolayer profiles we fixed the value of the lowest layer (to zero) but vary the vertical extension of this layer (as described below). Note that the term "two layer profile" is not fully appropriate for the chosen parameterisation with only the amount of one layer freely fitted (and the amount of the other fixed to zero). However, we keep this term throughout the manuscript in order to be consistent with future measurements (with a higher information content), from which amounts of two layers could be independently determined. Both parameterisations for elevated layers were chosen, because they describe two extreme cases: extended elevated layers with sharp gradient at the bottom or smoothly varying profiles.
For linear profiles, we chose a parameterisation that relates the ratio between the aerosol extinction (or trace gas concentration) at the surface x S and at the layer height x L to the shape parameter (for 1 < S ≤ 1.5) according to the following formula: This parameterisation assures that for S → 1 the profile merges the box profile. An example of a linear profile is shown in Fig. 2 (right). For the two-layer profile, we chose a parameterisation that relates the ratio between the height of the near-surface layer with zero aerosol extinction (or trace gas concentration) L zero and the (total) layer height L to the shape parameter (for S > 1) according to the following formula: Also this parameterisation assures that for S → 1 the profile merges the box profile. An example of a two-layer profile is shown in Fig. 2 (right).
Of course the details of the chosen parameterisations are arbitrary but our profile parameterisation has the advantage that it describes a large variety of possible profiles using only 3 parameters including "box" profiles (S = 1), quasiexponential profiles (S → 0), or profiles with an elevated layer (S > 1). However, it should be noted that this simple parameterisation cannot describe more complex situations like e.g. multiple layers (Frieß et al., 2006;Clémer et al., 2010).
Moreover, it turned out that for some measurement conditions the information content is not sufficient (e.g. during non-optimum measurement conditions), to determine all three profile parameters simultaneously, and for about 60 % of all measurements (see Fig. S2 in the Supplement) a stable profile inversion was only possible for 2 profile parameters.
In such cases one of the profile parameters introduced above (the shape parameter, S) is set to a fixed value (for details see Sects. 3.4 and 3.5). Because of that finding, in this study, only two profile parameters were retrieved in order to make a consistent automated retrieval possible. The fact that in some cases no stable retrieval of all three profile parameters was possible, reflects the limited information content of our MAX-DOAS measurements, for which no measurements at low elevation angles (<3 • ) were performed. For individual measurements, also other factors like horizontal gradients or the influence of clouds can result in bad convergence and ambiguities for the profile inversion. For the results presented in this study the layer height and the AOD or VCD were retrieved, while values for the shape parameters were prescribed (see below).

Determination of aerosol extinction, trace gas concentration and mixing ratio from the profile parameters
The profile parameters determined from the inversion process directly yield information on the integrated quantities, i.e. the trace gas VCDs or AODs. If shape parameters S ≥ 1 are used, the height parameter L directly describes the upper boundary of the trace gas or aerosol layer. Also for shape parameters slightly smaller than 1, L might still be a good approximation of the upper boundary of the aerosol or trace gas layer (for values of S 1, however, a correspondingly large fraction (1 − S) of the total trace gas or aerosol amount is located above L). From the derived profile parameters, the average trace gas concentration, ρ, or the average aerosol extinction, ε, within the aerosol or trace gas layer can be derived according to the following equations (for S ≤ 1): From the average trace gas concentration, also the respective mixing ratio M can be calculated For surface mixing ratios a value of the air number density [air] of 2.5 × 10 19 molec cm −3 (for 20 • C and 1013 hPa) can be used. For shape parameters S > 1, also aerosol extinction or trace gas concentrations can be derived from the retrieved profile parameters. For the two-layer parameterisation (Eq. 4) the aerosol extinction and trace gas concentration within the elevated layer are derived according to: For the linear profile parameterisation (Eq. 3) the aerosol extinction and trace gas concentration as a function of altitude (for z ≤ L) are derived according to: As will be shown later, for shape parameters S ≤ 1, the derived trace gas mixing ratios agree well with the independent measurements of near-surface trace gas mixing ratios. Good agreement between aerosol extinction and surface insitu measurements was also found, as demonstrated in other studies (e.g. Li et al., 2010;Zieger et al., 2011).

Radiative transfer simulations
For the simulation of trace gas SCDs and AMFs (or dSCD α and dAMF α ), radiative transfer simulations are performed. The dSCD α and dAMF α are calculated as the difference of simulation results (for the same settings) for the elevation angles α and 90 • . They are expressed as function of the profile parameters introduced in Sect. 3.1; these relationships establish the forward model: dAMF α = f (S aer ,L aer ,AOD,α,SZA,RAA) dSCD α = f (S tracegas ,L tracegas ,VCD,S aer ,L aer ,AOD, α,SZA,RAA) Here S aer , L aer and AOD are the shape parameter, layer height and total optical depth of the aerosol profile; S tracegas , L tracegas and VCD are the shape parameter, layer height and vertical column density of the trace gas profiles. α, SZA, RAA are the elevation angle, solar zenith angle and relative azimuth angle between the telescope and the sun. Note that the forward model for the trace gas dSCD α also includes the aerosol profile parameters.
In this study the full spherical Monte-Carlo atmospheric radiative transfer model McArtim (Monte Carlo Atmospheric Radiative Transfer and Inversion Model) is used, which is described in detail in Deutschmann (2008), and Deutschmann et al. (2011). For the simulations in this study, a surface albedo of 5 %, aerosol single scattering albedo of 0.95 and aerosol asymmetry parameter of 0.68 are assumed, which are typical values for urban and industrial areas (Dubovik et al., 2002). The surface elevation of the measurement site (130 m a.s.l.) is explicitly considered. To minimize the computational effort, all simulations were performed at 360 nm. This wavelength is well suited for the interpretation of the O 4 absorption at 360 nm. For the NO 2 and HCHO observations, simulations at a slightly smaller wavelength might have been more appropriate. We estimated the corresponding errors by comparing selected simulation results for 350 nm with those for 360 nm. The differences are rather small (typically below 3 % and for AOD > 3 below 1 %).
Simulations are carried out for all relevant combinations of viewing directions, SZA and RAA (for SZA ≤ 80 • ). The diurnal cycle is described by 11 pairs of SZA and RAA, respectively (see Table 1).
First, O 4 dAMF α are calculated for all combinations of profile parameters shown in Table 2. In total 250 000 O 4 dAMF α are calculated. In the next step, trace gas dSCD α are calculated for all combinations of profile parameters for the trace gas profiles and the aerosol profiles (see Table 2). Accordingly, the number of trace gas dSCD α simulations is much larger (about 40 Million) than the simulations of O 4 dAMF α . To reduce the computational effort, two simplifications were applied. First, it is assumed that the dAMF α for NO 2 and HCHO α do not depend on the respective VCDs. Except for very high NO 2 VCDs, this assumption is well fulfilled: for HCHO respective error is negligible; for NO 2 VCDs <1 × 10 17 molec cm −2 the error is <5 % and can be neglected compared to other uncertainties. Second, and related to the first point, HCHO and NO 2 "total" tropospheric dAMF α are not calculated directly. Instead, height-resolved so called box air mass factors are determined, from which the total dAMF α are calculated by the average of the box air mass factors, weighted with the respective (relative) height profile: Here BoxdAMF α (z i ) indicates the differential box air mass factor, c(z i ) the trace gas concentration and z i the height for the layer at z i . dAMF α are calculated for discrete values of the viewing geometry and the profile parameters (see Tables 1 and 2) and stored in look-up tables (LUT). For a given measurement sequence, the LUT is first reduced corresponding to the actual SZA and RAA of the measurement by linear interpolation. The remaining LUT is used as forward model, to which the measurements are fitted. After the aerosol profile parameters are determined as outlined above, the trace gas profile parameters are retrieved taking into account the aerosol parameters retrieved in the first step. Note that the shape parameters and layer heights for the aerosol and trace gas profiles are retrieved independently.

Error estimation
Several error sources contribute to the total uncertainty of the profile inversion results. Systematic errors are caused by errors of the spectroscopic data (e.g. uncertainties of the absorption cross sections and their spectral calibration) or deviations of the assumed optical properties of the aerosols used in the radiative transfer simulations (Sect. 3.2). Systematic errors might also be caused by other limitations of the forward model, i.e. its inability to correctly describe cloud effects or the real 3-dimensional trace gas and aerosol distributions. These and other systematic errors are difficult to identify and quantify. Here it is essential to compare the MAX-DOAS results with independent data sets (see Sects. 5.2 and 5.3).
Random errors are caused e.g. by the limited signal to noise ratio of the DOAS analysis and by spatio-temporal fluctuations of the trace gas and aerosol distributions (atmospheric noise). One effect of random errors is that they cause deviations between the individual measurements of an elevation sequence and their respective forward model results. While the forward model usually shows a smooth dependence on the elevation angle, the measurements often show additional fluctuations related to measurement or atmospheric noise. The respective deviations are quantified by  Table 2 were considered for the radiative transfer modelling. No clouds were included in the simulations.

Quantity
Number In the following, retrieval results with large deviations between measurements and forward model (RSS > 0.05) are generally skipped. In addition to the RSS between measurements and forward model, inversion errors can also be quantified from the fit process itself (see also Li et al., 2010) taking into account the sensitivity of the measured quantities with respect to variations of the profile parameters. Errors determined in this way in this study are representative for a confidence interval of 95 %. We found that the errors determined in this way are largely proportional to the RSS, which indicates that they typically represent random errors of the spectral retrieval and/or "atmospheric noise".
From a linear fit of these errors versus the corresponding values of the profile parameters, the typical relative errors are determined. To this regression line, a constant value is subsequently added to assure that for the smallest retrieved values the linear parameterisation still matches the respective uncertainties. Thus this error estimate represents an upper limit. The error parameterisations for the different retrieved quantities are summarised in Table 3; they were used for the correlation analyses presented in Sect. 5.2. Also shown in Table 3 are the mean relative errors. They range from about 9 % for the NO 2 mixing ratio to 71 % for the aerosol layer height.

Aerosol inversion
In the first step of the trace gas profile inversion, the aerosol extinction profile is determined from the measured O 4 DAMF (Eq. 2). Since MAX-DOAS spectra are analysed against a fixed Fraunhofer reference spectrum (see Sect. 2.3), the retrieved O 4 DAMF contain not only the difference compared to the zenith spectrum of the same elevation sequence (as needed for the inversion), but also a SZA dependent offset. To remove this offset, the O 4 DAMF for the 90 • elevation spectrum of the selected elevation sequence is subtracted from the O 4 DAMF for all other (slant) elevation angles of this sequence to yield the respective dAMF α .
In this study only two profile parameters (AOD and layer height L) are varied during the fitting process, while the shape parameter S is set to a fixed value.
To minimise the effect of the initial values on the inversion, we applied the following fitting procedure: in a first step the optimum AOD is determined in individual fits (according to the minimum RSS) for the discrete values of the aerosol layer height used for the radiative transfer simulations (see Table 2). In a second step a low order polynomial as function of the aerosol layer height is fitted to the
determined RSS values. According to the minimum of this polynomial, the optimum AOD and layer height is derived. This fitting procedure turned out to be very stable: the results showed negligible dependence on the initial values of AOD (for initial values between 0.05 and 1.5). Thus we conclude that instabilities of the aerosol inversion procedure described below are mainly caused by effects, which are not explicitly considered in the forward model (like the influence of clouds or horizontal gradients). Additional instabilities arise from ambiguities (e.g. from elevated layers, see below). As a first choice, a shape parameter of S = 1 was used ("box" profile). In addition, we also determined aerosol profiles for shape parameters of S = 0.8 and S = 1.1 (for elevated layers both linear profiles and two-layer profiles are used as defined in Sect. 3.1.1).
Fit results for selected elevation sequences are shown in Fig. 3 (top). The measured O 4 dAMF α are shown as black dots, while the fitted values are displayed as coloured lines. In both cases the measurements can be well described by the forward model. Interestingly, similar agreement is found for the different assumed profile shape parameters, illustrating that the information content of our MAX-DOAS observation is often not sufficient to discriminate these different profile shapes. As will be discussed in detail below such ambiguities can be caused by different reasons, e.g. by elevated layers, horizontal gradients or the influence of clouds. For about 60 % of all MAX-DOAS measurements during the FORMAT-II campaign stable profile inversions of all three profile parameters were possible: the inversion results did not significantly depend on the initial values and they did not rapidly change between succeeding observations (see e.g. example in Fig. S2 in the Supplement). For the remaining observations, no stable inversion results were obtained. Most of these measurements were made under cloudy conditions. Interestingly, even for the example in Fig. 3  Here it should, however, be noted that the details of these dependencies also vary with SZA and relative azimuth angle. The corresponding aerosol extinction profiles are also shown in Fig. 3 (bottom). While for 15 September 2003 the retrieved profiles and AODs differ substantially for the different assumed shape parameters, on 19 September 2003 the aerosol profile inversion yields much more similar profiles and almost the same AODs. Fortunately, for most measurements the retrieved AODs only slightly depend on the assumed shape parameter: taking into account all observations, for 74 % the difference in the AOD is below 20 %. If only clear observations with layer height (S = 1) <1.2 km are considered, for 97 % the difference in is below 10 % (see also Fig. 4).
The dependence on the assumed shape parameter for the 15 September 2003 indicates a fundamental problem for the retrieval of the AOD in cases when the shape parameter itself cannot be unambiguously retrieved in the inversion procedure. Similar results are found for other profile retrievals on 15 September 2003 (see Fig. 5 left) and also appeared for the observations of the two other telescopes (north and west direction, not shown). This indicates that the instability of the profile inversion is not an artifact for a single azimuth viewing direction, but is probably related to the specific properties of the aerosol profile on that day. Instabilities for the AOD retrieval from MAX-DOAS observations were also reported by Li et al. (2010). In Fig. 5 the retrieved layer heights and extinction coefficients for both days are also shown. It is interesting to note that the rapid jumps of the AOD for shape parameters S ≤ 1 or for the linear profile with S = 1.1 are closely correlated to similar rapid changes of the layer height L (Fig. 5 middle). As a consequence the aerosol extinction (Eqs. 5, 8, 10) is much less dependent on the profile shape than the AOD (bottom panel of Fig. 5). Also the uncertainties of the retrieved aerosol extinction are much smaller than those of the AODs or layer heights.
On 19 September 2003 a different behaviour compared to 15 September is found: the extinction coefficient depends more strongly on the assumed profile shape than the AOD (see Fig. 5 right). Also the uncertainties of the aerosol extinction is much larger indicating that on that day a twolayer profile with shape parameter of 1.1 might not be a good choice for the determination of the aerosol extinction. Here it should be noted, that the aerosol extinction determined for the two layer profile with zero values at the surface can by definition not be representative for the actual aerosol extinc-tion at the surface (the data in Fig. 5 is shown again in the Supplement (Fig. S3), but with the uncertainties displayed for the retrieval assuming a box profile).
We investigated possible reasons for the instabilities of the aerosol profile inversion and the dependence of the AOD on the profile shape. One hypothesis is that on 15 September 2003 an elevated aerosol layer might have been present. An indication for this hypothesis is found in the results for shape parameters S > 1. If profiles for an elevated aerosol layer are used (either a linear profile or a two-layer profile), the diurnal variation of the AOD shows a much smoother behaviour. The most consistent temporal variation is found for a two-layer parameterisation (assuming a layer with zero aerosol extinction at the surface).
We further tested our hypothesis of an elevated layer by performing radiative transfer simulations for different assumed aerosol extinction profiles (see Fig. 6). It turned out that for the elevation angles used in this study (≥3 • , indicated by the black arrows), the simulations for a two-layer profile with shape parameter of 1.1 (and L = 1, AOD = 0.3) can be , layer height L (middle) and aerosol extinction ε (bottom) for different shape parameters (southern telescope). For comparison, also the AOD from sun photometer measurements (AERONET) at Ispra are shown (dark blue line). Except the early morning of 15 September 2003 (before about 7:00), both days were cloud free. Error bars (for 95% confidence intervals) are determined within the inversion procedure; they are exemplarily shown for the retrieval assuming an elevated layer (two-layer profile). A similar figure, but with error bars for box profile inversion is shown in the supplement (Fig. S3). , layer height L (middle) and aerosol extinction ε (bottom) for different shape parameters (southern telescope). For comparison, also the AOD from sun photometer measurements (AERONET) at Ispra are shown (dark blue line). Except the early morning of 15 September 2003 (before about 07:00), both days were cloud free. Error bars (for 95 % confidence intervals) are determined within the inversion procedure; they are exemplarily shown for the retrieval assuming an elevated layer (two-layer profile). A similar figure, but with error bars for box profile inversion is shown in the Supplement (Fig. S3). well reproduced by the simulations for a box-profile (shape parameter of 1), but with larger values for L and AOD (4 km and 1, respectively). Also the simulations for a linear profile can match the results for the two-layer profile. This finding confirms the hypothesis that in the presence of elevated aerosol layers, no unambiguous profile inversion might be possible for the elevation angles used in this study.
The ambiguity demonstrated in Fig. 6 can explain the observations on 15 September 2003 (Fig. 5 left), for which increased AOD are often found with simultaneously enhanced layer height. They also indicate that if additional viewing angles at low elevation were included in the MAX-DOAS observations, the ambiguity of the profile retrieval could be effectively reduced.
It should be noted that a profile with zero aerosol extinction at the surface is probably not very reasonable close to strong emission sources like for our measurements (see discussion in Sect. 3.1.1). Nevertheless, the smooth diurnal variation found for this profile parameterisation indicates that strong vertical gradients of the aerosol extinction probably exist close to the surface, which are better described by the two-layer profile than by the other profile parameterisations.
To deal with the problem of underdetermination of the aerosol profile, we chose a pragmatic solution by simply using a shape parameter of 1.1 (two layer profile) for the determination of the AOD. By this choice, stable results for the AOD are obtained for all days (results for one day are shown in Fig. 5 left). But of course, this choice has also disadvantages: for many days (without elevated profiles) we use an assumption which is obviously wrong. As a consequence, the retrieved AOD is often smaller than for shape parameters S ≤ 1 (see Fig. 5 right), but fortunately this underestimation is usually small: for 74 % of all observations it is less than 20 %; for 97 % of clear observations with layer height (S = 1) <1.2 km the difference in the AOD is below 10 % (see also Fig. 4). Another disadvantage is that the retrieved layer height for a shape parameter of S = 1.1 is systematically lower (typically by a factor of about 2) than for a shape parameter of 1 (Fig. 5, middle). There is probably no simple explanation for this finding, but the fact that L 1.1 is systematically smaller than L 1.0 is also supported by the results of Fig. 6 (and Fig. S4 in the Supplement), where the O 4 DSCDs for profiles with S = 1 and L = 1 km agree with those for profiles with S > 1 and L > 1 km.
Note that the results for the aerosol layer height presented in the following sections were retrieved for a shape parameter of 1.1, and were subsequentially multiplied by a factor of two in order to be representative for the true aerosol layer height. As will be shown in Sect. 5.3, the aerosol layer heights determined in this way agree reasonably well with aerosol concentration profiles from aircraft measurements. Also, for shape parameters S < 1 systematically lower layer heights are retrieved than for S = 1. This has to be expected, because for these S-values a substantial part of the aerosol load is located above the "aerosol layer". While for our measurements, an aerosol profile with S = 1.1 is probably an acceptable (pragmatic) choice for the retrieval of the AOD and layer height, it is not necessarily a good choice for other retrieved quantities. For example, as shown in Fig. 5, for shape parameters S ≤ 1 the retrieval of the aerosol extinction leads to much more consistent results. As will be shown below, the results of the trace gas inversions (especially for the trace gas VCD and layer height) are also more realistic and consistent, if shape parameters S ≤ 1 for the aerosol profile inversion are chosen.
The different choice of the shape parameter S for either the retrieval of AOD or the retrieval of trace gas profiles might be seen as an inconsistency. However, we think these choices are well justified. As discussed above, the choice of S > 1.1 leads to more consistent results of the AOD than the use of S ≤ 1. However, if the aerosol extinction profiles for S = 1.1 were also used as input for the trace gas profile inversion, a particular problem occurs: the aerosol extinction close to the surface would be systematically underestimated in most cases, while the maximum trace gas concentrations are typically located at these altitudes. To avoid this problem, we use aerosol extinction profiles retrieved for a shape parameter S ≤ 1. Even if in some cases the AOD (and the aerosol layer height) would be overestimated, the aerosol extinction close to the surface will very probably be more correct than that for aerosol retrievals with S = 1.1.

Trace gas inversion (NO 2 and HCHO)
The inversion of the trace gas profiles (second step) is performed in a similar way to the aerosol inversion. First the DSCDs for the 90 • elevation angles are subtracted from the DSCDs of the lower elevation angles of the same sequence to yield the respective dSCD α . In the next step the trace gas dSCD α are divided by the dSCD α for an elevation angle α = 10 • of the same elevation sequence (in principle any other elevation angle could be used as well). This normalisation is performed to simplify the fitting process of the trace gas inversion. In contrast to the aerosol inversion, where the O 4 DAMF depend not only on the relative profile shape but also on the absolute value of the AOD, the dAMF α for NO 2 and HCHO do not depend on the absolute value of VCD, because their atmospheric absorptions are weak (OD typically <0.1). Thus, the profile inversion for NO 2 and HCHO can be reduced to the determination of the relative profile shapes (also see Sinreich et al., 2005).
Before the fit to the normalised trace gas dSCD α , a similar normalisation of the dAMF α of the forward model is applied. From the fit between the measurements and the forward model, the (relative) profile shape (layer height, and shape parameter) and the corresponding dAMF α are obtained. This is possible because of the unique relationship between normalised dAMF and the absolute dAMF, from which the normalised dAMF were calculated. From the dAMF α and the measured trace gas dSCD α the VCDs for the individual elevation angles are calculated: Finally, the average of the VCDs for the different elevation sequences is calculated. From the VCD, the layer height, and the shape parameter the average trace gas concentration or mixing ratio is calculated according to Eqs. (6, 7, 9, and 11). Like the aerosol inversion, in some cases the trace gas inversion has no stable convergence, and thus, the shape parameter S, is prescribed. Thus only the layer height L and the VCD were determined independently by the fit. In Fig. 7 exemplary fit results of the forward model to the measured (normalised) dSCD α of NO 2 and HCHO are shown. Like the aerosol inversion, similar agreement for the different shape parameters is found. The VCDs retrieved for shape parameters ≤1 show rather good agreement, but for shape parameters >1 (elevated layers), systematically lower VCDs are obtained. However, in contrast to the aerosol inversion, the results of the trace gas inversions did not show instabilities like those in Fig. 5 (left column). Thus in the following, only trace gas results for shape parameters ≤1 are presented. The better convergence of the trace gas VCDs (compared to the AOD) is probably caused by fact that enhanced concentrations of NO 2 and HCHO are usually confined to the lowest atmospheric layers, while the atmospheric scale height of O 4 is about 4 km.
In Fig. 8 the diurnal variations of the retrieved trace gas results (VCD, layer height and mixing ratio) are presented for 19 September 2003. For comparison, the mixing ratios of the independent measurements (LP-DOAS and Hantzsch) are also shown. In general, the HCHO layers (and their uncertainties) are higher than those of NO 2 .
The trace gas VCDs from the profile inversion are compared to the respective VCDs calculated by the so called geometric approximation (A. Richter, personal communication, 2005;Brinksma et al., 2008). In this study we used the measurements at elevation angles of 18 • and 90 • for the determination of the "geometric" VCD: While the trace gas VCDs from the profile inversions assuming different shape parameters show very good agreement, the geometric VCDs are mostly smaller than the VCDs from the profile inversions (especially for periods with high trace gas VCDs). These differences are most probably caused by the neglect of scattering processes in the calculation of the geometric VCD. The systematic deviations between the geometric VCD and the VCDs from the profile inversion are further investigated in Sect. 5.2.4. As pointed out before, the results of the aerosol inversion are used as input for the trace gas profile inversion. Thus the question arises, which aerosol shape parameter S aer should be used in the first step of the trace gas retrievals. To answer this question we compared trace gas results for different assumed aerosol shape parameters S aer (for simplicity, the shape parameter for the trace gas inversion S tracegas was set to 1). The results are presented in Fig. 9. While the trace gas mixing ratios are only slightly affected by different choices of S aer , the trace gas VCDs and layer heights for different S aer show large differences. Especially for S aer > 1 they deviate systematically from the results for S aer ≤ 1. The reason for this finding is not clear, but is probably related to the fact that for aerosol shape parameters S aer > 1 the aerosol extinction close to the ground is systematically underestimated. This is the layer where usually the highest trace gas concentrations occur. Fortunately, the trace gas mixing ratios depend little on the assumed aerosol shape parameter.

Influence of clouds on MAX-DOAS observations
Like aerosols, clouds also strongly affect the atmospheric radiative transfer and can have a large effect on MAX-DOAS observations and the profile retrievals. Thus, the profile inversion for measurements at cloudy conditions is probably strongly influenced by clouds. In this section the effects of clouds on MAX-DOAS measurements are investigated. First a simple cloud classification algorithm is presented, which is used to categorise the MAX-DOAS measurements during the FORMAT-II campaign into different classes. Based on this classification scheme, the cloud effect on MAX-DOAS results can be empirically determined by comparison with independent data. Cloud effects are also investigated using radiative transfer simulations.     For comparison, also "geometric" VCDs (see Eq. 17) and trace gas mixing rations obtained by independent measurements (LP-DOAS and Hantzsch) are shown. Error bars (for a 95 % confidence interval) are determined from the inversion procedure; they are exemplarily shown for the retrieval assuming a box profile (S = 1.0).  Fig. 9 Influence of the aerosol shape parameter in the results of the trace gas retrievals. Shown are the VCDs (top), layer heights (middle) and mixing ratios (bottom) for NO 2 (left) and HCHO (right) on 19 September 2003. The trace gas shape parameter was set to 1. 45 Fig. 9. Influence of the aerosol shape parameter in the results of the trace gas retrievals. Shown are the VCDs (top), layer heights (middle) and mixing ratios (bottom) for NO 2 (left) and HCHO (right) on 19 September 2003. The trace gas shape parameter was set to 1.

Basic effects of clouds
Although clouds affect the atmospheric radiative transfer in a complex way, two main effects are especially important for MAX-DOAS observations. The so called diffusing screen effect and multiple scattering. Both effects are described in the next sub-sections.

Diffusing screen effect
Because of additional scattering, clouds with low optical depth are usually brighter than the clear sky. One particular effect of such clouds is that a substantial fraction of the photons received by the MAX-DOAS instrument has been directly scattered from the cloud bottom (instead from air molecules). Thus, especially for observations at low elevation angles, the direct light path along the instrument line of sight increases compared to clear sky conditions (see Fig. 10 left and center). The fraction of the photons which are directly received from the cloud bottom (and thus the length of the effective atmospheric light path) increases with increasing brightness of the cloud. Of course this holds only for the fraction of the photons, for which the last scattering event was lower than the cloud bottom. The cloud altitude has a strong influence on the length of the effective atmospheric absorption path: with increasing cloud altitude the absorption paths also increase. In contrast, for the zenith viewing direction the diffusing screen effect tends to reduce the atmospheric light path, because in the presence of a cloud, most photons traverse the atmosphere below the cloud on a vertical instead of a slant path (see Fig. 10 left and center) (Wagner et al., 1998).
Both effects, the increase of the absorptions for slant elevation angles and the decrease for zenith direction, lead to an increase of the observed trace gas dSCD α s for cloudy conditions compared to clear sky conditions. Thus the diffusing screen effect has a strong and systematic effect on the interpretation of the MAX-DOAS measurements. Here it is important to note that optically thin clouds have in general an opposite effect compared to aerosols close to the surface, and the cloud OD will not simply add to the AOD in the aerosol inversion.
In Fig. 11 radiative transfer simulation results of the diffusing screen effect are shown for O 4 and other trace gas profiles. As expected the dAMF α values are systematically enhanced compared to the cloud-free case. The magnitude of the enhancement depends on many factors like cloud height, cloud OD, aerosol load and trace gas profile. The largest Fig. 10 Schematic description of the cloud influence on MAX-DOAS observations. Left: For clear sky, sun light is scattered by air molecules and aerosol particles towards the instrument. Center: Diffusing screen effect: in the presence of thin clouds, a substantial fraction of the observed photons is scattered by the cloud; especially for the smaller elevation angles, this effect leads to an increase of the absorption path. Right: For optically thick and vertically extended clouds, multiple scattering can lead to very large increase of the photon paths inside the clouds. 46 Fig. 10. Schematic description of the cloud influence on MAX-DOAS observations. Left: for clear sky, sun light is scattered by air molecules and aerosol particles towards the instrument. Center: diffusing screen effect: in the presence of thin clouds, a substantial fraction of the observed photons is scattered by the cloud; especially for the smaller elevation angles, this effect leads to an increase of the absorption path. Right: for optically thick and vertically extended clouds, multiple scattering can lead to very large increase of the photon paths inside the clouds. relative enhancement is found for the O 4 profile (by a factor of 2 or more). In the simulations an aerosol layer between 0 and 1 km with AOD of 0.5 was assumed (cloud height between 4 km and 5 km and cloud OD ranging between 1 and 5, see Fig. 11).
The dAMF α simulated for cloudy conditions were used as input for the profile inversion algorithm, which assumes clear sky conditions. The results of the profile retrievals are shown in Fig. 12. As expected, the retrieved AODs decrease with increasing cloud OD and cloud altitude. Even for a small cloud OD of 1, the retrieved AOD underestimates the true value by about a factor of two. Compared to the aerosol inversion, the diffusing screen effect on the trace gas profile inversion is more complex, because the diffusing screen effect influences not only the trace gas dSCD α , but also the O 4 dSCD α , which were used as input for the aerosol profile inversion. As a consequence, the diffusing screen effect can lead to both underestimation or overestimation of the true trace gas mixing ratios, depending on the details of the cloud and aerosol properties, and of the atmospheric trace gas profile. The diffusing screen effect tends to underestimate (overestimate) the true trace gas mixing ratios for trace gases at low (high) altitudes (Fig. 12). Compared to the aerosol profile inversion, the magnitude of the diffusing screen effect on the trace gas mixing ratios is generally smaller.

Multiple scattering effect
For vertically extended clouds with large optical depth, an additional effect has to be considered. Under such conditions, the light path lengths inside the clouds can become very long (up to more than 100 km, e.g. Erle et al., 1995;Wagner et al., 1998;Winterrath et al., 1999) (Fig. 10 right). If a substantial fraction of a trace gas is present inside the cloud, the measured absorptions are strongly increased compared to clear sky. Such an increase is usually observed for the O 4 absorptions (and often also for other trace gases like NO 2 and HCHO), and consequently a meaningful aerosol profile inversion is not possible under such conditions. The profile inversion is further complicated by the fact that for vertically extended clouds, a high temporal variability of the light path length is usually observed.

Cloud discrimination scheme
Because of the strong and systematic effects of clouds on the interpretation of MAX-DOAS observations, it is important to use a reliable cloud classification scheme, which (preferably automatically) discriminates observations under clear sky from observations affected by "thin" or "thick" clouds.
Our cloud classification scheme is based on the MAX-DOAS observations themselves. For two reasons we only use the measurements at 90 • elevation angle (zenith). First, almost all MAX-DOAS observations include the zenith direction in their sequence of elevation angles; second, a changing solar azimuth angle has no influence on zenith observations (at least if the instrument is not sensitive to polarisation). We make use of two quantities for the identification and characterisation of clouds: the observed radiance and the O 4 absorption (or O 4 DAMF).
While also a colour index (intensity ratio between two wavelengths) should in principle be a well suited indicator for changes of the atmospheric radiative transfer (e.g. caused by clouds), for our measurements it turned out not to be very appropriate. We found that it was generally less sensitive to the presence of clouds than the (normalised) radiance itself. This finding is probably caused by the relatively small wavelength range of our instrument; for instruments covering a wider spectral range (e.g. including the full visible spectral range), the use of a colour index might be more appropriate. In principle a colour index could also yield additional information to separate the effects of aerosols and clouds, but this would require much more comprehensive radiative transfer simulations. In the following, we make use of the radiance and the O 4 absorption (from the zenith measurements) as indicators for the presence and properties of clouds. Note that in contrast to the profile inversion, here the O 4 DAMF is used (retrieved using a fixed Fraunhofer reference spectrum, see Sect. 2.3). Since we apply a normalisation by subtracting O 4 DAMF for clear sky (see below), the specific choice of the Fraunhofer reference spectrum is not critical.
The first step of our cloud classification scheme is the identification of clear days with low AOD. Such days can be used as clear day reference cases, to which other observations are compared. Based on satellite images and AERONET observations (at Ispra), two days were identified, which largely fulfilled the criteria of low AOD (<0.3 in the UV) and absence of clouds (6 and 14 September 2003). For these two days the measured radiance at 360 ± 1 nm and the O 4 DAMF as function of the SZA were fitted by a polynomial of fifth order. The polynomials (indicated by the red curves in Fig. 13) serve as reference values for clear sky observations. If clouds are present, the observed radiance and the O 4 absorption deviate from the reference values.  To minimise the influence of the SZA, the measured radiance and O 4 DAMF are normalised using the clear sky reference values. The normalisation is done in different ways: for the O 4 DAMF the effect of clouds compared to clear sky observations at the same SZA is mainly additive. Thus the absolute difference between the measured values and the reference values at the same SZA is calculated. For the radiance the absolute change due to clouds depends strongly on the SZA. Thus the relative difference between the measured values and the reference values at the same SZA is calculated:  Fig. 13 original and normalised radiances and O 4 DAMFs for two (partly) cloudy days are presented. On 12 September 2003 thin clouds are observed in a satellite image shown in the lower part of the figure. Compared to the reference case (red lines), the observed O 4 DAMF is only weakly affected by these clouds (dark blue curves). In contrast, the observed radiance shows deviations in the late morning indicating additional scattering by cloud particles.
On 9 September 2003 a spatially extended bright cloud cover is seen in the satellite image. Compared to the reference values, the O 4 DAMFs are strongly increased and show rapid variations indicating strong changes of the light path length due to multiple scattering. For most of this day, the observed radiance is lower compared to the reference values indicating the presence of an optically thick cloud.
Based on all observations during the campaign, and after comparison with satellite images and AERONET data,  we defined selection criteria to discriminate clear and cloudy scenes. The definition of these criteria is to some degree arbitrary, and for other locations or measurement conditions different criteria or modified thresholds might be used. Based on our discrimination scheme, three cases ("clear sky", "thin clouds" and "thick clouds") can be distinguished. They are identified using the selection criteria presented in Fig. 14. One important feature of our algorithm is that not only thresholds for the absolute values of the observed quantities are used, but also criteria for their temporal variation. Typically the temporal variability of clouds is higher than that of aerosols; thus a rapid and strong variation of the observed quantities is an indicator for the presence of clouds.
According to our discrimination scheme, 59 % of all MAX-DOAS observations during the FORMAT-II campaign are classified as clear, 29 % are classified as influenced by thin clouds, and 12 % are classified as influenced by thick clouds. An overview of the normalised radiance and the normalised O 4 AMF for the whole campaign is given in the Supplement (Fig. S15). It should be noted that our classification algorithm could be easily adapted to other (MAX-) DOAS measurements.

Selected results and comparison with independent data sets
In the first part of this section, the diurnal variations for selected days (results for individual elevation sequences) and for the whole campaign (half hour averages) are shown and compared to independent data sets. In the second part, correlation analyses between different data sets are presented.
In the third part, vertical profiles from aircraft observations are compared to the profiles retrieved from the MAX-DOAS observations. Note that all AOD results shown in this section were obtained using a shape parameter of 1.1 (see Sect. 3.4). All trace gas results were obtained using a shape parameter of 1.0 both for the aerosol and trace profile inversion.    (Eq. 19). The "&"-sign indicates that all conditions have to be fulfilled to get a "yes" decision.

Diurnal cycles and results for the whole campaign
In Fig. 15 results for 4 selected days are presented, which differ both in atmospheric composition and measurement conditions. Diurnal cycles for all days of the measurements are presented in the Supplement (Fig. S16). Note that the aerosol layer height, which was retrieved for a two-layer profile with shape parameter of S = 1.1, were multiplied by a factor of two to be representative for the true aerosol layer height (see Sect. 3.4 and Fig. 5). Only measurements are shown, for which the differences between the measurements and the forward model are small (χ 2 < 0.05, see Sect. 3.3). In addition, results were skipped for which the layer height showed strong and rapid variations (of more than 3000 m between subsequent measurements). Such cases occurred mainly on cloudy days.  On the first selected day (6 September 2003, Fig. 15a) all telescopes were directed towards the south and (as expected) similar results are found for the three telescopes. The remaining differences are a good indicator of the inherent uncertainties of the MAX-DOAS measurements and profile inversion. Part of the differences might also be related to the fact that the elevation sequences of the different telescopes were not synchronised. On 6 September 2003 the mixing ratios of NO 2 and HCHO are relatively low compared to other days.
While the HCHO layer height is almost constant throughout the day, the layer heights of NO 2 and aerosols increase during the day, probably indicating the increase of the mixing layer height.
Like on 6 September, on the next selected day (14 September 2003, Fig. 15b) relatively low pollution levels prevail; the three telescopes were now directed into three distinct azimuth directions. While for the mixing ratios of NO 2 and HCHO good agreement for the three viewing angles is found,  Fig. 15 Retrieval results of the AOD, mixing ratios of HCHO and NO 2 , and layer heights from individual elevation sequences for selected days. Also the results for the LP-DOAS and Hantzsch instrument and the AERONET AOD (at Ispra) are shown for comparison. the differences are larger for the AOD. They probably indicate horizontal gradients within the area, for which the MAX-DOAS measurements are sensitive to. The different dependencies of the O 4 DAMF on the aerosol properties for different relative azimuth angles might contribute to the deviations. The HCHO layer height is almost constant during the day, whereas the aerosol layer decreases and the NO 2 layer increases.
On the next selected day (19 September 2003, Fig. 15c) enhanced AOD and trace gas mixing ratios are retrieved (especially between 08:00 and 12:00 UT). Interestingly, a similar spatio-temporal pattern is observed for aerosols, NO 2 and HCHO: the peak values are observed first for the southern telescope, then for the western telescope and finally for the northern telescope, with the strongest enhancements for the northern telescope. These findings are consistent with an assumed transport of a polluted air mass from south-west towards north-east. Winds from south-east are also found from back-trajectory calculations. The center of the polluted air mass is probably located northwards from the measurement site, because the highest levels of AOD and trace gas mixing ratios are found for the northern telescope. The layer heights for the aerosols and trace gases are more similar and lower than on the days shown before. Interestingly, a similar variation of AOD and trace gas mixing ratios is found on several days of these period (17-20 September 2003). Note that the extremely high values of the NO 2 and HCHO mixing ratios for the northern telescope should be considered with care since during these measurements strong temporal variations (corresponding to strong spatial gradients) appeared.
On the last selected day (22 September 2003, Fig. 15d) high AODs were still measured, but the trace gas mixing ratios are lower than on the previous days. The aerosol layer height is almost constant during the day, whereas the NO 2 layer height increases. The HCHO layer height shows enhanced values at the end of the day.
Time series (half hour averages) of AODs, trace gas mixing ratios and layer heights for the whole measurement campaign (4-26 September 2003) are shown in Fig. 16. In general, the retrieved layer heights for aerosols and HCHO are similar but higher than those for NO 2 . Diurnal cycles of results of individual elevation sequences are presented in the Supplement (Fig. S16).

Correlation analyses
In the following sections correlation analyses between the MAX-DOAS results and coincident results from independent measurements are presented. The correlation analyses were performed for half hour averages using an orthogonal linear regression (Cantrell, 2008). One important aspect is to use a realistic estimate for the respective measurement errors. To avoid effects of different error definitions for the MAX-DOAS retrievals and independent data sets, we decided to use the parameterised MAX-DOAS errors (see Sect. 3.3 and Table 3) for the other data sets as well. Of course, this choice is far from perfect. But since not only the respective measurement uncertainties play a role, but also different air volumes are probed (partly at different locations), it is probably not a bad choice. However, since the fit of the regression line depends systematically on the assumed errors, the interpretation of the determined slope and y-intercepts should be treated with caution. In addition to the results of the orthogonal regression, we also calculated the mean values of the individual ratios A/B and also the ratios of the mean values A / B of the compared data sets: with a i and b i the values of individual pairs of coincident measurements and N the total number of measurement pairs. These two quantities together with the slope of the orthogonal regression provide good information about the agreement between the compared data sets.
In addition to the comparison between MAX-DOAS results and independent measurements, we made similar comparisons between the MAX-DOAS results for the different telescopes. In the following sections, the results of the correlation analyses are discussed; the corresponding graphics are presented in the Supplement (Figs. S5-S14).

Aerosols
AODs retrieved from the MAX-DOAS measurements are compared to the AODs measured by sun photometer (AERONET) at Ispra. Only clear sky measurements from 12-26 September 2003 were considered. During that period the three telescopes were directed into three different azimuth angles (north, south, west). Periods with strong temporal variations (representing strong horizontal gradients) like in Fig. 15c are excluded. Also, measurements with layer heights >5 km; or rapid variations of the layer height between subsequent measurements (>3 km) were excluded, because they indicate unstable profile inversions.
For orthogonal linear regression the uncertainties of the MAX-DOAS results shown in Table 3 are used. For the three telescopes, moderate correlations were found (coefficients of determination (r 2 ) between 0.42 and 0.61). The slopes of the regression lines range between 0.83 and 1.00 with the highest AODs in northerly directions (see Fig. S5 in the Supplement). Similar results are also found for the mean value of the individual ratios A/B and the ratio of the mean values A / B of both data sets (Eqs. 20 and 21). The ratios for the northern telescope are even larger than 1 (up to 1.22). The individual results for the slopes and ratios are summarised in Table 4. MAX-DOAS AODs are also compared for different cloud cover (clear sky and, thin clouds according to the classification presented in Sect. 4.2). Here, the AODs retrieved from the southern telescope were selected, because that telescope was directed to the same azimuth angle during the whole campaign. Only a few measurements could be compared for thin cloud conditions (for thick clouds no coincident measurements were found). The rather few coincidences for cloudy conditions are caused by two reasons: first, during the campaign clouds were present only during relatively few periods (thin clouds: 29 %, thick clouds: 12 %). Second, under cloudy conditions, AERONET sun photometer measurements are not available (of course the cloud conditions between Bresso and Ispra can differ). The few data points for thin clouds indicate that even under these conditions, MAX-DOAS observations are sensitive to varying aerosol extinction (see Fig. S6 in the Supplement). However, compared to the clear sky observations the slope of the regression line is  Fig. 16 Half hour averages of the AOD, mixing ratios of NO 2 and HCHO and layer heights for the whole campaign. Also the results for the LP-DOAS and Hantzsch instrument and the AERONET AOD (at Ispra) are shown for comparison. Only measurements are shown, for which the differences between the measurements and the forward model are small (χ 2 > 0.05). Also periods with large horizontal gradients were skipped (see text). In addition, aerosol results for which the AOD varies more than 0.5 between successive measurements were also discarded. 53 Fig. 16. Half hour averages of the AOD, mixing ratios of NO 2 and HCHO and layer heights for the whole campaign. Also the results for the LP-DOAS and Hantzsch instrument and the AERONET AOD (at Ispra) are shown for comparison. Only measurements are shown, for which the differences between the measurements and the forward model are small (χ 2 > 0.05). Also periods with large horizontal gradients were skipped (see text). In addition, aerosol results for which the AOD varies more than 0.5 between successive measurements were also discarded.
systematically smaller and the scatter is larger. The underestimation is most probably the result of the diffusing screen effect (see Sect. 4.3). The results for slopes and ratios are summarised in Table 5.
Correlation analyses between the results for the different telescopes were also performed (for details see Fig. S7 in the Supplement). During the first part of the campaign, when the telescopes were directed at the same azimuth angle (south), good consistency was found: the slopes and ratios for the AOD are between 0.94 and 1.10; the slopes and ratios for the aerosol layer height are between 0.95 and 1.07, and the slopes and ratios for the aerosol extinction are between 0.94 and 1.10. During the second part of the campaign, when the telescopes were directed at different azimuth angles (north, west, south), as expected less consistency was found: the slopes and ratios for the AOD are between 0.79 and 1.38; the slopes and ratios for the aerosol layer height are between 0.74 and 1.36, and the slopes and ratios for the aerosol extinction  are between 0.84 and 1.31. The larger differences probably indicate different sensitivities for the different relative azimuth angles and effects of horizontal gradients.

NO 2
MAX-DOAS NO 2 mixing ratios are compared to the results from the LP-DOAS (clear sky measurements from 12-26 September 2003). Again, periods with strong temporal variations (representing strong horizontal gradients), like in Fig. 15c are excluded. Measurements with layer heights >2.5 km were excluded as well, because they indicate unstable profile inversions. For the orthogonal linear regression, the uncertainties of the MAX-DOAS results (and the LP-DOAS results) shown in Table 3 were used. For the MAX-DOAS results, reasonable correlations with the LP-DOAS results are found with coefficients of determination (r 2 ) between 0.74 and 0.81. The slopes of the linear regression range from 0.76 to 1.16 (see Fig. S8 in the Supplement). Similar results are also found for the mean value of the individual ratios and the ratio of the mean values of both data sets. The relatively large differences between both data sets is probably related to the fact that LP-DOAS is only sensitive to NO 2 concentrations close to the surface between the instrument and the retro-reflectors, whereas the MAX-DOAS observations are also sensitive to further distances and higher altitudes. The higher values for the western and northern facing MAX-DOAS measurements are probably caused by fresh NO x emissions from the nearby motorways. The results for slopes and ratios are summarised in Table 4. NO 2 mixing ratios from MAX-DOAS are also compared for different cloud cover (clear sky, thin clouds, and thick clouds). For the observations under thin and thick clouds, rather good correlations and similar slopes as exhibited for clear sky conditions are found (see Fig. S9 in the Supplement). Obviously the retrieval of NO 2 mixing ratios is less affected by the presence of clouds compared to the AOD (see Sect. 4.3). The results for slopes and ratios are summarised in Table 5.
Correlation analyses between the results for the different telescopes were also performed (for more details see Fig. S10 in the Supplement). During the first part of the campaign, when the telescopes were directed at the same azimuth angle (south), good consistency was found: the slopes and ratios for the NO 2 VCD are between 0.97 and 1.09; the slopes and ratios for the NO 2 mixing ratios are between 0.96 and 1.04; the slopes and ratios for the NO 2 layer height are between 0.97 and 1.06. During the second part of the campaign, when the telescopes were directed at different azimuth angles (north, west, south), as expected less consistency was found: the slopes and ratios for the NO 2 VCD are between 0.94 and 1.19; the slopes and ratios for the NO 2 mixing ratios are between 0.82 and 1.42; the slopes and ratios for the NO 2 layer height are between 0.87 and 1.26. Again, this probably indicates different sensitivities for the different relative azimuth angles and effects of horizontal gradients.

HCHO
MAX-DOAS HCHO mixing ratios are compared to results from the LP-DOAS and the Hantzsch instruments (clear sky measurements from 12-26 September 2003). Again, periods with strong temporal variations (representing strong horizontal gradients) like in Fig. 15c are excluded. Also measurements with layer heights >2.5 km were excluded, because they indicate unstable profile inversions. For the orthogonal linear regression, the uncertainties of the MAX-DOAS results as shown in Table 3 were used.
For the three telescopes reasonable correlations with respect to the results of the LP-DOAS and the Hantzsch instruments are found; with coefficients of determination (r 2 ) between 0.53 and 0.77. The slopes of the linear regression are between 1.08 and 1.36 (see Fig. S11 in the Supplement). Similar results are found for the mean value of the individual ratios and the ratio of the mean values of both data sets. The results for slopes and ratios are summarised in Table 4. HCHO mixing ratios from MAX-DOAS are compared for different cloud cover (clear sky and thin clouds). Like for NO 2 , a rather good correlation with the independent measurements is still obtained for thin clouds, but the slope of the regression line is now systematically larger than for clear sky conditions (see Fig. S12 in the Supplement). Again, this finding can in principle be explained by the diffusing screen effect on the trace gases profile retrievals (see Sect. 4.3). The overestimation is probably caused by the fact that the HCHO layer extends to higher altitudes than the NO 2 layer. The results for slopes and ratios are summarised in Table 5.
It is interesting to note that the correlation between the Hantzsch instrument and the LP-DOAS is similar to the MAX-DOAS comparisons with either independent measurement, but the slopes and ratios are closer to unity. For the whole measurement campaign a coefficient of determination (r 2 ) of 0.56 and slope of 0.87 (Hantzsch versus LP-DOAS) is obtained; the mean value of the individual ratios is 0.83 and the ratio of the mean values is 0.90. If only clear sky observations between 12 and 26 September 2003 are considered, a coefficient of determination (r 2 ) of 0.73 and slope of 0.90 (Hantzsch versus LP-DOAS) is obtained; the mean value of the individual ratios is 0.99 and the ratio of the mean values is 1.09. The results for slopes and ratios are summarised in Table 4. Similar results have been reported in Hak et al. (2005). However, it should be noted that therein a white cell (not long path) DOAS instrument was compared to Hantzsch instruments.
Correlation analyses between the results for the different telescopes were performed (for more details see Fig. S13 in the Supplement). During the first part of the campaign, when the telescopes were directed at the same azimuth angle (south), fair consistency was found: the slopes and ratios for the HCHO VCD are between 0.88 and 1.25; the slopes and ratios for the HCHO mixing ratios are between 0.87 and 1.11; the slopes and ratios for the HCHO layer height are between 0.83 and 1.31. During the second part of the campaign, when the telescopes were directed at different azimuth angles (north, west, south), the consistency was slightly worse: the slopes and ratios for the HCHO VCD are between 0.84 and 1.35; the slopes and ratios for the HCHO mixing ratios are between 0.92 and 1.17; and the slopes and ratios for the HCHO layer height are between 0.81 and 1.43. For HCHO, the uncertainties of the inversion results are generally higher; thus effects of the different sensitivities for the different relative azimuth angles and effects of horizontal gradients are not as important (compared to other uncertainties) as for the other retrievals.

Trace gas VCDs
So called geometric VCDs (Eq. 17) are often used for the validation of satellite observations of tropospheric trace gas VCDs (Brinksma et al., 2008). Since in their determination scattering by molecules and aerosols is neglected, they are affected by systematic errors depending on the layer height, AOD and viewing geometry. To estimate these errors, we compared the "geometric" VCDs (using elevation angles of 18 • and 90 • , see Eq. 17) for NO 2 and HCHO to the corresponding VCDs obtained from the profile inversion (see Fig. S14 in the Supplement). For NO 2 , relatively good agreement is found (slopes and ratios between 0.88 and 1.03), but for HCHO the geometric VCDs systematically underestimate the VCDs obtained by the profile inversion (slopes and ratios between 0.66 and 0.93). The results for slopes and ratios are summarised in Table 6. We investigated possible reasons for these dependencies by calculating the relative differences between both types of VCDs: While no clear correlation of VCD rel with the AOD was found (not shown), VCD rel shows a systematic dependence on the layer height (for details of the correlation analyses see Fig. S14 in the Supplement). This dependence indicates that the neglect of scattering by molecules and aerosols becomes more important for vertically extended trace gas layers. For layer heights below 1000 m, the error of the geometric VCD is typically within 20 %.

Comparison to vertical profiles
On several days during the FORMAT-II campaign, vertical profiles of the HCHO mixing ratio and aerosol particle concentration were measured from an ultra light aircraft (Junkermann, 2009). Although due to airspace regulations, these measurements were restricted to areas outside the city of Milano (typical distance to the measurement site was 20 km), it is interesting to compare the obtained profiles with the MAX-DOAS results. Also, the horizontal heterogeneity can be estimated from the aircraft measurements. Here it is interesting to note that the sensitivity of the MAX-DOAS measurements is typically limited to within a horizontal distance of about 5 km. The flight patterns flown from the airfield of Spessa, south of Milano consisted of a horizontal flight below 500 m passing east of the restricted airspace of Milano Linate airport followed by a short descent to about 300 m over the runway of the Lecco Monte Marenzo. North of this airfield the permitted airspace for visual flight rules extends up to 3000 m a.s.l. The aircraft here flew spirals climbing up to 3000 m over the city of Lecco and the nearby Lago di Pusiano. A short horizontal transect led west to the city of Como, where the descent was flown with spirals of a diameter of <3 km. Reaching the level of ∼500 m a.g.l. the return flight passed Milano horizontally in the west. South of the river Po a second profile was added up to ∼1600 m a.s.l. before the flights finally ended at Spessa. Note that on 18 September, a modified flight track was chosen with the north-south transect also flown east of Milano.
In Fig. 17 the HCHO and aerosol profiles are compared to the MAX-DOAS results for the time of the aircraft measurements (±30 min). Note that the aerosol measurements do not provide aerosol optical properties, but aerosol concentration profiles (here profiles of the number densities with radii >300 nm are shown); thus only a qualitative comparison with the aerosol optical properties retrieved from MAX-DOAS is possible.
The vertical profiles of the aerosol and HCHO in-situ measurements were quite different on 18/19 September and 22 and 25 September. While the first two days resembled the vertical distributions of clear days without clouds, the latter days were more typical for cloudy conditions with some cloud processing and transport of aerosols and HCHO into layer above the planetary boundary layer. On the afternoon of 22 September and whole of 25 September clouds were present (see Fig. S15).
On 18 and 19 September 2003, similar HCHO and aerosol profiles were measured from the aircraft (Fig. 17a, b). The heights of the HCHO and aerosol layers range from 1000 m up to about 1400 m. The vertical gradient of the aerosol concentration is slightly steeper than that of HCHO. The HCHO layer height derived from MAX-DOAS is variable, but agrees roughly with the aircraft measurements. In contrast, the aerosol layer from MAX-DOAS height is systematically lower (by about 100 to 400 m). Besides possible measurement and retrieval errors, these differences might also be related to strong horizontal gradients as indicated by the difference of the profiles south and north of Milano. It should be noted that compared to other parts of the day the MAX-DOAS aerosol layer heights were lower during the aircraft measurements.
On 22   from MAX-DOAS are between 900 and 1300 m. The aerosol layer heights retrieved from MAX-DOAS are slightly higher than the lowest aerosol layer. Again large horizontal gradients of the aerosol concentration were measured by the aircraft.
On 25 September 2003 rather high layer heights (up to about 2000 m) were measured from the aircraft. Higher layer heights are also retrieved from MAX-DOAS; in particular the aerosol layer height agrees well with the aircraft profiles.
It is interesting to note that the HCHO mixing ratios were not correlated to large particles but were nearly proportional the small (ultra-fine) particle concentrations. These particles are co-emitted with HCHO during the frequent biomass burning events. This result is possibly not relevant for the HCHO MAX-DOAS measurements but explains the comparably high mixing ratios in the south.

Summary and conclusions
In this study a simple profile inversion scheme for the retrieval of aerosol extinction and trace gas concentrations from MAX-DOAS observations (similar to that developed by Li et al., 2010) is applied to MAX-DOAS measurements during the FORMAT-II campaign in September 2003 in Bresso (north of Milano, Italy) from 4-26 September 2003. A similar prototype study for MAX-DOAS profile retrievals for a limited data set was already conducted by Heckel et al. (2005). Our inversion scheme yields two profile parameters: besides the integrated quantities (trace gas VCD or aerosol optical depth), the layer height is also determined; from both quantities the average aerosol extinction or trace gas concentration is also obtained. In principle, information on the relative profile shape could be derived, but for our measurements only two independent parameters could be retrieved in a standardised way for all measurements. The profile inversion is performed for individual elevation sequences with a time resolution for individual profiles of about 10 min. Profile inversions were possible on 23 days (with several gaps mainly caused by clouds). According to the retrieved trace gas and aerosol data, three characteristic periods can be distinguished: The first period (4-14 September 2003) was partly cloudy with relatively low AOD and trace gas mixing ratios. The second period (from 15-22 September 2003) was characterised by many clear days (see also Junkermann, 2009;Liu et al., 2007;Steinbacher et al., 2005a, b;Wittrock, 2006) with enhanced with enhanced AODs and trace gas mixing ratios.
The third period (23-26 September 2003) was similar to the first period. For HCHO and aerosols in general similar layer heights were found; the NO 2 layer height was typically lower than for HCHO and aerosols, but increased systematically during the day. The temporal evolution of the MAX-DOAS results is similar to those described in other studies of the FORMAT-II campaign (Junkermann, 2009;Liu et al., 2007;Steinbacher et al., 2005a, b;Wittrock, 2006).
One speciality of our MAX-DOAS observations is the simultaneous measurement from three separate telescopes. During the first part of the campaign, the three telescopes were directed to the same azimuth angle (towards the south). From the differences between the results for the three telescopes the inherent precision of the profile inversions can be estimated. We estimated the consistency between the different telescopes from the slopes of the correlation analysis and the ratios between the respective results (see Sect. 5.2). For the aerosol profile inversion, the optical depths and layer heights for the three telescopes were consistent within ±10 % and ±7 %, respectively. For the NO 2 profile inversion, the VCDs, mixing ratios and layer heights were consistent within ±9 %, ±4 %, and ±6 %, respectively. For the HCHO profile inversion the VCDs, mixing ratios and layer heights were consistent within ±25 %, ±13 %, and ±31 %, respectively. The larger deviations of the HCHO results probably mainly reflect the larger errors of the DOAS retrieval, because the atmospheric HCHO absorptions are typically weaker than the NO 2 absorption.
During the second part of the campaign, the three telescopes were directed at three different azimuth angles (north, west, south). Now, larger differences between the three telescopes are found, which also reflect the effects of different relative azimuth angles and the spatio-temporal variability of the aerosol and trace gas concentrations. For the aerosol profile inversion, the optical depths and layer heights for the three telescopes were consistent within ±38 % and ±36 %, respectively. For the NO 2 profile inversion the VCDs, mixing ratios and layer heights were consistent within ±19 %, ±42 %, and ±26 %, respectively. For the HCHO profile inversion the VCDs, mixing ratios, and layer heights were consistent within ±35 %, ±24 %, and ±43 %, respectively. The large differences for the NO 2 mixing ratios are probably related to large horizontal gradients at the measurement site caused by nearby motorways in northerly and westerly directions. Here it might be interesting to note that possible future inversions algorithms for MAX-DOAS measurements with different azimuth angles might retrieve not only vertical profiles, but also horizontal gradients in one inversion step.
In addition to the comparisons between the different telescopes, the MAX-DOAS results were compared to the results of independent measurements. Depending on the viewing direction, the AODs retrieved from the MAX-DOAS observations were either found to be smaller or larger than the AERONET AODs (slopes of the regression lines and ratios between the data sets between 0.83 and 1.22). Here it should be noted that the AERONET station at Ispra is located about 50 km north-west of Bresso.
The NO 2 mixing ratios retrieved from MAX-DOAS are either smaller or larger than the results from the long path DOAS (slopes of the regression lines and average ratios between the data sets between 0.73 and 1.16). The HCHO mixing ratios retrieved from the MAX-DOAS observations are mostly higher than those retrieved from the long path DOAS (slopes of the regression lines and average ratios between the data sets between 1.08 and 1.54), and the Hantzsch instrument (slopes of the regression lines and average ratios between the data sets between 1.23 and 1.43). The correlation between the MAX-DOAS results and the independent measurements is similar to the correlation between both independent measurements themselves (Hantzsch instrument versus long path DOAS).
On 4 days, vertical profiles of HCHO and aerosols measured from an ultra light aircraft were available and were compared to the respective MAX-DOAS layer heights. The aircraft was flown around Milano, but unfortunately measurements directly above Bresso were not available due to airspace restrictions. Overall, reasonable agreement with the MAX-DOAS profile heights was found. Deviations might indicate errors of the MAX-DOAS measurements or the profile retrieval, but are probably also related to horizontal gradients.
Besides the profile inversions for aerosols and trace gases, an important aspect of our study was to investigate the effects of clouds on the inversion results. For that purpose, a cloud discrimination scheme was developed and applied, which makes use of the results of the zenith viewing directions of the MAX-DOAS measurements. Based on this scheme, the effects of clouds on the profile inversion results were investigated. It was found that the aerosol optical depth is systematically underestimated and the HCHO mixing ratio is systematically overestimated in the presence of clouds. In contrast, the NO 2 mixing ratios are only slightly affected. These findings could be in principle reproduced by radiative transfer simulations.
Our study demonstrates that a simple profile inversion procedure for aerosols and trace gases can be successfully applied to MAX-DOAS observations in the UV. Together with the cloud classification scheme this method is well suited for use on a routine basis. One important limitation of our MAX-DOAS observations was the lack of very low elevation angles (<3 • ). Future measurements should include such low elevation angles to improve the sensitivity of the method to retrieve relative profile shapes.