An Improved Cloud Masking Method for GOCI Data over Turbid Coastal Waters

: Clouds severely hinder the radiative transmission of visible light; thus, correctly masking cloudy and non-cloudy pixels is a preliminary step in processing ocean color remote sensing data. However, cloud masking over turbid waters is prone to misjudgment, leading to loss of non-cloudy pixel data. This research proposes an improved cloud masking method over turbid water to classify cloudy and non-cloudy pixels based on spectral variability of Rayleigh-corrected reﬂectance acquired by the Geostationary Ocean Color Imager (GOCI). Compared with other existing cloud masking methods, we demonstrated that this improved method can identify the spatial positions and shapes of clouds more realistically, and more accurate pixels of turbid waters were retained. This improved method can be effectively applied in typical turbid coastal waters. It has potential to be used in cloud masking procedures of spaceborne ocean color sensors without short-wave infrared bands. in lake water, sediment-dominated and phytoplankton-dominated turbid coastal waters, and clearer Results show that the improved method in this study performs better


Introduction
Spaceborne sensors observe the Earth from above the top of atmosphere (TOA); hence, the presence of clouds is often inevitable in optical remote sensing images [1]. Effective ocean color and other surface information can only be extracted from cloudless pixels of satellite remote sensing images, as clouds can block the visible light emerging from the ocean to the sensor. Therefore, the detection and masking of cloud pixels is an essential and important step before further processing in various optical remote sensing applications [2].
Current statistical threshold cloud masking algorithms are mostly based on the analysis of optical and physical characteristics of cloud pixels, such as brightness temperature and reflectance variation, at different bands [3][4][5][6][7]. In infrared remote sensing, the algorithm package called APOLLO (AVHRR Processing scheme Over cLouds, Land and Ocean) has been used since the late 1980s, and its physics is the backbone of a series of cloud detection schemes for AVHRR (Advanced Very High Resolution Radiometer) heritage sensors. In APOLLO, the spatial coherence and dynamic visible threshold tests were conducted after a gross cloud check involving five daytime or nighttime tests. If the reflectance test ratio at near-infrared and visible bands is lower than 1.6 over land or larger than 0.75 over sea or the thin cirrus test using brightness temperatures at 11 µm and 12 µm fail, pixels are flagged as clear [8]. Subsequent studies were conducted to improve and document the APOLLO [9][10][11]. Thereinto, pixel properties, such as spectral and spatial variability [12,13], and multi-spectral polarization properties [14][15][16][17] are further considered. In operational processing of ocean color remote sensing, a threshold of Rayleigh-corrected reflectance (ρ rc ) at near-infrared bands is commonly used in cloud masking. For example, a threshold method of ρ rc (865 nm) ≥ 0.028 is used to automatically mask cloud pixels in standard atmospheric correction for the Geostationary Ocean Color Imager (GOCI) sensor. Considering band registration errors or cloud movements, it also masks out their neighboring 2 of 19 (up, down, left, and right) pixels [18]. A threshold method of ρ rc (869 nm) ≥ 0.027 is used by the Moderate-resolution Imaging Spectroradiometer (MODIS) onboard NASA's Earth Observing System (EOS) Aqua and Terra satellites [19][20][21]. For simplicity, hereinafter, we call these cloud masking procedure the NIR threshold method. Generally, such methods perform well over open ocean water, but clear pixels with optical characteristics of complex seawater are often mistaken as clouds over coastal water areas [22,23].
Complex water optical conditions affected by high phytoplankton biomass, intense blue-green algal (cyanobacteria) blooms, high suspended matter concentrations, or some anthropogenic factors [24][25][26][27] can lead to the failure of the standard threshold method in cloud masking. This often occurs in populated coastal waters, inland lakes, and estuaries. These waters usually have high reflectance at red and near-infrared bands well beyond standard thresholds due to significant contributions from high suspended matter concentrations and eutrophication. The mistaken discrimination of water and cloud reflectance is more likely to lead to the loss of cloudless pixels.
Existing cloud masking methods over coastal waters with complex optical properties can be divided primarily into two categories: threshold methods and machine learning algorithms. For sensors with infrared bands, considering that water absorbs strongly in the short-wave infrared (SWIR) spectral range, progresses have been made in cloud detection methods over turbid coastal waters. For the MODIS sensor, Wang and Shi suggested using the threshold reflectance of 0.0235 and 0.0215 at 1240 nm and 1640 nm [28]. For sediment-laden water in Greenland fjords, Hudson et al. used a difference threshold of 0.05 between TOA reflectance at 645 nm and that estimated at 865 nm, using an empirical relationship to classify turbid water from cloud pixels [29].
For some sensors without SWIR bands, such as the GOCI and Sea-viewing Wide Fieldof-view Sensor (SeaWiFS), the credibility of standard cloud identification methods is further diminished [30,31]. Wang and Shi proposed the use of Rayleigh-corrected reflectance ratios of two NIR bands and a Rayleigh-corrected reflectance threshold at 865 nm [28]. Firstly, thick cloudy pixels are masked out with ρ rc (865 nm) > 0.06. Then, for pixels with ρ rc (865 nm) ≤ 0.06 and ρ rc (865 nm) ≥ 0.027, pixels with ρ rc (745)/ρ rc (865 nm) ≤ 1.15 are also identified as clouds. For simplicity, hereinafter, we call this the Wang and Shi method. Nordkvist et al. also proposed a threshold method for cloud recognition based on spectral variability of Rayleigh-corrected reflectance over coastal waters [32]. This algorithm is based on standard ocean color wavelengths. It makes use of the lower spectral variability of clouds compared to that of water. Firstly, the Rayleigh-corrected reflectance of pixels at the four bands of 412 nm, 660 nm, 680 nm, and 865 nm was derived, and then spectral variability ε max was calculated as the maximum value of the reflectance at these four bands divided by the minimum value following The combination of ε max and ρ rc (865 nm) is used to identify whether the pixel is cloudless or not. When ε max exceeds 2.5 and ρ rc (865 nm) ≥ 0.027, pixels are classified as clouds. For simplicity, hereinafter, we call this the Nordkvist et al. method.
In addition, machine learning algorithms, such as support vector machine (SVM) [33], artificial neural networks [34], image segmentation, and deep convolutional neural network (CNN) [35][36][37][38], were also used in many studies in different waters. Machine learning methods usually bring good performance through a large amount of training data; however, their performance is also limited by the time and space range of their training samples.
The first geostationary ocean color sensor GOCI launched in June 2010 is equipped with eight spectral bands ranging from visible to near infrared (412 nm-865 nm) [22], and a second mission GOCI-II with 13 bands (380 nm-865 nm) was launched in February 2020. They can acquire 8/10 images daily with a spatial resolution of 500/250 m [39]. They offer good opportunities for researchers to study diurnal variabilities of coastal environment parameters. However, standard GOCI atmospheric correction processing systematically Remote Sens. 2021, 13, 2722 3 of 19 masks out data over very turbid waters and requires further corrections [40]. We also observed that in sediment-dominated particularly turbid waters, such as the Hangzhou Bay of China, existing cloud masking methods designed for coastal waters also often mistake turbid water pixels as clouds. Thus, in this study, to acquire more water surface pixels in GOCI processing over turbid coastal water, an improved threshold-based cloud masking algorithm is proposed based on the spectral variability of the Rayleigh-corrected reflectance of GOCI. Its performance was further compared with other existing methods. In this paper, the improved cloud mask method is first described. Then, its feasibility is demonstrated. Finally, the performance of the algorithm is evaluated and compared based on image interpretation in different GOCI scenarios.
In ocean color remote sensing, the optical properties of water constituents can be retrieved under the premise of an accurate atmospheric correction. The GOCI standard atmospheric correction algorithm [41] was developed based on the theoretical basis of the SeaWiFS standard atmospheric correction algorithm [42], though partially different in the turbid water near-infrared (NIR) correction method and the aerosol models. In the GOCI standard atmospheric correction procedure, the multiply scattered Rayleigh (molecular) reflectance is first removed from the TOA reflectance of ρ TOA (λ) following where ρ r (λ) means multiply scattered Rayleigh reflectance, ρ a (λ) means multiply scattered aerosol reflectance, and ρ ra (λ) means reflectance of interactively scattered between aerosols and molecules. In addition, td v r (λ) means diffuse Rayleigh transmittance from the sea surface to the sensor, td v a (λ) means diffuse transmittance of aerosols from the sea surface to the sensor, similarly, td v ra (λ) represents diffuse transmittance of Rayleigh and aerosol interaction from the sea surface to the sensor, and ρ w (λ) represents water-leaving reflectance [18]. Then, cloud masking is performed using Rayleigh-corrected reflectance (ρ rc (λ)) to retain cloud-free pixels. After that, aerosol contribution is estimated and removed, and, finally, the surface reflectance of the ocean is obtained. Thus, correctly masking cloudy and non-cloudy pixels is a preliminary step in processing ocean color remote sensing data.

