## 3 Method
### Model Validation  
A series of validations of the MG are carried out. The RMSE and \(R^{2}\), calculated between the observed curve and the model-fitting curve are obtained to quantify the fit and the accuracy of the model. The RMSE, which is the root mean square error between the fitted value and the observed value, is widely used to assess the accuracy of the fitting model.  
As shown in Table 3, where the indicators are calculated based on 35,849 (88.2%) TA profiles for CEs and 37,920 (85.5%) profiles for AEs, the average \(R^{2}\) is high enough with 0.81/0.83 respectively. Also, the average RMSE is lower or equal to 0.22 \({}^{\circ}\)C, and the automatic fitting model is accurate enough to stand for the TA profiles.  
In this study, \(R^{2}\) and RMSE are measured based on the comparison of each vertical profile rather than the lateral comparison of depth layers. According to the calculation based on the observed profiles and the fitted profile results, the distribution is obtained and showed in Figure 8 for CEs and Figure 9 for AEs.  
Figure 8 shows the distribution of the two indicators for the fitting results, covering all CE TA profiles from January 2002-December 2021. As presented in figure, the portion with the light green background shows that 90% of the \(R^{2}\) is greater than 0.60, indicating that the vertical profile curves fitted by the MG model are in good agreement with the original observed ones. Furthermore, approximately 66% of the profiles have the metrics of \(R^{2}\) greater than 0.8. The distribution of the RMSE also reflects the good fit of the model, with 57% of the profiles having an RMSE below 0.22 \({}^{\circ}\)C and only 10% having an RMSE above 0.342 \({}^{\circ}\)C.  
Figure 9 illustrates the situation for AEs. About 70% of the profiles exhibit \(R^{2}\) metrics greater than 0.8, with 90% of these having metrics greater than 0.62. Additionally, 52% of the profiles have an RMSE lower than 0.2 \({}^{\circ}\)C, while only 10% have an RMSE higher than 0.35 \({}^{\circ}\)C.  
Figure 8: The distribution of MG model-fitting indicators for CEs. (a) displays the distribution of \(R^{2}\) for TA profiles from January 2002–December 2021, while (b) shows the RMSE. The shaded area in light green covers 90% of the profiles.  
The aim of the MG model proposed in this paper is to automatically extract extreme values and fit parameter results. However, it is important to note that in some cases, the extracted extreme values may not be the most appropriate results due to factors in the buoy observation process that can result in jitter and anomalous values. The MG model proposed in this study accurately fits around 90% of the profiles and meets the requirements of scientific research. Parameters are automatically extracted, eliminating the need for manual intervention when dealing with large amounts of profile data. This saves time and effort in subsequent analysis. The model employed in this study is significant as it can serve as a methodological reference for downscaling vertical profiles to lower dimensions. Furthermore, it is able to extract parameters from the profiles themselves that correspond to key physical meanings. This enables a more reasonable determination of the primary fluctuation in the vertical profiles, leading to more accurate scientific research and discoveries.