A kind of wave current mode coupling communication and interpolation method, device, equipment, medium and product
By creating a unified configuration parameter file and single-point partitioning format processing in wave-current mode coupled communication, the coupling communication and interpolation problems of MaCOM and FVWAM under SCVT grid were solved, achieving efficient communication and accurate interpolation, and meeting the needs of operational forecasting.
Patent Information
- Application Number
- CN202611031011.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-10
- Publication Date
- 2026-11-20
AI Technical Summary
Existing wave-current mode coupling communication and interpolation methods face difficulties in communication and interpolation when using SCVT meshes. Furthermore, the OASIS-MCT tool library has high requirements for the regularity of the input mesh, which has prevented the effective implementation of MaCOM and FVWAM coupling communication and interpolation methods.
A wave-current mode coupling communication and interpolation method is provided. By creating a unified coupling configuration parameter file, each coupling communication domain is initialized under the same communication domain. A single-point partitioning format and one-dimensional processing are used to determine the coupling communication data partition. The coupling communication grid information is output by calling a preset function, thereby realizing efficient coupling communication and interpolation between MaCOM and FVWAM.
It improves communication efficiency, meets the requirements of operational mode, enhances forecast accuracy, and ensures that the mean error before and after interpolation does not exceed 1%.
Smart Images