An Improved Cloud Masking Method
As a preliminary check of existing cloud masking methods, we applied the NIR threshold method and the Nordkvist et al. method over the turbid water around the Hangzhou Bay and Yangtze River (120-124 • E, 29.5-33 • N) of China. Figure 1a shows the RGB image composited from the GOCI Rayleigh-corrected reflectance at 680 nm, 555 nm, and 443 nm at 05:16 (Coordinated Universal Time, UTC) on 10 February 2020. Figure 1b shows the pseudo-color images of ρ rc (865 nm). The red isolines represent the pixels with the threshold of ρ rc (865 nm) = 0.027 used in the NIR threshold method, and the white pixels were masked with ε max ≤ 2.5 used by the Nordkvist et al. method. threshold method and the Nordkvist et al. method over the turbid water around the Hangzhou Bay and Yangtze River (120-124°E, 29.5-33°N) of China. Figure 1a shows the RGB image composited from the GOCI Rayleigh-corrected reflectance at 680 nm, 555 nm, and 443 nm at 05:16 (Coordinated Universal Time, UTC) on 10 February 2020. Figure 1b shows the pseudo-color images of ρ (865 nm). The red isolines represent the pixels with the threshold of ρ (865 nm) = 0.027 used in the NIR threshold method, and the white pixels were masked with ε ≤ 2.5 used by the Nordkvist et al. method.
(a) (b) In standard ocean color data products, pixels with ρ (865 nm) ≥ 0.027 are often masked as clouds. The red isolines in Figure 1b represent ρ (865 nm) = 0.027. We can see that a large number of cloudless coastal turbid water pixels with ρ (865 nm) values higher than the red isolines can be mistaken as cloudy ones in standard ocean color data products [43]. By contrast, the Nordkvist et al. method performs better in most coastal turbid waters. Most cloudless coastal turbid water pixels are correctly recognized, but cloudless pixels with very turbid water or silt coast are still misjudged as clouds. Therefore, it is necessary to further improve existing cloud masking methods over very turbid water. In this paper, we propose an improved cloud masking scheme by combining additional threshold methods with the Nordkvist et al. method to address this problem.
Clear water pixels generally have low Rayleigh-corrected reflectance at the 865 nm band and high spectral variations and can be easily distinguished from cloud pixels by the NIR threshold method. However, for coastal turbid water pixels with complex optical characteristics, their Rayleigh-corrected reflectance values are generally higher than that of clear water at red and near-infrared bands and lower than that of clouds at short visible bands. These turbid water pixels are easily mistaken as clouds by the standard NIR threshold method.
To demonstrate the difference of spectral variability between turbid water and cloud pixels, eight samples of Rayleigh-corrected spectral reflectance were selected around sediment-dominated Hangzhou Bay from the GOCI data acquired at 07:16 (UTC) on 10 May 2018. Their spectral Rayleigh-corrected reflectance at 8 bands are shown in Figure 2a, and the sample locations are shown in Figure 2b. The arithmetic mean values of 3 x 3 pixels centered at each sample were used in order to reduce the random noise effects of the satellite data. In standard ocean color data products, pixels with ρ rc (865 nm) ≥ 0.027 are often masked as clouds. The red isolines in Figure 1b represent ρ rc (865 nm) = 0.027. We can see that a large number of cloudless coastal turbid water pixels with ρ rc (865 nm) values higher than the red isolines can be mistaken as cloudy ones in standard ocean color data products [43]. By contrast, the Nordkvist et al. method performs better in most coastal turbid waters. Most cloudless coastal turbid water pixels are correctly recognized, but cloudless pixels with very turbid water or silt coast are still misjudged as clouds. Therefore, it is necessary to further improve existing cloud masking methods over very turbid water. In this paper, we propose an improved cloud masking scheme by combining additional threshold methods with the Nordkvist et al. method to address this problem.
Clear water pixels generally have low Rayleigh-corrected reflectance at the 865 nm band and high spectral variations and can be easily distinguished from cloud pixels by the NIR threshold method. However, for coastal turbid water pixels with complex optical characteristics, their Rayleigh-corrected reflectance values are generally higher than that of clear water at red and near-infrared bands and lower than that of clouds at short visible bands. These turbid water pixels are easily mistaken as clouds by the standard NIR threshold method.
To demonstrate the difference of spectral variability between turbid water and cloud pixels, eight samples of Rayleigh-corrected spectral reflectance were selected around sediment-dominated Hangzhou Bay from the GOCI data acquired at 07:16 (UTC) on 10 May 2018. Their spectral Rayleigh-corrected reflectance at 8 bands are shown in Figure 2a, and the sample locations are shown in Figure 2b. The arithmetic mean values of 3 × 3 pixels centered at each sample were used in order to reduce the random noise effects of the satellite data. As seen from Figure 2a, the sampled Rayleigh-corrected reflectance of thick cloud pixels has higher magnitudes and smaller spectral variations. The spectral reflectance of thin clouds and over cloudless turbid water is close, especially at red bands, and the primary difference can be observed in the blue spectral range, such as at 412 nm. We also observed that the ρ (412 nm) values of most turbid waters are generally over 0.07. In terms of correctly distinguishing cloudy and non-cloudy pixels with turbid water, we tested whether a threshold of ρ (412 nm) > 0.07 in combination with ε < 2.5 and ρ (865 nm) ≥ 0.027 can effectively retain water pixels.
It is known that the spectral characteristics of clear water and turbid water are different. Samples in clearer water generally have larger ρ (412 nm) and smaller ρ (660 nm), and it is just the reverse in turbid water. The ρ (412 nm) values in clear water can be larger than 0.07. This could cause some of the turbid water pixels to be mistaken as clouds. Based on sampled reflectance data over clear and turbid water, we observed that the ratio of ( ) ( ) can be used to discriminate clear and turbid water in our cloud masking procedure. Therefore, with the purpose of distinguishing the clear water pixels from cloudy ones correctly, a second threshold of in combination of ε < 2.5 and ρ (865 nm) ≥ 0.027 is performed. In brief, our improved cloud masking procedure is concluded as the following: Step 1. calculate the Rayleigh-corrected reflectance at the four bands of 412 nm, 660 nm, 680 nm, and 865 nm; Step 2. calculate the ε according to Equation 1, which was proposed by Nordkvist et al.; Step 3. pixels satisfying either of the following two conditions (1 or 2) are masked as clouds: (1) ρ (412 nm) > 0.07 and ε < 2.5 and ρ (865 nm) ≥ 0.027; (2) ( ) ( ) > 1 and ε < 2.5 and ρ (865 nm) ≥ 0.027.
For simplicity, hereinafter, we call this the improved method in this study. As seen from Figure 2a, the sampled Rayleigh-corrected reflectance of thick cloud pixels has higher magnitudes and smaller spectral variations. The spectral reflectance of thin clouds and over cloudless turbid water is close, especially at red bands, and the primary difference can be observed in the blue spectral range, such as at 412 nm. We also observed that the ρ rc (412 nm) values of most turbid waters are generally over 0.07. In terms of correctly distinguishing cloudy and non-cloudy pixels with turbid water, we tested whether a threshold of ρ rc (412 nm) > 0.07 in combination with ε max < 2.5 and ρ rc (865 nm) ≥ 0.027 can effectively retain water pixels.
It is known that the spectral characteristics of clear water and turbid water are different. Samples in clearer water generally have larger ρ rc (412 nm) and smaller ρ rc (660 nm), and it is just the reverse in turbid water. The ρ rc (412 nm) values in clear water can be larger than 0.07. This could cause some of the turbid water pixels to be mistaken as clouds. Based on sampled reflectance data over clear and turbid water, we observed that the ratio of ρ rc (412 nm) ρ rc (660 nm) can be used to discriminate clear and turbid water in our cloud masking procedure. Therefore, with the purpose of distinguishing the clear water pixels from cloudy ones correctly, a second threshold of in combination of ε max < 2.5 and ρ rc (865 nm) ≥ 0.027 is performed. In brief, our improved cloud masking procedure is concluded as the following: Step 1. calculate the Rayleigh-corrected reflectance at the four bands of 412 nm, 660 nm, 680 nm, and 865 nm; Step 2. calculate the ε max according to Equation (1), which was proposed by Nordkvist et al.; Step 3. pixels satisfying either of the following two conditions (1 or 2) are masked as clouds: (1) ρ rc (412 nm) > 0.07 and ε max < 2.5 and ρ rc (865 nm) ≥ 0.027; (2) ρ rc (412 nm) ρ rc (660 nm) > 1 and ε max < 2.5 and ρ rc (865 nm) ≥ 0.027. For simplicity, hereinafter, we call this the improved method in this study.

