Sea wave spectrum storage and reconstruction method and system based on new sea wave spectrum data access structure
By segmenting and labeling the wave spectrum, designing a single-dimensional file structure, and establishing Jacobian and Hessian matrices, efficient compression and reconstruction of the wave spectrum are achieved, solving the problem of difficult storage and retrieval of the wave spectrum, supporting marine engineering and disaster early warning, and reducing computing costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-13
- Publication Date
- 2026-03-10
AI Technical Summary
The existing wave spectrum data is massive, making storage and retrieval difficult. The boundary positions in nested simulations are fixed, making it difficult to make flexible adjustments and conduct long-term simulations, which cannot meet the requirements of refined nearshore models. Existing methods have poor fidelity and cannot reproduce the true wave spectrum morphology. Furthermore, least squares fitting and maximum entropy methods frequently fail in small sample cases, making them impractical for use in numerical wave models.
By segmenting the two-dimensional wave spectrum to obtain multiple spectral partitions, a general single-peak spectrum model is used for least-squares fitting. By marking and scaling the spectrum and direction distribution after each spectral segmentation, a single-dimensional file structure is designed, and integers are used to store the reconstruction parameters. A Jacobian and Hessian matrix conversion formula is established to achieve efficient compression and reconstruction of the wave spectrum.
It effectively reduces the storage space required for wave spectrum, enables flexible management and long-term simulation of wave spectrum information, supports marine engineering design and disaster early warning, provides stable boundary conditions, reduces computing costs, and supports the preservation and reconstruction of large-scale, long-term wave spectra.
Smart Images

