## 2 Preliminaries  
### Availability Analysis of NWP  
The wind farm can convert the wind energy into electrical power and the energy conversion process can be depicted as follows [24]:  
\[P_{E}=C_{p}P_{wind}=C_{p}\times\frac{1}{2}\rho Av^{3} \tag{1}\]  
where \(C_{p}\) represents the wind power conversion parameter and \(\rho\) is the air density. \(A\) is the area through which the wind is flowing and \(v\) is the wind speed. Equation (1) shows that the wind power is proportional to the cubic of wind speed. Therefore, when comparing the effectiveness of numerical weather prediction, the cubic of wind speed is also chosen. Generally, the height of the wind turbines is 50 m to 150 m. The height of the NWP wind speed from the meteorology department is 10 m, 30 m, 100 m and 170 m. Therefore, the wind speed at the height of 100 m is selected for comparison and analysis since this altitude is more effective for the wind power conversion. To verify the availability of the NWP, two scenarios in 2019 are selected from a wind farm (no. 1 wind farm) in our testing wind farm cluster. The time intervals of the scenarios are from 2019-03-26 08:15:00 A.M. to 2019-03-31 08:15:00 A.M. and from 2019-04-05 08:15:00 A.M. to 2019-04-10 08:15:00 A.M., separately. Both the wind speed and the cubic of wind speed are compared in those scenarios. As the wind power and wind speed are in different ranges, both of them are normalized to make it more illustrative in Figure 1.  
To illustrate the similarity of NWP and wind power, we use the dynamic time wrapping (DTW) distance to assess the discrepancy of them. The classical sequence similarity computation is the Euclidean distance. However, when there is a time shift in the sequence, there will be large errors between two sequences even when they are similar. DTW is a kind of commonly used method to assess the similarity of two time series and is especially suitable when the length of two time series is different or there is a time shift between them [25]. The main idea of DTW is to convert the time series similarity computation into the shortest path problem and use the dynamic programming method for the computation. The computation process of DTW distance between \(L_{1}\) and \(L_{2}\) is listed as Equations (2) and (3). \[dtw(i,j)=d(i,j)+min\left\{ \begin{array}{c}dtw(i-1,j)\\ dtw(i,j-1)\\ dtw(i-1,j-1)\end{array} \right. \tag{2}\]  
\[\left\{ \begin{array}{c}dtw(1,1)=d(1,1)\\ dtw(i,1)=d(i-1,1),i>1\\ dtw(1,j)=d(1,j-1),j>1\end{array} \right. \tag{3}\]  
where \(dtw\in R^{m\times n}\) is the distance of two sequences, \(d(i,j)\) is the distance of the \(i\)-th element in the \(L_{1}\) and \(j\)-th element in \(L_{2}\) and the distance can be measured by the absolute value. \(m\) and \(n\) are the length of \(L_{1}\) and \(L_{2}\), respectively, and \(dtw(m,n)\) is the DTW distance between \(L_{1}\) and \(L_{2}\). According to the definition of DTW distance, in the first scenario, the distance between wind power and 100 m wind speed in the NWP is 140.8926 and the distance between wind power and 100 m wind speed cubic in the NWP is 80.2233. In the second scenario, the distance between wind power and 100 m wind speed in the NWP is 50.8905 and the distance between wind power and 100 m wind speed cubic in the NWP is 26.6638. From the computation results, we can see that due to the NWP amplitude  
Figure 1: Comparison between numerical weather prediction (NWP) speed and wind power. (**a**) Wind speed comparison in scenario 1; (**b**) wind speed cubic comparison in scenario 1; (**c**) wind speed comparison in scenario 2; (**d**) wind speed cubic comparison in scenario 2.  
and shape error, there are also some times when the discrepancy between the NWP windspeed and wind power is relatively large, such as the time interval between 2019-03-28 and 2019-03-29. The DTW distance cannot be reduced into 0. However, the cubic of wind speed can represent the tendency of the wind power more precisely than the wind speed itself.