Comparison of Four Cloud Masking Methods Using Selected Samples
The cloud masking effects of the NIR threshold method, Wang and Shi method, Nordkvist et al. method, and the improved method in this study were compared. These four methods were, respectively, applied and tested using visually selected samples in the inland lake water and turbid coastal water off the mouth of Yangtze River, which are typical turbid waters in China.
A total of 136 samples were visually selected from the GOCI data acquired at 02  Figure 3. These samples include cloudy ones covered by thick clouds and cloud-free ones over turbid water, as well as lakes in different weather conditions and near narrow straits. The circles represent visually selected cloudless samples, and the crosses represent cloudy ones. As a performance comparison demonstration, we applied four cloud masking methods to these visually selected 136 samples.  The scatter plot of ρ rc (865 nm) versus ε max for these 136 samples is shown in Figure 4. The vertical dashed line is ρ rc (865 nm) = 0.027, which represents the standard cloud masking threshold method instandard atmospheric correction procedure. The horizontal dashed line represents a threshold of 2.5 for ε max used in the Nordkvist et al. method. It is clear that the standard NIR method using ρ rc (865 nm) ≥ 0.027 is not enough in coastal waters, as many cloudless samples (circles) are with ρ rc (865 nm) ≥ 0.027. The Nordkvist et al. method using ε max < 2.5 and ρ rc (865 nm) ≥ 0.027 can mask all the cloudy samples, while some cloudless samples indicated by blue circles in the fourth quadrant of Figure 4 will be incorrectly masked. These usually correspond to samples in lake water, near narrow straits, and near land.    In Figure 4, by applying the improved cloud masking method in this study, samples with ρ rc (412 nm) > 0.07 are indicated in red, and those with ρ rc (412 nm) ρ rc (660 nm) > 1 are marked in bright cyan. If the visually selected cloud pixels do not pass these two threshold tests, they are masked in black, and the visually selected water pixels are in blue. It can be seen that all crosses visually selected as clouds are correctly masked by the improved method in this study. Combining with the sample positions in Figure 3, we can see that ρ rc (412 nm) > 0.07 works primarily in very turbid yellow colored water, and the ρ rc (412 nm) ρ rc (660 nm) > 1 takes effect primarily in clearer green colored water.
In Figure 5, by applying the Wang and Shi method, samples with ρ rc (865 nm) > 0.06 are indicated in bright cyan, and those with ρ rc (412 nm) ρ rc (660 nm) < 1.15 in combination with ρ rc (865 nm) ≤ 0.06 and ρ rc (865 nm) ≥ 0.027 are marked in red. We can see that all crosses visually selected as clouds are correctly masked; however, one red circle and many bright cyan circles, which are supposed to be water pixels, are mistaken as clouds.    Therefore, based on our 136 visually selected samples, it is clear that the improved method in this study performs better than the other three methods. To further check the general application of the four cloud masking methods, we then applied them in different GOCI scenes. Figure 6a shows the RGB image composited by Rayleigh-corrected reflectance at the three bands of 443 nm, 555 nm, and 680 nm at 05:16 (UTC) on 10 February 2020. White pixels in the RGB image are clouds. Figure 6b-e shows the results of the four cloud masking methods. Pixels identified by cloud masking methods are also indicated as white. Compared with the RGB image in Figure 6a, we can see that the NIR threshold method as well as the Wang and Shi method masked both clouds and land as clouds. The NIR threshold method masked almost all turbid coastal water (yellow colored water) as clouds in Figure 6b. The Wang and Shi method masked most of the turbid coastal water as clouds in Figure 6c. The Nordkvist et al. method is better in retaining turbid coastal water pixels, but it still misjudged some very turbid water pixels as clouds in the coastal water of Jiangsu Province of China as indicated by the red rectangle in Figure 6d. The improved method in this study performed better than the other three methods. It can mask almost all cloud pixels with fewer misjudgments over almost all turbid water pixels. It is worthy to note that there is thin fog in the upper right corner of the image in Figure 6a. The water here is clearer, which is indicated by the RGB color in Figure 6a. The Wang and Shi method can retain more pixels over this foggy clear water area. The NIR threshold method masked more pixels. The Nordkvist et al. method and the improved one in this study masked less than the NIR threshold method and more than the Wang and Shi method.

