Global ocean circulation simulation parallel processing method and device based on unstructured grid
By employing a parallel processing method based on unstructured grids, the problems of polar singularity and resolution limitations in the OGCM model were solved, enabling efficient and accurate simulation of global ocean circulation and improving parallel computing capabilities.
Patent Information
- Application Number
- CN202511375024.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-25
- Publication Date
- 2025-10-31
AI Technical Summary
Existing OGCM models suffer from polar singularities, resolution limitations, and low parallel efficiency in parallel optimization, making it difficult to achieve efficient and high-resolution simulations of global ocean circulation.
A parallel processing method based on unstructured grids is adopted. By dividing the unstructured grid of the global ocean into multiple sub-regions in a linear order, a boundary information data structure is constructed. The MPI interface is used for data communication and result aggregation between processor cores to achieve efficient parallel computing.
It improves parallel computing efficiency, avoids polar singularity problems, supports local high-resolution simulation, enhances the analytical capabilities of key ocean processes, and has good load balancing and scalability.
Smart Images

Figure CN120874404A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of marine numerical simulation technology, and more specifically to a parallel processing method and device for simulating global ocean circulation based on unstructured grids. Background Technology
[0002] Currently, with the increasingly severe trend of global climate change and the intensifying disturbances to marine ecosystems caused by human activities, the scientific community and policymakers are placing higher demands on the simulation accuracy and predictive capabilities of Ocean General Circulation Models (OGCMs). OGCMs are numerical simulation tools built upon principles of fluid dynamics and mathematical physics equations, with the primary goal of reproducing global ocean circulation processes and their interaction mechanisms with the climate system. Due to the complex characteristics of ocean systems, such as multi-scale, highly nonlinear, and strongly coupled nature, practical applications of OGCMs require high resolution, long-term time series, and wide-area coverage, thus posing extremely high challenges to computational resources, storage capacity, and data processing efficiency.
[0003] Against this backdrop, one of the research hotspots in the intersection of ocean numerical simulation and high-performance computing is how to improve the operational efficiency of OGCM through parallel computing techniques. Parallel optimization can not only significantly shorten model running time but also support higher-resolution simulation experiments, thereby enhancing the analytical capabilities for key ocean processes such as eddies, fronts, and boundary currents. Therefore, exploring efficient parallel methods suitable for OGCM is of significant practical importance and scientific value for promoting oceanographic research and serving climate prediction and disaster prevention and mitigation.
[0004] However, traditional OGCM is usually based on structured grids, such as latitude and longitude grids, and its parallel optimization has the following drawbacks: 1. Polar singularity: In high-latitude regions, grid lines converge, leading to singularities at the poles. This requires the use of "strong smoothing" methods to resolve, which reduces computational efficiency and accuracy.
[0005] 2. Resolution limitation: Structured grids are difficult to simulate at high resolution in local areas, and their parallel optimization also limits the applicability of OGCM in areas such as coastal zones.
[0006] 3. Low parallel efficiency: As the number of processor (CPU) cores increases, parallel efficiency drops sharply, limiting the application of OGCM in high-performance computing environments.
[0007] Therefore, how to provide a parallel processing method and device for simulating global ocean circulation based on unstructured grids is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0008] In view of this, the present invention provides a parallel processing method and device for global ocean circulation simulation based on unstructured grids, and creates a parallel processing flow based on unstructured global ocean circulation models, aiming to fill the gap in existing parallel technology for unstructured grid ocean models.
[0009] To achieve the above objectives, the present invention adopts the following technical solution: A parallel processing method for simulating global ocean circulation based on unstructured grids includes: S100: Divides the coding of the unstructured grid of the global ocean into multiple sub-regions in a linear order and assigns each sub-region to a processor core; S200: Construct a boundary information data structure for managing data exchange between processor cores. The boundary information data structure includes the mapping relationship between local indices to global indices of the U-grid for flow rate calculation and the T-grid for temperature-salt density calculation on each processor core, as well as the mapping relationship between global indices to local indices. S300: Based on the mapping relationship, the global array representing ocean state variables is divided into multiple local arrays and distributed to the corresponding processor cores; S400: Each processor core performs numerical calculations of the ocean circulation model based on its corresponding local array, and before the start of each calculation time step, it communicates boundary data between processor cores through the message passing interface MPI to update the values of their respective boundary arrays. S500: After all computation time steps are completed, the computation results distributed across each processor core are aggregated to the main core through a global collection operation, and the simulation results of global ocean circulation are output.
[0010] Furthermore, S100 includes: encoding an unstructured grid of the global ocean generated according to an adaptive parallel grid encoding generation method, wherein the unstructured grid is an icosahedral grid.
[0011] Furthermore, in S100, the internal grid codes of each processor core are connected end to end according to their number. If the total number of T grids is not divisible by the total number of processor cores, the first T grid is assigned to the first processor core, the last T grid is assigned to the last processor core, and the remaining grids are evenly distributed to all processor cores in sequence.
[0012] Furthermore, the boundary information data structure also includes: the mapping relationship between the boundary indices of the U-grid for flow rate calculation and the T-grid for temperature-salt density calculation on each processor core.
[0013] Furthermore, S400 specifically includes: Sending sub-step: The sending processor core stores the boundary data to be sent into the sending buffer and calls the MPI_Send function to send it to the target processor core; Receive sub-step: The receiving processor core calls the MPI_Recv function to receive boundary data from the source processor core and stores it in the receive buffer to update the local boundary array.
[0014] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a parallel processing method for simulating global ocean circulation based on an unstructured grid.
[0015] As can be seen from the above technical solution, compared with the prior art, the present invention discloses a parallel processing method for global ocean circulation simulation based on unstructured grids, which gives full play to the geometric advantages of unstructured grids and solves the parallelization problem they bring, thereby realizing efficient and high-resolution simulation of global ocean circulation. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0017] Figure 1 This is a schematic diagram of the method flow provided by the present invention; Figure 2 This is a schematic diagram illustrating the mapping relationship between global and local arrays. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] See Figure 1 This invention discloses a parallel processing method for simulating global ocean circulation based on unstructured grids, comprising: S100: Divides the coding of the unstructured grid of the global ocean into multiple sub-regions in a linear order and assigns each sub-region to a processor core; S200: Construct a boundary information data structure for managing data exchange between processor cores. The boundary information data structure includes the mapping relationship between local indices to global indices of the U-grid for flow rate calculation and the T-grid for temperature-salt density calculation on each processor core, as well as the mapping relationship between global indices to local indices. S300: Based on the mapping relationship, the global array representing ocean state variables is divided into multiple local arrays and distributed to the corresponding processor cores; S400: Each processor core performs numerical calculations of the ocean circulation model based on its corresponding local array, and before the start of each calculation time step, it communicates boundary data between processor cores through the message passing interface MPI to update the values of their respective boundary arrays. S500: After all computation time steps are completed, the computation results distributed across each processor core are aggregated to the main core through a global collection operation, and the simulation results of global ocean circulation are output.
[0020] This invention combines the geometric features of unstructured meshes for parallel partitioning, performs multi-CPU core segmentation of global data, and constructs boundary communication and broadcast collection functions based on the MPI interface before applying them to unstructured mesh ocean circulation models, thereby improving the computational efficiency of OGCM and accelerating its computation process.
[0021] Specifically, the main steps of the parallel processing method proposed in this invention are: unstructured mesh sub-region partitioning, boundary information data structure construction, global array partitioning into local arrays, MPI boundary communication and parallel computing, and construction of broadcast functions and global collection functions, specifically including: 2.1 Unstructured mesh sub-region division includes: The unstructured mesh (icosahedral mesh) generated by the adaptive parallel mesh coding method is uniformly divided into multiple sub-regions in a linear order, and each sub-region is assigned to a CPU core. Each CPU core is assigned a number, and the mesh codes within each core are also contiguous. It is important to note that the number of meshes (T) is not divisible by the number of CPU cores; therefore, the first and last meshes are assigned to the first and last CPU cores, respectively, and the remaining meshes are uniformly distributed among the CPU cores in sequence.
[0022] 2.2 Boundary information data structure construction and global array partitioning into local arrays include: According to the grid sub-region division rules in section 2.1, the local start and end codes on each CPU core are recorded. Simultaneously, the mapping relationship of boundary information is constructed, and a boundary information data structure is built. This structure should include the local and global indices of the U-grid and T-grid on each CPU core, their respective mapping relationships, and the boundary indices of the U-grid and T-grid on each CPU core, their respective mapping relationships. Then, using this information, the global array is divided into local arrays for each CPU core.
[0023] Specifically, see the above index mapping relationship. Figure 2 As shown, the global array is divided equally according to the number of CPU cores to form local arrays (see...). Figure 2 (local_0 in the local array plus the boundary array (see local_0)) Figure 2 The neighbor in the array forms a local array of the whole.
[0024] 2.3 The construction of boundary communication and parallel computing, broadcast functions and global collection functions includes: An efficient MPI boundary communication scheme is designed to achieve data exchange between different CPU cores, ensuring the correctness of the calculation results. The specific boundary communication pseudocode is shown in the algorithm below. Before each integration step update, MPI boundary communication is performed to update the boundary values. Then, OGCM calculations are executed in parallel on multiple CPU cores to accelerate the computation process. At the end of the large loop, broadcast and global collection functions are used to output the numerical calculation results. See Table 1 for the specific process.
[0025] Table 1. Border Communication Scheme Flowchart
[0026] In summary, the application process of the parallel algorithm based on the unstructured grid global ocean circulation model of this invention can be roughly divided into the following steps: 1. Input: Global array and grid encoding and its geometric relationship mapping table.
[0027] 2. Construct the grid boundary relationship table and boundary data structure.
[0028] 3. Divide the global array into local arrays and distribute them to each CPU core.
[0029] 4. Each CPU core performs local numerical calculations, and MPI boundary communication is performed to update the boundary values on each CPU core before each integration step size update.
[0030] 5. Output: After the large loop ends, CPU core 0 collects and integrates the values from each CPU core, and outputs the overall numerical calculation results of the ocean mode.
[0031] The specific beneficial effects of this application through the above technical solution are as follows: (1) The present invention designs a dedicated data partitioning and communication scheme for the geometric features of unstructured grids, which effectively reduces the communication overhead and waiting time between processes, achieves good load balancing, significantly improves parallel efficiency and scalability, and enables the mode to make full use of large-scale high-performance computing resources.
[0032] (2) By adopting an unstructured grid, the polar singularity problem of traditional latitude and longitude grids is fundamentally avoided, eliminating the need to introduce strong smoothing algorithms and ensuring the computational accuracy in high-latitude regions. At the same time, it supports local grid refinement, enabling more accurate analysis of key processes such as ocean mesoscale eddies and boundary currents.
[0033] (3) The parallel processing framework proposed in this invention is universal and can be widely applied to various ocean and climate numerical models based on unstructured grids. It provides an effective technical solution to solve the parallel computing bottleneck of such models and has important scientific value and engineering application prospects.
[0034] On the other hand, embodiments of the present invention also disclose an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a parallel processing method for simulating global ocean circulation based on unstructured grids.
[0035] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0036] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A parallel processing method for simulating global ocean circulation based on unstructured grids, characterized in that, include: S100: Divides the coding of the unstructured grid of the global ocean into multiple sub-regions in a linear order and assigns each sub-region to a processor core; S200: Construct a boundary information data structure for managing data exchange between processor cores. The boundary information data structure includes the mapping relationship between local indices to global indices of the U-grid for flow rate calculation and the T-grid for temperature-salt density calculation on each processor core, as well as the mapping relationship between global indices to local indices. S300: Based on the mapping relationship, the global array representing ocean state variables is divided into multiple local arrays and distributed to the corresponding processor cores; S400: Each processor core performs numerical calculations of the ocean circulation model based on its corresponding local array, and before the start of each calculation time step, it communicates boundary data between processor cores through the message passing interface MPI to update the values of their respective boundary arrays. S500: After all computation time steps are completed, the computation results distributed across each processor core are aggregated to the main core through a global collection operation, and the simulation results of global ocean circulation are output.
2. The parallel processing method for simulating global ocean circulation based on unstructured grids according to claim 1, characterized in that, S100 includes: encoding of an unstructured grid of the global ocean generated according to an adaptive parallel grid encoding generation method, wherein the unstructured grid is an icosahedral grid.
3. The parallel processing method for simulating global ocean circulation based on unstructured grids according to claim 1, characterized in that, In S100, it also includes: each processor core is numbered and its internal grid code is also connected end to end. If the total number of T grids is not divisible by the total number of processor cores, the first T grid is assigned to the first processor core, the last T grid is assigned to the last processor core, and the remaining grids are evenly distributed to all processor cores in sequence.
4. The parallel processing method for simulating global ocean circulation based on unstructured grids according to claim 1, characterized in that, The boundary information data structure also includes: the mapping relationship between the boundary indices of the U-grid used for flow rate calculation and the T-grid used for temperature, salinity and density calculation on each processor core.
5. The parallel processing method for simulating global ocean circulation based on unstructured grids according to claim 1, characterized in that, Specifically, S400 includes: Sending sub-step: The sending processor core stores the boundary data to be sent into the sending buffer and calls the MPI_Send function to send it to the target processor core; Receive sub-step: The receiving processor core calls the MPI_Recv function to receive boundary data from the source processor core and stores it in the receive buffer to update the local boundary array.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the parallel processing method for global ocean circulation simulation based on unstructured grids as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Dynamic boundary flow field numerical simulation-oriented local area grid reconstruction parallel method
CN110188424A
Parallel communication method and system based on ocean mode ROMS
CN115391069A
Two-dimensional flood process multi-GPU simulation method based on unstructured grid
CN115795939A
Grid processing method for improving efficiency and stability of ocean numerical forecasting model
CN118886368A
Self-adaptive parallel global icosahedron unstructured grid code generation and subdivision method
CN120387293A