Dynamic demonstration method and system for water-soluble ion concentration and composition of aerosol
11651534 · 2023-05-16
Assignee
- INSTITUTE OF URBAN ENVIRONMENT, CHINESE ACADEMY OF SCIENCES (Ningbo, CN)
- NINGBO (BEILUN) ZHONGKE HAIXI INDUSTRIAL TECHNOLOGY INNOVATION CENTER (Ningbo, CN)
Inventors
- Hang Xiao (Ningbo, CN)
- Sile Hu (Ningbo, CN)
- Lei Tong (Ningbo, CN)
- Jianrong Li (Ningbo, CN)
- Keqiang Wang (Ningbo, CN)
Cpc classification
G01N1/2202
PHYSICS
International classification
Abstract
Disclosed is a dynamic demonstration method for water-soluble ion concentration and components of an aerosol. The method comprises: obtaining concentration data of each ion in an atmospheric aerosol of a target city in a preset time period and filling the concentration data in a data table; obtaining vertex coordinates of each ion in a Maucha graph according to equivalent concentration data of each ion; drawing an aerosol ion Maucha graph of the target city in each preset time period according to the vertex coordinates; and finally making a dynamic picture according to a temporal graph of aerosol ion concentration in various time periods.
Claims
1. A dynamic demonstration method for ion concentration and composition of an aerosol, comprising the following steps: S0: labeling quadrants of a Maucha graph with eight major ions in an atmospheric aerosol, wherein the eight major ions in the atmospheric aerosol are K.sup.+, Na.sup.+, Ca.sup.2+, NH.sub.4.sup.+, SO.sub.4.sup.2−, Cl.sup.−, NO.sub.3.sup.−, and F.sup.−, respectively; S1: obtaining concentration data of each ion in the atmospheric aerosol of one of a plurality of target cities in each preset time period, converting the concentration data of each ion into equivalent concentration data of each ion, and filling the equivalent concentration data of each ion in a data table; S2: obtaining a radius of a circle in a Maucha graph according to a first calculation formula, and obtaining a diagonal length corresponding to a quadrilateral of each ion in the Maucha graph according to the first calculation formula on the basis of the equivalent concentration data of each ion in the data table and the radius of the circle in the Maucha graph; S3: obtaining vertex coordinates of each ion in the Maucha graph according to a second calculation formula on the basis of the diagonal length; S4: drawing an aerosol ion Maucha graph of the one of a plurality of target cities in each preset time period according to the radius of a circle in a Maucha graph and the vertex coordinates of each ion in the Maucha graph; and S5: determining whether the aerosol ion Maucha graphs of all of a plurality of target cities are completed or not, and if not, switching the target city and returning to step S1; wherein the first calculation formula is:
R.sup.2×sin22.5°/2=T/16 b×R×sin22.5°/2=P/2; the second calculation formula is:
bx=b×cos(22.5°+45°×n), by=b×sin(22.5°+45°×n); in the formulas, R refers to the radius of the circle in the Maucha graph; T refers to total equivalent concentration of the eight major ions in the atmospheric aerosol; b refers to a diagonal length corresponding to a quadrilateral of a corresponding ion in the Maucha graph; P refers to the equivalent concentration of the corresponding ion; bx refers to the abscissa of a vertex of the corresponding ion; by refers to an ordinate of the vertex of the corresponding ion; n refers to an integer from 0 to 7; S6: superimposing the aerosol ion Maucha graphs of each of the plurality of target cities in the same preset time period on a geographical map according to the latitude and longitude information, to form a temporal graph of aerosol ion concentration; and S7: repeating step S6 for each of the preset time periods; S8: superimposing the temporal graphs of each aerosol ion concentration in each preset time period to form a dynamic picture.
2. The dynamic demonstration method for ion concentration and composition of an aerosol according to claim 1, wherein the data table also comprises time information and latitude and longitude information of the target city corresponding to the concentration data of each ion.
Description
BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS
(1)
(2)
(3)
(4)
DETAILED DESCRIPTION OF THE INVENTION
(5) The following are specific embodiments of the present disclosure and further describe the technical solutions of the present disclosure in conjunction with the accompanying drawings, but the present disclosure is not limited to these embodiments.
(6) Embodiment 1
(7) In order to solve the above problems and fully display the change in ion concentration of the atmospheric aerosol according to time change and regional change, as shown in
(8) In step S1, concentration data of each ion in an atmospheric aerosol of a target city in a preset time period is obtained, the concentration data of each ion is converted into equivalent concentration data of each ion, and the equivalent concentration data of each ion is filled in a data table.
(9) In the data table, in order to obtain more comprehensive information for subsequent drawing, the data table further includes corresponding time information, longitude and latitude information of the target city corresponding to the concentration data of each ion, and the like, so that areas can be divided according to the longitude and latitude during the subsequent drawing.
(10) Certainly, the Maucha graph should not be simply used directly. Because the original Maucha graph is mainly used for water bodies, but in the present invention the original Maucha graph is used for an atmospheric aerosol, the water body and the atmospheric aerosol are different in ion categories, and the ion categories of the atmospheric aerosol need to be adjusted. Therefore, before step S1, the method further includes:
(11) Step S0: converting ion categories in a water body in an original Maucha graph to ion categories in the atmospheric aerosol;
(12) the ion categories in the atmospheric aerosol include eight major ions which are K.sup.+, Na.sup.+, Ca.sup.2+, NH.sub.4.sup.+, SO.sub.4.sup.2−, Cl.sup.−, NO.sub.3.sup.−, and F.sup.−, respectively.
(13) Because an atmospheric combination of the above-mentioned ions contains a variety of chemical pollutants, the concentrations of these ions can be detected to analyze the concentrations of chemical pollutants such as hydroxides, hydrocarbons, and sulfides in the atmosphere.
(14) In step S2, the data table is imported, and a radius of a circle in a Maucha graph and a diagonal length corresponding to a quadrilateral of each ion in the Maucha graph are obtained according to a first calculation formula on the basis of the equivalent concentration data of each ion.
(15) In some cases, data missing may be detected. If the number of missing data reaches a preset number (specifically a value that makes a drawing function wrong, for example, it is assumed that the preset number is set to 2, there are 7 data units when all data in a row is not missing; when in the imported data table, there are missing data in 2 or more data units in a row, then the drawing function will be biased), in order to avoid the adverse effect of missing data on data analysis and drawing, the process of importing the data table in step S2 further includes data determination. If there are more than a preset number of missing data in a row of the data table, the row of data is deleted.
(16) As shown in
(17) In step S3, vertex coordinates of each ion in the Maucha graph are obtained according to a second calculation formula on the basis of the diagonal length.
(18) In step S4, an aerosol ion Maucha graph of a target city in each preset time period is drawn according to the vertex coordinates of each ion in the Maucha graph.
(19) In step S5, it is determined whether the aerosol ion Maucha graphs of all target cities are completed or not; if not, the target city is switched and the process returns to step S1.
(20) wherein the first calculation formula is:
R.sup.2×sin22.5°/2=T/16, b×R×sin22.5°/2=P/2;
(21) the second calculation formula is:
bx=b×cos(22.5°+45°×n), by=b×sin(22.5°+45°×n);
(22) In the formula, R refers to the radius of the circle in the Maucha graph; T refers to the total equivalent concentration of eight major ions in the atmospheric aerosol; b refers to the diagonal length corresponding to the quadrilateral of the corresponding ion in the Maucha graph (as shown in
(23) In the meanwhile, after step S5, in order to make the final image to be able to fully show the change and transfer trend of ion concentration in the atmospheric aerosol, the following steps are also included.
(24) In step S6, the aerosol ion Maucha graph of each target city in the same time period is superimposed on a geographical map according to the latitude and longitude information, and a temporal graph of aerosol ion concentration is drawn.
(25) S7: making a dynamic picture according to the temporal graph of aerosol ion concentration in each time period.
(26) By superimposing the aerosol ion concentration Maucha graph of each city at the same time on the geographical map, the distribution of pollutants in various places can be clearly shown, and a dynamic picture is made therefrom. On the original basis, the changes of pollutants in various places can be reflected, and the diffusion and movement of pollutants can be analyzed according to the increase or decrease of ion concentration in various places, which is conducive to the tracking of pollutant sources.
(27) It should be noted that R-Shiny is used for writing and packaging in steps S2 to S7 and packaging results are displayed on a web terminal. R-Shiny is used for writing and packaging because Shiny is a web development framework of R language by which users only need to understand some html knowledge to quickly complete web development without deep understanding of css and js. Moreover, the shiny package integrates features such as bootstrap, jquery, ajax, etc., which greatly liberates the productivity of R as a statistical language. In this way, R users of non-traditional programmers can complete some simple data visualization tasks according to their business without relying on front-end and back-end engineers, and quickly verify the reliability of their ideas.
(28) The Shiny application contains two basic components: one is a user interface script, and the other is a server script. In this method, a streaming page in a user interface is mainly used to put parts such as data processing, drawing, and result presentation into the server script. A series of operations such as data import, data analysis, and graph drawing are packaged in a shiny package to form a web application, so that the web application can be opened in a browser and the final results are presented on the network.
(29) According to the generalized overview, the data table is imported through Shiny (Shiny is an application framework that provides a web interactive interface for an R model) and whether data in the data table is complete is determined; then, the data are analyzed to draw graphs and the obtained aerosol ion Maucha graph of each city in each time period is saved in a first folder (set as Folder figures) through a png data package; the aerosol ion Maucha graph of each city in the same time period is superimposed on a corresponding position of the geographical map (the geographical map is a satellite map, provided by another folder, set as Folder maps) through a ggimage data package, thus obtaining the temporal graph of aerosol ion concentration of each city in a single time period on the geographical map; and the temporal graph is saved in a second folder (set as Folder figures2) Then, when the user visits a web segment, the temporal graph of the aerosol ion concentration in the corresponding time period can be called through a magick data package and made into a gif dynamic picture, and data analysis and trend determination are carried out on the basis of the picture. It should be noted that the calling of the above-mentioned data packets can be implemented through a getGIF.r script file, and finally a route of the gif picture is returned to the shinyAPP server script, and the shinyAPP server script calls the picture according to the route.
(30) Embodiment 2
(31) In order to better analyze the inventive idea of the present disclosure, this embodiment divides the functions described in the invention in a form of system structure. As shown in
(32) the import module is configured to import equivalent concentration data of each ion in an atmospheric aerosol of a target city in a preset time period in a data table and transmit the equivalent concentration data to the calculation module;
(33) the calculation module is configured to obtain vertex coordinates of each ion in a Maucha graph according to a first calculation formula and a second calculation formula on the basis of the equivalent concentration data of each ion;
(34) the drawing module is configured to draw an aerosol ion Maucha graph of the target city in each preset time period according to the vertex coordinates of each ion in the Maucha graph;
(35) wherein the first calculation formula is:
R.sup.2×sin22.5°/2=T/16, b×R×sin22.5°/2=P/2;
(36) the second calculation formula is:
bx=b×cos(22.5°+45°×n), by=b×sin(22.5°+45°×n);
(37) in the formulas, R refers to the radius of the circle in the Maucha graph; T refers to the total equivalent concentration of eight major ions in the atmospheric aerosol; b refers to a diagonal length corresponding to a quadrilateral of the corresponding ion in the Maucha graph; P refers to the equivalent concentration of the corresponding ion; bx refers to an abscissa of a vertex of the corresponding ion; by refers to an ordinate of the vertex of the corresponding ion; n refers to a constant variable that changes with an angle of a line of hexadec-section in the quadrilateral corresponding to the ion in the circle, and the value of n begins to vary counterclockwise with the starting angle (22.5°) of the line of hexadec-section and increases from 0 to 7.
(38) The data table also includes time information and latitude and longitude information of the target city corresponding to the concentration data of each ion, and the corresponding data is input by an input module (usually input tools such as a keyboard).
(39) The import module is further configured to convert ion categories in a water body in an original Maucha graph to ion categories in the atmospheric aerosol;
(40) the ion categories in the atmospheric aerosol include eight major ions which are K.sup.+, Na.sup.+, Ca.sup.2+, NH.sub.4.sup.+, SO.sub.4.sup.2−, Cl.sup.−, NO.sub.3.sup.−, and F.sup.−, respectively.
(41) The drawing module further includes a superimposing unit,
(42) configured to superimpose the aerosol ion Maucha graph of each target city in the same time period on a geographical map according to the latitude and longitude information, draw a temporal graph of aerosol ion concentration, and make a dynamic picture according to the temporal graph of aerosol ion concentration in each time period.
(43) The import module further includes a determining unit,
(44) configured to determine the data, wherein if there are more than a preset number of missing data in a row of the data table, the row of data is deleted.
(45) R-Shiny is used for writing and packaging in the import module, the calculation module, the drawing module, the superimposing unit, and packaging results are displayed on a web terminal (through a display module, i.e., a display).
(46) In summary, the dynamic demonstration method and system for water-soluble ion concentration and composition of an aerosol in the present disclosure displays the water-soluble ions in the atmospheric aerosol through the Maucha graph, so that the concentration of each ion can be displayed more intuitively. By integrating the aerosol ion Maucha graphs of various cities in the same time period on the same geographical map, the temporal graph of aerosol ion concentration is made, and the temporal graphs in various time periods are integrated into a dynamic picture, which can more intuitively display the concentration change trend and composition of water-soluble ions in the atmospheric aerosol of different cities in different time periods in the same time dimension.
(47) R language (Shiny data package) is used to package and write programs, and the corresponding tasks (such as data import, data analysis, drawing, etc.) can be completed according to simple data without relying on front-end and back-end engineers. Because the R language is used and the operation can be easily displayed on the web terminal, it is easier to be accessed by other users, thus facilitating the transmission of information.
(48) The specific embodiments described herein are only examples to illustrate the spirit of the present disclosure. Those skilled in the art to which the present disclosure belongs can make various modifications or additions to the specific embodiments described or use similar alternatives, without departing from the spirit of the present disclosure or going beyond the scope defined in the appended claims.