A method for analyzing the dynamic changes of nearshore thermocline

By processing and analyzing profiling buoy data and utilizing Python and Tensorflow technologies, the error problem in calculating the depth of the nearshore thermocline was solved, enabling high-precision dynamic change analysis and visualization, which is suitable for studying the dynamic changes of the nearshore thermocline.

CN115796342BActive Publication Date: 2026-06-30OCEAN UNIV OF CHINA

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
OCEAN UNIV OF CHINA
Filing Date
2022-11-16
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing technologies suffer from large errors, uneven data distribution, and an inability to dynamically analyze nearshore thermocline changes when calculating thermocline depth. In particular, due to the significant differences in temporal and spatial characteristics in nearshore environments, existing methods cannot accurately identify the upper and lower boundaries of the thermocline depth.

Method used

Temperature profile data of nearshore waters were obtained using profiling buoys. Noise reduction and data preprocessing were performed using Python. Lagrange quadratic interpolation and Tensorflow downsampling techniques were used, combined with slope correction fitting of temperature and depth data, to determine the depth of the thermocline and perform visualization analysis.

Benefits of technology

It enables high-precision dynamic analysis and visualization of nearshore thermoclines, improves the accuracy of thermocline depth calculation and data uniformity, and can dynamically display the change process of nearshore thermoclines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115796342B_ABST
    Figure CN115796342B_ABST
Patent Text Reader

Abstract

This invention provides a method for analyzing the dynamic changes of the nearshore thermocline. Based on temperature profile data of a nearshore sea area obtained from profiling buoys over a period of time, noise reduction is first performed. By comparing the magnitudes of two adjacent depth data points, the depth range of the observed sea area can be extracted. Then, the rising profile data is extracted. Further filtering and processing are then performed to complete the data downsampling and interpolation process. Historical data is matched for temporal and spatial characteristics to obtain corresponding threshold conditions. The thermocline is extracted based on the slope changes of the temperature data and the threshold judgment. Dynamic changes in the thermocline are extracted and stored. Based on the index values ​​of the time and thermocline data, the dynamic changes of the thermocline are visualized. This method realizes the analysis and visualization of the dynamic changes of the nearshore thermocline, solving the problems of accurately calculating the thermocline and conducting dynamic changes analysis of the nearshore thermocline.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of marine surveying and mapping technology, and in particular to a method for analyzing the dynamic changes of nearshore thermoclines. Background Technology

[0002] The oceanic thermocline is a water layer in which the temperature characteristics of seawater undergo abrupt or discontinuous drastic changes in the vertical direction. It is mainly used to distinguish the physical properties of the upper and lower layers of seawater. Nearshore thermoclines generally begin to form in spring, reach their peak in summer, begin to dissipate in autumn, and basically disappear in winter. Thermoclines are crucial in military and biological environmental fields. Finding the accurate thermocline can help us make rational use of it. Foreign countries started collecting and analyzing seawater characteristics earlier than my country. In recent years, my country has also begun to recognize the importance of studying thermoclines, and more and more people are conducting research on thermoclines. As research continues to deepen, people's need for detailed observation of the ocean's profile structure is becoming more and more obvious, and the development of marine observation equipment has become an urgent need for observing the detailed structure of the ocean.

[0003] However, current ocean temperature profile data mainly relies on methods such as the Argo buoy observation array and sensor nodes for acquisition. However, the temperature profile data obtained by these observation methods has low accuracy. When analyzing the thermocline, interpolation to the ideal accuracy is often required before data processing, which can lead to some unnecessary errors. High-precision, detailed observations can also result in uneven data distribution, which can also lead to errors. Furthermore, the temperature of nearshore seawater is greatly affected by nearshore human activities, solar radiation, and strong winds, and the thermocline can change significantly in a short period of time. Dynamic analysis of the thermocline remains an unsolved problem.

[0004] Currently, the following methods are mainly used to calculate the depth of the thermocline:

[0005] (1) ST method: The ST method uses SST (sea surface temperature) minus 0.5℃ to obtain the temperature value as the upper boundary of the thermocline. This method cannot determine the lower boundary of the thermocline, and is greatly affected by time and space changes, resulting in low accuracy of the results.

[0006] (2) Curvature extreme point method: This method requires calculating the curvature of the temperature vertical distribution curve and drawing the curvature change diagram at each point on the vertical gradient. The upper and lower boundaries of the thermocline are determined by using the maximum and minimum values ​​of the curvature extremes. This method is relatively accurate in identifying the thermocline in sea areas with typical strong thermocline structures, but it is difficult to determine the accurate upper and lower boundary depths of the thermocline.

[0007] (3) Vertical gradient method: This method is specified in my country's "Marine Survey Specifications". The minimum temperature gradient value in deep water is 0.05℃ / m, and the minimum temperature gradient value in shallow water is 0.2℃ / m. First, the vertical temperature gradient of the collected and processed temperature is calculated. The thermocline is the water layer with a vertical gradient value greater than or equal to the minimum standard. However, since the depth of deep water and shallow water is defined as 200m, the minimum temperature gradient value is often used to judge the thermocline at the boundary between deep water and shallow water and in most shallow water areas, which often has a large error. Therefore, the temperature gradient value needs to be adjusted, which requires a lot of human intervention.

[0008] Existing technologies for calculating thermocline depth using refined observation data suffer from several drawbacks. High observation frequency and interference from unknown sea conditions lead to uneven vertical data distribution and even data misalignment between upper and lower layers, ultimately affecting the accuracy of the results. Furthermore, existing technologies use a single, fixed threshold to judge thermoclines from different times and sea areas, failing to consider the unique characteristics of nearshore waters, which exhibit strong temporal and spatial features and significant differences in the vertical distribution of seawater across different regions. During calculations, fluctuations at the thermocline boundary introduce errors. Finally, existing technologies can only calculate and display the average thermocline over a long period, failing to capture dynamic changes within the thermocline over short timeframes. Summary of the Invention

[0009] To overcome the shortcomings and deficiencies of existing technologies, this invention provides a method for analyzing the dynamic changes of the nearshore thermocline. This method utilizes refined observation data obtained from profiling buoys to analyze the dynamic changes of the nearshore thermocline, thereby achieving the analysis of the dynamic changes of the nearshore thermocline and the visualization of the dynamic change process of the nearshore thermocline.

[0010] This invention provides a method for analyzing the dynamic changes of nearshore thermoclines, comprising the following steps:

[0011] (1) Import the temperature profile data of the nearshore waters obtained by the profiling buoy over a period of time into the computer to form a txt file of nearshore water temperature and depth profile data;

[0012] (2) Subtract the two adjacent depth data in the txt file one after the other. When the value suddenly changes from positive to negative or from negative to positive, determine whether it is the highest or lowest point of the profile. If it is the endpoint of the profile, perform the conversion search for ascending and descending profiles. If it is not the endpoint of the profile, determine it as noise data and delete it.

[0013] (3) Use a Python program to process the denoised txt file according to the following steps:

[0014] (3-1) Use a Python program to open the denoised txt file, read the opened txt file line by line, and store the time, depth, and temperature data into arrays respectively. Each data will carry an index value, and the time, depth, and temperature data with the same index value correspond to each other;

[0015] (3-2) Process the array of depth data in step (3-1) to achieve profile extraction. The specific process is as follows:

[0016] Set the name of the array of depth data as Depth, scan the Depth array from left to right, and compare the magnitudes of depth[i] and depth[i+1]. Here: i represents the position of the depth data in the array. If Depth[i] < Depth[i+1], it is recorded as a descending profile and given a corresponding label; if Depth[i] > Depth[i+1], it is recorded as an ascending profile and given a corresponding label. A neighboring descending profile and ascending profile are recorded as a complete profile, and an index value (index) is generated that records the maximum and minimum depths and the subscript index of Depth[i] corresponding to the profile segmentation. The profile is segmented through this index value. Due to the special nature of the profile buoy's movement in the offshore area: the descending process is irregular movement, and the ascending profile is continuous and uniform motion. Therefore, in this method, only the ascending profiles are extracted as the data basis; use the segmentation index recorded in the previous step to cut out the temperature, depth, and their corresponding time of each ascending profile and store them into a one-dimensional array respectively, and then store all the one-dimensional temperature arrays into a two-dimensional array formed by all temperature arrays in the form of elements. Subsequently, the one-dimensional arrays of depth and time are sequentially stored into the corresponding two-dimensional arrays in order;

