CN116306122B - Grid computing method, computer and storage medium for ocean numerical mode - Google Patents

Grid computing method, computer and storage medium for ocean numerical mode Download PDF

Info

Publication number
CN116306122B
CN116306122B CN202310206951.3A CN202310206951A CN116306122B CN 116306122 B CN116306122 B CN 116306122B CN 202310206951 A CN202310206951 A CN 202310206951A CN 116306122 B CN116306122 B CN 116306122B
Authority
CN
China
Prior art keywords
grid
ocean
calculation
mode
numerical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310206951.3A
Other languages
Chinese (zh)
Other versions
CN116306122A (en
Inventor
张宇
于福江
原野
逄仁波
高志一
祖子清
高元勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NATIONAL MARINE ENVIRONMENTAL FORECASTING CENTER
Original Assignee
NATIONAL MARINE ENVIRONMENTAL FORECASTING CENTER
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NATIONAL MARINE ENVIRONMENTAL FORECASTING CENTER filed Critical NATIONAL MARINE ENVIRONMENTAL FORECASTING CENTER
Priority to CN202310206951.3A priority Critical patent/CN116306122B/en
Publication of CN116306122A publication Critical patent/CN116306122A/en
Application granted granted Critical
Publication of CN116306122B publication Critical patent/CN116306122B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/23Design optimisation, verification or simulation using finite element methods [FEM] or finite difference methods [FDM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/16Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/10Numerical modelling
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Abstract

The invention discloses a grid computing method, a computer and a storage medium for an ocean numerical mode, which relate to the field of ocean numerical processing, and are used for firstly acquiring matrix representation of a horizontal orthogonal grid in the ocean mode when grid computing is carried out; then, performing dimension reduction coding on the matrix representation of the horizontal orthogonal grid to obtain one-dimensional representation of the horizontal orthogonal grid; performing dimension reduction transformation on the grid two-dimensional absolute coordinates or the grid three-dimensional absolute coordinates in the circulation unit in the ocean mode; and the parallel computing mode in the ocean mode is modified regularly; and finally, carrying out ocean numerical calculation on the target ocean grid based on the one-dimensional representation of the horizontal orthogonal grid, the transformed circulation unit, the transformed parallel calculation mode, the ocean data of the target ocean grid and the auxiliary calculation array. The invention converts the special numerical mode of each grid into the universal numerical mode through the data dimension reduction mode and the auxiliary calculation array, thereby realizing the mode application of the horizontal grids in different forms.

Description

Grid computing method, computer and storage medium for ocean numerical mode
Technical Field
The present invention relates to the field of ocean numerical processing, and in particular, to a grid computing method, a computer, and a storage medium for an ocean numerical model.
Background
In the physical ocean research, the ocean numerical mode is software which is written into a computer to be specifically calculated and executed after the original ocean power equation is subjected to numerical discretization. Through years of development, various horizontal grids are developed for meeting different applicable scenes in a marine mode. Wherein the square generalized horizontal orthogonal grid is the main. However, the two-pole grid in the horizontal orthogonal grid is suitable for the earth hydrodynamic numerical simulation, but has a pole problem which is difficult to solve, so the two-pole grid is commonly used for area numerical calculation application of middle and low latitude; the tripolar point grid is suitable for global ocean numerical simulation, but an atmospheric numerical mode cannot be used, so that the tripolar point grid is not suitable for sea-air coupling application; the sphere cube grid has strong applicability, but the grid form cannot be described in the form of a traditional two-dimensional matrix, the numerical mode needs to be subjected to large-scale adaptive transformation, and the parallel algorithm is complex in design and difficult to apply.
Disclosure of Invention
The invention aims to provide a grid computing method, a computer and a storage medium for ocean numerical modes, which have high applicability.
In order to achieve the above object, the present invention provides the following solutions:
a grid computing method for a marine numerical pattern, comprising:
step 1: acquiring a matrix representation of a horizontal orthogonal grid in a marine mode, wherein the matrix representation comprises a two-dimensional matrix representation and a three-dimensional matrix representation;
step 2: performing dimension reduction coding on the matrix representation of the horizontal orthogonal grid to obtain one-dimensional representation of the horizontal orthogonal grid;
step 3: performing dimension reduction transformation on the grid two-dimensional absolute coordinates or the grid three-dimensional absolute coordinates in the circulation unit in the ocean mode; the dimension reduction transformation comprises the following steps: adopting adjacent azimuth grids of the grids to perform relative position representation on the two-dimensional absolute coordinates or the three-dimensional absolute coordinates of the grids;
step 4: performing rule transformation on parallel computing modes in a marine mode; the rule transformation includes: mesh subdivision mode transformation and data communication transformation;
step 5: performing ocean numerical calculation on ocean data on a target ocean grid based on one-dimensional representation of a horizontal orthogonal grid, a modified circulation unit, a modified parallel calculation mode, and ocean data and an auxiliary calculation array of the target ocean grid; the low-order difference calculation, the high-order difference calculation, the vorticity item calculation and the vorticity advection item calculation in the ocean numerical calculation respectively use different auxiliary calculation arrays; the auxiliary calculation array is used for assisting the calculation of the ocean numerical mode, and the auxiliary calculation array of any target ocean grid comprises the positions of the ocean data of the adjacent azimuth needed by the target ocean grid in the ocean grid.
Optionally, in the dimension reduction coding, the dimension reduction coding is performed by skipping land grids in the ocean.
Optionally, the coding mode of the dimension reduction coding includes coding according to transverse lines and longitudinal lines of the grid, when the grid is a warp-weft grid, the transverse direction is the weft direction, and the longitudinal direction is the warp direction.
Optionally, the auxiliary computing array corresponding to the low-order differential computing is a low-order differential format auxiliary array, and step 5 specifically includes:
when the ocean numerical mode algorithm of the ocean grid is in a low-order differential format, ocean numerical calculation is performed on the ocean data on the ocean grid based on one-dimensional representation of the horizontal orthogonal grid, the transformed circulation unit, the transformed parallel calculation mode, and the ocean data and the low-order differential format auxiliary array of the ocean grid.
Optionally, the auxiliary computing array corresponding to the high-order differential computing is a high-order differential format auxiliary array, and step 5 specifically includes:
when the ocean numerical mode algorithm of the ocean grid is in a high-order differential format, ocean numerical calculation is performed on the ocean data on the ocean grid based on one-dimensional representation of the horizontal orthogonal grid, the transformed circulation unit, the transformed parallel calculation mode, and the ocean data and the high-order differential format auxiliary array of the ocean grid.
Optionally, the auxiliary calculation array corresponding to the vorticity item calculation is a vorticity item auxiliary array, and step 5 specifically includes:
when the marine numerical mode calculation part of the marine grid is a vorticity term, marine numerical calculation is performed on the marine data on the marine grid based on the one-dimensional representation of the horizontal orthogonal grid, the transformed circulation unit, the transformed parallel calculation mode and the marine data and the vorticity term auxiliary array of the marine grid.
Optionally, the auxiliary calculation array corresponding to the vorticity advection item calculation is a vorticity advection item auxiliary array, and step 5 specifically includes:
when the marine numerical mode calculation part of the marine grid is a vorticity advection item, marine numerical calculation is carried out on the marine data on the marine grid based on one-dimensional representation of the horizontal orthogonal grid, the modified circulation unit, the modified parallel calculation mode, and the marine data and the vorticity advection item auxiliary array of the marine grid.
Optionally, the mesh dissection mode is modified to perform mesh dissection in any form in the actual physical space.
The present invention also provides a computer comprising: the system comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the grid computing method for the ocean numerical mode when executing the computer program.
The invention also provides a storage medium, wherein the storage medium stores a computer program, and the processor realizes the grid computing method for the ocean numerical mode when executing the computer program.
According to the specific embodiment provided by the invention, the following technical effects are disclosed: the invention provides a grid computing method, a computer and a storage medium for a marine numerical mode, wherein when grid computing is carried out, matrix representation of a horizontal orthogonal grid in the marine mode is firstly obtained, and the matrix representation comprises two-dimensional matrix representation and three-dimensional matrix representation; then, performing dimension reduction coding on the matrix representation of the horizontal orthogonal grid to obtain one-dimensional representation of the horizontal orthogonal grid; performing dimension reduction transformation on the grid two-dimensional absolute coordinates or the grid three-dimensional absolute coordinates in the circulation unit in the ocean mode; the dimension reduction transformation comprises the following steps: adopting adjacent azimuth grids of the grids to perform relative position representation on the grid two-dimensional absolute coordinates or the grid three-dimensional absolute coordinates; performing rule transformation on parallel computing modes in a marine mode; the rule transformation includes: mesh subdivision mode transformation and data communication transformation; finally, carrying out ocean numerical calculation on the target ocean grid based on one-dimensional representation of the horizontal orthogonal grid, the transformed circulation unit, the transformed parallel calculation mode, the ocean data of the target ocean grid and the auxiliary calculation array; the low-order difference calculation, the high-order difference calculation, the vorticity item calculation and the vorticity advection item calculation in the ocean numerical calculation respectively correspond to different auxiliary calculation arrays; the auxiliary calculation array is used for assisting the calculation of the ocean numerical mode, and the auxiliary calculation array of the target ocean grid comprises the positions of the ocean data of the adjacent directions required by the target ocean grid in the ocean grid. The invention carries out data dimension reduction processing on the existing horizontal orthogonal grid data, unifies the two-dimensional grid coordinates, the three-dimensional grid coordinates and the grid circulation unit data corresponding to the grid coordinates into horizontal one dimension, adopts an auxiliary calculation array, and carries out ocean numerical calculation according to the grid coordinates of the target ocean grid position and the one-dimensional grid marks of the required data. The invention converts the special numerical mode of each grid into the universal numerical mode through the data dimension reduction mode and the auxiliary calculation array, thereby realizing the mode application of horizontal grids in different forms.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the drawings that are needed in the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for calculating a grid of marine numerical patterns according to an embodiment of the present invention;
FIG. 2 is a schematic view of a spherical cube mesh construction in an embodiment of the invention;
FIG. 3 is an expanded view of a spherical cube mesh in an embodiment of the invention;
FIG. 4 is a diagram of a numerical mode C grid-type variable distribution in an embodiment of the present invention;
FIG. 5 is a schematic diagram of a two-dimensional parallel computing subdivision method in an embodiment of the invention;
FIG. 6 is a schematic diagram illustrating conversion from two-dimensional parallel computing subdivision to one-dimensional parallel computing subdivision in an embodiment of the present invention;
FIG. 7 is a diagram of a grid at the interface of faces 0-1, 2-3, and 4-5 of a spherical cube grid in an embodiment of the invention;
FIG. 8 is a schematic diagram of a grid at the junction of faces 1-3, 3-5, 5-1 of a spherical cube grid in an embodiment of the invention;
FIG. 9 is a schematic diagram of defining an array of auxiliary computing arrays such as te, tw, tn, ts in an embodiment of the invention;
FIG. 10 is a schematic diagram of special processing for calculating the vorticity advection terms in an embodiment of the present invention;
FIG. 11 is a schematic diagram of special calculation of vorticity terms in an embodiment of the present invention;
FIG. 12 is a flow chart of a computing scheme in an embodiment of the invention;
FIG. 13 is a graph showing the results of a two-pole warp and weft grid mode operation in accordance with an embodiment of the present invention;
FIG. 14 is a graph of the results of a spherical cube grid mode operation in an embodiment of the present invention;
FIG. 15 is a diagram of a global numerically simulated sea-land distribution in accordance with an embodiment of the present invention;
FIG. 16 is a diagram of a regional numerical simulation sea-land distribution in accordance with an embodiment of the present invention;
FIG. 17 is a diagram of a general numerical mode unstructured grid parallel computing subdivision using a spherical cube grid in an embodiment of the present invention;
fig. 18 is a schematic structural diagram of a computer according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The invention aims to provide a grid computing method, a computer and a storage medium for ocean numerical modes, which have high applicability.
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
As shown in FIG. 1, the present invention provides a grid computing method, computer and storage medium for ocean numerical patterns.
Step 1: a matrix representation of a horizontal orthogonal grid in a marine mode is obtained, the matrix representation comprising a two-dimensional matrix representation and a three-dimensional matrix representation.
Step 2: and performing dimension reduction coding on the matrix representation of the horizontal orthogonal grid to obtain one-dimensional representation of the horizontal orthogonal grid.
Step 3: performing dimension reduction transformation on the grid two-dimensional absolute coordinates or the grid three-dimensional absolute coordinates in the circulation unit in the ocean mode; the dimension reduction transformation comprises the following steps: and adopting adjacent azimuth grids of the grids to perform relative position representation on the two-dimensional absolute coordinates or the three-dimensional absolute coordinates of the grids.
Step 4: performing rule transformation on parallel computing modes in a marine mode; the rule transformation includes: mesh generation mode modification and data communication modification.
Step 5: performing ocean numerical calculation on ocean data on any ocean grid based on one-dimensional representation of the horizontal orthogonal grid, the transformed circulation unit, the transformed parallel calculation mode, the ocean grid, the ocean data and the auxiliary calculation array; the low-order difference calculation, the high-order difference calculation, the vorticity item calculation and the vorticity advection item calculation in the ocean numerical calculation respectively use different auxiliary calculation arrays; the auxiliary calculation array is used for assisting numerical calculation of the ocean mode, and the auxiliary calculation array of any ocean grid comprises positions of the ocean data of adjacent azimuth needed by the ocean grid in the ocean grid.
In some embodiments, ocean modes develop various types of horizontal grids. Taking quadrilateral generalized horizontal orthogonal grid as an example, the two-pole grid is more suitable for the numerical simulation of the geofluid mechanics, and is generally used for the area numerical calculation application of middle and low latitude; the tripolar point grid is suitable for global ocean numerical simulation; the sphere cube grid has strong applicability. Wherein, the two-pole grid and the three-pole grid are generally in the form of a two-dimensional matrix, the dimension of the matrix is (nx, ny) (the number of rows of the matrix is nx and the number of columns is ny, and nx and ny refer to any positive integer); the spherical cube mesh is typically three-dimensional in form, with matrix dimensions (nx, ny, 6).
Specifically, the basic procedure of the two-dimensional matrix form is double circulation, and the three-dimensional matrix form is triple circulation. In addition, the global application requires that the polar coordinates take into account the special treatment of east-west cyclic boundaries, the polar coordinates take into account the special treatment of north-pole symmetric boundaries, and the spherical cube mesh takes into account the special treatment of 12 intersecting sides and 8 vertices (as shown in fig. 2). The physical principles behind the numerical modes of various grids are consistent, but the specific executable numerical mode programs constructed under different grid forms are changeable, so the invention provides a novel grid coding method, and the mode application of various horizontal orthogonal grids can be realized under the same software framework by constructing an addressing array for auxiliary calculation, so that the mode application of different horizontal grids can be realized only by changing the content of grid files without changing the mode main program, and the purpose of improving the universality of the existing ocean numerical mode is achieved.
Thus, to meet different applicable scenarios, the acquired horizontal orthogonal grid in ocean mode may specifically include: the matrix representation of a two-pole grid, a three-pole grid or a spherical cube grid, the matrix representation of a horizontal orthogonal grid comprising a two-dimensional matrix representation and a three-dimensional matrix representation.
In this embodiment, the marine numerical pattern needs to be solved iteratively grid-by-grid point on a fixed grid. The solving method is mainly a numerical discrete method, such as a finite difference method and a finite volume method. To find the vector A by finite difference method x,y Divergence in a two-dimensional planeThe following are examples:
in the middle ofRepresenting the horizontal divergence at any grid point (i, j), a represents any vector having both size and direction, such as ocean current. />And->Representing the partial derivatives of A in the x and y directions, A x As a component of vector a in the x-direction, a y Is the component of vector a in the y direction. />In discrete computational form where the partial derivative of A in x-direction is available to the computer,/for>The partial derivative in the y-direction for a can be used in a discrete form of computation in a computer. δx and δy are the grid distances of the calculation grid in the x-direction and the y-direction, respectively. (i+1), (i-1), (j+1), (j-1) are grid position marks indicating two-dimensional grid positions (i+1, j), respectively,(i-1,j)、(i,j+1)、(i,j-1)。A x(i+1) And A x(i-1) Is A x Specific values at grid points (i+1, j) and (i-1, j). A is that y(j+1) And A y(j-1) Is A y Specific values at grid points (i, j+1) and (i, j-1).
Calculating the partial derivative of the point requires knowledge of the information of the four grid points (i+1, j), (i-1, j), (i, j+1), (i, j-1). Where i generally takes values from 1 to nx and j generally takes values from 1 to ny, where i and j together form a rigid (nx, ny) two-dimensional matrix. For an orthogonal grid, the numbered versions of the four grid points belong to an "absolute position" marker that marks the array. Such absolute position markers are likely to vary, i.e., the grid position markers in the above example formulas are not always in the form of (i+1, j), (i-1, j), (i, j+1), (i, j-1). This uncertainty, which may vary, and the strictly marked two-dimensional matrix form, are sources of the technical drawbacks.
In fact, although the absolute position (i, j) form of the grid may vary, the "relative position" of the grid required for calculation is kept unchanged, i.e. any grid always requires a grid of its four adjacent orientations, "east", "west", "north", "south". According to this feature, the invention constructs an array of 44 auxiliary calculations such as te, tw, tn, ts, ue, uw, un, us, ve, vw, vn, vs, ze, zw, zn, zs to indicate the relative position of the required calculation grid in the memory (fig. 9 and table 1), and specifically, the auxiliary array is used to obtain the position of the adjacent grid where the temperature, salinity, etc. data are stored in the memory. The program only needs to call these arrays when necessary to complete the calculation without considering the absolute position (i, j) form change due to grid change at the back. Table 1 shows the following:
table 1 auxiliary array information summary table
In some embodiments, numerical reconstruction and general grid data file creation are used to change the "absolute position" in the numerical mode that is not determined by the grid morphology to a "relative position" that is not changed.
The first step is to reform the numerical mode, and after the reconstruction, the numerical mode can be changed from the original calculation depending on the absolute position to the calculation depending on the relative position. And the second step is the production of a universal grid data file, namely converting the absolute position information of the grid into the relative position information. After completion, the uncertainty brought by the grid morphology is transferred from the numerical mode 'inside' to the numerical mode 'outside', so that the multi-grid support of the numerical mode is realized. The method comprises the following specific steps:
1. Numerical mode transformation is mainly divided into two parts, namely (1) transformation of a specific calculation circulation unit and (2) transformation of a parallel calculation mode.
The method comprises the following specific steps of performing dimension reduction transformation on grid two-dimensional absolute coordinates or grid three-dimensional absolute coordinates in a circulation unit in a marine mode, and performing relative position representation on the grid two-dimensional absolute coordinates or the grid three-dimensional absolute coordinates by adopting adjacent azimuth grids of the grids:
(1) Grid computing cyclic cell conversion
In the embodiment, the original horizontal two-dimensional or three-dimensional matrix calculation form in the numerical mode is uniformly converted into a horizontal one-dimensional vector calculation form, so that the mode multi-grid flexible support is realized. Since the main calculation form in the numerical mode is to perform loop calculation on a grid point by point, the conversion idea is to unify i=1, nx, j=1, ny, k=1, and ng triple loops into i=1, nl. nl is the effective total grid number only comprising the ocean grid points and the sea-land boundary points, and the structure of the auxiliary calculation array and the original mode calculation process in the subsequent steps are all developed based on a one-dimensional vector form. The complexity of the different computation cycles in numerical patterns and the dependence on the "relative position" of the grid are different, so the cycle cell transitions can be broadly divided into three categories:
[1.1] conversion of general circulation Unit
The two-dimensional absolute coordinates (i+1, j) or the three-dimensional absolute coordinates (i+1, j, k) in the cycle are uniformly transformed into e-series relative coordinates in one-dimensional form, namely te (i), ue (i), ve (i) and ze (i).
The two-dimensional absolute coordinates (i-1, j) or the three-dimensional absolute coordinates (i-1, j, k) in the cycle are uniformly transformed into a w-series relative coordinate grid in a one-dimensional form, namely tw (i), uw (i), vw (i) and zw (i).
The two-dimensional absolute coordinates (i, j-1) or the three-dimensional absolute coordinates (i, j-1, k) in the cycle are uniformly transformed into s-series relative coordinate grids in a one-dimensional form, namely ts (i), us (i), vs (i) and zs (i).
The two-dimensional absolute coordinates (i, j+1) or the three-dimensional absolute coordinates (i, j+1, k) in the cycle are uniformly transformed into n series of relative coordinate grids in a one-dimensional form, namely tn (i), un (i), vn (i) and zn (i).
The two-dimensional absolute coordinates (i+2, j) or the three-dimensional absolute coordinates (i+2, j, k) in the cycle are uniformly transformed into te2 (i), (i-2, j) or (i-2, j, k) in one-dimensional form, tw2 (i), (i, j-2) or (i, j-2, k) in one-dimensional form, ts2 (i), (i, j+2) or (i, j+2, k) in one-dimensional form, and tn2 (i) in one-dimensional form.
[1.2] conversion of the vorticity advection term calculation circulation unit
In the numerical mode, there is a class of vorticity advection calculation, and the product of an orthogonal vector and absolute vorticity at the position of a vector point needs to be calculated.
( For example: for the vorticity advection uCorter of the vector component u, zeta v at the w position is required to be calculated; for the vorticity advection vCorter of the vector component v, ζu at the s-position needs to be calculated. As shown in fig. 9, since u, v, and ζ are not in the same position, calculation of ζv and ζu requires taking a multipoint average. )
As shown in fig. 9, the sign of the embodiment of the present invention takes the absolute sign of the vorticity ζ used in the original calculation of uconterm as an example in two dimensions: ζ (i-1, j-1), ζ (i, j+1), ζ (i+1, j+1), ζ (i-1, j), ζ (i, j), ζ (i+1, j) are converted into auz1 (i), auz2 (i), auz3 (i), auz4 (i), auz5 (i), auz6 (i).
The vector v used is converted into the absolute labels v (i-1, j+1), v (i-1, j), v (i, j) into au1 (i), au2 (i), au3 (i), au4 (i).
Similarly, the absolute labels ζ (i, j+1), ζ (i, j-1), ζ (i+1, j+1), ζ (i+1, j-1) were converted into avz1 (i), avz2 (i), avz3 (i), avz4 (i), avz5 (i), avz6 (i) for the vorticity ζ originally calculated for vCorter.
The vectors u used are converted into absolute labels u (i, j), u (i, j-1), u (i+1, j-1) into av1 (i), av2 (i), av3 (i), av4 (i).
[1.3] conversion of the vorticity calculation cycle unit. For the calculation of the loop integral expression in the numerical mode, as shown in fig. 11, the vector u absolute flags u (i, j), u (i, j-1) are converted into z1 (i), z3 (i); the vector v absolute flags v (i, j), v (i-1, j) are converted to z2 (i), z4 (i).
(2) And (5) modifying a parallel computing mode. After the improvement step, the numerical mode is converted from a two-dimensional calculation mode to a more general one-dimensional calculation mode, and the original two-dimensional-based parallel calculation subdivision method also needs to be converted into one-dimensional parallel calculation subdivision.
The parallel computation of the numerical mode can be divided into two main parts, wherein the first part is mesh subdivision, namely the whole simulation area is divided into a plurality of small areas, so that the small areas can be respectively delivered to different computation cores for computation; the second part is data communication, and data exchange among small areas in the numerical mode operation process is realized by utilizing various parallel computing communication models (single-side, double-side, asynchronous, synchronous and the like). Thus, the retrofit needs to be deployed for both parts as well.
[2.1] mesh subdivision scheme transition
As shown in fig. 5, the conventional two-dimensional encoded horizontal grid system is limited to two-dimensional form, and a regular rectangular form must be maintained, so that the corresponding subdivision method needs to ensure that each calculation sub-area is still in the regular rectangular form. After the grid is converted into one dimension according to the method of the patent, the grid system does not need to keep a regular rectangular shape, but can appear in any shape in the actual physical space, and the corresponding grid subdivision can also appear in any shape (fig. 6). The dimension reduction method comprises the following steps: according to the matrix representation of the horizontal orthogonal grid obtained as shown in fig. 5, the two-dimensional matrix representation is subjected to dimension reduction, and the one-dimensional representation of the horizontal orthogonal grid after dimension reduction is shown in fig. 6. The old code (1, 1) is marked as new code 1; the old code (2, 1) is marked as new code 2; and so on old codes (1, 2) may be marked as new codes (nx+1).
[2.2] modification of the data information exchange procedure between processes in the mode.
In the conventional two-dimensional parallel subdivision scheme, as shown in fig. 5, the subdivision form is a regular rectangle, at this time, the number of adjacent calculation sub-regions of each calculation sub-region is fixed, and the length of the adjacent boundary is also fixed. The calculation subareas marked by the oblique lines are only connected with the calculation subareas marked by the dot matrix grids and the calculation subareas marked by the broken lines, and the calculation subareas marked by the oblique brick-like grids are only connected with the calculation subareas marked by the dot matrix grids and the calculation subareas marked by the broken lines. All the calculation subareas are adjacent to each other, and the boundary lengths between the subareas in the same direction are the same, for example, the boundary lengths between the oblique line grids and the dot matrix grids are the same as the boundary lengths between the broken line grids and the oblique brick-like grids in the transverse direction. After the transformation into the irregular arbitrary subdivision, as shown in fig. 6, the number of adjacent calculation subregions of each calculation subregion is not fixed any more, and the number of calculation subregions marked by the lattice grid is two (the diagonal brick-shaped grid and the diagonal grid), but the number of calculation subregions marked by the diagonal grid is three (the diagonal brick-shaped grid, the dotted grid and the lattice grid). Secondly the boundary length between the computation sub-areas is no longer fixed and non-computation grids in grid space (land areas represented by grey shading) can be excluded from the computation sequence.
Therefore, the conventional two-dimensional parallel subdivision scheme mostly adopts a simple point-to-point or edge-to-edge receiving-transmitting communication model. For parallel computational grids employing one-dimensional irregular partitioning, an improvement to a more advanced global graph topology communication model is needed to accommodate data communication between irregular complex boundary sub-regions. The realization method is that the original simple communication model in the numerical mode is replaced by the advanced MPI function library, the advanced function library can automatically establish a complex communication topological structure among calculation areas according to the interdependence relation among grids, automatically calculate the number of adjacent calculation subareas and the number of boundary grids, and realize parallel data communication according to the mode designated (synchronous, asynchronous and the like).
In marine mode, the general two-dimensional parallel computing scheme causes serious computational efficiency degradation due to the inability to avoid land grid points. After the patent idea is converted into a one-dimensional calculation mode, the calculation mode is more flexible, and the parallel segmentation can also be more flexible to avoid land grid points (see irregular black grid lines in fig. 17 and fig. 6).
2. Universal grid data file production
In order to realize that the uncertainty grid is placed outside the numerical mode and is processed into a deterministic grid, the 'absolute position' grid which is complicated and changeable due to different grids in the mode calculation process is converted into a uniform and invariable 'relative position' grid through an 'auxiliary calculation array'.
According to the calculation mode of the current numerical mode, 44 auxiliary calculation arrays such as tw, te, ts and the like are set to meet the demands of most numerical modes.
Wherein tw, te, ts, tn, zw, ze, zs, zn, uw, ue, us, un, vw, ve, vs, vn is responsible for assisting the calculation of the numerical mode low-order differential format. tw2, te2, ts2, tn2 are responsible for assisting the calculation of the numerical mode high order differential format. z1, z2, z3, z4 are responsible for assisting numerical mode vorticity term calculation. au1, au2, au3, au4, auz1, auz2, auz3, auz4, auz5, auz6, av1, av2, av3, av4, avz1, avz2, avz3, avz4, avz, avz6 are responsible for assisting numerical mode vorticity advection term calculations.
According to general characteristics of the generalized orthogonal grid, the construction of the auxiliary array can be divided into three steps of array dimension reduction, general condition processing and special condition processing, and the method concretely comprises the following steps:
(1) Array dimension reduction
The array dimension reduction is to perform dimension reduction coding on matrix representation of a horizontal orthogonal grid to obtain one-dimensional representation of the horizontal orthogonal grid, and the specific method can be as follows:
as shown in fig. 5, the two-dimensional matrix representation is reduced according to the acquired matrix representation of the horizontal orthogonal grid, and the one-dimensional representation of the horizontal orthogonal grid after the dimension reduction is shown in fig. 6. If the original two-dimensional grid size is (nx, ny), the reduced-dimension grid size is (nl), where nl is the number of the original grid total number nx×ny obtained by removing non-calculation grid points such as land points, and generally, nl < nx×ny.
As shown in fig. 6, the dimension reduction method is row-wise padding, i.e., the old code (1, 1) is marked as the new code 1; the old code (2, 1) is marked as new code 2; and so on old codes (1, 2) may be marked as new codes (nx+1). If there are land locations that do not require computation, skip non-coding. For example, the old code (2, 1) is a land point, the code is skipped and the tag (3, 1) is the new code 2. Or filled in columns, i.e. the old code (1, 1) is marked as the new code 1; the old code (1, 2) is marked as new code 2; and so on the old code (2, 1) may be marked as the new code (ny+1). If there are land locations that do not require computation, skip non-coding. For example, the old code (1, 2) is a land point, the code is skipped and the mark (1, 3) is the new code 2.
The mapping relation array between the original arbitrary grid code and the new one-dimensional grid code can be generated according to the dimension reduction method. The array can be used for converting other grid information, such as grid position coordinates and grid geographic information, from an original grid to a new grid, and can also be used for preparing numerical mode calculation data.
After dimension reduction, all pattern variables, including the primary auxiliary computation array, are converted into a unified one-dimensional form in the horizontal grid dimension, and the grid itself has one-dimensional codes from 1 to nl. The auxiliary array constructed in the subsequent step provides the position of the needed information in the memory for the mode, and the position information is the one-dimensional code after the original grid is subjected to dimension reduction, namely the step provides the content for the establishment of the auxiliary array in the subsequent step.
(2) General case of auxiliary array generation
In general, the construction of the auxiliary array is relatively simple, and for any grid absolute position with (i, j) attribute, the one-dimensional code of the (i-1, j) position is the value of tw. For example, if the one-dimensional code of the original two-dimensional grid (5, 5) is 20 and the one-dimensional code of the western grid (4, 5) is 19, the auxiliary calculation array tw for the original two-dimensional grid (5, 5) is tw (20) under the new calculation system, and the value is 19. The one-dimensional code is obtained by the dimension reduction of the array in the last step (2.1).
For a position encoded as x under the new one-dimensional computing system, the corresponding original two-dimensional grid position is (i, j). tw (x), uw (x), vw (x) and zw (x) have the same value and are all one-dimensional codes of the positions (i-1, j) on the west side of the x position; the values of te (x), ue (x), ve (x) and ze (x) are the same, and are all one-dimensional codes of the east (i+1, j) position of the x position; tn (x), un (x), vn (x) and zn (x) have the same value and are all one-dimensional codes of the north (i, j+1) position of the x position; ts (x), us (x), vs (x) and zs (x) have the same value and are all one-dimensional codes of the position on the south side (i, j-1) of the x position (see fig. 9 and table 2).
z1 (x, 1), z2 (x, 1), z3 (x, 1), z4 (x, 1) take the one-dimensional grid codes of the original two-dimensional grids (i, j), (i, j), (i, j-1), (i-1, j), respectively (see fig. 11). Here, the total size of z1, z2, z3, z4 is (nl, 3). Wherein the second dimension is a vector label, 1 label vector u,2 label vector v. Thus, although z1 (x, 1), z2 (x, 1) has the same one-dimensional trellis code (i, j), its vector labels are different. In general, z1 (x, 2), z2 (x, 2), z3 (x, 2), and z4 (x, 2) take values of 1, 2, 1, and 2, respectively. The third dimension is a vector direction marker, and if the grid indicated by z1, z2, z3, z4 and grid x have the same local coordinate direction, the value is 1, and if the directions are opposite, the value is-1. In general, only one coordinate direction exists in the grid, so that the third dimension can be 1.
Table 2 array values of au and av coefficients
Wherein, au1, au2, au3, au4 take 2 in the second dimension and 1 in the third dimension. av1, av2, av3, av4 are each 1 in the second dimension and 1 in the third dimension.
(3) Special cases to assist in array generation
Essentially all grids, in particular horizontal grids that can be used for global numerical modeling, have special cases that cannot be described in general terms. The following is an example of a spherical cube grid, illustrating a special case of processing scheme.
From the description of the background and the drawbacks of the background, it can be seen in connection with fig. 2 and 3 that a spherical cube mesh requires special treatment at 12 sides and 8 vertices where six faces adjoin. As can be seen from FIG. 3, 6 of the 12 sides need to be treated by special sides, respectively boundaries 0-2, 2-4, 4-0, 1-3, 3-5, 5-1, and the remaining 6 sides are boundaries 0-1, 1-2, 2-3, 3-4, 4-5, 5-0, which can be treated by general sides. The 8 vertices are formed by intersecting three adjacent surfaces, and 012, 234, 450, 123, 345, 501, 024, 135 are marked by intersecting surfaces. As can be seen from fig. 4, in the numerical mode C-type grid variable distribution, the center position (C point) is located at the center of the grid, and the z point (vorticity point) is located at the lower left corner of the grid, which results in that the number of C points and the number of z points are inconsistent under the spherical cube grid. The number of z points will be two more than the number of C points, the first additional z point being vertex 024 and the second additional z point being vertex 135.
The notation 1:nx below represents 1, 2, 3, 4 … nx-2, nx-1, nx. And nx is 1, wherein nx, nx-1, nx-2 …, 3, 2 and 1 are represented.
Special treatment-treatment, treatment of general edge. Take 0-1, 2-3, 4-5 as examples (as shown in FIG. 7). Assuming that the code x is located in a boundary grid, such as (nx, 1:ny) of face 0, its east grid (te, ue, ve, ze) is not the general case (nx+1, 1:ny) but (1, 1:ny) of face 1. Similarly, if x is located at (1, 1:ny) of face 1, then its west grid (tw, uw, vw, zw) is not (0, 1:ny), but is (nx, 1:ny) of face 0. The processing of sides 2-3 and 4-5 is the same.
Special treatment two, treatment of special edge. Take 1-3 as an example (as shown in fig. 8).
For the auxiliary array indicating the C position, assuming that the code x is located in a boundary grid, such as (nx, 1: ny) of face 1, its east grid te is (nx: 1, 1) of face 3. Similarly, if x is at (1:nx, 1) of face 5, then its south grid ts is at (nx, ny: 1) of face 3.
For the auxiliary array indicating w position, assuming that the code x is located in a boundary grid, such as (nx, 1: ny) of the plane 1, the east side grid ue is (nx: 1, 1) of the plane 3, and the vector mark of the second dimension needs to be changed from 1 to 2 in general. If x is located at (2: nx, 1) of face 5, its south grid us is (nx, ny: 2) of face 3, and the vector direction flag needs to be changed from 1 to 2, and the vector direction flag of the third dimension needs to be changed from 1 to-1 in general.
For the auxiliary array indicating s position, assuming that the code x is located in a boundary grid, such as (nx, 2: ny) of the plane 1, the eastern grid ve is (nx: 2, 1) of the plane 3, and the vector direction flag of the second dimension needs to be changed from 2 of the general case to 1, and the vector direction flag of the third dimension needs to be changed from 1 of the general case to-1. If x is located at (1:nx, 1) of face 5, its south grid us is at (nx, ny: 1) of face 3, and the second dimension vector label needs to be changed from 2 to 1.
For the auxiliary array indicating z-position, assuming that the code x is located in a boundary grid, such as (nx, 2: ny) of face 1, its east grid ze is (nx: 2, 1) of face 3, and if x is located in (2: nx, 1) of face 5, its south grid zs is (nx, ny: 2) of face 3.
Special treatment three, special treatment of vertex. As shown in the right-hand graph of FIG. 11, the perimeter grid typically provides four vector points when calculating vorticity points, but the perimeter grid provides only three vector points at the vertex location. Therefore, z4 is specially processed in the vertex mesh, and z4 (nx, 1) and z4 (nx, 2) are set to be the same as z1 (nx, 1) and z1 (nx, 2), but z4 (nx, 3) is set to be 0. Thus, when the actual auxiliary mode works, z4 is reduced to 0 no matter what is indicated, so that the numerical calculation is not affected. z1, z2, z3 then indicate three vector points as normal.
In some embodiments, based on the one-dimensional representation of the horizontal orthogonal grid, the transformed cyclic unit, the transformed parallel computing mode, and the ocean data and auxiliary computing arrays of the ocean grid, the ocean numerical computation is performed on the ocean data on any ocean grid, and the specific method may be as follows:
a. and reading in a universal grid file (auxiliary array), and declaring a certain number of variables in the memory in advance for subsequent calculation according to specific dimension information provided by the file.
b. The reduced dimension calculation data (one-dimensional representation of the horizontal orthogonal grid) is read in to initialize and populate the variables of the a declaration. Since the variables generated by a are declared according to the grid form, only the data which is reduced in dimension according to the grid form can be correctly read into and distributed to the variables declared by a to participate in subsequent calculation.
c. The parallel computing is initialized, and computing resources are distributed in an irregular form to perform computing according to a modified parallel computing mode.
d. And calculating a numerical mode. The numerical mode calculation comprises general low-order calculation, high-order calculation, vorticity advection calculation, vorticity calculation and other algorithms.
When the ocean numerical mode of the ocean grid is in a low-order differential format, ocean numerical calculation is performed on the ocean data on the ocean grid based on one-dimensional representation of the horizontal orthogonal grid, the transformed circulation unit, the transformed parallel calculation mode, and the ocean data and the low-order differential format auxiliary array of the ocean grid.
When the ocean numerical mode of the ocean grid is in a high-order differential format, ocean numerical calculation is performed on the ocean data on the ocean grid based on one-dimensional representation of the horizontal orthogonal grid, the transformed circulation unit, the transformed parallel calculation mode, and the ocean data and the high-order differential format auxiliary array of the ocean grid.
When the ocean numerical mode of the ocean grid is the vorticity term, ocean numerical calculation is performed on the ocean data on the ocean grid based on the one-dimensional representation of the horizontal orthogonal grid, the transformed circulation unit, the transformed parallel calculation mode and the ocean data and the vorticity term auxiliary array of the ocean grid.
When the ocean numerical mode of the ocean grid is the vorticity advection term, ocean numerical calculation is carried out on the ocean data on the ocean grid based on one-dimensional representation of the horizontal orthogonal grid, the transformed circulation unit, the transformed parallel calculation mode and the ocean data and the vorticity advection term auxiliary array of the ocean grid.
The ocean numerical calculation refers to a process of calculating specific values of various physical states of the ocean, such as a process of calculating future ocean temperature and ocean salinity.
Low-order difference calculation scheme example, calculate the divergence on the two-dimensional plane (second-order scheme):
High-order differential calculation scheme example, three-order advection scheme along x-direction:
compared with the low-order scheme (second order or first order), the high-order scheme can adopt more grid point information, and has higher calculation accuracy, but the algorithm is more complex, and the calculation amount is larger. In the example scheme, the second-order scheme uses only two points (i+1, j) and (i-1, j) in the x-direction (some schemes use three points including (i, j)), and the third-order scheme uses ocean data at four points (i-2, j), (i-1, j), (i, j), (i+1, j).
In the calculation process, the mode can continuously call various numerical algorithms to process the calculation data point by point according to the grid arrangement, and different grid points except the grid point can be used for processing each grid point, and the auxiliary array indicates the positions of the needed other grid points in the memory for the algorithm at the moment so as to be accurately called by the algorithm.
For example: when the windward format differential value of any point x is calculated (a general low-order algorithm), the information of the west point y of the point x is needed, the auxiliary array tw provides the position of the y point in the memory for the mode, and the mode can extract the calculation related data of the y point in the memory according to the information for calculating the windward format differential value of the point x.
When calculating the vorticity advection terms of any point x, the auxiliary calculation arrays au1, au2, au3, au4, auz1, auz2, auz3, auz4, auz5, auz6, av1, av2, av3, av4, avz1, avz2, avz3, avz, avz5, avz6 provide the position information of 20 grid points in the memory required for calculating the vorticity advection terms, and the mode will complete the calculation by retrieving the data used for calculation from the corresponding positions according to the information. The other algorithms use the auxiliary arrays in the same way.
e. After all the calculations are completed, the numerical mode will output the calculation results for later analysis.
In some embodiments, where both land and sea are present in the actual marine numerical simulation, if the marine pattern calculation program uses a regular two-dimensional matrix to store an array of physical quantities, land grid points are inevitably included to keep the two-dimensional matrix in order. If the numerical simulation product in the form of FIG. 14 is manufactured by adopting a spherical cube grid operation mode, the physical quantity is inevitably stored in a two-dimensional matrix form in the calculation process when the technology of the scheme is not used, as shown in FIG. 15, and the occupation of land sites can reach 30% of the occupation of the whole resources; if the numerical simulation product is manufactured in the form of fig. 16 by adopting the two-pole grid operation mode, the calculation process inevitably reaches 36% of the whole resource occupation as shown in fig. 17 when the technology of the scheme is not used, and the calculation resource waste is generated.
In some embodiments, as shown in fig. 12, the numerical mode transformation and the horizontal grid production in the scheme flow can further enable the traditional orthogonal grid numerical mode to flexibly use the unstructured parallel computing subdivision method, so that a more efficient parallel computing mode can be adopted in the numerical mode operation step. The conventional two-dimensional matrix calculation method causes that parallel subdivision must also be in a neat two-dimensional form, such as black cross grid lines in fig. 15 and 16, so that more efficient and balanced unstructured parallel division cannot be realized. The two-dimensional subdivision also causes a large number of land sites which do not need to be calculated in some calculation blocks, and all the calculation blocks are ocean points which need to be calculated, so that serious parallel calculation load imbalance is caused. After the scheme is used, the numerical mode can develop parallel computation in a non-structural parallel subdivision mode (see figure 17).
In addition, the unstructured parallel subdivision can further improve the parallel computing efficiency of the orthogonal grid numerical mode, no matter what type of grid is specifically used during mode operation, the grid number on the computing process is basically consistent, and the maximum load imbalance rate among processes is lower than 0.1%. And part of communication boundaries can be arranged at land or island boundaries, so that communication overhead is effectively reduced, and parallel computing efficiency is improved. After the scheme of the patent is improved, the numerical simulation example using the spherical cube grid with the horizontal resolution of 1/12 DEG can achieve the parallel acceleration efficiency of the highest 14000 core, and compared with the traditional mode without the patent, the efficiency is doubled.
The present application also provides a computer comprising: the system comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the grid computing method for the ocean numerical mode when executing the computer program.
Referring to fig. 18, fig. 18 is a schematic structural diagram of a computer according to the present application. As shown in fig. 18, the computer device 1000 may include: processor 1001, network interface 1004, and memory 1005, in addition, computer device 1000 may further comprise: a user interface 1003, and at least one communication bus 1002. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display (Display), a keyboard (keypad), and the optional user interface 1003 may further include a standard wired interface, a wireless interface, among others. Network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., a WIFI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 1005 may also optionally be at least one storage device located remotely from the processor 1001. As shown in fig. 18, an operating system, a network communication module, a user interface module, and a device control application program may be included in a memory 1005, which is one type of computer storage medium.
In the computer device 1000 shown in fig. 18, the network interface 1004 may provide network communication functions; while user interface 1003 is primarily used as an interface for providing input to a user; the processor 1001 may be configured to invoke the device control application stored in the memory 1005 to implement the grid computing method for the ocean numerical mode according to the above embodiment, which will not be described herein.
The present invention also provides a computer readable storage medium storing a computer program adapted to be loaded by a processor and to execute the grid computing method for ocean numerical mode according to the above embodiment, which will not be described in detail herein.
The above-described program may be deployed to be executed on one computer device or on multiple computer devices that are deployed at one site or on multiple computer devices that are distributed across multiple sites and interconnected by a communication network, and the multiple computer devices that are distributed across multiple sites and interconnected by a communication network may constitute a blockchain network.
The computer readable storage medium may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. The computer readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart card (SMC), a Secure Digital (SD) card, a flash memory card (flashcard), etc. which are provided on the computer device. Further, the computer-readable storage medium may also include both internal storage units and external storage devices of the computer device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
In summary, the invention has the following advantages:
1) The invention discards the construction of the numerical mode by using the method of the absolute position with uncertainty, and instead constructs the numerical mode by using the simple and visual mode of the relative position, thereby greatly improving the universality and the maintainability of the numerical mode.
2) The application difficulty of complex horizontal orthogonal grids such as spherical cube grids in the ocean numerical mode is simplified, a complex grid processing program is moved from the numerical mode to the outside of the numerical mode, and the maintainability of the numerical mode is improved.
3) The invention expands the available range of the ocean numerical mode to the horizontal grid, and not only the spherical cube grid, the longitude and latitude grid, the tripolar grid and the generalized orthogonal coordinate grid can be directly applied without modifying the mode code.
4) The invention can completely eliminate or freely reserve land sites like an unstructured grid mode by adopting the ocean mode of the orthogonal coordinate structured grid, reduces the occupation of invalid computing resources, improves the parallel computing efficiency and is beneficial to developing GPU (graphic processing unit) acceleration computing.
In the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, and identical and similar parts between the embodiments are all enough to refer to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
The principles and embodiments of the present invention have been described herein with reference to specific examples, the description of which is intended only to assist in understanding the methods of the present invention and the core ideas thereof; also, it is within the scope of the present invention to be modified by those of ordinary skill in the art in light of the present teachings. In view of the foregoing, this description should not be construed as limiting the invention.

