A high performance numerical weather forecast analysis method

By encoding numerical weather forecast data and processing GPU programming, the problem of interactive analysis delay in the existing technology is solved, high-performance numerical weather forecast data display is achieved, and the drawing speed and user experience are significantly improved.

CN118428559BActive Publication Date: 2024-08-27NATIONAL METEOROLOGICAL CENTRE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410875397.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2024-08-27
Estimated Expiration
2044-07-02

AI Technical Summary

Technical Problem

Existing numerical weather forecasting methods have delays in interactive analysis, especially when rapidly switching meteorological data, when large amounts of data are drawn, and complex graphics are drawn, which affects the user experience of professionals.

Method used

By extracting a two-dimensional data field with a resolution of Scale, showing pixel-by-pixel data values ​​according to a color table.

Benefits of technology

The data display performance is greatly improved, and the real-time drawing speed is reduced to less than 2ms, which significantly improves the experience of professionals when using massive numerical forecast data for weather analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118428559B
    Figure CN118428559B
Patent Text Reader

Abstract

The present invention provides a high-performance numerical weather forecast analysis method, which belongs to the field of data analysis technology. It includes: extracting a two-dimensional data field with a resolution of #imgabs0#, encoding to form a normalized array, and dividing all data equally; converting the data to obtain an #imgabs1# array; passing #imgabs2#, #imgabs3#, #imgabs4# and longitude and latitude as calculation parameters into the GPU programming of the analysis system; obtaining the coordinates of the GIS map object under the Mercator projection, and passing the coordinates as map calculation parameters into the GPU programming of the analysis system; converting the Mercator coordinates into longitude and latitude coordinates and calculating the position ratio of the longitude and latitude point within the entire two-dimensional data field; obtaining a data coordinate vector according to the longitude and latitude coordinates, and returning the data coordinate vector corresponding to each pixel of the screen according to the color table for display. The present invention increases the screen display speed to less than 2ms by re-encoding the data and concurrently processing multiple rendering pipelines.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of data analysis, and in particular relates to a high-performance numerical weather forecast analysis method. Background Art

[0002] Numerical forecast is one of the necessary data for weather forecasting to conduct weather analysis and forecasting business support. Through numerical forecast, professionals can understand the weather situation in the sky and on the ground, and understand the accurate weather development trend in the next few days. In particular, high-resolution numerical forecast can more accurately show the future weather development and changes, and assist professionals in making accurate weather forecasts.

[0003] There are generally two ways for professionals to use numerical forecasting: (1) Generate weather analysis maps in advance: Draw various numerical forecasts required for weather analysis in advance, generate weather images in PNG format, and view and analyze them through the system. This method displays data quickly, but the weather map is a picture of a fixed area generated in advance, and it cannot be aligned for interactive analysis, such as zooming in for detailed analysis of the local area. Moreover, if there are many types of weather maps required, it takes a long time to make maps in advance. It takes a lot of time from the generation of upstream numerical forecast data to the completion of preprocessing and drawing, which will have a certain impact on the timeliness of forecasting services. (2) Use WebGIS for real-time drawing: Transfer the numerical forecast data to the front-end browser and use a WebGIS engine such as Leaflet or Mapbox for real-time drawing. The most commonly used MICAPS in the current meteorological system adopts this method. Using this method to display numerical forecasts can facilitate professionals to conduct interactive analysis of numerical forecasts and is relatively convenient to use. However, the current common weather analysis software generally uses the Canvas drawing method for real-time drawing when displaying numerical forecast data. Using this method to draw weather maps has a faster development speed and better display performance. Generally, the full-screen weather map drawing speed is 500~1000ms; but when forecasters quickly switch meteorological data, when the data volume is large and the graphics are complex, this delay will still have a certain impact on the user experience of professionals. Summary of the invention

[0004] The present invention provides a high-performance numerical weather forecast analysis method, the improvement of which lies in that the method comprises:

[0005] Step (1) Extraction resolution is The two-dimensional data field is encoded to form a normalized array, and all the data are equally divided;

[0006] Step (2) converts the data in the two-dimensional data field to obtain Arrays;

[0007] Step (3) convert the two-dimensional data field into , , The longitude and latitude are passed into the GPU programming of the analysis system as calculation parameters;

[0008] Step (4) obtaining the screen pixel Mercator coordinates of the GIS map object under the Mercator projection, and passing these two coordinates as map calculation parameters into the GPU programming of the analysis system;

