Skip to content

Commit

Permalink
Merge develop into master
Browse files Browse the repository at this point in the history
  • Loading branch information
wcarthur committed Mar 17, 2021
1 parent c46c091 commit eb2ce2e
Show file tree
Hide file tree
Showing 3 changed files with 1,316 additions and 6 deletions.
4 changes: 2 additions & 2 deletions examples/wind/olwyn.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# python ../hazimp/hazimp/main.py -c olwyn_hazimp.yaml
- template: wind_nc
- vulnerability_filename: synthetic_domestic_wind_vul_curves.xml
- vulnerability_set: domestic_wind_2012
- vulnerability_filename: domestic_wind_vul_curves_2021.xml
- vulnerability_set: domestic_wind_2021
- load_exposure:
file_name: WA_Wind_Exposure_2013_Test_only.csv
exposure_latitude: LATITUDE
Expand Down
8 changes: 4 additions & 4 deletions hazimp_preprocessing/curve_data/create_vuln_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def csv_curve2nrml(csv_filename, xml_filename):
for iml in imls:
if numpy.isnan(iml):
continue
loss_ratio += str(row[str(iml)]) + ' '
loss_ratio += str(row[str(int(iml))]) + ' '
coef_var += '0 '
write_nrml_curve(xml_h, row['vulnerabilityFunctionID'], imls, csv_dict['IMT'][0],
loss_ratio, coef_var)
Expand Down Expand Up @@ -349,9 +349,9 @@ def excel_curve2nrml(contents_filename, fabric_filename, xls_filename):

# -----------------------------------------------------------
if __name__ == "__main__":
if False:
csv_curve2nrml('domestic_wind_vul_curves.csv',
'domestic_wind_vul_curves.xml')
if True:
csv_curve2nrml('domestic_wind_vul_curves_2021.csv',
'domestic_wind_vul_curves_2021.xml')
if False:
csv_curve2nrml('synthetic_domestic_wind_vul_curves.csv',
'synthetic_domestic_wind_vul_curves.xml')
Expand Down
Loading

0 comments on commit eb2ce2e

Please sign in to comment.