Figure CN123145159A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wave-current coupling prediction, and in particular to a wave-current mode coupling communication and interpolation method, apparatus, equipment, medium and product. Background Technology
[0002] MPI (Message Passing Interface) is a message passing interface library that supports C and FORTRAN languages. It supports large-scale high-speed communication within and between computing nodes and is widely used in ocean, atmospheric and earth science models. It is also adopted by the MaCOM (MassConservation Ocean Model) and FVWAM (Finite Volume WAve Model) wave models, which are independent ocean circulation numerical models developed by the National Marine Environmental Forecasting Center of China.
[0003] Spherical Centroidal Voronoi Tessellations (SCVT) are unstructured polygonal meshes that offer smooth transitions between different resolutions. They are suitable for detailed numerical simulations of important waterways and key sea areas, and have been successfully applied to the MaCOM current model developed by the National Marine Environmental Forecasting Center of China, the FVWAM (Finite Volume WAve Model) wave model, and the MPAS (Model for Prediction Across Scales) atmospheric model developed by the National Center for Atmospheric Research in the United States. Compared to structured latitude and longitude meshes and unstructured triangular meshes, SCVT exhibits an inconsistent number of edges across the entire field; most meshes are hexagonal, while some have between 5 and 10 edges. This characteristic increases the difficulty of variable communication and interpolation at the mesh center point, edges, and vertices.
[0004] OASIS-MCT (Ocean Atmosphere Sea Ice Soil Coupler-Model Coupling Toolkit) is an open-source toolkit for building couplers for Earth system models, widely used for coupling between climate and ocean models. It provides an MPI-based parallel communication mechanism, supports data interpolation between different grids, and includes various built-in interpolation weight calculation methods. OASIS-MCT achieves data exchange between models by defining "partitions" and "variables." Users need to provide grid information (such as center point latitude and longitude, vertex latitude and longitude, mask, area, etc.) and define interpolation methods, then call the coupler interface functions to complete communication and interpolation. However, OASIS-MCT has certain requirements on the regularity of the input grid (e.g., requiring each grid cell to have the same number of vertices), and its default mask convention (0 represents water points) is inconsistent with commonly used methods in ocean models (e.g., MaCOM and FVWAM, 1 represents water points). Therefore, implementing coupling communication and interpolation based on SCVT unstructured grids and the OASIS-MCT toolkit requires specific handling.
[0005] MaCOM currents and FVWAM waves are operational numerical models independently developed by the National Marine Environmental Forecasting Center of China. To further improve forecast accuracy, coupled wave-current forecasting needs to be developed. However, MaCOM based on the SCVT grid has not yet been officially released, and there is currently no method to achieve coupled communication and interpolation between MaCOM and FVWAM based on the SCVT grid. Summary of the Invention
[0006] The purpose of this application is to provide a wave-current mode coupled communication and interpolation method, apparatus, device, medium and product that can improve communication operation efficiency and forecast accuracy.
[0007] To achieve the above objectives, this application provides the following solution: Firstly, this application provides a wave-current mode coupled communication and interpolation method, including: A unified coupling configuration parameter file is created for MaCOM and FVWAM, and their respective coupling communication domains are initialized under the same communication domain. The configuration parameter file is determined based on user mode requirements. The configuration parameter file includes: the number of variables for coupling communication, coupling runtime, and log output method. The coupled communication data partition of MaCOM and FVWAM is determined; the communication data partition is based on the one-dimensional processing of MaCOM and FVWAM after using irregular SCVT grid and deleting the land part of the horizontal two-dimensional grid, and adopts a single-point partitioning format, and is determined by calling a preset function; Information coupling is performed based on the communication data partition and the coupled communication domains corresponding to MaCOM and FVWAM, and coupled communication grid information is output. Based on the configuration parameter file, determine the coupling communication variables and ranges corresponding to MaCOM and FVWAM respectively; Based on the coupled communication variables, configuration parameter files, and coupled communication grid information, coupled iterative operation of coupled communication and interpolation is performed until MaCOM and FVWAM complete all calculation iterations and the coupled operation ends.
[0008] Secondly, this application provides a wave-mode coupled communication and interpolation device, comprising: The file configuration and initialization module is used to create a unified coupling configuration parameter file for MaCOM and FVWAM, and to initialize their respective coupling communication domains under the same communication domain. The configuration parameter file is determined based on user mode requirements. The configuration parameter file includes: the number of variables for coupling communication, coupling runtime, and log output method. The communication data partitioning module is used to determine the coupled communication data partitions of MaCOM and FVWAM. The communication data partitioning is based on the one-dimensional processing of MaCOM and FVWAM after using irregular SCVT grids and deleting the land portion of the horizontal two-dimensional grid, and adopts a single-point partitioning format, which is determined by calling a preset function. The information coupling module is used to perform information coupling based on the communication data partition and the coupling communication domains corresponding to MaCOM and FVWAM, and output the coupling communication grid information. The coupling communication variable determination module is used to determine the coupling communication variables and ranges corresponding to MaCOM and FVWAM respectively based on the configuration parameter file; The coupling communication and interpolation module is used to perform coupled iterative operation processing of coupling communication and interpolation based on the coupling communication variables, configuration parameter files, and coupling communication grid information, until MaCOM and FVWAM complete all calculation iterations and the coupling operation ends.
[0009] Thirdly, this application provides a computer 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 the above-described wave-mode coupling communication and interpolation method.
[0010] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the aforementioned wave-mode coupling communication and interpolation method.
[0011] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the aforementioned wave-mode coupling communication and interpolation method.
[0012] According to the specific embodiments provided in this application, the following technical effects are disclosed: This application provides a method, apparatus, device, medium, and product for coupled communication and interpolation of wave current models. It creates a unified coupling configuration parameter file for MaCOM and FVWAM, and initializes their respective coupled communication domains under the same communication domain. Based on a single-point grid partitioning format and a one-dimensional grid processing method, it determines the coupled communication data partitions for MaCOM and FVWAM. Information coupling is performed based on the communication data partitions and the corresponding coupled communication domains for MaCOM and FVWAM. The coupled communication variables and ranges for MaCOM and FVWAM are determined based on the configuration parameter file. Based on the coupled communication variables, configuration parameter file, and coupled communication grid information, iterative coupled communication and interpolation processing is performed to achieve efficient coupled data communication and conserved interpolation, meeting the requirements of operational model operation. This application can improve communication efficiency and forecast accuracy. Attached Figure Description
[0013] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0014] Figure 1 A flowchart of wave-current mode coupling communication and interpolation methods; Figure 2 This is a schematic diagram of the coupling communication and interpolation process between MaCOM and FVWAM; Figure 3 A schematic diagram illustrating the process of outputting coupled mesh information; Figure 4 This is a schematic diagram of the statistical results of the mode's runtime; Figure 5 A schematic diagram of the wave-current mode coupled communication and interpolation device; Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0015] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0016] This application supports wave and current model coupling data communication and interpolation based on the SCVT grid, achieving efficient data communication and conservation-based interpolation to meet the requirements of operational model use. This application will be applied to China's operational autonomous ocean current and wave forecasting system, providing technical reference for SCVT grid-based model coupling and supporting China's marine disaster prevention, mitigation, and environmental protection efforts.
[0017] In other words, this application, based on the SCVT grid, achieves coupled communication and interpolation between the MaCOM and FVWAM models, ensuring that communication efficiency and interpolation results meet the requirements of operational forecasting. Specifically, under the same resource configuration, the coupled model achieves over 80% of the efficiency of a standalone model, and the mean error of the forecast results before and after interpolation does not exceed 1%.
[0018] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0019] In one exemplary embodiment, such as Figure 1 As shown, a wave-current mode coupled communication and interpolation method is provided, including: Step 100: Create a unified coupling configuration parameter file for MaCOM and FVWAM, and initialize their respective coupled communication domains under the same communication domain. The configuration parameter file is determined based on user-mode requirements; the configuration parameter file includes: the number of variables for coupled communication, coupled runtime, and log output method.
[0020] This includes initializing their respective coupled communication domains within the same communication domain, including: MaCOM has independent computation processes and I / O processes, and I / O processes need to be excluded when coupling communication; FVWAM does not have independent I / O processes. Specifically, if the number of MaCOM computation processes is m, the number of I / O processes is n, and the number of FVWAM computation processes is k, when coupling, processes with process numbers from 0 to m-1 in the same communication domain are used as MaCOM computation processes, processes with process numbers from m to m+n-1 are used as MaCOM I / O processes, and processes with process numbers from m+n to m+n+k-1 are used as FVWAM processes.
[0021] When the process ID belongs to a MaCOM computing process, it indicates that the process is involved in MaCOM mode coupling.
[0022] When the process ID belongs to the MaCOM I / O process, it indicates that the process does not participate in MaCOM mode coupling.
[0023] When the process ID belongs to the FVWAM computation process, it indicates that the process is involved in FVWAM mode coupling.
[0024] Step 200: Determine the coupled communication data partitions of MaCOM and FVWAM. The communication data partitions are determined by using a single-point partitioning format based on the irregular SCVT grid of MaCOM and FVWAM, after removing the land portion of the horizontal two-dimensional grid and performing one-dimensional processing, and by calling a preset function.
[0025] Step 300: Based on the communication data partition and the corresponding coupled communication domains of MaCOM and FVWAM, perform information coupling and output coupled communication grid information.
[0026] In one embodiment, information coupling is performed based on communication data partitioning and the coupled communication domains corresponding to MaCOM and FVWAM, outputting coupled communication mesh information, including: Initialize the output of coupled mesh information, and read the center point latitude and longitude, vertex latitude and longitude, center point mask and mesh area of all meshes in the communication data partition by calling the interface function of NETCDF, and store them in the corresponding arrays. Based on the coupled communication domains corresponding to MaCOM and FVWAM, call the corresponding write function to write the latitude and longitude of the mesh center point, so as to output the latitude and longitude information of the coupled mesh center point.
[0027] As an optional implementation, FVWAM uses radians to represent the position of the grid center point, converts it to longitude and latitude using a conversion formula, and then calls the corresponding write function to write the longitude and latitude of the grid center point; The conversion formulas include longitude conversion formulas and latitude conversion formulas; the expression corresponding to the longitude conversion formula is: ; ; The expression corresponding to the latitude conversion formula is: ; in, Longitude of the vertex; The latitude is the vertex.
[0028] Set a fixed number of vertices n, traverse all grid vertices, retain the latitude and longitude of the first n vertices for each grid, and output the latitude and longitude information of the coupled grid vertices based on a preset function call; if the number of vertices in a grid is less than n, then use the latitude and longitude of the nearest grid vertex in that grid to fill it, and generate updated vertex longitude and latitude.
[0029] Determine if all grid center points have been traversed; if not, replace the mask values of 1 with 0 and the mask values of 0 with 1 in the center point mask, and write the updated grid mask; if yes, output the coupled grid center point mask based on the read center point mask.
[0030] The corresponding function is called based on the read grid area to output the coupled grid area data.
[0031] MaCOM and FVWAM respectively call the preset coupling function to output the coupling communication grid information based on the latitude and longitude information of the center point of the coupling grid, the latitude and longitude information of the vertices of the coupling grid, the mask of the center point of the coupling grid, and the area data of the coupling grid.
[0032] Step 400: Based on the configuration parameter file, determine the corresponding coupling communication variables and ranges for MaCOM and FVWAM.
[0033] Step 500: Based on the coupled communication variables, configuration parameter file, and coupled communication mesh information, perform coupled iterative processing of coupled communication and interpolation until MaCOM and FVWAM complete all computational iterations, at which point the coupled operation ends. After completing all computational iterations, MaCOM and FVWAM call the oasis_terminate function to terminate the coupled operation.
[0034] In any coupled iteration process, the cumulative time step is obtained. When the cumulative time step is an integer multiple of the coupled running time step, coupled communication and interpolation are performed. To prevent coupled communication deadlock, MaCOM performs coupled data reception first and then coupled data transmission, while FVWAM performs coupled data transmission first and then coupled data reception. The coupled data includes coupled communication variables and coupled communication grid information.
[0035] Specifically, in practical applications, the operational procedures corresponding to the methods mentioned in this application are as follows: Figure 2 As shown.
[0036] Step 1: Create a unified configuration parameter file for MaCOM and FVWAM. This file defines the number of variables for coupled communication (NFIELDS), the coupled runtime (RUNTIME), and the log output method (NLOGPRT). These three variables can be customized according to user-defined requirements.
[0037] The coupling communication variables and interpolation methods are defined in the STRINGS field. The first line of the field specifies the variable name and communication time step; the second line defines the mesh size; the third line defines the mesh type; the fourth line defines the interpolation method; and the fifth line defines the interpolation method configuration. The format can be found in the OASIS-MCT user manual, and the specific values need to be defined according to application requirements, referring to the configurations mentioned in this application.
[0038] Step 2: Initialize the respective coupled communication domains for MaCOM and FVWAM under the same communication domain. Since MaCOM has independent computation and I / O processes, coupled communication requires excluding the I / O processes. For example, the number of computation processes in MaCOM mode is m, the number of I / O processes is n, and the number of processes in FVWAM is k. During coupling, processes with process IDs from 0 to m-1 are designated as MaCOM computation processes, processes with process IDs from m to m+n-1 are designated as MaCOM I / O processes, and processes with process IDs from m+n to m+n+k-1 are designated as FVWAM processes. When a process ID belongs to a MaCOM computation process, `oasis_init_comp(..., 'maco', ..., coupled=.true.)` is called to indicate that the process participates in MaCOM mode coupling; when a process ID belongs to a MaCOM I / O process, `oasis_init_comp(..., 'maco_io', ..., coupled=.false.)` is called to indicate that the process does not participate in MaCOM mode coupling. Since FVWAM does not have an independent I / O process, when the process ID belongs to the FVWAM process, oasis_init_comp(..., 'fvwam', ..., coupled=.true.) is called to indicate that the process participates in FVWAM mode coupling.
[0039] Step 3: Define the coupled communication data partitions for MaCOM and FVWAM respectively. Since MaCOM and FVWAM use irregular SCVT grids and the horizontal two-dimensional grids are reduced to one-dimensionality after removing the land portion, the communication data partitions are defined using a single-point partition format, implemented by calling the function `oasis_def_partition(mct_part_id, mct_part_cell, ...)`. The first element of the one-dimensional array `mct_part_cell` is 4, representing the single-point grid partition format; the second element is the number of grids in the partition; and subsequent elements are the numbers of each grid in the partition. `mct_part_id` is the generated coupled partition ID, and subsequent coupled communication and interpolation are based on this ID.
[0040] Step 4: Outputting the coupled communication mesh information is a core step in the coupling process. This information will be used for subsequent coupling interpolation. The process is as follows: Figure 3 As shown.
[0041] 1: Call the oasis_start_grids_writing function to initialize the output of coupled grid information.
[0042] 2: By calling the NETCDF interface function nf90_get_var, all grid center point latitude and longitude, vertex latitude and longitude, center point mask, and grid area are read and stored in the corresponding arrays mct_lonCell (center point longitude), mct_latCell (center point latitude), mct_lonVert (vertex longitude), mct_latVert (vertex latitude), mct_mask (center point mask), and mct_area (grid area).
[0043] 3: MaCOM calls oasis_write_grid('maco', ..., mct_lonVert, mct_latVert, ...) to write the latitude and longitude of the grid center point. FVWAM uses radians to represent the position of the grid center point, which needs to be converted to latitude and longitude using formulas (1) and (2) before calling oasis_write_grid('fvwa', ..., mct_lonVert, mct_latVert, ...) to write the latitude and longitude of the grid center point.
[0044] .
[0045] (1) (2) 4. Since the number of vertices in each SCVT grid is not fixed, while the interpolation process requires a fixed number of vertices, set a fixed number of vertices n, for example, 5 in MaCOM and FVWAM modes. Traverse all grids, retaining the latitude and longitude of the first n vertices for each grid; if a grid has fewer than n vertices, use the latitude and longitude of the nearest neighboring grid vertex to fill the gap, generating updated vertex longitude mct_lonVert and vertex latitude mct_latVert.
[0046] 5: MaCOM calls oasis_write_corner('maco', ..., mct_lonVert, mct_latVert, ...) to output the latitude and longitude information of the coupled mesh vertices, and FVWAM calls oasis_write_corner('fvwa', ..., mct_lonVert, mct_latVert, ...) to output the latitude and longitude information of the coupled mesh vertices.
[0047] 6: Since the mesh mask for water points in MaCOM and FVWAM is 1, while OASIS-MCT requires the mesh mask for coupling to be 0, both modes need to replace the mask values of 1 in mct_mask with 0, and the mask values of 0 with 1. MaCOM and FVWAM respectively call oasis_write_mask(..., mct_mask, ...) to write the updated mesh mask.
[0048] 7: Based on the read mesh area mct_area, MaCOM calls oasis_write_area('maco', ...,mct_area, ...) to output the coupled mesh area data, and FVWAM calls oasis_write_area('fvwa', ...,mct_area, ...) to output the coupled mesh area data.
[0049] 8: MaCOM and FVWAM respectively call the oasis_terminate_grids_writing function to end the output of coupled grid information.
[0050] Step 5: Define coupling communication variables for MaCOM and FVWAM respectively. Taking MaCOM as an example, call `oasis_def_var(mct_recv_varID, 'FIELD_RECV_MACOM', mct_part_id, OASIS_In, ...)` to define the receive coupling variable. Here, `mct_recv_varID` is the newly defined receive variable ID, `FIELD_RECV_MACOM` is a custom name consistent with the MaCOM coupling communication receive variable name in the `STRINGS` field of Step 1, `mct_part_id` is the partition ID generated in Step 3, and `OASIS_In` indicates that this variable requires MaCOM to perform receive operations. Simultaneously, MaCOM calls `oasis_def_var(mct_send_varID, 'FIELD_SEND_MACOM', mct_part_id, OASIS_Out, ...)` to define the send coupling variable. Here, `mct_send_varID` is the newly defined send variable ID, `FIELD_SEND_MACOM` is a custom name that matches the name of the MaCOM coupled communication send variable in the `STRINGS` field of step one, and `OASIS_Out` indicates that this variable requires MaCOM to perform a send operation. Similarly, FVWAM defines coupled communication variables in the same way.
[0051] Step Six: In each iteration of the calculation, obtain the cumulative time step. When this step is an integer multiple of the coupled communication time step, perform coupled communication and interpolation. To prevent coupled communication deadlock, MaCOM performs coupled data reception first, then coupled data transmission, while FVWAM performs coupled data transmission first, then coupled data reception. Taking MaCOM as an example, coupled data transmission is implemented by calling the function `oasis_put(mct_send_varID, mct_time, mct_send_to_fvwam, ...)`. Here, `mct_send_varID` is the coupled transmission variable ID defined in Step Five, `mct_time` is the cumulative time step, and `mct_send_to_fvwam` is the coupled variable being transmitted. Coupled data reception is implemented by calling `oasis_get(mct_recv_varID, mct_time, mct_recv_from_fvwam, ...)`. Wherein, `mct_recv_varID` is the ID of the coupled received variable defined in step five, and `mct_recv_from_fvwam` is the received coupled variable, which is the interpolated variable. The interpolation method is based on the settings in step one, and the interpolation weight information is generated based on the mesh information output in step four. Similarly, FVWAM implements coupled communication and interpolation using the same function.
[0052] Step 7: After completing all computational iterations, MaCOM and FVWAM call the oasis_terminate function to terminate the coupled operation.
[0053] Initialization method for coupled communication domain of mixed processes: Taking into account the characteristic that MaCOM contains both computation processes and I / O processes, when initializing the coupled communication domain, the I / O process is excluded (set coupled=.false.), and only the computation process is allowed to participate in coupling, which solves the problem of coupler initialization under asymmetric process structure.
[0054] Single-point partitioning and vertex number unification for irregular SCVT meshes: A single-point partitioning format (mct_part_cell with the first element being 4) is used to define the one-dimensional unstructured mesh partitions, adapting to the irregularity of SCVT meshes. To address the issue of inconsistent vertex numbers in SCVT meshes, the vertex information of irregular meshes is normalized by fixing the number of vertices (e.g., 5) and using adjacent vertex filling, thus meeting the requirement of the OASIS-MCT interpolator for a fixed number of vertices.
[0055] Adaptive conversion of mask convention: The mask convention of "1 represents water drop" in MaCOM and FVWAM is converted to "0 represents water drop" required by OASIS-MCT, which ensures that the coupler correctly identifies the valid mesh.
[0056] Asymmetric Coupling Communication Sequence: To prevent deadlock in coupled communication, a communication sequence opposite to that of MaCOM (receive first, then send) and FVWAM (send first, then receive) is designed. This sequence adapts to the different computation timing of the two modes, ensuring the stability of the coupling process.
[0057] MaCOM and FVWAM mode coupled communication and interpolation method: Implemented an independent MaCOM and FVWAM mode coupled communication and interpolation method. The communication efficiency and interpolation conservation meet the requirements of business applications and support the development of disaster prevention and mitigation business.
[0058] Based on the HPC (High Performance Computing) cluster of the National Marine Environmental Forecasting Center of China, the hardware and software environment configuration related to communication testing of this cluster is shown in Table 1.
[0059] Table 1 Hardware and Software Testing Environment Configuration Table
[0060] The MaCOM mode settings are shown in Table 2.
[0061] Table 2 MaCOM Mode Test Settings Table
[0062] The FVWAM mode settings are shown in Table 3.
[0063] Table 3 FVWAM Mode Test Settings Table
[0064] The coupling configuration parameter file namcouple is set as shown in Table 4.
[0065] Table 4. Coupled Configuration Parameter File NamCouple Settings
[0066] The statistical results before and after sea surface height interpolation are shown in Table 5. The mean error ratio is 0.5%, which meets the business application requirements of no more than 1%.
[0067] Table 5. Statistical results before and after sea surface height interpolation.
[0068] The statistical results before and after significant wave height interpolation are shown in Table 6. The mean error ratio is 0.4%, which meets the business application requirement of no more than 1%.
[0069] Table 6 Statistical results before and after significant wave height interpolation
[0070] The calculation of the coupling interpolation average value is shown in formula (3), where These are the data values before and after interpolation. The number of grid cells before and after interpolation. This is the average value across all coupled meshes. For serial number, For the first The data values corresponding to the grid before and after interpolation.
[0071] (3) Interpolation mean error ratio The calculation is shown in formula (4), where This is the average value before interpolation. This is the average value after interpolation.
[0072] (4) Communication time statistics were performed using the `system_clock(clock, rate)` function from the Fortran library, where `clock` is the clock count and `rate` is the clock frequency; both `clock` and `rate` are double-precision integers. For the National Marine Environmental Forecasting Center HPC cluster used in the test, the value of `count_rate` was 10. 6 That is, the clock accuracy reaches 1 microsecond. The time statistics method is shown in formula (5). Indicates the time period for the statistics. This is the start clock count. The end clock count, The number of times for coupled communication or iterative computation.
[0073] (5) Coupled operation efficiency The calculation is shown in formula (6), where The longest time that MaCOM or FVWAM can run alone. This refers to the time of coupled operation.
[0074] (6) Based on the above modes and coupling configurations, the time required to run MaCOM mode, FVWAM mode independently, and MaCOM and FVWAM coupled together is as follows: Figure 4 As shown. Among them, the resource configuration for running MaCOM or FVWAM mode alone is the same as that for running the two modes in combination, that is, MaCOM mode uses 2 computing processes and 2 I / O processes, and FVWAM mode uses 24 processes. According to the calculation of formula (6), the running efficiency after coupling is 98.8% of that before coupling, which meets more than 80% of the requirements of business applications.
[0075] In one exemplary embodiment, such as Figure 5 As shown, a wave-mode coupled communication and interpolation device is provided, comprising: The file configuration and initialization module is used to create a unified coupling configuration parameter file for MaCOM and FVWAM, and to initialize their respective coupling communication domains under the same communication domain. The configuration parameter file is determined based on user mode requirements. The configuration parameter file includes: the number of variables for coupling communication, coupling runtime, and log output method.
[0076] The communication data partitioning module is used to determine the coupled communication data partitions of MaCOM and FVWAM. The communication data partitioning is based on the one-dimensional processing of MaCOM and FVWAM after using irregular SCVT grids and deleting the land portion of the horizontal two-dimensional grid, and adopts a single-point partitioning format, which is determined by calling a preset function.
[0077] The information coupling module is used to perform information coupling based on the communication data partition and the coupling communication domains corresponding to MaCOM and FVWAM, and output the coupling communication grid information.
[0078] The coupling communication variable determination module is used to determine the coupling communication variables and ranges corresponding to MaCOM and FVWAM respectively based on the configuration parameter file.
[0079] The coupling communication and interpolation module is used to perform coupled iterative operation processing of coupling communication and interpolation based on the coupling communication variables, configuration parameter files, and coupling communication grid information, until MaCOM and FVWAM complete all calculation iterations and the coupling operation ends.
[0080] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 6 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores wave-mode coupling communication and interpolation data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements the wave-mode coupling communication and interpolation method.
[0081] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0082] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0083] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0084] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0085] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0086] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0087] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logic devices, etc., and are not limited to these.
[0088] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0089] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A wave-current mode coupled communication and interpolation method, characterized in that, include: Create a unified coupling configuration parameter file for MaCOM and FVWAM, and initialize their respective coupled communication domains under the same communication domain; The configuration parameter file is determined based on user mode requirements; the configuration parameter file includes: the number of variables for coupled communication, the coupled running time, and the log output method; The coupled communication data partition of MaCOM and FVWAM is determined; the communication data partition is based on the one-dimensional processing of MaCOM and FVWAM after using irregular SCVT grid and deleting the land part of the horizontal two-dimensional grid, and adopts a single-point partitioning format, and is determined by calling a preset function; Information coupling is performed based on the communication data partition and the coupled communication domains corresponding to MaCOM and FVWAM, and coupled communication grid information is output. Based on the configuration parameter file, determine the coupling communication variables and ranges corresponding to MaCOM and FVWAM respectively; Based on the coupled communication variables, configuration parameter files, and coupled communication grid information, coupled iterative operation of coupled communication and interpolation is performed until MaCOM and FVWAM complete all calculation iterations and the coupled operation ends.
2. The wave-current mode coupling communication and interpolation method according to claim 1, characterized in that, Initialize their respective coupled communication domains under the same communication domain, including: MaCOM has independent computation processes and I / O processes, and I / O processes need to be excluded when coupling communication; FVWAM does not have independent I / O processes. Specifically, if the number of MaCOM computation processes is m, the number of I / O processes is n, and the number of FVWAM computation processes is k, when coupling, processes with process numbers from 0 to m-1 in the same communication domain are used as MaCOM computation processes, processes with process numbers from m to m+n-1 are used as MaCOM I / O processes, and processes with process numbers from m+n to m+n+k-1 are used as FVWAM processes. When the process ID belongs to a MaCOM computing process, it indicates that the process is involved in MaCOM mode coupling; When the process ID belongs to the MaCOM I / O process, it indicates that the process does not participate in MaCOM mode coupling; When the process ID belongs to the FVWAM computation process, it indicates that the process is involved in FVWAM mode coupling.
3. The wave-current mode coupling communication and interpolation method according to claim 1, characterized in that, Information coupling is performed based on the communication data partitions and the coupled communication domains corresponding to MaCOM and FVWAM, outputting coupled communication mesh information, including: Initialize the output of coupled mesh information, and read the center point latitude and longitude, vertex latitude and longitude, center point mask and mesh area of all meshes in the communication data partition by calling the interface function of NETCDF, and store them in the corresponding arrays. Based on the coupled communication domains corresponding to MaCOM and FVWAM, call the corresponding write function to write the latitude and longitude of the mesh center point, so as to output the latitude and longitude information of the coupled mesh center point. Set a fixed number of vertices n, traverse all grid vertices, retain the latitude and longitude of the first n vertices for each grid, and output the latitude and longitude information of the coupled grid vertices based on a preset function call; if the number of vertices in a grid is less than n, use the latitude and longitude of the nearest grid vertex in that grid to fill it, and generate updated vertex longitude and latitude. Determine if all grid center points have been traversed; if not, replace 1s with 0s and 0s with 1s in the center point mask, and write the updated grid mask; if yes, output the coupled grid center point mask based on the read center point mask. Based on the read grid area, the corresponding function is called to output the coupled grid area data; MaCOM and FVWAM respectively call the preset coupling function to output the coupling communication grid information based on the latitude and longitude information of the center point of the coupling grid, the latitude and longitude information of the vertices of the coupling grid, the mask of the center point of the coupling grid, and the area data of the coupling grid.
4. The wave-current mode coupling communication and interpolation method according to claim 3, characterized in that, FVWAM uses radians to represent the position of the grid center point, converts it to longitude and latitude using a conversion formula, and then calls the corresponding write function to write the longitude and latitude of the grid center point. The conversion formulas include longitude conversion formulas and latitude conversion formulas; the expression corresponding to the longitude conversion formula is: ; ; The expression corresponding to the latitude conversion formula is: ; in, Longitude of the vertex; The latitude is the vertex.
5. The wave-current mode coupling communication and interpolation method according to claim 1, characterized in that, During any coupled iterative process, the cumulative time step is obtained. When the cumulative time step is an integer multiple of the coupled running time step, coupled communication and interpolation are performed. To prevent coupled communication deadlock, MaCOM first performs coupled data reception and then coupled data transmission, while FVWAM first performs coupled data transmission and then coupled data reception. The coupled data includes the coupled communication variables and the coupled communication grid information.
6. A wave-current mode coupled communication and interpolation device, characterized in that, include: The file configuration and initialization module is used to create a unified coupling configuration parameter file for MaCOM and FVWAM, and initialize their respective coupling communication domains under the same communication domain. The configuration parameter file is determined based on user mode requirements; the configuration parameter file includes: the number of variables for coupled communication, the coupled running time, and the log output method; The communication data partitioning module is used to determine the coupled communication data partitions of MaCOM and FVWAM. The communication data partitioning is based on the one-dimensional processing of MaCOM and FVWAM after using irregular SCVT grids and deleting the land portion of the horizontal two-dimensional grid, and adopts a single-point partitioning format, which is determined by calling a preset function. The information coupling module is used to perform information coupling based on the communication data partition and the coupling communication domains corresponding to MaCOM and FVWAM, and output the coupling communication grid information. The coupling communication variable determination module is used to determine the coupling communication variables and ranges corresponding to MaCOM and FVWAM respectively based on the configuration parameter file; The coupling communication and interpolation module is used to perform coupled iterative operation processing of coupling communication and interpolation based on the coupling communication variables, configuration parameter files, and coupling communication grid information, until MaCOM and FVWAM complete all calculation iterations and the coupling operation ends.
7. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the wave-mode coupling communication and interpolation method according to any one of claims 1-5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the wave-mode coupling communication and interpolation method as described in any one of claims 1-5.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the wave-mode coupling communication and interpolation method as described in any one of claims 1-5.
