CN113076214B - Verification and correction method, device, equipment and readable medium for namelist file - Google Patents

Verification and correction method, device, equipment and readable medium for namelist file Download PDF

Info

Publication number
CN113076214B
CN113076214B CN202110354371.XA CN202110354371A CN113076214B CN 113076214 B CN113076214 B CN 113076214B CN 202110354371 A CN202110354371 A CN 202110354371A CN 113076214 B CN113076214 B CN 113076214B
Authority
CN
China
Prior art keywords
file
namelist
parameter
application
matched
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110354371.XA
Other languages
Chinese (zh)
Other versions
CN113076214A (en
Inventor
张敏
刘羽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Yingxin Computer Technology Co Ltd
Original Assignee
Shandong Yingxin Computer Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Yingxin Computer Technology Co Ltd filed Critical Shandong Yingxin Computer Technology Co Ltd
Priority to CN202110354371.XA priority Critical patent/CN113076214B/en
Publication of CN113076214A publication Critical patent/CN113076214A/en
Application granted granted Critical
Publication of CN113076214B publication Critical patent/CN113076214B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • G06F11/0775Content or structure details of the error report, e.g. specific table structure, specific error fields
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/079Root cause analysis, i.e. error or fault diagnosis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/162Delete operations

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Quality & Reliability (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Library & Information Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a verification and correction method of namelist files, which comprises the following steps: acquiring and extracting a first parameter file based on the namelist file, and acquiring and reading an application code based on the application to obtain a second parameter file; comparing the first parameter file with the second parameter file to judge whether the namelist file is matched with the application; if the namelist file is not matched with the application, whether the namelist file needs to be corrected is further judged based on user input; and if the namelist file needs to be corrected, writing and/or deleting the first parameter file based on the second parameter file, and correcting the namelist file based on the updated first parameter file to obtain an adaptive namelist file. The invention also discloses a device for verifying and correcting the namelist file, computer equipment and a readable storage medium. The method and the device can quickly and efficiently generate the correct namelist file, thereby reducing errors caused by the mismatching of namelist in the application running process.

Description

Method, device and equipment for verifying and correcting namelist file and readable medium
Technical Field
The invention relates to the technical field of simulation application, in particular to a method, a device, equipment and a readable medium for verifying and correcting a namelist file.
Background
In most weather-oceanic numerical forecasting applications, files like namelist. Input,. Nml file or namelist _ cfg are common in schemas like GRAPES, WRF, NEMO, etc. Configuration variables for controlling the operation of the mode, such as the forecast area range, the forecast time, the technical scheme selection, the number of processes required by the operation mode and the like, are put into the file.
namelist is a special I/O read-write format in Fortran, and packages a group of related variables together, and when inputting/outputting the group of variables, only the nml field in write/read is assigned to assign which namelist to use.
One set of namelist formats in namelist _ cfg in NEMO mode is as follows: the name of the group namelist is namdom, the/number ends the group namelist, and the contents between the names of the variables and the values taken by the variables are respectively. When reading and writing namelist in an application, the variables are required to be firstly stated, then the read-in work of the namelist is executed, and when the reading of the namelist is successful, the next calculation is carried out.
With the upgrade change of the application version, for some applications, the modification of the namelist parameter of the input file does not change much, but for some applications, such as NEMO, the version is updated faster and the namelist parameter changes more, and even if the version is upgraded in a small stage, the requirements of the application itself on the namelist parameter are different, so that the namelist needs to be modified correspondingly according to the application version, otherwise, a calculation error is caused, and even the mode cannot run normally.
Because the structure of the application code is not known too much, the application code is huge, and the modification of the corresponding namelist is not clear due to the change of version upgrading, a tool is urgently needed to quickly identify whether the obtained namelist file conforms to the application code of the version, and if the obtained namelist file does not conform to the application code of the version, the namelist file can be automatically and quickly changed, so that the namelist file can be matched with the existing code.
The existing technical scheme is that an application is operated according to the existing namelist, when an error report result is obtained, an error position is searched in an application code according to the error report result, whether the error position accords with a code format is further positioned, a code segment is positioned to act on a newly added or removed parameter to manually define a proper value, the namelist is further modified, and if the version is changed more, the application is operated once to position the error. Based on manual operation, and a user needs to have certain capability to judge whether the error position is based on the namelist file, so that the requirement on the user of the application is high. Even if the user of the application has a deep knowledge about the application, when the namelist is not in accordance with the schema version, the correct namelist file cannot be efficiently generated, thereby affecting the operation efficiency.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a method, an apparatus, a device, and a readable medium for verifying and correcting a namelist file, so as to generate a correct namelist file quickly and efficiently, thereby reducing errors caused by namelist mismatch in an application running process.
Based on the above purpose, an aspect of the embodiments of the present invention provides a method for verifying and correcting a namelist file, including the following steps: acquiring and extracting a first parameter file based on the namelist file, and acquiring and reading an application code based on the application to obtain a second parameter file; comparing the first parameter file with the second parameter file to judge whether the namelist file is matched with the application; if the namelist file is not matched with the application, whether the namelist file needs to be corrected is further judged based on user input; and if the namelist file needs to be corrected, writing and/or deleting the first parameter file based on the second parameter file, and correcting the namelist file based on the updated first parameter file to obtain an adaptive namelist file.
In some embodiments, further comprising: extracting a third parameter file based on the adaptive namelist file, and comparing the third parameter file with the second parameter file to judge whether the adaptive namelist file is matched with the application; and if the adaptive namelist file is matched with the application, outputting the adaptive namelist file.
In some embodiments, further comprising: and if the namelist file is matched with the application, outputting a notification that the namelist file is matched with the application.
In some embodiments, further comprising: and if the namelist file does not need to be corrected, outputting a notice that the namelist file is not matched with the application.
In some embodiments, obtaining and extracting the first parameter file based on the namelist file includes: and acquiring a namelist file, and extracting parameters in the namelist file to obtain a first parameter file.
In some embodiments, obtaining and reading the second parameter file based on the application code of the application includes: and acquiring an application code of the application, and reading parameters in the application code to obtain a second parameter file.
In some embodiments, determining whether a correction to the namelist file is needed further based on the user input comprises: acquiring a k value input by a user, and judging based on the k value; if the k value is 0, confirming that the user does not need to correct the namelist file; if the k value is 1, confirming that the user needs to correct the namelist file; if the k value is not 0 and not 1, a k value input error warning is sent to the user.
In another aspect of the embodiments of the present invention, there is also provided a device for verifying and correcting a namelist file, including: the parameter acquisition module is configured to acquire and extract a first parameter file based on the namelist file, and acquire and read an application code based on the application to acquire a second parameter file; the parameter comparison module is configured to compare the first parameter file with the second parameter file so as to judge whether the namelist file is matched with the application; the judging module is configured to judge whether the namelist file needs to be corrected or not based on user input if the namelist file is not matched with the application; and the correction module is configured to correct the namelist file if the namelist file needs to be corrected, write and/or delete the first parameter file based on the second parameter file, and correct the namelist file based on the updated first parameter file to obtain the adaptive namelist file.
In another aspect of the embodiments of the present invention, there is also provided a computer device, including: at least one processor; and a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of the method.
In another aspect of the embodiments of the present invention, a computer-readable storage medium is further provided, in which a computer program for implementing the above method steps is stored when the computer program is executed by a processor.
The invention has the following beneficial technical effects: and generating a correct namelist file quickly and efficiently, thereby reducing errors caused by namelist mismatching in the application running process.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of an embodiment of a verification and correction method for namelist files provided by the present invention;
FIG. 2 is a schematic diagram of an embodiment of a namelist file verification and correction apparatus provided in the present invention;
FIG. 3 is a schematic diagram of an embodiment of a computer device provided by the present invention;
FIG. 4 is a schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
In view of the above objects, a first aspect of an embodiment of the present invention proposes an embodiment of a verification and correction method for namelist files. Fig. 1 is a schematic diagram illustrating an embodiment of a verification and correction method for namelist files provided by the present invention. As shown in fig. 1, the embodiment of the present invention includes the following steps:
s01, acquiring and extracting a first parameter file based on the namelist file, and acquiring and reading a second parameter file based on an application code of the application;
s02, comparing the first parameter file with the second parameter file to judge whether the namelist file is matched with the application;
s03, if the namelist file is not matched with the application, further judging whether the namelist file needs to be corrected or not based on user input; and
and S04, if the namelist file needs to be corrected, writing and/or deleting the first parameter file based on the second parameter file, and correcting the namelist file based on the updated first parameter file to obtain an adaptive namelist file.
In this embodiment, the namelist file is verified first, and the comparison is performed based on the application code and the namelist file, so that the verification success or failure is finally obtained to judge whether the namelist file conforms to the application code of the corresponding version, if the verification passes, Y is returned, and if the verification fails, N is returned. Further judging whether the user needs to correct, and if not, outputting a verification result; and if the user needs to correct, verifying the user in one step after correction, and returning a final namelist file which is suitable for the application version if verification is successful.
In this embodiment, for the processing of the namelist _ cfg file, all the parameters in the namelist file are selected and stored in the corresponding file, and namelist _ x includes the variable name in the namelist parameter group extracted from the namelist _ cfg, where x refers to the variable group name. Aiming at the processing of application codes, reading numnam _ cfg as a keyword to search all codes, outputting all parameter group names required by the codes, selecting a variable group in the codes to output to a NAMELIST _1r file, searching the codes by using a variable group name x in the NAMELIST _1r and NAMELIST/x, obtaining a variable name corresponding to the variable group in the codes, and outputting the variable name to a NAMELIST _ xr file. Comparing the parameters of the namelist _ x and the namelist _ rx, if the number of the namelist _ x is small and the number of the namelist _ rx is large, writing different parameters of two files into the namelist _ cfg through write (unit, nml = nml _ name), and if the number of the namelist _ x is not large, deleting the parameters in the namelist _ cfg.
In this embodiment, taking an example that an application version applicable to a NEMO mode (a nuclear for European modeling of the Ocean) is matched with a namelist file, it is checked and verified in time whether the application version is matched with the namelist file, so that the operation of the mode is no longer limited by version upgrade, and the reason why an error occurs in the operation process of the application is not caused by the mismatch of the namelist file is fed back in time, which greatly reduces the workload of a user and improves the work efficiency.
In some embodiments of the invention, further comprising: extracting a third parameter file based on the adaptive namelist file, and comparing the third parameter file with the second parameter file to judge whether the adaptive namelist file is matched with the application; and if the adaptive namelist file is matched with the application, outputting the adaptive namelist file.
In some embodiments of the invention, further comprising: and if the namelist file is matched with the application, outputting a notification that the namelist file is matched with the application.
In some embodiments of the invention, further comprising: and if the namelist file does not need to be corrected, outputting a notice that the namelist file is not matched with the application.
In some embodiments of the present invention, obtaining and extracting the first parameter file based on the namelist file includes: and acquiring a namelist file, and extracting parameters in the namelist file to obtain a first parameter file.
In this embodiment, mainly for processing a namelist _ cfg file, all parameters in the namelist file are selected and stored in a corresponding file, where namelist _1 stores a name of a namelist parameter group followed by and the number of parameters in the current parameter group, and namelist _ x includes a variable name in the namelist parameter group extracted from the namelist _ cfg, where x refers to the variable group name, so that many files are generated here.
In this embodiment, the basic script is mainly used for implementation, and the implementation modes of the following modules are similar, and all the modules use the basic script to implement the required functions, and the basic script needs to be matched with namelists of different applications. The script code that outputs the parameter group name after the name in namelist _1 to the file1 file is as follows:
cat namelist_cfg|grep-n"&nam"|awk-F":"'{print$2}'|sed"s/.*!:\(.*\)/\1/"|cut-d'!'-f1>file1
the screen outputs are as follows:
&namrun
&namdom
&namcfg
&namtsd
&namwad
&namcrs
looking for the variables in the middle of every two variables without! The variable of (2) is written into a loop, and the variables among different parameters are output in sequence. For the example of & namrun and & namdom, the script code is as follows:
n2=`cat namelist_cfg|grep-n"&namdom"|awk-F":"'{print$1}'`
n1=`cat namelist_cfg|grep-n"&namrun"|awk-F":"'{print$1}'`
c=$((n2-n1-2))
cat namelist_cfg|grep-A$c"&namrun"|cut-d'='-f1|grep-v"\!"
the screen output is the variable names in the parameter group corresponding to the namrun, c is the number of the variable names, and the screen output is as follows:
Figure BDA0003003124670000071
Figure BDA0003003124670000081
Figure BDA0003003124670000091
in some embodiments of the present invention, obtaining and reading the second parameter file based on the application code of the application includes: and acquiring an application code of the application, and reading parameters in the application code to obtain a second parameter file.
In this embodiment, mainly for processing application codes, reading numnam _ cfg as a keyword to search all codes, outputting all parameter group names required by the codes, selecting a variable group therein to output to a NAMELIST _1r file, searching in the codes by using a variable group name x in the NAMELIST _1r and using NAMELIST/x/to obtain a variable name corresponding to the variable group in the codes, and outputting the variable name to the NAMELIST _ xr file.
In some embodiments of the invention, determining whether a correction to the namelist file is needed further based on the user input comprises: acquiring a k value input by a user, and judging based on the k value; if the k value is 0, confirming that the user does not need to correct the namelist file; if the k value is 1, confirming that the user needs to correct the namelist file; if the k value is not 0 and not 1, a k value input error warning is sent to the user.
In this embodiment, the user inputs a k value: the user inputs 0 to verify the namelist file, and the user does not need to correct the namelist file; the user inputs 1 that the namelist file is corrected, and the user is considered to need to correct the namelist file; the user enters other values and returns an error that the k value is in error.
In some embodiments of the invention, the method of the invention may be used for verification and correction for any other application that uses the read namelist method.
It should be particularly noted that, the steps in the embodiments of the verification and correction method for namelist files described above can be mutually intersected, replaced, added, and deleted, so that these reasonable permutation and combination transformations of the verification and correction method for namelist files shall also belong to the scope of the present invention, and shall not limit the scope of the present invention to the embodiments.
In view of the above object, a second aspect of the embodiments of the present invention provides a device for verifying and correcting a namelist file. Fig. 2 is a schematic diagram of an embodiment of the verification and correction device for namelist files provided by the present invention. As shown in fig. 2, the embodiment of the present invention includes the following modules: the parameter acquisition module S11 is configured to acquire and extract a first parameter file based on the namelist file, and acquire and read an application code based on the application to acquire a second parameter file; the parameter comparison module S12 is configured to compare the first parameter file with the second parameter file to judge whether the namelist file is matched with the application; the judging module S13 is configured to judge whether the namelist file needs to be corrected or not based on user input if the namelist file is not matched with the application; and a correcting module S14, configured to correct the namelist file if necessary, write and/or delete the first parameter file based on the second parameter file, and correct the namelist file based on the updated first parameter file to obtain an adapted namelist file.
In a third aspect of the embodiments of the present invention, a computer apparatus is provided. Fig. 3 is a schematic diagram of an embodiment of a computer device provided by the present invention. As shown in fig. 3, an embodiment of the present invention includes the following means: at least one processor S21; and a memory S22, the memory S22 storing computer instructions S23 executable on the processor, the instructions when executed by the processor implementing the steps of the above method.
The invention also provides a computer readable storage medium. FIG. 4 is a schematic diagram illustrating an embodiment of a computer-readable storage medium provided by the present invention. As shown in fig. 4, the computer-readable storage medium stores S31 a computer program S32 that, when executed by a processor, performs the method as described above.
Finally, it should be noted that, as those skilled in the art can understand, all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware by a computer program, and the program of the method for validating and correcting namelist file can be stored in a computer readable storage medium, and when executed, the program can include the processes of the embodiments of the methods as described above. The storage medium of the program may be a magnetic disk, an optical disk, a read-only memory (ROM), or a Random Access Memory (RAM). The embodiments of the computer program may achieve the same or similar effects as any of the above-described method embodiments.
Furthermore, the methods disclosed according to embodiments of the invention may also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. Which when executed by a processor performs the above-described functions defined in the methods disclosed in embodiments of the invention.
Further, the above method steps and system elements may also be implemented using a controller and a computer readable storage medium for storing a computer program for causing the controller to implement the functions of the above steps or elements.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, where the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant only to be exemplary, and is not intended to intimate that the scope of the disclosure, including the claims, is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements and the like that may be made without departing from the spirit or scope of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (8)

1. A method for verifying and correcting a namelist file, comprising the following steps:
acquiring a namelist file, selecting all parameters in the namelist file to obtain a first parameter file, acquiring and reading a second parameter file based on an application code of an application, and outputting variables in all parameter group names required in the application code to the second parameter file;
comparing the first parameter file with the second parameter file to judge whether the namelist file is matched with the application;
if the namelist file is not matched with the application, whether the namelist file needs to be corrected is further judged based on user input; and
and if the namelist file needs to be corrected, writing and/or deleting the first parameter file based on the second parameter file, and correcting the namelist file based on the updated first parameter file to obtain an adaptive namelist file.
2. The method for validating and correcting a namelist file as claimed in claim 1, further comprising:
extracting a third parameter file based on the adaptive namelist file, and comparing the third parameter file with the second parameter file to judge whether the adaptive namelist file is matched with the application;
and if the adaptive namelist file is matched with the application, outputting the adaptive namelist file.
3. The method for validating and correcting a namelist file as claimed in claim 1, further comprising:
and if the namelist file is matched with the application, outputting a notification that the namelist file is matched with the application.
4. The method of validating and correcting a namelist file as claimed in claim 1, further comprising:
and if the namelist file does not need to be corrected, outputting a notification that the namelist file is not matched with the application.
5. The method of claim 1, wherein determining whether a correction to the namelist file is needed further based on user input comprises:
acquiring a k value input by a user, and judging based on the k value;
if the k value is 0, confirming that the user does not need to correct the namelist file;
if the k value is 1, confirming that the user needs to correct the namelist file;
if the k value is not 0 and not 1, sending a k value input error warning to the user.
6. An apparatus for validating and correcting namelist files, comprising:
the parameter acquisition module is configured to acquire a namelist file, select all parameters in the namelist file to acquire a first parameter file, acquire and read a second parameter file based on an application code of an application, and output variables in all parameter group names required in the application code to the second parameter file;
the parameter comparison module is configured to compare the first parameter file with the second parameter file to judge whether the namelist file is matched with the application;
the judging module is configured to judge whether the namelist file needs to be corrected or not based on user input if the namelist file is not matched with the application; and
and the correcting module is configured to, if the namelist file needs to be corrected, write and/or delete the first parameter file based on the second parameter file, and correct the namelist file based on the updated first parameter file to obtain an adaptive namelist file.
7. A computer device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of the method of any one of claims 1 to 5.
8. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
CN202110354371.XA 2021-04-01 2021-04-01 Verification and correction method, device, equipment and readable medium for namelist file Active CN113076214B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110354371.XA CN113076214B (en) 2021-04-01 2021-04-01 Verification and correction method, device, equipment and readable medium for namelist file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110354371.XA CN113076214B (en) 2021-04-01 2021-04-01 Verification and correction method, device, equipment and readable medium for namelist file

Publications (2)

Publication Number Publication Date
CN113076214A CN113076214A (en) 2021-07-06
CN113076214B true CN113076214B (en) 2022-12-20

Family

ID=76614785

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110354371.XA Active CN113076214B (en) 2021-04-01 2021-04-01 Verification and correction method, device, equipment and readable medium for namelist file

Country Status (1)

Country Link
CN (1) CN113076214B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110471665A (en) * 2019-06-28 2019-11-19 平安科技(深圳)有限公司 Script file method of calibration, device, server and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10867046B2 (en) * 2018-08-08 2020-12-15 Quanta Computer Inc. Methods and apparatus for authenticating a firmware settings input file
CN109101812A (en) * 2018-08-28 2018-12-28 北京神州绿盟信息安全科技股份有限公司 A kind of parameter verification method, apparatus, computing device and storage medium
CN110851135A (en) * 2019-09-12 2020-02-28 中国平安财产保险股份有限公司 Automatic application program building and uploading method and device, computer equipment and storage medium
CN111857726A (en) * 2020-07-21 2020-10-30 苏州浪潮智能科技有限公司 Weather forecasting method and equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110471665A (en) * 2019-06-28 2019-11-19 平安科技(深圳)有限公司 Script file method of calibration, device, server and storage medium

Also Published As

Publication number Publication date
CN113076214A (en) 2021-07-06

Similar Documents

Publication Publication Date Title
US9201911B2 (en) Managing test data in large scale performance environment
CN108985934B (en) Block chain modification method and device
CN111324577B (en) Yml file reading and writing method and device
CN107391557B (en) Block chain serial query method and system for setting out-of-chain fault table
US20210334292A1 (en) System and method for reconciliation of data in multiple systems using permutation matching
CN110442371A (en) A kind of method, apparatus of release code, medium and computer equipment
CN109582670B (en) Recommendation method of vehicle maintenance scheme and related equipment
CN111258990B (en) Index database data migration method, device, equipment and storage medium
CN113407514A (en) Method, device and equipment for migrating database and readable medium
CN109753289B (en) Art resource merging method and device, electronic equipment and storage medium
CN113076214B (en) Verification and correction method, device, equipment and readable medium for namelist file
CN113805965A (en) Method, device and equipment for installing external plug-in and readable medium
CN110851343A (en) Test method and device based on decision tree
US10824587B2 (en) Integrated universal file converter
CN114546749A (en) Chip random test case regression method, device, equipment and readable medium
CN111723007B (en) Test case merging method, system, equipment and medium
CN105740260A (en) Method and device for extracting template file data structure
CN109977097B (en) Network configuration management method and system based on database
CN113553480A (en) Document auditing method, document auditing device and readable storage medium
CN113434472A (en) File generation method and device, server and storage medium
CN113573328A (en) Method and device for updating site configuration data and electronic equipment
CN112416431B (en) Source code segment pair comparison method based on coding sequence representation
CN114138323B (en) Management method, device and equipment for multi-version development of products and readable medium
CN117573943B (en) Data comparison method based on serialization similarity calculation
US20220100703A1 (en) Integrated universal file converter

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant