# Development of Fog Detection Algorithm Using GK2A/AMI and Ground Data
## 2 Materials and Methods
### Methods
If the majority of the \(3\times 3\) pixels around the given pixel were fog, then it was regarded as fog. During post-processing, falsely detected pixels appearing in the snow and desert areas were removed using the snow and land cover data, respectively. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Time** & **Step** & **Test Elements** & **Land** & **Sea** \\ \hline \multirow{8}{*}{Day} & 1 & \(\Delta\)VIS [\%] & 3.0 & 4.0 \\  & 2 & \(\Delta\)FTs [K] & \(-\)2.5 \& 1.0 & \(-\)4.0 \\  & 3 & NLSD\_vis & - & 0.30 \\  & 4 & BTD\_08\_10 [K] & \(-\)1.3 & - \\  & 5 & BTD\_10\_12 [K] & 4.0 & 4.0 \\  & 6 & BTD\_13\_11 [K] & \(-\)19.0 & \(-\)19.0 \\  & 7 & Strict threshold test & 4.0, \(-\)4.0, 0.10 & - \\  & & (\(\Delta\)VIS [\%], \(\Delta\)FIs[K], NLSD\_vis) & (used when SZA \(<\) 60\({}^{\circ}\)) & - \\  & 8 & DCD [K] & - & \(-\)1.0–23.0 \\ \hline \multirow{8}{*}{Night} & 1 & DCD [K] & \(-\)1.25 & \(-\)0.5 \\  & 2 & \(\Delta\)FTs [K] & \(-\)0.5 & \(-\)4.0 \\ \cline{1-1}  & 3 & LSD\_BT11.2 & 2.0 & 1.0 \\ \cline{1-1}  & 4 & BTD\_08\_10 [K] & \(-\)1.3 & - \\ \cline{1-1}  & 5 & BTD\_10\_12 [K] & 4.0 & 4.0 \\ \hline \multirow{8}{*}{Dawn} & 1 & Strict threshold test & \multirow{2}{*}{\(-\)1.9, \(-\)5.0, 0.8} & - \\  & 2 & BTD\_08\_10 [K] & \(-\)1.3 & - \\ \cline{1-1}  & 3 & BTD\_10\_12 [K] & 4.0 & 4.0 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Summary of the threshold values of the test elements, according to time and geographic location. The calculation method of each test element is described in Table 1 in Appendix A. Finally, fog detection results were validated using the visibility meter as the ground observation data. Due to the different spatial representativeness of the two data, particularly being relatively lower for the visibility data and GK2A/AMI having a navigation error, validation was performed using \(3\times 3\) pixels based on the satellite pixel closest to the visibility data for the same observation time [1]. The performance levels of GK2A_FDA were validated using the following evaluation metrics (probability of detection: POD, false alarm ratio: FAR, bias ratio: Bias, and equitable threat score: ETS) based on a \(2\times 2\) contingency table (Table 4). Pixels detected as fog matched with a visibility of less than 1 km (more than 1 km) were defined as hit (false alarm). POD, FAR, Bias, and ETS were calculated using Equations (1)-(6). POD and FAR values were obtained between 0 and 1, and exhibited higher detection levels as they approached 1 and 0, respectively. Bias was used as the indicator of over- or under-detection of fog. ETS has from \(-\)1/3 to 1. Like POD, ETS indicates a higher detection level as it approaches 1. KSS was the difference between POD and FAR, which ranged from \(-\)1 to 1; the closer the KSS to 1, the higher the fog detection level:  
\[\text{POD}=\text{Hit}/(\text{Hit}+\text{Miss}), \tag{1}\]  
\[\text{FAR}=\text{False alarm}/(\text{Hit}+\text{False alarm}), \tag{2}\]  
\[\text{Bias}=(\text{Hit}+\text{False alarm})/(\text{Hit}+\text{Miss}), \tag{3}\]  
\[\text{KSS}=\text{POD}-\text{FAR}, \tag{4}\]  
\[\text{Hit\_ref}=(\text{Hit}+\text{Miss})(\text{Hit}+\text{False alarm})/(\text{Hit}+\text{Miss}+\text{False alarm}+\text{Correct Negative}), \tag{5}\]  
\[\text{ETS}=(\text{Hit}-\text{Hit\_ref})/(\text{Hit}-\text{Hit\_ref}+\text{ Miss}+\text{False alarm}). \tag{6}\]  
To evaluate the stability of the fog detection level of the GK2A_FDA, we used the standard deviation (SD) of the evaluation matrix for the selected fog cases:  
\[\text{SD}=\sqrt{\frac{1}{N}\sum_{i=1}^{N}(x_{i}-\overline{x})^{2}}, \tag{7}\] \begin{table}
\begin{tabular}{c c c c} \hline \hline \multicolumn{4}{c}{**Satellite Detection Results**} \\ \hline \hline \multirow{2}{*}{**Visibility Meter**} & \multicolumn{2}{c}{Fog} & No Fog \\ \cline{2-3}  & Fog & Hit (H) & Miss (M) \\ \cline{2-3}  & No Fog & False (F) & Correct Negative (C) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Contingency table for fog detection validation. Figure 4: Conceptual diagram for the spatial blending method.