A grid processing method to improve the efficiency and stability of ocean numerical forecast models
High-quality grids are generated through multi-source data fusion and deep learning models, and based on CFD pre-simulation and time step optimization technology, the grid generation and computing efficiency and stability problems in the ocean numerical forecast model are solved, achieving more efficient Ocean numerical forecast.
Patent Information
- Application Number
- CN202411329642.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-09-24
AI Technical Summary
The existing numerical forecast model of oceans has shortcomings in grid generation and calculation efficiency and stability. In particular, the minimum grid scale is greatly affected by islands or headlands, and the minimum grid scale generated is difficult to automatically control and cannot be encrypted according to changes in water depth. Moreover, it is difficult to calculate the step size inversely push the grid scale, resulting in low computational efficiency and poor stability of the model.
Multi-source marine data fusion and deep learning models are used to generate grid topology, high-quality grids are generated through CFD pre-simulation and adaptive optimization, and time-step optimization is carried out based on local time-step prediction models to realize automated model verification and global Time step optimization.
The grid quality and overall time step of the model are improved, the computing efficiency and stability are significantly improved, and the model can handle complex marine phenomena more efficiently without affecting accuracy.
Smart Images

Figure CN118886368B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of ocean hydrodynamic numerical simulation, and in particular to a grid processing method for improving the efficiency and stability of an ocean numerical forecasting model. Background Art
[0002] In the context of climate change, extreme weather and climate events occur frequently. Ocean numerical forecasting can predict the changes in the dynamics of ocean dynamic elements and pollutants in advance, and plays an important role in disaster prevention and mitigation, navigation safety, environmental protection, climate research, etc. The numerical models used in ocean forecasting need to discretize the continuous ocean environment into finite computational units, which are usually represented in the form of grids. By constructing a grid, the continuous ocean area can be divided into multiple small, manageable units, each representing a specific spatial position and volume. The construction of the grid enables complex partial differential equations (such as the Navier-Stokes equations) to be solved in discrete space, which can greatly improve the computational efficiency. By choosing the appropriate grid size and shape, the accuracy of the numerical model can be controlled. Finer grids can capture smaller-scale ocean phenomena, but the amount of calculation will increase accordingly; coarser grids are suitable for large-scale ocean processes, but may ignore some details. At the same time, the construction of the grid helps to define and process the boundary conditions of the model.
[0003] At present, the most widely used unstructured grid construction tool is SMS (Surface-water Modeling System). SMS provides an intuitive graphical user interface, and users can complete grid generation and model configuration by clicking, dragging, and other operations, which reduces the difficulty of use. With a modular design, users can select and combine different functional modules according to their needs, and flexibly build and manage simulation projects. However, SMS has the following problems: SMS is expensive as commercial software, and the existing free community version has limited open functional modules; SMS cannot load the latest geographic information data; SMS cannot encrypt the grid according to changes in water depth; the minimum scale of the grid is greatly affected by complex coastlines such as islands or capes, and the minimum scale of the generated grid is difficult to control automatically. It is impossible to infer the grid scale based on the model calculation step required by the numerical simulation.
[0004] The existing Oceanmesh2d program has some shortcomings when generating forecast model calculation grids: affected by the global shoreline strategy, the grid at the connection between the open boundary and the shoreline is too dense; under the influence of the global water depth gradient strategy, the grid at the boundary varies greatly due to the influence of water depth; the default grid generation strategy is relatively aggressive, the transition between grids is extremely large, and the requirements on grid quality are not strict enough, which may lead to the divergence of the calculation model.
[0005] Therefore, further research and innovation are needed to solve the above problems existing in the prior art. Summary of the invention
[0006] The purpose of the invention is to provide a grid processing method for improving the efficiency and stability of the ocean numerical forecast model, so as to solve the above-mentioned problems existing in the prior art.
[0007] Technical solution: A grid processing method for improving the efficiency and stability of ocean numerical forecasting models, including the following steps:
[0008] S1. Obtain multi-source ocean data, integrate the multi-source ocean data into a unified coordinate system, and perform standardization processing to obtain standardized data; based on the standardized data, use machine learning algorithms to perform quality control, remove outliers and noise, and obtain processed data; extract key terrain features from the processed data; the multi-source ocean data includes global coastline remote sensing data, seabed topography data, and nearshore chart data;
[0009] S2. Use key terrain features to train a pre-configured deep learning model to construct a relationship mapping between terrain features and grid distribution; apply the trained deep learning model to generate a grid topology structure to obtain a preliminary unstructured grid; assign attribute information to the preliminary unstructured grid, including water depth and roughness; prepare boundary condition information for the preliminary unstructured grid after attribute assignment;
[0010] S3. Based on the preliminary unstructured grid and boundary condition information, CFD pre-simulation is performed to obtain CFD pre-simulation results, and flow field characteristics are extracted therein; based on the flow field characteristics, the density of the preliminary unstructured grid is adaptively optimized to obtain a preliminary optimized grid; based on the preliminary optimized grid, a prismatic layer grid is created in the boundary layer region to achieve transition with the external unstructured grid to obtain an optimized grid;
[0011] S4. Based on the optimized grid, the results of CFD pre-simulation and the preset CFL conditions, the local time step of each grid unit is calculated; based on the local time step, a time step prediction model is constructed and trained to obtain a trained time step prediction model;
[0012] S5. Based on the trained time step prediction model, perform uncertainty quantification analysis and output uncertainty analysis results. Based on the trained time step prediction model, perform multi-index evaluation and spatiotemporal analysis, realize automatic model verification, and output verification results. Based on the uncertainty analysis results and verification results, search and optimize the global time step.
[0013] Beneficial effect: the present invention uses the latest geographic information data to preliminarily generate the grid, and through adaptive optimization of the grid, realizes the encryption of the grid and improves the grid quality; at the same time, the overall time step of the model is optimized and improved, which can greatly improve the calculation efficiency and stability without affecting the accuracy of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 It is a flow chart of the present invention.
[0015] Figure 2 This is a flow chart of step S1 of the present invention.
[0016] Figure 3 This is a flow chart of step S2 of the present invention.
[0017] Figure 4 This is a flow chart of step S3 of the present invention.
[0018] Figure 5 This is a flow chart of step S4 of the present invention.
[0019] Figure 6 This is a flow chart of step S5 of the present invention. DETAILED DESCRIPTION
[0020] like Figure 1 As shown, this application proposes a grid processing method for improving the efficiency and stability of the ocean numerical prediction model, comprising the following steps:
[0021] S1. Obtain multi-source ocean data, integrate the multi-source ocean data into a unified coordinate system, and perform standardization processing to obtain standardized data; based on the standardized data, use machine learning algorithms to perform quality control, remove outliers and noise, and obtain processed data; extract key terrain features from the processed data; the multi-source ocean data includes global coastline remote sensing data, seabed topography data, and nearshore chart data;
[0022] S2. Use key terrain features to train a pre-configured deep learning model to construct a relationship mapping between terrain features and grid distribution; apply the trained deep learning model to generate a grid topology structure to obtain a preliminary unstructured grid; assign attribute information to the preliminary unstructured grid, including water depth and roughness; prepare boundary condition information for the preliminary unstructured grid after attribute assignment;
[0023] S3. Based on the preliminary unstructured grid and boundary condition information, CFD pre-simulation is performed to obtain CFD pre-simulation results, and flow field characteristics are extracted therein; based on the flow field characteristics, the density of the preliminary unstructured grid is adaptively optimized to obtain a preliminary optimized grid; based on the preliminary optimized grid, a prismatic layer grid is created in the boundary layer region to achieve transition with the external unstructured grid to obtain an optimized grid;
[0024] S4. Based on the optimized grid, the results of CFD pre-simulation and the preset CFL conditions, the local time step of each grid unit is calculated; based on the local time step, a time step prediction model is constructed and trained to obtain a trained time step prediction model;
[0025] S5. Based on the trained time step prediction model, perform uncertainty quantification analysis and output uncertainty analysis results. Based on the trained time step prediction model, perform multi-index evaluation and spatiotemporal analysis, realize automatic model verification, and output verification results. Based on the uncertainty analysis results and verification results, search and optimize the global time step.
[0026] In this embodiment, ocean data is obtained from multiple sources, including global coastline remote sensing data, seafloor topography data, and nearshore chart data. These heterogeneous data are fused into a unified coordinate system and standardized. Machine learning algorithms are applied to control the data quality and remove outliers and noise. Key terrain features are extracted from the processed data to provide guidance for subsequent grid generation. The data is spatially indexed and partitioned to support efficient data access. A comprehensive data storage and management system is established to ensure effective organization and long-term maintenance of data.
[0027] Use high-quality data to train a deep learning model that understands the relationship between terrain features and ideal grid distribution. Create a preliminary unstructured grid by guiding the topological structure generation of the grid based on the trained model. Assign necessary attribute information to the generated grid, such as water depth, roughness, etc. Perform a comprehensive quality assessment and preliminary optimization of the generated grid. Prepare necessary boundary condition information for the optimized grid. Prepare for subsequent large-scale parallel computing, including domain decomposition and load balancing strategy formulation.
[0028] Use the preliminary mesh to perform computational fluid dynamics (CFD) pre-simulation to obtain key flow field features. Adaptively optimize the mesh based on the pre-simulation results to improve mesh quality and computational efficiency. Perform special mesh processing on the boundary layer area to ensure accurate capture of near-wall flow characteristics. Perform a comprehensive consistency and stability check on the optimized mesh to ensure that the mesh meets the requirements of numerical simulation.
[0029] Develop an intelligent adaptive time step algorithm to dynamically adjust the time step according to the flow field characteristics. Implement a series of efficient numerical solution techniques to accelerate the solution of large-scale linear systems. Optimize the parallel computing strategy of the model to improve the efficiency of computing resource utilization. Integrate a variety of advanced computing acceleration technologies to further improve the overall computing performance of the model.
[0030] Perform a comprehensive uncertainty quantification analysis to evaluate the impact of parameter uncertainty on model output. Implement an automated model validation system to fully evaluate model performance. Based on the above results, optimize the global time step and perform final tuning and comprehensive acceptance testing of the model.
[0031] like Figure 2 As shown, according to one aspect of the present application, step S1 is further:
[0032] S11. Acquire multi-source ocean data, including global coastline remote sensing data, global seafloor topography data grid, nearshore chart data, water depth data extracted from nearshore chart data, and local high-resolution measurement data within the study area;
[0033] S12. Convert the multi-source ocean data to a unified coordinate system and a mean sea level vertical datum to obtain converted multi-source ocean data; based on the converted multi-source ocean data, use the Kriging interpolation algorithm to fuse the water depth data of different resolutions, and use the Douglas-Peucker algorithm to simplify the global coastline remote sensing data to obtain the preliminary fused multi-source ocean data; based on the preliminary fused multi-source ocean data, apply the local polynomial interpolation method to adjust to obtain the adjusted multi-source ocean data; based on the adjusted multi-source ocean data, use the weighted average method based on the data quality weight to fuse to obtain the fused data; resample the fused data to a unified grid resolution;
[0034] S13. Based on the fused data, use a local anomaly detection algorithm to identify outliers and obtain data without outliers; based on the data without outliers, use an adaptive median filter to remove high-frequency noise and obtain denoised data; based on the denoised data, use an empirical mode decomposition method to identify and correct systematic errors and obtain corrected data; based on the corrected data, use a cross-validation technique to evaluate the overall quality of the data and calculate the root mean square error and deviation; based on the root mean square error and deviation, use the DINEOF algorithm based on physical laws to fill in the data vacancy area to obtain quality-controlled data, and generate a quality assessment report;
[0035] S14. Based on the quality-controlled data, the improved Canny edge detection algorithm is used to extract the shoreline contour; based on the extracted shoreline contour, the multi-scale curvature analysis method is used to identify the important feature points of the seabed topography; based on the important feature points, the watershed segmentation algorithm is applied to perform regional division to obtain the segmented seabed topography area; based on the quality-controlled data, the U-Net model based on deep learning is used to identify the key terrain features; based on the segmented seabed topography area and the key terrain features, the terrain complexity index of each area is calculated.
[0036] In one embodiment of the present application, the latest OpenStreetMap global shoreline remote sensing data is obtained, and the shoreline data in vector format is downloaded through the API interface provided by it. The latest version of the global seafloor topography data grid is obtained from the GEBCO (GeneralBathymetric Chart of the Oceans) official website, which is usually provided in NetCDF format. Electronic nautical charts are obtained from maritime departments of various countries, and water depth point data are extracted from them using professional software (such as CARIS HIPSand SIPS). Local high-resolution measurement data that may exist in the study area, such as multi-beam bathymetric data, are also collected and sorted. All collected data are organized according to a unified naming convention and directory structure, and a preliminary metadata file is created to record information such as the source, timestamp, spatial range, and format of each data set.
[0037] All data were converted to a unified coordinate system (such as WGS84) and vertical datum (such as mean sea level) using the GDAL library. The Kriging interpolation algorithm was used to fuse the water depth data of different resolutions, which takes into account spatial autocorrelation and provides the best linear unbiased estimate. For the shoreline data, the Douglas-Peucker algorithm was applied for simplification to reduce the amount of data while maintaining key features. The local polynomial interpolation method was used to handle the nearshore complex terrain areas to better capture the terrain details. For the overlapping areas of data, the weighted average method based on the data quality weight was used for fusion. The fused data was resampled to a unified grid resolution, and the resolution that can represent the minimum feature scale of the study area was selected.
[0038] Perform comprehensive quality control on the fused data. Identify potential outliers using local anomaly detection algorithms (such as One-Class SVM), which are able to adapt to complex terrain changes. For identified outliers, confirm whether they are true anomalies by comparing them with surrounding data and verifying with historical data. Apply adaptive median filters to remove high-frequency noise while retaining important terrain features. For systematic errors, use empirical mode decomposition (EMD) methods for identification and correction. Evaluate the overall quality of the data using cross-validation techniques, including calculating statistical indicators such as root mean square error (RMSE) and bias. For data gaps, use interpolation methods based on physical laws (such as the DINEOF algorithm that considers hydrodynamic principles) to fill them. Generate a detailed quality assessment report, including data reliability scores and uncertainty estimates for each area.
[0039] Key terrain features were extracted from the quality-controlled data. A modified Canny edge detection algorithm was applied to the shoreline data, which improved the recognition of complex coastlines through adaptive threshold selection. A multiscale curvature analysis method was used to identify important features of the seafloor topography, such as submarine canyons, seamounts, and the edge of the continental shelf. This method calculates curvature at different spatial scales and is able to capture topographic changes at various scales. A watershed segmentation algorithm was applied to regionalize the seafloor topography and identify areas with similar features. For nearshore areas, a deep learning-based semantic segmentation model (such as U-Net) was used to identify complex coastal topography, such as estuaries, sandbars, etc. A terrain complexity index (TCI) was calculated to quantify the terrain complexity of each area. All extracted features were integrated into a multi-layer geographic information system (GIS) database, with each layer representing a feature or index.
[0040] Efficient spatial organization and indexing of extracted feature data. Recursively partition the entire study area based on a quadtree structure, with the splitting criterion combining the rate of change of water depth and the terrain complexity index. Apply R-tree indexing to each leaf node to optimize local spatial query efficiency. Construct a multi-resolution data pyramid and use wavelet transforms to achieve smooth transitions between different levels to ensure fast access to data of appropriate resolution at any zoom level. For large-scale features that span multiple partitions (such as trenches), use graph-based data structures for representation and indexing to ensure feature integrity. Implement a one-dimensional mapping based on space-filling curves (such as Hilbert curves) to support efficient range queries. Design and implement a distributed storage strategy to distribute data across multiple computing nodes while maintaining data locality.
[0041] Establish an efficient and reliable data storage and management system to support the long-term operation and maintenance of the ocean numerical prediction model. Select the PostgreSQL database system and enable the PostGIS extension to support efficient storage and query of geospatial data. Build and implement a multi-level data model, including the original data layer, the processed data layer, and the feature data layer, each layer corresponding to the output of the above steps. Develop a metadata management system, use XML Schema to define the metadata structure, and record the source, processing history, quality information, and version control of each data set. Implement an automated metadata extraction and update process to ensure that the metadata is synchronized with the actual data. Build and implement a role-based access control system to manage the access rights of different users to data. Build a data version control system to support data rollback and historical tracking. Implement an automated data backup and recovery strategy, including incremental backup and off-site backup.
[0042] According to one aspect of the present application, the specific process of the local polynomial interpolation method in step S12 is:
[0043] S121, performing Delaunay triangulation on the input irregularly distributed water depth data points to establish an initial grid structure;
[0044] S122. Select several control points inside each triangle, usually the centroid and the midpoint of the side of the triangle;
[0045] S123, for each control point, determining the data points within its influence range, usually using a K nearest neighbor algorithm;
[0046] S124, constructing a local polynomial function for each control point and the data points within its influence range, usually using a quadratic or cubic polynomial;
[0047] S125, fitting the polynomial coefficients using the least squares method to obtain a local interpolation function at each control point;
[0048] S126, for the target point to be interpolated, determine the triangle containing it and the corresponding control point;
[0049] S127. Use the local interpolation function corresponding to the triangle vertex containing the target point to calculate the value of the target point through barycentric coordinate interpolation.
[0050] According to one aspect of the present application, the local anomaly detection algorithm in step S13 is specifically:
[0051] S131, dividing the input water depth data into overlapping local areas, each area containing a certain number of data points;
[0052] S132. For each local area, calculate the statistical characteristics of the data points, such as mean, variance, skewness and kurtosis;
[0053] S133, using the One-Class SVM algorithm, with statistical features as input, to train a local anomaly detection model;
[0054] S134. For each data point, calculate its anomaly score using the trained model;
[0055] S135, setting an abnormality threshold, marking data points whose abnormality scores exceed the threshold as potential abnormal values;
[0056] S136, perform secondary verification on the marked potential outliers, comparing their differences with neighboring points and consistency with historical data;
[0057] S137. Generate an outlier report, including the location, original value and degree of outlier.
[0058] According to one aspect of the present application, the empirical mode decomposition method in step S13 is specifically:
[0059] S13a, treating the input water depth data as a time series, and determining the maximum number of decomposition iterations and the residual threshold;
[0060] S13b, identifying all local extreme points of the data, including maximum and minimum values;
[0061] S13c, using a cubic spline interpolation method, connecting all the maximum points and the minimum points respectively to form an upper envelope and a lower envelope;
[0062] S13d, calculating the average values of the upper and lower envelopes to obtain a mean envelope;
[0063] S13e, subtract the mean envelope from the original data to obtain a new data series;
[0064] S13f, check whether the new sequence meets the condition of intrinsic mode function (IMF), if not, repeat steps S13b-S13e;
[0065] S13g, subtracting the obtained IMF from the original data, and repeating steps S13b-S13f for the remaining data until the remaining data becomes a monotonic function or satisfies a preset stopping criterion;
[0066] S13h, add all the obtained IMFs and the final residual, reconstruct the original signal, and calculate the reconstruction error.
[0067] This embodiment improves the input data quality and reliability of the ocean numerical prediction model through the acquisition, fusion and quality control of multi-source ocean data. The multi-source ocean data obtained include global coastline remote sensing data, seabed topography data and nearshore chart data, etc., which provide comprehensive basic data support for the model. The Kriging interpolation algorithm and Douglas-Peucker algorithm adopted realize the fusion of data with different resolutions and the simplification of coastlines, and improve the consistency and calculation efficiency of data. The local anomaly detection algorithm, adaptive median filter and empirical mode decomposition method effectively remove outliers and systematic errors, and improve the accuracy of data. The improved Canny edge detection algorithm and multi-scale curvature analysis method accurately extract key terrain features, providing an important basis for subsequent grid generation. The comprehensive application of these technologies makes the input data of the model more accurate, coherent and reliable, laying a solid foundation for subsequent grid generation and numerical simulation. In the ocean numerical prediction model, the quality of the input data directly affects the prediction accuracy and stability of the model. Through this series of data processing steps, the model can more accurately capture complex ocean terrain features, such as steep continental shelf edges, submarine canyons, etc., so as to better adapt to these features in the subsequent grid generation process. At the same time, the improvement of data quality also reduces the numerical instability caused by inaccurate input data, such as false velocity oscillations caused by water depth data errors in shallow water areas. In addition, by calculating the terrain complexity index, it provides an important reference for subsequent adaptive grid generation, so that computing resources can be more efficiently allocated to key areas, thereby improving computing efficiency while ensuring model accuracy.
[0068] like Figure 3 As shown, according to one aspect of the present application, step S2 is further:
[0069] S21. Based on key terrain features, a deep convolutional neural network model based on the U-Net architecture is constructed. The deep convolutional neural network model is trained using the Adam optimizer and a custom loss function. At the same time, k-fold cross-validation and attention mechanisms are introduced into the deep convolutional neural network model to obtain a trained deep learning model. The trained deep learning model is compressed using the model distillation technology to obtain a compressed deep learning model.
[0070] S22, dividing the study area into regular grid cells, applying the compressed deep learning model to each grid cell, predicting the local ideal grid density and direction; based on the predicted results, using the improved quadtree / octree algorithm for adaptive subdivision to obtain the subdivision results; based on the subdivision results, applying the Delaunay triangulation algorithm to generate a preliminary unstructured grid; introducing a method based on constrained Delaunay triangulation to ensure that the preliminary unstructured grid follows the shoreline contour extracted in step S14;
[0071] S23. Assigning attribute information to the preliminary unstructured grid, specifically: assigning a water depth value to each grid node and unit in the preliminary unstructured grid by a high-order interpolation method based on the water depth data in the preliminary fused multi-source ocean data; determining the number of vertical layers for the three-dimensional grid in the preliminary unstructured grid based on the water depth data in the preliminary fused multi-source ocean data and a predefined vertical stratification strategy; calculating and assigning a roughness coefficient to each grid unit in the preliminary unstructured grid based on key terrain features; constructing a dynamic flooding algorithm to mark attributes for intertidal zone grid units in the preliminary unstructured grid; assigning a data reliability weight to each grid unit in the preliminary unstructured grid based on a quality assessment report; estimating the local velocity range of each grid unit in the preliminary unstructured grid using CFD principles;
[0072] S24. Based on the preliminary unstructured grid after the attributes are assigned, the grid quality indicators are calculated, including grid orthogonality, smoothness, aspect ratio and distortion; based on the grid quality indicators, a grid quality prediction model is established using a machine learning algorithm; based on the grid quality prediction model, low-quality areas in the grid are identified; local re-division technology is applied to the low-quality areas to obtain optimized grid areas; based on the optimized grid areas, the grid connectivity is analyzed using a graph theory-based algorithm to obtain a locally simplified grid; based on the locally simplified grid, a physics-based smoothing technology is applied to obtain a physically smoothed grid; based on the physically smoothed grid, global Laplacian smoothing is performed to ensure a smooth transition of the entire grid to obtain the final preliminary unstructured grid;
[0073] S25. Prepare boundary condition information for the final preliminary unstructured grid, specifically: based on the final preliminary unstructured grid and shoreline contours, accurately identify and mark all land boundary grid cells; use pre-stored tidal model data and global ocean circulation model output to assign preliminary water level and flow velocity conditions to open boundary grid nodes; build an intelligent boundary recognition algorithm to automatically detect and classify different types of open boundaries; integrate pre-stored runoff data to establish time-varying inflow boundary conditions; obtain satellite remote sensing data and historical observations to prepare wind stress and heat flux data for surface boundaries; build boundary condition interpolation and smoothing modules to ensure the continuity and consistency of boundary conditions in time and space.
[0074] According to one aspect of the present application, in step S23, the local velocity range of each grid cell in the preliminary unstructured grid is estimated by using the CFD principle, further comprising:
[0075] S231, based on the preliminary unstructured grid, extracting geometric information of each grid cell, including area and characteristic length;
[0076] S232, obtaining water depth data of each grid cell, calculating the water depth difference of adjacent cells, and calculating the local water depth gradient of each grid cell based on the water depth data and the water depth difference of adjacent cells;
[0077] S233, based on the local water depth gradient, using simplified shallow water equations to estimate gravity wave velocity;
[0078] S234, based on the geometric information and water depth data of each grid cell, use the empirical formula to estimate the upper limit of the flow velocity caused by bottom friction;
[0079] S235, obtaining external forcing data, including tide and wind stress, and estimating additional velocity components based on the external forcing data and geometric information of each grid cell;
[0080] S236. Based on the gravity wave velocity, the flow velocity upper limit and the additional flow velocity component, the maximum flow velocity and the minimum flow velocity of each grid cell are calculated to obtain the local flow velocity range of each grid cell.
[0081] The accuracy and numerical stability of the initial condition setting of the ocean numerical prediction model are improved through refined local velocity estimation. The extraction of geometric information of each grid cell provides basic data for subsequent velocity estimation. This method based on grid geometry can better adapt to complex seabed topography and irregular coastline. The calculation of local water depth gradient and estimation of gravity wave velocity based on water depth data provide a physical basis for velocity estimation, taking into account the influence of topography on the flow field, and is particularly suitable for simulating marine phenomena such as coastal currents and internal waves that are significantly affected by topography. The use of empirical formulas to estimate the upper limit of velocity caused by bottom friction solves the shortcomings of traditional methods in dealing with strong bottom friction areas (such as shallow waters or rough seabeds). Considering the influence of external forcing (such as tides and wind stress) on velocity, and calculating the local velocity range of each grid cell, the initial flow field setting is more consistent with the actual physical process. This velocity estimation method that comprehensively considers multiple factors improves the rationality and physical consistency of the model's initial conditions. In practical applications, this refined local velocity estimation technology can improve the model's startup process and short-term forecast accuracy. For example, when simulating the flow field in complex terrain areas (such as island groups, straits, etc.), the model can set a more reasonable initial flow velocity for each grid cell based on local terrain characteristics and external forcing conditions. This not only reduces the spin-up time of the model, but also reduces the numerical instability caused by unreasonable initial conditions. Especially when simulating strong tidal areas or wind-driven current systems, it can better capture the spatial variability of the flow field and improve the performance of the model in complex dynamic systems. In addition, by estimating the maximum and minimum flow velocities of each grid cell, the model can more reasonably set the parameters of the numerical scheme (such as time step, diffusion coefficient, etc.), thereby maximizing computational efficiency while ensuring numerical stability. In general, this velocity estimation method based on physical processes and local characteristics provides more reliable and accurate initial conditions for ocean numerical prediction models, improves the prediction accuracy and computational efficiency of the model, and performs well in dealing with complex terrain and multi-scale dynamic processes.
[0082] In one embodiment of the present application, a deep learning model is trained using key terrain features to understand the relationship between terrain features and ideal grid distribution. Training data is extracted, including terrain features (such as water depth, slope, curvature) and known high-quality grid samples. A deep convolutional neural network based on the U-Net architecture is constructed, with a multi-channel terrain feature map as input and a grid density and direction recommendation as output. The model is trained using the Adam optimizer and a custom loss function (combining grid quality indicators and computational efficiency indicators). K-fold cross validation is used to ensure the generalization ability of the model. An attention mechanism is introduced so that the model can better focus on key terrain features. The model is compressed using model distillation technology to improve the computational efficiency of the subsequent grid generation process. A trained deep learning model is output that can predict the ideal grid distribution based on terrain features.
[0083] The trained deep learning model is used to guide the topological structure generation of the grid. The study area is divided into regular grid cells, and the trained model is applied to each cell to predict the local ideal grid density and orientation. Based on the prediction results, an improved quadtree / octree algorithm is used for adaptive subdivision to generate denser grids in complex terrain areas. The Delaunay triangulation algorithm is applied to generate the initial unstructured grid, and the size and shape of the triangles are guided by the model prediction results. In order to handle complex coastlines, a constrained Delaunay triangulation method is introduced to ensure that the grid strictly follows the extracted coastline contours. Local grid optimization techniques such as edge flipping and node movement are used to further improve the grid quality. A preliminary unstructured grid topology is output, including node locations and cell connectivity relationships.
[0084] Assign necessary attribute information to the grid topology. Using the fused high-precision bathymetric data, accurate water depth values are assigned to each grid node and cell through high-order interpolation methods (such as cubic spline interpolation). Determine the appropriate number of vertical layers for the 3D grid based on the local water depth gradient and the predefined vertical layering strategy. Calculate and assign the roughness coefficient of each grid cell using the terrain feature information extracted in the step. For the intertidal zone area, develop a dynamic flooding algorithm and mark the intertidal zone attributes for the relevant grid cells. Assign data reliability weights to each grid cell based on the data quality assessment report. Using the principles of computational fluid dynamics (CFD), estimate the local flow velocity range for each grid cell in preparation for subsequent time step optimization. Output a preliminary unstructured grid with complete attribute information, including water depth, number of vertical layers, roughness, intertidal zone tags, data reliability weights, and estimated flow velocity range.
[0085] Perform a comprehensive quality assessment and optimization of the preliminary mesh. Calculate a range of mesh quality metrics, including mesh orthogonality, smoothness, aspect ratio, and distortion. Use machine learning algorithms (such as random forests) to build a mesh quality prediction model that takes mesh geometry features as input and outputs a comprehensive quality score. Based on the model, identify low-quality areas in the mesh. Apply local re-meshing techniques, such as Ruppert's algorithm, to these areas to improve mesh quality. To optimize computational efficiency, use graph-based algorithms to analyze mesh connectivity and perform local simplification to reduce unnecessary high-resolution areas. Apply physically-based smoothing techniques, such as spring analogy-based smoothing methods, to further improve mesh quality. Perform global Laplacian smoothing to ensure smooth transitions across the mesh. Output a high-quality, preliminarily optimized unstructured mesh, along with a detailed mesh quality assessment report.
[0086] Prepare necessary boundary condition information for the optimized grid. Accurately identify and label all land boundary grid cells based on extracted shoreline data. Assign preliminary water level and velocity conditions to open boundary grid nodes using pre-stored tidal model data and global ocean circulation model output. Develop intelligent boundary recognition algorithms to automatically detect and classify different types of open boundaries (such as inflow, outflow, radiation boundaries, etc.). For river estuaries, integrate pre-stored runoff data to establish time-varying inflow boundary conditions. Prepare wind stress and heat flux data for surface boundaries based on satellite remote sensing data and historical observations. Develop boundary condition interpolation and smoothing modules to ensure continuity and consistency of all boundary conditions in time and space. Output a complete set of boundary condition data sets, including land boundary markers, open boundary conditions, river inflow conditions, and surface boundary conditions, which are fully compatible with the optimized grid.
[0087] Prepare for subsequent large-scale parallel computing. Use the METIS graph partitioning library to perform domain decomposition on the optimized grid, taking into account load balancing and communication overhead. Develop an adaptive load balancing algorithm that can dynamically adjust partitions during the simulation to cope with dynamically changing areas such as intertidal zones. Build and implement efficient distributed data structures to support fast access and communication of grid data and calculation results. In order to improve computing efficiency, implement a GPU-based parallel computing framework and especially optimize the core hydrodynamics algorithm. Build an intelligent checkpoint system to automatically save intermediate results based on computing resource usage and simulation progress. Implement a visualization pipeline to support real-time data visualization and analysis during parallel computing. Output a complete parallel computing-ready solution, including domain decomposition results, load balancing strategy, distributed data structure, GPU computing framework, checkpoint system, and visualization pipeline.
[0088] According to one aspect of the present application, the dynamic flooding algorithm in step S23 is specifically as follows: extract the grid cells and nodes of the coastal area from the input grid data; assign an initial water level value to each coastal grid node, usually based on the mean sea level. Set the simulation time step and total simulation time. For each time step: update the boundary conditions, including tides and river inflows, etc.; calculate the water level change of each grid cell; compare the terrain elevation and the current water level of each coastal grid cell; if the water level is higher than the terrain elevation, mark the cell as flooded; if the water level is lower than the terrain elevation, mark the cell as dry. Update the grid topology, incorporate the flooded cells into the calculation domain, and remove the dry cells from the calculation domain. Record the flooding history of each coastal grid cell throughout the simulation process.
[0089] According to one aspect of the present application, the local re-meshing technique in step S24 is specifically as follows: input the mesh area to be optimized and the quality threshold. Calculate quality indicators for each mesh unit, such as aspect ratio, internal angle size, etc. Identify mesh units whose quality is lower than the threshold. For each low-quality unit: determine the influence area around it; extract all mesh nodes and boundary information in the influence area; apply the Ruppert algorithm for local re-meshing: insert new Steiner points; perform Delaunay triangulation; check the quality of the newly generated triangles; repeat until all new triangles meet the quality requirements or the maximum number of iterations is reached. Merge the re-meshing results with the original mesh and update the mesh topology. Recalculate the mesh quality indicators of the optimized area to verify the improvement effect.
[0090] According to one aspect of the present application, the physical smoothing technology in step S24 is specifically as follows: input the mesh data that needs to be smoothed. Assign a virtual mass to each mesh node, usually based on the area of the cells around it. Set virtual springs between adjacent nodes, and the spring constant is based on the side length and the desired mesh size. Set the initial time step and the maximum number of iterations. For each time step: calculate the resultant force acting on each node, including spring force and other constraint forces; update the node position using explicit or implicit integration methods; check whether the node movement exceeds the preset maximum allowable displacement; update the mesh topology to ensure that no unit inversion occurs. Calculate the quality index of the smoothed mesh and compare the degree of improvement. If the quality improvement is not obvious or the maximum number of iterations is reached, stop the smoothing process. Output the smoothed mesh data, including updated node coordinates and topological relationships.
[0091] This embodiment realizes efficient and adaptive unstructured grid generation through the combination of deep learning model and advanced grid generation technology, and improves the computational efficiency and accuracy of the ocean numerical forecast model. Using the deep convolutional neural network model of U-Net architecture, combined with the attention mechanism and model distillation technology, efficient recognition of complex terrain features and grid density prediction are achieved. Compared with traditional empirical formulas or manual settings, this machine learning-based method can better capture the complex relationship between terrain and grid distribution, thereby generating a more reasonable grid structure. The improved quadtree / octree algorithm and Delaunay triangulation algorithm are used, combined with the prediction results of the deep learning model, to achieve adaptive grid subdivision and generation, so that the grid density can accurately adapt to local terrain features and expected flow field changes. High-order interpolation methods and dynamic flooding algorithms ensure the accurate allocation of grid attributes, especially when dealing with complex areas such as intertidal zones. The introduction of grid quality prediction models and physics-based smoothing techniques effectively improves the overall quality of the grid and reduces the numerical instability caused by poor grid quality. The intelligent boundary recognition algorithm and boundary condition interpolation module ensure the accurate setting of open boundary conditions, which is crucial for the accuracy of large-scale ocean models. The combined application of these technologies enables the generated unstructured grid to better adapt to complex coastlines and seabed terrain, reducing the number of computing units while ensuring computational accuracy. In practical applications, this adaptive grid generation method can automatically increase grid density in complex terrain areas (such as straits, estuaries, etc.), while maintaining relatively sparse grids in open waters, thereby improving the simulation accuracy of key areas without significantly increasing the total amount of computation. In addition, through the application of deep learning models, the grid generation process has become more automated and intelligent, reducing human intervention and improving the efficiency and consistency of grid generation. This is especially important for operational ocean forecasting systems that require frequent updates or adjustments, which can shorten the preparation time of the model and improve the timeliness of the forecast.
[0092] like Figure 4 As shown, according to one aspect of the present application, step S3 is further:
[0093] S31. Based on the preliminary unstructured grid and boundary condition information, construct a hydrodynamic model, including a turbulence model and a solver, perform fast CFD simulation, obtain simulation results, and extract key features in the simulation results, including high velocity areas, low velocity areas, vortex centers, and strong shear layers; based on the key features, use statistical analysis methods to identify unstable areas, high error areas, and low error areas; based on the unstable areas, high error areas, low error areas, and the extracted key features, generate a CFD analysis report, including a flow field feature distribution map and error estimation;
[0094] S32. Construct a mesh optimization suggestion system based on machine learning, take the CFD analysis report as input, and output mesh optimization suggestions; based on the mesh optimization suggestions and the preliminary unstructured mesh, use the adaptive mesh refinement technology to increase the mesh density in the high velocity and high error area to obtain the first mesh; based on the first mesh, apply the mesh coarsening technology in the low velocity and low error area to obtain the second mesh; based on the second mesh, apply the anisotropic meshing technology in the vortex center to obtain the third mesh; based on the third mesh, use the physics-based mesh smoothing technology to obtain the fourth mesh; based on the fourth mesh, apply the topology optimization algorithm to adjust the mesh connection relationship to obtain the preliminary optimized mesh;
[0095] S33. Based on the preliminary optimized grid and CFD analysis report, estimate the boundary layer thickness distribution in the study area; based on the boundary layer thickness distribution, use structured grid generation technology to create a prismatic layer grid in the near-wall area; use an intelligent transition algorithm to achieve smooth connection between the prismatic layer grid and the external unstructured grid to obtain a smoothly connected grid; based on the smoothly connected grid, apply adaptive layering technology to areas where the terrain complexity index is higher than a preset threshold to obtain an optimized grid that adapts to complex seabed terrain; based on the optimized grid that adapts to complex seabed terrain and real-time simulation results, use a dynamic grid encryption algorithm to automatically adjust the boundary layer grid density to obtain an optimized grid.
[0096] According to one aspect of the present application, the method further includes S34, performing consistency and stability checks on the optimized mesh and generating a mesh quality report, specifically:
[0097] S341, based on the optimized mesh, perform topology check and geometric consistency check in sequence, and mark the mesh cells with problems;
[0098] S342, based on the problematic grid cells, statistical analysis of grid quality parameters is performed to obtain analysis results, including distribution of skewness and aspect ratio;
[0099] S343, based on the optimized grid, use the simplified hydrodynamic model to perform short-term simulation, test numerical stability, and obtain test results;
[0100] S344. Generate a mesh quality report based on the analysis and test results.
[0101] The stability and reliability of the ocean numerical prediction model are improved through comprehensive mesh quality inspection and analysis. Topology inspection and geometric consistency inspection can timely detect potential problems in the mesh structure, such as cell overlap and node dangling, which may lead to numerical instability or non-physical solution. By marking the mesh cells with problems, a clear target is provided for subsequent mesh repair. Statistical analysis of mesh quality parameters (such as skewness and aspect ratio) provides a quantitative assessment of the overall quality of the mesh. This analysis can not only identify local low-quality mesh areas, but also evaluate the overall distribution of mesh quality, providing guidance for mesh optimization. Using a simplified hydrodynamic model to perform short-term simulation to test numerical stability is a forward-looking quality control method that can timely detect numerical instability caused by mesh quality problems before actual long-term simulation, thereby reducing the waste of computing resources and the risk of model operation failure. The generation of a mesh quality report provides model developers and users with comprehensive mesh quality information, which helps to make reasonable model configuration decisions. In practical applications, this comprehensive mesh quality inspection and analysis technology can significantly improve the reliability and efficiency of ocean numerical prediction models. For example, when constructing high-resolution models of complex coastlines or seafloor topography, local mesh quality problems caused by automatic mesh generation algorithms can be discovered in a timely manner, such as highly distorted meshes that may appear in narrow straits or on the edge of steep continental shelves. By promptly identifying and repairing these problems, numerical instability or non-physical oscillations that occur in actual simulations can be avoided. In addition, statistical analysis of mesh quality can guide mesh optimization strategies, such as local densification or reconstruction in areas where a large number of low-quality meshes are identified. Short-term numerical stability tests can evaluate the performance of meshes under actual dynamic conditions, especially when dealing with strong nonlinear processes (such as strong tidal currents and storm surges). This "rehearsal" test can improve the success rate of long-term simulations and save computing resources. In general, this systematic mesh quality inspection and analysis method provides a powerful quality assurance mechanism for ocean numerical prediction models, which not only improves the numerical stability and computational efficiency of the model, but also enhances the credibility of the model results, laying a solid foundation for high-precision and high-reliability ocean forecasts.
[0102] In one embodiment of the present application, the mesh data and boundary condition data are imported into the open source CFD software OpenFOAM. A simplified hydrodynamic model is set, including selecting an appropriate turbulence model and solver. Fast CFD simulations are performed, focusing on key parameters such as flow velocity, pressure gradient, and vorticity. After the simulation is completed, an automated script is developed to extract key features in the simulation results, such as high velocity areas, vortex centers, and strong shear layers. Statistical analysis methods, such as variance analysis and anomaly detection algorithms, are used to identify unstable areas and high error areas in the simulation results. A detailed CFD analysis report is generated, including a flow field feature distribution map and an error estimate. A set of CFD simulation result data sets and analysis reports are output as the physical basis for subsequent mesh optimization.
[0103] Based on the CFD pre-simulation results, the step mesh is adaptively optimized. A machine learning-based mesh optimization suggestion system is built, which takes the CFD results as input and outputs mesh optimization suggestions. According to the optimization suggestions, adaptive mesh refinement techniques (such as h-adaptivity) are used to increase the mesh density in high velocity and high error areas. Mesh coarsening techniques are applied in low velocity and low error areas to reduce unnecessary computational burden. For the identified vortex structures, anisotropic meshing techniques are applied to better align the mesh with the flow field direction. Physically-based mesh smoothing techniques, such as streamline-based mesh deformation, are used to ensure smooth mesh transitions. Topology optimization algorithms are applied to adjust mesh connectivity to further improve mesh quality. Output a physically optimized, high-quality unstructured mesh.
[0104] For the optimized mesh, the meshes in the near-wall and boundary layer areas are specially processed. Based on the CFD results, the boundary layer thickness distribution in the study area is estimated. Use structured mesh generation technology to create high-quality prismatic layer meshes in the near-wall area. Build an intelligent transition algorithm to achieve a smooth connection between the prismatic layer mesh and the external unstructured mesh. For the identified complex seabed terrain, apply adaptive layering technology to ensure that the boundary layer mesh can accurately capture terrain changes. Implement a dynamic mesh encryption algorithm that can automatically adjust the boundary layer mesh density based on real-time simulation results. Perform boundary layer mesh quality assessment and calculate key parameters such as y+ values to ensure that the boundary layer resolution meets the turbulence model requirements. Output a complete three-dimensional mesh system containing a high-quality boundary layer mesh.
[0105] Perform comprehensive consistency and stability checks on the processed mesh. Develop topology checking algorithms to verify the connectivity and closure of the mesh. Implement geometric consistency checks to ensure that there are no overlaps or gaps in the mesh cells. Perform statistical analysis of mesh quality parameters, such as calculating the distribution of indicators such as skewness and aspect ratio. For three-dimensional meshes, special checks are made to see if the transitions between vertical layers are smooth. Perform numerical stability tests to evaluate numerical stability by performing short-term simulations on the optimized mesh using a simplified hydrodynamic model. During the evaluation, special attention is paid to the performance of identified high velocity and high gradient areas. Generate a detailed mesh quality report, including statistical results and spatial distribution maps for various indicators. Output a comprehensive mesh quality assessment report and a high-quality, finally verified computational mesh that will be used for subsequent high-precision ocean numerical simulations.
[0106] According to one aspect of the present application, the adaptive mesh refinement in step S32 is specifically as follows: input the initial mesh data and the CFD pre-simulation results. Define refinement indicators, such as velocity gradient, pressure gradient or vorticity. Calculate the refinement index value for each mesh unit. Set the refinement threshold and the maximum refinement level. For each mesh unit: compare its refinement index value with the threshold; if it exceeds the threshold and does not reach the maximum refinement level: mark the unit as to be refined; select the refinement mode according to the unit type (triangle / quadrilateral); insert a new node, usually at the midpoint of the edge or the center of the unit; reconnect the nodes to form a new subunit; update the connection relationship between adjacent units. Process hanging nodes to ensure mesh consistency: identify all hanging nodes, and perform additional subdivision or constraint processing on the units containing hanging nodes. Update the mesh topology data structure. Recalculate the refinement index for the newly generated refined mesh and repeat the above steps if necessary. Output the refined mesh data, including updated node coordinates, unit connection relationship and refinement level information.
[0107] According to one aspect of the present application, the anisotropic meshing technique in step S32 is specifically as follows: input the mesh area that needs to be anisotropically partitioned and the CFD pre-simulation results. Calculate flow field characteristics, such as velocity gradient tensor and vorticity. For each mesh cell: calculate the Hessian matrix, usually based on the velocity field or pressure field; perform eigenvalue decomposition to obtain the main direction and the corresponding eigenvalue; calculate the distribution of the desired mesh size in each direction based on the eigenvalue. Construct a background mesh to store the desired mesh size and direction information for each position. Generate anisotropic mesh using frontier advancement technology: start from the boundary and gradually advance into the domain. In each step of advancement: query the background mesh to obtain the desired mesh information at the current position; generate new mesh cells according to the desired size and direction; adjust the shape of the new cell to adapt to the local flow field characteristics. Process the mesh transition area to ensure a smooth transition between adjacent cells. Perform a mesh quality check and adjust low-quality cells. Update the mesh topology, including node coordinates and cell connection relationships. Output anisotropic mesh data, including the directional information of each cell.
[0108] According to one aspect of the present application, the structured grid generation technology in step S33 is specifically as follows: input the geometric information of the boundary layer area and the expected boundary layer thickness distribution, and define the height distribution of the first layer of the boundary layer grid. Set the total number of layers and growth rate of the boundary layer grid, and for each boundary surface: extract the surface grid information; calculate the surface normal vector; construct the boundary layer grid along the normal direction: generate the first layer of grid cells, extrapolate layer by layer according to the growth rate, generate subsequent layers, and check the orthogonality and smoothness of each layer. Process complex geometric features such as sharp corners and narrow areas: detect special geometric features; adjust the local grid distribution to avoid grid distortion. Create a transition layer on top of the boundary layer grid to connect to the external unstructured grid. Perform a grid quality check, paying attention to the aspect ratio and skewness; perform local smoothing when necessary; output the structured boundary layer grid data, including the node coordinates and unit connection relationship of each layer.
[0109] According to one aspect of the present application, the dynamic mesh encryption algorithm in step S33 is specifically as follows: input the initial boundary layer mesh and real-time simulation results, define the encryption index, such as wall shear stress or pressure gradient; set the encryption trigger threshold and the maximum number of encryption layers. For each time step: calculate the encryption index value of each boundary layer mesh unit; identify the area that needs to be encrypted: compare the encryption index value with the threshold, and mark the unit that exceeds the threshold. Perform local encryption on the marked units: insert new mesh nodes, re-divide the mesh units, and update the local mesh topology. Process the transition between the encrypted area and the non-encrypted area: identify the transition area and insert the transition unit to maintain mesh consistency. Update the global mesh data structure and pass the new mesh information to the solver. Perform a mesh quality check to ensure that the encryption does not introduce low-quality units, and perform mesh smoothing when necessary. Update the mesh history information and record the encryption history of each area. Output the dynamically encrypted mesh data, including updated node coordinates, unit connection relationships, and encryption level information.
[0110] This embodiment realizes dynamic optimization of the grid structure through fast CFD pre-simulation and adaptive grid optimization, and significantly improves the computational efficiency and numerical stability of the ocean numerical forecast model. Fast CFD simulation and key feature extraction technology can identify important features in the flow field in a short time, such as high velocity areas, vortex centers and strong shear layers. This information provides a key basis for subsequent grid optimization, so that grid optimization can be more accurately adjusted to the actual flow field characteristics. The grid optimization suggestion system based on machine learning is introduced, combined with adaptive grid refinement and coarsening technology, to achieve intelligent adjustment of grid density. It can effectively reduce unnecessary computing units while ensuring the calculation accuracy, thereby improving the calculation efficiency. In particular, the application of anisotropic grid division technology in the vortex center can better capture the directional characteristics of fluid motion and improve the simulation accuracy. Boundary layer grid processing technology, including prism layer grid generation and dynamic grid encryption algorithm, solves the problem of insufficient precision of traditional unstructured grids when processing near-wall area flows. This is crucial for accurately simulating phenomena such as submarine boundary layers and coastal currents. The model can automatically increase the grid density in key areas (such as strong flow areas, eddy areas, boundary layers, etc.), while appropriately reducing the grid density in areas where the flow field changes relatively slowly. This dynamic optimization method not only improves computational efficiency, but also improves numerical stability. In practical applications, this adaptive grid optimization technology can effectively handle multi-scale phenomena in the ocean, such as the interaction between large-scale circulation and small and medium-scale eddies, and the coupling of coastal currents and offshore currents. For example, when simulating ocean fronts or eddies, the model can automatically increase the grid density in these areas to better capture the sharp changes in the front or the fine structure of the eddy, while maintaining relatively sparse grids in areas far away from these features. Not only does it improve the model's simulation accuracy for key ocean processes, but it also reduces the demand for computing resources by reducing the number of unnecessary computing units. In addition, the application of dynamic boundary layer grid processing technology enables the model to simulate bottom friction and vertical mixing processes more accurately, which is crucial for correctly simulating the vertical structure and energy transfer of ocean circulation.
[0111] like Figure 5 As shown, according to one aspect of the present application, step S4 is further:
[0112] S41, based on the optimized grid and the results of CFD pre-simulation, calculating the local time step of each grid unit; based on the local time step, dividing the study area into a predetermined number of sub-areas;
[0113] S42, determining the time step of each sub-region using a sub-cycle time advancement strategy; and calculating a local truncation error based on the time step of each sub-region;
[0114] S43, dynamically adjust the time step of each sub-region based on the local truncation error; use the time step smoothing transition strategy to ensure that the time step of adjacent regions changes gradually, and output the optimized time step;
[0115] S44. Based on the optimized time step, use the framework of the deep learning model to build and train the time step prediction model to obtain a trained time step prediction model.
[0116] According to one aspect of the present application, in step S41, based on the optimized grid and the result of CFD pre-simulation, the local time step of each grid unit is further calculated as:
[0117] S411, based on the optimized grid, extract the characteristic length of each grid unit; obtain the flow velocity and sound speed of each grid unit from the results of CFD pre-simulation; based on the characteristic length, flow velocity and sound speed, calculate the local CFL number of each grid unit;
[0118] S412, based on the local CFL number of each grid unit, find the global maximum CFL number for each time step; based on the global maximum CFL number and a preset target CFL number, calculate the local time step of each grid unit.
[0119] The balance between the efficiency and stability of the time integration of the ocean numerical prediction model is achieved by calculating the time step based on the local CFL condition. The local CFL number of each grid cell is calculated based on the optimized grid characteristic length, local flow velocity and sound speed, which provides a basis for the precise control of the time step. Compared with the method of global unified CFL number, this CFL number calculation method based on local flow field characteristics can better adapt to the flow field changes in different regions, thereby maximizing the computational efficiency while ensuring numerical stability. The local time step of each grid cell is calculated by finding the global maximum CFL number and comparing it with the preset target CFL number, realizing the adaptive adjustment of the time step. It not only ensures the numerical stability of the entire computational domain, but also allows the use of larger time steps in areas where the flow field changes slowly, thereby improving the overall computational efficiency. In practical applications, this time step calculation technology based on local CFL conditions can significantly improve the performance of ocean numerical prediction models, especially when dealing with complex ocean systems containing multi-scale physical processes. For example, when simulating nearshore areas with strong tidal currents and relatively calm open seas, the model can automatically use a smaller time step in the nearshore area to capture the rapidly changing flow field, while using a larger time step in the open sea to improve computational efficiency. This adaptive time step strategy not only improves the numerical stability of the model, but also reduces unnecessary computational effort. Especially when simulating extreme events (such as storm surges) or complex mesoscale eddy systems, the model can automatically adjust the time step according to the drastic changes in the local flow field to ensure the accuracy and stability of the numerical solution. In addition, it can effectively handle the common "rigidity problem" in ocean models, that is, the system contains both fast processes (such as surface gravity waves) and slow processes (such as deep circulation). By allowing different regions to use different time steps, the model can efficiently simulate these multi-scale processes with limited computing resources. In general, this time step calculation method based on local CFL conditions provides an intelligent and efficient time integration strategy for ocean numerical prediction models, improves the computational efficiency and numerical stability of the model, and provides important technical support for high-resolution and long-time scale ocean simulation.
[0120] According to one aspect of the present application, it also includes optimizing the numerical solver in the time step prediction model, specifically:
[0121] S44a, based on the optimized grid, use the preconditioned conjugate gradient method to build a linear system solver;
[0122] S44b, using the METIS graph segmentation library to perform domain decomposition on the optimized grid to obtain domain decomposition results, based on the domain decomposition results, implementing an adaptive multigrid method in a linear system solver to obtain an adaptive system solver; constructing a mode separation algorithm based on eigendecomposition in the adaptive solver to process fast and slow processes respectively to obtain a mode separation solver;
[0123] S44c. An intelligent solver selection system and machine learning technology are introduced into the mode separation solver to obtain the final numerical solver.
[0124] By optimizing the numerical solver, the computational efficiency and numerical stability of the ocean numerical forecast model are improved. The linear system solver is constructed using the preconditioned conjugate gradient method, which provides an efficient iterative method for solving large-scale sparse linear equations in the ocean model. Compared with the traditional direct solution method, this embodiment has a significant computational efficiency advantage when dealing with large-scale problems, and is particularly suitable for high-resolution ocean models. The introduction of the METIS graph segmentation library and the adaptive multi-grid method achieves efficient parallel computing and problem scale reduction. The graph segmentation technology can optimize the distribution of computational loads and improve parallel efficiency, while the multi-grid method accelerates the convergence process by solving problems at different scales. In particular, the application of the adaptive multi-grid method enables the solver to automatically adjust the grid level according to the characteristics of the problem, further improving the computational efficiency. In addition, the introduction of the mode separation algorithm based on eigendecomposition enables the solver to effectively handle multi-scale problems in the ocean system, such as fast surface gravity waves and slow geostrophic currents. The introduction of the intelligent solver selection system and machine learning technology further improves the adaptability and efficiency of the solver. This intelligent solution strategy can automatically select the optimal solution method according to the characteristics of the problem and the computing environment, reducing the need for human intervention and improving the automation of model operation. In practical applications, it can improve the computational performance of ocean numerical prediction models. For example, when simulating complex coastal current systems, the model can automatically identify the flow field characteristics of different regions (such as strong flow areas, weak flow areas, vortex areas, etc.) and select the most suitable solution strategy for each region. This not only improves the overall computational efficiency, but also improves the numerical stability, especially when dealing with complex ocean processes involving multiple time and space scales. In addition, the optimized solver can better handle nonlinear problems in ocean models, such as strong convection processes or complex thermohaline circulations, and improve the reliability and accuracy of the model when simulating extreme events or long-term climate change. In general, this intelligent and adaptive numerical solution strategy provides powerful computational support for high-resolution and long-time scale ocean simulations, laying a solid foundation for improving the accuracy and timeliness of ocean forecasts.
[0125] In one embodiment of the present application, an intelligent adaptive time step algorithm is developed to optimize computational efficiency. Based on the optimized grid and CFD pre-simulation results, a dynamic time step adjustment mechanism based on the CFL (Courant-Friedrichs-Lewy) condition is implemented. Using the trained deep learning model framework, a time step prediction model is trained, which can predict the optimal time step based on the current flow field characteristics. A multi-scale time integration scheme is developed to allow different regions to use different time steps, with special attention to the identified high velocity and high gradient regions. An automatic error estimation and control mechanism is implemented to dynamically adjust the time step according to the numerical error. A time step smooth transition strategy is designed to avoid numerical instability caused by sudden changes in the time step. A visualization and monitoring system for adaptive time steps is implemented to facilitate real-time viewing and intervention by users. A complete adaptive time step control system is output, including a time step prediction model, a multi-scale integration scheme, and an error control mechanism.
[0126] Implement a series of efficient numerical solution techniques to accelerate the solution of large-scale linear systems. Based on the optimized grid structure, develop an efficient linear system solver based on the preconditioned conjugate gradient method (PCG), and implement a variety of preconditioning techniques such as incomplete LU decomposition (ILU). Using the results of domain decomposition, implement an adaptive multigrid method to accelerate the solution of large-scale linear systems. Develop a mode separation algorithm based on eigendecomposition to handle fast and slow processes separately and improve computational efficiency. Implement an intelligent solver selection system that can automatically select the optimal solution strategy based on the characteristics of the problem. Using the deep learning model framework of step training, introduce machine learning techniques such as neural networks to accelerate the calculation of turbulence models. Implement a solver performance analysis and optimization module to continuously monitor and improve the solution efficiency. Output a set of efficient numerical solver systems, including multiple linear solvers, mode separation algorithms, and performance optimization modules.
[0127] Build a parallel computing strategy for the optimization model to improve the efficiency of computing resource utilization. Based on the domain decomposition results, implement a dynamic load balancing algorithm that can adjust the computing task allocation in real time, with special attention to the identified complex flow areas. Develop an intelligent communication optimization system that uses distributed data structures to minimize data exchange between processes. Implement a hybrid parallel framework that combines MPI and OpenMP to fully utilize multi-core and multi-node environments. Design and implement a GPU-based parallel computing framework that uses the GPU computing framework to specifically optimize intensive computing tasks such as turbulence simulation. Build an automated performance tuning system that can automatically adjust the parallel strategy based on hardware characteristics. Implement a distributed I / O system to optimize the reading and writing efficiency of large-scale data, with special consideration of data storage structures. Output a highly optimized parallel computing framework that includes features such as dynamic load balancing, communication optimization, hybrid parallelism, and GPU acceleration.
[0128] Integrate multiple advanced computing acceleration technologies to further improve the overall computing performance of the model. Use the trained deep learning model to implement a machine learning-based result prediction system, replacing full calculations with fast predictions in some cases. Build an intelligent caching system to store and reuse intermediate results of frequent calculations, with a special focus on step-by-step calculation-intensive tasks. Implement an adaptive precision control mechanism, using the error estimation mechanism to dynamically adjust the calculation precision within the allowable error range. Build a Monte Carlo method based on importance sampling to accelerate uncertainty analysis, especially for high uncertainty areas. Build a dynamic compilation optimization system to automatically generate optimized code based on runtime information, especially for parallel computing frameworks. Implement an intelligent resource scheduling system to dynamically allocate computing resources based on the characteristics of computing tasks and make full use of parallel computing environments. Output a high-performance computing framework that integrates multiple acceleration technologies, including machine learning prediction, intelligent caching, adaptive precision control, importance sampling, and dynamic compilation optimization.
[0129] According to one aspect of the present application, an adaptive time step algorithm is developed, specifically: a dynamic time step adjustment mechanism based on CFL conditions is implemented, the optimized grid data and CFD pre-simulation results are input, and the local CFL number is calculated for each grid cell: the characteristic length of the cell is extracted, the flow velocity and sound velocity of the cell are obtained from the CFD results, and the CFL number is calculated = (flow velocity + sound velocity) * time step / characteristic length. Set the target CFL number (usually less than 1). For each time step: find the global maximum CFL number, and adjust the time step according to the maximum CFL number and the target CFL number: new time step = current time step * (target CFL number / maximum CFL number). Set the upper and lower limits of the time step to prevent too large or too small time steps.
[0130] Extract the feature extraction layer from the trained deep learning model framework. Design the time step prediction network structure, including input layer, hidden layer, and output layer. Prepare training data: use CFD results as input features; use the calculated optimal time step as label; divide the training set and validation set. Train the model: set the learning rate, batch size, and number of iterations; use the back propagation algorithm to update the network weights; evaluate the model performance on the validation set. Optimize the model hyperparameters, such as the number of layers, number of neurons, etc., and save the trained time step prediction model.
[0131] Construct a multi-scale time integration scheme. Divide the computational domain into multiple sub-regions based on the local time step. Assign an initial time step to each sub-region, implement a sub-cycle time advancement strategy, and determine the time step for each sub-region:
[0132] Determine the global minimum time step Δt min For each sub-region i: calculate the number of sub-cycles Ni = ceil(Δti / Δt min ), where ceil( ) represents the upward rounding function, Δt i represents the time step of sub-region i; updates the actual time step of the sub-region Δt i_actual = Δt i / Ni.
[0133] Implement the data exchange mechanism between regions, specifically: ensure information transfer between different time scales. Synchronize all sub-regions at the end of each global time step, and perform time interpolation on the data at the interface. Handle the flux calculation between regions: store the states of the intermediate time steps at the sub-region boundaries, and use the stored states to calculate the cross-region flux.
[0134] Implement automatic error estimation and control mechanisms, specifically: select error estimation indicators, such as the rate of change of the solution or residuals. For each time step: calculate the difference between the current solution and the solution of the previous time step; estimate the local truncation error. Set an acceptable error threshold and implement an adaptive control algorithm: if the error is less than the threshold, increase the time step appropriately; if the error is greater than the threshold, reduce the time step and recalculate. Update the sub-region time step.
[0135] Construct a time step smooth transition strategy, specifically: set the maximum allowable value α of the time step change rate max For each time step update: calculate the ratio of the new and old time steps r = Δt new / Δt old If r > 1 +α max , then Δt new = Δt old * (1 +α max ). If r < 1 -α max , then Δt new = Δt old * (1 -α max ). A smoothing strategy is applied between sub-regions to ensure that the time steps of adjacent regions change gradually.
[0136] Implement an adaptive time step visualization and monitoring system, specifically: design a time step data storage structure to record the time step history of each sub-region. Implement a real-time data visualization module: create a line graph of the time step over time, and generate a heat map of the time step distribution in the computational domain. Develop a performance monitoring module: track computational efficiency indicators, such as physical time per second; monitor numerical stability indicators, such as the maximum number of CFLs; set up an alarm mechanism to issue a reminder when the time step or performance indicator exceeds the preset range; provide a user interface to allow manual adjustment of the time step strategy parameters.
[0137] This embodiment improves the computational efficiency and numerical stability of the ocean numerical prediction model through intelligent time step optimization and prediction technology. The local time step is calculated based on the optimized grid and CFD pre-simulation results, providing an accurate initial estimate for the subsequent time step optimization. This time step calculation method based on local flow field characteristics can better adapt to the flow field changes in different regions compared to the global fixed time step, thereby maximizing the computational efficiency while ensuring numerical stability. The introduction of sub-cycle time advancement strategy and dynamic time step adjustment method solves the efficiency and stability problems of traditional explicit time integration methods when dealing with multi-scale ocean processes. By allowing different regions to use different time steps, the model can more efficiently simulate complex ocean systems containing fast processes (such as surface gravity waves) and slow processes (such as deep circulation) with limited computing resources. The constructed time step prediction model uses deep learning technology to quickly predict the optimal time step based on local flow field characteristics, further improving the computational efficiency. Compared with traditional empirical formulas or trial and error methods, this machine learning-based method can better capture the complex nonlinear relationship between time step and flow field characteristics, thereby maximizing the time step while ensuring numerical stability. In practical applications, this intelligent time step optimization technology can significantly improve the computational efficiency of the ocean numerical prediction model. For example, when simulating coastal areas with strong tidal currents, the model can automatically reduce the time step to ensure numerical stability during periods when the tidal current intensity changes greatly, and automatically increase the time step to improve computational efficiency during periods when the tidal current is relatively stable. At the same time, in open sea or deep sea areas, since the flow field changes relatively slowly, the model can use a larger time step, thereby reducing the overall calculation time. In addition, through the application of the time step prediction model, the model can quickly adapt to the drastic changes in the flow field caused by sudden strong weather events (such as typhoons), and automatically adjust the time step to ensure numerical stability, which is crucial to improving the accuracy and reliability of forecasts under extreme events. In general, this intelligent time step optimization technology not only improves the computational efficiency of the model, but also enhances the model's ability to handle complex multi-scale ocean processes, providing important technical support for high-resolution and long-time scale ocean forecasts.
[0138] like Figure 6 As shown, according to one aspect of the present application, step S5 is further:
[0139] S51. Based on multi-source ocean data and optimized grids, the Latin Hypercube sampling method is used to obtain a parameter sample set; based on the parameter sample set and the trained time step prediction model, uncertainty propagation analysis is performed to obtain uncertainty propagation analysis results; based on the uncertainty propagation analysis results, a polynomial chaos expansion method is used to construct a random simulation system to obtain random simulation results; based on the random simulation results, a global sensitivity analysis is performed using the Sobol index to obtain global sensitivity analysis results; based on the global sensitivity analysis results, the Bayesian inference method is used to estimate key parameters to obtain parameter estimation results; based on the parameter estimation results, global sensitivity analysis results, random simulation results and uncertainty propagation analysis results, an uncertainty analysis report is generated;
[0140] S52. Based on the trained time step prediction model, an automated verification system is constructed, including data collection and preprocessing modules, a multi-indicator evaluation system, a spatiotemporal analysis module, an extreme event evaluation system, an automatic report generation system, and a continuous verification framework, to conduct multi-indicator evaluation and spatiotemporal analysis and obtain verification results;
[0141] S53. Based on the optimized time step, analyze the optimal time step distribution in different regions and time periods; based on the optimal time step distribution, uncertainty analysis results and verification results, use the Bayesian optimization method to search for the global optimal time step; build a multi-objective optimization framework to further optimize the global optimal time step and obtain the optimized global time step; based on the global time step, build a time step sensitivity analysis module to evaluate the impact of time step changes on model results; based on the evaluated impact and the trained time step prediction model, build an automated time step test system to obtain test results; based on the test results, generate a time step optimization report;
[0142] S54. Based on the uncertainty analysis report, verification results and global time step, the trained time step prediction model is comprehensively parameter tuned to obtain the time step prediction model after parameter tuning.
[0143] In one embodiment of the present application, a comprehensive uncertainty quantification analysis is performed to evaluate the impact of parameter uncertainty on model output. Using the collected raw data and the step-optimized grid, the Latin Hypercube sampling method is used to sample the model input parameters to generate a series of simulation scenarios. Based on the developed efficient computing framework, uncertainty propagation analysis of multi-fidelity models is realized, and the impact of parameter uncertainty on model output is efficiently evaluated. Using the trained deep learning model framework, a random simulation system based on polynomial chaos expansion is implemented to quickly evaluate the impact of different parameter combinations. A global sensitivity analysis module based on the Sobol index is designed and implemented to identify the parameters that have the greatest impact on model results. Using the developed efficient solver, a parameter estimation system based on Bayesian inference is implemented to optimize key model parameters. Generate a detailed uncertainty analysis report, including model performance evaluation under various scenarios. Output a comprehensive uncertainty quantification analysis report and an optimized model parameter set.
[0144] Implement an automated model validation system to comprehensively evaluate model performance. Based on the established data management system, develop a data collection and preprocessing module to automatically acquire and process the observational data required for validation. Using the optimized computational framework, implement a multi-metric evaluation system, including the calculation of multiple statistical indicators such as root mean square error, correlation coefficient, and bias. Develop a spatiotemporal analysis module to evaluate the performance of the model at different time and spatial scales, with a special focus on complex flow areas identified in the step. Build an extreme event assessment system, using CFD pre-simulation results, with a special focus on the performance of the model under extreme conditions. Based on the developed visualization pipeline, implement an automatic report generation system to generate detailed validation reports with charts and analysis results. Develop a continuous validation framework that can automatically update the validation results when new data is available, integrated with the data version control system. Output a complete automated model validation system and a detailed validation report.
[0145] Determine the optimal global time step of the model. Based on the adaptive time step results, analyze the distribution of optimal time steps in different regions and time periods. Using the uncertainty analysis results, implement a global time step search algorithm based on Bayesian optimization to find the best balance between computational efficiency and model accuracy. Using the efficient solver developed in step, develop a multi-objective optimization framework that takes into account computational time, model accuracy, and numerical stability. Design a time step sensitivity analysis module to evaluate the impact of time step changes on model results, with special attention to high gradient areas. Using the parallel computing framework, implement an automated time step testing system to evaluate the performance of candidate time steps in different scenarios. Generate a detailed time step optimization report, including the recommended global time step and the basis for its selection. Output the determined optimal global time step and the corresponding optimization report.
[0146] Perform final tuning and comprehensive acceptance testing of the model. Perform comprehensive parameter tuning of the model based on the results of all the previous steps, especially the uncertainty analysis and validation results. Design a comprehensive set of acceptance test cases covering different hydrodynamic conditions and extreme cases, with special consideration of the key flow field features identified in the step. Perform long-term simulation tests using the step-optimized computational framework to evaluate the long-term stability and drift of the model. Implement a model performance benchmarking system to compare the performance of the current model with other similar models, using the collected historical data for comparison. Perform user experience testing based on the developed visualization system to evaluate the model's ease of use and interpretability of the results. Generate a comprehensive model evaluation report, including the model's strengths, limitations, and improvement suggestions, taking into account all analysis results, and output a final model version that has been fully tuned and validated, as well as a detailed evaluation report.
[0147] This embodiment improves the reliability, accuracy and adaptability of the ocean numerical forecast model by comprehensively applying uncertainty quantification, model verification and parameter optimization techniques. The Latin Hypercube sampling method, polynomial chaos expansion and Sobol index analysis are used to achieve comprehensive quantification and sensitivity analysis of model uncertainty. This systematic uncertainty analysis method enables the model forecast results to be presented in the form of probability distribution, providing decision makers with more comprehensive risk assessment information. Especially when predicting extreme marine events (such as storm surges), this uncertainty information is of great value for risk management and disaster prevention and mitigation. An automated verification system is constructed, including multi-index evaluation and spatiotemporal analysis modules, to achieve comprehensive verification of model forecast results. This automated verification method not only improves the efficiency and consistency of verification, but also can timely discover the systematic deviation of the model, providing an important basis for the continuous improvement of the model. The Bayesian optimization method is used to search for the global optimal time step, and combined with the multi-objective optimization framework, the fine control of the time step is achieved. This optimization method can maximize the computational efficiency while ensuring numerical stability, and is particularly suitable for commercial ocean forecast systems that need to run for a long time. The comprehensive parameter tuning of the time step prediction model further improves the adaptability and generalization ability of the model. In practical applications, the comprehensive application of these technologies can improve the overall performance of the ocean numerical forecast model. For example, through uncertainty quantification analysis, the model can more accurately evaluate the credibility of the forecast results, especially when predicting key parameters such as abnormal sea level rise and sudden changes in nearshore flow velocity, and can provide a more reliable risk assessment. The application of the automated verification system enables the model to quickly adapt to new observation data and adjust the forecast strategy in a timely manner. This is particularly important when dealing with seasonal changes (such as monsoon effects) or long-term trends (such as sea level rise). The optimization of the global time step and the parameter tuning of the time step prediction model enable the model to maintain efficient and stable operation under different ocean environments and computing conditions. For example, when simulating a complex ocean circulation system, the model can automatically adjust the calculation strategy according to the flow field characteristics of different regions and times, maximizing the calculation efficiency while ensuring numerical stability. This embodiment not only improves the scientific value of the ocean numerical forecast model, but also significantly enhances the practicality and reliability of the model in actual business applications.
[0148] In another embodiment of the present application, a grid processing method for improving the efficiency and stability of an ocean numerical prediction model comprises the following specific steps:
[0149] Step 1: Collect data. Collect the latest global coastline remote sensing data from OpeanStreetMap; collect seafloor topography data from a large area of sea, GEBCO (General Bathymetric Chart of the Oceans); collect nearshore chart data, extract water depth point data from S57 chart data, and merge it with GEBCO data to form a new data file *.xyz, where S57 chart data refers to electronic chart data produced in accordance with the IHO-S57 standard. S57 is a standard established by the International Hydrographic Organization (IHO) for the transmission and exchange of digital hydrographic data.
[0150] Step 2: Clip the shape data of the shoreline and set the boundary and mesh encryption area.
[0151] The global coastline data is too large and the operation is slow. Before use, you need to use the open source tool QGIS to clip the global coastline according to the scope of the study area. In this embodiment, the study area is the East China Sea, and the spatial scope of the numerical model includes the Bohai Sea, the Yellow Sea, the East China Sea and the Taiwan Strait.
[0152] Step 3: Preliminary generation of numerical model grid.
[0153] This embodiment mainly uses the open source program Oceanmesh2d to preliminarily generate the grid. The existing Oceanmesh2d program has the following three deficiencies when generating the forecast model calculation grid: ① Affected by the global shoreline strategy, the grid at the junction of the open boundary and the shoreline is too dense. ② Under the influence of the global water depth gradient strategy, the grid at the boundary changes greatly due to the influence of water depth. ③ The default grid generation strategy of the grid is relatively aggressive, the transition between grids is extremely large, and the requirements for grid quality are not strict enough, which may cause the calculation model to diverge.
[0154] For the first problem, the method adopted in this embodiment is to cut an additional part of the shoreline shape connected to the open boundary for grid transition, with a scale of more than 5 grid side lengths, and at the same time, the missing part of the shoreline is supplemented with the boundary range line. The shoreline grid near the boundary is smaller, and the open boundary and shoreline grid transition strategy is more aggressive. Since the accuracy of the shoreline at the boundary is not high, in order to improve the calculation efficiency, the grid can be set relatively large.
[0155] For the second question, the method adopted in this embodiment is to first mark the grids with large water depth changes near the open boundary, and then smooth the water depth at that location. The Laplace smoothing method is adopted. Laplace smoothing is a smoothing technique based on the Laplace operator, which is mainly used to reduce noise and sharp gradient changes in data. Laplace smoothing achieves smoothing by iteratively updating the value of each point to the average value of its neighborhood points. For water depth data, the discrete form of the Laplace operator can be expressed as:
[0156] Δf(i,j)=f(i+1,j)+f(i-1,j)+f(i,j+1)+f(i,j-1)-4f(i,j)
[0157] Where f(i, j) represents the original value at position (i, j); Δf(i, j) represents the Laplace operator value at position (i, j); update the value f at position (i, j) new (i, j) = f(i, j) + αΔf(i, j), α is the smoothing coefficient, which is used to control the strength of smoothing and takes a value between 0 and 1. Laplace smoothing is usually an iterative process, and smoothing is achieved by updating the data through multiple iterations. In each iteration, the above formula is applied to each point for update.
[0158] The open boundary is far away from the study area, and encryption is unnecessary, which affects the calculation efficiency and the aesthetics of the grid. After the processing of this embodiment, the grid scale generated at the boundary is larger, and the transition with the surrounding grids is more coordinated.
[0159] Step 4: Optimization of low-quality mesh and final generation of numerical model mesh.
[0160] For the third question, in order to obtain high-quality meshes, the mesh quality is restricted as follows: a. The minimum mesh is greater than 30° and the maximum mesh does not exceed 120°; b. A node is connected to a maximum of 8 meshes; c. The area difference between two adjacent meshes does not exceed 50%.
[0161] Generate the initial mesh using the basic functions of Oceanmesh2d and set the maximum cell size Hmax; traverse the mesh cells, check the minimum angle minAngleThreshold, area difference areaRatioThreshold and number of connected meshes per node minElementThreshold of each cell, and mark the low-quality meshes that do not meet the requirements;
[0162] Search for the marked low-quality mesh and the mesh in the outer layer, delete them, and use the refineMesh function to adjust them again, reduce the requirements for the mesh edge length and regenerate the mesh; use the optimizeMesh function to optimize the mesh, use Laplace optimization, traverse all mesh cells, check the mesh quality, and iterate to find the best mesh.
[0163] Step 5. Preliminary determination of the time step for model calculation. The time supplement for model calculation is closely related to the grid scale and water depth. In general, the larger the grid scale and the shallower the water depth, the larger the calculation time step can be set. In this embodiment, the fused water depth data "*.xyz" in step 1 is interpolated onto the grid, and then the length of the three sides of each grid and the water depth of the grid can be calculated through all the grid cells of the variable. The time step on each grid can be preliminarily estimated using the following formula:
[0164] ts = L / (sqrt (g (h + zeta)) + u);
[0165] Among them, ts is the time step of the preliminary calculation; L is the minimum length of the grid unit; g is the acceleration of gravity; h is the water depth; zeta is the tidal height, which is generally not more than 10m along the coast of my country, so it is set to 10; u is the flow velocity, which is generally not more than 20m / s along the coast of my country, so it is set to 20. The final calculation time step of the model is the minimum value of the time step on all grids.
[0166] In the spatial distribution of the time step on the model grid, the time step in most areas exceeds 30s. The coastline of the southeastern outer areas of Taiwan Province, such as Suao, Hualien and Green Island, varies greatly and the water depth is also deep (that is, the horizontal scale L of the grid is small and H is large), so the time step ts of the initial calculation is small, with a minimum of about 9s. Therefore, the global time step of the numerical model is initially set to 9s.
[0167] Step six, optimization of the model calculation time step. The time step in most areas exceeds 30s, and the grids with a time step of less than 30s account for less than 5% of the total number of grid cells. Optimizing these grids can greatly improve the overall time step of the model. In this embodiment, the sea areas or open seas that are not of concern are marked, and the time step of each marked grid is traversed. In this embodiment, the coastal areas of the East China Sea and the Yellow Sea are the key areas of concern for numerical forecasting, and the refinement of the forecast values in other areas is not of concern. Therefore, the deformed formula of ts=L / (sqrt(g(h+zeta))+u) can be used to optimize the water depth of the area of no concern (reduce the water depth) so that the overall time step is closer to 30s. The formula is as follows:
[0168] h r=max(((L / ts)-u) 2 / g-zeta, 6);
[0169] where h r is the optimized water depth, ts=30s. After forcing the time step to 30s, the calculated optimized water depth is generally smaller than the original water depth. However, too small a water depth may cause the tidal wave to deform, so the water depth threshold is set to no less than 6m.
[0170] Step seven, manually adjust the unreasonable grids in the local coastline area. The nearshore terrain is relatively complex, and the minimum grid size is constrained in the program, so a small number of nearshore grids may have problems. And the shape coastline data provided by OSM generally lags behind the update speed of satellite images. This embodiment uses the latest satellite images as the base map to adjust the problematic grids on some coastlines. There is a large deviation between the grid boundary and the satellite coastline near Lianxing Port. This may be caused by the lag in updating the coastline shape data, errors in coastline shape recognition, or unreasonable grid generalization, so manual verification and optimization are required.
[0171] Step 8: Finalize the global time step of the model and verify the model accuracy.
[0172] The driver files of the numerical model are generated using the grids before and after the modification, and numerical simulations are performed separately. Assuming a smaller time step so that both models do not diverge, verify whether the tide level in the area of interest changes before and after the grid water depth is modified. If the simulated tide level results of the two models are consistent, the optimization is successful. After that, the time step can be continuously increased until the model diverges. The optimal time step of the model is the maximum time step that makes the model not diverge; if the simulated tide level results of the two models are inconsistent, the water depth threshold needs to be adjusted and the calculation is returned to step five for recalculation. After the offshore water depth is optimized, there is no difference in the numerical simulation results of nearshore hydrodynamics. The overall time step of the model has increased by more than three times, which means that the calculation efficiency has increased by three times. Therefore, this grid processing method can greatly improve the calculation efficiency and stability without affecting the accuracy of the model.
[0173] The existing technology is aimed at the mesh optimization method of the ocean numerical model in a large sea area, but it has the problems of being expensive, unable to encrypt the mesh according to the change of water depth, difficult to control the mesh scale, and poor quality of the generated mesh. This embodiment improves the open source program Oceanmesh2d to perform preliminary mesh generation; adopts a large number of constraint methods to control the quality of the mesh; optimizes and improves the overall time step of the model by using the relationship between the time step and the mesh scale and the water depth; and uses the FVCOM East China Sea numerical model to verify the effectiveness of the method. The grid processing method in the present invention can greatly improve the computational efficiency and stability without affecting the accuracy of the model. It has certain theoretical value and practical significance for improving the efficiency of numerical simulation and numerical prediction of ocean hydrodynamics.
[0174] The present invention comprehensively improves the efficiency, stability and accuracy of the ocean numerical forecast model. In the data processing and grid generation stage, the adaptive grid generation technology driven by multi-source data fusion and deep learning significantly improves the quality of the initial data and the adaptability of the grid. This not only improves the model's ability to represent complex ocean terrain and dynamic processes, but also improves the computational efficiency through intelligent grid allocation. In the grid optimization and flow field prediction stage, the adaptive grid optimization based on CFD pre-simulation and the refined local velocity prediction technology further enhance the model's ability to capture multi-scale ocean phenomena, while improving the rationality of the initial conditions. In the time integration optimization stage, the intelligent time step prediction and the adaptive time step strategy based on the local CFL condition achieve the optimal balance between computational efficiency and numerical stability. The reliability and adaptability of the model are further improved through comprehensive uncertainty quantification, model verification and parameter optimization, as well as efficient numerical solver optimization. This comprehensive technology integration shows significant advantages in practical applications. For example, when simulating complex coastal current systems, the model can automatically identify key dynamic areas (such as estuaries, straits, etc.) and use finer grids and smaller time steps in these areas, while using coarser grids and larger time steps in open waters, thereby maximizing computational efficiency while ensuring simulation accuracy. When dealing with multi-scale ocean processes, such as the interaction between large-scale circulations and mesoscale eddies, the model can take into account the simulation needs of processes at different scales through adaptive grid and time step strategies. In addition, when simulating extreme events (such as storm surges caused by typhoons), the model can quickly adjust the computational strategy to improve the timeliness and accuracy of forecasts. In general, this integrated and intelligent optimization scheme for ocean numerical prediction models not only improves the computational efficiency and numerical stability of the model, but also enhances the model's ability to handle complex, multi-scale ocean processes, providing strong technical support for high-resolution, long-time scale ocean forecasts, and is expected to be used in the fields of marine environmental monitoring, climate change research, and marine resource management.
[0175] The preferred embodiments of the present invention are described in detail above; however, the present invention is not limited to the specific details in the above embodiments. Within the technical concept of the present invention, various equivalent transformations can be made to the technical solutions of the present invention, and these equivalent transformations all belong to the protection scope of the present invention.
Claims
1. A grid processing method to improve the efficiency and stability of ocean numerical forecast models, It is characterized in that The steps include: S1. Obtain multi-source ocean data, integrate the multi-source ocean data into a unified coordinate system, and perform standardization processing to obtain standardized data; based on the standardized data, use machine learning algorithms to perform quality control, remove outliers and noise, and obtain processed data; extract key terrain features from the processed data; The multi-source ocean data include global coastline remote sensing data, seafloor topography data and nearshore chart data; S2. Use key terrain features to train a pre-configured deep learning model to construct a relationship mapping between terrain features and grid distribution; apply the trained deep learning model to generate a grid topology structure to obtain a preliminary unstructured grid; assign attribute information to the preliminary unstructured grid, including water depth and roughness; prepare boundary condition information for the preliminary unstructured grid after attribute assignment; S3. Based on the preliminary unstructured grid and boundary condition information, perform CFD pre-simulation, obtain CFD pre-simulation results, and extract flow field characteristics therein; Based on the flow field characteristics, the density of the preliminary unstructured grid is adaptively optimized to obtain the preliminary optimized grid; Based on the preliminary optimized mesh, a prismatic layer mesh is created in the boundary layer area to achieve the transition with the external unstructured mesh and obtain the optimized mesh; S4, calculating the local time step of each grid cell based on the optimized grid, the results of the CFD pre-simulation and the preset CFL conditions; Based on the local time step, a time step prediction model is constructed and trained to obtain a trained time step prediction model; S5. Based on the trained time step prediction model, perform uncertainty quantification analysis and output uncertainty analysis results; based on the trained time step prediction model, perform multi-index evaluation and spatiotemporal analysis, realize automated model verification, and output verification results; Search and optimize the global time step based on uncertainty analysis and verification results; Step S3 is further as follows: S31. Based on the preliminary unstructured grid and boundary condition information, construct a hydrodynamic model, including a turbulence model and solver, perform fast CFD simulation, obtain simulation results, and extract key features in the simulation results, including high velocity areas, low velocity areas, vortex centers, and strong shear layers; Based on key features, use statistical analysis methods to identify unstable areas, high error areas, and low error areas; Generate CFD analysis reports based on unstable areas, high error areas, low error areas and extracted key features, including flow field feature distribution maps and error estimates; S32. Build a mesh optimization suggestion system based on machine learning, take CFD analysis report as input and output mesh optimization suggestions; Based on the mesh optimization suggestions and the preliminary unstructured mesh, the adaptive mesh refinement technique is used to increase the mesh density in the high velocity and high error areas to obtain the first mesh; Based on the first grid, a grid coarsening technique is applied in the low velocity and low error area to obtain a second grid; Based on the second grid, anisotropic meshing technology is applied at the vortex center to obtain the third grid; Based on the third grid, a physics-based grid smoothing technique is used to obtain a fourth grid; based on the fourth grid, a topology optimization algorithm is applied to adjust the grid connection relationship to obtain a preliminary optimized grid; S33. Based on the preliminary optimized mesh and CFD analysis report, estimate the boundary layer thickness distribution in the study area; based on the boundary layer thickness distribution, use structured mesh generation technology to create a prismatic layer mesh in the near-wall area; use an intelligent transition algorithm to achieve smooth connection between the prismatic layer mesh and the external unstructured mesh to obtain a smoothly connected mesh; based on the smoothly connected mesh, apply adaptive layering technology to areas where the terrain complexity index is higher than a preset threshold to obtain an optimized mesh that adapts to complex seabed terrain; Based on the optimized grid adapted to the complex seabed topography and real-time simulation results, the boundary layer grid density is automatically adjusted using a dynamic grid encryption algorithm to obtain the optimized grid.
2. The grid processing method for improving the efficiency and stability of the ocean numerical prediction model according to claim 1, It is characterized in that Step S1 is further as follows: S11. Acquire multi-source ocean data, including global coastline remote sensing data, global seafloor topography data grid, nearshore chart data, water depth data extracted from nearshore chart data, and local high-resolution measurement data within the study area; S12. Convert the multi-source ocean data to a unified coordinate system and a mean sea level vertical datum to obtain converted multi-source ocean data; based on the converted multi-source ocean data, use the Kriging interpolation algorithm to fuse water depth data of different resolutions, and use the Douglas-Peucker algorithm to simplify the global coastline remote sensing data to obtain preliminary fused multi-source ocean data; based on the preliminary fused multi-source ocean data, apply the local polynomial interpolation method to adjust, and obtain adjusted multi-source ocean data; Based on the adjusted multi-source ocean data, a weighted average method based on data quality weight is used for fusion to obtain fused data; Resample the fused data to a uniform grid resolution; S13, based on the fused data, using a local anomaly detection algorithm to identify outliers, and obtaining data with outliers removed; based on the data with outliers removed, applying an adaptive median filter to remove high-frequency noise, and obtaining denoised data; based on the denoised data, using an empirical mode decomposition method to identify and correct systematic errors, and obtaining corrected data; Based on the calibration data, the cross-validation technique is used to evaluate the overall quality of the data and calculate the root mean square error and deviation. Based on the root mean square error and deviation, the DINEOF algorithm based on physical laws is used to fill in the data gaps to obtain quality-controlled data and generate a quality assessment report. S14. Based on the quality-controlled data, the improved Canny edge detection algorithm is used to extract the shoreline contour; based on the extracted shoreline contour, the multi-scale curvature analysis method is used to identify the important feature points of the seabed topography; Based on important feature points, the watershed segmentation algorithm is used to divide the area and obtain the segmented seabed terrain area; based on the quality-controlled data, the U-Net model based on deep learning is used to identify key terrain features; Based on the segmented seafloor topographic areas and key topographic features, the terrain complexity index of each area is calculated.
3. The grid processing method for improving the efficiency and stability of the ocean numerical forecast model according to claim 2, It is characterized in that Step S2 is further as follows: S21. Based on key terrain features, a deep convolutional neural network model based on the U-Net architecture is constructed. The deep convolutional neural network model is trained using the Adam optimizer and a custom loss function. At the same time, k-fold cross-validation and attention mechanisms are introduced into the deep convolutional neural network model to obtain a trained deep learning model. The trained deep learning model is compressed using the model distillation technology to obtain a compressed deep learning model. S22, dividing the study area into regular grid cells, applying the compressed deep learning model to each grid cell, predicting the local ideal grid density and direction; based on the predicted results, using the improved quadtree / octree algorithm for adaptive subdivision to obtain the subdivision results; based on the subdivision results, applying the Delaunay triangulation algorithm to generate a preliminary unstructured grid; introducing a method based on constrained Delaunay triangulation to ensure that the preliminary unstructured grid follows the shoreline contour extracted in step S14; S23, assigning attribute information to the preliminary unstructured grid, specifically: assigning a water depth value to each grid node and unit in the preliminary unstructured grid by a high-order interpolation method based on the water depth data in the preliminary fused multi-source ocean data; Determine the number of vertical layers for the three-dimensional grid in the preliminary unstructured grid based on the water depth data in the preliminary fused multi-source ocean data and the predefined vertical layering strategy; Based on key terrain features, the roughness coefficient of each grid cell in the preliminary unstructured grid is calculated and assigned; a dynamic flooding algorithm is constructed to label the attributes of the intertidal grid cells in the preliminary unstructured grid; based on the quality assessment report, a data reliability weight is assigned to each grid cell in the preliminary unstructured grid; Using CFD principles, the local velocity range of each grid cell in the preliminary unstructured grid is estimated; S24, based on the preliminary unstructured grid after the assigned attributes, calculate the grid quality indicators, including grid orthogonality, smoothness, aspect ratio and distortion; Based on the mesh quality index, a mesh quality prediction model is established using a machine learning algorithm; based on the mesh quality prediction model, low-quality areas in the mesh are identified; local re-division technology is applied to the low-quality areas to obtain optimized mesh areas; based on the optimized mesh areas, a graph-theory-based algorithm is used to analyze mesh connectivity to obtain a locally simplified mesh; based on the locally simplified mesh, a physics-based smoothing technology is applied to obtain a physically smoothed mesh; based on the physically smoothed mesh, global Laplacian smoothing is performed to ensure a smooth transition of the entire mesh, and the final preliminary unstructured mesh is obtained; S25. Prepare boundary condition information for the final preliminary unstructured grid, specifically: based on the final preliminary unstructured grid and shoreline contours, accurately identify and mark all land boundary grid cells; use pre-stored tidal model data and global ocean circulation model output to assign preliminary water level and flow velocity conditions to open boundary grid nodes; build an intelligent boundary recognition algorithm to automatically detect and classify different types of open boundaries; integrate pre-stored runoff data to establish time-varying inflow boundary conditions; obtain satellite remote sensing data and historical observations to prepare wind stress and heat flux data for surface boundaries; build boundary condition interpolation and smoothing modules to ensure the continuity and consistency of boundary conditions in time and space.
4. The grid processing method for improving the efficiency and stability of the ocean numerical forecast model according to claim 3, It is characterized in that Step S4 is further as follows: S41, based on the optimized grid and the results of CFD pre-simulation, calculating the local time step of each grid unit; based on the local time step, dividing the study area into a predetermined number of sub-areas; S42, determining the time step of each sub-region using a sub-cycle time advancement strategy; and calculating a local truncation error based on the time step of each sub-region; S43, dynamically adjust the time step of each sub-region based on the local truncation error; use the time step smoothing transition strategy to ensure that the time step of adjacent regions changes gradually, and output the optimized time step; S44. Based on the optimized time step, use the framework of the deep learning model to build and train the time step prediction model to obtain a trained time step prediction model.
5. The grid processing method for improving the efficiency and stability of the ocean numerical forecast model according to claim 4, It is characterized in that Step S5 is further as follows: S51. Based on multi-source ocean data and optimized grids, the Latin Hypercube sampling method is used to obtain a parameter sample set; based on the parameter sample set and the trained time step prediction model, uncertainty propagation analysis is performed to obtain uncertainty propagation analysis results; based on the uncertainty propagation analysis results, a polynomial chaos expansion method is used to construct a random simulation system to obtain random simulation results; based on the random simulation results, a global sensitivity analysis is performed using the Sobol index to obtain global sensitivity analysis results; Based on the results of global sensitivity analysis, the key parameters are estimated using the Bayesian inference method to obtain parameter estimation results; Generate uncertainty analysis reports based on parameter estimation results, global sensitivity analysis results, random simulation results, and uncertainty propagation analysis results; S52. Based on the trained time step prediction model, an automated verification system is constructed, including data collection and preprocessing modules, a multi-indicator evaluation system, a spatiotemporal analysis module, an extreme event evaluation system, an automatic report generation system, and a continuous verification framework, to conduct multi-indicator evaluation and spatiotemporal analysis and obtain verification results; S53, based on the optimized time step, analyzing the optimal time step distribution in different regions and time periods; Based on the optimal time step distribution, uncertainty analysis results and verification results, the Bayesian optimization method is used to search for the global optimal time step; a multi-objective optimization framework is constructed to further optimize the global optimal time step and obtain the optimized global time step; Based on the global time step, a time step sensitivity analysis module is constructed to evaluate the impact of time step changes on model results; based on the evaluated impact and the trained time step prediction model, an automated time step test system is constructed to obtain test results; Generate a time step optimization report based on the test results; S54. Based on the uncertainty analysis report, verification results and global time step, the trained time step prediction model is comprehensively parameter tuned to obtain the time step prediction model after parameter tuning.
6. The grid processing method for improving the efficiency and stability of the ocean numerical prediction model according to claim 5, It is characterized in that It also includes numerical solvers for optimizing time-step forecasting models, specifically: S44a, based on the optimized grid, use the preconditioned conjugate gradient method to build a linear system solver; S44b, using the METIS graph segmentation library to perform domain decomposition on the optimized grid to obtain domain decomposition results, based on the domain decomposition results, implementing an adaptive multigrid method in a linear system solver to obtain an adaptive system solver; constructing a mode separation algorithm based on eigendecomposition in the adaptive solver to process fast and slow processes respectively to obtain a mode separation solver; S44c. An intelligent solver selection system and machine learning technology are introduced into the mode separation solver to obtain the final numerical solver.
7. The grid processing method for improving the efficiency and stability of the ocean numerical prediction model according to claim 6, It is characterized in that In step S23, the CFD principle is used to estimate the local velocity range of each grid cell in the preliminary unstructured grid, which is further: S231, based on the preliminary unstructured grid, extracting geometric information of each grid cell, including area and characteristic length; S232, obtaining water depth data of each grid cell, calculating the water depth difference of adjacent cells, and calculating the local water depth gradient of each grid cell based on the water depth data and the water depth difference of adjacent cells; S233, based on the local water depth gradient, using simplified shallow water equations to estimate gravity wave velocity; S234, based on the geometric information and water depth data of each grid cell, use the empirical formula to estimate the upper limit of the flow velocity caused by bottom friction; S235, obtaining external forcing data, including tide and wind stress, and estimating additional velocity components based on the external forcing data and geometric information of each grid cell; S236. Based on the gravity wave velocity, the flow velocity upper limit and the additional flow velocity component, the maximum flow velocity and the minimum flow velocity of each grid cell are calculated to obtain the local flow velocity range of each grid cell.
8. The grid processing method for improving the efficiency and stability of the ocean numerical prediction model according to claim 5, It is characterized in that In step S41, based on the optimized grid and the results of CFD pre-simulation, the local time step of each grid unit is further calculated as: S411. Based on the optimized grid, extract the characteristic length of each grid unit; obtain the flow velocity and sound velocity of each grid unit from the results of CFD pre-simulation; Based on the characteristic length, flow velocity and sound speed, the local CFL number of each grid cell is calculated; S412, based on the local CFL number of each grid unit, find the global maximum CFL number for each time step; based on the global maximum CFL number and a preset target CFL number, calculate the local time step of each grid unit.
9. The grid processing method for improving the efficiency and stability of the ocean numerical prediction model according to claim 5, It is characterized in that It also includes S34, checks the consistency and stability of the optimized mesh, and generates a mesh quality report, specifically: S341, based on the optimized mesh, perform topology check and geometric consistency check in sequence, and mark the mesh cells with problems; S342, based on the problematic grid cells, statistical analysis of grid quality parameters is performed to obtain analysis results, including distribution of skewness and aspect ratio; S343, based on the optimized grid, use the simplified hydrodynamic model to perform short-term simulation, test numerical stability, and obtain test results; S344. Generate a mesh quality report based on the analysis and test results.