Performance Comparison Over Typical Turbid Waters
gle, by comparing it with the RGB image in Figure 7a, it can be observed that the NIR method retained the fewest water pixels and misjudged most water pixels as clouds, followed by the Wang and Shi method and then by the Nordkvist et al. method; the best was the improved method in this study. In addition, it is not difficult to see that the Nordkvist et al. method is prone to misjudge water near the land edge and in narrow water channels as clouds. This can also be seen in the mouth of the Yangtze River and the Hangzhou Bay of China indicated by the right red rectangle in Figure 7d.   Figure 7a, it can be observed that the NIR method retained the fewest water pixels and misjudged most water pixels as clouds, followed by the Wang and Shi method and then by the Nordkvist et al. method; the best was the improved method in this study. In addition, it is not difficult to see that the Nordkvist et al. method is prone to misjudge water near the land edge and in narrow water channels as clouds. This can also be seen in the mouth of the Yangtze River and the Hangzhou Bay of China indicated by the right red rectangle in Figure 7d.  To further verify the adaptability of the improved cloud masking method in hazy weather conditions, Figure 8 compares the results of the four cloud masking methods on 6 January 2020. Comparing the RGB image in Figure 8a with the water area around the mouth of Yangtze River, indicated by the right smaller red rectangle, and the west part of Hangzhou Bay, indicated by the left bigger red rectangle in Figure 8b-e, the results of the Nordkvist et al. method show serious misjudgments in water near land edges and in narrow water channels. The improved method in this study performed better than the others. To further verify the adaptability of the improved cloud masking method in hazy weather conditions, Figure 8 compares the results of the four cloud masking methods on 6 January 2020. Comparing the RGB image in Figure 8a with the water area around the mouth of Yangtze River, indicated by the right smaller red rectangle, and the west part of Hangzhou Bay, indicated by the left bigger red rectangle in Figure 8b-e, the results of the Nordkvist et al. method show serious misjudgments in water near land edges and in narrow water channels. The improved method in this study performed better than the others.
To quantitatively evaluate the performance of the four cloud masking methods, the clear pixel numbers recognized by the different methods over the selected turbid water regions as indicated in Figures 6-8 are listed in Table 1. The clear pixel percentage is the ratio of the non-cloudy pixels to the total pixels in the selected region. Based on these five selected regions, the improved method in this study can retain a higher number of clear pixels with an average clear pixel percentage of 92.77%, which is 19%, 55%, and 89% higher than that of the Nordkvist et al., the Wang and Shi, and the NIR threshold methods, respectively.  Table 1. The clear pixel percentage is the ratio of the non-cloudy pixels to the total pixels in the selected region. Based on these five selected regions, the improved method in this study can retain a higher number of clear pixels with an average clear pixel percentage of 92.77%, which is 19%, 55%, and 89% higher than that of the Nordkvist et al., the Wang and Shi, and the NIR threshold methods, respectively.

