From 37bb860ef9f7ba6a7719a1213f0889e7be9c27a2 Mon Sep 17 00:00:00 2001 From: Alessio Ciullo <29018864+aleeciu@users.noreply.github.com> Date: Tue, 29 Oct 2024 17:07:26 +0100 Subject: [PATCH] adjust object initiation --- .../entity/impact_funcs/river_flood.py | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/climada_petals/entity/impact_funcs/river_flood.py b/climada_petals/entity/impact_funcs/river_flood.py index 052e6ff8..e5082cb7 100644 --- a/climada_petals/entity/impact_funcs/river_flood.py +++ b/climada_petals/entity/impact_funcs/river_flood.py @@ -369,25 +369,21 @@ def flood_imp_func_set(sector="residential"): """Builds impact function set for river flood, using standard files. By default, it reads functions for the residential sector""" - impf_set = ImpactFuncSet() - impf_africa = ImpfRiverFlood.from_jrc_region_sector("Africa", sector=sector) - impf_set.append(impf_africa) - impf_asia = ImpfRiverFlood.from_jrc_region_sector("Asia", sector=sector) - impf_set.append(impf_asia) - impf_europe = ImpfRiverFlood.from_jrc_region_sector("Europe", sector=sector) - impf_set.append(impf_europe) - impf_na = ImpfRiverFlood.from_jrc_region_sector("NorthAmerica", sector=sector) - impf_set.append(impf_na) - impf_oceania = ImpfRiverFlood.from_jrc_region_sector("Oceania", sector=sector) - impf_set.append(impf_oceania) - impf_sa = ImpfRiverFlood.from_jrc_region_sector("SouthAmerica", sector=sector) - impf_set.append(impf_sa) + + impf_set = ImpactFuncSet([ + impf_africa, + impf_asia, + impf_europe, + impf_na, + impf_oceania, + impf_sa + ]) return impf_set