Claims (8)

1. A grid computing method for a marine numerical pattern, comprising:
step 1: acquiring a matrix representation of a horizontal orthogonal grid in a marine mode, wherein the matrix representation comprises a two-dimensional matrix representation and a three-dimensional matrix representation;
step 2: performing dimension reduction coding on the matrix representation of the horizontal orthogonal grid to obtain one-dimensional representation of the horizontal orthogonal grid;
step 3: performing dimension reduction transformation on the grid two-dimensional absolute coordinates or the grid three-dimensional absolute coordinates in the circulation unit in the ocean mode; the dimension reduction transformation comprises the following steps: adopting adjacent azimuth grids of the grids to perform relative position representation on the two-dimensional absolute coordinates or the three-dimensional absolute coordinates of the grids;
step 4: performing rule transformation on parallel computing modes in a marine mode; the rule transformation includes: mesh subdivision mode transformation and data communication transformation;
Step 5: performing ocean numerical calculation on ocean data on a target ocean grid based on one-dimensional representation of a horizontal orthogonal grid, a modified circulation unit, a modified parallel calculation mode, and ocean data and an auxiliary calculation array of the target ocean grid; the low-order difference calculation, the high-order difference calculation, the vorticity item calculation and the vorticity advection item calculation in the ocean numerical calculation respectively use different auxiliary calculation arrays; the auxiliary calculation array is used for assisting the calculation of the ocean numerical mode, and the auxiliary calculation array of any target ocean grid comprises the positions of the ocean data of adjacent azimuth needed by the target ocean grid in the ocean grid;
in the dimension reduction coding, skipping land grid in the ocean to carry out dimension reduction coding;
the coding mode of the dimension reduction coding comprises coding according to transverse lines and longitudinal lines of the grid, and when the grid is a warp-weft grid, the transverse direction is the weft direction, and the longitudinal direction is the warp direction.
2. The computing method according to claim 1, wherein the auxiliary computing array corresponding to the low-order differential computing is a low-order differential format auxiliary array, and step 5 specifically includes:
When the ocean numerical mode algorithm of the ocean grid is in a low-order differential format, ocean numerical calculation is performed on the ocean data on the ocean grid based on one-dimensional representation of the horizontal orthogonal grid, the transformed circulation unit, the transformed parallel calculation mode, and the ocean data and the low-order differential format auxiliary array of the ocean grid.
3. The computing method according to claim 1, wherein the auxiliary computing array corresponding to the high-order differential computing is a high-order differential format auxiliary array, and step 5 specifically includes:
when the ocean numerical mode algorithm of the ocean grid is in a high-order differential format, ocean numerical calculation is performed on the ocean data on the ocean grid based on one-dimensional representation of the horizontal orthogonal grid, the transformed circulation unit, the transformed parallel calculation mode, and the ocean data and the high-order differential format auxiliary array of the ocean grid.
4. The method according to claim 1, wherein the auxiliary computing array corresponding to the vorticity item computation is a vorticity item auxiliary array, and step 5 specifically includes:
when the marine numerical mode calculation part of the marine grid is a vorticity term, marine numerical calculation is performed on the marine data on the marine grid based on the one-dimensional representation of the horizontal orthogonal grid, the transformed circulation unit, the transformed parallel calculation mode and the marine data and the vorticity term auxiliary array of the marine grid.
5. The computing method according to claim 1, wherein the auxiliary computing array corresponding to the vorticity advection item computation is a vorticity advection item auxiliary array, and step 5 specifically includes:
when the marine numerical mode calculation part of the marine grid is a vorticity advection item, marine numerical calculation is carried out on the marine data on the marine grid based on one-dimensional representation of the horizontal orthogonal grid, the modified circulation unit, the modified parallel calculation mode, and the marine data and the vorticity advection item auxiliary array of the marine grid.
6. The computing method of claim 1, wherein the meshing is adapted to mesh in any form in real physical space.
7. A computer, comprising: a memory and a processor, the memory having stored therein a computer program, the processor, when executing the computer program, implementing the method of any of claims 1-6.
8. A storage medium having stored therein a computer program which, when executed by a processor, implements the method of any of claims 1-6.
CN202310206951.3A 2023-03-07 2023-03-07 Grid computing method, computer and storage medium for ocean numerical mode Active CN116306122B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310206951.3A CN116306122B (en) 2023-03-07 2023-03-07 Grid computing method, computer and storage medium for ocean numerical mode

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310206951.3A CN116306122B (en) 2023-03-07 2023-03-07 Grid computing method, computer and storage medium for ocean numerical mode

