Park air quality simulation intelligent operation method
Automatically generates input files for the AERMOD model through automated programs, solving the problems of cumbersome and low efficiency of AERMOD model, realizing the automated processing of multi-pollutant simulation and parameter changes, and improving the computing efficiency and timeliness of decision-making.
Patent Information
- Application Number
- CN202411210999.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-24
AI Technical Summary
The AERMOD model has cumbersome operations, time-consuming, high error rate, low efficiency, poor consistency and repeatability, and lacks automation tools, resulting in confusion in data management and delayed decision-making.
Develop an intelligent operation method for air quality simulation in the park, automatically generate aermod.inp file through automated programs, simplify parameter configuration and data input, optimize the operation of the AERMOD model, and realize the automatic processing of multi-pollutant simulation and parameter changes.
Significantly reduce human errors, improve calculation convenience and accuracy, save time and resources, enhance simulation efficiency, and improve the efficiency and reliability of environmental research and decision-making.
Smart Images

Figure CN119180139A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of environmental supervision, and in particular to an intelligent operation method for simulating air quality in a park. Background Art
[0002] The AERMOD model is a steady-state closed Gaussian model developed by USEPA and the American Meteorological Society. It can generally be used to simulate the distribution and transmission of hourly, daily and long-term average concentrations of primary pollutants emitted by point sources, surface sources, and volume sources within a range of 50km, and is applicable to both rural and urban areas. It is based on the concept of turbulent structure and proportion in the planetary boundary layer, and incorporates air diffusion, including the treatment of surface sources and elevated sources, as well as the treatment of simple terrain and complex terrain.
[0003] The AERMOD model includes three modules: the AERMOD diffusion module, the AERMET meteorological preprocessing module and the AERMAP terrain preprocessing module. The AERMET meteorological preprocessing module provides the AERMOD diffusion module with the meteorological data required for the parameterized planetary boundary layer (PBL). The boundary layer parameter data and profile data of AERMET can be determined by the input field observation data, or generated by the input National Meteorological Administration conventional meteorological data (ground data, sounding data). The AERMAP terrain preprocessing module provides the AERMOD diffusion module with a prediction point grid. The terrain preprocessor simplifies and standardizes the AERMOD terrain input data. It converts the input position parameters (x, y, z) of each grid point and its terrain height parameters (xy, z) into terrain data for AERMOD data processing, including the position parameters (x, y, z) of each grid point and its effective height value Zeff. These data are used to calculate the atmospheric diffusion around obstacles, and combined with the distribution of parameters such as wind speed u, the distribution of pollutant concentration can be calculated.
[0004] At present, the operation of the AERMOD model is mainly carried out in the server. Before operation, the control flow file of the AERMOD model, namely the aermod.inp file, needs to be accurately set. This file contains multiple key information and parameter settings, including the type of simulated pollutants, simulation time period, simulation area, meteorological conditions, type of emission source and its specific emission data, etc.
[0005] However, the AERMOD model can currently only simulate one pollutant at a time, which means that when multiple pollutants need to be simulated, multiple model runs must be performed separately. In addition, if meteorological conditions, simulation areas, types of emission sources, or emission data change, the aermod.inp file also needs to be manually modified. Currently, simulations of the AERMOD model are basically manual operations.
[0006] Manual operation has the following problems: (1) The operation is cumbersome and time-consuming: Before each run, the aermod.inp file needs to be manually set. Especially when there are multiple simulated species, different meteorological conditions, and emission data changes frequently, manual operation is very cumbersome and time-consuming. The manual input process requires repeated checks and verifications, which further increases the workload. (2) High error rate: Manual data input is prone to negligence and errors, especially when dealing with large amounts of complex data. The probability of error is higher. Incorrect input may cause the model to fail to operate normally or the output results to be inaccurate, requiring more time to troubleshoot and correct. (3) Low efficiency: The lack of support from automated tools means that multiple simulated species and parameter changes need to be manually processed one by one, resulting in low work efficiency. There is a lot of repetitive work, and a lot of time for actual simulation and analysis is occupied by preliminary preparations. (4) Poor consistency and repeatability: In the manual operation process, it is difficult to ensure that the settings and adjustments of each link are completely consistent, which affects the consistency and repeatability of the results. The lack of standardized processes and tool support is not conducive to the standardized management of the model operation process and the traceability of operation records. (5) Lack of efficient data management and processing capabilities: When processing large-scale data, manual methods are often inadequate and can easily lead to chaotic data management. This is not conducive to the efficient organization and processing of input and output data, affecting data analysis and subsequent application of results. (6) Delayed decision-making and application: Manual operations cause the model to run for a long time, delaying the acquisition and application of simulation results. Especially when responding to emergency environmental assessments and decisions, the lack of automated tools limits the response speed and affects the timeliness of decision-making.
[0007] In order to solve the above problems, it is urgent to develop an automatic operation tool for the AERMOD model, including the automatic generation of the aermod.inp file. This tool can realize automatic file generation and modification based on user input, thereby simplifying and accelerating the operation of the AERMOD model. Summary of the invention
[0008] In response to the above problems, the present invention provides an intelligent operation method and system for park air quality simulation, which adopts an automated program to comprehensively optimize the operation of the AERMOD model, simplifying the originally complex operating steps, allowing users to configure parameters and input data more easily, helping to reduce the possibility of human errors, improve the convenience and accuracy of calculations, save time resources, enhance the overall simulation efficiency, and make environmental research, air quality assessment and related decision-making processes more efficient and reliable.
[0009] To achieve the above object, the present invention provides a park air quality simulation intelligent operation method, comprising:
[0010] Define key variables, including MMIF variables, AERMAP variables, FLAG variables, and AERMOD variables, wherein the MMIF variables, AERMAP variables, and FLAG variables all include corresponding operation control variables and input variables, and the AERMOD variables include corresponding input variables;
[0011] The user writes the values of MMIF variable, AERMAP variable, FLAG variable and AERMOD variable;
[0012] Generate the mmif.inp file according to the value of the input variable in the MMIF variable and the WRF meteorological model, and input it into the MMIF mesoscale model interface program;
[0013] Run the MMIF mesoscale model interface program according to the values of the running control variables in the MMIF variables, and obtain the aermod_LCC_wrf.pfl file, aermod_LCC_wrf.sfc file, and aermod_LCC_wrf.info file for the AERMOD model;
[0014] Generate an aermap.inp file according to the value of the input variable in the AERMAP variable, and input it into the AERMAP terrain pre-processing program;
[0015] Running the AERMAP terrain pre-processing program according to the value of the running control variable in the AERMAP variable to obtain the SRC.OUT file and the REC.OUT file for the AERMOD model;
[0016] If the value of the running control variable in the FLAG variable is YES, the FLAG processing module is run according to the value of the input variable in the FLAG variable, and the combination of the specified height and the grid number is traversed in a loop to generate a FLAG file;
[0017] Generate aermod.inp files for each pollutant according to the input variables corresponding to the AERMOD variables;
[0018] Based on the aermod_LCC_wrf.pfl file, aermod_LCC_wrf.sfc file, aermod_LCC_wrf.info file, SRC.OUT file, and REC.OUT file, multiple AERMOD air quality models are run in parallel for the aermod.inp file of each pollutant to obtain simulation results for multiple pollutants.
[0019] As a further improvement of the present invention, the operation control variables among the MMIF variables, AERMAP variables and FLAG variables are RUNMMIF, RUNAERMAP and RUNFLAG, which are respectively used to control whether the MMIF mesoscale model interface program, the AERMAP terrain pre-processing program and the FLAG processing module are to be run.
[0020] As a further improvement of the present invention, the input variables among the MMIF variable, AERMAP variable, AERMOD variable and FLAG variable are variables required to generate the mmif.inp file, aermap.inp file, aermod.inp file and run the FLAG processing module, and the mmif.inp file, aermap.inp file and aermod.inp file are all control flow files.
[0021] As a further improvement of the present invention, the aermap.inp file is generated according to the value of the input variable in the AERMAP variable and input into the AERMAP terrain pre-processing program; comprising:
[0022] First, the original aermap.inp file is deleted, and then a new aermap.inp file is generated according to the value of the input variable in the AERMAP variable.
[0023] As a further improvement of the present invention, a new aermap.inp file is generated, including:
[0024] Write the CO instruction block, check whether the datafile file exists, and if so, write the value of the input variable in the AERMAP variable to generate the initial aermap.inp file;
[0025] Write coordinate transformation parameters such as DOMAINXY and ANCHORXY to the initial aermap.inp file;
[0026] Write the STACK information into the initial aermap.inp file;
[0027] Write the GRIDCART grid coordinate information to the initial aermap.inp file to get a new aermap.inp file.
[0028] As a further improvement of the present invention, the AERMAP terrain pre-processing program is run according to the value of the running control variable in the AERMAP variable, including:
[0029] If the value of the run control variable in the AERMAP variable is YES, the AERMAP terrain pre-processing program needs to be run, and the AERMAP terrain pre-processing program automatically executes aermap.exe.
[0030] As a further improvement of the present invention, an aermod.inp file is generated for each pollutant; including:
[0031] Different pollutants have specific settings. The specific settings of each pollutant will be written into the corresponding aermod.inp file one by one, and the aermod.inp file also includes information on multiple shared parts;
[0032] Read RE receptor files from the file list and include them into each aermod.inp file;
[0033] Check if the aermod_LCC_wrf.info file exists, and if so append it to each aermod.inp file.
[0034] As a further improvement of the present invention, multiple AERMOD air quality models are run in parallel for the aermod.inp file of each pollutant to obtain simulation results of multiple pollutants; including:
[0035] Generate an aermod simulation command based on the aermod.inp file of each pollutant;
[0036] Put all aermod simulation commands into an array;
[0037] Loop through each aermod simulation command, run the AERMOD air quality model separately and put it into the background to run in parallel;
[0038] Wait for all background runs to complete and get simulation results for multiple pollutants.
[0039] As a further improvement of the present invention, the input variables in the MMIF variables include: simulation time set by the user, storage address link of WRF simulation results;
[0040] As a further improvement of the present invention, the input variables in the AERMAP variables include: terrain file, simulation range and emission source location data.
[0041] Compared with the prior art, the present invention has the following beneficial effects:
[0042] The present invention solves the problems of repeated steps and cumbersome operations faced by the AERMOD air quality model when multiple parameters and multiple data are input during use. By adopting an automated program to comprehensively optimize the operation of the AERMOD model, the originally complex operation steps are simplified, allowing users to more easily configure parameters and input data. This not only helps to reduce the possibility of human error, but also significantly improves the convenience and accuracy of calculations. At the same time, this technical method can greatly save time resources, enhance overall simulation efficiency, and make environmental research, air quality assessment, and related decision-making processes more efficient and reliable. In addition, through the introduction of automated processes, not only the consistency and stability of the model operation are improved, but also stronger support is provided for large-scale data processing and long-term simulation, thereby significantly improving the practical value and promotion potential of the AERMOD tool in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A schematic diagram of the operation logic of an automated program involved in an intelligent operation method for park air quality simulation disclosed in an embodiment of the present invention;
[0044] Figure 2 This is a diagram of the automated program structure involved in the intelligent operation method for park air quality simulation disclosed in one embodiment of the present invention. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] The present invention is further described in detail below in conjunction with the accompanying drawings:
[0047] The AERMOD model involved in this invention mainly consists of three modules: AERMAP terrain processor, AERMET weather processor and AERMOD main program, among which AERMET can be replaced by a combination of WRF+MMIF. The three modules run independently, with the main program as the core. The original code and data can be obtained from the EPA official website.
[0048] According to the operation logic of the AERMOD air quality model and the required operation files, the logical architecture of this program is completed. Before running this program, the user needs to have determined the target area, time, target pollutants, and emission data of the target emission source of this study, as well as the terrain file of the target area. This program first performs the AERMAP module of the AERMOD model to preprocess the terrain and process the generated files to meet the needs of subsequent AERMOD corresponding parameter changes. After that, the required terrain data changes with the demand. Secondly, the MMIF mesoscale model interface program is used to convert the data of the WRF meteorological model into meteorological data that can be used by the AERMOD model, and the ground meteorological data file and the high-altitude meteorological data file that must be included in the input file when running AERMOD are obtained. Finally, the aermod.inp file is improved, and the main program of the AERMOD model is run to obtain the required simulation results. And on the basis of completing the basic AERMOD automatic operation, the batch operation of the AERMOD model is considered to further improve the calculation efficiency.
[0049] like Figure 1 As shown, the present invention provides an intelligent operation method for park air quality simulation, which involves an automated operation program and aims to automatically process multiple core steps of the AERMOD model, including preparing input files, running multiple submodules (such as MMIF, AERMAP, AERMOD, etc.), and finally performing pollutant simulation. It includes the following steps:
[0050] S1. Define key variables, including MMIF variables, AERMAP variables, FLAG variables, and AERMOD variables. MMIF variables, AERMAP variables, and FLAG variables all include corresponding operation control variables and input variables, and AERMOD variables include corresponding input variables.
[0051] in,
[0052] The operation control variables among the MMIF variables, AERMAP variables, and FLAG variables are RUNMMIF, RUNAERMAP, and RUNFLAG, which are used to control whether the MMIF mesoscale model interface program, the AERMAP terrain preprocessing program, and the FLAG processing module are to be run.
[0053] The input variables in MMIF variables, AERMAP variables, AERMOD variables and FLAG variables are the variables required to generate mmif.inp files, aermap.inp files, aermod.inp files and run the FLAG processing module. The mmif.inp files, aermap.inp files and aermod.inp files are all control flow files. For example, the input variables in MMIF variables include: `starttime`, `stoptime`, `timezone`, `grid`, `point`, `inputfile`, etc.
[0054] Specifically, the procedures for defining MMIF variables, FLAG variables, AERMAP variables, and AERMOD variables are as follows:
[0055]
[0056]
[0057]
[0058] At this point, the program has defined all the data that the user needs to input and the options that the user needs to set. Subsequently, the corresponding control flow file will be written according to the user-defined variables and the corresponding module in the AERMOD model will be run. When writing the control flow file, the fixed content of the control flow file must be written at the same time. And because the AERMAP module's operating data and the meteorological data obtained by the MMIF operation need to be configured before the AERMOD diffusion module runs, the mmif.inp and aermap.inp files will be generated first, and then aermod.inp will be generated. Specifically:
[0059] S2. The user writes the values of MMIF variable, AERMAP variable, FLAG variable and AERMOD variable;
[0060] in,
[0061] Write the MMIF variable to generate mmif.inp. The program is:
[0062]
[0063] S3, generating the mmif.inp file according to the values of the input variables in the MMIF variables and the WRF meteorological model, and inputting it into the MMIF mesoscale model interface program;
[0064] in,
[0065] The input variables in MMIF variables include: simulation time set by the user, storage address link of WRF simulation results;
[0066] The program runs to generate the mmif.inp file. This step uses the previously defined variables to combine the required input content of the mmif tool and writes these contents into the mmif.inp file. Immediately afterwards, based on the value of the variable "RUNMMIF", the program will decide whether to execute "mmif" to process these input files. In this way, the operation of the MMIF tool can be realized and is easy to control and manage.
[0067] S4, running the MMIF mesoscale model interface program according to the values of the running control variables in the MMIF variables, and obtaining the aermod_LCC_wrf.pfl file, aermod_LCC_wrf.sfc file and aermod_LCC_wrf.info file for the AERMOD model;
[0068] S5, generating an aermap.inp file according to the value of the input variable in the AERMAP variable, and inputting it into the AERMAP terrain preprocessing program;
[0069] in,
[0070] The input variables of AERMAP include terrain files, simulation range and emission source location data.
[0071] Furthermore,
[0072] In the process of generating aermap.inp file, the program will first delete the original aermap.inp file, and then generate a new aermap.inp file according to the value of the input variable in the AERMAP variable.
[0073] Furthermore, a new aermap.inp file is generated, including:
[0074] Write the CO instruction block to check whether the datafile file exists. If it exists, write the value of the input variable in the AERMAP variable to generate the initial aermap.inp file;
[0075] Write coordinate transformation parameters such as DOMAINXY and ANCHORXY to the initial aermap.inp file;
[0076] Write the STACK information into the initial aermap.inp file;
[0077] Write the GRIDCART grid coordinate information to the initial aermap.inp file to get a new aermap.inp file.
[0078] Specifically, the procedure for writing the value of the input variable in the AERMAP variable to generate the aermap.inp file is:
[0079]
[0080]
[0081] S6. Run the AERMAP terrain preprocessing program according to the value of the running control variable in the AERMAP variable to obtain the SRC.OUT file and REC.OUT file for the AERMOD model;
[0082] in,
[0083] According to the value of the variable "RUNAERMAP", it is decided whether to run the aermap tool. If the value of the run control variable in the AERMAP variable is YES, the AERMAP terrain preprocessing program needs to be run. The AERMAP terrain preprocessing program automatically executes aermap.exe. The program is:
[0084]
[0085] S7, if the value of the running control variable in the FLAG variable is YES, the FLAG processing module is run according to the value of the input variable in the FLAG variable, and the combination of the specified height and the grid number is traversed in a loop to generate a FLAG file;
[0086] Among them, the value of the run control variable in the FLAG variable is YES, that is, the value of the "RUNFLAG" variable indicates that FLAG processing is required, and the program will loop through the combination of the specified height and grid number to generate the corresponding FLAG file. This process ensures that the FLAG settings of different heights and grids are correctly processed and written to the file, which is helpful for subsequent simulation analysis.
[0087] The program to define the FLAG variable is:
[0088]
[0089] The program to run the FLAG processing module is:
[0090]
[0091] S8. Generate aermod.inp files for each pollutant according to the input variables corresponding to the AERMOD variables;
[0092] in,
[0093] Different pollutants have specific settings, for example, NO2 and O3 will also add NOX and OZONE settings. During this process, the specific settings of each pollutant will be written into the corresponding aermod.inp file one by one, and the aermod.inp file also includes information on multiple shared parts;
[0094] The program reads the RE receptor files from the file list and includes them into each aermod.inp file;
[0095] Check if the aermod_LCC_wrf.info file exists, and if so append it to each aermod.inp file.
[0096] Furthermore, the procedure for writing the specified content into the aermod.inp file is:
[0097]
[0098]
[0099] S9. Based on the aermod_LCC_wrf.pfl file, aermod_LCC_wrf.sfc file, aermod_LCC_wrf.info file, SRC.OUT file, and REC.OUT file, multiple AERMOD air quality models are run in parallel for the aermod.inp file of each pollutant to obtain simulation results for multiple pollutants.
[0100] in,
[0101] After all input files have been prepared, the program runs multiple aermod simulations in parallel.
[0102] Furthermore,
[0103] Generate an aermod simulation command based on the aermod.inp file of each pollutant;
[0104] Put all aermod simulation commands into an array;
[0105] Loop through each aermod simulation command, run the AERMOD air quality model separately and put it into the background to run in parallel;
[0106] Wait for all background runs to complete and get simulation results for multiple pollutants.
[0107] The specific procedures are:
[0108]
[0109] The program of the present invention greatly improves the automation and work efficiency of AERMOD operation through detailed variable configuration, automatic generation and modification of input files, and parallel execution of simulation tasks, reducing the tediousness and risk of errors in manual operations. The entire process is decomposed into multiple clear steps and submodules, with clear logic, easy to understand and maintain, making the entire AERMOD simulation process more efficient, reliable and controllable.
[0110] In the intelligent operation method of park air quality simulation in the present invention, before the program is run, the user needs to have determined the target area, time, target pollutants and emission data of the target emission sources of this study, as well as the terrain file of the target area. This program first automatically generates the aermap.inp file based on the terrain file provided by the user and the simulation range and emission source location data input by the user, and then runs the AERMAP program to obtain the .OUT files of SRC and REC; according to the user's simulation time settings and the storage address link of the WRF simulation results, the meteorological data of the corresponding days are extracted from the WRF meteorological model (the user already has the WRF meteorological data of the simulation time by default), and the mmif.inp file is generated. Then, by running the MMIF mesoscale meteorological interface program, the aermod_LCC_wrf.pfl file, aermod_LCC_wrf.sfc file and aermod_LCC_wrf.info file suitable for the AERMOD model are obtained, among which the content of the aermod_LCC_wrf.info file can be directly used in the code writing part of the ME meteorological path of the aermod.inp file through automation; finally, according to the emission source data, target pollutant types and some special simulation options, through the user's input, this program will automatically organize the complete aermod.inp file, and then automatically run the AERMOD model to obtain the final simulation results. For the simulation of multiple pollutants from the same pollution source, this program changes aermod.inp to aermod.inp of the corresponding pollutant name before the final simulation, such as NO2 to aermodNO2.inp, and realizes batch AERMOD model simulation of multiple pollutants, improving calculation efficiency.
[0111] Example 1: Simulating time changes
[0112] The air pollution process in a thermal power plant in Handan City in June 2019 was simulated, and the PM 2.5, O3, NO2 and other key pollutants. During the simulation process, the first simulation start time is starttime = 2019-06-07_10:00:00, and then changed to starttime = 2019-06-07_08:00:00, the first end time is stoptime = 2019-06-07_17:00:00, and the second change is stoptime = 2019-06-08_08:00:00, and the simulation time is changed from 8 hours to 24 hours. In this process, since only the simulation time is changed, only the meteorological conditions change, and the simulation area and emission sources do not change, the terrain simulation module aermap can be turned off in the automatic operation program, that is, RUNAERMAP = "NO", only the mmif module and aermod diffusion module need to be turned on, and the MMIF operation option is set to RUNMMIF = "YES", then the simulation time is changed to the required simulation time, and timezone is set to the simulation duration, and finally the automation program can be run.
[0113] Among them, the program to define the MMIF variable is:
[0114]
[0115] The procedure for defining the AERMAP variable is:
[0116]
[0117] During this process, the user only needs to modify two variable definitions in the program: mmif and aermap. Then run the automated program to complete the entire operation. This method simplifies the operation process, and there is no need to manually adjust mmif settings, manually run mmif, or manually move the results generated by mmif to the folder where the aermod module is located. This not only saves time and energy, but also reduces the possibility of errors and greatly improves work efficiency.
[0118] Example 2: Simulating FLAG option changes
[0119] In most air quality simulation processes, users need more than just surface pollutant concentrations. For large point sources, users need three-dimensional, multi-level pollutant concentration data to better understand and analyze the emission process and pollution situation of large point sources. At this time, the FLAG option needs to be turned on. The FLAG option is only involved in the aermod diffusion module. Therefore, the mmif module and the aermap module are both turned off, that is, RUNMMIF = "NO", RUNAERMAP = "NO". In this program, users only need to write the data of the vertical height layer they need into ZHdata.txt, for example: "100 200 300400 500600 700 800", and this automated program can generate the FLAG height data required by the user in the aermod simulation process. The code for the automated program running process is:
[0120]
[0121] "HanDan_REC100.OUT" and other .OUT files are the FLAG option data required by the aermod.inp file.
[0122] If the traditional manual setting method is used, the user needs to manually write a .txt file for each FLAG height. This is not only highly repetitive and error-prone, but also very time-consuming. However, in this program, the complex repetitive work is simplified to simply entering the required FLAG height data in the ZHdata.txt file. This greatly shortens the configuration time, improves work efficiency, and significantly improves accuracy. Through automated processing, users can focus more on core tasks instead of wasting time on tedious manual operations.
[0123] Part of the content of the HanDan_REC100.OUT file is shown below:
[0124]
[0125] Example 3: Simulating species changes and simulating regional changes
[0126] When simulating air quality, it is usually not limited to one pollutant or the same area. It often involves simulating different pollutants in the same area and comparing the same pollutant in different areas. This case will show the operation process of this automated program and its advantages in these two cases.
[0127] When simulating the emission of multiple pollutants from large point sources in the same simulation area, users can enter the pollutants to be simulated in the "pollutants" in the aermod variable defined in this automation program, and write the corresponding pollutant emission information in "stack_info", thus completing the information input of multiple pollutants in the same area. Since only the aermod diffusion module is involved, the mmif module and the aermap module are both turned off, that is, RUNMMIF = "NO", RUNAERMAP = "NO". Subsequently, running this program will generate the corresponding aermodSO2.inp file, for example: "aermodPM25.inp, aermodSO2.inp", and finally run the aermod diffusion module to obtain the concentrations of multiple pollutants in this area. For example: "aermodPM25.out, aermodSO2.out".
[0128] The code for simulating multiple pollutants in the same area of the automation program is as follows:
[0129]
[0130] When the simulation area changes, you need to change the range of the simulation area in the definition of aermap variable in this automation program, which will specifically involve the UTM data of the lower left corner and the upper right corner of the simulation area, as well as the anchor point coordinates that need to be selected. The simulation range settings in the automation program are as follows:
[0131]
[0132] After the user inputs the required simulation range data according to the above settings, the user also needs to turn on the aermap terrain module switch, that is, RUNAERMAP = "YES". Since the mmif meteorological module is not involved, the mmif module is closed, that is, RUNMMIF = "NO". Then run the program, the program will run the aermap terrain module according to the newly set simulation range, generate the terrain data required by the user, and finally obtain the pollutant concentration data of the new area required by the user.
[0133] In the above two processes, users only need to modify some of the data that needs to be changed in the program to run smoothly and get the desired results. In contrast, if the manual configuration method is used, for the simulation of multiple pollutants, the user needs to write a corresponding "aermod.inp" file for each pollutant. This is not only time-consuming and labor-intensive, but also prone to errors. In addition, only one pollutant can be simulated each time, and then "aermod" must be rerun to obtain the simulated concentration of the second pollutant. This cycle is repeated and inefficient. When using this program, multiple pollutants can be processed in parallel, which greatly improves work efficiency and reduces the possibility of human error.
[0134] In the case of changing the simulation area, manual processing requires the user to first enter the "aermap" terrain module folder, change the required data, and then manually run the module. Subsequently, the terrain input file needs to be moved to the "aermod" diffusion module folder, and finally the "aermod" diffusion module needs to be run. Sometimes, the terrain DEM file changes, and the "aermod.inp" file needs to be changed and the whole process needs to be rerun, which is cumbersome and complicated. The design of this program allows users to simply locate the "aermap" variable definition area, modify the corresponding data, and run it to get the final desired result directly. This is not only simple to operate, but also highly accurate, which helps users save a lot of time and energy, so as to complete the task more efficiently.
[0135] Advantages of the present invention:
[0136] The present invention can automatically generate configuration files. Reduce manual operations: Manual operation technology requires users to manually write configuration files one by one, while this program automatically generates various required input files (such as mmif.inp, aermap.inp, aermod.inp, etc.) by defining variables. This not only reduces the workload of manual operations, but also significantly reduces the risk of human error. Consistency and accuracy: The content of the automatically generated files is derived from predefined variables and logic, ensuring the consistency and accuracy of the file content.
[0137] The present invention adopts modular execution and conditional control. Flexible and configurable: In manual operation technology, the execution of each module is usually sequential and rigid, while your program can flexibly control the operation of each module according to the values of variables such as "RUNAERMAP", "RUNMMIF", and "RUNFLAG". This makes the program more flexible and configurable, and can adapt to various situations and needs. Reduce useless calculations: Through the setting of conditional control, some unnecessary calculation steps can be skipped, saving computing resources and time.
[0138] The present invention can dynamically process and manage files. Automated data processing: This program uses tools such as "sed" and "awk" to automatically process and modify generated files without manual intervention by the user. This method improves the automation and efficiency of data processing. Data flexibility: Automatically read the file list and dynamically include information such as the receptor file according to the actual situation, making the program more flexible and adaptable.
[0139] The present invention can be executed in parallel. Improve operation efficiency: In manual operation technology, each task is usually executed sequentially, which is inefficient especially when dealing with large-scale simulation tasks. This program greatly improves the operation efficiency by putting all aermod commands that need to be run into an array and executing these tasks in parallel. Resource optimization: Through parallel processing, computing resources such as multi-core CPUs are effectively utilized, shortening the overall simulation time.
[0140] The present invention simplifies complex configurations. Centralized management: All configuration management is centralized in one place through the program, which is easy to maintain and modify. Centralized management of variable definitions makes configuration intuitive and clear, which reduces the chance of errors compared to the decentralized configuration in manual operation technology. Reduce cumbersome steps: In manual operation technology, users often need to step through multiple components to complete each configuration step. This program integrates these steps into an automated process in advance, greatly simplifying the operation.
[0141] The present invention is reliable and robust. Reduce the possibility of errors: each step of automation is carried out according to the pre-designed logic, reducing the possibility of human input errors. Reliability is greatly improved. Ensure task completion: Use background PID management to ensure that all tasks are completed. This method is more robust and reliable than the background technology that relies solely on user monitoring.
[0142] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A park air quality simulation intelligent operation method, characterized in that: include: Define key variables, including MMIF variables, AERMAP variables, FLAG variables, and AERMOD variables, wherein the MMIF variables, AERMAP variables, and FLAG variables all include corresponding operation control variables and input variables, and the AERMOD variables include corresponding input variables; The user writes the values of MMIF variable, AERMAP variable, FLAG variable and AERMOD variable; Generate the mmif.inp file according to the value of the input variable in the MMIF variable and the WRF meteorological model, and input it into the MMIF mesoscale model interface program; Run the MMIF mesoscale model interface program according to the values of the running control variables in the MMIF variables, and obtain the aermod_LCC_wrf.pfl file, aermod_LCC_wrf.sfc file, and aermod_LCC_wrf.info file for the AERMOD model; Generate an aermap.inp file according to the value of the input variable in the AERMAP variable, and input it into the AERMAP terrain pre-processing program; Running the AERMAP terrain pre-processing program according to the value of the running control variable in the AERMAP variable to obtain the SRC.OUT file and the REC.OUT file for the AERMOD model; If the value of the running control variable in the FLAG variable is YES, the FLAG processing module is run according to the value of the input variable in the FLAG variable, and the combination of the specified height and the grid number is traversed in a loop to generate a FLAG file; Generate aermod.inp files for each pollutant according to the input variables corresponding to the AERMOD variables; Based on the aermod_LCC_wrf.pfl file, aermod_LCC_wrf.sfc file, aermod_LCC_wrf.info file, SRC.OUT file, and REC.OUT file, multiple AERMOD air quality models are run in parallel for the aermod.inp file of each pollutant to obtain simulation results for multiple pollutants.
2. The intelligent operation method for simulating air quality in a park according to claim 1 is characterized in that: The operation control variables among the MMIF variables, AERMAP variables and FLAG variables are RUNMMIF, RUNAERMAP and RUNFLAG, which are used to control whether the MMIF mesoscale model interface program, the AERMAP terrain pre-processing program and the FLAG processing module are to be run.
3. The intelligent operation method for simulating air quality in a park according to claim 1 is characterized in that: The input variables among the MMIF variable, AERMAP variable, AERMOD variable and FLAG variable are variables required to generate mmif.inp file, aermap.inp file, aermod.inp file and run the FLAG processing module. The mmif.inp file, aermap.inp file and aermod.inp file are all control flow files.
4. The intelligent operation method for simulating air quality in a park according to claim 1 is characterized in that: Generate an aermap.inp file based on the value of the input variable in the AERMAP variable and input it into the AERMAP terrain pre-processing program; including: First, the original aermap.inp file is deleted, and then a new aermap.inp file is generated according to the value of the input variable in the AERMAP variable.
5. The intelligent operation method for simulating air quality in a park according to claim 4 is characterized in that: Generate a new aermap.inp file, including: Write the CO instruction block to check whether the datafile file exists. If it exists, write the value of the input variable in the AERMAP variable to generate the initial aermap.inp file; Write coordinate transformation parameters such as DOMAINXY and ANCHORXY to the initial aermap.inp file; Write the STACK information into the initial aermap.inp file; Write the GRIDCART grid coordinate information to the initial aermap.inp file to get a new aermap.inp file.
6. The intelligent operation method for simulating air quality in a park according to claim 1 is characterized in that: The AERMAP terrain pre-processing program is run according to the value of the running control variable in the AERMAP variable, including: If the value of the run control variable in the AERMAP variable is YES, the AERMAP terrain pre-processing program needs to be run, and the AERMAP terrain pre-processing program automatically executes aermap.exe.
7. The intelligent operation method for simulating air quality in a park according to claim 1 is characterized in that: Generate aermod.inp files for each pollutant; including: Different pollutants have specific settings. The specific settings of each pollutant will be written into the corresponding aermod.inp file one by one, and the aermod.inp file also includes information on multiple shared parts; Read RE receptor files from the file list and include them into each aermod.inp file; Check if the aermod_LCC_wrf.info file exists, and if so append it to each aermod.inp file.
8. The intelligent operation method for simulating air quality in a park according to claim 1 is characterized in that: Run multiple AERMOD air quality models in parallel for each pollutant's aermod.inp file to obtain simulation results for multiple pollutants; including: Generate an aermod simulation command based on the aermod.inp file of each pollutant; Put all aermod simulation commands into an array; Loop through each aermod simulation command, run the AERMOD air quality model separately and put it into the background to run in parallel; Wait for all background runs to complete and get simulation results for multiple pollutants.
9. The intelligent operation method for simulating air quality in a park according to claim 1 is characterized by: The input variables in the MMIF variables include: simulation time set by the user, and storage address link of WRF simulation results.
10. The intelligent operation method for simulating air quality in a park according to claim 1, characterized in that: The input variables in the AERMAP variables include: terrain file, simulation range and emission source location data.
