Horizontal grid registration and parallel computing method and system in climate mode coupling
By employing methods such as component authentication, grid parsing and dual grid construction, parallel domain decomposition, and time synchronization registration, the problems of uneven grid processing and low communication efficiency in existing climate model coupling technologies are solved, achieving efficient and secure data exchange and optimized allocation of computing resources.
Patent Information
- Application Number
- CN202510871230.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-11-11
AI Technical Summary
Existing climate model coupling technologies lack differentiated grid processing mechanisms for the specific needs of ocean-atmosphere coupling, resulting in low data transmission efficiency, wasted computing resources, low parallel efficiency, and high communication time overhead between models. Furthermore, they lack dynamic optimization mechanisms, failing to meet the requirements for dynamic feature allocation and security verification for different models.
The system generates pattern component identifiers through a component authentication algorithm, parses horizontal grid geometry parameters, constructs masked and unmasked grid configurations, performs parallel domain decomposition processing, establishes a bidirectional mapping relationship between global and local grid indices, and performs time synchronization registration processing to achieve dynamic resource allocation and secure and reliable data exchange.
It improves the accuracy and efficiency of data exchange, balances the computational load, reduces communication time overhead, ensures security and synchronization consistency between modes, and enhances the performance of parallel computing.
Smart Images

Figure CN120929244A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method and system for horizontal grid registration and parallel computing in climate model coupling. Background Technology
[0002] Existing climate model coupling techniques primarily employ a globally unified grid registration approach. This involves centrally storing the horizontal grid information of participating atmospheric and oceanic models in a central database within the coupling framework, and facilitating data exchange between models through predefined grid mapping relationships. Traditional methods typically use a single grid configuration file to describe the grid characteristics of all models, employing a static parallel decomposition strategy to allocate grids to various computational processes according to fixed partitioning rules. Time synchronization mechanisms rely on preset synchronization periods and uniform time step constraints to coordinate the computational pace of different models.
[0003] However, existing technologies have significant shortcomings: First, they lack differentiated grid processing mechanisms for the specific needs of air-sea coupling, failing to distinguish the different requirements of grid masks for the two different data exchange directions from atmosphere to ocean and from ocean to atmosphere, resulting in low data transmission efficiency and unnecessary data processing overhead; second, the parallel decomposition strategy is overly simplified, failing to fully consider the differences in grid density and uneven computational load across different latitudinal zones, leading to a waste of high-performance computing resources and a decrease in parallel efficiency; third, the index mapping relationship establishment process lacks a dynamic optimization mechanism, resulting in low conversion efficiency between global and local indexes and increasing the time overhead of inter-schema communication.
[0004] Further analysis reveals that existing technologies lack fine-grained management in modal component authentication and resource allocation, failing to dynamically allocate computing resources and communication ports based on the characteristics of different modals, resulting in security vulnerabilities and resource conflict risks during modal registration. Mesh geometry parameter parsing lacks an adaptive mechanism, failing to automatically identify mesh coordinate system types and boundary conditions based on modal component identifiers, leading to mesh configuration errors and coupling failures. Dual mesh construction lacks intelligent recognition capabilities for land-sea distribution characteristics, failing to dynamically generate masked and unmasked mesh configurations based on actual geographic information. Parallel domain decomposition lacks load balancing optimization algorithms, failing to rationally allocate computational tasks based on mesh distribution density and computational complexity. Index association lacks an efficient bidirectional mapping mechanism, resulting in performance bottlenecks in global and local index conversion. Time synchronization registration lacks automated compatibility checks and calibration mechanisms, posing technical challenges to time step matching and synchronization error control between modals. Summary of the Invention
[0005] This application provides a method and system for horizontal grid registration and parallel computing in climate model coupling, which addresses the technical problem that existing climate model coupling technologies lack adaptive grid registration and parallel decomposition processing mechanisms for the specific needs of ocean-atmosphere coupling.
[0006] Firstly, this application provides a method for horizontal grid registration and parallel computing in climate model coupling. The method includes: registering atmospheric model components using a component authentication algorithm to obtain model component identifiers; parsing the horizontal grid geometric parameters based on the model component identifiers to obtain a set of basic grid information including latitude and longitude coordinate ranges, the total number of grid cells, and the number of local grid cells; performing dual grid construction based on the grid basic information set to meet the air-sea coupling data exchange requirements, resulting in a masked horizontal grid configuration and an unmasked horizontal grid configuration; performing parallel domain decomposition on the masked and unmasked horizontal grid configurations to obtain corresponding masked grid parallel decomposition mapping tables and unmasked grid parallel decomposition mapping tables; indexing and associating the grid sub-regions of each MPI process based on the masked and unmasked grid parallel decomposition mapping tables to obtain a bidirectional mapping relationship between the global grid index and the local grid index; and performing synchronous registration of model time step parameters based on the bidirectional mapping relationship to obtain time synchronization configuration parameters and coupling effectiveness verification results.
[0007] Secondly, this application provides a horizontal grid registration and parallel computing system in climate model coupling, the horizontal grid registration and parallel computing system in climate model coupling comprising:
[0008] The registration module is used to register atmospheric model components through a component authentication algorithm to obtain model component identifiers;
[0009] The parsing module is used to parse the horizontal grid geometric parameters according to the mode component identifier, and obtain a set of basic grid information including the latitude and longitude coordinate range, the total number of grid cells and the number of local grid cells;
[0010] The module is used to perform dual grid construction processing on the air-sea coupled data exchange requirements based on the grid basic information set, to obtain a masked horizontal grid configuration and an unmasked horizontal grid configuration.
[0011] The decomposition module is used to perform parallel domain decomposition processing on the masked horizontal grid configuration and the unmasked horizontal grid configuration to obtain the corresponding masked grid parallel decomposition mapping table and the unmasked grid parallel decomposition mapping table.
[0012] The association module is used to perform index association processing on the grid sub-regions of each MPI process based on the masked grid parallel decomposition mapping table and the unmasked grid parallel decomposition mapping table, so as to obtain a bidirectional mapping relationship between the global grid index and the local grid index.
[0013] The registration module is used to perform synchronous registration of mode time step parameters based on bidirectional mapping relationship, and obtain time synchronization configuration parameters and coupling effectiveness verification results.
[0014] Thirdly, a climate model coupled horizontal grid registration and parallel computing device is provided, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor invokes the instructions in the memory to cause the climate model coupled horizontal grid registration and parallel computing device to execute the above-described climate model coupled horizontal grid registration and parallel computing method.
[0015] Fourthly, a computer-readable storage medium is provided, wherein instructions are stored therein, which, when executed on a computer, cause the computer to perform the above-described method for horizontal grid registration and parallel computing in climate model coupling.
[0016] The technical solution provided in this application achieves secure and reliable identification of atmospheric model components through a component authentication algorithm during registration. This avoids identity conflicts and resource allocation errors in the traditional model registration process, ensuring that each model component obtains a unique identifier and dedicated computing resources. Based on the model component identifier, the horizontal grid geometric parameters are parsed, automatically identifying the grid coordinate system type and boundary conditions. This solves the technical problem of manual intervention and error-prone grid configuration in existing technologies, significantly reducing the complexity and error rate of grid registration. Based on the grid's basic information set, a dual-grid construction process is used to meet the needs of air-sea coupled data exchange. Masked and unmasked grid configurations are generated for the two different data flow directions: atmosphere to ocean and ocean to atmosphere. This effectively solves the technical deficiency that traditional single-grid configurations cannot meet the differentiated needs of bidirectional data exchange, avoiding invalid data transmission and processing overhead, and improving the accuracy and efficiency of coupled data exchange.
[0017] When performing parallel domain decomposition on a dual-grid configuration, load balancing weight calculation and grid distribution density optimization are employed to address the uneven computational load caused by simple equal-distribution strategies in existing technologies. This is particularly beneficial when grids are denser in high-latitude regions and sparser in low-latitude regions. Intelligent allocation algorithms ensure a balanced computational load across MPI processes, significantly improving parallel computing efficiency. A bidirectional mapping relationship between the global and local grid indices is established based on the parallel decomposition mapping table. A hash table structure and space-filling curve sorting method overcome the technical bottleneck of low efficiency in traditional index conversion, reducing the time complexity of index lookup to constant levels and significantly decreasing the time overhead of inter-pattern communication. Based on this bidirectional mapping relationship, pattern time-step synchronization registration is performed. An automated compatibility check and calibration mechanism solves the technical challenge of precise synchronization between patterns with different time steps. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram of an embodiment of the horizontal grid registration and parallel computing method in climate model coupling in this application.
[0020] Figure 2 This is a schematic diagram of an embodiment of the horizontal grid registration and parallel computing system in climate model coupling in this application.
[0021] Figure 3 This is a schematic block diagram of the horizontal grid registration and parallel computing device in the climate model coupling embodiment of the present invention. Detailed Implementation
[0022] This application provides a method and system for horizontal grid registration and parallel computing in climate model coupling. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0023] For ease of understanding, the specific process of the embodiments of this application is described below. Please refer to [link / reference]. Figure 1 One embodiment of the horizontal grid registration and parallel computing method in climate model coupling in this application includes:
[0024] Step S101: Register the atmospheric model component using the component authentication algorithm to obtain the model component identifier;
[0025] The process involves verifying the legitimacy of atmospheric model components to obtain component type identifiers and component version information; querying the model resource allocation table based on the component type identifiers and component version information to obtain model-specific memory space and model communication port configurations; inputting the model-specific memory space and model communication port configurations into the component registration manager for identity binding to obtain temporary component access tokens; and performing hash calculations on the component identifier generation rules based on the temporary component access tokens to obtain unique model component identifiers.
[0026] Specifically, the atmospheric model component is registered using a component authentication algorithm. First, the legitimacy identifier of the atmospheric model component is verified. This identifier includes the model name hash, the development organization's digital signature, and the version control code. The verification process uses digital signature verification to ensure the model component has not been tampered with. Simultaneously, the version control code is parsed to obtain the major version number, minor version number, and patch version number, forming a complete component type identifier and component version information. Based on the obtained component type identifier and component version information, the model resource allocation table is queried. The resource allocation table stores the system resource requirements configuration corresponding to different model types. The query process uses the component type identifier as the index key to match the corresponding memory allocation strategy and communication port range, calculating the required dedicated memory space size and available communication port list for the current model component, thus forming the model's dedicated memory space and communication port configuration.
[0027] The dedicated memory space and communication port configuration for each mode are input into the component registration manager for identity binding. The registration manager first allocates a contiguous memory region of a specified size as the mode's data buffer. Then, it selects an unused port number from the available port list to establish an inter-mode communication channel. The binding process associates the memory address, port number, and current mode session, generating a temporary component access token containing a session identifier, timestamp, and permission level. The component identifier generation rule is hashed based on the temporary access token. The generation rule combines the session identifier, current system timestamp, and mode type identifier from the token, and uses the SHA-256 hash algorithm to calculate a fixed-length digital digest. This digest is then Base64 encoded into a readable string format, ultimately forming a unique and non-repeatable mode component identifier within the entire coupled system.
[0028] Step S102: Analyze the horizontal grid geometric parameters according to the mode component identifier to obtain a set of grid basic information containing the latitude and longitude coordinate range, the total number of grid cells and the number of local grid cells;
[0029] Specifically, the horizontal grid coordinate system type is identified based on the mode component identifier to obtain the latitude and longitude grid type identifier and the angle coordinate unit identifier; the global grid boundary conditions are cyclically detected based on the latitude and longitude grid type identifier and the angle coordinate unit identifier to obtain the longitude cyclic boundary parameters and the latitude range boundary parameters; the longitude cyclic boundary parameters and the latitude range boundary parameters are input into the grid size calculator for statistical processing to obtain the total number of global grid cells and the number of local grid cells allocated by the current MPI process; the total number of global grid cells and the number of local grid cells are mapped to coordinate range to obtain a set of basic grid information containing the minimum latitude and longitude values, the maximum latitude and longitude values, and the grid center point coordinate array.
[0030] Specifically, the horizontal grid geometric parameters are parsed based on the model component identifier. First, the horizontal grid coordinate system type is identified based on the model component identifier. The parsing process matches the hash prefix segment in the model component identifier with a predefined coordinate system type mapping table to identify the grid coordinate system type used by the current model. For atmospheric models, it is usually identified as a latitude and longitude spherical coordinate system, generating a latitude and longitude grid type identifier "LON_LAT". At the same time, the measurement unit of the coordinate values is parsed to generate an angle coordinate unit identifier "degrees" to indicate that latitude and longitude use angle units.
[0031] The global grid boundary conditions are cyclically detected based on the latitude and longitude grid type identifier and the angular coordinate unit identifier. The detection process analyzes the boundary characteristics of the grid in the longitude and latitude directions. Due to the spherical nature of the Earth, the longitude direction forms a periodic connection at 0 degrees and 360 degrees. The detection algorithm calculates the longitude difference between adjacent grid points. When the difference is close to 360 degrees, it confirms the existence of a cyclic boundary condition and generates the longitude direction cyclic boundary parameter "cyclic_x=true". Due to the restriction of the North and South Poles, the detection range in the latitude direction is usually a limited interval from -90 degrees to 90 degrees, generating the latitude direction range boundary parameter "range_y=[-90,90]".
[0032] The longitude cyclic boundary parameters and latitude range boundary parameters are input into the grid size calculator for statistical processing. The calculator first determines the grid spacing based on the mode resolution configuration. For the T574 resolution GFS mode, the longitude grid spacing is 0.3125 degrees and the latitude grid spacing is 0.25 degrees. The statistical processing calculates the number of global longitude grids to be 360 / 0.3125 = 1152 and the number of latitude grids to be 180 / 0.25 = 720, resulting in a total of 1152 × 720 = 829440 global grid cells. The number of local grid cells allocated to the current MPI process according to the parallel decomposition strategy is calculated by dividing the total number of grid cells by the number of processes. For example, in a 96-process environment, each process is allocated approximately 8640 grid cells.
[0033] The total number of global grid cells and the number of local grid cells are mapped to coordinate ranges. The mapping process calculates the grid area range that the current MPI process number is responsible for based on the grid distribution strategy. Assuming a row decomposition strategy is adopted, process 0 is responsible for the latitude range of -90 degrees to -52.5 degrees, with the corresponding minimum latitude and longitude values being [-180.0, -90.0] and the maximum latitude and longitude values being [180.0, -52.5]. The grid center point coordinate array is generated by traversing each grid cell in this area to calculate the center point coordinates. It includes the longitude coordinate array lon_centers and the latitude coordinate array lat_centers, ultimately forming a complete set of grid basic information.
[0034] Taking a certain GFS mode example, the first 8 hash values of the mode component identifier "YTdiM2M5ZDJlOGY0...", "YTdiM2M5", match the coordinate system type as a spherical latitude and longitude grid, the unit identifier as degrees, and the boundary detection confirms that the longitude direction has a 360-degree periodic cycle feature and the latitude direction spans 180 degrees between the North and South Poles. The grid size calculation is based on a grid resolution of 0.25 degrees × 0.3125 degrees, resulting in 829,440 grid cells globally. In a 64-process parallel environment, the current process is allocated 12,960 local grid cells. The coordinate mapping determines that the longitude range of the grid area managed by this process is -180 degrees to 180 degrees and the latitude range is 45 degrees to 90 degrees. A complete set of basic grid information containing latitude and longitude boundary values and grid center point coordinates is generated.
[0035] Step S103: Based on the grid basic information set, perform dual grid construction processing on the air-sea coupling data exchange requirements to obtain a masked horizontal grid configuration and an unmasked horizontal grid configuration;
[0036] Specifically, the land-sea distribution characteristics in the grid basic information set are identified to obtain a set of valid ocean grid point identifiers and a set of invalid land grid point identifiers. Based on the set of valid ocean grid point identifiers, the atmospheric-to-ocean data transmission path is constructed to obtain a maskless data transmission grid topology and corresponding maskless horizontal grid identifiers. Based on the set of invalid land grid point identifiers, the ocean-to-atmosphere data reception path is filtered and constructed to obtain a masked data reception grid topology and a land-sea masking filtering matrix. The maskless horizontal grid identifiers and the land-sea masking filtering matrix are then input into a dual grid configuration generator for encapsulation to obtain a masked horizontal grid configuration and a maskless horizontal grid configuration.
[0037] Specifically, the land-sea distribution characteristics in the grid basic information set are identified and processed. The identification process involves reading the global land-sea distribution data file, which contains the land surface type identifier for each grid point. The identifier for marine areas is a value of 1, and the identifier for land areas is a value of 0. The identification algorithm traverses each coordinate position in the grid center point coordinate array and queries the corresponding land surface type value using the bilinear interpolation method. When the value is equal to 1, the grid point index is added to the set of valid marine grid point identifiers. When the value is equal to 0, the index is added to the set of invalid land grid point identifiers, forming two complementary grid point classification results.
[0038] The atmospheric-to-ocean data transmission path is constructed based on the set of valid ocean grid point identifiers. The construction process creates a grid topology specifically for transmitting data from the atmospheric model to the ocean model. This structure includes all ocean grid points and some transition grid points near the land, ensuring that atmospheric data can be completely transmitted to the ocean boundary region. The topology stores the connectivity between grid points in the form of an adjacency matrix. A matrix element of 1 indicates that there is a data transmission path between two grid points, and 0 indicates that there is no direct connection. The construction process also generates a corresponding maskless horizontal grid identifier "gfs_H2D_grid_no_mask", which is associated with the maskless data transmission grid topology containing all valid transmission grid points.
[0039] The ocean-to-atmosphere data reception path is filtered and constructed based on a set of invalid land grid point identifiers. The filtering and construction process creates a grid structure specifically for atmospheric models to receive data from ocean models. This structure needs to exclude invalid data points in land areas to avoid receiving meaningless values from ocean models on land grid points. The filtering algorithm constructs a masked data reception grid topology structure, which only contains ocean grid points and valid transition points at the land-sea boundary. At the same time, a land-sea masking filtering matrix is generated. The matrix dimension is the same as the total number of grids. An element value of 1.0 for ocean locations indicates that the data is valid, while an element value of 0.0 for land locations indicates that the data needs to be filtered and masked.
[0040] The unmasked horizontal grid identifier and the land-sea masking filter matrix are input into a dual grid configuration generator for encapsulation. The encapsulation process integrates the two different sets of grid configuration information into a standardized grid configuration object. The generator first creates a masked horizontal grid configuration object, which includes the grid identifier "gfs_H2D_grid_ocn_mask", the masking filter matrix, the list of valid grid point indices, and the data receiving topology. Then, it creates an unmasked horizontal grid configuration object, which includes the grid identifier "gfs_H2D_grid_no_mask", the complete list of grid point indices, and the data transmission topology. The two configuration objects use the same coordinate system and grid resolution, but the data processing strategy is specifically optimized for different coupled data flow directions.
[0041] Step S104: Perform parallel domain decomposition on the masked horizontal grid configuration and the unmasked horizontal grid configuration to obtain the corresponding masked grid parallel decomposition mapping table and the unmasked grid parallel decomposition mapping table.
[0042] Specifically, the total number of grid cells in both masked and unmasked horizontal grid configurations is balanced by the number of MPI processes to obtain the grid sub-region range and boundary coordinates allocated to each process. Based on the grid sub-region range and boundary coordinates, the load balancing weight of each MPI process is calculated to obtain the process load weight coefficient and grid distribution density parameter. The process load weight coefficient and grid distribution density parameter are then input into a parallel decomposition algorithm for domain decomposition mapping to obtain the masked grid process allocation matrix and the unmasked grid process allocation matrix. Finally, the grid index relationship between processes is established based on the masked grid process allocation matrix and the unmasked grid process allocation matrix to obtain the masked grid parallel decomposition mapping table and the unmasked grid parallel decomposition mapping table.
[0043] Specifically, the total number of grid cells in the masked and unmasked horizontal grid configurations is divided by MPI process number balancing. The partitioning algorithm uses a block decomposition strategy to divide the global grid according to latitudinal zones. For the 300,000 effective ocean grid cells in the masked configuration, each process is theoretically allocated 4,688 grid cells in a 64-process environment. For the 350,000 grid cells in the unmasked configuration, each process is allocated 5,469 cells. The partitioning process allocates continuous latitudinal zones to adjacent process numbers based on the latitudinal coordinates of the grid, ensuring that the grid sub-regions managed by each process are geographically continuous, and generating the range of the grid sub-regions allocated to each process and the corresponding grid sub-region boundary coordinates.
[0044] The load balancing weight of each MPI process is calculated based on the grid sub-region range and grid sub-region boundary coordinates. The calculation process takes into account the differences in grid density in different latitude zones. In high-latitude regions, the grid area is smaller but the number of grid cells is denser due to the spherical convergence effect, while in low-latitude regions, the grid area is larger but the computational complexity is relatively lower. The weight calculation formula integrates the number of grid cells, the average grid area, and the computational complexity factor. By statistically analyzing the grid geometric characteristic parameters within the management area of each process, the process load weight coefficient is calculated. At the same time, the number of grid points per unit area is statistically analyzed to generate grid distribution density parameters for subsequent load balancing optimization. The process load weight coefficient and grid distribution density parameter are input into the parallel decomposition algorithm for domain decomposition mapping. The parallel decomposition algorithm uses a recursive coordinate bisection method to iteratively divide the grid region. The algorithm first adjusts the initial segmentation result according to the load weight coefficient, assigning fewer grid cells to processes with heavier computational loads and more cells to processes with lighter loads. Then, it optimizes the boundary positions between processes according to the grid distribution density parameter to reduce inter-process communication overhead. The decomposition process generates a masked grid process allocation matrix and an unmasked grid process allocation matrix. The row index of the matrix corresponds to the process number, and the column index corresponds to the global index of the grid cell managed by the process.
[0045] The inter-process grid index relationship is established based on the masked grid process allocation matrix and the unmasked grid process allocation matrix. The establishment process constructs a bidirectional index mapping structure. The forward mapping converts the global grid index into the corresponding process number and local index, and the reverse mapping combines the process number and local index back into the global index. The mapping table is stored in a hash table structure to improve query efficiency. At the same time, it records the grid boundary information and overlapping area index between adjacent processes, forming a complete masked grid parallel decomposition mapping table and an unmasked grid parallel decomposition mapping table. The mapping table contains process allocation relationship, index conversion rules and communication topology information.
[0046] Step S105: Based on the masked grid parallel decomposition mapping table and the unmasked grid parallel decomposition mapping table, perform index association processing on the grid sub-regions of each MPI process to obtain the bidirectional mapping relationship between the global grid index and the local grid index.
[0047] Specifically, the process IDs and grid sub-region ranges in the masked grid parallel decomposition mapping table and the unmasked grid parallel decomposition mapping table are cross-validated to obtain inter-process grid overlap region identifiers and grid boundary connection nodes. Based on the inter-process grid overlap region identifiers and grid boundary connection nodes, the local grid cell IDs of each MPI process are sorted to obtain the local grid cell sequence and local grid coordinate offset. The local grid cell sequence and local grid coordinate offset are input into the global index mapping algorithm for coordinate transformation to obtain the correspondence matrix between the local grid index and the global grid index. Based on the correspondence matrix, the index transformation rules are bidirectionally constructed to obtain the bidirectional mapping relationship between the global grid index and the local grid index.
[0048] Specifically, the grid sub-regions of each MPI process are indexed and associated based on the masked grid parallel decomposition mapping table and the unmasked grid parallel decomposition mapping table. First, the process number and grid sub-region range in the masked grid parallel decomposition mapping table and the unmasked grid parallel decomposition mapping table are cross-validated. The validation process compares the grid region boundaries corresponding to the same process number in the two mapping tables, checks the spatial overlap between the masked grid and the unmasked grid within the same process, and identifies the overlapping area by calculating the intersection of the latitude and longitude ranges of the two grid regions. When the boundary coordinates of the masked grid region and the unmasked grid region have the same latitude or longitude value, they are identified as grid boundary connection nodes. The validation algorithm traverses all process pairs, identifies the grid boundary line segments shared between adjacent processes, and generates inter-process grid overlap area identifiers and a set of grid boundary connection nodes.
[0049] The local grid cell numbers of each MPI process are sorted based on the inter-process grid overlap region identifier and grid boundary connection nodes. The sorting algorithm uses the space-filling curve method to renumber the grid cells in each process according to their geographical location. First, a primary sort is performed based on the latitude coordinates of the grid center point. Grid points with the same latitude are then sorted by longitude coordinates to ensure the continuous correspondence between the local grid number and the geographical location. The sorting process takes into account the special positions of the boundary connection nodes and arranges these nodes in specific positions in the local number sequence to facilitate inter-process communication, generating a local grid cell sequence. At the same time, the starting offset of the grid coordinates for each process is calculated. This offset represents the displacement vector of the local coordinate system relative to the global coordinate system.
[0050] The local grid cell sequence and local grid coordinate offset are input into the global index mapping algorithm for coordinate transformation. The mapping algorithm establishes a mathematical transformation relationship between the local index and the global index. For each local grid index, the algorithm first determines the geographical location corresponding to the index based on the local grid cell sequence, then adds the local grid coordinate offset to obtain the global coordinate position, and finally finds the global grid index corresponding to the coordinate position through the spatial index structure of the global grid. The transformation process generates a sparse matrix correspondence matrix, where the row index of the matrix is the local grid index, the column index is the corresponding global grid index, and the matrix element value of 1 indicates that a correspondence exists.
[0051] The index transformation rules are bidirectionally constructed based on the correspondence matrix. The construction process creates two lookup table structures: the forward lookup table uses the local grid index as the key and the global grid index as the search result, and the reverse lookup table uses the global grid index as the key and returns the corresponding process ID and local grid index pair. The bidirectional construction algorithm traverses all non-zero elements in the correspondence matrix and records each correspondence in both the forward and reverse lookup tables. The lookup tables use a hash table data structure to ensure that the time complexity of the index transformation is constant. Finally, a bidirectional mapping relationship between the global grid index and the local grid index containing the forward and reverse transformation rules is generated.
[0052] Step S106: Based on the bidirectional mapping relationship, perform synchronous registration processing on the mode time step parameters to obtain time synchronization configuration parameters and coupling effectiveness verification results.
[0053] Specifically, the time step matching of model component identifiers and grid index association information in the bidirectional mapping relationship is checked to obtain the model computation frequency compatibility identifier and time step difference coefficient. Based on the model computation frequency compatibility identifier and time step difference coefficient, the integration time step of the atmospheric model is synchronized and calibrated to obtain the standardized time step value and time synchronization error threshold. The standardized time step value and time synchronization error threshold are input into the coupled framework time manager for registration to obtain the inter-model data exchange time window and time synchronization configuration parameters. Based on the time synchronization configuration parameters, the grid registration integrity and parallel decomposition effectiveness are comprehensively verified to obtain the coupled system readiness status code and coupling effectiveness verification results.
[0054] Specifically, a time step matching test is performed on the model component identifiers and grid index association information in the bidirectional mapping relationship. The test process extracts the time step information encoded in the model component identifiers. The atmospheric model identifier contains an encoding of an integration time step of 600 seconds, and the ocean model identifier contains an encoding of a time step of 3600 seconds. The matching test determines the time synchronization period between models by calculating the greatest common divisor and least common multiple of the two time steps. When the least common multiple of the atmospheric model's 600-second time step and the ocean model's 3600-second time step is 3600 seconds, a model calculation frequency compatibility identifier "COMPATIBLE" is generated. At the same time, the time step difference coefficient is calculated to be 3600 / 600 = 6, indicating that the atmospheric model needs to execute 6 time steps to complete one synchronization with the ocean model.
[0055] The integration time step of the atmospheric model is synchronized and calibrated based on the model computation frequency compatibility identifier and the time step difference coefficient. According to the time management requirements of the coupled framework, the original time step of the atmospheric model of 600 seconds is used as the reference time unit. The synchronization interval for data exchange between models is calculated to be 3600 seconds using the time step difference coefficient 6. The calibration algorithm checks the timestamps in the grid index association information to ensure that the timestamps of all grid points are aligned to the standard time grid, generating a standardized time step value of 600 seconds. At the same time, the time synchronization error threshold is calculated according to the numerical integration error propagation theory. This threshold is set to 0.1% of the time step, or 0.6 seconds, to control the coupling error caused by time inconsistency between models.
[0056] The standardized time step value and time synchronization error threshold are input into the coupled framework time manager for registration. The registration process creates a dedicated time scheduling table in the time manager, which records the time step, next execution time, and data exchange time point for each model component. The time manager establishes a global time axis based on a standardized time step of 600 seconds and schedules data exchange operations between the atmospheric and oceanic models at each synchronization point of 3600 seconds. The registration process generates a data exchange time window between models, which is defined as the time interval during which data transmission is allowed within each synchronization cycle. It is usually set to a time range of 60 seconds before and after the synchronization point, ultimately forming a time synchronization configuration parameter that includes the time step, synchronization cycle, and exchange window. The integrity of grid registration and the effectiveness of parallel decomposition are comprehensively verified based on the time synchronization configuration parameters. The verification process first checks whether all registered grid configurations contain complete time attribute information and confirms that both masked and unmasked grid configurations are associated with the correct time step parameters. Then, it verifies the consistency of the index transformation relationship in the parallel decomposition mapping table in the time dimension and checks whether the grid boundary nodes between different processes have the same time mark. The verification algorithm calculates indicators such as grid registration coverage, index mapping accuracy, and time synchronization consistency. When all indicators reach the preset threshold, a coupled system ready status code "READY" is generated. Otherwise, an error status code is generated and detailed error diagnosis information is output. Finally, a coupling effectiveness verification result containing system status, verification indicators, and diagnostic results is formed.
[0057] The above describes the horizontal grid registration and parallel computing method in climate model coupling in the embodiments of this application. The following describes the horizontal grid registration and parallel computing system in climate model coupling in the embodiments of this application. Please refer to [link to relevant documentation]. Figure 2 One embodiment of the horizontal grid registration and parallel computing system in climate model coupling in this application includes:
[0058] The registration module is used to register atmospheric model components through a component authentication algorithm to obtain model component identifiers;
[0059] The parsing module is used to parse the horizontal grid geometric parameters according to the mode component identifier, and obtain a set of basic grid information including the latitude and longitude coordinate range, the total number of grid cells and the number of local grid cells;
[0060] The module is used to perform dual grid construction processing on the air-sea coupled data exchange requirements based on the grid basic information set, to obtain a masked horizontal grid configuration and an unmasked horizontal grid configuration.
[0061] The decomposition module is used to perform parallel domain decomposition processing on the masked horizontal grid configuration and the unmasked horizontal grid configuration to obtain the corresponding masked grid parallel decomposition mapping table and the unmasked grid parallel decomposition mapping table.
[0062] The association module is used to perform index association processing on the grid sub-regions of each MPI process based on the masked grid parallel decomposition mapping table and the unmasked grid parallel decomposition mapping table, so as to obtain a bidirectional mapping relationship between the global grid index and the local grid index.
[0063] The registration module is used to perform synchronous registration of mode time step parameters based on bidirectional mapping relationship, and obtain time synchronization configuration parameters and coupling effectiveness verification results.
[0064] above Figure 2 The horizontal grid registration and parallel computing system in the climate model coupling of this invention embodiment is described in detail from the perspective of modular functional entities. The horizontal grid registration and parallel computing device in the climate model coupling of this invention embodiment is described in detail from the perspective of hardware processing.
[0065] Reference Figure 3 This invention also provides a horizontal grid registration and parallel computing device for climate model coupling. This device can be a server, and its internal structure can be as follows: Figure 3 As shown. The horizontal grid registration and parallel computing device coupled with the climate model includes a processor, memory, display screen, input device, network interface, and database connected via a system bus. The processor in this computer design provides computing and control capabilities. The memory of the horizontal grid registration and parallel computing device coupled with the climate model includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the horizontal grid registration and parallel computing device coupled with the climate model stores the corresponding data in this embodiment. The network interface of the horizontal grid registration and parallel computing device coupled with the climate model is used for communication with external terminals via network connection. When the computer program is executed by the processor, it implements the above-described method.
[0066] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the horizontal grid registration and parallel computing device used in the climate model coupling of the present invention.
[0067] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the horizontal grid registration and parallel computing method in the climate model coupling.
[0068] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0069] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a horizontal grid registration and parallel computing device (which may be a personal computer, server, or network device, etc.) coupled to a climate model to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0070] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for horizontal grid registration and parallel computing in climate model coupling, characterized in that, The method includes: The atmospheric model component is registered using a component authentication algorithm to obtain the model component identifier; The horizontal grid geometry parameters are parsed based on the pattern component identifier to obtain a set of basic grid information, including the latitude and longitude coordinate range, the total number of grid cells, and the number of local grid cells. Based on the grid-based information set, a dual-grid construction process is performed to meet the air-sea coupling data exchange requirements, resulting in a masked horizontal grid configuration and an unmasked horizontal grid configuration. Parallel domain decomposition is performed on the masked horizontal grid configuration and the unmasked horizontal grid configuration to obtain the corresponding masked grid parallel decomposition mapping table and the unmasked grid parallel decomposition mapping table. Based on the masked grid parallel decomposition mapping table and the unmasked grid parallel decomposition mapping table, the grid sub-regions of each MPI process are indexed and associated to obtain a bidirectional mapping relationship between the global grid index and the local grid index. Based on the bidirectional mapping relationship, the mode time step parameters are synchronously registered to obtain the time synchronization configuration parameters and the coupling effectiveness verification results.
2. The method for horizontal grid registration and parallel computing in climate model coupling according to claim 1, characterized in that, The registration process for atmospheric model components using a component authentication algorithm, resulting in a model component identifier, includes: The validity of the atmospheric model component is verified to obtain the component type identifier and component version information; The mode resource allocation table is queried based on the component type identifier and component version information to obtain the mode-specific memory space and mode communication port configuration. The mode-specific memory space and mode communication port configuration are entered into the component registration manager for identity binding to obtain a temporary component access token. The component identifier generation rule is hashed based on the temporary component access token to obtain a unique pattern component identifier.
3. The method for horizontal grid registration and parallel computing in climate model coupling according to claim 1, characterized in that, The process of parsing the horizontal grid geometric parameters based on the mode component identifier yields a set of basic grid information, including the latitude and longitude coordinate range, the total number of grid cells, and the number of local grid cells, including: Based on the pattern component identifier, the horizontal grid coordinate system type is identified to obtain the latitude and longitude grid type identifier and the angle coordinate unit identifier; Based on the latitude and longitude grid type identifier and the angular coordinate unit identifier, the global grid boundary conditions are cyclically tested to obtain the longitude cyclic boundary parameters and the latitude range boundary parameters. Input the longitude direction cyclic boundary parameters and latitude direction range boundary parameters into the grid size calculator for statistical processing to obtain the total number of global grid cells and the number of local grid cells allocated by the current MPI process; The total number of global grid cells and the number of local grid cells are mapped to coordinate ranges to obtain a set of basic grid information containing the minimum latitude and longitude values, the maximum latitude and longitude values, and the coordinate array of the grid center point.
4. The method for horizontal grid registration and parallel computing in climate model coupling according to claim 1, characterized in that, The process of constructing a dual grid for ocean-atmosphere coupled data exchange based on the grid-based information set yields a masked horizontal grid configuration and an unmasked horizontal grid configuration, including: The land-sea distribution characteristics in the grid basic information set are identified and processed to obtain the set of valid grid point identifiers for the ocean and the set of invalid grid point identifiers for the land. Based on the set of valid grid point identifiers for the ocean, the atmospheric to ocean data transmission path is constructed and processed to obtain the maskless data transmission grid topology and the corresponding maskless horizontal grid identifier; Based on the set of invalid land grid point identifiers, the ocean-to-atmosphere data reception path is filtered and constructed to obtain the masked data reception grid topology and the land-sea masked filtering matrix. The unmasked horizontal grid identifier and the land-sea masking filter matrix are input into the dual grid configuration generator for encapsulation processing to obtain the masked horizontal grid configuration and the unmasked horizontal grid configuration.
5. The method for horizontal grid registration and parallel computing in climate model coupling according to claim 1, characterized in that, The process of performing parallel domain decomposition on the masked and unmasked horizontal grid configurations to obtain corresponding masked grid parallel decomposition mapping tables and unmasked grid parallel decomposition mapping tables includes: The total number of grid cells in the masked and unmasked horizontal grid configurations is divided by MPI process number balancing to obtain the grid sub-region range and grid sub-region boundary coordinates allocated to each process; The load balancing weight of each MPI process is calculated based on the grid sub-region range and grid sub-region boundary coordinates to obtain the process load weight coefficient and grid distribution density parameter. The process load weight coefficient and grid distribution density parameter are input into the parallel decomposition algorithm for domain decomposition mapping to obtain the masked grid process allocation matrix and the unmasked grid process allocation matrix. The inter-process grid index relationship is established based on the masked grid process allocation matrix and the unmasked grid process allocation matrix, resulting in the masked grid parallel decomposition mapping table and the unmasked grid parallel decomposition mapping table.
6. The method for horizontal grid registration and parallel computing in climate model coupling according to claim 1, characterized in that, The step of indexing and associating the grid sub-regions of each MPI process based on the masked grid parallel decomposition mapping table and the unmasked grid parallel decomposition mapping table to obtain a bidirectional mapping relationship between the global grid index and the local grid index includes: Cross-validation is performed on the process number and grid sub-region range in the masked grid parallel decomposition mapping table and the unmasked grid parallel decomposition mapping table to obtain the inter-process grid overlap region identifier and grid boundary connection node. The local grid cell numbers of each MPI process are sorted based on the inter-process grid overlap region identifier and grid boundary connection node to obtain the local grid cell sequence and local grid coordinate offset. The local grid cell sequence and local grid coordinate offset are input into the global index mapping algorithm for coordinate transformation to obtain the correspondence matrix between the local grid index and the global grid index. The index transformation rules are bidirectionally constructed based on the correspondence matrix to obtain the bidirectional mapping relationship between the global grid index and the local grid index.
7. The method for horizontal grid registration and parallel computing in climate model coupling according to claim 1, characterized in that, The synchronous registration process for the mode time step parameters based on the bidirectional mapping relationship yields time synchronization configuration parameters and coupling effectiveness verification results, including: The time step matching test is performed on the pattern component identifier and grid index association information in the bidirectional mapping relationship to obtain the pattern calculation frequency compatibility identifier and time step difference coefficient. The integration time step of the atmospheric model is synchronized and calibrated based on the model calculation frequency compatibility identifier and time step difference coefficient to obtain the standardized time step value and time synchronization error threshold. The standardized time step value and the time synchronization error threshold are input into the coupled framework time manager for registration processing to obtain the inter-mode data exchange time window and time synchronization configuration parameters. Based on the time synchronization configuration parameters, a comprehensive verification process is performed on the integrity of grid registration and the effectiveness of parallel decomposition to obtain the ready status code of the coupled system and the verification results of coupling effectiveness.
8. A horizontal grid registration and parallel computing system in climate model coupling, characterized in that, A method for implementing horizontal grid registration and parallel computing in climate model coupling as described in any one of claims 1-7, wherein the horizontal grid registration and parallel computing system in climate model coupling comprises: The registration module is used to register atmospheric model components through a component authentication algorithm to obtain model component identifiers; The parsing module is used to parse the horizontal grid geometric parameters according to the mode component identifier, and obtain a set of basic grid information including the latitude and longitude coordinate range, the total number of grid cells and the number of local grid cells; The module is used to perform dual grid construction processing on the air-sea coupled data exchange requirements based on the grid basic information set, to obtain a masked horizontal grid configuration and an unmasked horizontal grid configuration. The decomposition module is used to perform parallel domain decomposition processing on the masked horizontal grid configuration and the unmasked horizontal grid configuration to obtain the corresponding masked grid parallel decomposition mapping table and the unmasked grid parallel decomposition mapping table. The association module is used to perform index association processing on the grid sub-regions of each MPI process based on the masked grid parallel decomposition mapping table and the unmasked grid parallel decomposition mapping table, so as to obtain a bidirectional mapping relationship between the global grid index and the local grid index. The registration module is used to perform synchronous registration of mode time step parameters based on bidirectional mapping relationship, and obtain time synchronization configuration parameters and coupling effectiveness verification results.
9. A horizontal grid registration and parallel computing device for climate model coupling, characterized in that, It includes a memory and a processor, the memory storing a computer program that can run on the processor, and the processor executing the computer program to implement the horizontal grid registration and parallel computing method in climate model coupling as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is run by a processor, it causes the processor to execute the horizontal grid registration and parallel computing method in climate model coupling as described in any one of claims 1 to 7.