## 1. Introduction

Global numerical weather prediction (NWP) models are run with a spatial resolution that is not able to explicitly represent the effects of local topography. Several tools and methodologies have been developed for downscaling global NWP forecasts to regional or local scales. Basically, all of them could be classified as dynamical and statistical approaches. For the dynamical downscaling methods, the aim is to use a high-resolution physical model nested and initialized with the boundary conditions of a low-resolution model, which usually covers a more extensive area (Wilby and Wigley 1997). Statistical downscaling is based on statistical analysis of the output of the NWP and observational data for a location.

According to Kannan and Ghosh (2013), statistical downscaling can also be grouped into three categories: (i) weather classification/typing identifies patterns or synoptic weather schemes and analyzes data according to each case (Conway and Jones 1998; Schnur and Lettenmaier 1998), (ii) regression/transfer function techniques fit NWP and observational data using different regression and other machine learning algorithms (Sloughter et al. 2008; Sailor et al. 2000), and (iii) weather generators are based on the idea of creating a stochastic time series as a pipeline process for the different parameters (Khalili et al. 2009).

Nonparametric regression downscaling techniques are based on the idea that the predictor cannot be stated using a unique formula, but may be constructed during the execution time considering the whole dataset and selecting a subset of it to build a different regression model for every case. Nonparametric regression requires larger datasets than does regression based on parametric models, because only a limited portion of the data is used to construct the predictor each time.

Nonparametric regression has already been applied into meteorological problems for downscaling precipitation patterns (Kannan and Ghosh 2013). In this paper, a simple form of kernel nonparametric regression is used to improve forecasts of wind speed coming from the NWP, considering wind direction and wind speed variables to filter out data. This form of regression is particularly suitable for real-time forecasting, because it can be updated to include the most recent data, which makes it a perfect candidate for operational on-demand applications.

Wind statistical analysis cannot be performed directly by applying out-of-the-box machine learning or downscaling algorithms to data, because of the cyclic nature of the wind direction. The proposed regression model uses a cyclic kernel approach to select similar wind direction cases. This way of fitting circular data into a model is an approach unlike that taken by other directional statistics techniques, such as circular regression (Downs and Mardia 2002), or using generalized additive models on separate wind components (Salameh et al. 2009).

The aim of this technique is to present a method for measuring the systematic error of an NWP when forecasting wind speed. The systematic error of an NWP is mainly caused by its limited spatial resolution. If this error can be measured taking into account the difference in wind direction and how it affects wind speed, it will be possible to subtract this error from any of the leading times of the model improving its skill. The proposed method builds a nonparametric regression model to estimate the relationship between NWP-forecasted wind speed and observed wind speed when filtering the data by wind direction.

Airports are usually located in wide-open areas, with particular wind regimes favorable to air traffic. The surrounding topography affects wind behavior, by blocking, intensifying, or changing its direction as it travels, generating local wind effects not resolved by NWP. If wind speed has to be forecasted for a particular direction, grouping together similar wind direction cases to build a regression model is justified, as all are affected by the same topographic configuration.

Civil airports also offer high quality observational data that are publicly accessible. These characteristics make airports especially suitable for studying the problem of wind speed downscaling. To carry out this study, the airports of Foronda, Loiu, and Hondarribia in northern Spain have been chosen. At these sites, the wind is highly affected by adjacent steep topography and the nearby sea. Ultimately, better wind speed forecasts mean better quality terminal aerodrome forecasts (TAFORs), which implies safer air traffic operations.

