## 2 Materials and Methods
### Methods
#### 2.3.2 The Implementation of the CS-DINEOF Algorithm  
The strength of the DINEOF algorithm is the ability to utilize the inherent spatiotemporal consistency to extract a few modes account for the primary variations in the original data. The generated modes are used to reconstruct a comprehensive data distribution. Therefore, the input data for DINEOF should have clear and stable spatiotemporal patterns. However, in the Bohai Sea, the chl-a concentration exhibits significant variations in offshore areas influenced by human activities and terrestrial inputs, while it remains relatively stable in the open sea. This indicates the variability of spatiotemporal patterns of the chl-a concentration in the study area. The spatial distribution of the annual average concentration of the 2019 Bohai Sea chl-a data is shown in Figure 3a. Notably, the chl-a concentration in the Bohai Sea gradually decreases from the coastal areas to the open sea, with a widespread distribution of low-concentration areas, which demonstrates a stratified spatial pattern. Additionally, in the DINEOF process, the spatial correlations among various points are ignored when transforming a 3-dimensional dataset into the 2-dimensional matrix. To address this limitation, we proposed a Concentration-Stratified DINEOF (CS-DINEOF) method. This approach clusters pixels with stable spatiotemporal patterns and similar distribution characteristics into the same stratum for reconstruction, thus enhancing the processing of chl-a data with complex spatiotemporal features. The overall workflow of CS-DINEOF includes four stages, as shown in Figure 4:Stage 1: Outlier Detection. In the GOCI Level-2A chl-a products, due to the presence of thin mists or the boundaries of thick clouds, outliers exist in the form of speckles and edge points with significant deviations from surrounding pixel values. Therefore, in this stage, centrality evaluation based on the Median Absolute Deviation (MAD) [57] and edge detection were employed to further detect and eliminate these invalid values. For centrality evaluation, sample sets \(X=\{x_{1},x_{2},\...,\ x_{n}\}\) were constructed using a spatial window of 9 \(\times\) 9 pixels. The MAD of \(X\) refers to the median of all absolute deviations from the sample median. The MAD and the centrality evaluation result \(x_{ccn}\) are calculated as in Equation (4):  
Figure 4: Overall workflow of CS-DINEOF algorithm. Figure 3: Spatial distribution of average chl-a concentration in the Bohai Sea in 2019. (**a**) A stretch color map of chl-a concentration with a blue to red color ramp, in which blue indicates low concentration and red represents high concentration; (**b**) a graduated map divided into 10 levels with different intervals. \[MAD=k\times median(|x_{i}-median(X)|)\]  
\[x_{cent}=\left|\frac{x_{i}-median(X)}{MAD}\right| \tag{4}\]  
where \(k\) is a correction factor that makes MAD a consistent estimator of the standard deviation \(\sigma\), and is typically set at 1.4826 [58]. Following the 3\(\sigma\) rule, a pixel was identified as an outlier if \(x_{cent}>3\). Using median and MAD in place of mean \(\overline{x}\) and standard deviation \(\sigma\) offers robustness against extreme outliers, enhancing the reliability of centrality evaluation [59]. To detect the boundaries of thick clouds, the edge detection result \(x_{edge}\) of each pixel \(x_{i}\) with a valid value was determined by examining whether there were missing points within a 3 \(\times\) 3-pixel window centered around it. If any missing points were found, \(x_{edge}\) was set to 3; otherwise, it was set to 0. The final result of the outlier detection \(x_{result}\) was the average of \(x_{cent}\) and \(x_{edge}\). Pixels with \(x_{result}\) greater than 3 were excluded as outliers. Stage 2: Sub-dataset Stratification.