Learning the spatio-temporal relationship between wind and significant wave height using deep learning

Ocean wave climate has a significant impact on near-shore and off-shore human activities, and its characterisation can help in the design of ocean structures such as wave energy converters and sea dikes. Therefore, engineers need long time series of ocean wave parameters. Numerical models are a valuable source of ocean wave data; however, they are computationally expensive. Consequently, statistical and data-driven approaches have gained increasing interest in recent decades. This work investigates the spatio-temporal relationship between North Atlantic wind and significant wave height (Hs) at an off-shore location in the Bay of Biscay, using a two-stage deep learning model. The first step uses convolutional neural networks (CNNs) to extract the spatial features that contribute to Hs. Then, long short-term memory (LSTM) is used to learn the long-term temporal dependencies between wind and waves.


Introduction
Characterisation of wave climate is required for many marine applications, such as the design of coastal and offshore structures and the planning of ship operations. Wind waves are generated by the surface wind, with local wind creating the wind sea and wind from distant areas creating waves that propagate and form swells ( [Young, Ian R.(1999)]). Waves in the Bay of Biscay depend on both local and large-scale wind conditions in the North Atlantic ([Charles et al. (2012)]) ; however, swells generally dominate the sea state. Swells travel large distances and take up to five days to cross the Atlantic from Cape Hatteras to the Bay of Biscay ( [Ardhuin et al. (2018)]). Consequently, waves observed at a given location depend on wind conditions over the North Atlantic in a time window of several days, and it is challenging to reproduce this complex spatio-temporal relationship using machine learning. The goal of this work is to propose a deep learning approach that learns this relationship.
The advantage of deep learning methods ([Ian Goodfellow et al. (2016)]) lies in their ability to build hierarchical representations of predictors. In particular, in the case of spatial data, convolutional neural networks (CNNs) allow to learn complex spatial features from the data ([Jiuxiang Gu et al.(2018)]). Moreover, long short memory (LSTMs) ([Hochreiter et al.(1997)]) have proven to be very successful in predicting time series and sequence data. In this work, we propose a non-expensive data-driven approach that learns the underlying spatio-temporal structure of the relationship between wind and waves using a two-stage model based on CNNs and LSTM. This paper is organised as follows. Section 2 presents the problem of downscaling of ocean waves and related works. Section 3 describes the data used in this work. Section 4 presents the proposed two-stage model, the architecture, and the training process. Section 5 discusses the results of this work. Finally, Section 6 presents the conclusions and future work directions.

Problem statement and related work
The problem of improving the spatial resolution of climate variables is known under the name of downscaling ( [Maraun et al.(2010)]). Downscaling approaches attempt to construct a link, either numerical or statistical, between large-scale and local-scale variables. The advantage of statistical downscaling (SD) over numerical models is primarily in terms of computational efficiency. A rigorous comparison of the two approaches can be found in ( [Wang et al.(2010), Laugel et al.(2014)]).
In the case of ocean waves, wind ( [Obakrim et al.(2022)]) or sea level pressure (SLP) ( [Camus et al.(2014)]) are commonly used to downscale ocean wave parameters. However, in order to establish a link function between the wind (or SLP) and the local ocean wave parameters, it is necessary to consider a large spatial and temporal coverage and, consequently, a large number of potential explanatory variables that are highly correlated. Some methods determine the wave generation area for any ocean location worldwide. For example, ESTELA ( [Pérez et al.(2014)]) is a numerical model that uses the spectral information to select the fraction of energy that travels to the target point from selected source points. The ESTELA method can be used to design statistical downscaling methods. For instance, [Camus et al.(2014)] and [Hegermiller et al.(2017)] used the ESTELA method to define the predictors used in their SD model. [Obakrim et al.(2022)] proposed a data-driven approach that determines the wave generation area by estimating the travel time of waves, generated in each considered sources point, that reach the target point. Then, the predictors were defined based on the wave generation area and finally a SD model based on weather types was built.
As far as we know, the existing methods for SD of ocean wave parameters define a priori the spatio-temporal structure of the predictors, and then the SD model is built using these predictors. The aim of this study is to propose a deep learning approach that automatically learns the spatio-temporal relationship between wind and waves.

Data preparation
The Climate Forecast System Reanalysis (CFSR) ( [Saha et al.(2010)]) hourly wind data is considered in this study as a predictor. CFSR is a global reanalysis developed by the National Centers for Environmental Prediction (NCEP) that covers the period from 1979 to the present with an hourly time step and a spatial resolution of 0.5°by 0.5°. The historical H s data is extracted from the hindcast database HOMERE ( [Boudière et al.(2013)]) at the target location with spatial coordinates (45.2°N, 1.6°W) located in the Bay of Biscay. The temporal resolution of both wind and H s data is up-scaled to 3-hourly data. The period from 1994 to 2016 is considered in this study, leading to a dataset with n = 67208 observations. Instead of using both zonal and meridional components as a predictor, we use the projected wind ( [Obakrim et al.(2022)]) defined, at each location j and time t, as where W j (t) is the projected wind, U j (t) the wind speed, θ j (t) the wind direction and b j is the great circle bearing from the source point j to the target point. Under the assumption that waves travel in great circle paths, grid points whose paths are blocked by land are neglected ( Figure 1). Therefore, we define the global predictor at time t as where p = 5651 is total number of grid points.
Following ]), in order to capture the wind sea, we also define the local predictor as where U (t) is the wind speed at the target point and F (t) is the fetch length at time t, calculated as the minimum of the distance from the target point to shore in the direction from which the wind is blowing and 500km. The fetch has an important effect on wind sea characteristics ( [Ardhuin et al. (2018)]); therefore, it is commonly used to construct empirical wind wave models.

