A nearshore sea wave forecasting method and system based on deep learning
By adopting deep learning technology in wave forecasting, combining floats and regional wind and wave characteristics, a nearshore wave forecast model is built, which solves the problems of low accuracy and phase deviation of wave forecasting in the existing technology, and achieves higher precision wave forecasting.
Patent Information
- Application Number
- CN202510213635.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-02-26
AI Technical Summary
Existing wave forecasting technologies rely on single-point float data and cannot accurately capture wave propagation characteristics and sudden extreme wave events, resulting in low prediction accuracy and phase deviation.
Using the nearshore wave forecasting method based on deep learning, the nearshore nearshore wave forecasting model (NWNN) is constructed, combined with the buoy timing characteristics and regional wind and wave characteristics, and PyTorch is used for model training to achieve accurate simulation of wave generation and propagation.
The accuracy of wave forecasting is significantly improved, especially in extreme wave events, and the phase deviation and prediction delay problems in traditional methods are solved, providing more reliable data support for maritime safety and disaster preparedness.
Smart Images

Figure CN119720804B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of marine environment prediction, and particularly relates to a nearshore wave forecasting method and system based on deep learning. Background Art
[0002] Affected by climate change, sea-level rise, and intensifying storm systems, coastal areas are increasingly threatened by extreme wave events. Accurately forecasting nearshore wave conditions is crucial for ensuring maritime safety and effectively responding to disasters. Current wave forecasting frameworks mainly rely on wind fields obtained from atmospheric models to drive wave predictions. However, due to the inherent assumptions of atmospheric and wave models, errors accumulate, often leading to differences between predicted and observed conditions. In addition, the complex coupling relationship between atmospheric driving and ocean processes is often simplified (especially in coastal areas), thus limiting the accuracy of the models.
[0003] Currently, many studies have explored deep learning architectures that use time series of buoy data to predict wave conditions. However, these models often encounter phase deviations between predicted and observed values, especially during sudden extreme wave events. This limitation stems from their reliance on historical buoy observations without fully considering the influence of real-time wind fields and distant swells, resulting in predictions lagging behind actual conditions. This time lag is particularly severe in rapidly changing events (such as storm-induced wave surges).
[0004] The invention patent "A nearshore single-point wave height forecasting method based on deep learning" (publication number CN113283588B) discloses: Step 1: Specify a regional marine hydro-meteorological data set; Step 2: Clean and process the data to obtain valid data and divide it into a training set and a test set; Step 3: Train the model to obtain a trained wave height prediction model; Step 4: Verify the accuracy of the wave height prediction model and predict the wave height result. This method is based on an LSTM model to learn the change characteristics of buoy measured data and forecasts the waves at a single point.
[0005] Through the above analysis, the problems and defects of the prior art are as follows: The prior art only forecasts the wave change trend at a given buoy based on buoy time series data. However, since the waves at a given location are significantly affected by the propagation of swells in adjacent waters and local wind forcing, when wave prediction relies only on single-point time series data, regardless of the model complexity, the prediction accuracy is still low, and sudden waves cannot be forecasted. Summary of the Invention
[0006] To overcome the problems existing in the related art, the disclosed embodiments of the present invention provide a nearshore wave forecasting method and system based on deep learning.
[0007] The technical solution is as follows: A nearshore wave forecasting method based on deep learning, comprising the steps of:
[0008] S1. Based on open-source environmental data, construct a training dataset for the nearshore adjacent wave forecasting model NWNN based on deep learning;
[0009] S2. Based on the constructed training dataset, construct the nearshore adjacent wave forecasting model NWNN;
[0010] S3. Use PyTorch to train the nearshore adjacent wave forecasting model NWNN;
[0011] S4. Use the measured values of buoys that have not been trained by the nearshore adjacent wave forecasting model NWNN to verify the accuracy of the forecasting results.
[0012] In step S1, to construct a training dataset for the nearshore adjacent wave forecasting model NWNN based on deep learning, it includes: obtaining single-point measured data through buoys, and obtaining regional wind wave data through numerical models; the regional wind wave data includes single-point and regional significant wave heights, and wind speeds in the UV directions; for the missing and abnormal values in the measured data, the abnormal values are removed and the missing values are filled.
[0013] Furthermore, the abnormal value is a value greater than 99. After removal, the vacant positions and missing values are filled by bilinear interpolation, and the data source for filling is numerical simulation or open-source reanalysis data; the specific implementation method of bilinear interpolation is as follows:
[0014] Let the midpoint of the matrix and its surrounding four points , , , , and the corresponding values are , , , , , then .
[0015] In step S2, to construct the nearshore adjacent wave forecasting model NWNN, it includes:
[0016] Construct a buoy feature extraction module and a regional wind wave feature extraction module. The buoy feature extraction module consists of four fully connected layers, and each layer uses the ReLU function for activation;
[0017] The regional wind-wave feature extraction module consists of two convolutional pooling layers. After each convolution, the ReLU function is used for activation. The formed matrix vector is flattened and input into a fully connected layer; the results of the two modules are concatenated and passed through a fully connected layer to generate the predicted sea waves, completing the construction of the nearshore adjacent wave prediction model NWNN;
[0018] The input of the nearshore adjacent wave prediction model is the measured data of the buoy in the past 24h and the wind field and sea wave grid data of the region in the past 2h. The input dimensions are the two-dimensional tensor B×T and the four-dimensional tensor B×(T×V)×H×W respectively; the output is the sea wave data in the next 24h, and the output dimension is the two-dimensional tensor B×T; where B is the batch size, T is the time length, V is the number of variables, D is the radial length, H is the meridional length, and W is the zonal length.
[0019] Furthermore, the first layer of the buoy feature extraction module maps the input of length 24 to a feature vector of length 64 and performs ReLU activation; the subsequent layers are extended to feature vectors of length 128 and reduced to feature vectors of length 64 to capture time features; the feature dimension is reduced to 32;
[0020] The specific expression of the fully connected layer is:
[0021] ;
[0022] In the formula, is the input vector, is the weight matrix, is the bias vector, is the output vector;
[0023] The specific expression of the ReLU activation function is:
[0024] ;
[0025] In the formula, is the input vector.
[0026] Furthermore, the first layer of the regional wind-wave feature extraction module applies 64 convolutional kernels of size 3×3, passes through ReLU activation and a 2×2 max pooling layer to reduce the spatial dimension; the second convolutional layer applies 128 convolutional kernels with the same kernel size and padding strategy, performs ReLU activation and 2×2 max pooling again; after the final pooling operation, the feature map is flattened into a 1D vector and then input into a fully connected layer to reduce the feature dimension to 32; the specific expression of the convolution is:
[0027] ;
[0028] In the formula, is the The convolution result of a sample under the th convolution kernel, is the bias term of the th convolution kernel, is the longitudinal length, is the latitudinal length, is 's index, is the weight value of the th convolution kernel at ; is the th sample at 's data value;
[0029] ;
[0030] In the formula, is an element in the output feature map after pooling, represents the position of the pooling window in the input feature map, represents the range of the pooling window, represents selecting the maximum value in the window as the output value, and are the index ranges of the pooling window, is the value at position in the output feature map after pooling, is the value at position in the input feature map after pooling.
[0031] Furthermore, splicing the results of the buoy feature extraction module and the regional wind wave feature extraction module includes: splicing two columns of feature vectors in the second dimension, and the expression is:
[0032] ;
[0033] In the formula, is the output vector of the buoy feature extraction module, is the output vector of the regional wind wave feature extraction module, is the spliced vector, is to splice a and b, is the splicing dimension.
[0034] In step S3, training the nearshore adjacent wave prediction model NWNN using PyTorch includes the steps:
[0035] S301, the nearshore adjacent wave prediction model NWNN uses the mean absolute error MAE as the optimization target;
[0036] ;
[0037] In the formula, and are the true value and the predicted value, is the total amount of data;
[0038] S302, the learning rate follows the cosine annealing algorithm throughout the training process; the specific expression of cosine annealing is:
[0039] ;
[0040] In the formula, is the learning rate of the th training epoch, is the total number of training epochs, is the learning rate decay factor, is the initial learning rate.
[0041] In step S4, using the measured buoy values that have not been trained by the nearshore approaching wave prediction model NWNN, the accuracy verification of the prediction results includes:
[0042] Adopting the correlation coefficient , the root mean square error , the mean absolute percentage error and the skill score to evaluate the prediction performance of the nearshore approaching wave prediction model NWNN and different existing models that have not been trained; the expression is:
[0043] ;
[0044] ;
[0045] ;
[0046] ;
[0047] In the formula, is the true value, is the predicted value, is the average value of the predicted values, is the average value of the true values, is the true value of the previous time step.
[0048] Another object of the present invention is to provide a nearshore sea wave prediction system based on deep learning, which implements the nearshore sea wave prediction method based on deep learning, and the system includes:
[0049] A training dataset construction module for constructing a training dataset for the nearshore approaching wave prediction model NWNN based on deep learning based on open source environmental data;
[0050] An inshore near-wave forecasting model construction module for constructing an inshore near-wave forecasting model NWNN based on the constructed training dataset;
[0051] A training module for training the inshore near-wave forecasting model NWNN using PyTorch;
[0052] A verification module for verifying the accuracy of the forecasting results using the measured buoy values that have not been trained by the inshore near-wave forecasting model NWNN.
[0053] Combining all the above technical solutions, the beneficial effects of the present invention are as follows:
[0054] First, based on the problems existing in current wave prediction, the present invention proposes an inshore wave forecasting method that integrates buoy observations and regional wind-wave environments. Since the sea waves at a given location are significantly affected by the propagation of swell waves in adjacent waters and local wind forcing, accurate prediction not only needs to consider the temporal characteristics of single-point sea waves but also the wind-wave conditions in surrounding areas. The present invention constructs an inshore wave nowcasting model (Nearshore Wave Nowcasting Network, NWNN) to extract both the buoy characteristics of a single point and the wind-wave characteristics of the region, making up for the shortcomings of current single-point wave forecasting that cannot consider the wave propagation characteristics and regional wave forecasting that cannot combine measured data, providing key support for inshore disaster prevention, maritime safety, etc.
[0055] Second, the present invention constructs a dynamically regulated inshore wave nowcasting model (NWNN), innovatively integrating the temporal characteristics of buoys and regional wind-wave information, achieving accurate simulation of wave generation and propagation and accurate forecasting for the next 24 hours. Its technical application will significantly improve the early warning ability in extreme weather events, providing strong data support for ocean disaster prevention, shipping safety, inshore engineering, and ocean resource development.
[0056] Third, the technical solution of the present invention successfully solves the long-standing technical problems that are difficult to overcome in the field of wave forecasting. Due to the limitations of single-point buoy data or regional models, traditional methods cannot accurately capture sudden extreme wave events. Especially under rapidly changing storm surges, the prediction results often deviate significantly from the actual situation. The present invention innovatively combines the temporal characteristics of buoys and regional wind-wave characteristics to construct a dynamic deep learning model (NWNN), comprehensively considering the complex physical characteristics of wave generation and propagation, not only significantly improving the forecasting accuracy but also breaking through the phase deviation problem between the predicted value and the measured value. This technical breakthrough fills the gap between single-point and regional models, providing a new solution for accurate wave forecasting in extreme weather and meeting the long-term urgent needs of people for high-precision ocean disaster early warning and safety guarantee. Description of the Drawings
[0057] The drawings herein are incorporated into and constitute a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure;
[0058] Figure 1 It is a schematic diagram of the principle of the nearshore wave forecasting method based on deep learning provided by an embodiment of the present invention;
[0059] Figure 2 It is a flowchart of the nearshore wave forecasting method based on deep learning provided by an embodiment of the present invention;
[0060] Figure 3 It is a structural diagram of the nearshore adjacent wave forecasting model NWNN provided by an embodiment of the present invention;
[0061] Figure 4 It is a comparison diagram of the predicted values and measured values of several currently most commonly used models;
[0062] Figure 5 It is an error diagram between the predicted values and measured values of several currently most commonly used models;
[0063] Figure 6 It is a skill score diagram of existing methods at different forecasting durations;
[0064] Figure 7 It is a comparison diagram of the forecasting results of the NWNN of the present invention and the existing ANN 24 hours in advance;
[0065] Figure 8 It is a comparison diagram of the prediction effects of the NWNN of the present invention and the existing ANN for extreme waves;
[0066] Figure 9 It is a schematic diagram of the nearshore wave forecasting system based on deep learning provided by an embodiment of the present invention;
[0067] In the figure: 1. Training data set construction module; 2. Nearshore adjacent wave forecasting model construction module; 3. Training module; 4. Verification module. Detailed Embodiments
[0068] To make the above objects, features, and advantages of the present invention more apparent and understandable, the following detailed description of the specific embodiments of the present invention will be given with reference to the drawings. Many specific details are set forth in the following description in order to fully understand the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.
[0069] The innovation of the present invention lies in: for the first time, the present invention organically combines the buoy time series characteristics with the regional wind wave characteristics to comprehensively capture the generation and propagation characteristics of ocean waves, achieving high-precision nowcasting of nearshore ocean waves. Specifically, the present invention processes single-point measured data and regional environmental information through a buoy feature extraction module and a regional wind wave feature extraction module respectively, and uses a multi-layer network to fuse these two types of features, thereby significantly improving the prediction accuracy. In particular, its performance in extreme wave events far exceeds that of traditional models, solving the technical problems of phase deviation and prediction delay in traditional methods, and providing important support for nearshore disaster prevention and control and ocean resource development.
[0070] Embodiment 1. The nearshore ocean wave forecasting method based on deep learning provided by the embodiment of the present invention proposes a nearshore ocean wave nowcasting model. This model fully considers the propagation and generation characteristics of waves, combines the time series characteristics of buoys with the wind wave characteristics of the region, and accurately forecasts the nearshore ocean waves. Its forecasting accuracy far exceeds that of existing models, and it also has excellent forecasting effects for large waves. The present invention can provide reliable safety guarantees for maritime activities, help prevent and mitigate disasters, improve the development and utilization efficiency of ocean resources, and at the same time provide scientific support for coastal management and ecological protection.
[0071] As Figure 1 shown, the nearshore ocean wave forecasting method based on deep learning provided by the embodiment of the present invention first preprocesses the buoy data, including but not limited to interpolating missing buoy data, eliminating abnormal buoy data, and performing spatio-temporal resolution transformation on regional wind wave data, etc., to unify the data format. After preprocessing the data source, a data set for deep learning model training is obtained.
[0072] Secondly, a nearshore ocean wave nowcasting model (Nearshore Wave Nowcasting Network, NWNN) is constructed based on the constructed buoy and regional wind wave data sets. NWNN consists of two modules: a buoy feature extraction module and a regional wind wave feature extraction module. The buoy feature extraction module consists of four fully connected layers, and each layer is activated using the ReLU function, and finally a column of feature vectors is formed. The regional wind wave feature extraction module consists of two convolutional pooling layers, and the ReLU function is used for activation after each convolution. Finally, the formed matrix vector is flattened, input into a fully connected layer, and a feature vector with the same length as the output of the buoy feature extraction module is generated. Finally, the feature vectors generated by the two modules are concatenated, and a predicted ocean wave is generated through a fully connected layer. The input of the model is the measured data of the buoy in the past 24h and the wind field and ocean wave grid data of the region in the past 2h, and the output is the ocean wave data in the future 24h.
[0073] Finally, the model output results are compared with the measured data to verify the forecast accuracy. The evaluation indicators include: root mean square error, mean relative error, mean absolute error, correlation coefficient, and skill score.
[0074] Example 2, as another embodiment of the present invention, Figure 2 As shown, the nearshore wave forecasting method based on deep learning provided by the embodiment of the present invention includes the following steps:
[0075] S1, based on open source environmental data, build a training dataset for the nearshore nearwave forecasting model NWNN based on deep learning;
[0076] Single-point measured data is obtained through buoys, and regional wind and wave data is obtained through numerical models, including single-point and regional significant wave heights and wind speed in the UV direction. Since the measured data may be missing or abnormal, it is necessary to remove abnormal values and fill in missing values. The numerical model includes operations such as temporal and spatial resolution transformation to unify the data format. Among the data sets, 70% is used as a training set and 30% is used as a test set.
[0077] S2, based on the constructed training data set, construct the nearshore nearwave forecast model NWNN;
[0078] Construct the buoy feature extraction module and the regional wind and wave feature extraction module. The buoy feature extraction module consists of four fully connected layers, each of which is activated by the ReLU function. The regional wind and wave feature extraction module consists of two convolutional pooling layers, which are activated by the ReLU function after each convolution. Finally, the matrix vector formed is flattened and input into a fully connected layer. Finally, the results of the two modules are concatenated and a fully connected layer is used to generate the predicted waves; the construction of the nearshore nearshore wave forecast model NWNN is completed.
[0079] The input of the nearshore near-shore wave forecast model is the measured data of the buoy in the past 24 hours and the wind field and wave grid data of the area in the past 2 hours. The input dimensions are two-dimensional tensor B×T and four-dimensional tensor B×(T×V)×H×W respectively; the output is the wave data of the next 24 hours, and the output dimension is two-dimensional tensor B×T; among them, B is the batch size, T is the time length, V is the number of variables, D is the radial length, H is the longitude length, and W is the latitudinal length;
[0080] S3, using PyTorch to train the nearshore nowwave forecast model NWNN;
[0081] The nearshore adjacent wave prediction model NWNN was trained for 500 epochs with a batch size of 32. In each epoch, the model parameters were updated according to the gradient of the mean absolute error loss function, which measures the difference between the predicted and true values. The learning rate scheduler dynamically adjusted the learning rate in each epoch to ensure efficient learning throughout the training process. To monitor the training progress, the nearshore adjacent wave prediction model NWNN was evaluated on the test set after each epoch. If the test loss improved, the current nearshore adjacent wave prediction model NWNN weights were saved as the best-performing nearshore adjacent wave prediction model NWNN to prevent overfitting and ensure optimal performance.
[0082] S4. Use the measured values of the buoys that have not been trained by the nearshore adjacent wave prediction model NWNN to verify the accuracy of the prediction results.
[0083] Exemplarily, the outliers in the measured values in step S1 are defined as values greater than 99. The vacant positions and other missing values after removal are filled by bilinear interpolation. The source of the filled data is numerical simulation or open-source reanalysis data. The present invention innovatively proposes that the specific implementation method of bilinear interpolation is as follows: Let the midpoint of the matrix and the four surrounding points , , , , and the corresponding values are , , , , , then .
[0084] Exemplarily, as Figure 3 shown, in step S2, constructing the nearshore adjacent wave prediction model NWNN includes:
[0085] Construct a buoy feature extraction module and a regional wind-wave feature extraction module. The buoy feature extraction module consists of four fully connected layers, and each layer is activated using the ReLU function;
[0086] S201. The buoy feature extraction module consists of four fully connected layers. The first layer maps the input of length 24 to a feature vector of length 64, and then performs ReLU activation. The subsequent layers are extended to feature vectors of length 128 and then reduced to feature vectors of length 64 to ensure complete capture of temporal features. Finally, the feature dimension is reduced to 32.
[0087] The present invention innovatively proposes that the specific expression of full connection is:
[0088] ;
[0089] Wherein: is the input vector, is the weight matrix, is the bias vector, is the output vector.
[0090] The specific expression of the ReLU activation function is:
[0091] ;
[0092] Wherein, is the input vector.
[0093] In S202, the regional wind-wave feature extraction module adopts two convolutional layers. The first layer applies 64 convolutional kernels of size 3×3, and then passes through ReLU activation and a 2×2 max pooling layer to reduce the spatial dimension. The second convolutional layer applies 128 convolutional kernels with the same kernel size and padding strategy, and then performs ReLU activation and 2×2 max pooling again. After the final pooling operation, the feature map is flattened into a 1D vector, and then input into a fully connected layer to reduce the feature dimension to 32. The present invention innovatively proposes that the specific expression of convolution is:
[0094] ;
[0095] Wherein: is the meridional length, is the zonal length, is the index of, is the th convolutional kernel at when the weight value, is the th sample at, the data value at, is the th convolutional kernel's bias term, is the th sample under the th convolutional kernel's convolution result.
[0096] The specific expression of pooling is:
[0097] ;
[0098] Wherein, is the element in the output feature map after pooling, represents the position of the pooling window in the input feature map, represents the range of the pooling window, represents selecting the maximum value in the window as the output value.
[0099] S203. The splicing of the results of the two modules refers to splicing the two columns of feature vectors in the second dimension. Let the output vector of the buoy feature extraction module be and the output vector of the regional wind-wave feature extraction module be . With the innovative proposal of the present invention, the spliced vector is:
[0100] ;
[0101] Exemplarily, the specific steps of using PyTorch to train the nearshore adjacent wave prediction model NWNN in step S3 include:
[0102] S301. The nearshore adjacent wave prediction model NWNN takes the mean absolute error (MAE) as the optimization objective:
[0103] ;
[0104] Among them, and are the true value and the predicted value, and is the total amount of data.
[0105] S302. To improve the convergence, the learning rate follows the cosine annealing algorithm throughout the training process. With the innovative proposal of the present invention, the specific expression of cosine annealing is:
[0106] ;
[0107] In the formula: is the learning rate of the th training epoch, is the total number of training epochs, is the learning rate decay factor, and is the initial learning rate.
[0108] Exemplarily, the specific steps of verifying the sea wave prediction result in step S4 include:
[0109] S401. The correlation coefficient (r), root mean square error (RMSE), mean absolute percentage error (MAPE) proposed by the present invention and the skill score (Skill) innovatively proposed by the present invention are used to evaluate the prediction performance of different models.
[0110] ;
[0111] ;
[0112] ;
[0113] ;
[0114] In the formula, is the true value, is the predicted value, is the average value of the predicted values, is the average value of the true values, is the true value at the previous time step.
[0115] S402, Figure 4 is a comparison chart of the predicted values and measured values of several currently most commonly used models. Figure 5 is an error chart between the predicted values and measured values of several currently most commonly used models.
[0116] The limitations of these models are particularly evident in extreme weather events. For example, around March 13th to 16th, 2023, all models failed to capture the sudden increase in SWH and showed a delayed response. Even advanced models such as Transformer and Long Short-Term Memory Network (LSTM) did not show a significant advantage over simple models such as Autoregressive Model (AR) and Artificial Neural Network (ANN) in predicting these rapid changes.
[0117] S403, compare the prediction results of several currently most commonly used models with those of the persistence model. As Figure 6 the skill scores of existing methods at different forecast lead times. The five-pointed star represents the persistence model, which is the model with the highest score at that forecast lead time; it is assumed that the future wave conditions are the same as the current observations, and this is used as a benchmark for evaluating the prediction model. Existing methods have not shown significant improvement compared to the persistence model and even perform worse in some cases. For example, the 2-hour forecast skill score of the Transformer model is -0.15.
[0118] S404, Figure 7 compares the 24-hour-ahead forecast results of the NWNN of the present invention and the existing ANN. The performance gap between the NWNN and existing methods is very obvious. Many predictions of the ANN deviate significantly from the "perfect prediction" diagonal line (red dashed line), especially for extreme ocean waves above 3 meters, but the NWNN provides more consistent predictions and its skill score far exceeds that of the ANN and other existing methods. Moreover, the NWNN shows stronger performance under extreme wave conditions. Compared with the purple markers (representing large errors of the ANN), the orange markers (representing large errors of the NWNN) are significantly fewer.
[0119] Among them, Figure 7 the dashed line in the middle is the optimal fitting line, the blue solid line is the NWNN fitting line, and the green solid line is the ANN fitting line. The orange points are the points with larger errors (error greater than 1m) of the NWNN. The purple points are the points with larger errors of the ANN. The skill score of the NWNN is in the lower right corner.
[0120] S405, Figure 8 The prediction effects of the NWNN of the present invention and the ANN of the prior art for extreme waves (wave height greater than 3 m) are compared. The error of the NWNN is more biased towards the 0 axis compared to the ANN, and the ANN will significantly underestimate the sea wave intensity as the prediction duration increases. Figure 8 In, the solid line is the prediction result of the NWNN, and the dashed line is the prediction result of the ANN.
[0121] S406. The present invention compares the NWNN with the prediction results of the current most advanced European Centre for Medium-Range Weather Forecasts. The prediction results of the NWNN are comparable to those of the European Centre for Medium-Range Weather Forecasts, and the prediction accuracy even exceeds that of the European Centre for Medium-Range Weather Forecasts at some positions. At different positions, such as:
[0122] For the measured value of 3.04 m, the predicted value of the present invention can reach 2.31 m, while the predicted value of the European Centre for Medium-Range Weather Forecasts is only 1.95 m;
[0123] For the measured value of 2.76 m, the predicted value of the present invention can reach 2.33 m, while the predicted value of the European Centre for Medium-Range Weather Forecasts is only 1.98 m;
[0124] For the measured value of 1.49 m, the predicted value of the present invention can reach 1.41 m, while the predicted value of the European Centre for Medium-Range Weather Forecasts is only 1.39 m;
[0125] For the measured value of 1.89 m, the predicted value of the present invention can reach 1.62 m, while the predicted value of the European Centre for Medium-Range Weather Forecasts is only 1.59 m;
[0126] For the measured value of 1.31 m, the predicted value of the present invention can reach 1.28 m, while the predicted value of the European Centre for Medium-Range Weather Forecasts is only 1.90 m;
[0127] For the measured value of 1.63 m, the predicted value of the present invention can reach 1.46 m, while the predicted value of the European Centre for Medium-Range Weather Forecasts is only 1.76 m;
[0128] For the measured value of 1.45 m, the predicted value of the present invention can reach 1.39 m, while the predicted value of the European Centre for Medium-Range Weather Forecasts is only 1.58 m;
[0129] For the measured value of 0.86 m, the predicted value of the present invention can reach 0.91 m, while the predicted value of the European Centre for Medium-Range Weather Forecasts is only 1.08 m;
[0130] For the measured value of 0.52 m, the predicted value of the present invention can reach 0.60 m, while the predicted value of the European Centre for Medium-Range Weather Forecasts is only 0.53 m.
[0131] As can be seen from the above embodiments, the present invention can accurately predict the waves in the near shore for the next 24 hours, especially sudden large waves. Compared with existing methods, the present invention can well simulate the generation and propagation characteristics of ocean waves by extracting dual features of measured data and regional wind-wave information, solves the phase deviation problem between the predicted values and the measured values of existing methods, and effectively improves the prediction accuracy. The present invention can provide more accurate and reliable data support for the prediction of marine weather events, thereby helping to safeguard the safety of marine economy, people's lives and property, and understand the trends and impacts of climate change.
[0132] Embodiment 3, as Figure 9 shown, the near-shore ocean wave forecasting system based on deep learning provided by the embodiment of the present invention includes:
[0133] A training data set construction module 1 for constructing a training data set of the near-shore adjacent wave forecasting model NWNN based on deep learning based on open-source environmental data;
[0134] A near-shore adjacent wave forecasting model construction module 2 for constructing a near-shore adjacent wave forecasting model NWNN based on the constructed training data set;
[0135] A training module 3 for training the near-shore adjacent wave forecasting model NWNN using PyTorch;
[0136] A verification module 4 for verifying the accuracy of the forecasting results using the measured values of buoys that have not been trained by the near-shore adjacent wave forecasting model NWNN.
[0137] The above is only a relatively preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any modification, equivalent replacement, and improvement made by those skilled in the art within the technical scope disclosed by the present invention, as long as they are made within the spirit and principle of the present invention, shall be covered by the protection scope of the present invention.
Claims
1. A method for forecasting nearshore waves based on deep learning, characterized in that: The method comprises the steps of: S1, based on open source environmental data, build a NWNN training dataset for the nearshore nearwave forecasting model based on deep learning; S2, based on the constructed training data set, construct the nearshore nearwave forecast model NWNN; S3, using PyTorch to train the nearshore nearwave forecast model NWNN; S4, using the measured values of the buoys that have not been trained by the nearshore nearwave forecast model NWNN, the accuracy of the forecast results is verified; In step S2, a nearshore nearwave forecast model NWNN is constructed, including: Construct the buoy feature extraction module and the regional wind and wave feature extraction module. The buoy feature extraction module consists of four fully connected layers, and each layer is activated using the ReLU function; The regional wind and wave feature extraction module consists of two convolutional pooling layers. After each convolution, the ReLU function is used for activation. The resulting matrix vector is flattened and input into a fully connected layer. The results of the two modules are concatenated and passed through a fully connected layer to generate predicted waves, completing the construction of the nearshore wave forecast model NWNN. The input of the nearshore wave forecast model is the measured data of the buoy in the past 24 hours and the wind field and wave grid data of the area in the past 2 hours. The input dimensions are two-dimensional tensor B×T and four-dimensional tensor B×(T×V)×H×W respectively; the output is the wave data of the next 24 hours, and the output dimension is two-dimensional tensor B×T; among them, B is the batch size, T is the time length, V is the number of variables, D is the radial length, H is the longitude length, and W is the latitudinal length.
2. The method for forecasting nearshore waves based on deep learning according to claim 1, characterized in that: In step S1, a training data set of a nearshore nearwave forecast model NWNN based on deep learning is constructed, including: obtaining single-point measured data through buoys, and obtaining regional wind and wave data through numerical models; the regional wind and wave data include single-point and regional significant wave heights, and wind speeds in the UV direction; for missing and outliers in the measured data, the outliers are removed and the missing values are filled.
3. The method for forecasting nearshore waves based on deep learning according to claim 2, characterized in that: The outlier is a value greater than 99. After removal, the vacant positions and missing values are filled by bilinear interpolation, and the source of the filling data is numerical simulation or open source reanalysis data. The specific implementation method of bilinear interpolation is: suppose the midpoint (x, y) of the matrix and the four points around it (x1, y1), (x1, y2), (x2, y1), (x2, y2), the corresponding values are f(x, y), f(x1, y1), f(x1, y2), f(x2, y1), f(x2, y2), then f(x, y) = f(x-x1, y1) + y [f(x-x1, y2) - f(x-x1, y1)].
4. The method for forecasting nearshore waves based on deep learning according to claim 1, characterized in that: The first layer of the buoy feature extraction module maps the input of length 24 to a feature vector of length 64, and performs ReLU activation; the subsequent layers expand to a feature vector of length 128, which is reduced to a feature vector of length 64 to capture temporal features; reducing the feature dimension to 32; The specific expression of full connection is: y=Wx+b Where x is the input vector, W is the weight matrix, b is the bias vector, and y is the output vector; The specific expression of the ReLU activation function is: ReLU(x)=max(0,x).
5. The method for forecasting nearshore waves based on deep learning according to claim 4, characterized in that: The first layer of the regional wind and wave feature extraction module applies 64 convolution kernels of size 3×3, which are activated by ReLU and 2×2 maximum pooling layers to reduce the spatial dimension; the second convolution layer applies 128 convolution kernels with the same kernel size and padding strategy, which are activated by ReLU and 2×2 maximum pooling again; after the last pooling operation, the feature map is flattened into a 1-dimensional vector and then input into the fully connected layer to reduce the feature dimension to 32; the convolution is specifically expressed as: Where, out(B i , K j ) is the convolution result of the i-th sample under the j-th convolution kernel, bias(K j ) is the bias term of the jth convolution kernel, H is the longitudinal length, W is the latitudinal length, h, w are the indices of H, W respectively, weight(K j , h, w) is the weight value of the jth convolution kernel at h, w, input(B i , h, w) is the data value of the i-th sample at h, w; Where Y is the element in the output feature map after pooling, (i, j) represents the position of the pooling window in the input feature map, pool represents the range of the pooling window, max represents the maximum value in the window as the output value, m and n are the index ranges of the pooling window, and Y i,j is the value of position (i, j) in the output feature map after pooling, x i+m,i+n is the value of position (i+m, i+n) in the input feature map after pooling.
6. The method for forecasting nearshore waves based on deep learning according to claim 1, characterized in that: The results of the buoy feature extraction module and the regional wind and wave feature extraction module are concatenated, including: concatenating the two columns of feature vectors in the second dimension, and the expression is: c = Concat(a, b, dim = 2) Where a is the output vector of the buoy feature extraction module, b is the output vector of the regional wind and wave feature extraction module, c is the concatenated vector, Concat() is the concatenation of a and b, and dim is the concatenation dimension.
7. The method for forecasting nearshore waves based on deep learning according to claim 1, characterized in that: In step S3, the nearshore nearwave forecast model NWNN is trained using PyTorch, including the following steps: S301, the nearshore nearwave forecast model NWNN takes the mean absolute error MAE as the optimization target; In the formula, y true and predict is the true value and the predicted value, N is the total amount of data; S302, the learning rate follows the cosine annealing algorithm during the entire training process; the specific expression of cosine annealing is: Where lr(x) is the learning rate of the xth training round, X is the total number of training rounds, lrf is the learning rate decay factor, and lr0 is the initial learning rate.
8. The method for forecasting nearshore waves based on deep learning according to claim 1, characterized in that: In step S4, the accuracy of the forecast results is verified by using the measured values of the buoys that have not been trained by the nearshore nearwave forecast model NWNN, including: The correlation coefficient r, root mean square error RMSE, mean absolute percentage error MAPE and skill score Skill are used to evaluate the prediction performance of the nearshore nearwave forecast model NWNN and the existing untrained models; the expression is: In the formula, y true is the true value, y predict is the predicted value, is the average of the predicted values, is the average of the true values, is the true value of the previous time step.
9. A nearshore wave forecasting system based on deep learning, characterized in that: The system implements the nearshore wave forecasting method based on deep learning as claimed in any one of claims 1 to 8, and the system comprises: A training data set construction module (1) is used to construct a NWNN training data set for a nearshore nearwave forecasting model based on deep learning based on open source environmental data; A nearshore nearwave forecasting model building module (2) is used to build a nearshore nearwave forecasting model NWNN based on the constructed training data set; Training module (3), used to train the nearshore nearwave forecasting model NWNN using PyTorch; The verification module (4) is used to verify the accuracy of the forecast results using the measured values of the buoys that have not been trained by the nearshore nearwave forecast model NWNN.
Citation Information
Patent Citations
A Deep Learning-Based Method for Predicting Nearshore Single-Point Wave Height
CN113283588B
Multi-element medium and long term real-time prediction method and system for wave at port basin entrance and application
CN115222163A
Sensitive wave height forecasting method suitable for non-structural sea wave spatio-temporal data
CN118261044A
Cited By
Short peak wave nonlinear characteristic enhancement forecasting method
CN121723018A