[0017] (3-3) Process each profile extracted in step (3-2). The specific process is as follows:

[0018] (3-3-1) Duplicate item removal: Based on the depth data, use the enumerate function in Python to convert the entire depth array into an index sequence, traverse each depth data from top to bottom in turn, check whether there are duplicate values in the index sequence for each depth data. If there are duplicate values, return the index subscript of this depth data, store all the returned index subscripts into a specified array, and then delete and align the corresponding index subscripts in the temperature and time arrays to complete duplicate item removal;

[0019] (3-3-2) Error value elimination: Import the data processed in step (3-3-1); First, create an empty array nonIncreaseIndex to store the indices corresponding to the detected error values; Traverse each depth data in the depth array in sequence, compare Depth[i] and Depth[i+1], if Depth[i]>Depth[i+1], continue traversing, if Depth[i]<Depth[i+1], then store the index value at this time into the nonIncreaseIndex array; Delete and align the values at the indices corresponding to the nonIncreaseIndex array in the depth, temperature, and time arrays to complete error value elimination;

[0020] (3-3-3)Downsampling: First, count the number of data in each water layer with a unit of 10 meters, store all water layer data in the nums[] array, find the minimum value nums_min in the nums[] array, and use the water layer corresponding to nums_min as the reference water layer to perform downsampling operations on other water layers; Import the four-dimensional matrix (batch_size, depth, temperature, time) of each unit water layer, and use the nn.avg_pool() function encapsulated by TensorFlow to downsample other water layers except the reference water layer to the same dimension as the reference water layer, and separate the depth, temperature, and time data to complete downsampling;

[0021] (3-3-4)Interpolation: Use Lagrangian quadratic interpolation to interpolate the profile data into high-precision profile data with a precision of 5 cm to provide data support for thermocline calculation and visualization;

[0022] (4) Thermocline calculation: First, fit the interpolated data from step (3-3-4) into a temperature-time curve. The depth of the thermocline can be determined by the abrupt change in the curve. Record the depth of each range of the thermocline for subsequent thermocline calculation. Then, refit the temperature profile curve. The main method is to use the temperature and depth data of each water layer and the temperature and depth data of the upper and lower water layers to correct and fit the slope of the curve corresponding to each water layer. Then, use the depth of the thermocline recorded in the previous step to determine the range of the thermocline in the refitted temperature curve. Find the minimum absolute value of the slope in this range and store it in the array dT[]. Let dT = a verage(dT[]) updates dT for each thermocline calculation. dT[] has a time attribute, and different dT[] are used for different seasons. By repeatedly correcting dT[] for different seasons, this threshold is made more suitable for the calculation of thermoclines in the target sea area. The depth of the thermocline is calculated using dT obtained in the previous step. The absolute value of the slope after refitting the different water layers of each profile is compared with dT. If it is greater than dT, it is recorded as a suspected thermocline. After traversing all water layers of the profile, the adjacent thickness of the suspected thermocline is recorded as a thermocline if it is greater than 0.5m, and the adjacent thickness of the suspected thermocline is recorded as a non-thermocline if it is less than 0.5m. The thermocline merging is completed.

[0023] (5) Based on the thermocline calculation, the Python plotting library is used to draw the profile of the nearshore vertical temperature change with time and depth. Based on the profile, the thermocline data obtained in step (4) for each profile is plotted on the graph, and the profile can be selected and displayed.

[0024] The beneficial effects of this invention are as follows: the method can effectively process high-resolution, detailed observation data and can use the profile data obtained from the profile buoy to obtain the accurate thermocline depth, thereby realizing the analysis of dynamic changes in the nearshore thermocline and the visualization of the dynamic change process of the nearshore thermocline. Attached Figure Description

[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0026] Figure 1 A flowchart illustrating a method for analyzing the dynamic changes of nearshore thermoclines, provided in an embodiment of the present invention;

[0027] Figure 2This is a schematic diagram of the results of the dynamic analysis of the thermocline. Detailed Implementation

[0028] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0029] This embodiment provides a method for analyzing the dynamic changes of nearshore thermoclines, such as... Figure 1 As shown, it includes the following steps:

[0030] (1) Import the temperature profile data of the nearshore waters obtained by the profiling buoy over a period of time into the computer to form a txt file of nearshore water temperature and depth profile data;

[0031] (2) Subtract the two adjacent depth data in the txt file one after the other. When the value suddenly changes from positive to negative or from negative to positive, determine whether it is the highest or lowest point of the profile. If it is the endpoint of the profile, perform the conversion search for ascending and descending profiles. If it is not the endpoint of the profile, determine it as noise data and delete it.

[0032] (3) Use a Python program to process the denoised txt file according to the following steps:

[0033] (3-1) Use a Python program to open the denoised txt file, read the opened txt file line by line, and store the time, depth and temperature data into arrays respectively. Each data will have an index value, and the time, depth and temperature data with the same index value will correspond one by one.

[0034] (3-2) The array of depth data from step (3-1) is processed to extract the profile. The specific process is as follows:

[0035] Set the name of the array of depth data as Depth. Scan the Depth array from left to right and compare the magnitudes of depth[i] and depth[i+1], where: i represents the position of the depth data in the array. If Depth[i] < Depth[i+1], it is recorded as a descending profile and given a corresponding label; if Depth[i] > Depth[i+1], it is recorded as an ascending profile and given a corresponding label. A pair of adjacent descending and ascending profiles is regarded as a complete profile, and an index value index is generated that records the maximum and minimum depths and the subscript indices of Depth[i] corresponding to the profile segmentation. The profile is segmented through this index value. Due to the special nature of the profile buoy's movement in the offshore area: the descending process is irregular movement, and the ascending profile is continuous and uniform motion. Therefore, only the ascending profiles are extracted as the data basis in this method; use the segmentation index recorded in the previous step to cut out the temperature, depth, and their corresponding times of each ascending profile and store them separately in a one-dimensional array, and then store all the one-dimensional temperature arrays in a two-dimensional array composed of all temperature arrays in the form of elements. Subsequently, the one-dimensional arrays of depth and time are sequentially stored in the corresponding two-dimensional arrays in order;

[0036] (3-3)Process each profile extracted in step (3-2). The specific process is as follows:

[0037] (3-3-1)Duplicate item elimination: Based on the depth data, use the enumerate function in Python to convert the entire depth array into an index sequence, traverse each depth data from top to bottom in turn, check whether there are duplicate values for each depth data in the index sequence. If there are duplicate values, return the index subscript of this depth data, store all the returned index subscripts in a specified array, and then delete and align the corresponding index subscripts in the temperature and time arrays to complete duplicate item elimination;

[0038] (3-3-2)Erroneous value elimination: Import the data processed in step (3-3-1); first create an empty array nonIncreaseIndex to store the index values corresponding to the detected erroneous values; traverse each depth data in the depth array in turn, compare Depth[i] and Depth[i+1]. If Depth[i] > Depth[i+1], continue traversing. If Depth[i] < Depth[i+1], then store the index value at this time in the nonIncreaseIndex array; delete and align the values of the index subscripts corresponding to the nonIncreaseIndex array in the depth, temperature, and time arrays to complete erroneous value elimination;

[0039] (3-3-3) Downsampling: First, count the number of data points in each water layer with a unit water layer of 10 meters. Store all water layer data in the nums[] array. Find the minimum value nums_min in the nums[] array. Use the water layer corresponding to nums_min as the reference water layer and perform downsampling operations on other water layers. Import the four-dimensional matrix (batch_size, depth, temperature, time) of each water layer. Use the nn.avg_pool() function encapsulated by Tensorflow to downsample the water layers other than the reference water layer to the same dimension as the reference water layer. Separate the depth, temperature, and time data to complete the downsampling.

[0040] (3-3-4) Interpolation: Lagrange quadratic interpolation is used to interpolate the profile data into high-precision profile data with an accuracy of 5cm, providing data support for thermocline calculation and visualization;

[0041] The main algorithm is as follows: First, construct the basis functions. Then construct the interpolation polynomial Finally, the temperature profile data was used as... Construct a depth[] array with 5cm intervals as the depth. x Substitute Interpolation is performed to obtain temperature and depth data with the same accuracy as the profile.

[0042] (4) Thermocline calculation: First, the interpolated data from step (3-3-4) is fitted into a temperature-deep-time curve. The depth of the thermocline can be determined by the abrupt change in the curve, and the depth of each range of the thermocline is recorded for subsequent thermocline calculation. Then, the temperature profile curve is refitted. The main method is to use the temperature and depth data of each water layer and the temperature and depth data of the upper and lower water layers to correct and fit the slope of the curve corresponding to each water layer. The data of the adjacent one, two, and three layers are used to perform appropriate weighted average calculation. The formula is as follows: Then, using the depth of the thermocline recorded in the previous step, the range of the thermocline in the refitted temperature curve is determined. Within this range, the minimum absolute value of the slope is found and stored in the array dT[]. Let dT = average(dT[]. Each time the thermocline is calculated, dT is updated. dT[] has a time attribute, and different dT[] are used in different seasons. By repeatedly correcting dT[] for different seasons, this threshold is made more suitable for the calculation of the thermocline in the target sea area. The depth of the thermocline is calculated using dT obtained in the previous step. The absolute value of the slope of the refitted curve corresponding to different water layers in each profile is compared with dT. If it is greater than dT, it is recorded as a suspected thermocline. After traversing all water layers in the profile, the adjacent thickness of the suspected thermocline is greater than 0.5m and it is recorded as a thermocline. The adjacent thickness of the suspected thermocline is less than 0.5m and it is recorded as a non-thermocline. The thermocline merging is completed.

[0043] (5) Based on the thermocline calculation, the Python plotting library is used to draw the nearshore vertical temperature profile with respect to time and depth. Based on the profile, the thermocline data obtained in step (4) for each profile is plotted on the graph, and the profile can be selected for display, such as Figure 2 As shown.

[0044] Although the present invention has been disclosed above with reference to embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications and refinements without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be determined by the claims.

Claims

1. A method for analyzing the dynamic changes of nearshore thermoclines, characterized in that, It includes the following steps: (1) Import the temperature profile data of the offshore area obtained by the profile buoy for a period of time into a computer to form a txt file of the water temperature and depth profile data of the offshore area; (2) Subtract the two adjacent depth data in the txt file in sequence. When it suddenly changes from a positive value to a negative value or suddenly changes from a negative value to a positive value, determine whether it is the highest or lowest point of the profile. If it is the endpoint of the profile, perform the conversion search for the ascending profile and the descending profile; if it is not the endpoint of the profile, determine it as noise data and delete it; (3) Use a python program to process the txt file after noise reduction according to the following steps: (3-1) Use a python program to open the txt file after noise reduction, read the opened txt file line by line, and store the time, depth, and temperature data into arrays respectively. Each data will have an index value, and the time, depth, and temperature data with the same index value correspond one by one; (3-2) Process the array of depth data in step (3-1) to achieve profile extraction. The specific process is as follows: Set the name of the array of depth data as Depth, scan the Depth array from left to right, and compare the magnitudes of depth[i] and depth[i+1]. Here: i represents the position of the depth data in the array. If Depth[i]<Depth[i+1], it is recorded as a descending profile and given a corresponding mark; if Depth[i]>Depth[i+1], it is recorded as an ascending profile and given a corresponding mark. A neighboring descending profile and ascending profile are recorded as a complete profile, and an index value (index) of the subscript of Depth[i] that records the maximum and minimum depths and the corresponding profile segmentation is generated. The profile is segmented through this index value; use the segmentation index recorded in the previous step to cut out the temperature, depth, and their corresponding time of each ascending profile and store them into a one-dimensional array respectively, then store all the one-dimensional temperature arrays into a two-dimensional array composed of all temperature arrays in the form of elements, and then store the one-dimensional arrays of depth and time into the corresponding two-dimensional arrays in sequence; (3-3) Process each profile extracted in step (3-2). The specific process is as follows: (3-3-1) Duplicate item removal: Based on the depth data, use the enumerate function in python to convert the entire depth array into an index sequence, traverse each depth data from top to bottom in sequence, check whether there are duplicate values in the index sequence for each depth data. If there are duplicate values, return the index subscript of this depth data, store all the returned index subscripts into a specified array, and then delete and align the corresponding index subscripts in the temperature and time arrays to complete duplicate item removal; (3-3-2)Error value rejection: Import the data processed in step (3-3-1). First, create an empty array nonIncreaseIndex to store the indices corresponding to the detected error values. Traverse each depth data in the depth array in sequence, compare Depth[i] and Depth[i+1]. If Depth[i]>Depth[i+1], continue traversing. If Depth[i]<Depth[i+1], store the current index value in the nonIncreaseIndex array. Delete and align the values at the indices corresponding to the nonIncreaseIndex array in the depth, temperature, and time arrays to complete error value rejection. (3-3-3)Downsampling: First, count the number of data entries in each water layer with a unit of 10 meters, store all water layer data in the nums[] array, find the minimum value nums_min in the nums[] array, and use the water layer corresponding to nums_min as the reference water layer for downsampling operations on other water layers. Import the four-dimensional matrix (batch_size, depth, temperature, time) of each unit water layer, and use the nn.avg_pool() function encapsulated by Tensorflow to downsample other water layers except the reference water layer to the same dimension as the reference water layer, and separate the depth, temperature, and time data to complete downsampling. (3-3-4)Interpolation: Use Lagrangian quadratic interpolation to interpolate the profile data into high-precision profile data with an accuracy of 5 cm to provide data support for thermocline calculation and visualization. (4)Thermocline calculation: First, fit the interpolated data in step (3-3-4) to a curve of temperature versus depth and time. The depth where the thermocline is located can be determined through the mutation of the curve, and record the depths of each range where the thermocline is located for subsequent thermocline calculations. Then, perform re-fitting of the temperature profile curve. The main method is to use the temperature and depth data of each water layer and the temperature and depth data of the upper and lower multiple water layers to perform calibration fitting of the slope of the curve corresponding to each layer of water body. Then, use the depth of the thermocline recorded in the previous step to determine the range where the thermocline is located in the re-fitted temperature curve. Find the minimum value of the absolute value of the slope in this range and store it in the array dT[]. Let dT = average(dT[]). Each time a thermocline calculation is performed, dT is updated. dT[] has a time attribute, and different dT[] are used in different seasons. Through repeated calibration of dT[] in different seasons, this threshold is made more suitable for thermocline calculation in the target sea area. Use the dT obtained in the previous step to calculate the thermocline depth. Compare the absolute value of the re-fitted slope corresponding to different water layers of each profile with dT. If it is greater than dT, record it as a suspected thermocline. After traversing all water layers of the profile, record that the adjacent thickness of the suspected thermocline is greater than 0.5 m as the thermocline, and the adjacent thickness of the suspected thermocline is less than 0.5 m as the non-thermocline to complete thermocline merging. (5) Based on the thermocline calculation, the Python plotting library is used to draw the profile of the nearshore vertical temperature change with time and depth. Based on the profile, the thermocline data obtained in step (4) for each profile is plotted on the graph, and the profile can be selected and displayed.