Proposed methodology
As mentioned in the last section, state of the art statistical methods for downscaling wave parameters usually use a pre-processing step to create features that take into account the wave generation area. In this study, we propose a deep learning approach that automatically extracts these features. Since waves may take several days to reach the target point, the history and current wind can be used to predict H s . An example of this type of model could have the following form where, t max can be interpreted as the maximum travel time of the waves and will be referred to as such in the following. However, this approach can be computationally challenging given the dimension of the predictor (5651 in our case). Instead, in this study we propose to use current wind conditions to estimate current and future H s .
In order to describe the complex spatio-temporal relationship between wind and H s , we propose the following two-stage model .., f (X (g) (t))) + (t), g : R tmax * tmax+8 → R where the notation H s (t 1 |X (g) (t 2 )) represents the contribution of wind conditions at time t 2 in H s at time t 1 . and are the errors of the 1 st stage and 2 nd stage, respectively. The 1 st stage estimates the current and future H s using current wind conditions. The 2 nd stage estimates H s using the past predictions obtained from the 1 st stage. Along with the local predictor X (g) , the input for the 2 nd stage is a t max * t max matrix of the form whereĤ s (t 1 |X (g) (t 2 )) represents the prediction, obtained from the 1 st stage, of the contribution of wind conditions at time t 2 in the H s at time t 1 . When t 1 = t 2 , this prediction represents the wind sea (first column of the matrix in equation (6)); for t 1 > t 2 , on the other hand, the prediction represents the H s caused by swells.
The general structure of the model is shown in Figure 2. The 1 st stage consists of a series of 3*3 convolutions followed by the ReLU activation function, 2*2 max pooling layer, Batch Normalisation, then a flatten followed by a dense layer. The 2 nd stage starts with an LSTM layer that learns the long-term dependencies of the (t − t max , ..., t) outputs of the 1 st stage. The output of the LSTM layer is then concatenated with the local predictor X l and fed into two fully Figure 2: Architecture of the two-stage model in equation (5) connected layers. The dropout layer is used in both stages to prevent the network from overfitting. The loss function choosed in this study is the mean squared error (MSE) which is expressed as Where n is the total number of observations andĤ s is the prediction of H s . The Keras framework with Tensorflow backend ([Chollet et al.(2015)]) is used in this work to train the model, on a Nvidia K80s GPU using the Adam optimiser ([Diederik et al.(2017)]) and mini batches of 64.

Results
The period from 1994 to 2011 is used to train the two-stage model and the period from 2012 to 2014 serves as the validation period. The measures chosen in this paper to validate the analysis are the correlation coefficient (r), the root mean square error (RMSE) and the bias. Different values for the maximum travel time of waves t max are tested, and the results of k-fold cross-validation (with k = 5) are shown in Figure 3. The RMSE stabilises approximately at t max = 30 × 3h, which corresponds to about 3.3 days, and the gain is substantial compared to using t max = 5. This means that wind conditions over a time window of at least 3.3 days must be considered to characterise the wave climate at the target location. In the following, the value of t max is chosen equal to 30. Figure 4 shows the scatter plot of observed versus predicted values of H s using the two-stage model (5). The RMSE in the validation period is equal to 0.21m for an H s of mean 1.9m and standard deviation 1.1m. The model performs well in predicting H s and accounts for both wind and swell. The validation measures in the calibration and validation periods are almost the same. This means that the model does not overfit the training data and generalises well the relationship between wind and waves. Furthermore, the seasonality of H s is well captured by the two-stage model, as can be seen in Figure 5.
A comparison of the two-stage model with two other statistical approaches is done in Table 1. The first approach, described in ( [Obakrim et al.(2022)]), is based on weather types ( [Maraun et al.(2010)]). As for the present work, the local and global predictors were considered. However, in order to reduce the dimension of the predictor a single   predictor is extracted at each spatial location j to predict H s at time t. It is defined a priori as t j + α j + 1 ≤ t ≤ t j − α j + n where t j is the travel time of waves, α j controls the length of the time window, and W j is the projected wind at location j. The parameters t j and α j were estimated using the maximum correlation between h s and the global predictor. The second method ( [Michel et al.(2022)]) uses CNNs to predict H s using the same predictors as in ). Thus, the main difference with the approach proposed in this work is that the temporal dimension of the global predictor is reduced a priori using the preprocessing step based on maximum correlation described above. The numerical results in Table 1 indicate that the two-stage model significantly outperforms the other two methods in term of the validation measures.

Conclusion
In this study, a two-stage model based on deep learning is proposed to predict H s using wind conditions. The model is capable of learning automatically the underlying spatio-temporal structure of the relationship between wind and waves. The model does well in predicting H s and is computationally inexpensive (about 5min using a computer of 30GB RAM, 2 cores CPU, and a 16GB GPU). The proposed methodology is based on two stages which are trained separately. A natural question that arises for future work, is whether we can estimate the parameters jointly using back-propagation and eventually speed up the training process and improving the results. Future work also includes using the method to predict other sea state parameters, such as wave direction and period.
The proposed method can be used for climate and weather studies at any ocean location worldwide. For nearby locations, one can train only the 2 nd stage at each location, using the weights of one location as initialisation for the others and leaving the 1 st stage the same. The model can also learn from buoy data instead of hindcast data and eventually fill in the gaps and complete historical data.