All the datasets and algorithms used in this paper have been published in a public repository (https://code.google.com/p/wind-kernel-regression/) using a GNU General Public License, version 3. Any experiment contained in this article can be reproduced and freely modified.

## 2. Data sources and processing

To test the performance of the present downscaling technique, both NWP and observational data have to be collected. In the proposed regression model, the dependent variable is the observed wind speed and the independent variables are the wind speed and wind direction coming from the NWP. These data have to be represented as time series, using the same units and time resolutions for each of the selected airports.

### a. Observations

Observational weather data from civil airports are publicly available through aviation routine weather reports (METARs; WMO 1995), a form of coded aeronautical weather reports regulated by the International Civil Aviation Organization (ICAO). These reports are normally produced every 30 min and contain many different observed weather conditions affecting the airport at the time of observation.

Each METAR contains information such as the airport identifier, date and time of the observation, wind, cloud cover, temperature, dewpoint, and pressure, using a coded format specified by the World Meteorological Organization (WMO). To perform the tests, only the observed wind speed value is extracted along with its corresponding time stamp value for each of the airports. METAR wind speeds and directions are stated as the measured or estimated mean over the 10 min prior to the time of issue of the report. Gust wind, if present, is encoded as a separate variable and is not taken into account.

ICAO uses a four-character code to identify each airport. The ICAO codes for the selected airports in Spain are LEVT for Foronda, LEBB for Loiu, and LESO for Hondarribia. METARs for these airports are collected during the period from March 2011 to March 2013.

### b. NWP data

The Global Forecast System (GFS; Campana and Caplan 2013) is a global numerical weather model run operationally by the National Weather Service since March 2011 and all its historical netCDF files are available through the National Oceanic and Atmospheric Administration (NOAA) National Operational Model Archive and Distribution System (NOMADS; Rutledge et al. 2006) public repository online. GFS has a version with spatial resolution of 0.5° (~55 km) and a temporal resolution of 3 h with a new run available every 6 h. To assess the NWP systematic error, reanalysis data should be used. The use of time plus 3 h (*T* + 3) forecast data doubles the number of points available for the regression, at the expense of introducing additional inherent uncertainty into the forecasting model. This extra uncertainty is assumed to be reasonably small 3 h away from the reanalysis and its use is compensated by the fact that the number of points used in the regression model is doubled.

For this study, a simple approach is used to extract the time series of a site. The closest GFS grid point to each airport is selected without considering any other form of spatial interpolation or correction. For each location the zonal and meridional 10-m wind speed components are extracted into a time series, corresponding to the GFS variables labeled “*U* component of wind height above ground” and “*V* component of wind height above ground,” respectively. These variables contain instantaneous values measured in meters per second. Proceeding the same way as with observational data, GFS wind data are collected for the closest grid points to the airports during the period from March 2011 to March 2013.

### c. Time series

NWPs usually represent wind through Cartesian components, which is very convenient for computing averages and other statistical analysis. However, wind data coming from weather stations are normally described using their directional and speed components. For this study, wind direction is used to filter out data included in the nonparametric regression. Wind values coming from GFS have to be converted from their Cartesian components into direction and speed components before being included in the time series.

As the GFS data have been collected at a 3-h resolution and the METARs are available every 30 min, only a subset of the values can be compared. A combined time series for 0000, 0300, 0600, 0900, 1200, 1500, 1800, and 2100 UTC is created using data from the GFS model and METARs; all the extra METARs are ignored.

LEVT is the only airport of the three that records METARs 24 h a day. For this airport, 5840 data points are collected. The other two airports are closed during part of the night. METARs for 0000 and 0300 UTC are missing for LEBB, as are those for 2100 UTC from LESO, giving totals of 4380 and 3650 data rows, respectively. Table 1 shows a sample of the combined time series data for the airport at Loiu (Fig. 1).

Sample time series data from LEBB on 16 May 2012, combining data from METARs and the GFS model. To save space, only three parameters are shown.

## 3. Methodology fundamentals

An improvement in the wind speed–forecasting error could be achieved by applying a simple univariate regression model that combines wind speed values derived from METARs and the GFS model. However, NWPs contain many different physical parameters that can be included in a regression method to improve the results. Nonparametric regression techniques require large datasets to be tested, as they use subsets to calculate the regression, which is the reason for collecting 2 years of time series data in the database. Nonparametric regression is a form of regression in which the predictor cannot be expressed through a single function; rather, it calculates a new regression for each forecasted value. This kind of algorithm is especially suitable for real-time forecasting, as the regression model is built on execution time. Locally weighted regression is a form of nonparametric regression wherein values close to the forecasted point have a stronger influence in the regression. The following sections outline the basic techniques used in this regression model.

### a. Regression model

**Y**is the vector containing the values of the dependent variable, and

**is the vector containing the coefficients for each regression variable.**

*β*If a training set is defined where the values of both **Y** are known, the value of ** β** can be determined and used to predict new values of the dependent variable.

A form of locally weighted regression can be implemented using a weighted least squares approach and defining a weighting function to select local points around the regression point.

The comparison between simple linear regression and locally weighted regression for wind speed data from LESO (Fig. 2) demonstrates how nonparametric regression adapts to nonlinearities in the data at the expense of the computational cost of calculating new regression parameters for each point in the plot. The weighting function used to create the locally weighted regression shown in this figure is explained in the next section.

### b. Kernel function

This function returns the relative weight of every point in the model, where *d* represents its distance to the forecasted point and *d*_{max} is the maximum distance from which any point will not be included in the regression model. This kernel determines both the number of points and their relative weight in the regression model, depending on how far each point is from the forecasted value.

Figure 3 shows how the tricube kernel weights the different data points around the values of 15 and 20 knots (kt; 1 kt = 0.51 m s^{−1}) to create a regression model. In this sample, the relative weight of each point in the regression decreases from its maximum value at 15 and 20 kt and becomes zero for points farther than 10 kt on each side, which is the fixed value of *d*_{max}.

### c. Cross-dimensional weighting

In the previous section, there is an example of how a kernel shapes the weight of the points depending on their distance from the forecasted point. Every point considered in the regression contains many other parameters apart from wind speed. This technique is inspired by the idea of fitting regression models using historical data with similar characteristics to the day we are trying to forecast. For example, if the NWP model forecasts a wind blowing from the north, better results should be obtained when filtering the data to use the values of the database where the wind is blowing from the north. However, data can also be filtered using any other variable contained in the dataset. Wind speed can be forecasted by filtering the data points to include those showing similar characteristics to the forecasted day. In this paper wind direction is proposed as a good filtering variable but any other variable can also be used.

_{i}is the

*i*th kernel matrix. A kernel matrix

Figure 5 shows an example of this cross-dimensional weighting, using wind direction to filter the data. A wind direction tricube kernel selects a subset of the original points with wind directions around 0° and 180°.

## 4. Proposed methodology

The idea of considering historically similar cases comes naturally in the activity of weather forecasting. In the previous section, some mathematical tools and ideas were introduced, which can be helpful to filter out those “similar situations” from the whole dataset. In the particular case of wind forecasting, topography has a major influence on defining the pattern of winds at any place.

Wind direction classifies winds blowing from different places and it can be used to introduce local effects on winds. Grouping same-direction wind data together is a way of implicitly introducing the effect of local topography.

In this section, the idea of using wind direction values to forecast wind speed is explored. Kernel matrices are used as a way of weighting subsets of data into the regression model. However, the kernel function, as introduced in the previous section, is designed to work with linear variables, and the wind direction is circular.

### a. Cyclic kernel

This distance and a defined maximum angular distance *d*_{max} are used in the tricube kernel to assign weights to the different data points and derive the best estimates of wind speed. Choosing an optimal value for *d*_{max} is key to building an accurate regression model. Too small *d*_{max} values consider only small sectors of the data, which can cause overfitting and a poor generalization of the model, while, on the other hand, too large values give extremely general regressions that are not able to discriminate among the different cases.

### b. Building and validating the model

For each airport, wind speed and direction data from the GFS model and from METAR are used. GFS wind speed data determine the dependent variable matrix

To validate the proposed model, a methodology to test the results must be defined. A model validation technique has to be defined in order to assess how the wind forecasts generalize to an independent dataset. The holdout, cross-validation, and bootstrapping methods are different techniques for randomly splitting a dataset and validating a statistical method. The holdout approach divides the dataset into two different groups; one being used to train the statistical model and the other to validate or test the performance of the trained model. Cross validation divides the dataset into *n* different groups and carries out the validation. One data group at a time is excluded from the training, using that excluded group to conduct testing. This process is then repeated, changing the group selected for exclusion each time, until all groups have been covered. Bootstrapping is a variation of the holdout method where each of the subsets is obtained by random sampling with replacement from the original dataset.

To test the proposed model, a repeated holdout method is chosen. The decision to use a repeated holdout method instead of a cross-validation or bootstrapping approach is made based on the size the dataset. For large datasets, the difference between randomly holding out data points or cross validating fixed subsets of the data is negligible.

For each experiment a repeated holdout estimation is performed, where the whole dataset of each airport is randomly split into two sets: one set containing 75% of the data is used to train the regression model and the other 25% is used for validation. In the training set, the observational values of wind speed are used to train the regression model and the same variable is hidden and used to estimate the error in the validation set. Root-mean-square error (RMSE) of wind speeds is used as the estimator for the error of the model. For each experiment and airport, this procedure is carried out 10 times and its RMSE values are averaged.

Different values of *d*_{max} used in the regression model yield different RMSE values: the larger the value of *d*_{max}, the more points are included in the regression of each point. The experiment forecasts every observed wind speed contained in the validation set, using the data from the training to create a regression model for each value. The result obtained from the regression model is compared with the observed wind speed to estimate the error. This experiment is repeated using different values of *d*_{max} to identify the value or values that minimize the error of the model.

## 5. Results

The model is compared with other state-of-the-art regression techniques to assess its performance. To validate each technique, a holdout evaluation process is repeated 10 times, as explained in the preceding section. Comparisons between different methodologies are always performed using the same repeated holdout splits. The significance of the difference between compared types of regression models is statistically assessed using a paired Student's *t* test. The use of a parametric test is justifiable, as the Shapiro–Wilks test has ensured the normality assumption of the compared RMSE samples.

First of all, a benchmark is established as a reference, so the results of the proposed regression model can be compared with it. The most basic and least accurate wind-forecasting method uses the wind speed value from the numerical weather model to predict the observed wind speed at the airport. This result could be easily improved by applying a simple linear regression to relate wind speed values from the NWP and observational data from METARs. Table 2 contains the RMSE results of a direct comparison between wind speeds forecasted by GFS and the corresponding observed METAR values. Table 2 also contains RMSE results achieved using a univariate linear regression model to predict wind speeds for the different airports. The first result is obtained using the whole dataset, whereas in the case of the regression, the methodology explained at the end of the previous section is used to calculate the RMSE values of each airport. As shown in Table 2, linear regression introduces a notable improvement in forecasting wind speed. The proposed nonparametric regression model aims to improve these RMSE values.

Wind speed mean RMSE and std dev *σ* results [*E*(RMSE) ± *σ*(RMSE)] after directly forecasting the observed wind speed using the wind speed output of the GFS model compared with the RMSE obtained when applying an univariate linear regression model containing the same data. Note that *E*(·) indicates the mean of the variable within the parentheses.

Table 3 contains the results of running the experiments using different *d*_{max} wind direction values to filter data used in the regression, as explained in the methodology section. As indicated in Fig. 6, the three airports present a similar behavior showing minimum wind speed mean RMSE values with *d*_{max} ranging between 10° and 30°, but the overall improvement achieved is different for each of them.

Wind speed mean RMSE and *σ* results [*E*(RMSE) ± *σ*(RMSE)] for the different airports using different values of *d*_{max} wind direction in a tricubic kernel to weight the data in a nonparametric regression.

Once the value of wind direction *d*_{max} is found that minimizes the error, it can be fixed and a new kernel can be introduced to filter data using a different variable. The data points with similar wind directions selected by the first kernel are weighted again using a second kernel with a new variable. Using multiple kernels allows us to filter the data according to different variables and thereby achieve better results in the regression. For example, if the value of the wind direction *d*_{max} is fixed to 30° in one kernel, a secondary kernel can be used again to weight the resulting subset of data according to another variable.

As the objective is to improve the wind speed forecast coming from the model, GFS wind directions and wind speeds can be combined to select the data points where winds come from the same direction and have similar speed. As explained in the previous paragraph, two kernels can be applied, one using wind direction and the other using wind speed, to select the NWP points with similar wind characteristics (direction and speed) to the predicted example. Using the results of the previous experiment, which determined an optimal value of wind direction *d*_{max} around 30°, a new experiment is proposed combining two kernels. The first kernel filters the data by its GFS wind direction, using the optimal *d*_{max} value, and the second kernel filters the data using the GFS wind speed variable. As carried out in the previous experiment, different values for the wind speed are tested to find an optimal value that minimizes the error of the regression. To avoid confusion in the notation of the parameters of the two kernels, references to the wind speed kernel use the prime symbol. Table 4 contains the RMSE results of this experiment using different values of

Mean RMSE and *σ* results [*E*(RMSE) ± *σ*(RMSE)] when using a fixed value of wind direction *d*_{max} and different wind speed

Analyzing the results contained in Table 4 indicates that the proposed nonparametric regression using kernels statistically outperforms the standard linear regression (*p* value = 0.001). A pattern in the mean values can be observed, where performance improves as the value of

Applying this technique, a large number of different combinations for fitting a nonparametric regression model arise, depending on the number and type of variables, the order in which they are applied, and the shape of the kernel used.

To evaluate the performance of this wind-forecasting model, a comparison with a popular regression machine learning technique is performed. The random forest technique (RF; Breiman 2001) is used as the reference. Random forest is an ensemble learning method for regression. It operates by constructing a multitude of decision trees at training time and outputting the average of the outputs from individual trees. Every tree is trained using a random subset of the whole dataset.

To compare the proposed model, a random forest model is used, containing 100 trees, and using wind speed and wind direction values from the GFS model, as well as observational wind speed values from the METARs. As carried out with the nonparametric regression, 75% of the data are used for training the random forests and the other 25% are used for validating the model, where METAR wind speed values are used for estimating the errors. For each airport, the process is repeated 10 times, averaging the RMSE results.

Table 5 presents very similar results in the performance of both the proposed model and the random forest technique. A paired Student's *t* test does not show statistically significant differences between the two techniques (*p* value = 0.36).

Mean RMSE and *σ* results [*E*(RMSE) ± *σ*(RMSE)] for the different airports, when applying the optimized nonparametric regression model (NP) and the RF.

One important advantage of this model is that it is very intuitive, and kernels could be customized to maximize the performance of the model for each airport or location. This is a major benefit when compared with the black box results of other techniques such as random forest or neural networks. The random forest algorithm used in this experiment did not consider the circular nature of the wind direction. Therefore, an improvement in its performance would be expected if a version capable of dealing with directional data is used.

## 6. Conclusions

Different kinds of statistical postprocessing can be used to improve the performance of NWP. In some cases, when local forecasts are needed, statistical analysis and machine learning algorithms can dramatically reduce the error of the forecasted variables.

Nonparametric regression models introduce a simple and yet efficient way of representing nonlinear relationships between the variables. The use of kernels inside these models allows us to shape the influence (weight) that nearby points have on the regression depending on their proximity to the forecasted point. In this study, the use of kernels inside a nonparametric regression has been proven to work especially well when applied to wind speed forecasting in airports showing marked local wind regimes. Kernels also offer a simple way of fitting directional data into a regression model.

As pointed out in the previous section, there is a large number of possibilities for fitting data into a nonparametric regression model depending on the number of variables used as kernels to weight the data and the order in which they are applied. Solar irradiance, for example, which is available as a variable in most NWPs, also resulted in a solid filtering kernel when forecasting wind speeds. Its high correlation with wind turbulence, originating from the sun heating the surface of the earth, makes it a good way to account for daily and seasonal turbulent wind regimes. The results of using this variable are not included in this paper, as it mainly focuses on the idea of using wind direction as the main variable to determine the local effects of topography.

Cyclic kernels have proven to successfully assimilate directional data into a regression model. Other circular variables, normally contained in time-stamped datasets are time of day and day of year. The same nonparametric regression technique using cyclic kernels can be applied to these variables, extracting seasonality and daily patterns from the data. Time series analysis of airport data, as seasonal or daily pattern filtering, has not been explored in this paper but merits further research.

## REFERENCES

Breiman, L., 2001: Random forests.

,*Mach. Learn.***45**, 5–32, doi:10.1023/A:1010933404324.Campana, K., , and Caplan P. , Eds., cited 2013: “Technical Procedures Bulletin” for the T382 Global Forecast System. NCEP. [Available online at http://www.emc.ncep.noaa.gov/gc_wmb/Documentation/TPBoct05/T382.TPB.FINAL.htm.]

Conway, D., , and Jones P. D. , 1998: The use of weather types and air flow indices for GCM downscaling.

,*J. Hydrol.***212–213**, 348–361, doi:10.1016/S0022-1694(98)00216-9.Downs, T. D., , and Mardia K. V. , 2002: Circular regression.

,*Biometrika***89**, 683–697, doi:10.1093/biomet/89.3.683.Kannan, S., , and Ghosh S. , 2013: A nonparametric kernel regression model for downscaling multisite daily precipitation in the Mahanadi basin.

,*Water Resour. Res.***49**, 1360–1385, doi:10.1002/wrcr.20118.Khalili, M., , Brissette F. , , and Leconte R. , 2009: Stochastic multi-site generation of daily weather data.

,*Stochastic Environ. Res. Risk Assess.***23**, 837–849, doi:10.1007/s00477-008-0275-x.Rutledge, G. K., , Alpert J. , , and Ebuisaki W. , 2006: NOMADS: A climate and weather model archive at the National Oceanic and Atmospheric Administration.

,*Bull. Amer. Meteor. Soc.***87**, 327–341, doi:10.1175/BAMS-87-3-327.Sailor, D. J., , Hu T. , , Li X. , , and Rosen J. N. , 2000: A neural network approach to local downscaling of GCM wind statistics for assessment of wind power implications of climate variability and climatic change.

,*Renewable Energy***19**, 359–378, doi:10.1016/S0960-1481(99)00056-7.Salameh, T., , Drobinski P. , , Vrac M. , , and Naveau P. , 2009: Statistical downscaling of near-surface wind over complex terrain in southern France.

,*Meteor. Atmos. Phys.***103**, 253–265, doi:10.1007/s00703-008-0330-7.Schnur, R., , and Lettenmaier D. P. , 1998: A case study of statistical downscaling in Australia using weather classification by recursive partitioning.

,*J. Hydrol.***212–213**, 362–379, doi:10.1016/S0022-1694(98)00217-0.Sloughter, J. M., , Gneiting T. , , and Raftery A. E. , 2008: Probabilistic wind speed forecasting using ensembles and Bayesian model averaging. Dept. of Statistics Tech. Rep. 544, University of Washington, 20 pp. [Available online at http://www.stat.washington.edu/research/reports/2008/tr544.pdf.]

Wilby, R. L., , and Wigley T. M. L. , 1997: Downscaling general circulation model output: A review of methods and limitations.

,*Prog. Phys. Geogr.***21**, 530–548, doi:10.1177/030913339702100403.WMO, 1995: Part A—Alphanumeric codes. Manual on codes: International codes, Vol. I.1, WMO-306, Code Forms FM 15–XIV METAR, 503 pp. [Available online at http://www.wmo.int/pages/prog/www/WMOCodes/Manual/WMO306_Vol-I-1-PartA.pdf.]