Performance Comparison Over Other Areas
As the improved cloud masking method in this study is designed for turbid waters, in this section, illustrations are given to demonstrate whether it performs as well as other methods in water areas other than the coastal waters off the mouth of Yangtze River, such as waters with high chlorophyll concentrations or clear water. For the above purpose, we selected GOCI scenarios acquired in Bohai of China and the water area off the south of the Korean Peninsula.

Performance Comparison Over Other Areas
As the improved cloud masking method in this study is designed for turbid waters, in this section, illustrations are given to demonstrate whether it performs as well as other methods in water areas other than the coastal waters off the mouth of Yangtze River, such as waters with high chlorophyll concentrations or clear water. For the above purpose, we selected GOCI scenarios acquired in Bohai of China and the water area off the south of the Korean Peninsula. Figure 9a shows the RGB image composited by GOCI Rayleigh-corrected reflectance in Bohai at 03:16 (UTC) on 1 April 2019. As seen from the RGB color, the water in Bohai is dominated by high chlorophyll concentrations. It is surrounded by silt and tidal flats along the coast of Bohai, as shown in the red rectangle. Figure 9a shows the RGB image composited by GOCI Rayleigh-corrected reflectance in Bohai at 03:16 (UTC) on 1 April 2019. As seen from the RGB color, the water in Bohai is dominated by high chlorophyll concentrations. It is surrounded by silt and tidal flats along the coast of Bohai, as shown in the red rectangle. Comparing the cloud recognition results of four cloud masking methods in Figure  9b-e, it can be seen that all the four cloud masking methods perform well in waters with high chlorophyll concentrations in Bohai. The NIR threshold method as shown in Figure  9b misidentified the sediment-dominated turbid water and shallow water over the tida flats along the shorelines as clouds. The Wang and Shi method ( Figure 9c) and Nordkvis et al. method (Figure 9d) can correctly recognize most of the turbid water pixels, while the cloudless shallow water pixels over the tidal flats along the shorelines were still misiden tified as clouds. By comparison, the improved cloud masking method in this study can delineate the spatial location and morphology of clouds more accurately and retain more turbid water pixels (Figure 9e). Figure 10a shows the RGB image composited by GOCI Rayleigh-corrected reflec tance off and around the south of the Korean Peninsula at 03:16 (UTC) on 18 April 2019 The water along the southern coast of the Korean peninsula as indicated by a red rectangle in Figure 10 is turbid with sediments composed of fine sand and silt [44]. The water ove the southeast of the Korean Peninsula is clear open water, and the southwest water is affected by turbid water from Yangtze River.
In comparison to the RGB image in Figure 10a, the four cloud masking methods in Figure 10b-e all perform well over clear water toward the southeast of the Korean Penin sula, and this is also the same case in medium turbid water toward the southwest of the Korean Peninsula. As for the water with high sediment concentrations in the red box, the NIR threshold, Wang and Shi method, and Nordkvist et al. method all have misjudgmen at different levels. The results of the improved method in this study (Figure 10e) agree Comparing the cloud recognition results of four cloud masking methods in Figure 9b-e, it can be seen that all the four cloud masking methods perform well in waters with high chlorophyll concentrations in Bohai. The NIR threshold method as shown in Figure 9b misidentified the sediment-dominated turbid water and shallow water over the tidal flats along the shorelines as clouds. The Wang and Shi method ( Figure 9c) and Nordkvist et al. method (Figure 9d) can correctly recognize most of the turbid water pixels, while the cloudless shallow water pixels over the tidal flats along the shorelines were still misidentified as clouds. By comparison, the improved cloud masking method in this study can delineate the spatial location and morphology of clouds more accurately and retain more turbid water pixels (Figure 9e). Figure 10a shows the RGB image composited by GOCI Rayleigh-corrected reflectance off and around the south of the Korean Peninsula at 03:16 (UTC) on 18 April 2019. The water along the southern coast of the Korean peninsula as indicated by a red rectangle in Figure 10 is turbid with sediments composed of fine sand and silt [44]. The water over the southeast of the Korean Peninsula is clear open water, and the southwest water is affected by turbid water from Yangtze River. the image in Figure 10a. Over this area, the four cloud masking methods show similar results in Figure 10b-e, while they show little difference along the edge between thick cloud and thin fog. It is difficult to judge visually whether it is cloudy or not along the edge. To reduce the misjudgment error, it is recommended to discard these edge pixels by masking out the pixels neighboring the cloud pixels (up, down, left, and right) according to the GOCI algorithm theoretical basis document [18].  Table 2. Based on these two selected regions, the improved method in this study can retain a higher number of clear pixels with an average clear pixel percentage of 98.66%, which is 14%, 51%, and 61% higher than that of the Nordkvist et al., the Wang and Shi, and the NIR threshold methods, respectively.

