コード例 #1
0
exp_infr_dur = exp_infr_meshs.copy()
exp_infr_dur["if_HL"] = 8  #change if_HL to match the corresponding imp_id
if plot_img:
    exp_infr_meshs.plot_basemap()
    exp_infr_meshs.plot_hexbin()
    exp_infr_meshs.plot_scatter()
    exp_infr_meshs.plot_raster()

#%% Impact
imp_infr_meshs = Impact()
imp_infr_meshs.calc(exp_infr_meshs, ifset_hail, haz_real, save_mat=True)
# imp_infr.plot_raster_eai_exposure()
freq_curve_infr_meshs = imp_infr_meshs.calc_freq_curve()  #[1, 2, 5, 10, 20])
if plot_img:
    freq_curve_infr_meshs.plot()
    imp_infr_meshs.plot_basemap_eai_exposure()
    imp_infr_meshs.plot_hexbin_eai_exposure()
    imp_infr_meshs.plot_scatter_eai_exposure()
    imp_infr_meshs.plot_raster_eai_exposure()

imp_infr_dur = Impact()
imp_infr_dur.calc(exp_infr_dur, ifset_hail, haz_dur, save_mat=True)
# imp_infr.plot_raster_eai_exposure()
freq_curve_infr_dur = imp_infr_dur.calc_freq_curve()
if plot_img:
    freq_curve_infr_dur.plot()
    imp_infr_dur.plot_basemap_eai_exposure()
    imp_infr_dur.plot_hexbin_eai_exposure()
    imp_infr_dur.plot_scatter_eai_exposure()
    imp_infr_dur.plot_raster_eai_exposure()
コード例 #2
0
    exp_synth_infr_meshs.plot_scatter()
    exp_synth_infr_meshs.plot_raster()
    
    exp_synth_agr_meshs.tag = Tag(file_name = "exp_agr", description="Exposure_description")
    exp_synth_agr_meshs.plot_basemap()
    exp_synth_agr_meshs.plot_hexbin()
    exp_synth_agr_meshs.plot_scatter()
    exp_synth_agr_meshs.plot_raster(raster_res = 0.001)

#%% Impact
imp_synth_infr_meshs = Impact()
imp_synth_infr_meshs.calc(exp_synth_infr_meshs, ifset_hail, haz_synth,save_mat=True)
freq_curve_synth_infr_meshs = imp_synth_infr_meshs.calc_freq_curve()
if plot_img:
    freq_curve_synth_infr_meshs.plot()
    imp_synth_infr_meshs.plot_basemap_eai_exposure()
    imp_synth_infr_meshs.plot_hexbin_eai_exposure()
    imp_synth_infr_meshs.plot_scatter_eai_exposure()
    imp_synth_infr_meshs.plot_raster_eai_exposure(raster_res = 0.001)

imp_synth_agr_meshs = Impact()
imp_synth_agr_meshs.calc(exp_synth_agr_meshs, ifset_hail, haz_synth, save_mat=True)
freq_curve_synth_agr_meshs = imp_synth_agr_meshs.calc_freq_curve()
if plot_img:
    freq_curve_synth_agr_meshs.plot()
    imp_synth_agr_meshs.plot_basemap_eai_exposure()
    imp_synth_agr_meshs.plot_hexbin_eai_exposure()
    imp_synth_agr_meshs.plot_scatter_eai_exposure()
    imp_synth_agr_meshs.plot_raster_eai_exposure(raster_res = 0.001)
    
print("dmg synth_infr_meshs {} Mio CHF, dmg synth_agr_meshs {} Mio CHF"