@@ -34,7 +34,7 @@ Follow the install notes in the README.md file.
34
34
A configuration file can be used to define a HazImp simulation. The
35
35
configuration file is described using yaml, a data serialisation
36
36
format. HazImp can also be used by another Python application, by
37
- passing the configuration infomation in as a dictionary.
37
+ passing the configuration information in as a dictionary.
38
38
39
39
For example, to run a wind example do::
40
40
@@ -50,7 +50,7 @@ HazImp can also be ran in parallel, using mpirun. For example::
50
50
51
51
52
52
There are a suite of HazImp tests to test the install and code during
53
- software developemnt . To run these, in the root HazImp directory
53
+ software developement . To run these, in the root HazImp directory
54
54
do;::
55
55
56
56
./all_tests
@@ -110,13 +110,15 @@ The first line is a comment, so this is ignored.
110
110
The rest of the file can be understood by the following key value pairs;
111
111
112
112
*template *
113
- The type of :ref: `template ` to use. This example describes the *wind_nc * template.
113
+ The type of template to use. This example describes the *wind_nc * template.
114
+ See `docs/templates.rst `
114
115
115
116
*vulnerability *
116
117
This loads the vulnerability models for calculating the level of damage.
117
118
118
119
*filename *
119
- The name of the vulnerability model file to load
120
+ The name of the vulnerability model file to load. This is an xml
121
+ file produced using `hazimp_preprocessing/curve_data/create_vuln_xml.py `
120
122
121
123
*vulnerability_set *
122
124
A vulnerability file may contain multiple sets (the
@@ -154,13 +156,13 @@ called ``WIND_VULNERABILITY_FUNCTION_ID`` which describe the vulnerability
154
156
functions to be used. It must also have a column called "WIND_VULNERABILITY_SET"
155
157
which describes the vulnerability set to use (see below for more details).
156
158
157
- *load_wind *
158
- This loads the hazard data. It can have up to three subsections;
159
+ *hazard_raster *
160
+ This loads the hazard data.
159
161
160
162
*file_list *
161
163
A list of raster wind hazard files (one or more). The file format can be
162
164
ascii grid, geotiff or netcdf (or potentially any raster format
163
- recognised by GDAL, but these are all that have ben tested to date).
165
+ recognised by GDAL, but these are all that have been tested to date).
164
166
165
167
*file_format *
166
168
This specifies the data format - specifically used for netcdf, where the
@@ -170,43 +172,34 @@ which describes the vulnerability set to use (see below for more details).
170
172
For use when the file format is 'nc'. This specifies the name of the
171
173
variable in the netcdf file that contains the hazard data.
172
174
173
- The values in the file must represent
174
- ``0.2s gust at 10m height m/s ``, since that is the axis of the HazImp wind
175
- vulnerability curves.
176
-
177
- *vulnerability *
178
- *filename *
179
- The path to a correctly formatted vulnerability curve file. This is an xml
180
- file produced using `hazimp_preprocessing/curve_data/create_vuln_xml.py `
181
-
182
- *vulnerability_set *
183
- This defines the suite of vulnerability curves to use. A vulnerability file
184
- may contain a large number of different vulnerability functions that can be
185
- applied to the same exposure assets. This option defines which set to use
186
- from that vulnearbility file. The vulnerability set is used to calculate the
187
- ``structural_loss_ratio `` given the ``0.2s gust at 10m height m/s ``.
188
-
189
- *vulnerability_method *
190
- Whether to use the mean loss ratio ("mean") or to vary around the mean with
191
- standard normal distribution ("normal"), based on the mean value plus a
192
- coefficient of variation (CoV). CoV values must be included in the vulnerability
193
- curve file, in the form of alpha and beta values (sample mean and standard deviation)
175
+ *scaling_factor *
176
+ For use when the hazard units do not match the units of the vulnerability
177
+ function. e.g. hazard units are in cm, vulnerability function is in m
178
+ scaling factor is 0.01.
194
179
180
+ *exposure_permutation *
181
+ *groupby *
182
+ The exposure attribute that will be used to conduct the permutation
183
+ within. It is strongly recommended to use the same attribute as
184
+ used for aggregation.
185
+
186
+ *iterations *
187
+ The number of iterations of the permutation conducted.
195
188
196
189
*calc_struct_loss *
197
- This will multiply the replacement value and the ``structural ``
190
+ This will multiply the replacement value by the ``structural `` value
198
191
to get the ``structural_loss ``.
199
192
200
193
*replacement_value_label *
201
194
The title of the exposure data column that has the replacement values.
202
195
203
196
*save *
204
- The file where the results will be saved. All the results to calculate the
197
+ The file where the unit level results will be saved. All the results to calculate the
205
198
damage due to the wind hazard are saved to file. The above example saves to
206
199
a csv file, since the file name ends in *.csv *. This has the disadvantage
207
200
of averaging data from multiple wind hazards. The information can also be
208
201
saved as numpy arrays. This can be done by using the *.npz * extension.
209
- This data can be accessed using Python scripts and is not averaged.
202
+ These data can be accessed using Python scripts and are not averaged.
210
203
211
204
Output
212
205
~~~~~~
@@ -231,9 +224,9 @@ value of the asset. This will appear in the output file under the attribute
231
224
Aggregation
232
225
~~~~~~~~~~~
233
226
234
- *aggregation *
235
- This determines the way HazImp will aggregate results
236
-
227
+ *aggregation *
228
+ This determines the way HazImp will aggregate the results (table output)
229
+
237
230
*groupby *
238
231
The exposure attribute that will be used to aggregate
239
232
results. It is strongly recommended to use the same attribute as
@@ -251,21 +244,66 @@ Aggregation
251
244
structural_loss: [mean, sum]
252
245
REPLACEMENT_VALUE: [mean, sum]
253
246
254
-
255
247
*save_agg *
256
248
The file where the aggregated results will be saved. This will save data to
257
249
a csv-format file::
258
250
259
251
- save_agg: olwyn_agg.csv
260
252
261
- This option has only been implemented in the ``wind_nc `` and ``wind_v5 ``
262
- templates at this time (June 2020).
253
+ *categorise *
254
+ Categorisation of the structural loss ratio to damage state
255
+ See `docs/categorise.rst ` for examples
256
+
257
+ *field_name *
258
+ The name of the created categorical field
259
+
260
+ *bins *
261
+ Monotonically increasing array of bin edges, including the rightmost
262
+ edge, allowing for non-uniform bin widths. There must be
263
+ (number of labels) + 1 values, and range from 0.0 to 1.0.
264
+
265
+ *labels *
266
+ Specifies the labels for the bins
267
+
268
+ *aggregate *
269
+ This determines the way HazImp will aggregate results (spatial output)
270
+
271
+ *boundaries *
272
+ Name of geospatial dataset that contains geographical boundaries
273
+ to use for aggregation. file format options *.shp *, *.json *, *.geojson *, *.gpkg *
274
+
275
+ *boundarycode *
276
+ Field name in the boundaries geospatial dataset
277
+
278
+ *impactcode *
279
+ field name in the dataframe to aggregate
280
+
281
+ *filename *
282
+ destination file name for the aggregated spatial output
283
+ file format options *.shp *, *.json *, *.geojson *, *.gpkg *
284
+
285
+ *categories *
286
+ Boolean option (True or False) to add columns for the number of buildings
287
+ in each damage state defined in the 'Damage state' attribute. This
288
+ requires that a 'categorise` job has been included in the pipeline,
289
+ which in turn requires the bins and labels to be defined in the job
290
+ configuration file.
291
+
292
+ *fields *
293
+ A dictionary with column names from the dataframe with lists of
294
+ aggregation functions to apply to the columns
295
+ For example:
296
+
297
+ - Fields:
298
+ structural: [mean]
299
+ structural_upper: [mean]
300
+ 'Damage state': [size]
263
301
264
302
265
303
Flood Template - Structural Damage
266
304
----------------------------------
267
305
268
- The structural damage flood template is very similar to the the wind template.
306
+ The structural damage flood template is very similar to the wind template.
269
307
This is an example structural damage flood template;::
270
308
271
309
# python ../../hazimp/hazimp.py -c list_flood_v2.yaml
0 commit comments