Beispiel #1
0
haz_dur = fct.load_haz(force_new_hdf5_generation, "haz_dur", name_hdf5_file,
                       input_folder, years)

haz_real.check()
haz_synth.check()

if plot_img:
    haz_real.plot_intensity(event=0)
    haz_real.plot_fraction(event=0)

#%% Impact_function
# Set impact function (see tutorial climada_entity_ImpactFuncSet)
ifset_hail = ImpactFuncSet()
for imp_fun_dict in imp_fun_parameter:
    imp_fun = fct.create_impact_func(haz_type, imp_fun_dict["imp_id"],
                                     imp_fun_dict["L"], imp_fun_dict["x_0"],
                                     imp_fun_dict["k"])
    ifset_hail.append(imp_fun)
ifset_hail.plot()

#%% Exposure

exp_infr = fct.load_exp_infr(force_new_hdf5_generation, name_hdf5_file,
                             input_folder, haz_real)
exp_meshs = fct.load_exp_agr(force_new_hdf5_generation, name_hdf5_file,
                             input_folder, haz_real)
exp_dur = exp_meshs.copy()
exp_dur["if_HL"] = exp_dur[
    "if_HL"] + 3  #change if_HL to match the corresponding imp_id
if plot_img:
    exp_infr.plot_basemap()
Beispiel #2
0
                        input_folder, years)
haz_dur = fct.load_haz(force_new_hdf5_generation, "haz_dur", name_hdf5_file,
                       input_folder, years)

haz_real.check()

if plot_img:
    haz_real.plot_intensity(event=0)
    haz_real.plot_fraction(event=0)

#%% Impact_function
# Set impact function (see tutorial climada_entity_ImpactFuncSet)
ifset_hail = ImpactFuncSet()
for imp_fun_dict in imp_fun_parameter:
    imp_fun = fct.create_impact_func(haz_type, imp_fun_dict["imp_id"],
                                     imp_fun_dict["L"], imp_fun_dict["x_0"],
                                     imp_fun_dict["k"])
    ifset_hail.append(imp_fun)
if plot_img:
    ifset_hail.plot()

#%% Exposure

exp_infr = fct.load_exp_infr(force_new_hdf5_generation, name_hdf5_file,
                             input_folder, haz_real)
exp_meshs = fct.load_exp_agr(force_new_hdf5_generation, name_hdf5_file,
                             input_folder, haz_real)
exp_dur = exp_meshs.copy()
exp_dur["if_HL"] = exp_dur[
    "if_HL"] + 3  #change if_HL to match the corresponding imp_id
if plot_img: