Common resource file definition and interaction methods, systems, media and equipment for hydrological models
By defining the resource catalog and file set of hydrological models and establishing system configuration files, the problem of low efficiency in hydrological model data processing is solved, and the rapid extraction and analysis of hydrological model data is realized, and the calculation rate is improved.
Patent Information
- Application Number
- CN202411488114.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-10-24
AI Technical Summary
The prior art is difficult to systematically define the resource files of the hydrological model and realize their interaction with computer systems, resulting in low efficiency in hydrological model data processing.
By collecting and defining the resource catalog set of hydrological models, including model code, type and applicable areas, establishing a resource file set, forming a system configuration file, realizing the topological relationship between the hydrological model and the resource file, and then quickly obtaining and presenting the resource file list.
It improves the rapid extraction and analysis efficiency of hydrological model data and improves the rate of hydrological model calculation.
Smart Images

Figure CN119003466B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of hydrological forecasting, and in particular to a universal resource file definition and interaction method, system, medium and equipment for a hydrological model. Background Art
[0002] Hydrological models play an important role in hydrological forecasting, but they have a large amount of input, output and process data. These data are often stored in different types of files and are usually not intuitively displayed. In recent years, computer technology has developed rapidly, but it has not been linked to hydrological model resource files. In order to further promote the development of distributed basin hydrological models, it is necessary to further study the definition of hydrological model resource files and system interaction methods.
[0003] Therefore, how to systematically define the resource files of the hydrological model and realize its interaction with the computer system is a technical problem that needs to be solved urgently. Summary of the invention
[0004] In view of the above problems, the purpose of the present invention is to provide a universal resource file definition and interaction method, system, medium and equipment for a hydrological model, which is conducive to the rapid processing of various types of data of the hydrological model.
[0005] To achieve the above-mentioned purpose, the present invention adopts the following technical scheme: a universal resource file definition and interaction method for a hydrological model, which includes: collecting hydrological models and establishing a resource directory set of hydrological models, the resource directory set including various hydrological model codes, types and applicable areas; collecting universal resource files of hydrological models, the resource set consisting of hydrological model configuration resource files, model input resource files and model output resource files; obtaining resource files according to the resource set, establishing a topological relationship between the hydrological model and the resource files, and forming a system configuration file; obtaining a resource file list based on the hydrological model code by reading the system configuration file, and presenting it.
[0006] Further, the hydrological models are collected and a resource directory set of the hydrological models is established, including: collecting the hydrological models and defining the attribute set [model] = [Code, Type, Area] of each hydrological model; wherein model is the hydrological model, Code is the code of the model, Type is the type of the model, and Area indicates the applicable area of the model; according to the attribute set of the hydrological model, the hydrological model directory is set as follows: "SYSmodel / " under the system default path is the model directory, and the directory contains hydrological model model1, model2..., modeln directories; an attribute directory is defined under each hydrological model directory, and for any hydrological model modelX, the model code is stored under "SYSmodel / modelX / Code", the model type is stored under "SYSmodel / modelX / Type", and the model applicable area is stored under "SYSmodel / modelX / Area"; n, n is the number of types of hydrological models; the various hydrological model directories after the attribute directory is defined constitute a resource directory set [H-Models]=[model1, model2…,modeln].
[0007] Furthermore, the general resource files of the hydrological model are collected, and a resource set is formed by the hydrological model configuration resource file, the model input resource file, and the model output resource file, including: setting the name of the general resource file to: "Resource business type code_static / dynamic file code_resource process type"; setting the detailed content of each general resource file to a netcdf file, and classifying them according to process attributes to establish a resource set, which includes the model configuration resource file, the model input resource file, and the model output resource file; defining the resource file directory information: under the system default path, "SYSfile / " is the file directory, "SYSfile / input" is the input file directory, "SYSfile / output" is the output file directory, and "SYSfile / configure" is the configuration file directory.
[0008] Furthermore, resource business types include: P for rainfall, E for evaporation, Q for flow, Z for water level, and R for runoff depth; static / dynamic file codes include: static file code is Static, and dynamic file code is Dynamic; resource process types include: Input is input file, Output is output file, and Configure is configuration file.
[0009] Further, the detailed contents of the general resource file include: equal-time surface rainfall file, equal-time surface evapotranspiration capacity file, equal-time water level flow input file, equal-time runoff depth file, model initial state file, equal-time model state file, equal-time model output file, model parameter file, curve class file and underlying surface grid file; equal-time surface rainfall file includes sub-basin rainfall file and grid rainfall file; equal-time surface evapotranspiration capacity file includes sub-basin evapotranspiration capacity file and grid evapotranspiration capacity file; equal-time water level flow input file storage information includes time interval DT, time interval unit DT_Unit, start time BGTM, end time EDTM and water level flow input data, and different objects are distinguished by different identifiers; equal-time runoff depth file includes sub-basin runoff depth file and grid runoff depth file; model initial state file stores the initial state corresponding to each model, for the initial state of the lumped type or the model with sub-basin as the calculation unit; equal-time model state file stores the time series state data corresponding to each model; equal-time model output file storage information includes: DT, DT_Unit, BGTM, EDTM and corresponding data of output elements; model parameter files include model individual parameter files and model common parameter files; curve files include curve files that mainly store P_Pa_R three-parameter curves, P+Pa_R two-parameter curves, unit lines and water level-flow curves, CN represents the number of curves in each watershed, and PN stores the number of points of each curve in each watershed; curve names are used to identify different curve types; underlying surface grid files include grid resolution code GCD, grid file name GNM, grid matrix column number GNCOLS, grid matrix row number GNROWS, grid matrix lower left corner longitude GLCLGTD, grid matrix lower left corner latitude GLCLTTD, grid size GCELLSIZE, grid no value default GNULL and digital elevation data DEM, grid flow direction data DIR, cumulative catchment area data ACC, water system data NET, 0-30cm soil type data STP3, 30-100cm soil type data STP100 and land cover data LULC.
[0010] Further, a resource file is obtained according to the resource set, and a topological relationship between the hydrological model and the resource file is established to form a system configuration file, including: setting the format of the resource configuration file to model-file.json, and the file content is the input, configuration, and output resource file directories corresponding to different hydrological models: [model-file] = [model1, model2, model…, modeln]; establishing the input, configuration, and output resource file directories of different hydrological models to obtain a system configuration file: for any hydrological model modelX, the model input file is stored in the model_input field, the configuration file is stored in the model_configure field, and the output file is stored in the model_output field; the system configuration file is obtained as [modelX] = [model_input, model_configure, model_output].
[0011] Furthermore, by reading the system configuration file, a resource file list is obtained based on the hydrological model code and presented, including: reading the resource configuration file, obtaining the configuration, input, and output resource file lists based on the hydrological model code; and presenting the obtained specific file resource information in the form of 0D, 1D, 2D, or 3D.
[0012] In the second aspect, the technical solution adopted by the present invention is: a universal resource file definition and interactive system for hydrological models, which includes: a resource directory set construction module, which collects hydrological models and establishes a resource directory set for hydrological models, and the resource directory set includes various hydrological model codes, types and applicable areas; a resource set construction module, which collects universal resource files of hydrological models, and the resource set is composed of hydrological model configuration resource files, model input resource files, and model output resource files; a system configuration file construction module, which obtains resource files according to the resource set, establishes a topological relationship between the hydrological model and the resource files, and forms a system configuration file; an interactive presentation module, which obtains a resource file list based on the hydrological model code by reading the system configuration file, and presents it.
[0013] In a third aspect, the technical solution adopted by the present invention is: a computer-readable storage medium storing one or more programs, wherein the one or more programs include instructions, and when the instructions are executed by a computing device, the computing device executes any one of the above methods.
[0014] In a fourth aspect, the technical solution adopted by the present invention is: a computing device, comprising: one or more processors, a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any of the above methods.
[0015] The present invention adopts the above technical solution, which has the following advantages:
[0016] The present invention can quickly obtain the input files and hydrological information corresponding to the hydrological model by constructing a systematic hydrological model file processing method, which is conducive to the rapid extraction and analysis of hydrological data and improves the calculation rate of the hydrological model. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a flow chart of resource file definition and interaction method common to the hydrological model in the embodiment of the present invention. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the present invention.
[0019] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0020] In one embodiment of the present invention, a resource file definition and interaction method for a hydrological model is provided. Figure 1 As shown, the method comprises the following steps:
[0021] 1) Collect hydrological models and establish a resource catalog of hydrological models [H-Models], which includes hydrological model codes, types and applicable areas;
[0022] 2) Collect common resource files of the hydrological model, which are composed of hydrological model configuration resource files, model input resource files, and model output resource files to form a resource set [H-files];
[0023] 3) Obtain resource files based on resource sets, establish the topological relationship between the hydrological model and resource files, and form a system configuration file;
[0024] 4) By reading the system configuration file, obtain the resource file list based on the hydrological model code and present it.
[0025] The present invention can quickly obtain the input files and hydrological information corresponding to the hydrological model by constructing a systematic hydrological model file processing method, which is conducive to the rapid extraction and analysis of hydrological data and improves the calculation rate of the hydrological model.
[0026] In the above step 1), collecting hydrological models and establishing a resource catalog set of hydrological models [H-Models] includes the following steps:
[0027] 1.1) Collect hydrological models and define the attribute set [model] = [Code, Type, Area] for each hydrological model; where model is the hydrological model, Code is the model code, Type is the model type, and Area indicates the applicable area of the model;
[0028] Among them, the model types include lumped, distributed and semi-distributed; the model applicable areas include humid basins, semi-humid basins and semi-humid and semi-arid basins.
[0029] Taking the Xinanjiang model as an example, the attribute set of the Xinanjiang model can be expressed as:
[0030] [Xin'anjiang model] = [Xin'anjiang model code, lumped model, humid and semi-humid basin]
[0031] 1.2) According to the attribute set of the hydrological model, the hydrological model directory is set as follows: "SYSmodel / " under the system default path is the model directory, which contains the hydrological model model1, model2..., modeln directories;
[0032] 1.3) Define attribute directories under each hydrological model directory. For any hydrological model modelX, the model code is stored under "SYSmodel / modelX / Code", the model type is stored under "SYSmodel / modelX / Type", and the model applicable area is stored under "SYSmodel / modelX / Area"; n, n is the number of types of hydrological models;
[0033] 1.4) The various hydrological model directories after the attribute directories are defined constitute a resource directory set [H-Models]=[model1, model2…, modeln].
[0034] In the above step 2), the common resource files of the hydrological model are collected. The resource set [H-files] is composed of the hydrological model configuration resource file, the model input resource file, and the model output resource file, including the following steps:
[0035] 2.1) Set the name of the general resource file to: "Resource business type code_static / dynamic file code_resource process type";
[0036] 2.2) Set the detailed contents of each common resource file as a netcdf file, and classify them according to process attributes to establish a resource set, which includes model configuration resource files, model input resource files, and model output resource files; among them, model configuration resource files, model input resource files, and model output resource files all use nc format.
[0037] The model configuration resource file is marked as C, the model input resource file is marked as I, and the model output resource file is marked as O.
[0038] 2.3) Define resource file directory information: Under the system default path, "SYSfile / " is the file directory, "SYSfile / input" is the input file directory, "SYSfile / output" is the output file directory, and "SYSfile / configure" is the configuration file directory.
[0039] In the above step 2.1), the resource business types include: P for rainfall, E for evaporation, Q for flow, Z for water level, R for runoff depth, etc.;
[0040] Static / dynamic file codes include: static file code is Static, dynamic file code is Dynamic;
[0041] Resource process types include: Input is the input file, Output is the output file, and Configure is the configuration file.
[0042] In the above step 2.2), the details of the general resource file include: equal-time surface rainfall file, equal-time surface evapotranspiration capacity file, equal-time water level flow input file, equal-time runoff depth file, model initial state file, equal-time model state file, equal-time model output file, model parameter file, curve class file and underlying surface grid file.
[0043] 2.2.1) In this embodiment, the equal-time area rainfall file (*.pa.nc, where * represents a microservice identifier) includes a sub-basin rainfall file and a grid rainfall file.
[0044] Preferably, the sub-basin surface rainfall file storage information includes: time interval DT, time interval unit DT_Unit, start time BGTM, end time EDTM and sub-basin surface rainfall data PA(TM).
[0045] (1) DT_Unit, which uses s, m, h, D, T, and M to describe seconds, minutes, hours, days, ten days, and months respectively; it can contain only one unit.
[0046] (2) The data format of BGTM and EDTM is "YYYY-MM-DD hh:mm:ss". If the start and end times of multiple floods are stored, they are separated by a half-width comma and a space, such as "YYYY-MM-DD hh:mm:ss, YYYY-MM-DD hh:mm:ss".
[0047] (3) In PA(TM), TM represents the data length.
[0048] It should be noted that the descriptions of DT, DT_Unit, BGTM, EDTM and TM involved in the subsequent embodiments are consistent with those in this embodiment and will not be repeated herein.
[0049] Specifically, the sub-basin rainfall nc file example is as follows:
[0050]
[0051] Preferably, the grid rainfall file storage information includes: time interval DT, time interval unit DT_Unit, start time BGTM, end time EDTM, grid resolution code GCD, grid file name GNM, grid matrix column number GNCOLS, grid matrix row number GNROWS, grid matrix lower left corner longitude GLCLGTD, grid matrix lower left corner latitude GLCLTTD, grid size GCELLSIZE, grid no value default GNULL, grid rainfall data PA (TM, GNROWS, GNCOLS).
[0052] It should be noted that the descriptions of the grid information GCD, GNM, GNCOLS, GNROWS, GLCLGTD, GLCLTTD, GCELLSIZE, and GNULL involved in the subsequent embodiments are consistent with those in this embodiment and will not be repeated herein.
[0053] 2.2.2) In this embodiment, the equal-time-period surface evapotranspiration capacity file (*.etp.nc) includes a sub-basin evapotranspiration capacity file and a grid evapotranspiration capacity file.
[0054] Preferably, the sub-basin evapotranspiration capacity file storage information includes: DT, DT_Unit, BGTM, EDTM and sub-basin evapotranspiration capacity data ETP (TM).
[0055] Preferably, the grid evapotranspiration capacity file storage information includes: DT, DT_Unit, BGTM, EDTM, GCD, GNM, GNCOLS, GNROWS, GLCLGTD, GLCLTTD, GCELLSIZE, GNULL and grid evapotranspiration capacity data ETP (TM, GNROWS, GNCOLS).
[0056] Specifically, the grid evapotranspiration capacity nc file example is as follows:
[0057]
[0058] 2.2.3) In this embodiment, the water level and flow input file (*.dis.nc) of equal time period stores information including time interval DT, time interval unit DT_Unit, start time BGTM, end time EDTM and water level and flow input data, and uses different identifiers to distinguish different objects, such as rivers, reservoirs, gates and pumps;
[0059] (1) River water level Z (TM); river flow Q (TM).
[0060] (2) Reservoir inflow INQ (TM); Reservoir outflow OTQ (TM); Reservoir water level RZ (TM).
[0061] (3) Water level above the gate UPZ (TM); water level below the gate DWZ (TM); total flow through the gate TGTQ (TM).
[0062] (4) Water level above the pump PPUPZ (TM); water level below the pump PPDWZ (TM); pumping flow rate PMPQ (TM).
[0063] Specifically, the example of river water level and flow input nc file is as follows:
[0064]
[0065] 2.2.4) In this embodiment, the equal-time runoff depth file (*.rno.nc) includes a sub-basin runoff depth file and a grid runoff depth file.
[0066] Preferably, the sub-basin runoff depth file storage information includes: DT, DT_Unit, BGTM, EDTM and sub-basin runoff depth data RNO (TM, NPN). Among them: NPN is the number of elements, such as three water sources take the value of 3, and store the surface runoff depth, soil flow runoff depth and underground runoff depth in sequence; two water sources take the value of 2, and store the surface runoff depth and underground runoff depth in sequence.
[0067] Specifically, the sub-basin runoff depth nc file example is as follows:
[0068]
[0069] Preferably, the grid runoff depth file storage information includes: DT, DT_Unit, BGTM, EDTM, GCD, GNM, GNCOLS, GNROWS, GLCLGTD, GLCLTTD, GCELLSIZE, GNULL and grid runoff depth data RNO (TM, GNROWS, GNCOLS, NPN).
[0070] Specifically, the grid runoff depth nc file example is as follows:
[0071]
[0072] 2.2.5) In this embodiment, the model initial state file (*.sts.nc) stores the initial state corresponding to each model, for the initial state of the lumped model or the model with the sub-basin as the calculation unit.
[0073] The data structure of the model initial state file is generally STS, but for the lag routing related methods, the data structure of the initial total base flow is (LAG); for the Muskingum related method, its initial flow data structure is (MP1). Among them, LAG is the lag period parameter value, and MP1 is the number of river sections MP plus 1. For the initial state of the distributed model with grid as the calculation unit, its data structure is generally STS (GNROWS, GNCOLS).
[0074] For example, the initial state nc file of the runoff model of Xin'an River in Sanshuiyuan is as follows:
[0075]
[0076] 2.2.6) In this embodiment, the equal-time model state file (*.stn.nc) stores the time series state data corresponding to each model. For the lumped model output or the model output with sub-basin as the calculation unit, the data structure is STN(TM), but for the Muskingum correlation method, the data structure is STN(TM, MP1); for the distributed model output with grid as the calculation unit, the data structure is STN (TM, GNROWS, GNCOLS).
[0077] For example, the nc file of the three-water source hysteresis algorithm equal-period model state is as follows:
[0078]
[0079] 2.2.7) In this embodiment, the storage information of the equal-time model output file includes: DT, DT_Unit, BGTM, EDTM and the corresponding data of the output elements. For the lumped model output or the model output with sub-basin as the calculation unit, the data structure is OUT(TM); for the distributed model output with grid as the calculation unit, the data structure is GRIDOUT(TM, GNROWS, GNCOLS). Taking the flow output as an example, the two data structures are Q(TM) and Q(TM, GNROWS, GNCOLS). The output descriptions of different objects such as rivers, reservoirs, gates and pumps are consistent with *.dis.nc, and different identifiers are used to distinguish them.
[0080] For example, the output (flow) nc file of the three-water source lag algorithm equal-time model is as follows:
[0081]
[0082] It should be noted that the data structure of the output file out.nc involving the three water source related microservices is consistent with the data structure of the equal time period runoff depth file rno.nc.
[0083] 2.2.8) In this embodiment, the model parameter file (*.par.nc) includes a model individual parameter file and a model common parameter file.
[0084] Preferably, the model individual parameter file stores the parameters of each model itself, including: (1) lumped model parameters or model parameters with sub-basin as calculation unit, whose data structure is PAR; (2) grid parameters with grid as calculation unit, whose data structure is GRIDPAR (GNROWS, GNCOLS); (3) regional general parameters used to derive grid parameters, whose data structure is PAR, that is, unrelated dimensions.
[0085] For example, take the Sanshuiyuan Xin'anjiang runoff model and the grid Xin'anjiang model runoff module as examples, where:
[0086] (1) The parameters of the Xin'anjiang runoff model include K, B, C, WM, WUMx, WLMx, IM, SM, EX, KG, and KI.
[0087] An example of the nc file of the runoff model parameters of the Sanshuiyuan Xin'an River is as follows:
[0088]
[0089] (2) The parameters of the gridded Xin'anjiang model runoff module include WM(GNROWS, GNCOLS), WUM(GNROWS,GNCOLS), WLM(GNROWS, GNCOLS), SM(GNROWS, GNCOLS), KG(GNROWS, GNCOLS), KI(GNROWS, GNCOLS), C(GNROWS, GNCOLS). The nc file example is as follows:
[0090]
[0091] (3) The parameters used to estimate the distribution of WM, WUM, WLM, KG, KI, etc. in the gridded Xin'anjiang model runoff module include WUMx, WLMx, RO, OC. The nc file example is as follows:
[0092]
[0093] Preferably, the common parameters of the model mainly refer to parameters related to soil and land cover types, which are mainly used for the spatial distribution estimation of distributed model parameters, and their data structures are SOIlPAR(ROW, COL) and LULCPAR(ROW, COL). Among them, ROW represents the number of soil types or land cover types, and COL represents the number of parameters.
[0094] 2.2.9) In this embodiment, the curve file (*.cur.nc) includes the curve file mainly storing the P_Pa_R three-parameter curve, the P+Pa_R two-parameter curve, the unit line and the water level flow curve, CN represents the number of curves in each basin, and PN stores the number of points of each curve in each basin; the curve name is used to identify different curve types, such as PPAR3 represents the P_Pa_R three-parameter curve, PPAR2 represents the P+Pa_R two-parameter curve, UH represents the time unit line, ZQ represents the water level flow curve, and ZW represents the tank storage curve. All curve types are stored in rows and columns (curve rows ROW, curve columns COL) in two dimensions, where:
[0095] (1) In PPAR3(ROW, COL), COL=4, which means that there are several rows and 4 columns of data, and the columns store PA, P, and R in sequence.
[0096] (2) In PPAR2(ROW, COL), COL=3, which means a number of rows and 3 columns of data, with the columns storing P+PA, R in sequence.
[0097] (3) In UH(ROW, COL), COL=2, that is, several rows and 2 columns of data, and the columns store UH values in sequence.
[0098] (4) In ZQ(ROW, COL), COL=3, which means a number of rows and 3 columns of data, with the columns storing Z and Q in sequence.
[0099] (5) In ZW(ROW, COL), COL=3, that is, a number of rows and 3 columns of data, with the columns storing Z and W in sequence.
[0100] What needs to be explained is that the curve types can be increased according to the above data structure, such as storage capacity curve, discharge capacity curve, etc.
[0101] For example, the P_Pa_R three-parameter curve nc file example is as follows:
[0102]
[0103] An example of the P+Pa_R two-parameter curve nc file is as follows:
[0104]
[0105] The following is an example of a time period unit line nc file:
[0106]
[0107] The following is an example of a water level flow curve nc file:
[0108]
[0109] The following is an example of a slot storage curve nc file:
[0110]
[0111] 2.2.10) In this embodiment, the underlying surface grid file includes the grid resolution code GCD, the grid file name GNM, the number of grid matrix columns GNCOLS, the number of grid matrix rows GNROWS, the longitude of the lower left corner of the grid matrix GLCLGTD, the latitude of the lower left corner of the grid matrix GLCLTTD, the grid size GCELLSIZE, the grid no value default GNULL and the digital elevation data DEM, the grid flow direction data DIR, the cumulative catchment area data ACC, the water system data NET, the 0-30cm soil type data STP3, the 30-100cm soil type data STP100 and the land cover data LULC. Among them, the DEM data must be able to reflect the application basin watershed information, that is, the non-application basin grid in the DEM data is assigned a no value default.
[0112] For example, the underlying surface mesh nc file is as follows:
[0113]
[0114]
[0115] In the above step 3), the resource file is obtained according to the resource set, the topological relationship between the hydrological model and the resource file is established, and the system configuration file is formed, including the following steps:
[0116] 3.1) Set the format of the resource configuration file to model-file.json. The file content is the input, configuration, and output resource file directories corresponding to different hydrological models: [model-file] = [model1, model2, model…, modeln];
[0117] 3.2) Establish the input, configuration and output resource file directories of different hydrological models and obtain the system configuration file:
[0118] 3.3) For any hydrological model modelX, the model input file is stored in the model_input field, the configuration file is stored in the model_configure field, and the output file is stored in the model_output field; the system configuration file is [modelX] = [model_input, model_configure, model_output].
[0119] In this embodiment, taking the Xinanjiang model as an example, the corresponding configuration, input, and output resource files in model-file.json are as follows:
[0120] XAJ_input: sub-basin rainfall, sub-basin evaporation capacity, model initial state file;
[0121] XAJ_configure: model personality parameter file, model common parameter file;
[0122] XAJ_output: sub-basin runoff depth;
[0123] ………
[0124] In the above step 4), by reading the system configuration file, obtaining the resource file list based on the hydrological model code and presenting it, the following steps are included:
[0125] 4.1) Read the resource configuration file model-file.json and obtain the configuration, input, and output resource file lists based on the hydrological model code;
[0126] Specifically, select the hydrological model, search for the corresponding model in [[H-Models]], and then search for the corresponding model code, model type, and model applicable area in [model].
[0127] 4.2) Present the acquired specific file resource information in the form of 0D, 1D, 2D or 3D.
[0128] In this embodiment, the Xinanjiang model is taken as an example:
[0129] (1) Select the Xinanjiang model from the [H-Models] model catalog;
[0130] (2) Obtain the Xinanjiang model code;
[0131] (3) Read the model-file.json configuration file to obtain the input, configuration, and output resource file lists of the Xinanjiang model;
[0132] (4) Present the resource files of the Xin'anjiang model in 0D, 1D, 2D and 3D forms.
[0133] In one embodiment of the present invention, a universal resource file definition and interaction system for a hydrological model is provided, which includes:
[0134] A resource catalog set building module collects hydrological models and builds a resource catalog set of hydrological models, which includes various hydrological model codes, types and applicable areas;
[0135] The resource set construction module collects the common resource files of the hydrological model. The resource set is composed of the hydrological model configuration resource file, the model input resource file, and the model output resource file.
[0136] The system configuration file building module obtains the resource file according to the resource set, establishes the topological relationship between the hydrological model and the resource file, and forms the system configuration file;
[0137] The interactive presentation module reads the system configuration file, obtains the resource file list based on the hydrological model code, and presents it.
[0138] In the above embodiment, collecting the hydrological model and establishing a resource directory set of the hydrological model includes:
[0139] Collect hydrological models and define the attribute set [model] = [Code, Type, Area] for each hydrological model; where model is the hydrological model, Code is the model code, Type is the model type, and Area indicates the applicable area of the model;
[0140] According to the attribute set of the hydrological model, the hydrological model directory is set as follows: "SYSmodel / " under the system default path is the model directory, which contains the hydrological model model1, model2..., modeln directories;
[0141] Define the attribute directory under each hydrological model directory. For any hydrological model modelX, the model code is stored under "SYSmodel / modelX / Code", the model type is stored under "SYSmodel / modelX / Type", and the model applicable area is stored under "SYSmodel / modelX / Area". n, n is the number of types of hydrological models;
[0142] The various hydrological model directories after the attribute directories are defined constitute a resource directory set [H-Models]=[model1,model2…, modeln].
[0143] In the above embodiment, the common resource files of the hydrological model are collected, and the resource set is composed of the hydrological model configuration resource file, the model input resource file, and the model output resource file, including:
[0144] Set the name of the general resource file to: "Resource business type code_static / dynamic file code_resource process type";
[0145] Set the detailed contents of each common resource file as a netcdf file, and classify them according to process attributes to establish a resource set, which includes model configuration resource files, model input resource files, and model output resource files;
[0146] Define resource file directory information: Under the system default path, "SYSfile / " is the file directory, "SYSfile / input" is the input file directory, "SYSfile / output" is the output file directory, and "SYSfile / configure" is the configuration file directory.
[0147] In the above embodiment, the resource business types include: P for rainfall, E for evaporation, Q for flow, Z for water level, and R for runoff depth;
[0148] Static / dynamic file codes include: static file code is Static, dynamic file code is Dynamic;
[0149] Resource process types include: Input is the input file, Output is the output file, and Configure is the configuration file.
[0150] In the above embodiment, the detailed contents of the general resource file include: equal-time surface rainfall file, equal-time surface evapotranspiration capacity file, equal-time water level flow input file, equal-time runoff depth file, model initial state file, equal-time model state file, equal-time model output file, model parameter file, curve class file and underlying surface grid file;
[0151] The surface rainfall files of equal time periods include sub-basin rainfall files and grid rainfall files;
[0152] The equal-time-period surface evapotranspiration capacity file includes the sub-basin evapotranspiration capacity file and the grid evapotranspiration capacity file;
[0153] The storage information of the water level and flow input file of equal time period includes the time interval DT, the time interval unit DT_Unit, the start time BGTM, the end time EDTM and the water level and flow input data, and different objects are distinguished by different identifiers;
[0154] The equal-time runoff depth files include sub-basin runoff depth files and grid runoff depth files;
[0155] The model initial state file stores the initial state corresponding to each model, for the initial state of the lumped model or the model with sub-basin as the calculation unit;
[0156] The equal-time model state file stores the time series state data corresponding to each model;
[0157] The storage information of the equal time period model output file includes: DT, DT_Unit, BGTM, EDTM and the corresponding data of the output elements;
[0158] The model parameter files include the model individual parameter files and the model common parameter files;
[0159] Curve files include curve files that mainly store P_Pa_R three-parameter curves, P+Pa_R two-parameter curves, unit lines and water level flow curves. CN represents the number of curves in each basin, and PN stores the number of points of each curve in each basin. Different curve types are distinguished by curve name identification.
[0160] The underlying surface grid file includes the grid resolution code GCD, grid file name GNM, grid matrix column number GNCOLS, grid matrix row number GNROWS, grid matrix lower left corner longitude GLCLGTD, grid matrix lower left corner latitude GLCLTTD, grid size GCELLSIZE, grid no value default GNULL and digital elevation data DEM, grid flow direction data DIR, cumulative catchment area data ACC, water system data NET, 0-30cm soil type data STP3, 30-100cm soil type data STP100 and land cover data LULC.
[0161] In the above embodiment, a resource file is obtained according to a resource set, a topological relationship between a hydrological model and the resource file is established, and a system configuration file is formed, including:
[0162] Set the format of the resource configuration file to model-file.json. The file content is the input, configuration, and output resource file directories corresponding to different hydrological models: [model-file] = [model1, model2, model…, modeln];
[0163] Create input, configuration, and output resource file directories for different hydrological models and obtain system configuration files:
[0164] For any hydrological model modelX, the model input file is stored in the model_input field, the configuration file is stored in the model_configure field, and the output file is stored in the model_output field; the system configuration file is [modelX] = [model_input, model_configure, model_output].
[0165] In the above embodiment, by reading the system configuration file, a resource file list is obtained based on the hydrological model code and presented, including:
[0166] Read resource configuration files and obtain configuration, input, and output resource file lists based on the hydrological model code;
[0167] The acquired specific file resource information is presented in the form of 0D, 1D, 2D or 3D.
[0168] The system provided in this embodiment is used to execute the above-mentioned method embodiments. Please refer to the above-mentioned embodiments for specific processes and detailed contents, which will not be repeated here.
[0169] In one embodiment of the present invention, a computing device is provided, which may be a terminal, and may include: a processor, a communication interface, a memory, a display screen, and an input device. Among them, the processor, the communication interface, and the memory communicate with each other through a communication bus. The processor is used to provide computing and control capabilities. The memory includes a non-volatile storage medium and an internal memory, and the non-volatile storage medium stores an operating system and a computer program. When the computer program is executed by the processor, the method in each of the above embodiments is implemented; the internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a management network, NFC (near field communication) or other technologies. The display screen may be a liquid crystal display screen or an electronic ink display screen, and the input device may be a touch layer covered on the display screen, or a key, trackball or touchpad provided on the housing of the computing device, or an external keyboard, touchpad or mouse, etc. The processor may call the logic instructions in the memory.
[0170] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0171] In one embodiment of the present invention, a computer program product is provided, wherein the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the methods provided by the above-mentioned method embodiments.
[0172] In one embodiment of the present invention, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium stores server instructions, and the computer instructions enable a computer to execute the methods provided in the above embodiments.
[0173] The above embodiment provides a computer-readable storage medium, whose implementation principle and technical effect are similar to those of the above method embodiment, and will not be repeated here.
[0174] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0175] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0176] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0177] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A universal resource file definition and interaction method for a hydrological model, characterized in that: include: Collect hydrological models and establish a resource catalog of hydrological models, which includes various hydrological model codes, types and applicable areas; Collect common resource files of the hydrological model, which are composed of hydrological model configuration resource files, model input resource files, and model output resource files. Obtain resource files according to resource sets, establish topological relationships between hydrological models and resource files, and form system configuration files; By reading the system configuration file, the resource file list is obtained based on the hydrological model code and presented; Collect common resource files of hydrological models. The resource set consists of hydrological model configuration resource files, model input resource files, and model output resource files, including: Set the name of the general resource file to: "Resource business type code_static / dynamic file code_resource process type"; Set the detailed contents of each common resource file as a netcdf file, and classify them according to process attributes to establish a resource set, which includes model configuration resource files, model input resource files, and model output resource files; Define resource file directory information: under the system default path, "SYSfile / " is the file directory, "SYSfile / input" is the input file directory, "SYSfile / output" is the output file directory, and "SYSfile / configure" is the configuration file directory; The details of the general resource files include: equal-time surface rainfall files, equal-time surface evapotranspiration capacity files, equal-time water level flow input files, equal-time runoff depth files, model initial state files, equal-time model state files, equal-time model output files, model parameter files, curve files and underlying surface grid files; The surface rainfall files of equal time periods include sub-basin rainfall files and grid rainfall files; The equal-time-period surface evapotranspiration capacity file includes the sub-basin evapotranspiration capacity file and the grid evapotranspiration capacity file; The storage information of the water level and flow input file of equal time period includes the time interval DT, the time interval unit DT_Unit, the start time BGTM, the end time EDTM and the water level and flow input data, and different objects are distinguished by different identifiers; The equal-time runoff depth files include sub-basin runoff depth files and grid runoff depth files; The model initial state file stores the initial state corresponding to each model, for the initial state of the lumped model or the model with sub-basin as the calculation unit; The equal-time model state file stores the time series state data corresponding to each model; The storage information of the equal time period model output file includes: DT, DT_Unit, BGTM, EDTM and the corresponding data of the output elements; The model parameter files include the model individual parameter files and the model common parameter files; Curve files include curve files that mainly store P_Pa_R three-parameter curves, P+Pa_R two-parameter curves, unit lines and water level flow curves. CN represents the number of curves in each basin, and PN stores the number of points of each curve in each basin. Different curve types are distinguished by curve name identification. The underlying surface grid file includes the grid resolution code GCD, grid file name GNM, grid matrix column number GNCOLS, grid matrix row number GNROWS, grid matrix lower left corner longitude GLCLGTD, grid matrix lower left corner latitude GLCLTTD, grid size GCELLSIZE, grid no value default GNULL and digital elevation data DEM, grid flow direction data DIR, cumulative catchment area data ACC, water system data NET, 0-30cm soil type data STP3, 30-100cm soil type data STP100 and land cover data LULC; Get the resource file according to the resource set, establish the topological relationship between the hydrological model and the resource file, and form the system configuration file, including: Set the format of the resource configuration file to model-file.json. The file content is the input, configuration, and output resource file directories corresponding to different hydrological models: [model-file] = [model1, model2, model…, modeln]; Create input, configuration, and output resource file directories for different hydrological models and obtain system configuration files: For any hydrological model modelX, the model input file is stored in the model_input field, the configuration file is stored in the model_configure field, and the output file is stored in the model_output field; the system configuration file is [modelX] = [model_input, model_configure, model_output].
2. The universal resource file definition and interaction method of the hydrological model as claimed in claim 1, characterized in that: A collection of hydrological models and a catalog of resources for building hydrological models, including: Collect hydrological models and define the attribute set [model] = [Code, Type, Area] for each hydrological model; where model is the hydrological model, Code is the model code, Type is the model type, and Area indicates the applicable area of the model; According to the attribute set of the hydrological model, the hydrological model directory is set as follows: "SYSmodel / " under the system default path is the model directory, which contains the hydrological model model1, model2..., modeln directories; Define the attribute directory under each hydrological model directory. For any hydrological model modelX, the model code is stored under "SYSmodel / modelX / Code", the model type is stored under "SYSmodel / modelX / Type", and the model applicable area is stored under "SYSmodel / modelX / Area"; n, n is the number of types of hydrological models; The various hydrological model directories after the attribute directories are defined constitute a resource directory set [H-Models]=[model1,model2…, modeln].
3. The universal resource file definition and interaction method of the hydrological model as claimed in claim 1, characterized in that: Resource business types include: P for rainfall, E for evaporation, Q for flow, Z for water level, and R for runoff depth; Static / dynamic file codes include: static file code is Static, dynamic file code is Dynamic; Resource process types include: Input is the input file, Output is the output file, and Configure is the configuration file.
4. The universal resource file definition and interaction method for the hydrological model as claimed in claim 1, characterized in that: By reading the system configuration file, the resource file list is obtained based on the hydrological model code and presented, including: Read resource configuration files and obtain configuration, input, and output resource file lists based on the hydrological model code; The acquired specific file resource information is presented in the form of 0D, 1D, 2D or 3D.
5. A universal resource file definition and interaction system for hydrological models, characterized in that: include: A resource catalog set building module collects hydrological models and builds a resource catalog set of hydrological models, which includes various hydrological model codes, types and applicable areas; The resource set construction module collects the common resource files of the hydrological model, and the resource set is composed of the hydrological model configuration resource file, the model input resource file, and the model output resource file; The system configuration file building module obtains the resource file according to the resource set, establishes the topological relationship between the hydrological model and the resource file, and forms the system configuration file; The interactive presentation module reads the system configuration file, obtains the resource file list based on the hydrological model code, and presents it; Collect common resource files of hydrological models. The resource set consists of hydrological model configuration resource files, model input resource files, and model output resource files, including: Set the name of the general resource file to: "Resource business type code_static / dynamic file code_resource process type"; Set the detailed contents of each common resource file as a netcdf file, and classify them according to process attributes to establish a resource set, which includes model configuration resource files, model input resource files, and model output resource files; Define resource file directory information: under the system default path, "SYSfile / " is the file directory, "SYSfile / input" is the input file directory, "SYSfile / output" is the output file directory, and "SYSfile / configure" is the configuration file directory; The details of the general resource files include: equal-time surface rainfall files, equal-time surface evapotranspiration capacity files, equal-time water level flow input files, equal-time runoff depth files, model initial state files, equal-time model state files, equal-time model output files, model parameter files, curve files and underlying surface grid files; The surface rainfall files of equal time periods include sub-basin rainfall files and grid rainfall files; The equal-time-period surface evapotranspiration capacity file includes the sub-basin evapotranspiration capacity file and the grid evapotranspiration capacity file; The storage information of the water level and flow input file of equal time period includes the time interval DT, the time interval unit DT_Unit, the start time BGTM, the end time EDTM and the water level and flow input data, and different objects are distinguished by different identifiers; The equal-time runoff depth files include sub-basin runoff depth files and grid runoff depth files; The model initial state file stores the initial state corresponding to each model, for the initial state of the lumped model or the model with sub-basin as the calculation unit; The equal-time model state file stores the time series state data corresponding to each model; The storage information of the equal time period model output file includes: DT, DT_Unit, BGTM, EDTM and the corresponding data of the output elements; The model parameter files include the model individual parameter files and the model common parameter files; Curve files include curve files that mainly store P_Pa_R three-parameter curves, P+Pa_R two-parameter curves, unit lines and water level flow curves. CN represents the number of curves in each basin, and PN stores the number of points of each curve in each basin. Different curve types are distinguished by curve name identification. The underlying surface grid file includes the grid resolution code GCD, grid file name GNM, grid matrix column number GNCOLS, grid matrix row number GNROWS, grid matrix lower left corner longitude GLCLGTD, grid matrix lower left corner latitude GLCLTTD, grid size GCELLSIZE, grid no value default GNULL and digital elevation data DEM, grid flow direction data DIR, cumulative catchment area data ACC, water system data NET, 0-30cm soil type data STP3, 30-100cm soil type data STP100 and land cover data LULC; Get the resource file according to the resource set, establish the topological relationship between the hydrological model and the resource file, and form the system configuration file, including: Set the format of the resource configuration file to model-file.json. The file content is the input, configuration, and output resource file directories corresponding to different hydrological models: [model-file] = [model1, model2, model…, modeln]; Create input, configuration, and output resource file directories for different hydrological models and obtain system configuration files: For any hydrological model modelX, the model input file is stored in the model_input field, the configuration file is stored in the model_configure field, and the output file is stored in the model_output field; the system configuration file is [modelX] = [model_input, model_configure, model_output].
6. A computer-readable storage medium storing one or more programs, characterized in that: The one or more programs include instructions, which, when executed by a computing device, cause the computing device to perform any one of the methods of claims 1 to 4 .
7. A computing device, characterized in that include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any one of the methods described in claims 1 to 4.
