Development of Fog Detection Algorithm Using GK2A/AMI and Ground Data

Fog affects transportation due to low visibility and also aggravates air pollutants. Thus, accurate detection and forecasting of fog are important for the safety of transportation. In this study, we developed a decision tree type fog detection algorithm (hereinafter GK2A_FDA) using the GK2A/AMI and auxiliary data. Because of the responses of the various channels depending on the time of day and the underlying surface characteristics, several versions of the algorithm were created to account for these differences according to the solar zenith angle (day/dawn/night) and location (land/sea/coast). Numerical model data were used to distinguish the fog from low clouds. To test the detection skill of GK2A_FDA, we selected 23 fog cases that occurred in South Korea and used them to determine the threshold values (12 cases) and validate GK2A_FDA (11 cases). Fog detection results were validated using the visibility data from 280 stations in South Korea. For quantitative validation, statistical indices, such as the probability of detection (POD), false alarm ratio (FAR), bias ratio (Bias), and equitable threat score (ETS), were used. The total average POD, FAR, Bias, and ETS for training cases (validation cases) were 0.80 (0.82), 0.37 (0.29), 1.28 (1.16), and 0.52 (0.59), respectively. In general, validation results showed that GK2A_FDA effectively detected the fog irrespective of time and geographic location, in terms of accuracy and stability. However, its detection skill and stability were slightly dependent on geographic location and time. In general, the detection skill and stability of GK2A_FDA were found to be better on land than on coast at all times, and at night than day at any location.


Introduction
Fog is a meteorological phenomenon that occurs near the Earth's surface and affects human activities in various ways [1][2][3]. Fog affects transportation due to low visibility [1,2,[4][5][6]. Moreover, it often damages crops and aggravates air pollutants due to solar energy reduction and temperature inversion [7,8]. Therefore, its accurate detection is important for not only reducing traffic problems but also studying climate and air quality [1].
Many studies have analyzed the characteristics of fog and detected it using ground observation, numerical model, and satellite data [3,5,[9][10][11][12][13]. As the spatio-temporal variation of fog is strong, fog detection, especially with satellite data, is significantly advantageous [1,14,15]. Geostationary satellites have wide spatial coverage, unlike polar-orbit satellites and ground observation data [14,[16][17][18], with high temporal resolution being their biggest advantage because of the possibility of continuous monitoring of fog and utilization of their data for short-term forecasts [1].

Materials
In this study, mainly GK2A/AMI and numerical weather model (NWP) data, obtained from the National Meteorological Satellite Center (NMSC) of Korea Meteorological Administration (KMA), were used for fog detection. As auxiliary data, land sea mask, land cover data, and snow cover were used. Visibility data (unit: km) measured by a visibility meter obtained from KMA were used to validate the fog detection results. The characteristics of the selected channels among the 16 channels of GK2A/AMI are presented in Table 1. IR13.3 13.21 13. 39 2 The brightness temperature at 11 µm (CSR_BT11) obtained from clear sky radiance (CSR) was used as the surface temperature for clear sky to distinguish between fog and low clouds. The CSR data were obtained through the simulation of the radiative transfer model, RTTOV version 12.1, using the vertical profile data of temperature and moisture provided by the numerical weather prediction model operated by KMA [20]. The spatial resolution and temporal frequency of CSR_BT11 were 10 km and 1 h, respectively. As the spatio-temporal resolution differs between CSR_BT11 and satellite data, spatio-temporal matching was necessary for the simultaneous use of both data. Therefore, CSR_BT11 was interpolated to fit the spatio-temporal resolution of the satellite data. The land sea mask data was categorized into three types: land, sea, and coast. The coastal area was defined by 3 × 3 pixels from the coastline, as shown in Figure 1 (white lines). In addition, a land cover map was used to reduce the false-detected pixels in the desert area having spectral emissivity similar to that of the fog, with a lower emissivity of channel 7 than that of channel 13. The snow cover data obtained from NMSC were also used to minimize the false detection of fog in the snow-covered area. The spatial distribution of the visibility meter is shown in Figure 1. The number of stations was approximately 280, with the observing frequencies as 1 min. We used the recalculated 10 min average visibility data obtained from KMA, as the temporal frequency of the satellite fog product was 10 min.
For qualitative analysis, the fog detection results of COMS Meteorological Data Processing System (CMDPS) and fog product of red-green-blue (RGB) composite using GK2A were used. The NMSC has been operationally detecting fog using CMDPS since April 2011. Here, CMDPS is a set of algorithms that retrieve various weather elements, such as fog and sea surface temperature, from COMS data, the first geostationary satellite of Korea. The fog product of RGB using GK2A uses BT12.3 − BT10.5, BT10.5 − BT3.9, and BT10.5 in red, green, and blue, respectively, like the Night Microphysics RGB used in EUMATSAT to derive a composite image [28].
to reduce the false-detected pixels in the desert area having spectral emissivity similar to that of the fog, with a lower emissivity of channel 7 than that of channel 13. The snow cover data obtained from NMSC were also used to minimize the false detection of fog in the snow-covered area. The spatial distribution of the visibility meter is shown in Figure 1. The number of stations was approximately 280, with the observing frequencies as 1 min. We used the recalculated 10 min average visibility data obtained from KMA, as the temporal frequency of the satellite fog product was 10 min.  We selected 23 fog cases (23 cases × 24 h/cases × 6 scenes/h = 3312 scenes) that occurred around the Korean Peninsula, and 12 of these were used as training cases (T#) for determining the threshold values and 11 were used for validating the fog detection algorithm, as shown in Table 2. The total number of scenes for the training and validation cases (V#) were 1728 (=12 training cases × 24 h × 6 scenes/h) and 1584 (=11 validation cases × 24 h × 6 scenes/h), respectively. These training and validation fog cases were selected based on the order of fog occurrence time, from July to September, 2019 and from October, 2019 to March, 2020, respectively. To assess the detection level of the fog detection algorithm developed in this study, we included fog cases with very few fog stations for local fog cases (V8 and V9 in Table 2). Table 2. Summary of the fog cases used for training (T) and validation (V) of the fog detection algorithm. The number of fogs and stations indicate the number of visibility meters, showing a visibility of less than 1 km and the total number of visibility meters used for validation, respectively.

Methods
The fog detection algorithm of GK2A (GK2A_FDA) consists of three parts, as shown in Figure 2. The upper left part sets the initial threshold values of various test elements (e.g., DCD, BTD) through histogram analysis and prepares the background data, such as the 30-day composite visible channel Remote Sens. 2020, 12, 3181 5 of 24 reflectance (Vis_Comp). The lower left part optimizes the threshold values of various test elements through sensitivity tests based on Hanssen-Kuiper skill score (KSS) using the training cases and visibility meter data. The right part shows the entire process of the fog detection algorithm from reading the data to validating the fog detection results. As the availability of AMI channels depends on the time of the day and the characteristics of the background differ based on the geographic location, we developed nine types of fog detection algorithms based on SZA (day, dawn/twilight, and night) and surface type (land, coast, and sea), as shown in Figure 3. The threshold values of SZA for separating fog detection algorithms were determined based on the maximum total fog detection level obtained through intensive sensitivity tests.     As fog is a complex phenomenon and AMI has 16 channels, we used various test elements based on the optical and textural properties of the fog to distinguish it from other objects (clear, low cloud, middle-high cloud, snow, etc.), as shown in Table 3. In this study, an algorithm based on a decision tree method was developed to remove the non-fog pixels after the first detection of the fog candidate pixels among all pixels using following steps. In the first step, the fog candidate pixels were mainly detected by the difference (∆VIS) of reflectance at daytime and the DCD at nighttime [5,6,16]. The difference of reflectance means the difference between the reflectance of 0.64 µm and Vis_Comp as clear sky reflectance. Vis_Comp of a pixel was obtained through the minimum value composition of the reflectance of 0.64 µm during the past 30 days, including the fog detection day [5]. The Vis_Comp data were obtained every 10 min considering different SZAs. We used 30 days for generating Vis_Comp as the Korean Peninsula is affected by the monsoon system, with frequent occurrence of clouds for more than 15 days, especially during summer.
It is difficult to distinguish between fog and clouds, such as low cloud or ice cloud, with only ∆VIS and DCD. Therefore, the difference (∆FTs) between the brightness temperatures of the top of the fog and surface temperature, local standard deviation (LSD), and normalized LSD (NLSD) were used. As the top height of the fog was lower than that of the clouds (low, middle, and high clouds), the ∆FTs was used to distinguish the fog from low clouds. In general, the top of the fog is relatively smoother than that of the cloud because fog mainly occurs when the boundary layer of the atmosphere is stable. Thus, we used the LSD of the brightness temperature (LSD_BT11.2) and NLSD of the reflectance (NLSD_vis). NLSD implies the division of standard deviation by the average of 3 × 3 pixels [2]. Clear pixels misclassified as fog in the first step were reclassified using CO 2 channel (13.3 µm) and 8.6 µm [29,30]. BTD between 13.3 and 11.2 µm was only used during daytime. BTD between 8.6 and 10.5 µm was mainly used to distinguish between ice and water clouds [31,32]. To distinguish fog from clear pixels or ice cloud (e.g., cirrus), a brightness temperature of 8.6 µm was used as it can be used regardless of day and night. In addition, remaining pixels with optically thin middle-high clouds or partly clouded were removed using BTD between 10.5 and 12.3 µm [13,17]. 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 A1 in Appendix A.

Time
Step In South Korea, various types of fog, such as radiation fog, occur, and although there are differences depending on geographic location, about 26.5 days of fog occur on average. According to Lee and Suh [33], radiation fog occurs frequently at a rate of 58.5% (especially, 71.3% in inland) for annual total fog events occurring in South Korea from 2015 to 2017. Even for thick fog with visibility less than 100 m, 62.4% is radiation fog (especially, 86.2% in inland). Most radiation fog dissipates rapidly after sunrise [34]. Thus, we applied a fog life cycle and strict threshold tests to remove the falsely detected fog after sunrise (SZA < 60 • ) assuming the non-occurrence of new radiation fog during the day. The life cycle test reclassified the newly detected fog after sunrise into non-fog pixels as fog disappeared after sunrise. NDSI was used to reclassify the fog pixels with vague properties into non-fog pixels. NDSI, which is usually used to detect snow, can be used for separating clear pixels from falsely detected fog pixels due to their different characteristics on the spectrum, compared to soil and fog [35].
As the algorithms were developed differently according to SZA and geographic location, a spatio-temporal discontinuity in the fog detection results was inevitable. Therefore, we applied the blending method to minimize the discontinuity at dawn and in the coastal area. Fog detection using satellite data during dawn/twilight and in coastal areas has been significantly difficult because of the unavailability of visible channel and DCD and complex background [36]. In order to mitigate the temporal discontinuity that occurs during dawn, the night fog detection results and the dawn fog detection results were blended under the assumption that the fog generated at night persists even during the dawn period. Additionally, in order to mitigate the spatial discontinuity occurring at the coast, the fog detection algorithm of land and sea was applied at the same time, and the two detection results were blended. In this case, if the results of both algorithms were the same, the final result remained the same as shown in Figure 4. Whereas, if the two detection results were different from each other, they were adjusted using the results of the surrounding detection. If the majority of the coast, the fog detection algorithm of land and sea was applied at the same time, and the two detection results were blended. In this case, if the results of both algorithms were the same, the final result remained the same as shown in Figure 4. Whereas, if the two detection results were different from each other, they were adjusted using the results of the surrounding detection. If the majority of the 3 × 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. 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 × 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 × 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 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 × 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 × 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: Hit_ref = (Hit + Miss)(Hit + False alarm)/(Hit + Miss + False alarm + Correct Negative), 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: Remote Sens. 2020, 12, 3181 where N is the total number of fog cases (training cases: 12 and validation cases: 11); x i is the evaluation matrix, POD, FAR, Bias, and ETS of each fog case; and x is the average of x i . Like FAR, the closer the standard deviation is to zero, the better the stability of the detection level.

Frequency Analysis for Setting Threshold Values
To set the initial thresholds for each test element, the frequency analysis of the test elements over the fog was performed using the 1728 scenes from the training cases. Fog pixels were selected using the co-located visibility meter data and visual inspection. Figure 5 shows the frequency distribution of the three test elements according to day and night on land. The average DCD was −2.7 K, and most DCDs were less than 0 K (98%) during nighttime ( Figure 5a). Pixels above 0 K were mainly found in sub-pixel-sized fog. ∆FTs showed a non-negligible difference between day and night (Figure 5b,d).
Most ∆FTs during the nighttime were greater than 0 K ( Figure 5b); however, most ∆FTs during daytime were less than 1 K (Figure 5d). This could be due to diurnal variation in the temperature profile at the boundary layer, strong inversion during nighttime, and the lapse rate profile during daytime. Most ∆VISs were greater than 3%, with some reaching 25% ( Figure 5a). Fog pixels with ∆VISs less than 2-3% were the cases with sub-pixel-sized fog or weak fog or limitation of the visibility meter. The distribution of the histogram in each test element appeared broad due to the complexity and diversities in the fog and background. The initial threshold values determined from the frequency analysis were statistically optimized using iterative sensitivity tests. The optimized threshold values were selected when KSS was maximum. Since there is no visibility system in the ocean, the threshold was set by visual analysis of the spatial distribution of the test elements along with the frequency analysis using the visibility meter installed on the coast (including the islands) as shown in Figure 6. The final thresholds were set after the sensitivity test from initial thresholds through the visibility meter on the coast and islands. Since there is no visibility system in the ocean, the threshold was set by visual analysis of the spatial distribution of the test elements along with the frequency analysis using the visibility meter installed on the coast (including the islands) as shown in Figure 6. The final thresholds were set after the sensitivity test from initial thresholds through the visibility meter on the coast and islands. Since there is no visibility system in the ocean, the threshold was set by visual analysis of the spatial distribution of the test elements along with the frequency analysis using the visibility meter installed on the coast (including the islands) as shown in Figure 6. The final thresholds were set after the sensitivity test from initial thresholds through the visibility meter on the coast and islands.

Fog Detection Results
Fog detection results from the GK2A/AMI data set are shown in Figures 7-10 along with the fog detection results of CMDPS, fog product of RGB composite using GK2A, image of the visible channel (0.64 μm), and ground-observed visibility data. Qualitative analysis was conducted by selecting two fog cases from the training cases (Figures 7 and 8) and validation cases (Figures 9 and 10), respectively. To qualitatively evaluate the detection level based on fog intensity, the two fog cases (strong and wide area, weak and local fogs) were used. As shown in the visibility meter and color composite (Figure 7b,d), the fog was strong and widespread in most parts of South Korea. This was a typical radiation fog that occurred in the inland areas of South Korea during fall. The visual comparison of fog detection results with the visibility data and color composite indicated that both GK2A_FDA and CMDPS effectively detected the fog in terms of spatial distribution in South Korea (Figure 7a,c). Compared to the visibility and color composite map, GK2A _FDA appeared to slightly over-detect the fog. Figure 8 shows a relatively weak and localized case of fog. The visibility meter showed that fog occurred only at the very few stations located in the central to northern parts of South Korea; however, the visibility in most inland areas in South Korea was less than 2 km. Moreover, the image of the visible channel showed a wide distribution of fog/low cloud and middle cloud over the central and northern parts of South Korea. GK2A_FDA and CMDPS were found to effectively detect the spatial pattern of the fog over the central and northern parts of South Korea. However, compared to the visibility meter (Figure 8b), both algorithms certainly over-detected the fog. This over-detection was

Fog Detection Results
Fog detection results from the GK2A/AMI data set are shown in Figures 7-10 along with the fog detection results of CMDPS, fog product of RGB composite using GK2A, image of the visible channel (0.64 µm), and ground-observed visibility data. Qualitative analysis was conducted by selecting two fog cases from the training cases (Figures 7 and 8) and validation cases (Figures 9 and 10), respectively. To qualitatively evaluate the detection level based on fog intensity, the two fog cases (strong and wide area, weak and local fogs) were used. As shown in the visibility meter and color composite (Figure 7b,d), the fog was strong and widespread in most parts of South Korea. This was a typical radiation fog that occurred in the inland areas of South Korea during fall. The visual comparison of fog detection results with the visibility data and color composite indicated that both GK2A_FDA and CMDPS effectively detected the fog in terms of spatial distribution in South Korea (Figure 7a,c).   In the validation case ( Figure 9), both GK2A_FDA and CMDPS effectively detected the fog similar to the training case ( Figure 7). In this case, GK2A_FDA slightly over-detected the fog and CMDPS under-detected the fog compared to the visibility meter and image of the visible channel, in particular, in the south-western part of South Korea. Figure 10 shows the case of a localized fog with mid to high clouds. Fog was observed to occur in most parts of South Korea, significantly scattered with a widespread low visibility over South Korea. Both fog detection algorithms detected the fog in the north-western part of South Korea but could not detect it in the central to southern parts of South Korea due to the presence of mid to high clouds. This is a typical case where any satellite equipped with optical sensors is unable to observe the lower parts of the clouds. Therefore, in this study, when the clout top height was more than 2 km (ΔFTs greater than 10 K), it was regarded as a cloud and excluded from validation.  In the validation case (Figure 9), both GK2A_FDA and CMDPS effectively detected the fog similar to the training case (Figure 7). In this case, GK2A_FDA slightly over-detected the fog and CMDPS under-detected the fog compared to the visibility meter and image of the visible channel, in particular, in the south-western part of South Korea. Figure 10 shows the case of a localized fog with mid to high clouds. Fog was observed to occur in most parts of South Korea, significantly scattered with a widespread low visibility over South Korea. Both fog detection algorithms detected the fog in the north-western part of South Korea but could not detect it in the central to southern parts of South Korea due to the presence of mid to high clouds. This is a typical case where any satellite equipped with optical sensors is unable to observe the lower parts of the clouds. Therefore, in this study, when the clout top height was more than 2 km (ΔFTs greater than 10 K), it was regarded as a cloud and excluded from validation.     Table 5 shows the results of quantitative validation using the visibility meter for the 12 training cases. The total average POD, FAR, Bias, and ETS were 0.80, 0.37, 1.28, and 0.52, respectively. In  Figure 8 shows a relatively weak and localized case of fog. The visibility meter showed that fog occurred only at the very few stations located in the central to northern parts of South Korea; however, the visibility in most inland areas in South Korea was less than 2 km. Moreover, the image of the visible channel showed a wide distribution of fog/low cloud and middle cloud over the central and northern parts of South Korea. GK2A_FDA and CMDPS were found to effectively detect the spatial pattern of the fog over the central and northern parts of South Korea. However, compared to the visibility meter (Figure 8b), both algorithms certainly over-detected the fog. This over-detection was attributed to the dissipation pattern of radiation fog after sunrise. The solar heating of the land surface can increase the land surface and surface boundary layer temperatures, thereby dissipating the lowest layer fog. Thus, the visibility is increased to the level of mist, and fog is changed into low cloud, with no changes taking place at the top of the fog. This could be a main cause of false detection of low cloud as fog during daytime.

Quantitative Validation Results
In the validation case (Figure 9), both GK2A_FDA and CMDPS effectively detected the fog similar to the training case (Figure 7). In this case, GK2A_FDA slightly over-detected the fog and CMDPS under-detected the fog compared to the visibility meter and image of the visible channel, in particular, in the south-western part of South Korea. Figure 10 shows the case of a localized fog with mid to high clouds. Fog was observed to occur in most parts of South Korea, significantly scattered with a widespread low visibility over South Korea. Both fog detection algorithms detected the fog in the north-western part of South Korea but could not detect it in the central to southern parts of South Korea due to the presence of mid to high clouds. This is a typical case where any satellite equipped with optical sensors is unable to observe the lower parts of the clouds. Therefore, in this study, when the clout top height was more than 2 km (∆FTs greater than 10 K), it was regarded as a cloud and excluded from validation. Table 5 shows the results of quantitative validation using the visibility meter for the 12 training cases. The total average POD, FAR, Bias, and ETS were 0.80, 0.37, 1.28, and 0.52, respectively. In general, GK2A_FDA effectively detected the fog irrespective of the time and geographic location, in terms of POD, FAR, Bias, and ETS. However, the detection skill of GK2A_FDA was clearly dependent on the geographic location and time. In addition, the stability (SD: standard deviation) of GK2A_FDA was slightly different based on the geographic location and time. As shown by the KSS, the temporally averaged detection level on the land (KSS: 0.46) was better than that (KSS: 0.31) over the coastal area, and the spatially averaged detection level during nighttime (POD: 0.80, FAR: 0.34, and ETS: 0.54) and dawn (POD: 0.85, FAR: 0.36, and ETS: 0.53) was better than that (POD: 0.77, FAR: 0.47, and ETS: 0.44) during daytime. The SDs of POD, FAR, Bias, and ETS (0.16, 0.10, 0.28, and 0.11) were the smallest at night, which indicated that the fog detection algorithm for night was least sensitive to the fog cases. As shown in Table 6 (validation cases), the fog detection level of GK2A_FDA was very good and stable regardless of the region and time; the total POD, FAR, Bias, and ETS and their SDs were significantly similar to that of the training cases. The total average POD, FAR, Bias, and ETS for the 11 validation cases were 0.82, 0.29, 1.16, and 0.59, respectively; however, the SDs of POD, FAR, Bias, and ETS were 0.19, 0.28, 1.00, and 0.21, respectively, slightly higher than that of the training cases. In general, the fog detection level was slightly higher on land and slightly lower in the coastal area, irrespective of the time. In terms of fog detection time, the detection level was improved at all times, especially during the day (POD: 0.77 to 0.78, FAR: 0.47 to 0.30). However, GK2A_FDA over-detected the fog irrespective of the geographic location and time, similar to the training cases. Further, the detection skill and stability of GK2A_FDA were evidently dependent on the geographic location (better at land than at the coast) and time (better during the night than day), similar to the training cases.  Figure 11 shows the validation results based on the time for the 12 training and 11 validation cases used in this study. In general, the fog detection level was found to be significantly dependent on the characteristics (e.g., fog area) of the fog cases, irrespective of the detection time. In terms of POD and FAR, higher POD and lower FAR was observed for the cases with a large number of fog points and vice versa. The best and worst results were found in V3-V6 and T4, and V9-V10 cases, respectively, which had the highest and lowest numbers of fog points, respectively. The larger SD in the validation compared to the training cases was due to the larger variation in the number of fog points in the validation cases. For July 26 (T4), POD was equal to FAR at all times. A detailed analysis of the satellite images to find the causes of the low level of fog detection (not shown) revealed many fog pixels being covered with low-mid clouds, with no removal of the cloud pixels during validation because of the forecast error of CSR_BT11. This suggested that the quality of CSR_BT11 is very important in separating low to mid clouds from the fog. For 10 February 2020 (V9), FAR was higher than POD, regardless of the time. In this case, detecting the fog was significantly difficult because of the extremely local occurrence of the fog, with a semi-transparent cirrus above it. In the cases of T9 and V2, detection levels were found to be good at night and dawn, but POD was found to be a little higher than or similar to FAR during the day (Figure 11a). Similar to the V9 case, these was extremely locally occurring fog. Although GK2A_FDA was developed to remove partly and thin cirrus clouds, it still falsely detected partly clouds as fog on 17 September 2019 (T9).

Quantitative Validation Results
the extremely local occurrence of the fog, with a semi-transparent cirrus above it. In the cases of T9 and V2, detection levels were found to be good at night and dawn, but POD was found to be a little higher than or similar to FAR during the day (Figure 11a). Similar to the V9 case, these was extremely locally occurring fog. Although GK2A_FDA was developed to remove partly and thin cirrus clouds, it still falsely detected partly clouds as fog on 17 September 2019 (T9).

Discussion
In this study, we developed a decision tree type fog detection algorithm using GK2A/AMI and different types of auxiliary data, including the output of numerical forecast mode. For this, the most recent geostationary satellite data (GK2A/AMI, Himawari-8/AHI, Geostationary Operational Environmental Satellite (GOES)-R/Advanced Baseline Imager (ABI)), along with numerical model results, land/sea mask, land cover, snow cover data, etc. were required for fog detection using GK2A_FDA. The main advantages of GK2A_FDA were the different availability of satellite data based on the time of the day (day/dawn/night) and different backgrounds based on the geographic locations (land/coast/sea) considered. In addition, we not only evaluated the detection skills (POD, FAR, Bias, and ETS) but also the stability (their standard deviations) of GK2A_FDA using groundobserved visibility data for the 23 fog cases.
The total average POD, FAR, Bias, and ETS for the 12 training (11 validation Table 7 shows the validation results of fog detection using various satellite and auxiliary data using the ground observation data for the past five years (2014-2019). Due to difference in the areas analyzed, analysis periods, and satellite and auxiliary data used in this study, directly comparing them was difficult. However, when the number of fog cases and visibility meter data were used for validation, the detection level of the fog detection algorithm developed in this study was found to be similar or superior to that of the past algorithms.
In previous studies, all PODs and FARs were found to be less than 0.7 but greater than 0.31, respectively.

Discussion
In this study, we developed a decision tree type fog detection algorithm using GK2A/AMI and different types of auxiliary data, including the output of numerical forecast mode. For this, the most recent geostationary satellite data (GK2A/AMI, Himawari-8/AHI, Geostationary Operational Environmental Satellite (GOES)-R/Advanced Baseline Imager (ABI)), along with numerical model results, land/sea mask, land cover, snow cover data, etc. were required for fog detection using GK2A_FDA. The main advantages of GK2A_FDA were the different availability of satellite data based on the time of the day (day/dawn/night) and different backgrounds based on the geographic locations (land/coast/sea) considered. In addition, we not only evaluated the detection skills (POD, FAR, Bias, and ETS) but also the stability (their standard deviations) of GK2A_FDA using ground-observed visibility data for the 23 fog cases.
The total average POD, FAR, Bias, and ETS for the 12 training (11 validation) cases were 0.80 (0.82), 0.37 (0.29), 1.28 (1.16), and 0.52 (0.59), respectively, with their standard deviations being 0.15 (0.19), 0.13 (0.28), 0.38 (1.00), and 0.11 (0.21), respectively. Table 7 shows the validation results of fog detection using various satellite and auxiliary data using the ground observation data for the past five years (2014-2019). Due to difference in the areas analyzed, analysis periods, and satellite and auxiliary data used in this study, directly comparing them was difficult. However, when the number of fog cases and visibility meter data were used for validation, the detection level of the fog detection algorithm developed in this study was found to be similar or superior to that of the past algorithms. In previous studies, all PODs and FARs were found to be less than 0.7 but greater than 0.31, respectively. Although we tried to minimize the spatio-temporal discontinuities in the fog detection results, non-negligible spatio-temporal discontinuities existed in the fog detection results, as shown in Figure 13. Temporal and spatial discontinuities were found at the temporal boundary between dawn and daytime (Figure 13a,b), spatial boundary, and coastal lines (Figure 13c,d). Compared to the fog detection result at dawn (Figure 13a), a new fog was abruptly detected during daytime at the right side of the boundary line (Figure 13b). The coastal line contains many non-fog areas surrounded by the fog areas (Figure 13c,d). When considering the strong spatial continuity of the sea fog, we obtained blank areas, which can be considered as a type of spatial discontinuity. We optimized the threshold of SZA for separating dawn and daytime using various sensitivity tests; however, the discontinuities continued in many cases. A complete elimination of spatio-temporal discontinuities was impossible because the channels used were fundamentally different. Despite these fundamental limitations, more studies should be carried out for continuously detecting the fog, without considering time and geographic location. Although we tried to minimize the spatio-temporal discontinuities in the fog detection results, non-negligible spatio-temporal discontinuities existed in the fog detection results, as shown in Figure  13. Temporal and spatial discontinuities were found at the temporal boundary between dawn and daytime (Figure 13a,b), spatial boundary, and coastal lines (Figure 13c,d). Compared to the fog detection result at dawn (Figure 13a), a new fog was abruptly detected during daytime at the right side of the boundary line (Figure 13b). The coastal line contains many non-fog areas surrounded by the fog areas (Figure 13c,d). When considering the strong spatial continuity of the sea fog, we obtained blank areas, which can be considered as a type of spatial discontinuity. We optimized the threshold of SZA for separating dawn and daytime using various sensitivity tests; however, the discontinuities continued in many cases. A complete elimination of spatio-temporal discontinuities was impossible because the channels used were fundamentally different. Despite these fundamental limitations, more studies should be carried out for continuously detecting the fog, without considering time and geographic location.  The detection skills of GK2A_FDA over the sea were not quantitatively evaluated in this study because of the limited validation data. In many studies, Cloud-Aerosol Lidar and Infrared Pathfinder Satellite Observation (CALIPSO) data have been used for fog detection validation over sea [15][16][17]20,40]. Figure 14 shows a validation result for the sea fog detection of GK2A_FDA using Vertical Feature Mask (VFM) data produced from CALIPSO. The VFM data has an issue of incorrectly defining the sea fog layer as the surface (e.g., 37°N-40°N). As suggested by Wu et al. [40], if the backscattering of the layer defined as the surface is greater than 0.03 km sr , it is redefined as the sea fog layer. As the duration of sea fog is long, unlike land fog, the GK2A data were validated ± 20 min based on the passing time of CALIPSO. The VFM data showed that GK2A_FDA effectively detected the sea fog (POD: 0.80, FAR: 0.20, KSS: 0.60, and Bias: 1.00). When considering advection fogs that frequently occur in the western and southern seas to the Korean Peninsula, quantitative validation of the fog detection algorithm in the sea should be performed using the CALIPSO data and others [15,32,41]. The detection skills of GK2A_FDA over the sea were not quantitatively evaluated in this study because of the limited validation data. In many studies, Cloud-Aerosol Lidar and Infrared Pathfinder Satellite Observation (CALIPSO) data have been used for fog detection validation over sea [15][16][17]20,40]. Figure 14 shows a validation result for the sea fog detection of GK2A_FDA using Vertical Feature Mask (VFM) data produced from CALIPSO. The VFM data has an issue of incorrectly defining the sea fog layer as the surface (e.g., 37 • N-40 • N). As suggested by Wu et al. [40], if the backscattering of the layer defined as the surface is greater than 0.03 km −1 sr −1 , it is redefined as the sea fog layer. As the duration of sea fog is long, unlike land fog, the GK2A data were validated ± 20 min based on the passing time of CALIPSO. The VFM data showed that GK2A_FDA effectively detected the sea fog (POD: 0.80, FAR: 0.20, KSS: 0.60, and Bias: 1.00). When considering advection fogs that frequently occur in the western and southern seas to the Korean Peninsula, quantitative validation of the fog detection algorithm in the sea should be performed using the CALIPSO data and others [15,32,41].
In addition, for stable fog detection in the long term, it is necessary to improve the level of fog detection on daytime land and for weak or local fog. In particular, the quality of numerical models and background data should be improved for the accurate separation of fog from low to mid clouds. The detection skills of GK2A_FDA over the sea were not quantitatively evaluated in this study because of the limited validation data. In many studies, Cloud-Aerosol Lidar and Infrared Pathfinder Satellite Observation (CALIPSO) data have been used for fog detection validation over sea [15][16][17]20,40]. Figure 14 shows a validation result for the sea fog detection of GK2A_FDA using Vertical Feature Mask (VFM) data produced from CALIPSO. The VFM data has an issue of incorrectly defining the sea fog layer as the surface (e.g., 37°N-40°N). As suggested by Wu et al. [40], if the backscattering of the layer defined as the surface is greater than 0.03 km sr , it is redefined as the sea fog layer. As the duration of sea fog is long, unlike land fog, the GK2A data were validated ± 20 min based on the passing time of CALIPSO. The VFM data showed that GK2A_FDA effectively detected the sea fog (POD: 0.80, FAR: 0.20, KSS: 0.60, and Bias: 1.00). When considering advection fogs that frequently occur in the western and southern seas to the Korean Peninsula, quantitative validation of the fog detection algorithm in the sea should be performed using the CALIPSO data and others [15,32,41]. In addition, for stable fog detection in the long term, it is necessary to improve the level of fog detection on daytime land and for weak or local fog. In particular, the quality of numerical models and background data should be improved for the accurate separation of fog from low to mid clouds.

Conclusions
Fog affects transportation due to low visibility and impacts aggravates air pollutants. Thus, accurate detection and forecasting of fog are important for the safety of transportation and air quality management. We developed a decision tree type fog detection algorithm (GK2A_FDA) using the second geostationary satellite of South Korea, GK2A/AMI, and auxiliary data, such as numerical model output and land cover data. The ultimate goal of this study was to reduce the damage caused by fog through real-time fog detection using GK2A/AMI as a high-resolution geostationary satellite. In fact, the fog detection algorithm developed in this study has been temporarily in operation since July 2019. The GK2A/AMI has 16 channels, with a 2 (0.5-1) km spatial resolution in infrared (visible) channels. It observes the full disk and East Asian region every 10 and 2 min, respectively. The spatial resolution and temporal frequency of the surface temperature predicted by the numerical model operated by the KMA were 10 km and 1 h, respectively. The results of GK2A_FDA were validated using the visibility data from 280 stations in South Korea. We selected 23 fog cases (3312 scenes) that occurred across South Korea and used 1728 scenes to determine the threshold values and 1584 scenes to validate GK2A_FDA. As the spatio-temporal resolution of the satellite data, model output, and visibility data were different, the spatio-temporal co-location process was applied to simultaneously use both data.
Fog is a complicated phenomenon in terms of size and intensity. Additionally, AMI contains 16 channels and the quality of auxiliary data (e.g., numerical model output) has significantly improved; thus, we used its various combination of test elements for improving fog detection. We developed GK2A_FDA (nine types of fog detection algorithms) differently, according to the SZA (day, dawn, and night) and surface type (land, sea, and coast) considering the availability of satellite data during day and nighttime, and different background characteristics based on the geographic location. Thus, the test steps were 6 (6) and 5 (4) for day and nighttime on land (sea), respectively. The main test elements used for the day and night were the reflectance differences at 0.63 μm and DCD between the fog and other objects, respectively. The temperature difference between the top of the fog and surface has been commonly used for separating fog from low-to-mid clouds. The threshold values were optimized through the sensitivity tests for every test element using the 12 training cases after the initial setting of threshold values in the histogram analysis for the selected fog pixels. The fog detection results had a spatio-temporal discontinuity because of the different development of GK2A_FDA according to SZA and geographic location. Therefore, we included the fog detected at nighttime to minimize the discontinuity at dawn and calculated the weight sum of the land and sea

Conclusions
Fog affects transportation due to low visibility and impacts aggravates air pollutants. Thus, accurate detection and forecasting of fog are important for the safety of transportation and air quality management. We developed a decision tree type fog detection algorithm (GK2A_FDA) using the second geostationary satellite of South Korea, GK2A/AMI, and auxiliary data, such as numerical model output and land cover data. The ultimate goal of this study was to reduce the damage caused by fog through real-time fog detection using GK2A/AMI as a high-resolution geostationary satellite. In fact, the fog detection algorithm developed in this study has been temporarily in operation since July 2019. The GK2A/AMI has 16 channels, with a 2 (0.5-1) km spatial resolution in infrared (visible) channels. It observes the full disk and East Asian region every 10 and 2 min, respectively. The spatial resolution and temporal frequency of the surface temperature predicted by the numerical model operated by the KMA were 10 km and 1 h, respectively. The results of GK2A_FDA were validated using the visibility data from 280 stations in South Korea. We selected 23 fog cases (3312 scenes) that occurred across South Korea and used 1728 scenes to determine the threshold values and 1584 scenes to validate GK2A_FDA. As the spatio-temporal resolution of the satellite data, model output, and visibility data were different, the spatio-temporal co-location process was applied to simultaneously use both data.
Fog is a complicated phenomenon in terms of size and intensity. Additionally, AMI contains 16 channels and the quality of auxiliary data (e.g., numerical model output) has significantly improved; thus, we used its various combination of test elements for improving fog detection. We developed GK2A_FDA (nine types of fog detection algorithms) differently, according to the SZA (day, dawn, and night) and surface type (land, sea, and coast) considering the availability of satellite data during day and nighttime, and different background characteristics based on the geographic location. Thus, the test steps were 6 (6) and 5 (4) for day and nighttime on land (sea), respectively. The main test elements used for the day and night were the reflectance differences at 0.63 µm and DCD between the fog and other objects, respectively. The temperature difference between the top of the fog and surface has been commonly used for separating fog from low-to-mid clouds. The threshold values were optimized through the sensitivity tests for every test element using the 12 training cases after the initial setting of threshold values in the histogram analysis for the selected fog pixels. The fog detection results had a spatio-temporal discontinuity because of the different development of GK2A_FDA according to SZA and geographic location. Therefore, we included the fog detected at nighttime to minimize the discontinuity at dawn and calculated the weight sum of the land and sea algorithms in the coastal area. In addition, we eliminated the falsely detected fog pixels appearing in the snow or desert area using the snow cover map and land cover data.
The validation results of the 12 training and 11 validation cases showed that GK2A_FDA effectively detected the fog, irrespective of time and geographic location in terms of accuracy and stability. The total average POD, FAR, Bias, and ETS for the training (validation) cases were 0.80 (0.82), 0.37 (0.29), 1.28 (1.16), and 0.52 (0.59), respectively. The SDs of the total averages of POD, FAR, Bias, and ETS for the training (validation) cases were 0.15 (0.19), 0.13 (0.28), 0.38 (1.00), and 0.11 (0.21), respectively. In general, the detection skills and stability of GK2A_FDA were observed to be slightly increased and decreased in the validation cases, respectively, which were mainly related to the fog area (variations in the number of fog pixels), as shown in Figure 11, and were found to be slightly dependent on geographic location and time. In the training cases, the detection skill of GK2A_FDA was observed to be better on land (POD: 0.82, FAR: 0.37, and ETS: 0.54) than (POD: 0.72, FAR: 0.40, and ETS: 0.46) over the coastal area. The detection levels during nighttime (POD: 0.80, FAR: 0.34, and ETS: 0.54) and dawn (POD: 0.85, FAR: 0.36, and ETS: 0.53) were better than that (POD: 0.77, FAR: 0.47, and ETS: 0.44) during daytime. In addition, the detection skill of GK2A_FDA was found to be the most stable at night in terms of the standard deviation of POD (0.16), FAR (0.10), Bias (0.28), and ETS (0.11). Further, the detection skill of GK2A_FDA for the validation cases was found to be better at land (POD: 0.83, FAR: 0.28, Bias: 1.15, and ETS: 0.60) than at the coastal area (POD: 0.72, FAR: 0.43, Bias: 1.25, and ETS: 0.46), and better at night (POD: 0.83, FAR: 0.28, Bias: 1.16, and ETS: 0.60) than during the day (POD: 0.78, FAR: 0.30, Bias: 1.12, and ETS: 0.57), similar to the training cases. In order for the fog detection algorithm developed in this study to be used in a forecast office (e.g., NMSC/KMA), it is necessary to evaluate not only fog cases but also non fog cases (e.g., precipitation cases, clear cases). So, we will continue to evaluate the level of this fog detection algorithm using various fog and non-fog cases.