floodmodeller-api 0.4.2.post1__py3-none-any.whl → 0.4.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- floodmodeller_api/__init__.py +8 -9
- floodmodeller_api/_base.py +184 -176
- floodmodeller_api/backup.py +273 -273
- floodmodeller_api/dat.py +909 -831
- floodmodeller_api/diff.py +136 -119
- floodmodeller_api/ied.py +307 -306
- floodmodeller_api/ief.py +647 -637
- floodmodeller_api/ief_flags.py +253 -253
- floodmodeller_api/inp.py +266 -266
- floodmodeller_api/libs/libifcoremd.dll +0 -0
- floodmodeller_api/libs/libifcoremt.so.5 +0 -0
- floodmodeller_api/libs/libifport.so.5 +0 -0
- floodmodeller_api/{libmmd.dll → libs/libimf.so} +0 -0
- floodmodeller_api/libs/libintlc.so.5 +0 -0
- floodmodeller_api/libs/libmmd.dll +0 -0
- floodmodeller_api/libs/libsvml.so +0 -0
- floodmodeller_api/libs/libzzn_read.so +0 -0
- floodmodeller_api/libs/zzn_read.dll +0 -0
- floodmodeller_api/logs/__init__.py +2 -2
- floodmodeller_api/logs/lf.py +320 -312
- floodmodeller_api/logs/lf_helpers.py +354 -352
- floodmodeller_api/logs/lf_params.py +643 -529
- floodmodeller_api/mapping.py +84 -0
- floodmodeller_api/test/__init__.py +4 -4
- floodmodeller_api/test/conftest.py +9 -8
- floodmodeller_api/test/test_backup.py +117 -117
- floodmodeller_api/test/test_dat.py +221 -92
- floodmodeller_api/test/test_data/All Units 4_6.DAT +1081 -1081
- floodmodeller_api/test/test_data/All Units 4_6.feb +1081 -1081
- floodmodeller_api/test/test_data/BRIDGE.DAT +926 -926
- floodmodeller_api/test/test_data/Culvert_Inlet_Outlet.dat +36 -36
- floodmodeller_api/test/test_data/Culvert_Inlet_Outlet.feb +36 -36
- floodmodeller_api/test/test_data/DamBreakADI.xml +52 -52
- floodmodeller_api/test/test_data/DamBreakFAST.xml +58 -58
- floodmodeller_api/test/test_data/DamBreakFAST_dy.xml +53 -53
- floodmodeller_api/test/test_data/DamBreakTVD.xml +55 -55
- floodmodeller_api/test/test_data/DefenceBreach.xml +53 -53
- floodmodeller_api/test/test_data/DefenceBreachFAST.xml +60 -60
- floodmodeller_api/test/test_data/DefenceBreachFAST_dy.xml +55 -55
- floodmodeller_api/test/test_data/Domain1+2_QH.xml +76 -76
- floodmodeller_api/test/test_data/Domain1_H.xml +41 -41
- floodmodeller_api/test/test_data/Domain1_Q.xml +41 -41
- floodmodeller_api/test/test_data/Domain1_Q_FAST.xml +48 -48
- floodmodeller_api/test/test_data/Domain1_Q_FAST_dy.xml +48 -48
- floodmodeller_api/test/test_data/Domain1_Q_xml_expected.json +263 -0
- floodmodeller_api/test/test_data/Domain1_W.xml +41 -41
- floodmodeller_api/test/test_data/EX1.DAT +321 -321
- floodmodeller_api/test/test_data/EX1.ext +107 -107
- floodmodeller_api/test/test_data/EX1.feb +320 -320
- floodmodeller_api/test/test_data/EX1.gxy +107 -107
- floodmodeller_api/test/test_data/EX17.DAT +421 -422
- floodmodeller_api/test/test_data/EX17.ext +213 -213
- floodmodeller_api/test/test_data/EX17.feb +422 -422
- floodmodeller_api/test/test_data/EX18.DAT +375 -375
- floodmodeller_api/test/test_data/EX18_DAT_expected.json +3876 -0
- floodmodeller_api/test/test_data/EX2.DAT +302 -302
- floodmodeller_api/test/test_data/EX3.DAT +926 -926
- floodmodeller_api/test/test_data/EX3_DAT_expected.json +16235 -0
- floodmodeller_api/test/test_data/EX3_IEF_expected.json +61 -0
- floodmodeller_api/test/test_data/EX6.DAT +2084 -2084
- floodmodeller_api/test/test_data/EX6.ext +532 -532
- floodmodeller_api/test/test_data/EX6.feb +2084 -2084
- floodmodeller_api/test/test_data/EX6_DAT_expected.json +31647 -0
- floodmodeller_api/test/test_data/Event Data Example.DAT +336 -336
- floodmodeller_api/test/test_data/Event Data Example.ext +107 -107
- floodmodeller_api/test/test_data/Event Data Example.feb +336 -336
- floodmodeller_api/test/test_data/Linked1D2D.xml +52 -52
- floodmodeller_api/test/test_data/Linked1D2DFAST.xml +53 -53
- floodmodeller_api/test/test_data/Linked1D2DFAST_dy.xml +48 -48
- floodmodeller_api/test/test_data/Linked1D2D_xml_expected.json +313 -0
- floodmodeller_api/test/test_data/blockage.dat +50 -50
- floodmodeller_api/test/test_data/blockage.ext +45 -45
- floodmodeller_api/test/test_data/blockage.feb +9 -9
- floodmodeller_api/test/test_data/blockage.gxy +71 -71
- floodmodeller_api/test/test_data/defaultUnits.dat +127 -127
- floodmodeller_api/test/test_data/defaultUnits.ext +45 -45
- floodmodeller_api/test/test_data/defaultUnits.feb +9 -9
- floodmodeller_api/test/test_data/defaultUnits.fmpx +58 -58
- floodmodeller_api/test/test_data/defaultUnits.gxy +85 -85
- floodmodeller_api/test/test_data/ex3.ief +20 -20
- floodmodeller_api/test/test_data/ex3.lf1 +2800 -2800
- floodmodeller_api/test/test_data/ex4.DAT +1374 -1374
- floodmodeller_api/test/test_data/ex4_changed.DAT +1374 -1374
- floodmodeller_api/test/test_data/example1.inp +329 -329
- floodmodeller_api/test/test_data/example2.inp +158 -158
- floodmodeller_api/test/test_data/example3.inp +297 -297
- floodmodeller_api/test/test_data/example4.inp +388 -388
- floodmodeller_api/test/test_data/example5.inp +147 -147
- floodmodeller_api/test/test_data/example6.inp +154 -154
- floodmodeller_api/test/test_data/jump.dat +176 -176
- floodmodeller_api/test/test_data/network.dat +1374 -1374
- floodmodeller_api/test/test_data/network.ext +45 -45
- floodmodeller_api/test/test_data/network.exy +1 -1
- floodmodeller_api/test/test_data/network.feb +45 -45
- floodmodeller_api/test/test_data/network.ied +45 -45
- floodmodeller_api/test/test_data/network.ief +20 -20
- floodmodeller_api/test/test_data/network.inp +147 -147
- floodmodeller_api/test/test_data/network.pxy +57 -57
- floodmodeller_api/test/test_data/network.zzd +122 -122
- floodmodeller_api/test/test_data/network_dat_expected.json +21837 -0
- floodmodeller_api/test/test_data/network_from_tabularCSV.csv +87 -87
- floodmodeller_api/test/test_data/network_ied_expected.json +287 -0
- floodmodeller_api/test/test_data/rnweir.dat +9 -9
- floodmodeller_api/test/test_data/rnweir.ext +45 -45
- floodmodeller_api/test/test_data/rnweir.feb +9 -9
- floodmodeller_api/test/test_data/rnweir.gxy +45 -45
- floodmodeller_api/test/test_data/rnweir_default.dat +74 -74
- floodmodeller_api/test/test_data/rnweir_default.ext +45 -45
- floodmodeller_api/test/test_data/rnweir_default.feb +9 -9
- floodmodeller_api/test/test_data/rnweir_default.fmpx +58 -58
- floodmodeller_api/test/test_data/rnweir_default.gxy +53 -53
- floodmodeller_api/test/test_data/unit checks.dat +16 -16
- floodmodeller_api/test/test_ied.py +29 -29
- floodmodeller_api/test/test_ief.py +125 -24
- floodmodeller_api/test/test_inp.py +47 -48
- floodmodeller_api/test/test_json.py +114 -0
- floodmodeller_api/test/test_logs_lf.py +48 -51
- floodmodeller_api/test/test_tool.py +165 -152
- floodmodeller_api/test/test_toolbox_structure_log.py +234 -239
- floodmodeller_api/test/test_xml2d.py +151 -156
- floodmodeller_api/test/test_zzn.py +36 -34
- floodmodeller_api/to_from_json.py +218 -0
- floodmodeller_api/tool.py +332 -329
- floodmodeller_api/toolbox/__init__.py +5 -5
- floodmodeller_api/toolbox/example_tool.py +45 -45
- floodmodeller_api/toolbox/model_build/__init__.py +2 -2
- floodmodeller_api/toolbox/model_build/add_siltation_definition.py +100 -98
- floodmodeller_api/toolbox/model_build/structure_log/__init__.py +1 -1
- floodmodeller_api/toolbox/model_build/structure_log/structure_log.py +287 -289
- floodmodeller_api/toolbox/model_build/structure_log_definition.py +76 -76
- floodmodeller_api/units/__init__.py +10 -10
- floodmodeller_api/units/_base.py +214 -212
- floodmodeller_api/units/boundaries.py +467 -467
- floodmodeller_api/units/comment.py +52 -55
- floodmodeller_api/units/conduits.py +382 -402
- floodmodeller_api/units/helpers.py +123 -131
- floodmodeller_api/units/iic.py +107 -101
- floodmodeller_api/units/losses.py +305 -306
- floodmodeller_api/units/sections.py +444 -446
- floodmodeller_api/units/structures.py +1690 -1683
- floodmodeller_api/units/units.py +93 -104
- floodmodeller_api/units/unsupported.py +44 -44
- floodmodeller_api/units/variables.py +87 -89
- floodmodeller_api/urban1d/__init__.py +11 -11
- floodmodeller_api/urban1d/_base.py +188 -179
- floodmodeller_api/urban1d/conduits.py +93 -85
- floodmodeller_api/urban1d/general_parameters.py +58 -58
- floodmodeller_api/urban1d/junctions.py +81 -79
- floodmodeller_api/urban1d/losses.py +81 -74
- floodmodeller_api/urban1d/outfalls.py +114 -110
- floodmodeller_api/urban1d/raingauges.py +111 -111
- floodmodeller_api/urban1d/subsections.py +92 -98
- floodmodeller_api/urban1d/xsections.py +147 -144
- floodmodeller_api/util.py +77 -21
- floodmodeller_api/validation/parameters.py +660 -660
- floodmodeller_api/validation/urban_parameters.py +388 -404
- floodmodeller_api/validation/validation.py +110 -108
- floodmodeller_api/version.py +1 -1
- floodmodeller_api/xml2d.py +688 -673
- floodmodeller_api/xml2d_template.py +37 -37
- floodmodeller_api/zzn.py +387 -363
- {floodmodeller_api-0.4.2.post1.dist-info → floodmodeller_api-0.4.3.dist-info}/LICENSE.txt +13 -13
- {floodmodeller_api-0.4.2.post1.dist-info → floodmodeller_api-0.4.3.dist-info}/METADATA +82 -82
- floodmodeller_api-0.4.3.dist-info/RECORD +179 -0
- {floodmodeller_api-0.4.2.post1.dist-info → floodmodeller_api-0.4.3.dist-info}/WHEEL +1 -1
- floodmodeller_api/libifcoremd.dll +0 -0
- floodmodeller_api/test/test_data/EX3.bmp +0 -0
- floodmodeller_api/test/test_data/test_output.csv +0 -87
- floodmodeller_api/zzn_read.dll +0 -0
- floodmodeller_api-0.4.2.post1.dist-info/RECORD +0 -164
- {floodmodeller_api-0.4.2.post1.dist-info → floodmodeller_api-0.4.3.dist-info}/entry_points.txt +0 -0
- {floodmodeller_api-0.4.2.post1.dist-info → floodmodeller_api-0.4.3.dist-info}/top_level.txt +0 -0
|
@@ -1,529 +1,643 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Flood Modeller Python API
|
|
3
|
-
Copyright (C)
|
|
4
|
-
|
|
5
|
-
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License
|
|
6
|
-
as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
|
7
|
-
|
|
8
|
-
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
|
9
|
-
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
10
|
-
|
|
11
|
-
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
|
|
12
|
-
|
|
13
|
-
If you have any query about this program or this License, please contact us at support@floodmodeller.com or write to the following
|
|
14
|
-
address: Jacobs UK Limited, Flood Modeller, Cottons Centre, Cottons Lane, London, SE1 2QG, United Kingdom.
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
from .lf_helpers import (
|
|
18
|
-
DateTimeParser,
|
|
19
|
-
FloatParser,
|
|
20
|
-
FloatSplitParser,
|
|
21
|
-
StringParser,
|
|
22
|
-
StringSplitParser,
|
|
23
|
-
TimeDeltaHMSParser,
|
|
24
|
-
TimeDeltaHParser,
|
|
25
|
-
TimeDeltaSParser,
|
|
26
|
-
TimeFloatMultParser,
|
|
27
|
-
TimeParser,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
"
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
"
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
"
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
"
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
"
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
"
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
"
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
"
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
"
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
"
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
"
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
"
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
"
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
"
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
"
|
|
153
|
-
"
|
|
154
|
-
"
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
"
|
|
159
|
-
"
|
|
160
|
-
"
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
"
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
"
|
|
172
|
-
"
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
"
|
|
177
|
-
"
|
|
178
|
-
"
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
"
|
|
183
|
-
"
|
|
184
|
-
"
|
|
185
|
-
},
|
|
186
|
-
"
|
|
187
|
-
"class": FloatSplitParser,
|
|
188
|
-
"prefix": "!!output1
|
|
189
|
-
"data_type": "last",
|
|
190
|
-
"split": "m3",
|
|
191
|
-
},
|
|
192
|
-
"
|
|
193
|
-
"class": FloatSplitParser,
|
|
194
|
-
"prefix": "!!output1
|
|
195
|
-
"data_type": "last",
|
|
196
|
-
"split": "m3",
|
|
197
|
-
},
|
|
198
|
-
"
|
|
199
|
-
"class": FloatSplitParser,
|
|
200
|
-
"prefix": "!!output1
|
|
201
|
-
"data_type": "last",
|
|
202
|
-
"split": "m3",
|
|
203
|
-
},
|
|
204
|
-
"
|
|
205
|
-
"class": FloatSplitParser,
|
|
206
|
-
"prefix": "!!output1
|
|
207
|
-
"data_type": "last",
|
|
208
|
-
"split": "m3",
|
|
209
|
-
},
|
|
210
|
-
"
|
|
211
|
-
"class": FloatSplitParser,
|
|
212
|
-
"prefix": "!!output1
|
|
213
|
-
"data_type": "last",
|
|
214
|
-
"split": "m3",
|
|
215
|
-
},
|
|
216
|
-
"
|
|
217
|
-
"class": FloatSplitParser,
|
|
218
|
-
"prefix": "!!output1
|
|
219
|
-
"data_type": "last",
|
|
220
|
-
"split": "m3",
|
|
221
|
-
},
|
|
222
|
-
"
|
|
223
|
-
"class": FloatSplitParser,
|
|
224
|
-
"prefix": "!!output1
|
|
225
|
-
"data_type": "last",
|
|
226
|
-
"split": "m3",
|
|
227
|
-
},
|
|
228
|
-
"
|
|
229
|
-
"class": FloatSplitParser,
|
|
230
|
-
"prefix": "!!output1
|
|
231
|
-
"data_type": "last",
|
|
232
|
-
"split": "m3",
|
|
233
|
-
},
|
|
234
|
-
"
|
|
235
|
-
"class": FloatSplitParser,
|
|
236
|
-
"prefix": "!!output1
|
|
237
|
-
"data_type": "last",
|
|
238
|
-
"split": "
|
|
239
|
-
},
|
|
240
|
-
"
|
|
241
|
-
"class": FloatSplitParser,
|
|
242
|
-
"prefix": "!!output1
|
|
243
|
-
"data_type": "last",
|
|
244
|
-
"split": "
|
|
245
|
-
},
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
"
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
"
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
"
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
"
|
|
266
|
-
"
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
"
|
|
272
|
-
"
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
"
|
|
278
|
-
"
|
|
279
|
-
"
|
|
280
|
-
},
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
"
|
|
291
|
-
"
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
"
|
|
297
|
-
"
|
|
298
|
-
"
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
"
|
|
303
|
-
"
|
|
304
|
-
"
|
|
305
|
-
},
|
|
306
|
-
"
|
|
307
|
-
"class":
|
|
308
|
-
"prefix": "!!
|
|
309
|
-
"data_type": "last",
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
"
|
|
314
|
-
"
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
"
|
|
320
|
-
"
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
"
|
|
326
|
-
"
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
"
|
|
331
|
-
"
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
"
|
|
336
|
-
"
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
"
|
|
341
|
-
"
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
"
|
|
346
|
-
"
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
"
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
"
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
"
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
"
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
"
|
|
375
|
-
"
|
|
376
|
-
"
|
|
377
|
-
},
|
|
378
|
-
"
|
|
379
|
-
"class":
|
|
380
|
-
"prefix": "!!
|
|
381
|
-
"data_type": "
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
"
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
"
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
"
|
|
401
|
-
"
|
|
402
|
-
"
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
"
|
|
407
|
-
"
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
"
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
"
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
"
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
"
|
|
428
|
-
"
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
"
|
|
434
|
-
"
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
"
|
|
440
|
-
"
|
|
441
|
-
"
|
|
442
|
-
},
|
|
443
|
-
"
|
|
444
|
-
"class":
|
|
445
|
-
"prefix": "!!
|
|
446
|
-
"data_type": "last",
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
"
|
|
451
|
-
"
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
"
|
|
456
|
-
"
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
"
|
|
461
|
-
"
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
"
|
|
466
|
-
"
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
"
|
|
471
|
-
"
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
"
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
"
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
"
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
"
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
"
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
"
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
"
|
|
505
|
-
"
|
|
506
|
-
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
1
|
+
"""
|
|
2
|
+
Flood Modeller Python API
|
|
3
|
+
Copyright (C) 2024 Jacobs U.K. Limited
|
|
4
|
+
|
|
5
|
+
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License
|
|
6
|
+
as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
|
7
|
+
|
|
8
|
+
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
|
9
|
+
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
10
|
+
|
|
11
|
+
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
|
|
12
|
+
|
|
13
|
+
If you have any query about this program or this License, please contact us at support@floodmodeller.com or write to the following
|
|
14
|
+
address: Jacobs UK Limited, Flood Modeller, Cottons Centre, Cottons Lane, London, SE1 2QG, United Kingdom.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from .lf_helpers import (
|
|
18
|
+
DateTimeParser,
|
|
19
|
+
FloatParser,
|
|
20
|
+
FloatSplitParser,
|
|
21
|
+
StringParser,
|
|
22
|
+
StringSplitParser,
|
|
23
|
+
TimeDeltaHMSParser,
|
|
24
|
+
TimeDeltaHParser,
|
|
25
|
+
TimeDeltaSParser,
|
|
26
|
+
TimeFloatMultParser,
|
|
27
|
+
TimeParser,
|
|
28
|
+
TimeSplitParser,
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
lf1_unsteady_data_to_extract = {
|
|
32
|
+
# start
|
|
33
|
+
"version": {
|
|
34
|
+
"class": StringParser,
|
|
35
|
+
"prefix": "!!Info1 version1d",
|
|
36
|
+
"data_type": "last",
|
|
37
|
+
},
|
|
38
|
+
"number_of_1D_river_nodes": {
|
|
39
|
+
"class": FloatParser,
|
|
40
|
+
"prefix": "!!output1 Number of 1D river nodes in model:",
|
|
41
|
+
"data_type": "last",
|
|
42
|
+
},
|
|
43
|
+
"qtol": {
|
|
44
|
+
"class": FloatParser,
|
|
45
|
+
"prefix": "!!Info1 qtol =",
|
|
46
|
+
"data_type": "last",
|
|
47
|
+
},
|
|
48
|
+
"htol": {
|
|
49
|
+
"class": FloatParser,
|
|
50
|
+
"prefix": "!!Info1 htol =",
|
|
51
|
+
"data_type": "last",
|
|
52
|
+
},
|
|
53
|
+
"start_time": {
|
|
54
|
+
"class": TimeDeltaHParser,
|
|
55
|
+
"prefix": "!!Info1 Start Time:",
|
|
56
|
+
"data_type": "last",
|
|
57
|
+
},
|
|
58
|
+
"end_time": {
|
|
59
|
+
"class": TimeDeltaHParser,
|
|
60
|
+
"prefix": "!!Info1 End Time:",
|
|
61
|
+
"data_type": "last",
|
|
62
|
+
},
|
|
63
|
+
"ran_at": {
|
|
64
|
+
"class": DateTimeParser,
|
|
65
|
+
"prefix": "!!Info1 Ran at",
|
|
66
|
+
"data_type": "last",
|
|
67
|
+
"code": "%H:%M:%S on %d/%m/%Y",
|
|
68
|
+
},
|
|
69
|
+
"max_itr": {
|
|
70
|
+
"class": FloatParser,
|
|
71
|
+
"prefix": "!!Info1 maxitr =",
|
|
72
|
+
"data_type": "last",
|
|
73
|
+
},
|
|
74
|
+
"min_itr": {
|
|
75
|
+
"class": FloatParser,
|
|
76
|
+
"prefix": "!!Info1 minitr =",
|
|
77
|
+
"data_type": "last",
|
|
78
|
+
},
|
|
79
|
+
# run
|
|
80
|
+
"mass_error": {
|
|
81
|
+
"class": TimeFloatMultParser,
|
|
82
|
+
"prefix": "!!Info1 Mass %error =",
|
|
83
|
+
"data_type": "all",
|
|
84
|
+
"subheaders": ["simulated_duplicate", "mass_error"],
|
|
85
|
+
"before_index": True,
|
|
86
|
+
},
|
|
87
|
+
"progress": {
|
|
88
|
+
"class": FloatSplitParser,
|
|
89
|
+
"prefix": "!!Progress1",
|
|
90
|
+
"data_type": "last",
|
|
91
|
+
"split": "%",
|
|
92
|
+
"before_index": True,
|
|
93
|
+
},
|
|
94
|
+
"timestep": {
|
|
95
|
+
"class": TimeDeltaSParser,
|
|
96
|
+
"prefix": "!!Info1 Timestep",
|
|
97
|
+
"data_type": "all",
|
|
98
|
+
"before_index": True,
|
|
99
|
+
},
|
|
100
|
+
"elapsed": {
|
|
101
|
+
"class": TimeDeltaHMSParser,
|
|
102
|
+
"prefix": "!!Info1 Elapsed",
|
|
103
|
+
"data_type": "all",
|
|
104
|
+
"before_index": True,
|
|
105
|
+
},
|
|
106
|
+
"simulated": {
|
|
107
|
+
"class": TimeDeltaHMSParser,
|
|
108
|
+
"prefix": "!!Info1 Simulated",
|
|
109
|
+
"data_type": "all",
|
|
110
|
+
"is_index": True,
|
|
111
|
+
},
|
|
112
|
+
"EFT": {
|
|
113
|
+
"class": TimeParser,
|
|
114
|
+
"prefix": "!!Info1 EFT:",
|
|
115
|
+
"data_type": "last",
|
|
116
|
+
"exclude": ["calculating..."],
|
|
117
|
+
"code": "%H:%M:%S",
|
|
118
|
+
},
|
|
119
|
+
"ETR": {
|
|
120
|
+
"class": TimeDeltaHMSParser,
|
|
121
|
+
"prefix": "!!Info1 ETR:",
|
|
122
|
+
"exclude": ["..."],
|
|
123
|
+
"data_type": "last",
|
|
124
|
+
},
|
|
125
|
+
"iterations": {
|
|
126
|
+
"class": TimeFloatMultParser,
|
|
127
|
+
"prefix": "!!PlotI1",
|
|
128
|
+
"data_type": "all",
|
|
129
|
+
"subheaders": ["simulated_duplicate", "iter", "log(dt)"],
|
|
130
|
+
},
|
|
131
|
+
"convergence": {
|
|
132
|
+
"class": TimeFloatMultParser,
|
|
133
|
+
"prefix": "!!PlotC1",
|
|
134
|
+
"data_type": "all",
|
|
135
|
+
"subheaders": ["simulated_duplicate", "convergence_flow", "convergence_level"],
|
|
136
|
+
},
|
|
137
|
+
"flow": {
|
|
138
|
+
"class": TimeFloatMultParser,
|
|
139
|
+
"prefix": "!!PlotF1",
|
|
140
|
+
"data_type": "all",
|
|
141
|
+
"subheaders": ["simulated_duplicate", "inflow", "outflow"],
|
|
142
|
+
},
|
|
143
|
+
"tuflow_vol": {
|
|
144
|
+
"class": TimeFloatMultParser,
|
|
145
|
+
"prefix": "!!HPC_Vol",
|
|
146
|
+
"data_type": "all",
|
|
147
|
+
"subheaders": ["simulated_duplicate", "tuflow_vol"],
|
|
148
|
+
"before_index": True,
|
|
149
|
+
},
|
|
150
|
+
"tuflow_n_wet": {
|
|
151
|
+
"class": TimeFloatMultParser,
|
|
152
|
+
"prefix": "!!HPC_nWet",
|
|
153
|
+
"data_type": "all",
|
|
154
|
+
"subheaders": ["simulated_duplicate", "tuflow_n_wet"],
|
|
155
|
+
"before_index": True,
|
|
156
|
+
},
|
|
157
|
+
"tuflow_dt": {
|
|
158
|
+
"class": TimeFloatMultParser,
|
|
159
|
+
"prefix": "!!HPC_dt",
|
|
160
|
+
"data_type": "all",
|
|
161
|
+
"subheaders": ["simulated_duplicate", "tuflow_dt"],
|
|
162
|
+
"before_index": True,
|
|
163
|
+
},
|
|
164
|
+
# end
|
|
165
|
+
"simulation_time_elapsed": {
|
|
166
|
+
"class": TimeDeltaSParser,
|
|
167
|
+
"prefix": "!!output1 Simulation time elapsed (s):",
|
|
168
|
+
"data_type": "last",
|
|
169
|
+
},
|
|
170
|
+
"number_of_unconverged_timesteps": {
|
|
171
|
+
"class": FloatParser,
|
|
172
|
+
"prefix": "!!output1 Number of unconverged timesteps:",
|
|
173
|
+
"data_type": "last",
|
|
174
|
+
},
|
|
175
|
+
"proportion_of_simulation_unconverged": {
|
|
176
|
+
"class": FloatSplitParser,
|
|
177
|
+
"prefix": "!!output1 Proportion of simulation unconverged:",
|
|
178
|
+
"data_type": "last",
|
|
179
|
+
"split": "%",
|
|
180
|
+
},
|
|
181
|
+
"mass_balance_calculated_every": {
|
|
182
|
+
"class": TimeDeltaSParser,
|
|
183
|
+
"prefix": "!!output1 Mass balance calculated every",
|
|
184
|
+
"data_type": "last",
|
|
185
|
+
},
|
|
186
|
+
"initial_volume": {
|
|
187
|
+
"class": FloatSplitParser,
|
|
188
|
+
"prefix": "!!output1 Initial volume:",
|
|
189
|
+
"data_type": "last",
|
|
190
|
+
"split": "m3",
|
|
191
|
+
},
|
|
192
|
+
"final_volume": {
|
|
193
|
+
"class": FloatSplitParser,
|
|
194
|
+
"prefix": "!!output1 Final volume:",
|
|
195
|
+
"data_type": "last",
|
|
196
|
+
"split": "m3",
|
|
197
|
+
},
|
|
198
|
+
"total_boundary_inflow": {
|
|
199
|
+
"class": FloatSplitParser,
|
|
200
|
+
"prefix": "!!output1 Total boundary inflow :",
|
|
201
|
+
"data_type": "last",
|
|
202
|
+
"split": "m3",
|
|
203
|
+
},
|
|
204
|
+
"total_boundary_outflow": {
|
|
205
|
+
"class": FloatSplitParser,
|
|
206
|
+
"prefix": "!!output1 Total boundary outflow:",
|
|
207
|
+
"data_type": "last",
|
|
208
|
+
"split": "m3",
|
|
209
|
+
},
|
|
210
|
+
"total_lat_link_inflow": {
|
|
211
|
+
"class": FloatSplitParser,
|
|
212
|
+
"prefix": "!!output1 Total lat. link inflow:",
|
|
213
|
+
"data_type": "last",
|
|
214
|
+
"split": "m3",
|
|
215
|
+
},
|
|
216
|
+
"total_lat_link_outflow": {
|
|
217
|
+
"class": FloatSplitParser,
|
|
218
|
+
"prefix": "!!output1 Total lat. link outflow:",
|
|
219
|
+
"data_type": "last",
|
|
220
|
+
"split": "m3",
|
|
221
|
+
},
|
|
222
|
+
"max_system_volume": {
|
|
223
|
+
"class": FloatSplitParser,
|
|
224
|
+
"prefix": "!!output1 Max. system volume:",
|
|
225
|
+
"data_type": "last",
|
|
226
|
+
"split": "m3",
|
|
227
|
+
},
|
|
228
|
+
"max_volume_increase": {
|
|
229
|
+
"class": FloatSplitParser,
|
|
230
|
+
"prefix": "!!output1 Max. |volume| increase:",
|
|
231
|
+
"data_type": "last",
|
|
232
|
+
"split": "m3",
|
|
233
|
+
},
|
|
234
|
+
"max_boundary_inflow": {
|
|
235
|
+
"class": FloatSplitParser,
|
|
236
|
+
"prefix": "!!output1 Max. boundary inflow:",
|
|
237
|
+
"data_type": "last",
|
|
238
|
+
"split": "m3",
|
|
239
|
+
},
|
|
240
|
+
"max_boundary_outflow": {
|
|
241
|
+
"class": FloatSplitParser,
|
|
242
|
+
"prefix": "!!output1 Max. boundary outflow:",
|
|
243
|
+
"data_type": "last",
|
|
244
|
+
"split": "m3",
|
|
245
|
+
},
|
|
246
|
+
"net_volume_increase": {
|
|
247
|
+
"class": FloatSplitParser,
|
|
248
|
+
"prefix": "!!output1 Net increase in volume:",
|
|
249
|
+
"data_type": "last",
|
|
250
|
+
"split": "m3",
|
|
251
|
+
},
|
|
252
|
+
"net_inflow_volume": {
|
|
253
|
+
"class": FloatSplitParser,
|
|
254
|
+
"prefix": "!!output1 Net inflow volume:",
|
|
255
|
+
"data_type": "last",
|
|
256
|
+
"split": "m3",
|
|
257
|
+
},
|
|
258
|
+
"volume_discrepancy": {
|
|
259
|
+
"class": FloatSplitParser,
|
|
260
|
+
"prefix": "!!output1 Volume discrepancy:",
|
|
261
|
+
"data_type": "last",
|
|
262
|
+
"split": "m3",
|
|
263
|
+
},
|
|
264
|
+
"mass_balance_error": {
|
|
265
|
+
"class": FloatSplitParser,
|
|
266
|
+
"prefix": "!!output1 Mass balance error:",
|
|
267
|
+
"data_type": "last",
|
|
268
|
+
"split": "%",
|
|
269
|
+
},
|
|
270
|
+
"mass_balance_error_2": {
|
|
271
|
+
"class": FloatSplitParser,
|
|
272
|
+
"prefix": "!!output1 Mass balance error [2]:",
|
|
273
|
+
"data_type": "last",
|
|
274
|
+
"split": "%",
|
|
275
|
+
},
|
|
276
|
+
"tuflow_start_time": {
|
|
277
|
+
"class": FloatParser,
|
|
278
|
+
"prefix": "!!TUFLOW Start Time (h): ",
|
|
279
|
+
"data_type": "last",
|
|
280
|
+
},
|
|
281
|
+
"tuflow_end_time": {
|
|
282
|
+
"class": FloatParser,
|
|
283
|
+
"prefix": "!!TUFLOW End Time (h): ",
|
|
284
|
+
"data_type": "last",
|
|
285
|
+
},
|
|
286
|
+
"tuflow_cpu_time": {
|
|
287
|
+
"class": TimeSplitParser,
|
|
288
|
+
"prefix": "!!TUFLOW CPU Time: ",
|
|
289
|
+
"data_type": "last",
|
|
290
|
+
"split": "[",
|
|
291
|
+
"code": "%H:%M:%S",
|
|
292
|
+
},
|
|
293
|
+
"tuflow_clock_time": {
|
|
294
|
+
"class": TimeSplitParser,
|
|
295
|
+
"prefix": "!!TUFLOW Clock Time: ",
|
|
296
|
+
"data_type": "last",
|
|
297
|
+
"split": "[",
|
|
298
|
+
"code": "%H:%M:%S",
|
|
299
|
+
},
|
|
300
|
+
"tuflow_warnings_prior": {
|
|
301
|
+
"class": FloatSplitParser,
|
|
302
|
+
"prefix": "!!TUFLOW WARNINGs prior to simulation:",
|
|
303
|
+
"data_type": "last",
|
|
304
|
+
"split": "[",
|
|
305
|
+
},
|
|
306
|
+
"tuflow_warnings_during": {
|
|
307
|
+
"class": FloatSplitParser,
|
|
308
|
+
"prefix": "!!TUFLOW WARNINGs during simulation:",
|
|
309
|
+
"data_type": "last",
|
|
310
|
+
"split": "[",
|
|
311
|
+
},
|
|
312
|
+
"tuflow_checks_prior": {
|
|
313
|
+
"class": FloatSplitParser,
|
|
314
|
+
"prefix": "!!TUFLOW CHECKs prior to simulation:",
|
|
315
|
+
"data_type": "last",
|
|
316
|
+
"split": "[",
|
|
317
|
+
},
|
|
318
|
+
"tuflow_checks_during": {
|
|
319
|
+
"class": FloatSplitParser,
|
|
320
|
+
"prefix": "!!TUFLOW CHECKs during simulation:",
|
|
321
|
+
"data_type": "last",
|
|
322
|
+
"split": "[",
|
|
323
|
+
},
|
|
324
|
+
"tuflow_vol_start": {
|
|
325
|
+
"class": FloatParser,
|
|
326
|
+
"prefix": "!!TUFLOW Volume at Start (m3):",
|
|
327
|
+
"data_type": "last",
|
|
328
|
+
},
|
|
329
|
+
"tuflow_vol_end": {
|
|
330
|
+
"class": FloatParser,
|
|
331
|
+
"prefix": "!!TUFLOW Volume at End (m3):",
|
|
332
|
+
"data_type": "last",
|
|
333
|
+
},
|
|
334
|
+
"tuflow_vol_in": {
|
|
335
|
+
"class": FloatParser,
|
|
336
|
+
"prefix": "!!TUFLOW Total Volume In (m3):",
|
|
337
|
+
"data_type": "last",
|
|
338
|
+
},
|
|
339
|
+
"tuflow_vol_out": {
|
|
340
|
+
"class": FloatParser,
|
|
341
|
+
"prefix": "!!TUFLOW Total Volume Out (m3):",
|
|
342
|
+
"data_type": "last",
|
|
343
|
+
},
|
|
344
|
+
"tuflow_volume_error": {
|
|
345
|
+
"class": FloatSplitParser,
|
|
346
|
+
"prefix": "!!TUFLOW Volume Error (m3):",
|
|
347
|
+
"data_type": "last",
|
|
348
|
+
"split": "or",
|
|
349
|
+
},
|
|
350
|
+
"tuflow_cumulative_me": {
|
|
351
|
+
"class": FloatSplitParser,
|
|
352
|
+
"prefix": "!!TUFLOW Final Cumulative ME:",
|
|
353
|
+
"data_type": "last",
|
|
354
|
+
"split": "%",
|
|
355
|
+
},
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
lf1_steady_data_to_extract = {
|
|
359
|
+
# start
|
|
360
|
+
"version": {
|
|
361
|
+
"class": StringParser,
|
|
362
|
+
"prefix": "!!Info1 version1d",
|
|
363
|
+
"data_type": "last",
|
|
364
|
+
},
|
|
365
|
+
"number_of_1D_river_nodes": {
|
|
366
|
+
"class": FloatParser,
|
|
367
|
+
"prefix": "!!output1 Number of 1D river nodes in model:",
|
|
368
|
+
"data_type": "last",
|
|
369
|
+
},
|
|
370
|
+
# run
|
|
371
|
+
"network_iteration": {
|
|
372
|
+
"class": FloatSplitParser,
|
|
373
|
+
"prefix": "!!output1 network iteration",
|
|
374
|
+
"data_type": "all",
|
|
375
|
+
"split": "c",
|
|
376
|
+
"is_index": True,
|
|
377
|
+
},
|
|
378
|
+
"largest_change_in_split_from_last_iteration": {
|
|
379
|
+
"class": FloatSplitParser,
|
|
380
|
+
"prefix": "!!output1 was",
|
|
381
|
+
"data_type": "all",
|
|
382
|
+
"split": "%",
|
|
383
|
+
},
|
|
384
|
+
# end
|
|
385
|
+
"successful_solution_in": {
|
|
386
|
+
"class": FloatSplitParser,
|
|
387
|
+
"prefix": "!!output1 successful solution in",
|
|
388
|
+
"data_type": "last",
|
|
389
|
+
"split": "n",
|
|
390
|
+
},
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
# TODO for LF2:
|
|
394
|
+
# - "start" only works for v6
|
|
395
|
+
# - what if there are multiple domains?
|
|
396
|
+
|
|
397
|
+
lf2_data_to_extract = {
|
|
398
|
+
# start
|
|
399
|
+
"version": {
|
|
400
|
+
"class": StringSplitParser,
|
|
401
|
+
"prefix": "!!output2 Using Flood Modeller 2D Solver version:",
|
|
402
|
+
"data_type": "last",
|
|
403
|
+
"split": ",",
|
|
404
|
+
},
|
|
405
|
+
"simulation_initiated_at": {
|
|
406
|
+
"class": DateTimeParser,
|
|
407
|
+
"prefix": "!!output2 Simulation initiated at",
|
|
408
|
+
"data_type": "last",
|
|
409
|
+
"code": "%d/%m/%Y %H:%M:%S",
|
|
410
|
+
},
|
|
411
|
+
"input_control_file": {
|
|
412
|
+
"class": StringParser,
|
|
413
|
+
"prefix": "!!output2 Using input control file:",
|
|
414
|
+
"data_type": "last",
|
|
415
|
+
},
|
|
416
|
+
"unit_system": {
|
|
417
|
+
"class": StringParser,
|
|
418
|
+
"prefix": "!!output2 Unit system:",
|
|
419
|
+
"data_type": "last",
|
|
420
|
+
},
|
|
421
|
+
"number_of_2D_domains": {
|
|
422
|
+
"class": FloatParser,
|
|
423
|
+
"prefix": "!!output2 Number of 2D domains:",
|
|
424
|
+
"data_type": "last",
|
|
425
|
+
},
|
|
426
|
+
"model_time_zero": {
|
|
427
|
+
"class": DateTimeParser,
|
|
428
|
+
"prefix": "!!output2 Model time zero:",
|
|
429
|
+
"data_type": "last",
|
|
430
|
+
"code": "%Y-%m-%d %H:%M:%S",
|
|
431
|
+
},
|
|
432
|
+
"model_start_time": {
|
|
433
|
+
"class": DateTimeParser,
|
|
434
|
+
"prefix": "!!output2 Model start time:",
|
|
435
|
+
"data_type": "last",
|
|
436
|
+
"code": "%Y-%m-%d %H:%M:%S",
|
|
437
|
+
},
|
|
438
|
+
"simulation_time": {
|
|
439
|
+
"class": TimeDeltaHParser,
|
|
440
|
+
"prefix": "!!output2 Simulation time:",
|
|
441
|
+
"data_type": "last",
|
|
442
|
+
},
|
|
443
|
+
"start_time": {
|
|
444
|
+
"class": TimeDeltaHParser,
|
|
445
|
+
"prefix": "!!Info2 Start Time:",
|
|
446
|
+
"data_type": "last",
|
|
447
|
+
},
|
|
448
|
+
"end_time": {
|
|
449
|
+
"class": TimeDeltaHParser,
|
|
450
|
+
"prefix": "!!Info2 End Time:",
|
|
451
|
+
"data_type": "last",
|
|
452
|
+
},
|
|
453
|
+
"solution_scheme": {
|
|
454
|
+
"class": StringParser,
|
|
455
|
+
"prefix": "!!output2 Solution scheme:",
|
|
456
|
+
"data_type": "last",
|
|
457
|
+
},
|
|
458
|
+
"timestep": {
|
|
459
|
+
"class": FloatParser,
|
|
460
|
+
"prefix": "!!output2 Model timestep :",
|
|
461
|
+
"data_type": "last",
|
|
462
|
+
},
|
|
463
|
+
"wetting_drying_depth": {
|
|
464
|
+
"class": FloatParser,
|
|
465
|
+
"prefix": "!!output2 Wetting/drying depth :",
|
|
466
|
+
"data_type": "last",
|
|
467
|
+
},
|
|
468
|
+
"beta": {
|
|
469
|
+
"class": FloatParser,
|
|
470
|
+
"prefix": "!!output2 Beta :",
|
|
471
|
+
"data_type": "last",
|
|
472
|
+
},
|
|
473
|
+
"number_of_iterations": {
|
|
474
|
+
"class": FloatParser,
|
|
475
|
+
"prefix": "!!output2 Number of iterations :",
|
|
476
|
+
"data_type": "last",
|
|
477
|
+
},
|
|
478
|
+
"calculation_depth": {
|
|
479
|
+
"class": FloatParser,
|
|
480
|
+
"prefix": "!!output2 Calculation depth :",
|
|
481
|
+
"data_type": "last",
|
|
482
|
+
},
|
|
483
|
+
"friction_depth": {
|
|
484
|
+
"class": FloatParser,
|
|
485
|
+
"prefix": "!!output2 Friction depth :",
|
|
486
|
+
"data_type": "last",
|
|
487
|
+
},
|
|
488
|
+
"eddy_viscosity": {
|
|
489
|
+
"class": FloatParser,
|
|
490
|
+
"prefix": "!!output2 Eddy Viscosity :",
|
|
491
|
+
"data_type": "last",
|
|
492
|
+
},
|
|
493
|
+
"velocity_head_threshold": {
|
|
494
|
+
"class": FloatParser,
|
|
495
|
+
"prefix": "!!output2 Velocity head threshold :",
|
|
496
|
+
"data_type": "last",
|
|
497
|
+
},
|
|
498
|
+
"rainfall_accumulation_depth": {
|
|
499
|
+
"class": FloatParser,
|
|
500
|
+
"prefix": "!!output2 Rainfall accumulation depth:",
|
|
501
|
+
"data_type": "last",
|
|
502
|
+
},
|
|
503
|
+
"negative_depth_threshold": {
|
|
504
|
+
"class": FloatParser,
|
|
505
|
+
"prefix": "!!output2 Negative depth threshold :",
|
|
506
|
+
"data_type": "last",
|
|
507
|
+
},
|
|
508
|
+
"memory_use_estimate": {
|
|
509
|
+
"class": FloatSplitParser,
|
|
510
|
+
"prefix": "!!output2 Memory use estimate for this domain is",
|
|
511
|
+
"data_type": "last",
|
|
512
|
+
"split": "MB",
|
|
513
|
+
},
|
|
514
|
+
"friction_depth_threshold": {
|
|
515
|
+
"class": FloatParser,
|
|
516
|
+
"prefix": "!!output2 Friction depth threshold :",
|
|
517
|
+
"data_type": "last",
|
|
518
|
+
},
|
|
519
|
+
"number_of_cells": {
|
|
520
|
+
"class": FloatParser,
|
|
521
|
+
"prefix": "!!output2 Number of cells in model:",
|
|
522
|
+
"data_type": "last",
|
|
523
|
+
},
|
|
524
|
+
"data_prep_completed_in": {
|
|
525
|
+
"class": TimeDeltaSParser,
|
|
526
|
+
"prefix": "!!output2 Data prep completed in",
|
|
527
|
+
"data_type": "last",
|
|
528
|
+
},
|
|
529
|
+
"max_courant_number": {
|
|
530
|
+
"class": FloatParser,
|
|
531
|
+
"prefix": "!!output2 Maximum Courant number:",
|
|
532
|
+
"data_type": "last",
|
|
533
|
+
},
|
|
534
|
+
"final_mass_error": {
|
|
535
|
+
"class": FloatSplitParser,
|
|
536
|
+
"prefix": "!!output2 Final mass error :",
|
|
537
|
+
"data_type": "last",
|
|
538
|
+
"split": "%",
|
|
539
|
+
},
|
|
540
|
+
"combined_mass_error": {
|
|
541
|
+
"class": FloatSplitParser,
|
|
542
|
+
"prefix": "!!output2 Combined mass error (%):",
|
|
543
|
+
"data_type": "last",
|
|
544
|
+
"split": "%",
|
|
545
|
+
},
|
|
546
|
+
# run
|
|
547
|
+
"simulated": {
|
|
548
|
+
"class": TimeDeltaHMSParser,
|
|
549
|
+
"prefix": "!!Info2 Simulated",
|
|
550
|
+
"data_type": "all",
|
|
551
|
+
"is_index": True,
|
|
552
|
+
},
|
|
553
|
+
"progress": {
|
|
554
|
+
"class": FloatSplitParser,
|
|
555
|
+
"prefix": "!!Progress2",
|
|
556
|
+
"data_type": "last",
|
|
557
|
+
"split": "%",
|
|
558
|
+
},
|
|
559
|
+
"wet_cells": {
|
|
560
|
+
"class": FloatParser,
|
|
561
|
+
"prefix": "!!PlotG2 Wet cells",
|
|
562
|
+
"data_type": "all",
|
|
563
|
+
},
|
|
564
|
+
"boundary_inflow_2D": {
|
|
565
|
+
"class": FloatParser,
|
|
566
|
+
"prefix": "!!PlotG2 2D boundary inflow",
|
|
567
|
+
"data_type": "all",
|
|
568
|
+
},
|
|
569
|
+
"boundary_outflow_2D": {
|
|
570
|
+
"class": FloatParser,
|
|
571
|
+
"prefix": "!!PlotG2 2D boundary outflow",
|
|
572
|
+
"data_type": "all",
|
|
573
|
+
},
|
|
574
|
+
"link_flow_1D": {
|
|
575
|
+
"class": FloatParser,
|
|
576
|
+
"prefix": "!!PlotG2 1D link flow",
|
|
577
|
+
"data_type": "all",
|
|
578
|
+
},
|
|
579
|
+
"change_in_volume": {
|
|
580
|
+
"class": FloatParser,
|
|
581
|
+
"prefix": "!!PlotG2 Change in volume",
|
|
582
|
+
"data_type": "all",
|
|
583
|
+
},
|
|
584
|
+
"volume": {
|
|
585
|
+
"class": FloatParser,
|
|
586
|
+
"prefix": "!!PlotG2 Volume",
|
|
587
|
+
"data_type": "all",
|
|
588
|
+
},
|
|
589
|
+
"inst_mass_err": {
|
|
590
|
+
"class": FloatParser,
|
|
591
|
+
"prefix": "!!PlotG2 Inst. mass err",
|
|
592
|
+
"data_type": "all",
|
|
593
|
+
},
|
|
594
|
+
"mass_error": {
|
|
595
|
+
"class": FloatParser,
|
|
596
|
+
"prefix": "!!PlotG2 Mass error",
|
|
597
|
+
"data_type": "all",
|
|
598
|
+
},
|
|
599
|
+
"largest_cr": {
|
|
600
|
+
"class": FloatParser,
|
|
601
|
+
"prefix": "!!PlotG2 Largest Cr",
|
|
602
|
+
"data_type": "all",
|
|
603
|
+
},
|
|
604
|
+
"elapsed": {
|
|
605
|
+
"class": TimeDeltaHMSParser,
|
|
606
|
+
"prefix": "!!Info2 Elapsed",
|
|
607
|
+
"data_type": "all",
|
|
608
|
+
},
|
|
609
|
+
"EFT": {
|
|
610
|
+
"class": TimeParser,
|
|
611
|
+
"prefix": "!!Info2 EFT:",
|
|
612
|
+
"data_type": "last",
|
|
613
|
+
"code": "%H:%M:%S",
|
|
614
|
+
},
|
|
615
|
+
"ETR": {
|
|
616
|
+
"class": TimeDeltaHMSParser,
|
|
617
|
+
"prefix": "!!Info2 ETR:",
|
|
618
|
+
"exclude": ["****:**:**", "****:00:**", "****:**:00"],
|
|
619
|
+
"data_type": "last",
|
|
620
|
+
},
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
error_2d_dict = {
|
|
624
|
+
# format: Error code, 42 : Comment, "This has worked" ,
|
|
625
|
+
100: "Successful completion",
|
|
626
|
+
101: "Error at preprocessing stage",
|
|
627
|
+
102: "Model unstable",
|
|
628
|
+
103: "Model mass balance exceeds tolerance threshold",
|
|
629
|
+
104: "Water reached cells at the edge of the 2D domain",
|
|
630
|
+
105: "General error",
|
|
631
|
+
106: "Error occurred while writing a file",
|
|
632
|
+
107: "Error occurred while opening/writing to the log file",
|
|
633
|
+
108: "Error occurred while opening a file",
|
|
634
|
+
109: "Tried to run model with 1d and fast domains (not currently supported)",
|
|
635
|
+
110: "All domains required the FAST engine",
|
|
636
|
+
111: "1D engine failed",
|
|
637
|
+
112: "2D timestep failed to converge",
|
|
638
|
+
201: "SMS dat I/O failed",
|
|
639
|
+
202: "Ctrl-C abort request",
|
|
640
|
+
996: "Failed to initialise licence module",
|
|
641
|
+
997: "Licence not taken/lost",
|
|
642
|
+
998: "Failed to validate licence module",
|
|
643
|
+
}
|