Discussion
The improved cloud masking method is achieved by combining the spectral variability threshold of ε by Nordkvist et al. with two other thresholds of ρ (412 nm) and In comparison to the RGB image in Figure 10a, the four cloud masking methods in Figure 10b-e all perform well over clear water toward the southeast of the Korean Peninsula, and this is also the same case in medium turbid water toward the southwest of the Korean Peninsula. As for the water with high sediment concentrations in the red box, the NIR threshold, Wang and Shi method, and Nordkvist et al. method all have misjudgment at different levels. The results of the improved method in this study ( Figure 10e) agree well with the cloud distribution shown in the RGB composite image (Figure 10a). Therefore, our improved cloud masking method can be successfully applied over not only turbid waters but also clear waters.
It is worthy to note that there is thick cloud and thin fog in the upper left corner of the image in Figure 10a. Over this area, the four cloud masking methods show similar results in Figure 10b-e, while they show little difference along the edge between thick cloud and thin fog. It is difficult to judge visually whether it is cloudy or not along the edge. To reduce the misjudgment error, it is recommended to discard these edge pixels by masking out the pixels neighboring the cloud pixels (up, down, left, and right) according to the GOCI algorithm theoretical basis document [18].
The clear pixel numbers recognized by the different methods over the selected water regions as indicated in Figures 9 and 10 are listed in Table 2. Based on these two selected regions, the improved method in this study can retain a higher number of clear pixels with an average clear pixel percentage of 98.66%, which is 14%, 51%, and 61% higher than that of the Nordkvist et al., the Wang and Shi, and the NIR threshold methods, respectively.

