# Construction of Nighttime Cloud Layer Height and Classification of Cloud Types
## 3 Method
The bands are chosen for their widely accepted usage in retrieving cloud cover, cloud top properties (CTP/CTT/CTH), and cloud phase [10; 30; 31]. The search range of potential donors along the RXS is denoted as \(m\)\(\in\)\([i-m_{1}\cup i+m_{2}]\), as shown in Equation (1), where \(i-m_{1}\) indicates the distance in the backward direction, and i + \(m_{2}\) indicates the distance in the forward direction of the track. This search range is optimized by [PERSON] et al. [22] using following extension conditions:  
\[m_{1}=m_{2}=\{200;\cdots;m_{n}\leq 30\atop 200+D_{m}\sim D_{m}>30\prime, \tag{2}\]  
where \(Dm\) is calculated as the shortest distance between the recipient and the RXS. The third step introduces additional constraints with BTD and passive retrieved cloud characteristics. Although limited in accuracy, measurements from passive sensors such as MODIS can convey cloud vertical geometric information to a certain extent. Previous studies have used retrieved data as constraints in the similar match-and-substitute process [22; 25]. For the NSRM method, the difference of CTP, CTT, and CTH between the selected donor and the recipient are constrained using the following formula:  
\[\frac{\big{|}\hat{C}(i,j)-\hat{C}(m,0)\big{|}}{\hat{C}(i,j)}\leq\alpha, \tag{3}\]  
where \(\hat{C}\) is the retrieved characteristic at each pixel, and \(\alpha\) is a ratio factor of tolerance. Similarly, the BTD [29; 30; 31] and the BTD [31; 32] between the donor-recipient pair are constrained by \(\beta\):  
\[BTD[29-31]+BTD[31-32]\leq\beta, \tag{4}\]  
The BTDs are calculated using the radiance measurements from the MODIS021 KM product. For example, BTD [31; 32] is calculated using Equations (5) to (7):  
\[BTD[31-32]=T_{31}-T_{32}, \tag{5}\]  
\[T=\bigg{[}\frac{hc}{k\lambda}\bigg{]}\frac{1}{\ln[2 hc^{2}\lambda^{-5}L^{-1}+1 ]}, \tag{6}\]  
\[L=\frac{2 hc^{2}\lambda^{-5}}{[e^{\frac{hc}{k\lambda}}-1]}, \tag{7}\]  
where \(L\) is the blackbody radiance (Wm\({}^{-2}\)sr\({}^{-1}\)um\({}^{-1}\)), \(T\) is the brightness temperature from a central wavelength, \(c\) is the light speed (\(2.998\times 10^{8}\) ms\({}^{-1}\)), \(\lambda\) is the sensor's central wavelength (um), \(h\) is the Planck constant (\(6.626\times 10^{-34}\) Js), and \(k\) is the Boltzmann constant (\(1.380\times 10^{-23}\) JK\({}^{-1}\)). The value of \(\alpha\) is set to be 0.3 in this work, while the value of \(\beta\) is set to 1.5. The influence of changing \(\alpha\) or \(\beta\) to different values is discussed in the next section. In the last step, the potential donors that meet the additional constraints are ordered from the smallest to the largest according to their \(F(i,j;m)\). The goal is to selected donor pixel (\(m^{*}\),0), which is the closest to the targeted recipient and has sufficiently similar radiances as well as passive retrieved characteristics. This is expressed as:  
\[\underset{m^{*}\in[1,(m_{1}+m_{2}+1)/f]}{\text{argmin}}\{D(i,j;m^{*})\};f\in(0,1), \tag{8}\]  
where \(D(i,j;m)\) is the Euclidean distance between a potential donor at (\(m\),0) and the recipient at (\(i,j\)), calculated for potential donors with the smallest 100\(f\)% of \(F(i,j;m)\). In this study, \(f\) is set to be 0.03.