# Construction of Nighttime Cloud Layer Height and Classification of Cloud Types
## 3 Method  
The algorithm proposed in this work was used to construct a nearby cloud vertical structure along the CloudSat ground track based on solely IR measurements and passive retrieved properties. The algorithm was adapted to nighttime scene construction following the same principle of the SRM hypothesis as well as its major steps [18; 22]. To reiterate briefly, the assumption is that if two pixels have sufficiently similar multi-spectral radiances, their vertical structures and column properties can be assumed to be similar. Therefore, the profiles and other properties, including cloud classification, of a pixel retrieved by active sensors along the track could be attributed to a pixel off-track. For detailed explanation and verification, please see the referenced works. In this work, different IR bands from MODIS and brightness temperature difference (BTD) among these bands were used in the selection of potential donor pixels. Cloud top properties, including cloud top pressure (CTP), temperature (CTT), and height (CTH), were used as additional constraints. In the following section, the proposed algorithm is referred to as the nighttime similar radiance matching (NSRM) method. Figure 1 shows the concept diagram of the method and comparison in this work. The NSRM method includes four major steps. The first step is orbit registration, which is introduced in [PERSON] and [PERSON] [29]. The measurements from the active sensors are collocated with MODIS measurements along the track, which create a narrow cross section of pixels with both active and passive measurements. This area is referred to as the active-passive retrieved cross section (RXS). In another word, the construction algorithm expands the cloud profiles in the RXS (the constructed cloud structure is referred to as RXS-expand in the following context), and thereby provides a possible way to classify off-track cloud types during the nighttime. After the orbit registration process, the pixels with both active and passive measurements in the RXS are noted as potential donors. In contrast, pixels off-track, which only have passive measurements and need to be filled with vertical information, are noted as recipients. The essential of the scene construction method is to match each recipient within passive range (_i,j_) for all \(i\) and \(j\in[-]\),\(-1]\cup[1,J]\) with the most appropriate donor (\(m^{*}\),0) and attribute the donor's profile for the corresponding recipient. To find the best matching pixels, the potential donors of a certain recipient are first filtered for the background conditions. Potential donors need to satisfy the following criteria to be considered a possible match for the specific recipient:  
1. The potential donors must have the same surface type as the recipient. The surface type of each pixel is obtained from the MYD03 land/sea mask product. 2. The potential donors must be similar enough in their solar positions to the recipient. The difference of both solar zenith angles and solar azimuth angles need to be negligible. Figure 1: Flowchart of the This nighttime spectral radiance matching (NSRM) method and the verification process in this work. In the demonstration of orbit registration, the yellow line indicates the track of CloudSat, while the grids are pixels of Moderate Resolution Imaging Spectroradiometer (MODIS). 3. The potential donors must have the same cloud scenario as the recipient, which means they are either both cloudy or both clear in the MYD06 cloud mask flags. 4. Based on the availability, potential donors should ideally have sufficiently small uncertainties with their retrieved properties. For potential donors with right background conditions, a cost function \(F(i,j;m)\) is computed as: \[F(i,j;m)=\sum_{k=1}^{K}\big{(}\frac{r_{k}(i,j)-r_{k}(m,0)}{r_{k}(i,j)}\big{)}^{ 2};m\in[i-m_{1},i+m_{2}],\] (1) where \(r_{k}\) is the MODIS radiance for the \(k^{th}\) band for each pixel. The NSRM method uses radiances from five bands (\(k=5\)).