Discussion
The improved cloud masking method is achieved by combining the spectral variability threshold of ε max by Nordkvist et al. with two other thresholds of ρ rc (412 nm) and ρ rc (412 nm) ρ rc (660 nm) proposed in this study. In order to further discuss the necessity of the new threshold scheme and consider whether the same effect can be achieved by simply relaxing or tightening the ε max threshold in the Nordkvist et al. method, we made a simple attempt as shown in Figure 11.  It can be seen from Figure 11 that if the ε threshold value in the Nordkvist et al method is set to be larger than 2.5, many cloudless coastal turbid water pixels are mis judged as clouds (Figure 11d). If the ε threshold value is set to be smaller than 2.5 many cloudless turbid water pixels, such as the water pixels in lakes, narrow rivers and coastal channels, and near land, are retained (Figure 11c). However, thin cloud pixels ove turbid water are also mistaken as water pixels as indicated in the red rectangle. The im proved method in this study (Figure 11e) performs well in both lakes and coastal turbid It can be seen from Figure 11 that if the ε max threshold value in the Nordkvist et al. method is set to be larger than 2.5, many cloudless coastal turbid water pixels are misjudged as clouds (Figure 11d). If the ε max threshold value is set to be smaller than 2.5, many cloudless turbid water pixels, such as the water pixels in lakes, narrow rivers and coastal channels, and near land, are retained (Figure 11c). However, thin cloud pixels over turbid water are also mistaken as water pixels as indicated in the red rectangle. The improved method in this study (Figure 11e) performs well in both lakes and coastal turbid waters. Thus, by simply changing the ε max threshold in the Nordkvist et al. method, it is difficult to achieve the same effect over turbid water as well as the improved method in this study. This also proves the practicability and effectiveness of the improved cloud masking method in this study.
The improved method in this study can perform well over thin cloudy yellow colored turbid water pixels. It is also worthy to note that, as indicated by the black rectangle, the improved method in this study seems to retain some foggy and thin cloudy pixels over clearer waters. By comparison, the Nordkvist et al. method performs better here. Note that the performance evaluation in this study is primarily based on manual visual judgements. It is difficult to discriminate the thin clouds and foggy pixels from clear pixels. This may bring some errors in performance evaluations and comparisons. If users want to apply the improved method in this study primarily onto clearer water, we recommend adjusting the threshold value of ρ rc (412 nm) ρ rc (660 nm) to smaller than 1 to remove thin cloud pixels. The specific value needs to be adjusted by regional water samples.
The improved cloud masking method in this study is designed for GOCI, and typical operational ocean color sensors have similar spectral bands in the visible and near-infrared range. Therefore, the improved method in this study is supposed to be applicable to almost all ocean color sensors. Here, we test the improved method in this study using MODIS data. Figure 12a shows MODIS (onboard Aqua) RGB images (645 nm, 555 nm, 469 nm) acquired on 10 February 2020, almost synchronized with the GOCI data in Figure 6. By using the Nordkvist et al. method and the improved method in this study (Figure 12b,c), the improved method in this study performs better over the Hangzhou Bay and Yangtze River coastal area than the Nordkvist et al. method. However, it seems to mask out all pixels in the Subei coastal area. If we modify the ρ rc (412 nm) threshold value from 0.07 to 0.09, most water pixels in the Subei coastal area are retained. This implies that if one applies the improved cloud masking method in this study to ocean color sensors other than GOCI, the ρ rc (412 nm) threshold value may need to be slightly adjusted. Different sensors observe the ocean with different viewing angles, and this may lead to the deviation of Rayleigh-corrected reflectance at 412 nm.
Although this improved cloud masking method generally performs better compared to other threshold methods, misjudgments may still occur in the presence of large amounts of aerosols in the atmosphere. The cloud masking methods easily mistook the aerosolladen pixels as turbid water ones. This improved cloud masking method could be further refined based on the spectral variability analysis of a number of samples with aerosols over the coastal region. Due to huge changes in clouds, their shape aspect is not currently considered. Cloud edge and continuity aspects may need to be further improved in the future. In addition, combined with an accurate cloud masking method, feasible techniques to reconstruct missing data, such as the DINEOF (Data Interpolating Empirical Orthogonal Functions), are promising to be used to restore more water pixels obscured by clouds [45,46]. pixels in the Subei coastal area. If we modify the ρ (412 nm) threshold value from to 0.09, most water pixels in the Subei coastal area are retained. This implies that if applies the improved cloud masking method in this study to ocean color sensors o than GOCI, the ρ (412 nm) threshold value may need to be slightly adjusted. Diffe sensors observe the ocean with different viewing angles, and this may lead to the de tion of Rayleigh-corrected reflectance at 412 nm. Although this improved cloud masking method generally performs better comp to other threshold methods, misjudgments may still occur in the presence of l amounts of aerosols in the atmosphere. The cloud masking methods easily mistook (d) cloud masking results using the improved method in this study after adjusting the ρ rc (412 nm) threshold value from 0.07 to 0.09. Clouds are indicated as white.

