## 2 Methods
### Profile Retrieval
#### 2.5.4 Cloud Layer  
The _Cloud Layer_ algorithm identifies and characterizes clouds within the RCS data. Clouds are identified by their strong backscatter signals and significant deviations from the molecular profile. An initial search range is chosen from \(h_{\beta t}\) to a maximum altitude of \(h_{max}=23\) km above ground, found as the maximum overall cloud top height from a long-term analysis of LIDAR data taken at the ORM [9]. Note that low clouds lying within or just above the boundary layer without a range of free troposphere between, are analysed as part of the boundary layer in this scheme. This is, however, rather a semantic than physical difference, since the extinction profile will be derived correctly anyhow. Moreover, CTAO science observing conditions are normally not fulfilled when low cumulus clouds are present. For this reason, such conditions rarely need to be characerized as part of the CTAO science data analysis chain. The cloud analysis follows the following steps:  
**Search for cloud's lower bound. ** The algorithm scans the precomputed values \(C_{i}^{\min}\) and \(\chi_{i}^{2}/N_{\text{dof}}\) (see Equations (45) and (46)). If the reduced molecular fit \(\chi^{2}\) exceeds a predefined threshold of 3.5 and at the same time \(C_{i}^{\min}>C_{\textit{thres}}\), the algorithm considers this a potential cloud base. Both conditions require a significant positive deviation from the molecular backscatter profile, as expected for clouds. In the case of the (search for the) lowest cloud layer, \(C_{\textit{thres}}\) is chosen to be \(C_{\beta t}\); otherwise, a new reference constant needs to be taken for the free troposphere from above the last cloud layer below. The lower bound of the cloud is then refined by moving back downwards again until the reduced molecular fit \(\chi^{2}\) falls (again) below 1.5 and \(C_{i}^{\min}<C_{\textit{thres}}+1.5\cdot s_{\textit{C}_{i}}\). This part ensures that the signal transitions smoothly to the free troposphere. The previous step marks the cloud base height \(h_{\textit{base}}\), and with it a reference \(C_{\textit{thres}}\). **Identification of cloud's top. ** To find the height of the cloud top, the algorithm continues to scan the reduced molecular fit \(\chi^{2}\) upwards and stops when it falls again below 2.2 and \(C_{i}^{\min}<C_{\textit{thres}}+1.5\cdot s_{\textit{C}_{i}}\), ensuring that the cloud candidate absorbs light w.r.t. the molecular atmosphere part. From that point on, the algorithm moves further upwards as long as the \(C_{i}^{\min}\)'s decrease with respect to their immediate predecessor \(C_{i-1}^{\min}\). This part ensures that possible exponential drops of cloud density on their upper edges are correctly attributed to the cloud and not the free troposphere. The end of that step results in a cloud top height \(h_{\textit{top}}\), and with it a reference \(C_{\textit{top}}\). For a detected cloud, the VOD is calculated [66]:  
\[VOD_{\text{cloud}}=\frac{\left(C_{\textit{top}}-C_{\textit{thres}}\right) \cos\theta}{2} \tag{49}\]  
**Handling misidentified clouds. ** At this point, the algorithm carries out several checks to detect and discard false positives: (i) Clouds with \(VOD_{\text{cloud}}<10^{-4}\) discarded. (ii) Cloud with \(VOD_{\text{cloud}}<10^{-2}\) and geometric thickness (\(h_{\textit{top}}-h_{\textit{base}})<100\) m are considered statistical fluctuations and discarded. (iii) Frequent temperature fluctuations and inversion in the tropopause [67] are excluded by requiring that any cloud with \(h_{\textit{top}}>12\) km above ground (14.2 km a.s.l.) shows a geometric thickness larger than 4 km and \(VOD_{\text{cloud}}>0.015\). After these tests have been passed, the cloud is added to the list of detected clouds, and its extinction profile and LIDAR ratio are calculated. **Extinction and LIDAR ratio calculation. ** As in the case of the ground layer inversion, the reference point \(S_{i}\) at \(h_{\textit{top}}\) is exchanged by \(C_{\textit{top}}\), and the Klett-Fernald algorithm [61; 62; 63] used for the inversion.