[0009] Step (5) converting the screen pixel Mercator coordinates into longitude and latitude coordinates, and calculating the position ratio of the longitude and latitude point within the entire two-dimensional data field;

[0010] Step (6) obtains the data coordinate vector according to the longitude and latitude coordinates, and returns the data coordinate vector corresponding to each pixel of the screen for display according to the color table.

[0011] Furthermore, the step (1) comprises:

[0012] (1-1) The resolution extracted from the numerical model is The two-dimensional data field is encoded to form a normalized array;

[0013] (1-2) Extract the minimum value in the two-dimensional data field and maximum value ;

[0014] (1-3) All the data in the entire two-dimensional data field are sorted from the minimum value To the maximum value , divided into 65534 equal parts;

[0015] (1-4) Use {65535} to represent missing values ​​in the data;

[0016] (1-5) All data in the entire two-dimensional data field are represented by a value between 0 and 65535.

[0017] Furthermore, the equal division is 65534 parts, 0-65534 represent the values ​​from the minimum value to the maximum value respectively, and the calculation formula is as follows:

[0018] ; ;

[0019] in, The data accuracy after the minimum value to the maximum value of the data field is divided into 65534 parts, that is, the step size;

[0020] The original floating-point data is converted to an integer after normalization, and the encoded value of the data under the new data encoding.

[0021] Furthermore, the step (2) comprises:

[0022] (2-1) Convert each number in the data into 2 To express;

[0023] (2-2) Complete the conversion of all data in the entire two-dimensional data field and obtain Arrays;

[0024] (2-3) The content of the array is each number arranged in sequence ;in, The length of the array is: ;

[0025] in, The array size for converting the entire data field to the new encoding format.

[0026] Furthermore, the step (3) includes:

[0027] (3-1) Create a screen size with width and height Same GPU drawing object;

[0028] (3-2) All the data in the processed two-dimensional data field Array, passed into the analysis system GPU programming interface;

[0029] (3-3) , , As calculation parameters, they are passed into the analysis system GPU programming interface;

[0030] (3-4) The longitude and latitude range in the two-dimensional data field As calculation parameters, they are passed into the analysis system GPU programming interface.

[0031] Furthermore, the step (4) comprises:

[0032] (4-1) Get the map coordinates of the lower left and upper right corners of the screen range of the current map under the default projection , , and pass the coordinates as map calculation parameters into the analysis system GPU programming interface;

[0033] (4-2) In the analysis system GPU programming, the coordinate position of the current drawing screen pixel is obtained through the global parameters built into the fragment shader;

[0034] (4-3) According to the current screen pixel coordinates and the resolution of the entire screen, the Mercator coordinates of the screen pixels are obtained point by point by using linear proportional interpolation.

[0035] Furthermore, the calculation formula of step (4-3) is as follows:

[0036] ;

[0037] ;

[0038] Where x and y are the screen coordinates of the current pixel.

[0039] Furthermore, the step (5) comprises:

[0040] (5-1) Use the Mercator projection conversion formula to convert the Mercator coordinates of the current screen pixel into longitude and latitude coordinates ;

[0041] (5-2) The conversion formula from Mercator coordinates to latitude and longitude coordinates is:

[0042] ;

[0043] ;

[0044] ;

[0045] Among them, R is the radius of the earth, which is 6378137.0 meters.

[0046] (5-3) Obtain the longitude and latitude coordinates of the screen pixel and calculate the position ratio of the longitude and latitude point in the entire two-dimensional data field;

[0047] (5-4) The calculation method is as follows: ;

[0048] ;

[0049] The horizontal and vertical coordinate ranges of the entire data field are expressed as [0-1], , Indicates the ratio of the current screen pixel coordinate position in the entire data field.

[0050] Furthermore, the step (6) comprises:

[0051] (6-1) In the GPU, based on the current screen coordinate position, the data index position corresponding to the coordinate position in the data field is calculated and Get the data pair corresponding to the point position in the array , ;

[0052] ;

[0053] Among them, M and N are the number of columns and rows of data at the meteorological data field grid points respectively;

[0054] As mentioned before, each data needs to occupy two bytes. The data corresponding to the current screen pixel needs to occupy 2 bytes for each item. , The values ​​are:

[0055] ;

[0056] ;

[0057] (6-2) By normalizing the parameters , , , the byte array can be restored to the data value of the original meteorological field before encoding. The algorithm is as follows:

[0058] (6-3) ;

[0059] (6-4) Get the original data value corresponding to the screen pixel, return the color corresponding to each pixel of the screen by looking up the color table, and display it on the screen.

[0060] Beneficial effects:

[0061] The present invention reduces the transmission capacity of data in each link by re-encoding the data; and utilizes the concurrent processing characteristics of multiple rendering pipelines of the GPU to increase the display speed of the entire screen to less than 2ms, greatly improving the display performance of the data and improving the user experience of professionals when using massive numerical forecast data for weather analysis.

[0062] It should be understood that the above general description and the following specific embodiments are only exemplary and illustrative and do not limit the scope of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 A flow chart of a high performance numerical weather forecast analysis method according to the present invention;

[0064] It should be understood that the drawings are not necessarily drawn to scale, presenting somewhat simplified representations of various features illustrative of the basic principles of the present disclosure. The specific design features of the present invention as disclosed herein, including, for example, specific dimensions, orientations, locations, and shapes will be determined in part by the particular intended application and use environment.

[0065] In the drawings, reference numbers refer to the same or equivalent parts of the present invention throughout the several figures of the drawing. DETAILED DESCRIPTION

[0066] Reference will now be made in detail to various embodiments of the present invention, examples of which are illustrated in the accompanying drawings and described below. Although the present invention will be described in conjunction with exemplary embodiments of the present invention, it should be understood that this specification is not intended to limit the present invention to those exemplary embodiments. On the other hand, the present invention is intended to cover not only the exemplary embodiments of the present invention, but also various alternatives, modifiers, equivalents and other embodiments, which may be included in the spirit and scope of the present invention as defined by the appended claims.

[0067] Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. The specific structures and functions described in the exemplary embodiments of the present invention are for illustrative purposes only. Embodiments according to the concepts of the present invention can be implemented in various forms, and it should be understood that they should not be interpreted as being limited to the exemplary embodiments described in the exemplary embodiments, but include all modifications, equivalents or substitutes included in the spirit and scope of the present invention.

[0068] Throughout the specification, the professional terms used herein are only for describing various exemplary embodiments and are not intended to be limiting. It will be further understood that the terms "include", "comprising", "having", etc., when used in the exemplary embodiments, specifically refer to the presence of the stated parts, steps, operations or elements, but do not exclude the presence or addition of one or more other parts, steps, operations or elements.

[0069] The present invention improves the drawing speed of high-precision numerical weather forecast data, and increases the real-time drawing speed of full-screen numerical weather forecast maps to within 10ms, greatly improving the efficiency of professionals in using numerical forecast products through interactive drawing.

[0070] like Figure 1 As shown, the present invention can quickly display high-precision numerical forecasts through the front-end WebGIS. Starting from the data format preprocessing stage, the data is re-encoded while maintaining data accuracy to reduce the data volume, and it is convenient to directly transfer it as a material to the weather forecast analysis system GPU programming for display. The specific steps of the present invention include:

[0071] S1. Extract the resolution from the numerical model The two-dimensional data field is encoded to form a normalized array. The encoding rules of the normalized array are as follows:

[0072] First, extract the minimum and maximum values ​​of the entire field. , ;

[0073] All the data in the entire two-dimensional data field are sorted from the minimum value To the maximum value , divided into 65534 equal parts, 0-65534 are used to represent the values ​​from the minimum to the maximum value.

[0074] The calculation method is:

[0075] ;

[0076] ;

[0077] There are 65535 copies of 0-65534, and {65535} is used to represent the missing value in the data. All data in the entire two-dimensional data field can be represented by a value between 0-65535.

[0078] in, The data accuracy after the minimum value to the maximum value of the data field is divided into 65534 parts, that is, the step size;

[0079] The original floating-point data is converted to an integer after normalization, and the encoded value of the data under the new data encoding.

[0080] S2. Convert each number in the data into 2 to represent; these two The calculation method is:

[0081] ; ;

[0082] Complete the conversion of all data in the entire two-dimensional data field in sequence and get a new An array, where The length of the array is:

[0083] ;

[0084] in, The array size for converting the entire data field into the new encoding format;

[0085] The content of the array is each number arranged in sequence .

[0086] S3. Create a grid in the WebGIS engine on the front end of the analysis system that matches the screen size in width and height. Same GPU drawing object.

[0087] Get the WebGIS analysis system GPU programming interface object through the getContext("webgl") method of the GPU drawing object;

[0088] All the data in the processed meteorological two-dimensional data field are used as Sampler2D data and transferred to the GPU programming interface of the analysis system;

[0089] Will , , As calculation parameters, they are passed into the analysis system GPU programming interface;

[0090] Set the latitude and longitude range of the lower left and upper right corners of the data field As calculation parameters, they are passed into the analysis system GPU programming interface;

[0091] S4. Get the map coordinates of the lower left and upper right corners of the screen range of the current map under the default projection through the getExtent() method of the WebGIS interface , , and pass these two coordinates as map calculation parameters into the analysis system GPU programming interface;

[0092] In the analysis system GPU programming, the coordinate position of the current drawing screen pixel is obtained through the built-in global parameters of the fragment shader;

[0093] According to the current screen pixel coordinates and the resolution of the entire screen, the Mercator coordinates of the screen pixels are obtained point by point by using linear proportional interpolation. The calculation method is as follows:

[0094] ;

[0095] ;

[0096] Where x and y are the screen coordinates of the current pixel.

[0097] S5. Use the Mercator projection conversion formula to convert the Mercator coordinates of the current screen pixel into latitude and longitude coordinates ;

[0098] ;

[0099] ;

[0100] ;

[0101] Where R is the radius of the earth, which is 6378137.0 meters;

[0102] After obtaining the longitude and latitude coordinates of the screen pixel, calculate the position ratio of the longitude and latitude point in the entire two-dimensional data field. The calculation method is as follows:

[0103] ;

[0104] ;

[0105] The horizontal and vertical coordinate ranges of the entire data field are expressed as [0-1], , Indicates the ratio of the current screen pixel coordinate position in the entire data field.

[0106] S6. Use the built-in texelFetch method of the fragment shader to obtain the data coordinate vector vec4 corresponding to the adjacent point value of the pixel coordinate in the Sampler2D material data:

[0107]

[0108] Based on the value vec4 coordinate vector obtained from the screen pixel, use the a and r channels to restore it back to the original data:

[0109]

[0110] At this point, the original data value corresponding to the screen pixel can be obtained. By looking up the color table, the vec4 color corresponding to each pixel of the screen can be returned and displayed on the screen.

[0111] The above-mentioned embodiments of the present application can be implemented in various hardware, software coding or a combination of the two. For example, the embodiments of the present application can also represent the program code for executing the above-mentioned method in a data signal processor. The present application can also relate to the various functions performed by a computer processor, a digital signal processor, a microprocessor or a field programmable gate array. The above-mentioned processor can be configured according to the present application to perform specific tasks, which are completed by executing machine-readable software code or firmware code that defines the specific method disclosed by the present application. The software code or firmware code development can represent different programming languages ​​and different formats or forms. Different target platform compiled software codes can also be represented. However, the different code styles, types and languages ​​of the software code for performing tasks according to the present application and other types of configuration codes do not depart from the spirit and scope of the present application.

[0112] The foregoing description of specific exemplary embodiments of the present invention has been presented for the purpose of illustration and description. It is not intended to exclude or limit the present invention to the precise form disclosed, and it is obvious that many modifications and changes are feasible in view of the above teachings. Exemplary embodiments are selected and described to explain certain principles of the present invention and their practical application, so that other technicians in the field can make or use various exemplary embodiments of the present invention, and various alternatives and modifications thereof. It is intended that the scope of the present invention will be defined by the claims attached hereto and their equivalents.

[0113] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present invention, but the present invention is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.

Claims

1. A high performance numerical weather forecast analysis method, characterized in that: The method comprises: Step (1) Extraction resolution is The two-dimensional data field is encoded to form a normalized array, and all the data are equally divided; Step (2) converts the data in the two-dimensional data field to obtain Arrays; Step (3) convert the two-dimensional data field into , , The longitude and latitude are passed into the GPU programming of the analysis system as calculation parameters; Step (4) obtaining the screen pixel Mercator coordinates of the GIS map object under the Mercator projection, and passing these two coordinates as map calculation parameters into the GPU programming of the analysis system; Step (5) converting the screen pixel Mercator coordinates into longitude and latitude coordinates, and calculating the position ratio of the longitude and latitude point within the entire two-dimensional data field; Step (6) obtains the data coordinate vector according to the longitude and latitude coordinates, and returns the data coordinate vector corresponding to each pixel of the screen for display according to the color table.

2. A high performance numerical weather forecast analysis method according to claim 1, characterized in that: The step (1) comprises: (1-1) The resolution extracted from the numerical model is The two-dimensional data field is encoded to form a normalized array; (1-2) Extract the minimum value in the two-dimensional data field and maximum value ; (1-3) All the data in the entire two-dimensional data field are sorted from the minimum value To the maximum value , divided into 65534 equal parts; (1-4) Use {65535} to represent missing values ​​in the data; (1-5) All data in the entire two-dimensional data field are represented by a value between 0 and 65535.

3. A high performance numerical weather forecast analysis method according to claim 2, characterized in that: The equal parts are 65534, 0-65534 represent the values ​​from the minimum to the maximum, and the calculation formula is as follows: ; ; in, The data accuracy after the minimum value to the maximum value of the data field is divided into 65534 parts, that is, the step size; The original floating-point data is converted to an integer after normalization, and the encoded value of the data under the new data encoding.

4. A high performance numerical weather forecast analysis method according to claim 1, characterized in that: The step (2) comprises: (2-1) Convert each number in the data into 2 To express; (2-2) Complete the conversion of all data in the entire two-dimensional data field and obtain Arrays; (2-3) The content of the array is each number arranged in sequence ;in, The length of the array is: ; in, The array size for converting the entire data field to the new encoding format.

5. A high performance numerical weather forecast analysis method according to claim 1, characterized in that: The step (3) comprises: (3-1) Create a screen size with width and height Same GPU drawing object; (3-2) All the data in the processed two-dimensional data field Array, passed into the analysis system GPU programming interface; (3-3) , , As calculation parameters, they are passed into the GPU programming interface of the analysis system; (3-4) The longitude and latitude range in the two-dimensional data field As calculation parameters, they are passed into the analysis system GPU programming interface.

6. A high performance numerical weather forecast analysis method according to claim 1, characterized in that: The step (4) comprises: (4-1) Get the map coordinates of the lower left and upper right corners of the screen range of the current map under the default projection , , and pass the coordinates as map calculation parameters into the analysis system GPU programming interface; (4-2) In the analysis system GPU programming, the coordinate position of the current drawing screen pixel is obtained through the global parameters built into the fragment shader; (4-3) According to the current screen pixel coordinates and the resolution of the entire screen, the Mercator coordinates of the screen pixels are obtained point by point by using linear proportional interpolation.

7. A high performance numerical weather forecast analysis method according to claim 6, characterized in that: The calculation formula of step (4-3) is as follows: ; ; Where x and y are the screen coordinates of the current pixel.

8. A high performance numerical weather forecast analysis method according to claim 1, characterized in that: The step (5) comprises: (5-1) Use the Mercator projection conversion formula to convert the Mercator coordinates of the current screen pixel into longitude and latitude coordinates ; (5-2) The conversion formula from Mercator coordinates to latitude and longitude coordinates is: ; ; ; Where R is the radius of the earth, which is 6378137.0 meters; (5-3) Obtain the longitude and latitude coordinates of the screen pixel and calculate the position ratio of the longitude and latitude point in the entire two-dimensional data field; (5-4) The calculation method is as follows: ; The horizontal and vertical coordinate ranges of the entire data field are expressed as [0-1], , Indicates the ratio of the current screen pixel coordinate position in the entire data field.

9. A high performance numerical weather forecast analysis method according to claim 1, characterized in that: The step (6) comprises: (6-1) In the GPU, based on the current screen coordinate position, the data index position corresponding to the coordinate position in the data field is calculated and Get the data pair corresponding to the point position in the array , ; ; Among them, M and N are the number of columns and rows of data at the meteorological data field grid points respectively; Each data needs to occupy two bytes. The data corresponding to the current screen pixel needs to occupy 2 bytes for each item. , The values ​​are: ; ; (6-2) By normalizing the parameters , , , the byte array can be restored to the data value of the original meteorological field before encoding. The algorithm is as follows: (6-3) ; (6-4) Get the original data value corresponding to the screen pixel, return the color corresponding to each pixel of the screen by looking up the color table, and display it on the screen.