Conclusions
The geostationary ocean color sensor GOCI offers good opportunities to study diurnal variabilities of coastal environment dynamics. However, existing cloud masking methods often mistake turbid water pixels as clouds in sediment-dominated particularly turbid waters, such as the coastal area of Jiangsu Province and the Hangzhou Bay of China. In this study, based on 136 samples selected from the GOCI data on four individual days, the spectral variability of Rayleigh-corrected reflectance over turbid water and cloud pixels was analyzed. According to the characteristics of the Rayleigh-corrected reflectance at 412 nm and 660 nm bands, an improved cloud masking method combining two threshold tests of ρ rc (412 nm) > 0.07 and ρ rc (412 nm) ρ rc (660 nm) > 1 with the Nordkvist et al. method was proposed in this study.
The cloud masking effects of the NIR threshold method, Wang and Shi method, Nordkvist et al. method, and the improved method in this study were further compared and evaluated. These four methods were, respectively, applied and tested in inland lake water, sediment-dominated and phytoplankton-dominated turbid coastal waters, and clearer waters. Results show that the improved method in this study performs better than the others over typical turbid water and can effectively retain more turbid water pixels. However, the improved method in this study sometimes may not be able to mask out thin foggy pixels over clearer water.
The improved cloud masking method in this study is designed for GOCI based on typical ocean color spectral bands in the visible and near-infrared range. Thus, it can be applied to almost all ocean color sensors, especially for those without SWIR bands. It can retain more effective coastal water information in data products of ocean color remote sensing processing in support of various optical remote sensing studies and applications.