Figure CN121636728A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of ocean wave numerical simulation technology, and particularly relates to a method and system for saving and reconstructing ocean wave spectrum based on a new ocean wave spectrum data access structure. It is used to realize the operable implementation of existing ocean wave spectrum saving and reconstruction methods and a brand-new ocean wave spectrum information data compression, reading and writing file structure. Background Technology
[0002] Ocean waves, including wind waves generated by local winds and swells from distant sources, can reach heights of tens of meters or travel thousands of kilometers across oceans. They are closely related to human activities such as navigation, fishing, and marine resource development, and play an important regulatory role in regional and global climate systems. Researchers have introduced the concept of "wave spectrum," which describes the distribution density of wave energy in frequency and direction to characterize wave states. Commonly used information such as wave height, wave direction, and wave period can all be calculated from the wave spectrum. Furthermore, current wave forecasting and wave disaster warnings rely on third-generation wave numerical models such as WaveWatchIII, SWAN, and MASNUM-WAM, all based on simulating and calculating the evolution of the wave spectrum.
[0003] When the numerical wave models described above are applied to nearshore waters, such as wave forecasting for coastal cities and wave environment parameter assessment during the design and construction of nearshore marine engineering projects (including breakwaters, marine ranches, offshore wind power facilities, etc.), these areas contain complex coastlines, islands, or reefs. Therefore, specially designed high-resolution computational grids are required to consider the shallowing and refraction effects of the wave spectrum, as well as the influence of complex physical processes such as seabed friction and nearshore current shear on the evolution of the wave spectrum. However, the impact of the external wave field environment, especially swells from the open ocean, on the area of interest also needs to be fully considered. Therefore, another model needs to be used at a lower resolution to simulate a larger coverage area for simulating swells from the open ocean, while controlling timeliness and computational costs. This method of co-operating between nearshore and offshore models is called nested simulation. In this process, the offshore model runs first and saves the wave spectrum at the boundary of the area of interest, while the nearshore model reads the wave spectrum in real time during operation to obtain offshore information. Furthermore, the resolution ratio of the inner and outer grids needs to be controlled at 3-5 times.
[0004] However, storing a typical wave spectrum usually requires 35 (frequency-dimensional discrete grid points) × 36 (direction-dimensional discrete grid points) (a total of 10) grid points. 3The sheer volume of data (on the order of magnitude) makes large-scale storage and retrieval of wave spectra extremely difficult. Therefore, in the aforementioned applications, the location of the boundary of the region of interest must be carefully determined in advance, and the number of wave spectra saved must be strictly controlled. Furthermore, due to the cost of saving wave spectra, the current nested scheme is difficult to perform long-term (such as decades) wave simulations, which poses a significant obstacle to the reproduction of extreme sea conditions that occur only once every few years.
[0005] To solve the above problems, the following methods are currently available: One approach is to preserve the wave spectrum information of offshore models at a lower spatiotemporal resolution, allowing nearshore models to more flexibly design the boundaries of areas of interest within the wave spectrum provided by offshore models. For example, the European Centre for Mesoscale Weather Prediction (ECMWF) provides hourly wave spectrum data of 0.5°×0.5° globally, providing boundaries for research and engineering needs. However, this resolution is still too blurry for refined nearshore models. In practice, multiple nesting operations are usually required (each increasing the resolution by 3-5 times) to meet the target resolution requirements. And each nesting process still inevitably involves the problem of preserving large amounts of boundary wave spectrum data.
[0006] Secondly, practical wave spectra are used, such as the JONSWAP spectrum in the form of significant wave height, or the Mitsuyasu-type directional distribution. By inputting key parameters such as wave height, period, and wave direction, a theoretical spectrum is constructed. Although this method can compress the information of the wave spectrum into a limited number of key parameters, the resulting theoretical spectrum cannot reproduce the vastly different actual wave spectra. In practical use, apart from the aforementioned key parameters, other wave spectrum characteristics cannot be accurately reproduced. Another drawback of this method is that real wave spectra often contain multiple wave systems, including wind waves and swells, each with different characteristics such as wave height, period, and wave direction. Obviously, the key parameters representing the overall wave spectrum characteristics input above cannot reproduce the true state of multiple wave systems.
[0007] Third, a novel method for preserving and reconstructing wave spectrum information is adopted. This method divides the original wave spectrum into several single-peak spectral partitions according to the wind and swell systems, and integrates them into a one-dimensional spectrum and a one-dimensional directional distribution. A least-squares fitting "general single-peak spectrum model" is used to compress the spectrum of a single spectral partition to 11 parameters, and the maximum entropy method is used to compress the directional distribution to 4 parameters. By filtering out spectral partitions with lower energy, the 10 parameters required to preserve a single wave spectrum can be reduced. 3The number of storage units has been compressed to a few dozen, and the morphological characteristics of multiple wave systems coexisting have been fully considered. However, the above least squares method has problems: when the number of samples in the spectrum to be fitted is less than the degrees of freedom of the general single-peak spectrum model, the fitting cannot be completed; similarly, when the number of non-zero samples in the directional distribution is less than 4, the maximum entropy method will produce singular values; the above situation will not occur in the complete wave spectrum, but it will occur frequently for the segmented spectral partitions. In addition, the original method does not explain how to operate in existing wave numerical models (usually written in FORTRAN), which involves the establishment of the Jacobian and Hessian transformation matrices necessary for least squares fitting of the general single-peak spectrum model. Finally, the above method can be further optimized in terms of the number of parameters stored; the stored parameters are still in the form of floating-point numbers, which will occupy more storage space than integers; and since the number of spectral partitions involved in storing the wave spectrum at each output point at each time step is inconsistent, the original method does not provide a usable reconstruction parameter access structure. In summary, although the principle of this method is feasible, it cannot yet be practically implemented in real-world wave nesting simulations.
[0008] Based on the above analysis, the problems and shortcomings of the existing technology are as follows: (1) Due to the huge amount of wave spectrum data (typically 35×36 data units), storage and retrieval are difficult. This makes it difficult to make flexible adjustments and long-term simulations, hindering the reproduction of extreme sea conditions that occur once every few years.
[0009] (2) The existing method of saving the wave spectrum information of the offshore model with time-space resolution provides a wave spectrum spatial resolution that is too low (e.g., 0.5°×0.5°), which cannot meet the needs of refined nearshore models. Moreover, when multiple nesting is performed, each nesting still faces the fundamental problem of huge original data volume, which cannot be completely solved.
[0010] (3) Existing wave spectrum methods using practical forms have poor fidelity, and the constructed theoretical spectrum is too idealized and cannot reproduce the diverse morphological characteristics of real wave spectra; they cannot handle multiple wave systems, and using a single set of key parameters cannot characterize and reproduce the complex state of multiple wave systems such as wind waves and swells coexisting in reality.
[0011] (4) Existing spectral segmentation and parameterization methods lack robustness. The core least squares fitting and maximum entropy method fail to fit or produce singular values when dealing with small samples or sparse data (such as few spectral samples or insufficient non-zero values in the directional distribution) after segmentation, leading to frequent failures in practical applications. They lack operability and do not explain how to implement complex nonlinear least squares fitting in wave numerical models based on FORTRAN, especially lacking an explanation of the algorithm for establishing the necessary Jacobian and Hessian transformation matrices. Compression efficiency needs optimization, and there is still room for simplification in the number of parameters stored (such as 15 parameters for a single spectral partition). The storage format is inefficient, and the stored parameters are still in floating-point form without data compression, resulting in a large space occupation. There is a lack of engineering data storage structure, and no file structure for reconstructing parameters that is suitable for practical applications and can efficiently and flexibly manage dynamic number spectral partitions has been designed. Summary of the Invention
[0012] To overcome the problems existing in related technologies, the present invention discloses an embodiment of a method and system for saving and reconstructing wave spectra based on a new wave spectrum data access structure, the technical solution of which is as follows: This invention is implemented as follows: a method for saving and reconstructing wave spectra based on a new wave spectrum data access structure, comprising the following steps: S1, the two-dimensional wave spectrum is divided into multiple spectral partitions, each with only one spectral peak; the one-dimensional spectrum and directional distribution are obtained by integrating along the direction and frequency dimensions of each spectral partition. S2, the spectrum of each spectral partition is divided by the spectral peak, and it is determined whether the number of available samples in the front and back parts of the spectrum is sufficient to perform least squares fitting. When the number of available samples is insufficient, the spectral values of the insufficient part are directly stored in the reconstruction parameters and marked. When the number of available samples is sufficient, the least squares fitting is performed on the sufficient part using the general single-peak spectrum model to obtain the spectrum reconstruction parameters of the corresponding part. S3, determine the number of non-zero samples in the directional distribution; when the number of non-zero samples is less than or equal to 4, store the non-zero value in the reconstruction parameters and mark it; otherwise, calculate the average direction and the directional moments of each spectral partition to obtain the directional distribution reconstruction parameters. S4, by controlling the value space of all reconstruction parameters, including the original values of the spectrum, orientation distribution, and labels, within 10... -6 -10 2 The parameters are then converted to integers after being scaled and offset values are added, and the reconstruction parameters to be saved are converted to logarithmic form with base 10. A single-dimensional reconstruction parameter file structure and a matching metadata file are designed to save the reconstruction parameters of all spectral partitions. S5. During reconstruction, the reconstruction parameters are used to restore the spectrum and direction distribution of each spectral partition, and all reconstructed spectral partitions are superimposed to obtain a two-dimensional reconstructed wave spectrum.
[0013] In step S2, after fitting, the front and back scaling parameters are discarded and the values at the spectral peaks are used to normalize the front and back parts of the 1D spectrum respectively. The overall scaling parameter is used for scaling, reducing the number of spectrum reconstruction parameters from 9 to 7. The 7 parameters include the overall scaling parameter, the spectral peak frequency, and the front and back parameters of the general single-peak spectrum model.
[0014] In step S2, the least squares fitting uses the Jacobian and Hessian matrices for a general single-peak spectrum model; For the general single-peak spectrum model, the expression is: ; In the formula, This is a general single-peak spectrum model. , It is a dimensionless frequency. For frequency, The frequency of the spectral peak; The four expressions derived from the single-peak spectrum model are shown below; The expression is: ; In the formula, ~ This represents the parameters to be fitted and reconstructed in the general single-peak spectrum model. It is a natural exponential function. For natural index, ; When fitting the first half of the general single-peak spectrum model, let The Jacobian matrix used is: ; In the formula, For partial derivative operators, The Jacobian matrix is a general single-peak spectral model containing three undetermined parameters. For a general single-peak spectrum model ; The corresponding Hessian matrix is: ; In the formula, The Hessian matrix is for a general single-peak spectrum model containing three undetermined parameters; When fitting the latter part of the general single-peak spectrum model, the Jacobian matrix used is: ; In the formula, The Jacobian matrix is a general single-peak spectral model containing 6 undetermined parameters; The corresponding Hessian matrix is: ; In the formula, The Hessian matrix is for a general single-peak spectral model containing 6 undetermined parameters; The algorithm for the first-order partial derivative of the transformation is as follows: ; ; The second-order partial derivative algorithm is as follows: ; ; ; The above The first-order partial derivative algorithm is as follows: ; ; ; The second-order partial derivative algorithm is as follows: ; ; ; ; ; ; In the formula, It is the natural logarithm function; and, and After establishing two transformation matrices, with Fitting the front part of a general single-peak spectral model for independent variables , , and the rear parameter.
[0015] In step S2, the reconstruction parameters of the front part of the spectrum are obtained. , and and the reconstructed parameters of the spectrum , , , , , .in, and Using scaling parameters, the fitted result is obtained and After that, I gave up saving it. and During the reconstruction, a constant of 1 is used instead; in the reconstructed spectrum front and rear Then, divide each by and The value at the spectral peak, This is the last value in the array sequence. Let be the first value of the array sequence; such that The two parts of the spectrum naturally merge at the peak; then, the reconstruction parameters are used. After closing After scaling the entire spectrum and restoring it, the reconstruction parameters describing the spectrum of a single-peak spectral partition are reduced to... .
[0016] In step S2, those with insufficient available samples... , and The values are directly assigned to the reconstruction parameters and marked so that they can be effectively identified and directly read into the reconstructed spectrum during reconstruction.
[0017] Furthermore, if If the number of available samples is less than or equal to 2, then... Store the original value The default value is 0, and it is given Mark it, and add 50 to the original value; if If the number of available samples is less than or equal to 5, then... Store the original value The default value is 0, and it is given Mark it, and add 50 to the original value; if If the number of available samples is less than 4, then... The index of the first non-zero value in the sequence is stored in In, and sequentially store all non-zero values in The default value is 0; Set as a flag, and add 7 to the original value.
[0018] In step S4, the reconstruction parameters are converted from floating-point data to integer data to compress storage space; the conversion includes: taking the logarithm of the obtained 4-byte or 8-byte floating-point reconstruction parameters to base 10, then adding the offset value and scaling factor, and finally obtaining an integer number occupying 1 or 2 bytes for storage; wherein, the floating-point reconstruction parameters include the original spectrum / direction distribution value with tags.
[0019] Furthermore, converting the reconstruction parameters from floating-point data to integer data specifically includes the following steps: a. For reconstructed parameters The normal value range is controlled within 2.5 × 10. -5 ~56.2500, corresponding to a significant wave height of 0.02~30m; b. For reconstruction parameters Set a lower bound of 10 during the fitting process. -5 and the upper bound 10, and With a lower bound of 1 and an upper bound of 10, the range of reconstructed parameters for a normal fit is 10. -5 ~10 1 Between; for cases where the number of available samples is insufficient, an additional 50 is added to the spectral value at the spectral peak as a marker, and the value range of the spectral reconstruction parameter for each spectral partition is 0~10. 2 ; c. For reconstruction parameters The normal calculation range is as follows: , , and ;right Add 10 to the original value to control the range of the normally saved orientation distribution reconstruction parameter to 0~11; for cases where there are insufficient available samples, Marked as The index of the first non-zero value in the sequence, ranging from 1 to 48, will be used as the index value. Add 7 extra; due to The values of the reconstructed directional distribution parameters for each spectral partition, including the markers and original values, range from 0 to 10. 2 ; d. For reconstruction parameters This is represented as an index value in the frequency space, stored as a 1-byte integer, and can indicate the data range. Frequency space information will be saved separately as necessary information; e. The values of the 13 reconstruction parameters required to save the single-peak spectrum partition are all in the range of 0~10. 2 Set the lower limit of this range to 10. -6 Then the floating-point variable Mapping to integer variables by taking the logarithm Then linearly map to 2-byte integer variables The range of data that can be displayed is ); During conversion: (The sentence is incomplete and requires more context to translate accurately.) Other refactoring parameters Perform the transformation from a to c, and take the logarithmic form. Then convert ,in, For rounding operation; reconstruct parameters Then, as described above, d is directly stored as a 1-byte integer; During restoration: The situation is restored to Then restore the other cases to and ,remove Other refactoring parameters Restore the original appearance based on the corresponding values a~c; reconstruct parameters. Then, the frequency can be restored using a 1-byte index from the stored frequency space; At this point, all floating-point reconstruction parameters containing the marker and original spectral values, which occupy 4 or 8 bytes, are converted into integer variables occupying 1 or 2 bytes for storage.
[0020] In step S4, the reconstruction parameters are saved using a metadata file and a reconstruction parameter file. The metadata file contains spectral space and geographic space partitioning information, and the reconstruction parameter file stores the reconstruction parameters by date. The metadata file includes frequency / wavenumber dimensions, direction dimensions, longitude dimensions, latitude dimensions, and also includes the number of output locations, wavenumber and direction partitions of the spectral space, longitude and latitude partitions of the geographic space, output point numbers, longitude index values, latitude index values, frequency partitions of the spectral space, and group velocity variables corresponding to the frequency partitions. All variables in the reconstruction parameter file are single-dimensional, including the index number of the storage location, the record number within the file's date range, and the reconstruction parameter variables. , , , , , , , , , , , and The reconstruction parameter variables are stored as integers, and the reconstruction parameter files are named according to the date.
[0021] Another object of the present invention is to provide a wave spectrum preservation and reconstruction system based on a new wave spectrum data access structure for implementing the wave spectrum preservation and reconstruction method based on the new wave spectrum data access structure, the system comprising: The spectrum and directional distribution acquisition module is used to segment the two-dimensional wave spectrum to obtain multiple spectral partitions, each with only one spectral peak; the one-dimensional spectrum and directional distribution are obtained by integrating along the directional and frequency dimensions of each spectral partition. The spectrum reconstruction parameter fitting module is used to divide the spectrum of each spectral partition by the spectral peak, and determine whether there are enough available samples in the front and back parts of the spectrum to perform least squares fitting. When there are not enough, the spectrum values of the insufficient part are directly stored into the reconstruction parameters and marked. When there are enough, the general single-peak spectrum model is used to perform least squares fitting on the sufficient part to obtain the spectrum reconstruction parameters of the corresponding part. The orientation distribution reconstruction parameter acquisition module is used to determine the number of non-zero samples in the orientation distribution. When the number of non-zero samples is less than or equal to 4, the non-zero value is stored in the reconstruction parameter and marked. Otherwise, the average orientation and the directional moments of each order of the orientation distribution in each spectral partition are calculated to obtain the orientation distribution reconstruction parameters. The wave spectrum storage module is used to control the value space of all reconstructed parameters, including the original values of the spectrum, direction distribution, and markers, within 10. -6 -10 2 The parameters are then converted to integers after being scaled and offset values are added, and the reconstruction parameters to be saved are converted to logarithmic form with base 10. A single-dimensional reconstruction parameter file structure and a matching metadata file are designed to save the reconstruction parameters of all spectral partitions. The wave spectrum reconstruction module is used to restore the spectrum and direction distribution of each spectral partition using the reconstruction parameters, and to superimpose all the reconstructed spectral partitions to obtain a two-dimensional reconstructed wave spectrum.
[0022] Combining all the above technical solutions, the beneficial effects of this invention are as follows: First, this invention solves the problem that the original method cannot save special wave spectra and is implemented in the FORTRAN computer language, making it practically operable in general wave numerical models. At the same time, it discloses a newly designed wave spectrum information data compression and read / write file structure, which greatly reduces the storage space of wave spectrum information and effectively improves the practicality of the method.
[0023] Second, experimental results show that the number of reconstruction parameters required to reconstruct a single-peak spectral partition is reduced by 2 compared to the original method, and the reconstruction effect of the single-peak spectral partition is not affected; for the entire two-dimensional wave spectrum, more than 8 storage units can be saved, and the restoration effect is consistent with the original method. The present invention can handle all real-world wave spectra. The original method cannot handle wave spectra in special cases. When the first (second) half of the one-dimensional spectrum (with the peak frequency as the boundary) contains less than or equal to 2 (5) samples, which is lower than the 3 (6) parameters to be fitted in the general spectrum model, the least squares fitting cannot be performed; and when the one-dimensional directional distribution has less than 4 non-zero values, the maximum entropy method will produce singular values when restoring the directional distribution. The above situations will frequently occur for the segmented spectral partitions, so the original method cannot be applied to all real-world wave spectra.
[0024] This invention cleverly utilizes the inherent characteristics of the reconstruction parameters to embed the original spectrum and directional distribution information into the reconstruction parameters without adding other storage elements, and provides markers to facilitate identification during reconstruction and the adoption of corresponding strategies for restoration. It can be applied to all real-world wave spectra.
[0025] Third, the method for saving and reconstructing the wave spectrum was designed for nested wave simulation, but the original method did not explain how to operate in modern wave models based on FORTRAN programs. The key issue is that it failed to solve the FORTRAN coding problem of least squares fitting of the general single-peak spectrum model, especially the establishment of the Jacobian and Hessian matrix transformation formulas of the general single-peak spectrum model.
[0026] This invention establishes the Jacobian and Hessian matrix transformation formulas for a general single-peak spectrum model. Using the RALFit open-source package, the improved wave spectrum saving and reconstruction method is written as a FOTRAN module and successfully applied to the third-generation wave model MASNUM-WAM, independently developed in my country. This truly establishes a practical method for saving and reconstructing wave spectrum boundaries in nested wave simulations.
[0027] Fourth, this invention provides support for nested wave simulation. It can provide stable and reliable boundary conditions for the refined calculation of wave environment parameters necessary for the safety design, operation and maintenance window prediction, and disaster risk early warning of marine engineering structures (including breakwaters, offshore ranches, offshore oil platforms, offshore wind farms, etc.); and effectively saves computational costs in repeated calculation experiments by preserving the wave spectrum at low cost.
[0028] This invention enables the preservation of complete spatiotemporally continuous ocean wave spectrum information over a large area and for a long period. Compared to sporadic ocean wave parameters, this invention provides more comprehensive and effective data support for resource assessment and priority development zone selection, wave energy electric field site selection, and wave energy conversion device layout decisions in wave energy resource development. Similarly, complete ocean wave spectrum information can also provide important data support for academic research in areas such as regional and even global ocean-atmosphere interactions and climate change. The technical solution of this invention effectively solves the problem of high cost in preserving two-dimensional ocean wave spectra in the current field of ocean wave numerical simulation both domestically and internationally, filling the technical gap of excessively high cost in preserving large-scale, long-term spatiotemporally continuous ocean wave spectra.
[0029] Fifth, in nested wave simulations, the excessive storage space required to store boundary wave spectra has been a persistent technical challenge that has remained unresolved. While computer data compression techniques, such as binary NETCDF-3, GRIB1, and even more sophisticated NETCDF-4 and GRIB2, can reduce file size to some extent, they still cannot solve the problem of individual wave spectra occupying 10... 3 The challenge of large-scale storage units.
[0030] This invention, starting from the physical meaning of ocean wave spectra, reduces the number of storage units required to store ocean wave spectra from 10 by using least squares fitting and the maximum entropy method. 3 The number of parameters is reduced to a few dozen. By cleverly utilizing the characteristics of the reconstruction parameters themselves, the information of the original spectrum and directional distribution is embedded into the reconstruction parameters without adding other storage elements, and a label is provided. By making reasonable use of single-dimensional variables, the reconstruction parameters of single-peak spectrum partitions are stored sequentially in a centralized manner, effectively solving the problem of space waste caused by the inconsistent number of single-peak spectrum partitions in each wave spectrum. This achieves more efficient compression and reconstruction of wave spectrum information.
[0031] Furthermore, this invention does not contradict the aforementioned computer data compression techniques, and the results of this invention can be further compressed using these techniques. This does not affect the improvements made by this invention in terms of the number of wave spectrum storage units and the structure of the wave spectrum storage file. Attached Figure Description
[0032] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure; Figure 1 This is a flowchart of the wave spectrum saving and reconstruction method based on the new wave spectrum data access structure provided in this embodiment of the invention; Figure 2All comparison parameters are normalized by dividing by the maximum value of that parameter in the original / reconstructed spectrum. At the corresponding time, the feature parameters of the original-reconstructed spectrum fall into a 0.02×0.02 (normalized value) grid. The color depth represents the number of samples falling into each grid (unit: log). 10 In each sub-graph, the closer the high-depth color grid is to the dashed line, the better the match between the two. Detailed Implementation
[0033] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0034] The innovation of this invention lies in: (1) Establishment of Jacobian and Hessian matrix transformation formulas for the general single-peak spectrum model.
[0035] Jacobian and Hessian transformation matrices are essential core operators in nonlinear least squares fitting algorithms. They lack a universal form and must be established manually based on the target equation to be fitted. The general single-peak spectrum model involved in this invention is inherently extremely complex, and establishing the binary transformation matrix requires calculating the first and second-order partial derivatives of up to six parameters. This invention decomposes the terms of the single-peak spectrum model, deriving each partial derivative term layer by layer according to the chain rule, ensuring no repetition or omission, ultimately completing the establishment of the binary transformation matrix. Based on the established binary transformation matrix, this invention further utilizes the RALFit open-source package to codify the FORTRAN code for saving and reconstructing wave spectra, enabling its practical operation in currently common wave models.
[0036] (2) A completely new method for saving reconstruction parameters for special spectral shapes.
[0037] In the actual process of preserving ocean wave spectra, when the number of available samples in the one-dimensional spectrum is insufficient, least squares fitting cannot be performed. Similarly, when the number of available samples in the one-dimensional directional distribution is insufficient, the directional distribution reconstructed using the maximum entropy method will exhibit singular values. This invention cleverly utilizes the inherent characteristics of the reconstruction parameters to embed the information of the original spectrum and directional distribution into the reconstruction parameters without adding other storage elements, and provides labels to facilitate identification and the adoption of corresponding strategies for reconstruction.
[0038] (3) The newly designed compression method for reconstructed parameter information greatly reduces the size of the saved file.
[0039] Although the reconstructed parameters obtained by this invention can compress the 1000+ storage units required to store a two-dimensional wave spectrum to only 50-60, these parameters are still represented in floating-point form, occupying 4 or 8 bytes. By taking the logarithm... 10 Logarithmic forms can convert floating-point numbers into integers that occupy only 2 bytes. However, for the reconstruction parameters involved in this invention, the range of values is not uniform due to the different physical meanings or geometric characteristics of the spectrum associated with each parameter. Furthermore, in order to adapt to special spectrums that cannot be fitted by least squares and whose direction parameters cannot be calculated correctly, the reconstruction parameters also need to bear the task of preserving the original spectrum values and labels, which further complicates the range of values.
[0040] This invention designs and controls the value range of each reconstruction parameter individually. While ensuring a sufficiently reasonable value range, it clearly distinguishes between normal spectral / directional distribution reconstruction parameters and original spectral values / labels, ultimately ensuring that all reconstruction parameters take values within a certain range. Finally, the reconstructed parameter information values to be saved are linearly mapped to a 2-byte integer range. This significantly reduces the storage space required to store the data.
[0041] (4) A newly designed parameter information reading and writing file structure.
[0042] Because the number of spectral partitions presented when saving the wave spectrum at each output point at each time step is inconsistent, describing each reconstruction parameter using the traditional dimension of "point position-time" inevitably results in empty storage space at some times and point positions, thus wasting storage space. This invention innovatively designs a single-dimensional file structure. By recording the intersection of the sequence number and the point position sequence number, it finds the information of all spectral partitions output at a specified position and time from each reconstruction parameter, which is also a single-dimensional structure. Furthermore, since this information is recorded in consecutive adjacent positions, it can further improve the read and write efficiency of the data file.
[0043] Example 1: Based on the third method in the background technology (hereinafter referred to as the original method), this embodiment of the invention discloses an improved method for saving and reconstructing wave spectra, which solves the problem that the original method cannot save wave spectra with special forms. The method is implemented in the FORTRAN computer language, making it practically operable in wave numerical models. At the same time, a newly designed data compression and read / write file structure for wave spectrum information is disclosed, which greatly reduces the storage space of wave spectrum information and effectively improves its practicality.
[0044] In the original method, spectral segmentation technology is first used to segment two-dimensional wave spectra with multiple spectral peaks. Perform segmentation processing to divide the spectrum into different partitions. There is only one spectral peak; secondly, the original method applies to each One-dimensional spectrum is obtained by integrating along direction and frequency respectively. and directional distribution .
[0045] Calculate the overall energy parameters for each spectral region ( It means to (differential) Pick Frequency corresponding to the maximum value For the spectral peak frequency, we can obtain Two reconstruction parameters.
[0046] The "general single-peak spectrum model" was used to analyze the spectrum of each spectral partition (containing only one spectral peak). Least squares fitting is performed to obtain the spectrum reconstruction parameters. The general single-peak spectrum model used is as follows: ; In the formula, The peak frequency is the spectral frequency; the reconstruction parameters included in this model are: Using the least squares method, the spectral shape of the general single-peak spectrum model can be arbitrarily fitted by adjusting the above parameters. The original method further clarifies: based on spectral peaks... As a boundary, for front and rear Fitting was performed using a general single-peak spectrum model; Due to the simplicity of the spectral shape, it adopts The parameter fitting strategy makes =5, , The reconstructed parameters to be fitted are ; and for ,use The parameter fitting strategy is to fit all reconstructed parameters; the set of all parameters is... There are a total of 9 parameters.
[0047] directional distribution of each spectral region Calculate the average direction : ; in, , ( (differential) and directional moments of each order: ; ; A total of four reconstructed parameters for the directional distribution of each partition were obtained. .
[0048] Therefore, the reconstruction parameters required to save a spectral partition are: ; There are a total of 15. Considering that each wave spectrum usually involves a maximum of 4 spectral partitions, the storage units required to store a single wave spectrum are a maximum of 60.
[0049] When reconstructing the wave spectrum, the nine spectral reconstruction parameters of each spectral partition are substituted into the general single-peak spectral model, and then... and By performing dimensional restoration and scaling, the spectrum of each partition can be obtained.
[0050] The parameters are reconstructed using the maximum entropy method for distribution in four directions: ; ; In the formula, The asterisk (*) indicates the complex conjugate form; thus, the directional distribution can be reconstructed.
[0051] By performing a cross product between the spectrum and direction distribution of each spectral partition, we can obtain each reconstructed two-dimensional spectral partition; by superimposing all the reconstructed spectral partitions, we can obtain the two-dimensional reconstructed wave spectrum.
[0052] like Figure 1 As shown, compared to the original method, the features (improvements) of this invention are as follows: (1) Compared with the original method, the number of reconstruction parameters is further reduced, and the number of parameters required to describe a single-peak spectrum partition spectrum is reduced from the original 9 parameters to 7 parameters.
[0053] In the original method and This is a scaling parameter independent of other parameters. The present invention obtains the following through fitting: and Then give up saving and During the reduction, a constant 1 is used instead, and the result is... and Then, divide each by its value at the spectral peak (i.e., The last value of the array sequence. The first value of the array sequence). Because and Both have maximum values at the spectral peaks, and the above operation can make The two parts of the spectrum naturally merge at the peak (both equal to 1); at this point, another reconstruction parameter is used. Directly to the closed By scaling the entire spectrum, the same spectrum as described in the original description can be restored. Therefore, the reconstruction parameters describing the spectrum of a single-peak spectral partition can be further reduced to... There are a total of 7 parameters.
[0054] (2) The present invention solves the problem that the original method cannot perform least squares fitting in special cases and that the reconstruction direction distribution has singular values.
[0055] The original method uses the least squares method to fit a general single-peak spectrum model to obtain the reconstructed parameters of the spectrum. However, when the model to be fitted... ( The sample contains fewer than or equal to 2 (5) samples, which is less than the 3 (6) parameters to be fitted in the general spectral model, making least squares fitting impossible. This situation is unlikely to occur in the complete spectrum, but it is more pronounced in the spectrum after the spectral partitions are decomposed. and This phenomenon occurs frequently. The original method also mentions calculating the average wave direction and the directional distances of each order to obtain the directional distribution reconstruction parameters. Similarly, the directional distribution of the segmented spectral partitions... There are also cases where the non-zero value is less than 4. In such cases, when the reconstructed parameters are used to restore the directional distribution using the maximum entropy method, singular values will appear.
[0056] The invention is characterized by having an insufficient number of available samples. , and The values are directly assigned to the reconstruction parameters and marked so that they can be effectively identified and directly read into the reconstructed spectrum during restoration. The specific method is as follows: if If the number of available samples is less than or equal to 2, then... Store the original value (Default value is 0) and give Mark (add 50 to the original value); if If the number of available samples is less than or equal to 5, then... Store the original value (Default value is 0) and give Mark (add 50 to the original value); if If the number of available samples is less than 4, then... The index of the first non-zero value in the sequence is stored in In, and sequentially store all non-zero values in (Default value is 0); Set as a flag (add 7 to the original value).
[0057] (3) Establishment of Jacobian and Hessian transformation matrices necessary for least squares fitting of the general single-peak spectrum model.
[0058] The original method did not explain how to implement it in numerical wave models written in the FOTRAN computer language. Its key lies in the FOTRAN code implementation of least-squares fitting of the general single-peak spectral model, particularly involving the Jacobian and Hessian matrix algorithms necessary for least-squares fitting of the general single-peak spectral model. The feature of this invention is the establishment of the aforementioned algorithm for the two transformation matrices: Transform the general single-peak spectrum model: ; In the formula, This is a general single-peak spectrum model. , It is a dimensionless frequency. For frequency, The frequency of the spectral peak; The four expressions derived from the single-peak spectrum model are shown below; , , , ; in, It is a natural exponential function. For natural index, ; ~ This represents the parameters to be fitted and reconstructed in the general single-peak spectrum model. For partial derivative operators, The Jacobian matrix is a general single-peak spectral model containing three undetermined parameters. For a general single-peak spectrum model When fitting the first half of the general single-peak spectrum model, let The required Jacobian matrix is: ; Its corresponding Hessian matrix is: ; In the formula, The Hessian matrix is for a general single-peak spectrum model containing three undetermined parameters; When fitting the latter part of the general single-peak spectrum model, the Jacobian matrix required is: ; In the formula, The Jacobian matrix is a general single-peak spectral model containing 6 undetermined parameters; Its corresponding Hessian matrix is: ; In the formula, The Hessian matrix is for a general single-peak spectral model containing 6 undetermined parameters; The algorithm for calculating the first-order partial derivative in the above transformation is as follows: , , ; , , .
[0059] The second-order partial derivative algorithm is as follows: , , , ; The above-mentioned The first-order partial derivative algorithm is as follows: ; ; ; The above-mentioned The second-order partial derivative algorithm is as follows: , , , , , , ; in, Let represent the natural logarithm function, and have . and .
[0060] After establishing the two transformation matrices mentioned above, nonlinear least squares fitting can be implemented using the FORTRAN language. Currently, there are several open-source FORTRAN programs capable of performing nonlinear least squares fitting, such as the RALFit package released by the UK Science and Technology Facilities Council of the UK Research and Innovation Agency. This invention utilizes the RALFit open-source package based on these two transformation matrices to achieve nonlinear least squares fitting. Fitting a general single-peak spectrum model to the independent variable Parameters (i.e., reconstruction parameters).
[0061] (4) Convert the reconstructed parameters from floating-point data to integer data to further compress storage space.
[0062] The feature of this invention is that, in order to further compress the storage space of the reconstruction parameters, the obtained floating-point reconstruction parameters (including the original spectral values / directional distribution probability density with labels) occupying 4 or 8 bytes are first subjected to range control, and then the logarithm of log10 is taken and the offset value and scaling factor are added to finally obtain an integer number occupying 1 or 2 bytes for storage. The specific method is shown in Table 1: Table 1. Methods for converting the reconstructed parameters of single-peak spectrum partitioning and directional distribution to integers.
[0063] (5) A newly designed wave spectrum data storage and retrieval structure.
[0064] The invention is characterized by saving the reconstruction parameter file in two parts: a reconstruction parameter metadata file (one file) and reconstruction parameters stored by date (multiple files are possible). Specifically, each reconstruction parameter file is set as a single-index sequence to avoid wasting storage space due to different numbers of spectral partitions existing simultaneously in different storage locations. Both the metadata file and the reconstruction parameter file are saved in NETCDF format.
[0065] Metadata filename: <rpname>_info.nc in <rpname>_info is the file name, which is also a unified identifier for metadata files and reconstruction parameter files. _info identifies the file as a metadata file, and .nc is the NETCDF format file extension.
[0066] The metadata file structure is shown in Table 2.
[0067] Table 2 Metadata File Structure
[0068] Reconstruct parameter file name: <rpname>_bdy_ <datetime>.nc in <rpname>To ensure consistency with the metadata file's filename, _bdy identifies this file as a reconstruction parameter file. <datetime>For the time identifier of the file, the reconfiguration parameters saved on a certain day, month or year output can be expressed in day, month or year. The reconfiguration parameter file structure is shown in Table 3.
[0069] Table 3 Reconfiguration parameter file structure
[0070] Note: The record serial number is sequentially assigned to each file output, for example, when the reconfiguration file is saved in day units and the record time is every whole hour, the recd value in the current file is 1-24; it is noted that the reconfiguration parameters in the file have the same dimension as recd and idxo, if there are n records with recd = R and idxo = I in the record, it means that n spectrum partitions are saved at position I at R time, therefore, the reconfiguration parameters of these spectrum partitions can be extracted from the position with recd = R and idxo = I. Although the number P of output points in each file can be determined, the number of spectrum partitions appearing at a certain position at a certain time is inconsistent and cannot be predicted, even if the maximum number of spectrum partitions saved is assumed to be N, the actual number of spectrum partitions appearing may frequently be less than N, therefore, using a (P, N) matrix to save all reconfiguration parameters may cause a great waste of storage space; the data structure of the present application can effectively avoid the above-mentioned waste of storage space.
[0071] In embodiment 2, the present application provides a new sea wave spectrum data access structure based sea wave spectrum saving and reconstruction system for implementing the new sea wave spectrum data access structure based sea wave spectrum saving and reconstruction method, comprising: A spectrum and direction distribution acquisition module is configured to segment a two-dimensional sea wave spectrum to obtain a plurality of spectrum partitions, each of which has only one spectrum peak; and integrate each spectrum partition along the direction and frequency dimensions to obtain a one-dimensional spectrum and direction distribution. A spectrum reconstruction parameter fitting module is configured to segment the spectrum of each spectrum partition with the spectrum peak as a boundary, and respectively judge whether the number of available samples in the front and rear parts of the spectrum is sufficient to perform least square fitting; when it is insufficient, the spectrum values of the insufficient part are directly stored in the reconfiguration parameters and marked; when it is sufficient, the general single-peak spectrum model is used to perform least square fitting on the sufficient part to obtain the spectrum reconstruction parameters of the corresponding part. A direction distribution reconstruction parameter acquisition module is configured to judge the number of non-zero samples of the direction distribution; when the number of non-zero samples is less than or equal to 4, the non-zero values are stored in the reconfiguration parameters and marked; otherwise, the average direction and the direction moments of each order of the direction distribution of each spectrum partition are calculated to obtain the direction distribution reconstruction parameters. A sea wave spectrum saving module is configured to control the value space of all reconfiguration parameters including the original values of the spectrum and the direction distribution and the marks to be within 10 -6 -10 2 and taking as the logarithm form with 10 as the base, and after scaling and adding an offset value, the to-be-saved reconstruction parameters are converted into integer numbers; a single-dimension reconstruction parameter file structure and a metadata file matched therewith are designed to save the reconstruction parameters of all spectrum partitions; A sea wave spectrum reconstruction module is configured to restore the frequency spectrum and directional distribution of each spectrum partition using the reconstruction parameters and to superimpose all the reconstructed spectrum partitions to obtain a two-dimensional reconstructed sea wave spectrum.
[0072] In Embodiment 3, the RALFit open-source program package is used to perform the nonlinear least square fitting algorithm, and the program package can be replaced because the algorithm is a general algorithm; however, the Jacobian and Hessian conversion matrix algorithm for the general unimodal spectrum model is irreplaceable for the purpose of performing least square fitting in the present application.
[0073] In Embodiment 4, the present application uses the MASNUM-WAM as an implementation platform to prove the operability of the present application in a sea wave model, and other general sea wave models such as WaveWatchIII, SWAN, etc. can also be used to implement the present application.
[0074] To further prove the positive effects of the above embodiments, the present application based on the above technical solutions carries out the following experiments: the present application is transplanted in the sea wave model MASNUM-WAM, and a sea wave process real-world simulation is carried out; by comparing the spectral characteristics of the original simulated sea wave spectrum and the restored spectrum generated by the reconstruction parameters at the concerned position, the operability of the present application in a general sea wave model and the accuracy of the spectrum restoration are proved; through the nested simulation experiment at the concerned position, the operability and calculation accuracy of the present application in sea wave nested simulation are proved.
[0075] The MASNUM-WAM is a third-generation sea wave model independently developed by China, and the model has been widely used in a number of scientific researches and ocean engineering environmental parameter evaluations, and the model is currently applied to a plurality of operational forecasting systems such as China offshore, Southeast Asia sea and 21st Century Maritime Silk Road, etc. Therefore, the sea wave model is a mature and reliable implementation platform.
[0076] (1) Comparison of characteristic parameters of original spectrum and restored spectrum; the simulated sea area in this implementation is the China offshore sea area, covering 99°E~145°E, -10°N~45°N, and the calculation grid spatial resolution is 1 / 12°x1 / 12° (about 9km x 9km); the simulation time period is selected as 2011~2013, and the reconstruction parameters of all calculation grid points are recorded once every whole point during the simulation process, and each grid point records up to 6 spectrum partitions each time. The simulated sea wave spectrum at each whole point is output synchronously at position P1 (125°E, 29°N) for comparison and verification.
[0077] For the original spectrum stored at point P1 and the reconstructed spectrum restored at that location using reconstruction parameters, 12 spectral characteristic parameters, as shown in Table 4, are calculated. These parameters cover features that reflect the overall spectrum, such as significant wave height, various wave periods, and average direction, as well as features that reflect the details of the wave spectrum shape, such as peak density, spectral bandwidth, and directional span.
[0078] Table 4 Key Parameters and Calculation Methods
[0079] A scatter plot comparing the 12 spectral characteristic parameters of the original and reconstructed spectra at point P1 is shown below. Figure 2 As shown in the figures, the darker the color of the area, the more original-reconstructed spectral feature sample points fall into it. The closer the sample points fall into the area to the middle dashed line, the higher the degree of agreement between the two. Figure 2 As can be seen, the dark regions of each feature parameter are very close to the dashed lines, and their dispersion is small, indicating that the reconstructed spectrum retains the spectral features of the original spectrum very well. Correspondingly, the error parameters of each feature parameter between the original and reconstructed spectra show significant differences. Absolute mean difference Root square error and correlation coefficient As shown in the following formulas, where The closer the value is to 1, the higher the correlation between the reconstructed feature and the original feature (Note: mean wave direction). (This concept does not exist). The closer other error parameters are to 0, the smaller the error between the reconstruction result and the original result.
[0080] , ; , ; In the formula, RE and OR These represent the wave parameters obtained from the reconstructed spectrum and the original spectrum, respectively. N The number of samples is denoted as P1. The error statistics between the reconstructed spectral feature parameters at point P1 and the corresponding original spectral features are shown in Table 5.
[0081] Table 5. Error statistics of the reconstructed spectrum relative to the original spectrum characteristic parameters (point P1)
[0082] Therefore, it is evident that the error between the reconstructed spectrum and the original spectrum's characteristic parameters at the point of interest is extremely small, far less than the error between simulation parameters and observed values in conventional wave simulations. This demonstrates that the present invention is operable in general wave models and can accurately reconstruct the characteristic information of the original wave spectrum, laying a solid foundation for its application in nested wave simulations.
[0083] (2) Nested simulation operability verification; To verify the operability of the present application in sea wave nested simulation, comparative experiments of nested simulation in different sub-grid ranges are carried out, and the sub-grid boundaries are derived from the restored sea wave spectrum obtained from the reconstruction coefficients output by the same parent grid. In the simulation of (1) above, the reconstruction parameters at all grid points are output, and similarly, each grid point records up to 6 spectrum partitions each time; thanks to the present application, the sea wave spectrum information at all (parent) grid points is saved at an acceptable storage cost, so the boundaries and ranges of the sub-grid can be flexibly set.
[0084] Still selecting the P1 point of interest, a sub-grid 1 (2, 3 and 4) east, south, west and north boundary is set at a distance of 0.25° (0.5°, 0.75° and 1°) from the center; to exclude the interference of other factors, the sub-grid 1~4 calculation uses the same driving scheme and original function parameters as the parent grid, and the sub-grid resolution also remains consistent with the parent grid. The hourly sea wave spectrum of P1 point is output in the simulation of parent and sub-grid, and the key characteristic parameters shown in Table 4 are calculated for comparison. The error parameters used are consistent with those in (1) above. Table 6 shows the error parameters of the simulation results of P1 point in four sub-grids and the results of the parent grid.
[0085] Table 6 Error parameters of P1 point in four sub-grid simulation results and parent grid results
[0086] From Table 6, it can be seen that in such a small range of sub-grid 1~4, P1 point still obtains sufficient sea wave energy, indicating that the swell characteristics of the open sea retained by the parent grid are successfully transmitted into the sub-grid; and the spectrum characteristic parameter errors of each sub-grid and the parent grid are very small, indicating that the nested calculation is successful; finally, the errors of sub-grid 1 and the parent grid are obviously better than those of other grids, which is because the point of interest in sub-grid 1 is closest to the boundary point, and is more obviously affected by the parent grid. In summary, the present application is operable in actual sea wave nested simulation.
[0087] (3) The advantages of the present application scheme are as follows: 1) The number of reconstruction parameters required to reconstruct a single peak spectrum partition is further reduced by 2 compared to the original method.
[0088] The reconstruction parameters required to reconstruct a single peak spectrum partition in the original method are: ; A total of 15, the reconstruction parameters used in the present application are: ; A total of 13 parameters were used; although the number of reconstruction parameters was reduced, the reconstruction effect of single-peak spectrum partitioning was not affected; for the entire two-dimensional wave spectrum, more than 8 storage units could be saved, and the restoration effect was consistent with the original method.
[0089] 2) Can process all real-world wave spectra The original method cannot handle wave spectra in special cases: specifically, when the first (second) half of the one-dimensional spectrum (bounded by the peak frequency) contains fewer than or equal to 2 (5) samples, which is less than the 3 (6) parameters to be fitted in the general spectrum model, least squares fitting cannot be performed; and when the one-dimensional directional distribution has fewer than 4 non-zero values, the maximum entropy method will produce singular values when restoring the directional distribution. The above situations occur frequently in the segmented spectral partitions, therefore the original method cannot be applied to all real-world wave spectra.
[0090] This invention cleverly utilizes the inherent characteristics of reconstruction parameters to embed the original spectral information into the reconstruction parameters without adding other storage elements, and provides markers to facilitate identification during reconstruction and the application of corresponding strategies for restoration. This invention is applicable to all real-world wave spectra.
[0091] 3) This invention can be directly implemented in existing, commonly used third-generation wave patterns.
[0092] The method for saving and reconstructing wave spectra was originally designed for nested wave simulations, but the original method did not explain how to operate in modern wave models based on FORTRAN programs. The key issue is that it failed to solve the FORTRAN coding problem of least-squares fitting of the general single-peak spectrum model, especially the establishment of the Jacobian and Hessian matrix transformation formulas of the general single-peak spectrum model.
[0093] This invention establishes the Jacobian and Hessian matrix transformation formulas for a general single-peak spectrum model. Using the RALFit open-source package, the improved wave spectrum preservation and reconstruction method is written as a FOTRAN module and successfully applied to the third-generation wave model MASNUM-WAM, independently developed in my country. This truly establishes a practical method for preserving and reconstructing wave spectrum boundaries in nested wave simulations.
[0094] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention and within the spirit and principles of the present invention should be covered within the scope of protection of the present invention.< / datetime> < / rpname> < / datetime> < / rpname> < / rpname> < / rpname>
Claims
1. A sea wave spectrum storage reconstruction method based on a new sea wave spectrum data access structure, characterized in that, The method comprises the following steps: S1, segmenting a two-dimensional sea wave spectrum to obtain a plurality of spectrum partitions, each spectrum partition having only one spectrum peak; and integrating the spectrum partitions along the direction and frequency dimensions respectively to obtain one-dimensional frequency spectrum and direction distribution; S2, segmenting the frequency spectrum of each spectrum partition with the spectrum peak as a boundary, and respectively judging whether the number of available samples in the front and rear parts of the frequency spectrum is sufficient to perform least square fitting; when the number is insufficient, directly storing the frequency spectrum values of the insufficient part into the reconstruction parameters and marking them; when the number is sufficient, performing least square fitting on the sufficient part using a general single-peak spectrum model to obtain the spectrum reconstruction parameters of the corresponding part; S3, judging the number of non-zero samples of the direction distribution; when the number of non-zero samples is less than or equal to 4, storing the non-zero values into the reconstruction parameters and marking them; otherwise, calculating the average direction and the direction moments of each order of the direction distribution of each spectrum partition to obtain the direction distribution reconstruction parameters; S4, the value space of all reconstruction parameters including spectrum, direction distribution original value and label is controlled in 10 -6 -10 2 , and the to-be-saved reconstruction parameters are converted into integer numbers after being taken in the logarithmic form with base 10, being scaled and added with an offset value; a single-dimensional reconstruction parameter file structure and a metadata file matched with the same are designed to save reconstruction parameters of all spectral partitions; S5, during reconstruction, restoring the frequency spectrum and direction distribution of each spectrum partition using the reconstruction parameters, and superimposing all the reconstructed spectrum partitions to obtain a two-dimensional reconstructed sea wave spectrum.
2. The method according to claim 1, wherein the new sea spectrum data access structure is used to save and reconstruct the sea spectrum. In step S2, after fitting, the front and rear scaling parameters are abandoned, the values at the spectrum peak are used to normalize the front and rear parts of the 1D frequency spectrum, and the overall scaling parameter is used for scaling, so that the frequency spectrum reconstruction parameters are reduced from 9 to 7; the 7 parameters include the overall scaling parameter, the spectrum peak frequency, and the front and rear parameters of the general single-peak spectrum model.
3. The method according to claim 1, wherein the new sea spectrum data access structure is used to save and reconstruct the sea spectrum. In step S2, the least square fitting uses the Jacobian matrix and the Hessian matrix for the general single-peak spectrum model; For the general single-peak spectrum model, the expression is: ; ; wherein, is a general single peak spectral model, is a dimensionless frequency, is a frequency, is a spectral peak frequency; are four expressions respectively decomposed from the single peak spectral model, as follows; The expression is: ; ; ; ; wherein represents the reconstructed parameters to be fitted in the generic single peak spectral model, is a natural exponential function, is a natural exponential, ; When fitting the first half of the general single-peak spectral model, let The Jacobian matrix used is: ; wherein is the partial derivative operator, is the Jacobian matrix of the general singlet spectral model with 3 undetermined parameters, is the general singlet spectral model ; The corresponding Hessian matrix is: ; wherein is the Hessian matrix of the general single peak spectral model with 3 pending parameters; When fitting the latter half of the general single-peak spectrum model, the Jacobian matrix used is: ; wherein is the general single peak spectral model Jacobian matrix with 6 unknown parameters; The corresponding Hessian matrix is: ; wherein is the Hessian matrix of the general single peak spectral model with 6 pending parameters; The first-order partial derivative algorithm of the transformation is: ; ; ; ; ; ; The second-order partial derivative algorithm is: ; ; ; ; ; ; The above The first-order partial derivative algorithm is as follows: ; ; ; ; ; The second-order partial derivative algorithm is as follows: ; ; ; ; ; ; ; In the formula, is the natural logarithm function; And, And After the two transformation matrices are established, the parameters of the front part of the general single-peak spectrum model and the back part of the general single-peak spectrum model , , are fitted with as the independent variable.
4. The method according to claim 1, wherein the new sea spectrum data access structure is used to save and reconstruct the sea spectrum. In step S2, the reconstruction parameters of the front part of the spectrum are obtained , and , and the reconstruction parameters of the back part of the spectrum , , , , , ; wherein and are scaling parameters, obtained by fitting and , and and are discarded for saving; in the restoration, they are replaced by the constant 1; after restoring the front part and the back part of the spectrum , each is divided by and the value at the spectral peak, is the last value of the array sequence, is the first value of the array sequence; so that the two parts before and after the spectral peak are naturally merged; and the merged is scaled by the reconstruction parameters , and the spectrum is restored, the reconstruction parameter reduction of the single-peak spectrum partition spectrum is described as .
5. The method according to claim 1, wherein the method is characterized by: In step S2, those with insufficient available samples... , and The values are directly assigned to the reconstruction parameters and marked so that they can be effectively identified and directly read into the reconstructed spectrum during reconstruction.
6. The method according to claim 5, wherein the new sea spectrum data access structure is used to save and reconstruct the sea spectrum. if If the number of available samples is less than or equal to 2, then... Store the original value The default value is 0, and it is given Mark it, and add 50 to the original value; if If the number of available samples is less than or equal to 5, then... Store the original value The default value is 0, and it is given Mark it, and add 50 to the original value; if If the number of available samples is less than 4, then... The index of the first non-zero value in the sequence is stored in In, and sequentially store all non-zero values in The default value is 0; Set as a flag, and add 7 to the original value.
7. The method according to claim 1, wherein the method is characterized by: In step S4, the reconstruction parameters are converted from floating-point data to integer data to compress the storage space; the conversion includes: taking the logarithm to the base 10 of the obtained floating-point reconstruction parameters occupying 4 bytes or 8 bytes, and then adding an offset value and a scaling coefficient to finally obtain an integer number occupying 1 or 2 bytes for storage; wherein the floating-point reconstruction parameters include the original spectrum / direction distribution values with marks.
8. The method according to claim 7, wherein the new sea spectrum data access structure is used to save and reconstruct the sea spectrum. Converting the reconstruction parameters from floating-point data to integer data specifically includes the following steps: a. For the reconstruction parameters The normal value range is controlled at 2.5 x 10 -5 56.2500, corresponding to the effective wave height 0.02~30m; b. For the reconstruction parameter , the lower bound 10 -5 and the upper bound 10 are set in the fitting process , and the lower bound 1 and the upper bound 10, the normal fitting reconstruction parameter range is between 10 -5 ~10 1 ; for the case of insufficient available samples, the spectral value at the spectral peak is additionally added by 50 as a marker, and the value range of the spectral reconstruction parameter of each spectral partition is between 0~10 2 ; c. For reconstruction parameters The normal calculation range is as follows: , , and ;right Add 10 to the original value to control the range of the normally saved orientation distribution reconstruction parameter to 0~11; for cases where there are insufficient available samples, Marked as The index of the first non-zero value in the sequence, ranging from 1 to 48, will be used as the index value. Add 7 extra; due to The values of the reconstructed directional distribution parameters for each spectral partition, including the markers and original values, range from 0 to 10. 2 ; d. For reconstruction parameters , expressed as index values in the frequency space, saved as 1-byte integers, can show data range , the frequency space is saved as necessary information; e.The value range of the 13 reconstruction parameters required for the single peak spectrum partition is 0~10 2 The lower limit of the range is set to 10 -6 Then the float type variable Map to integer type variable by taking logarithm Linearly map to 2 byte integer type variable The data range can be shown as ); Conversion: the reconfiguration parameters except are converted a~c are converted and taken in logarithmic form , converted again wherein is an integer operation; reconfiguration parameters are saved directly in 1 byte integer numbers according to d above; Restore: Restore the case , and restore the other cases and , except reconstruction parameters according to the corresponding a ~ c restored to the original; reconstruction parameters then through the index of 1 byte through the saved frequency space restoration; At this point, all floating-point reconstruction parameters with marks and original spectrum values occupying 4 or 8 bytes are converted into integer variables occupying 1 or 2 bytes for storage.
9. The method according to claim 1, wherein the method is characterized by, In step S4, the reconstruction parameters are saved using a metadata file and a reconstruction parameter file, the metadata file contains the division information of the spectrum space and the geographical space, and the reconstruction parameter file stores the reconstruction parameters according to the date; The metadata file includes the frequency / wave number dimension, the direction dimension, the longitude dimension, the latitude dimension, and the number dimension of the output position, the wave number division and the direction division of the spectrum space, the longitude division and the latitude division of the geographical space, the output point serial number, the longitude index value, the latitude index value, the frequency division of the spectrum space, and the group velocity variable corresponding to the frequency division; All variables in the reconstruction parameter file are single-dimensional, including the index number of the storage location, the record number within the file's date range, and the reconstruction parameter variables. , , , , , , , , , , , and The reconstruction parameter variables are stored as integers, and the reconstruction parameter files are named according to the date.
10. A new sea spectrum data access structure based sea spectrum storage reconstruction system for implementing the new sea spectrum data access structure based sea spectrum storage reconstruction method according to any one of claims 1-9, characterized in that, The system comprises: The spectrum and direction distribution obtaining module is configured to segment the two-dimensional sea wave spectrum to obtain a plurality of spectrum partitions, each of which has only one spectrum peak; and to integrate each spectrum partition along the direction and frequency dimensions to obtain one-dimensional spectrum and direction distribution; The spectrum reconstruction parameter fitting module is configured to segment the spectrum of each spectrum partition with the spectrum peak as a boundary, to determine whether the number of available samples in the front part and the rear part of the spectrum is sufficient to perform least square fitting, to directly store the spectrum values of the insufficient part into the reconstruction parameter and mark the spectrum values when the number of available samples is insufficient, and to perform least square fitting on the sufficient part using a general single-peak spectrum model to obtain the spectrum reconstruction parameter of the corresponding part when the number of available samples is sufficient; The direction distribution reconstruction parameter obtaining module is configured to determine the number of non-zero samples of the direction distribution; to store the non-zero values into the reconstruction parameter and mark the non-zero values when the number of non-zero samples is less than or equal to 4; and to calculate the average direction and the direction moments of each order of the direction distribution of each spectrum partition to obtain the direction distribution reconstruction parameter when the number of non-zero samples is greater than 4; The sea wave spectrum storage module is used for controlling the value space of all reconstruction parameters including the frequency spectrum, the direction distribution original value and the mark to 10 -6 -10 2 and taking the logarithm form with 10 as the base, and then converting the to-be-stored reconstruction parameter into an integer number after scaling and adding an offset value; a single-dimension reconstruction parameter file structure and a metadata file matched with the same are designed to store all spectrum partition reconstruction parameters; The sea wave spectrum reconstruction module is configured to restore the spectrum and direction distribution of each spectrum partition using the reconstruction parameter, and to superimpose all the reconstructed spectrum partitions to obtain a two-dimensional reconstructed sea wave spectrum.