From 279a3aa84d45d76785126d0d55cb5888b2b38743 Mon Sep 17 00:00:00 2001 From: Cecilia Nievas Date: Tue, 6 Oct 2020 14:31:56 +0200 Subject: [PATCH] Two minor bug fixes in SERA rebuild 01 associated with issues 2 and 3: wrong variable name, sat_27f_model not supported --- SERA_testing_rebuilding_exposure_from_cells_alternative_01.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SERA_testing_rebuilding_exposure_from_cells_alternative_01.py b/SERA_testing_rebuilding_exposure_from_cells_alternative_01.py index 5ecfe3a..ce8f7e2 100644 --- a/SERA_testing_rebuilding_exposure_from_cells_alternative_01.py +++ b/SERA_testing_rebuilding_exposure_from_cells_alternative_01.py @@ -103,7 +103,7 @@ def run_this_file(config_dict): # Go admin unit by admin unit: adm_level= admin_levels[case] # Retrieve the IDs of all admin units associated with country_name and adm_level: - adm_ids_list= gdet_psql.retrieve_distinct_admin_IDs_by_country_case_admin_level(DB_name_grid, DB_username_grid, DB_schema_name_grid, DB_table_name, country_name, case, adm_level) + adm_ids_list= gdet_psql.retrieve_distinct_admin_IDs_by_country_case_admin_level(DB_name_grid, DB_username_grid, DB_schema_name_grid, DB_table_name_grid, country_name, case, adm_level) # Initialise variables to collect values per admin unit from SERA csv files: sera_num_bdgs_per_admin_unit= np.zeros([len(adm_ids_list)]) sera_num_dwells_per_admin_unit= np.zeros([len(adm_ids_list)]) @@ -134,6 +134,8 @@ def run_this_file(config_dict): param_for_weighting_adj= 'ghs_km2' elif param_for_weighting=='sat_27f': param_for_weighting_adj= 'sat_27f_km2' + elif param_for_weighting=='sat_27f_model': + param_for_weighting_adj= 'sat_27f_model_km2' else: param_for_weighting_adj= param_for_weighting cells_ids, _= gdet_psql.get_cells_and_weights_from_country_occup_adm_id(DB_name_grid, DB_username_grid, DB_schema_name_grid, DB_table_name_grid, country_name, case, admin_id, param_for_weighting_adj) -- GitLab