floodmodeller-api 0.4.2.post1__py3-none-any.whl → 0.4.4__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 +169 -176
- floodmodeller_api/backup.py +273 -273
- floodmodeller_api/dat.py +889 -831
- floodmodeller_api/diff.py +136 -119
- floodmodeller_api/ied.py +302 -306
- floodmodeller_api/ief.py +553 -637
- floodmodeller_api/ief_flags.py +253 -253
- floodmodeller_api/inp.py +260 -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 +364 -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 +16 -8
- floodmodeller_api/test/test_backup.py +117 -117
- floodmodeller_api/test/test_conveyance.py +107 -0
- floodmodeller_api/test/test_dat.py +222 -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/conveyance_test.dat +165 -0
- floodmodeller_api/test/test_data/conveyance_test.feb +116 -0
- floodmodeller_api/test/test_data/conveyance_test.gxy +85 -0
- 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/expected_conveyance.csv +60 -0
- 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 +136 -24
- floodmodeller_api/test/test_inp.py +47 -48
- floodmodeller_api/test/test_json.py +114 -0
- floodmodeller_api/test/test_logs_lf.py +102 -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 +230 -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/conveyance.py +301 -0
- 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 +465 -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 +119 -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 +632 -673
- floodmodeller_api/xml2d_template.py +37 -37
- floodmodeller_api/zzn.py +414 -363
- {floodmodeller_api-0.4.2.post1.dist-info → floodmodeller_api-0.4.4.dist-info}/LICENSE.txt +13 -13
- {floodmodeller_api-0.4.2.post1.dist-info → floodmodeller_api-0.4.4.dist-info}/METADATA +85 -82
- floodmodeller_api-0.4.4.dist-info/RECORD +185 -0
- {floodmodeller_api-0.4.2.post1.dist-info → floodmodeller_api-0.4.4.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.4.dist-info}/entry_points.txt +0 -0
- {floodmodeller_api-0.4.2.post1.dist-info → floodmodeller_api-0.4.4.dist-info}/top_level.txt +0 -0
|
@@ -1,404 +1,388 @@
|
|
|
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
|
-
urban_parameter_options = {
|
|
18
|
-
"name": {
|
|
19
|
-
"type": "string-length",
|
|
20
|
-
"max_length": 15, # Match nominal lenght imposed during _write (units). No column width defined by Flood Modeller ,
|
|
21
|
-
},
|
|
22
|
-
"elevation": {
|
|
23
|
-
"type": "type-match",
|
|
24
|
-
"options": (float, int),
|
|
25
|
-
},
|
|
26
|
-
"max_depth": {
|
|
27
|
-
"type": "type-match",
|
|
28
|
-
"options": (float, int),
|
|
29
|
-
},
|
|
30
|
-
"initial_depth": {
|
|
31
|
-
"type": "type-match",
|
|
32
|
-
"options": (float, int),
|
|
33
|
-
},
|
|
34
|
-
"surface_depth": {
|
|
35
|
-
"type": "type-match",
|
|
36
|
-
"options": (float, int),
|
|
37
|
-
},
|
|
38
|
-
"area_ponded": {
|
|
39
|
-
"type": "type-match",
|
|
40
|
-
"options": (float, int),
|
|
41
|
-
},
|
|
42
|
-
"format": {
|
|
43
|
-
"type": "value-match",
|
|
44
|
-
"options": ["INTENSITY", "VOLUME", "CUMULATIVE"],
|
|
45
|
-
},
|
|
46
|
-
"interval": {
|
|
47
|
-
# TODO: UPDATE TO CONSIDER - decimal hours or hours:minutes format (e.g., 0:15 for 15-minute readings). search for presence of ";" during _read maybe?
|
|
48
|
-
# try turing to float else keep as string
|
|
49
|
-
# TODO: add new a type of match called RegEx match for example "[0-9]:[0-9]",
|
|
50
|
-
"type": "type-match",
|
|
51
|
-
"options": (float, int, str),
|
|
52
|
-
},
|
|
53
|
-
"snow_catch_factor": {
|
|
54
|
-
"type": "type-match",
|
|
55
|
-
"options": (float, int),
|
|
56
|
-
},
|
|
57
|
-
"data_option": {
|
|
58
|
-
"type": "value-match",
|
|
59
|
-
"options": ["TIMESERIES", "FILE"],
|
|
60
|
-
},
|
|
61
|
-
"timeseries": {
|
|
62
|
-
"type": "type-match",
|
|
63
|
-
"options": (str),
|
|
64
|
-
},
|
|
65
|
-
"filename": {
|
|
66
|
-
"type": "type-match",
|
|
67
|
-
"options": (str),
|
|
68
|
-
},
|
|
69
|
-
"station": {
|
|
70
|
-
"type": "type-match",
|
|
71
|
-
"options": (str),
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
"
|
|
90
|
-
"type": "
|
|
91
|
-
"options":
|
|
92
|
-
},
|
|
93
|
-
"
|
|
94
|
-
"type": "value-match",
|
|
95
|
-
"options": [
|
|
96
|
-
},
|
|
97
|
-
"
|
|
98
|
-
"type": "type-match",
|
|
99
|
-
"options": (
|
|
100
|
-
},
|
|
101
|
-
"
|
|
102
|
-
"type": "type-match",
|
|
103
|
-
"options": (str),
|
|
104
|
-
},
|
|
105
|
-
"
|
|
106
|
-
"type": "type-match",
|
|
107
|
-
"options": (str),
|
|
108
|
-
},
|
|
109
|
-
"
|
|
110
|
-
"type": "
|
|
111
|
-
"options":
|
|
112
|
-
},
|
|
113
|
-
"
|
|
114
|
-
"type": "type-match",
|
|
115
|
-
"options": (
|
|
116
|
-
},
|
|
117
|
-
"
|
|
118
|
-
"type": "type-match",
|
|
119
|
-
"options": (
|
|
120
|
-
},
|
|
121
|
-
"
|
|
122
|
-
"type": "type-match",
|
|
123
|
-
"options": (
|
|
124
|
-
},
|
|
125
|
-
"
|
|
126
|
-
"type": "type-match",
|
|
127
|
-
"options": (float, int),
|
|
128
|
-
},
|
|
129
|
-
"
|
|
130
|
-
"type": "type-match",
|
|
131
|
-
"options": (float, int),
|
|
132
|
-
},
|
|
133
|
-
"
|
|
134
|
-
"type": "type-match",
|
|
135
|
-
"options": (float, int),
|
|
136
|
-
},
|
|
137
|
-
"
|
|
138
|
-
"type": "type-match",
|
|
139
|
-
"options": (float, int),
|
|
140
|
-
},
|
|
141
|
-
"
|
|
142
|
-
"type": "type-match",
|
|
143
|
-
"options": (
|
|
144
|
-
},
|
|
145
|
-
"
|
|
146
|
-
"type": "
|
|
147
|
-
"options":
|
|
148
|
-
},
|
|
149
|
-
"
|
|
150
|
-
"type": "type-match",
|
|
151
|
-
"options": (float, int),
|
|
152
|
-
},
|
|
153
|
-
"
|
|
154
|
-
"type": "
|
|
155
|
-
"options":
|
|
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
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
},
|
|
198
|
-
"
|
|
199
|
-
"type": "type-match",
|
|
200
|
-
"options": (type(None),
|
|
201
|
-
},
|
|
202
|
-
"
|
|
203
|
-
|
|
204
|
-
"
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
"
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
"
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
"
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
"
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
"
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
],
|
|
248
|
-
},
|
|
249
|
-
"
|
|
250
|
-
"type": "value-match",
|
|
251
|
-
"options": [None, "
|
|
252
|
-
},
|
|
253
|
-
"
|
|
254
|
-
"type": "value-match",
|
|
255
|
-
"options": [None, "
|
|
256
|
-
},
|
|
257
|
-
"
|
|
258
|
-
"type": "value-match",
|
|
259
|
-
"options": [None, "
|
|
260
|
-
},
|
|
261
|
-
"
|
|
262
|
-
"type": "value-match",
|
|
263
|
-
"options": [None, "YES", "NO"],
|
|
264
|
-
},
|
|
265
|
-
"
|
|
266
|
-
"type": "value-match",
|
|
267
|
-
"options": [None, "YES", "NO"],
|
|
268
|
-
},
|
|
269
|
-
"
|
|
270
|
-
"type": "value-match",
|
|
271
|
-
"options": [None, "YES", "NO"],
|
|
272
|
-
},
|
|
273
|
-
"
|
|
274
|
-
"type": "value-match",
|
|
275
|
-
"options": [None, "YES", "NO"],
|
|
276
|
-
},
|
|
277
|
-
"
|
|
278
|
-
"type": "
|
|
279
|
-
"options":
|
|
280
|
-
},
|
|
281
|
-
"
|
|
282
|
-
"type": "
|
|
283
|
-
"options":
|
|
284
|
-
},
|
|
285
|
-
"
|
|
286
|
-
"type": "
|
|
287
|
-
"options":
|
|
288
|
-
},
|
|
289
|
-
"
|
|
290
|
-
"type": "
|
|
291
|
-
"options":
|
|
292
|
-
},
|
|
293
|
-
"
|
|
294
|
-
"type": "type-match",
|
|
295
|
-
"options": (type(None),
|
|
296
|
-
},
|
|
297
|
-
"
|
|
298
|
-
"type": "type-match",
|
|
299
|
-
"options": (type(None),
|
|
300
|
-
},
|
|
301
|
-
"
|
|
302
|
-
"type": "type-match",
|
|
303
|
-
"options": (type(None), str),
|
|
304
|
-
},
|
|
305
|
-
"
|
|
306
|
-
"type": "type-match",
|
|
307
|
-
"options": (type(None), str),
|
|
308
|
-
},
|
|
309
|
-
"
|
|
310
|
-
"type": "type-match",
|
|
311
|
-
"options": (type(None), str),
|
|
312
|
-
},
|
|
313
|
-
"
|
|
314
|
-
"type": "type-match",
|
|
315
|
-
"options": (type(None), str),
|
|
316
|
-
},
|
|
317
|
-
"
|
|
318
|
-
"type": "type-match",
|
|
319
|
-
"options": (type(None),
|
|
320
|
-
},
|
|
321
|
-
"
|
|
322
|
-
"type": "type-match",
|
|
323
|
-
"options": (type(None), str),
|
|
324
|
-
},
|
|
325
|
-
"
|
|
326
|
-
"type": "type-match",
|
|
327
|
-
"options": (type(None), str),
|
|
328
|
-
},
|
|
329
|
-
"
|
|
330
|
-
"type": "type-match",
|
|
331
|
-
"options": (type(None), str),
|
|
332
|
-
},
|
|
333
|
-
"
|
|
334
|
-
"type": "type-match",
|
|
335
|
-
"options": (type(None),
|
|
336
|
-
},
|
|
337
|
-
"
|
|
338
|
-
"type": "type-match",
|
|
339
|
-
"options": (type(None),
|
|
340
|
-
},
|
|
341
|
-
"
|
|
342
|
-
"type": "type-match",
|
|
343
|
-
"options": (type(None),
|
|
344
|
-
},
|
|
345
|
-
"
|
|
346
|
-
"type": "type-match",
|
|
347
|
-
"options": (type(None),
|
|
348
|
-
},
|
|
349
|
-
"
|
|
350
|
-
"type": "
|
|
351
|
-
"options":
|
|
352
|
-
},
|
|
353
|
-
"
|
|
354
|
-
"type": "
|
|
355
|
-
"options":
|
|
356
|
-
},
|
|
357
|
-
"
|
|
358
|
-
"type": "type-match",
|
|
359
|
-
"options": (type(None), float, int),
|
|
360
|
-
},
|
|
361
|
-
"
|
|
362
|
-
"type": "type-match",
|
|
363
|
-
"options": (type(None), float, int),
|
|
364
|
-
},
|
|
365
|
-
"
|
|
366
|
-
"type": "
|
|
367
|
-
"options":
|
|
368
|
-
},
|
|
369
|
-
"
|
|
370
|
-
"type": "
|
|
371
|
-
"options":
|
|
372
|
-
},
|
|
373
|
-
"
|
|
374
|
-
"type": "type-match",
|
|
375
|
-
"options": (type(None), float, int),
|
|
376
|
-
},
|
|
377
|
-
"
|
|
378
|
-
"type": "type-match",
|
|
379
|
-
"options": (type(None),
|
|
380
|
-
},
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
"
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
"threads": {
|
|
390
|
-
"type": "type-match",
|
|
391
|
-
"options": (type(None), float, int),
|
|
392
|
-
},
|
|
393
|
-
"tempdir": {
|
|
394
|
-
"type": "type-match",
|
|
395
|
-
"options": (type(None), str),
|
|
396
|
-
},
|
|
397
|
-
# Rule step in software but not manual
|
|
398
|
-
"rule_step": {
|
|
399
|
-
"type": "type-match",
|
|
400
|
-
"options": (type(None), str),
|
|
401
|
-
},
|
|
402
|
-
},
|
|
403
|
-
},
|
|
404
|
-
}
|
|
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
|
+
urban_parameter_options = {
|
|
18
|
+
"name": {
|
|
19
|
+
"type": "string-length",
|
|
20
|
+
"max_length": 15, # Match nominal lenght imposed during _write (units). No column width defined by Flood Modeller ,
|
|
21
|
+
},
|
|
22
|
+
"elevation": {
|
|
23
|
+
"type": "type-match",
|
|
24
|
+
"options": (float, int),
|
|
25
|
+
},
|
|
26
|
+
"max_depth": {
|
|
27
|
+
"type": "type-match",
|
|
28
|
+
"options": (float, int),
|
|
29
|
+
},
|
|
30
|
+
"initial_depth": {
|
|
31
|
+
"type": "type-match",
|
|
32
|
+
"options": (float, int),
|
|
33
|
+
},
|
|
34
|
+
"surface_depth": {
|
|
35
|
+
"type": "type-match",
|
|
36
|
+
"options": (float, int),
|
|
37
|
+
},
|
|
38
|
+
"area_ponded": {
|
|
39
|
+
"type": "type-match",
|
|
40
|
+
"options": (float, int),
|
|
41
|
+
},
|
|
42
|
+
"format": {
|
|
43
|
+
"type": "value-match",
|
|
44
|
+
"options": ["INTENSITY", "VOLUME", "CUMULATIVE"],
|
|
45
|
+
},
|
|
46
|
+
"interval": {
|
|
47
|
+
# TODO: UPDATE TO CONSIDER - decimal hours or hours:minutes format (e.g., 0:15 for 15-minute readings). search for presence of ";" during _read maybe?
|
|
48
|
+
# try turing to float else keep as string
|
|
49
|
+
# TODO: add new a type of match called RegEx match for example "[0-9]:[0-9]",
|
|
50
|
+
"type": "type-match",
|
|
51
|
+
"options": (float, int, str),
|
|
52
|
+
},
|
|
53
|
+
"snow_catch_factor": {
|
|
54
|
+
"type": "type-match",
|
|
55
|
+
"options": (float, int),
|
|
56
|
+
},
|
|
57
|
+
"data_option": {
|
|
58
|
+
"type": "value-match",
|
|
59
|
+
"options": ["TIMESERIES", "FILE"],
|
|
60
|
+
},
|
|
61
|
+
"timeseries": {
|
|
62
|
+
"type": "type-match",
|
|
63
|
+
"options": (str),
|
|
64
|
+
},
|
|
65
|
+
"filename": {
|
|
66
|
+
"type": "type-match",
|
|
67
|
+
"options": (str),
|
|
68
|
+
},
|
|
69
|
+
"station": {
|
|
70
|
+
"type": "type-match",
|
|
71
|
+
"options": (str),
|
|
72
|
+
},
|
|
73
|
+
"units": {
|
|
74
|
+
"type": "value-match",
|
|
75
|
+
"options": ["IN", "MM"],
|
|
76
|
+
},
|
|
77
|
+
"type": { # outfall type
|
|
78
|
+
"type": "value-match",
|
|
79
|
+
"options": ["FREE", "NORMAL", "FIXED", "TIDAL", "TIMESERIES"],
|
|
80
|
+
},
|
|
81
|
+
"stage": {
|
|
82
|
+
"type": "type-match",
|
|
83
|
+
"options": (float, int),
|
|
84
|
+
},
|
|
85
|
+
"tcurve": { # tidal curve name
|
|
86
|
+
"type": "type-match",
|
|
87
|
+
"options": (str),
|
|
88
|
+
},
|
|
89
|
+
"tseries": { # tidal curve name
|
|
90
|
+
"type": "type-match",
|
|
91
|
+
"options": (str),
|
|
92
|
+
},
|
|
93
|
+
"gated": { # outfall type
|
|
94
|
+
"type": "value-match",
|
|
95
|
+
"options": [None, "", "YES", "NO"],
|
|
96
|
+
},
|
|
97
|
+
"routeto": { # outfall type
|
|
98
|
+
"type": "type-match",
|
|
99
|
+
"options": (str),
|
|
100
|
+
},
|
|
101
|
+
"node1": {
|
|
102
|
+
"type": "type-match",
|
|
103
|
+
"options": (str),
|
|
104
|
+
},
|
|
105
|
+
"node2": {
|
|
106
|
+
"type": "type-match",
|
|
107
|
+
"options": (str),
|
|
108
|
+
},
|
|
109
|
+
"length": {
|
|
110
|
+
"type": "type-match",
|
|
111
|
+
"options": (float, int),
|
|
112
|
+
},
|
|
113
|
+
"n": {
|
|
114
|
+
"type": "type-match",
|
|
115
|
+
"options": (float, int),
|
|
116
|
+
},
|
|
117
|
+
"z1": {
|
|
118
|
+
"type": "type-match",
|
|
119
|
+
"options": (float, int),
|
|
120
|
+
},
|
|
121
|
+
"z2": {
|
|
122
|
+
"type": "type-match",
|
|
123
|
+
"options": (float, int),
|
|
124
|
+
},
|
|
125
|
+
"q0": {
|
|
126
|
+
"type": "type-match",
|
|
127
|
+
"options": (type(None), float, int),
|
|
128
|
+
},
|
|
129
|
+
"qmax": {
|
|
130
|
+
"type": "type-match",
|
|
131
|
+
"options": (type(None), float, int),
|
|
132
|
+
},
|
|
133
|
+
"kentry": {
|
|
134
|
+
"type": "type-match",
|
|
135
|
+
"options": (float, int),
|
|
136
|
+
},
|
|
137
|
+
"kexit": {
|
|
138
|
+
"type": "type-match",
|
|
139
|
+
"options": (float, int),
|
|
140
|
+
},
|
|
141
|
+
"kavg": {
|
|
142
|
+
"type": "type-match",
|
|
143
|
+
"options": (float, int),
|
|
144
|
+
},
|
|
145
|
+
"flap": { # outfall type
|
|
146
|
+
"type": "value-match",
|
|
147
|
+
"options": [None, "YES", "NO"],
|
|
148
|
+
},
|
|
149
|
+
"seepage": { # outfall type
|
|
150
|
+
"type": "type-match",
|
|
151
|
+
"options": (type(None), float, int),
|
|
152
|
+
},
|
|
153
|
+
"shape": { # xsection shape
|
|
154
|
+
"type": "value-match",
|
|
155
|
+
"options": [
|
|
156
|
+
"CIRCULAR",
|
|
157
|
+
"FORCE_MAIN",
|
|
158
|
+
"FILLED_CIRCULAR2",
|
|
159
|
+
"RECT_CLOSED",
|
|
160
|
+
"RECT_OPEN",
|
|
161
|
+
"TRAPEZOIDAL",
|
|
162
|
+
"TRIANGULAR",
|
|
163
|
+
"HORIZ_ELLIPSE",
|
|
164
|
+
"VERT_ELLIPSE",
|
|
165
|
+
"ARCH",
|
|
166
|
+
"PARABOLIC",
|
|
167
|
+
"POWER",
|
|
168
|
+
"RECT_TRIANGULAR",
|
|
169
|
+
"RECT_ROUND",
|
|
170
|
+
"MODBASKETHANDLE",
|
|
171
|
+
"EGG",
|
|
172
|
+
"HORSESHOE",
|
|
173
|
+
"GOTHIC",
|
|
174
|
+
"CATENARY",
|
|
175
|
+
"SEMIELLIPTICAL",
|
|
176
|
+
"BASKETHANDLE",
|
|
177
|
+
"SEMICIRCULAR",
|
|
178
|
+
"CUSTOM",
|
|
179
|
+
"IRREGULAR",
|
|
180
|
+
],
|
|
181
|
+
},
|
|
182
|
+
"geom1": {
|
|
183
|
+
"type": "type-match",
|
|
184
|
+
"options": (type(None), float, int, str),
|
|
185
|
+
},
|
|
186
|
+
"geom2": {
|
|
187
|
+
"type": "type-match",
|
|
188
|
+
"options": (type(None), float, int, str),
|
|
189
|
+
},
|
|
190
|
+
"geom3": {
|
|
191
|
+
"type": "type-match",
|
|
192
|
+
"options": (type(None), float, int, str),
|
|
193
|
+
},
|
|
194
|
+
"geom4": {
|
|
195
|
+
"type": "type-match",
|
|
196
|
+
"options": (type(None), float, int, str),
|
|
197
|
+
},
|
|
198
|
+
"barrels": {
|
|
199
|
+
"type": "type-match",
|
|
200
|
+
"options": (type(None), int),
|
|
201
|
+
},
|
|
202
|
+
"culvert": {
|
|
203
|
+
# TODO: str added to allow case when optional parameter not provided (and so is ""). Update to improve handling,
|
|
204
|
+
"type": "type-match",
|
|
205
|
+
"options": (type(None), int, str),
|
|
206
|
+
},
|
|
207
|
+
"curve": { # curve name
|
|
208
|
+
"type": "type-match",
|
|
209
|
+
"options": (str),
|
|
210
|
+
},
|
|
211
|
+
"tsec": {
|
|
212
|
+
"type": "type-match",
|
|
213
|
+
"options": (str),
|
|
214
|
+
},
|
|
215
|
+
"options": {
|
|
216
|
+
"type": "dict-match",
|
|
217
|
+
"options": {
|
|
218
|
+
"flow_units": {
|
|
219
|
+
"type": "value-match",
|
|
220
|
+
"options": [None, "CFS", "GPM", "MGD", "CMS", "LPS", "MLD"],
|
|
221
|
+
},
|
|
222
|
+
"infiltration": {
|
|
223
|
+
"type": "value-match",
|
|
224
|
+
"options": [
|
|
225
|
+
None,
|
|
226
|
+
"HORTON",
|
|
227
|
+
"MODIFIED_HORTON",
|
|
228
|
+
"GREEN_AMPT",
|
|
229
|
+
"MODIFIED_GREEN_AMPT",
|
|
230
|
+
"CURVE_NUMBER",
|
|
231
|
+
],
|
|
232
|
+
},
|
|
233
|
+
"flow_routing": {
|
|
234
|
+
"type": "value-match",
|
|
235
|
+
"options": [None, "STEADY", "KINWAVE", "DYNWAVE"],
|
|
236
|
+
},
|
|
237
|
+
"link_offsets": {
|
|
238
|
+
"type": "value-match",
|
|
239
|
+
"options": [None, "DEPTH", "ELEVATION"],
|
|
240
|
+
},
|
|
241
|
+
"force_main_equation": {
|
|
242
|
+
"type": "value-match",
|
|
243
|
+
"options": [None, "H-W", "D-W"],
|
|
244
|
+
},
|
|
245
|
+
"ignore_rainfall": {
|
|
246
|
+
"type": "value-match",
|
|
247
|
+
"options": [None, "YES", "NO"],
|
|
248
|
+
},
|
|
249
|
+
"ignore_snowmelt": {
|
|
250
|
+
"type": "value-match",
|
|
251
|
+
"options": [None, "YES", "NO"],
|
|
252
|
+
},
|
|
253
|
+
"ignore_groundwater": {
|
|
254
|
+
"type": "value-match",
|
|
255
|
+
"options": [None, "YES", "NO"],
|
|
256
|
+
},
|
|
257
|
+
"ignore_rdii": {
|
|
258
|
+
"type": "value-match",
|
|
259
|
+
"options": [None, "YES", "NO"],
|
|
260
|
+
},
|
|
261
|
+
"ignore_routing": {
|
|
262
|
+
"type": "value-match",
|
|
263
|
+
"options": [None, "YES", "NO"],
|
|
264
|
+
},
|
|
265
|
+
"ignore_quality": {
|
|
266
|
+
"type": "value-match",
|
|
267
|
+
"options": [None, "YES", "NO"],
|
|
268
|
+
},
|
|
269
|
+
"allow_ponding": {
|
|
270
|
+
"type": "value-match",
|
|
271
|
+
"options": [None, "YES", "NO"],
|
|
272
|
+
},
|
|
273
|
+
"skip_steady_state": {
|
|
274
|
+
"type": "value-match",
|
|
275
|
+
"options": [None, "YES", "NO"],
|
|
276
|
+
},
|
|
277
|
+
"sys_flow_tol": {
|
|
278
|
+
"type": "type-match",
|
|
279
|
+
"options": (type(None), float, int),
|
|
280
|
+
},
|
|
281
|
+
"lat_flow_tol": {
|
|
282
|
+
"type": "type-match",
|
|
283
|
+
"options": (type(None), float, int),
|
|
284
|
+
},
|
|
285
|
+
"start_date": {
|
|
286
|
+
"type": "type-match",
|
|
287
|
+
"options": (type(None), str),
|
|
288
|
+
},
|
|
289
|
+
"start_time": {
|
|
290
|
+
"type": "type-match",
|
|
291
|
+
"options": (type(None), str),
|
|
292
|
+
},
|
|
293
|
+
"end_date": {
|
|
294
|
+
"type": "type-match",
|
|
295
|
+
"options": (type(None), str),
|
|
296
|
+
},
|
|
297
|
+
"end_time": {
|
|
298
|
+
"type": "type-match",
|
|
299
|
+
"options": (type(None), str),
|
|
300
|
+
},
|
|
301
|
+
"report_start_date": {
|
|
302
|
+
"type": "type-match",
|
|
303
|
+
"options": (type(None), str),
|
|
304
|
+
},
|
|
305
|
+
"report_start_time": {
|
|
306
|
+
"type": "type-match",
|
|
307
|
+
"options": (type(None), str),
|
|
308
|
+
},
|
|
309
|
+
"sweep_start": {
|
|
310
|
+
"type": "type-match",
|
|
311
|
+
"options": (type(None), str),
|
|
312
|
+
},
|
|
313
|
+
"sweep_end": {
|
|
314
|
+
"type": "type-match",
|
|
315
|
+
"options": (type(None), str),
|
|
316
|
+
},
|
|
317
|
+
"dry_days": {
|
|
318
|
+
"type": "type-match",
|
|
319
|
+
"options": (type(None), float, int),
|
|
320
|
+
},
|
|
321
|
+
"report_step": {
|
|
322
|
+
"type": "type-match",
|
|
323
|
+
"options": (type(None), str),
|
|
324
|
+
},
|
|
325
|
+
"wet_step": {
|
|
326
|
+
"type": "type-match",
|
|
327
|
+
"options": (type(None), str),
|
|
328
|
+
},
|
|
329
|
+
"dry_step": {
|
|
330
|
+
"type": "type-match",
|
|
331
|
+
"options": (type(None), str),
|
|
332
|
+
},
|
|
333
|
+
"routing_step": {
|
|
334
|
+
"type": "type-match",
|
|
335
|
+
"options": (type(None), str),
|
|
336
|
+
},
|
|
337
|
+
"lengthening_step": { # in INT format
|
|
338
|
+
"type": "type-match",
|
|
339
|
+
"options": (type(None), float, int),
|
|
340
|
+
},
|
|
341
|
+
"variable_step": {
|
|
342
|
+
"type": "type-match",
|
|
343
|
+
"options": (type(None), float, int),
|
|
344
|
+
},
|
|
345
|
+
"minimum_step": {
|
|
346
|
+
"type": "type-match",
|
|
347
|
+
"options": (type(None), float, int),
|
|
348
|
+
},
|
|
349
|
+
"inertial_damping": {
|
|
350
|
+
"type": "value-match",
|
|
351
|
+
"options": [None, "NONE", "PARTIAL", "FULL"],
|
|
352
|
+
},
|
|
353
|
+
"normal_flow_limited": {
|
|
354
|
+
"type": "value-match",
|
|
355
|
+
"options": [None, "SLOPE", "FROUDE", "BOTH"],
|
|
356
|
+
},
|
|
357
|
+
"min_surfarea": {
|
|
358
|
+
"type": "type-match",
|
|
359
|
+
"options": (type(None), float, int),
|
|
360
|
+
},
|
|
361
|
+
"min_slope": {
|
|
362
|
+
"type": "type-match",
|
|
363
|
+
"options": (type(None), float, int),
|
|
364
|
+
},
|
|
365
|
+
"max_trials": {
|
|
366
|
+
"type": "type-match",
|
|
367
|
+
"options": (type(None), float, int),
|
|
368
|
+
},
|
|
369
|
+
"head_tolerance": {
|
|
370
|
+
"type": "type-match",
|
|
371
|
+
"options": (type(None), float, int),
|
|
372
|
+
},
|
|
373
|
+
"threads": {
|
|
374
|
+
"type": "type-match",
|
|
375
|
+
"options": (type(None), float, int),
|
|
376
|
+
},
|
|
377
|
+
"tempdir": {
|
|
378
|
+
"type": "type-match",
|
|
379
|
+
"options": (type(None), str),
|
|
380
|
+
},
|
|
381
|
+
# Rule step in software but not manual
|
|
382
|
+
"rule_step": {
|
|
383
|
+
"type": "type-match",
|
|
384
|
+
"options": (type(None), str),
|
|
385
|
+
},
|
|
386
|
+
},
|
|
387
|
+
},
|
|
388
|
+
}
|