Publications (2)

Publication Number Publication Date
CN116306122A CN116306122A (en) 2023-06-23
CN116306122B true CN116306122B (en) 2023-09-19

Family

ID=86786355

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310206951.3A Active CN116306122B (en) 2023-03-07 2023-03-07 Grid computing method, computer and storage medium for ocean numerical mode

Country Status (1)

Country Link
CN (1) CN116306122B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150117970A (en) * 2014-04-11 2015-10-21 한국해양과학기술원 Method and system for predicting ocean circulation in coastal areas
CN108235057A (en) * 2018-03-21 2018-06-29 中国科学院遥感与数字地球研究所 A kind of network transmission and method for visualizing of extensive utilizing ocean current data
CN110764934A (en) * 2019-10-24 2020-02-07 清华大学 Parallel communication method, device and system for numerical model and storage medium
CN112116691A (en) * 2020-08-20 2020-12-22 南方海洋科学与工程广东省实验室(湛江) Three-dimensional visualization method, system and medium based on NetCDF (net-compact disk Filter) ocean data
CN113157990A (en) * 2021-04-27 2021-07-23 中国石油大学(华东) Clustering algorithm-based ocean scalar visualization method and system under Cesium engine
CN113515525A (en) * 2021-07-29 2021-10-19 郑州众合景轩信息技术有限公司 Spatial data organization method based on global multi-scale grid
WO2022027916A1 (en) * 2020-08-04 2022-02-10 合肥本源量子计算科技有限责任公司 Computational fluid dynamics simulation method and apparatus based on quantum algorithm, and device
CN114417951A (en) * 2021-11-26 2022-04-29 中国石油大学(华东) Unsupervised machine learning-based automatic subdivision optimization method for ocean unstructured grid

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103093410B (en) * 2013-01-06 2014-02-05 国家海洋局第二海洋研究所 Mapping method of submarine topography six-dimension mesh
WO2015095785A1 (en) * 2013-12-19 2015-06-25 University Of Louisville Research Foundation, Inc. Multi-scale mesh modeling software products and controllers

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150117970A (en) * 2014-04-11 2015-10-21 한국해양과학기술원 Method and system for predicting ocean circulation in coastal areas
CN108235057A (en) * 2018-03-21 2018-06-29 中国科学院遥感与数字地球研究所 A kind of network transmission and method for visualizing of extensive utilizing ocean current data
CN110764934A (en) * 2019-10-24 2020-02-07 清华大学 Parallel communication method, device and system for numerical model and storage medium
WO2022027916A1 (en) * 2020-08-04 2022-02-10 合肥本源量子计算科技有限责任公司 Computational fluid dynamics simulation method and apparatus based on quantum algorithm, and device
CN112116691A (en) * 2020-08-20 2020-12-22 南方海洋科学与工程广东省实验室(湛江) Three-dimensional visualization method, system and medium based on NetCDF (net-compact disk Filter) ocean data
CN113157990A (en) * 2021-04-27 2021-07-23 中国石油大学(华东) Clustering algorithm-based ocean scalar visualization method and system under Cesium engine
CN113515525A (en) * 2021-07-29 2021-10-19 郑州众合景轩信息技术有限公司 Spatial data organization method based on global multi-scale grid
CN114417951A (en) * 2021-11-26 2022-04-29 中国石油大学(华东) Unsupervised machine learning-based automatic subdivision optimization method for ocean unstructured grid

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
任意正交曲线坐标系下的海洋模式动力框架的发展与评估;俞永强;唐绍磊;刘海龙;林鹏飞;李晓兰;;大气科学(04);全文 *
基于Laplace方程的球面正交曲线格网生成方法;卢付强;宋志尧;雷梦玲;丁凯孟;;地理与地理信息科学(01);全文 *
海洋环流数值模式POP的GPU并行优化;郭松;窦勇;雷元武;;计算机工程与科学(08);全文 *

Also Published As

Publication number Publication date
CN116306122A (en) 2023-06-23

Similar Documents

Publication Publication Date Title
CN104268934B (en) Method for reconstructing three-dimensional curve face through point cloud
CN113593051B (en) Live-action visualization method, dam visualization method and computer equipment
CN103413343B (en) A kind of 3D rendering animation engine
CN105427360B (en) A kind of controllable CAGE sequence expression algorithm of the error of dynamic grid
CN108717729A (en) A kind of online method for visualizing of landform multi-scale TIN of the Virtual earth
CN102957936B (en) Virtual viewpoint generation method from video single viewpoint to multiple viewpoints
CN114820990B (en) Digital twin-based river basin flood control visualization method and system
CN103218852A (en) Three-dimensional grid model framework extraction system facing skinned animation based on grid shrink and framework extraction method
He et al. Real-Time Extendible-Resolution Display of On-line Dynamic Terrain.
CN115983162A (en) Basin modeling method based on digital twinning
CN109360266A (en) A kind of road modeling method, relevant apparatus and equipment
CN116306122B (en) Grid computing method, computer and storage medium for ocean numerical mode
CN113486429B (en) Automatic construction method of space intersection structure based on interpolation algorithm
CN101425188A (en) Generalized spring vibrator deformation emulating method with rigid core
Allegre et al. The hybridtree: Mixing skeletal implicit surfaces, triangle meshes, and point sets in a free-form modeling system
CN110689616B (en) Water delivery channel parametric modeling method based on three-dimensional digital earth
CN114633850A (en) Virtual visual reconstruction method for finite element model of ship structure
CN105957142A (en) Hilbert ordering method constructed for orienting to TIN
Alam et al. Discretization of Complex Geometric Domain Through Computer-Based Stair-Step Representation Method for Estimating Water Levels Associated with A Storm
CN111767594B (en) Temporary building model generation method, device, equipment and storage medium
Sha et al. Multi-resolution meshes deformation based on pyramid coordinates
CN117315209B (en) Clothing stacking method, device, equipment and medium based on energy model
CN115457189B (en) PBD (skeletal driven software) simulation system and method based on cluster coloring
Yang et al. Quasiconformal rectilinear map
CN112419157B (en) Cloth super-resolution method based on generation of countermeasure network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant