An algorithm has been developed to retrieve altitude information at di8erent diurnal stages for trace gasspecies by combining direct-sun and zenith-sky UV-visible di8erential slant column density (DSCD) measurements.DSCDs are derived here using di8erential optical absorption spectroscopy. Combining the complementaryzenith-sky measurements (sensitive to the stratosphere) with direct-sun measurements (sensitive to thetroposphere) allows this vertical distinction. Trace gas species such as BrO and NO2 have vertical pro)leswith strong diurnal dependence. Information about the diurnal variation is simultaneously retrieved with thealtitude distribution of the trace gas. The retrieval is a formal optimal estimation pro)le retrieval, allowing acomplete assessment of information content and errors.