diff --git a/energy_demand/config_data/05-technologies/efficiency_generation_spreadsheet.xlsx b/energy_demand/config_data/05-technologies/efficiency_generation_spreadsheet.xlsx index 15c32564..5c8c4106 100644 Binary files a/energy_demand/config_data/05-technologies/efficiency_generation_spreadsheet.xlsx and b/energy_demand/config_data/05-technologies/efficiency_generation_spreadsheet.xlsx differ diff --git a/energy_demand/config_data/05-technologies/technology_definition.csv b/energy_demand/config_data/05-technologies/technology_definition.csv index 755a5d33..17d0096a 100644 --- a/energy_demand/config_data/05-technologies/technology_definition.csv +++ b/energy_demand/config_data/05-technologies/technology_definition.csv @@ -1,48 +1,48 @@ technology,fueltype,efficiency in base year,efficiency in future year,year when efficiency is fully realised,diffusion method (sigmoid or linear),market_entry,technology type,maximum theoretical service share of technology,description standard_lighting_bulb,electricity,0.029,0.034,2050,linear,2000,lighting,1, halogen,electricity,0.037,0.073,2050,linear,2000,lighting,1, -energy_saving_lighting_bulb,electricity,0.220,0.293,2050,linear,2000,lighting,1, -fluorescent_strip_lighting,electricity,0.146,0.220,2050,linear,2000,lighting,1, -LED,electricity,0.220,0.439,2050,linear,2000,lighting,1, -washing_machine,electricity,1.000,1.334,2050,linear,2000,wet,1, -tumble_dryer,electricity,1.000,3.076,2050,linear,2000,wet,1, -dishwasher,electricity,1.000,1.367,2050,linear,2000,wet,1, -washer_dryer,electricity,1.000,1.334,2050,linear,2000,wet,1, -hob_gas,gas,0.400,0.500,2050,linear,2000,cooking,1, -hob_electricity,electricity,0.600,0.700,2050,linear,2000,cooking,1, -hob_induction_electricity,electricity,0.750,0.900,2050,linear,2000,cooking,1, -hob_hydrogen,hydrogen,0.400,0.500,2050,linear,2000,cooking,1, -hob_biomass,biomass,0.400,0.500,2050,linear,2000,cooking,1, -chest_freezer,electricity,1.000,2.709,2050,linear,2000,cold,1, -fridge_freezer,electricity,1.000,2.405,2050,linear,2000,cold,1, -refrigerator,electricity,1.000,2.408,2050,linear,2000,cold,1, -upright_freezer,electricity,1.000,2.500,2050,linear,2000,cold,1, -central_air_conditioner_electricity,electricity,1.000,2.000,2050,linear,2000,cooling_const,1, -decentral_air_conditioner_electricity,electricity,1.000,2.000,2050,linear,2000,cooling_const,1, -central_air_conditioner_oil,oil,1.000,2.000,2050,linear,2000,cooling_const,1, -decentral_air_conditioner_oil,oil,1.000,2.000,2050,linear,2000,cooling_const,1, -central_air_conditioner_gas,gas,1.000,2.000,2050,linear,2000,cooling_const,0.89, -decentral_air_conditioner_gas,gas,1.000,2.000,2050,linear,2000,cooling_const,0.89, -boiler_solid_fuel,solid_fuel,0.600,0.700,2050,linear,2000,heating_const,1, -boiler_gas,gas,0.650,0.940,2050,linear,2000,heating_const,0.89, -boiler_electricity,electricity,0.990,0.990,2050,linear,2000,heating_const,1, -boiler_oil,oil,0.700,0.940,2050,linear,2000,heating_const,1, -boiler_biomass,biomass,0.600,0.950,2050,linear,2000,heating_const,1, -boiler_hydrogen,hydrogen,0.850,0.950,2050,linear,2000,heating_const,0.89, -boiler_condensing_gas,gas,0.850,0.950,2050,linear,2000,heating_const,1, -boiler_condensing_oil,oil,0.850,0.950,2050,linear,2000,heating_const,1, -stirling_micro_CHP_gas,gas,0.800,0.950,2050,linear,2000,tech_CHP,0.89, -fuel_cell_hydrogen,hydrogen,0.850,0.950,2050,linear,2000,tech_CHP,0.89, -storage_heater_electricity,electricity,0.990,0.990,2050,linear,2000,storage_heating_electricity,1, -secondary_heater_electricity,electricity,0.990,0.990,2050,linear,2000,secondary_heating_electricity,1, -heat_pump_ASHP_electricity,electricity,3.600,4.000,2050,linear,2000,heating_non_const,1, -heat_pump_GSHP_electricity,electricity,4.900,5.400,2050,linear,2000,heating_non_const,1, -heat_pump_ASHP_hydrogen,hydrogen,3.600,4.000,2050,linear,2000,heating_non_const,0.89, -heat_pump_GSHP_hydrogen,hydrogen,4.900,5.400,2050,linear,2000,heating_non_const,0.89, -district_heating_CHP_gas,gas,0.450,0.450,2050,linear,2000,tech_CHP,0.2,thermal efficiency -district_heating_electricity,electricity,1.000,1.000,2050,linear,2000,tech_district_heating,0.2, -district_heating_biomass,biomass,0.600,0.600,2050,linear,2000,tech_district_heating,0.2, -district_heating_fuel_cell,hydrogen,0.850,0.850,2050,linear,2000,tech_district_heating,0.2, +energy_saving_lighting_bulb,electricity,0.22,0.293,2050,linear,2000,lighting,1, +fluorescent_strip_lighting,electricity,0.146,0.22,2050,linear,2000,lighting,1, +LED,electricity,0.22,0.439,2050,linear,2000,lighting,1, +washing_machine,electricity,1,1.334,2050,linear,2000,wet,1, +tumble_dryer,electricity,1,3.076,2050,linear,2000,wet,1, +dishwasher,electricity,1,1.367,2050,linear,2000,wet,1, +washer_dryer,electricity,1,1.334,2050,linear,2000,wet,1, +hob_gas,gas,0.4,0.5,2050,linear,2000,cooking,1, +hob_electricity,electricity,0.6,0.7,2050,linear,2000,cooking,1, +hob_induction_electricity,electricity,0.75,0.9,2050,linear,2000,cooking,1, +hob_hydrogen,hydrogen,0.4,0.5,2050,linear,2000,cooking,1, +hob_biomass,biomass,0.4,0.5,2050,linear,2000,cooking,1, +chest_freezer,electricity,1,2.709,2050,linear,2000,cold,1, +fridge_freezer,electricity,1,2.405,2050,linear,2000,cold,1, +refrigerator,electricity,1,2.408,2050,linear,2000,cold,1, +upright_freezer,electricity,1,2.5,2050,linear,2000,cold,1, +central_air_conditioner_electricity,electricity,1,2,2050,linear,2000,cooling_const,1, +decentral_air_conditioner_electricity,electricity,1,2,2050,linear,2000,cooling_const,1, +central_air_conditioner_oil,oil,1,2,2050,linear,2000,cooling_const,1, +decentral_air_conditioner_oil,oil,1,2,2050,linear,2000,cooling_const,1, +central_air_conditioner_gas,gas,1,2,2050,linear,2000,cooling_const,0.89, +decentral_air_conditioner_gas,gas,1,2,2050,linear,2000,cooling_const,0.89, +boiler_solid_fuel,solid_fuel,0.6,0.7,2050,linear,2000,heating_const,1, +boiler_gas,gas,0.65,0.94,2050,linear,2000,heating_const,0.89, +boiler_electricity,electricity,0.99,0.99,2050,linear,2000,heating_const,1, +boiler_oil,oil,0.7,0.94,2050,linear,2000,heating_const,1, +boiler_biomass,biomass,0.6,0.95,2050,linear,2000,heating_const,1, +boiler_hydrogen,hydrogen,0.85,0.95,2050,linear,2000,heating_const,0.89, +boiler_condensing_gas,gas,0.85,0.95,2050,linear,2000,heating_const,1, +boiler_condensing_oil,oil,0.85,0.95,2050,linear,2000,heating_const,1, +stirling_micro_CHP_gas,gas,0.8,0.95,2050,linear,2000,tech_CHP,0.89, +fuel_cell_hydrogen,hydrogen,0.85,0.95,2050,linear,2000,tech_CHP,0.89, +storage_heater_electricity,electricity,0.99,0.99,2050,linear,2000,storage_heating_electricity,1, +secondary_heater_electricity,electricity,0.99,0.99,2050,linear,2000,secondary_heating_electricity,1, +heat_pump_ASHP_electricity,electricity,3.6,4,2050,linear,2000,heating_non_const,1, +heat_pump_GSHP_electricity,electricity,4.9,5.4,2050,linear,2000,heating_non_const,1, +heat_pump_ASHP_hydrogen,hydrogen,3.6,4,2050,linear,2000,heating_non_const,0.89, +heat_pump_GSHP_hydrogen,hydrogen,4.9,5.4,2050,linear,2000,heating_non_const,0.89, +district_heating_CHP_gas,gas,0.45,0.45,2050,linear,2000,tech_CHP,0.2,thermal efficiency +district_heating_electricity,electricity,1,1,2050,linear,2000,tech_district_heating,0.2, +district_heating_biomass,biomass,0.6,0.6,2050,linear,2000,tech_district_heating,0.2, +district_heating_fuel_cell,hydrogen,0.85,0.85,2050,linear,2000,tech_district_heating,0.2, basic_oxygen_furnace,solid_fuel,1,1,2050,linear,2010,steel_production,1,assumed no technology imporvement electric_arc_furnace,electricity,6.1,6.1,2050,linear,2010,steel_production,1,assumed no technology imporvement SNG_furnace,gas,1,1,2050,linear,2020,steel_production,1,assumed no technology imporvement diff --git a/energy_demand/main.py b/energy_demand/main.py index 79ec877d..13315380 100644 --- a/energy_demand/main.py +++ b/energy_demand/main.py @@ -119,6 +119,7 @@ def energy_demand_model( data['criterias'] = {} data['criterias']['mode_constrained'] = True # True: Technologies are defined in ED model and fuel is provided, False: Heat is delievered not per technologies data['criterias']['virtual_building_stock_criteria'] = True # True: Run virtual building stock model + data['criterias']['spatial_calibration'] = False fast_model_run = False if fast_model_run == True: @@ -326,7 +327,8 @@ def energy_demand_model( # ------------------------------------------------------------ # Disaggregate national energy demand to regional demands # ------------------------------------------------------------ - data['fuel_disagg'] = s_disaggregation.disaggr_demand(data) + data['fuel_disagg'] = s_disaggregation.disaggr_demand( + data, spatial_calibration=data['criterias']['spatial_calibration']) # ------------------------------------------------------------ # Calculate spatial diffusion factors diff --git a/energy_demand/plotting/_scrap.py b/energy_demand/plotting/_scrap.py index 5ad5cf6b..cb891fdd 100644 --- a/energy_demand/plotting/_scrap.py +++ b/energy_demand/plotting/_scrap.py @@ -1,5 +1,64 @@ """Fig 2 figure """ + +import numpy as np + + +a = np.ones((3,3)) + +calc_lf_y(a) + +def calc_lf_y(fuel_yh): + """Calculate the yearly load factor for every fueltype + by dividing the yearly average load by the peak hourly + load in a year. + + Arguments + --------- + fuel_yh : array (fueltypes, 365, 24) or (fueltypes, 8760) + Yh fuel + + Returns + ------- + load_factor_y : array + Yearly load factors as percentage (100% = 100) + + Note + ----- + LECTRICAL AND PRODUCTION LOAD FACTORS + ## WRONG Load factor = average load / maximum load in given time period + Load factor = average load / peak load # * meausred hours + https://en.wikipedia.org/wiki/Load_factor_(electrical) + + https://circuitglobe.com/load-factor.html + """ + if fuel_yh.shape[1] == 365: + fuel_yh_8760 = fuel_yh.reshape(fuel_yh.shape[0], 8760) + else: + fuel_yh_8760 = fuel_yh + + # Get total sum per fueltype + tot_load_y = np.sum(fuel_yh_8760, axis=1) + + # Calculate maximum hour in every day of a year + max_load_h = np.max(fuel_yh_8760, axis=1) + + # Caclualte yearly load factor for every fueltype + with np.errstate(divide='ignore', invalid='ignore'): + load_factor_y = tot_load_y / (max_load_h * 8760) + load_factor_y[np.isnan(load_factor_y)] = 0 + + return load_factor_y * 100 + + + + + + + + + + import numpy as np import matplotlib.pyplot as plt #from scipy.stats import mstats diff --git a/energy_demand/profiles/load_factors.py b/energy_demand/profiles/load_factors.py index c9cb2f6e..9dc9aa74 100644 --- a/energy_demand/profiles/load_factors.py +++ b/energy_demand/profiles/load_factors.py @@ -121,12 +121,9 @@ def calc_lf_y(fuel_yh): Note ----- - LECTRICAL AND PRODUCTION LOAD FACTORS - ## WRONG Load factor = average load / maximum load in given time period - Load factor = energy consumption (kWH) / peak demand (kW) * meausred hours - https://en.wikipedia.org/wiki/Load_factor_(electrical) - - https://circuitglobe.com/load-factor.html + Load factor = average load / peak load + https://en.wikipedia.org/wiki/Load_factor_(electrical) + https://circuitglobe.com/load-factor.html """ if fuel_yh.shape[1] == 365: fuel_yh_8760 = fuel_yh.reshape(fuel_yh.shape[0], 8760) @@ -141,7 +138,8 @@ def calc_lf_y(fuel_yh): # Caclualte yearly load factor for every fueltype with np.errstate(divide='ignore', invalid='ignore'): - load_factor_y = tot_load_y / (max_load_h * 8760) + load_factor_y = (tot_load_y / 8760) / max_load_h + load_factor_y[np.isnan(load_factor_y)] = 0 return load_factor_y * 100 diff --git a/energy_demand/read_write/data_loader.py b/energy_demand/read_write/data_loader.py index 48a39fbe..3919a067 100644 --- a/energy_demand/read_write/data_loader.py +++ b/energy_demand/read_write/data_loader.py @@ -306,7 +306,11 @@ def read_national_real_elec_data(path_to_csv): for row in rows: geocode = str.strip(row[read_data.get_position(headings, 'LA Code')]) tot_consumption_unclean = row[read_data.get_position(headings, 'Total consumption')].strip() - national_fuel_data[geocode] = float(tot_consumption_unclean.replace(",", "")) + try: + national_fuel_data[geocode] = float(tot_consumption_unclean.replace(",", "")) + except: + # no data provided + logging.debug("No validation data available for region %s", geocode) return national_fuel_data @@ -518,19 +522,15 @@ def get_local_paths(path): 'lad_shapefile': os.path.join( path, '_raw_data', 'C_LAD_geography', 'same_as_pop_scenario', 'lad_2016_uk_simplified.shp'), 'path_post_installation_data': os.path.join( - path, '_processed_data', '_post_installation_data'), - 'data_processed_disaggregated': os.path.join( - path, '_processed_data', '_post_installation_data', 'disaggregated'), + path, '_processed_data'), 'weather_data': os.path.join( path, '_raw_data', 'A-temperature_data', 'cleaned_weather_stations_data'), 'load_profiles': os.path.join( - path, '_processed_data', '_post_installation_data', 'load_profiles'), - 'dir_disaggregated': os.path.join( - path, '_processed_data', '_post_installation_data', 'disaggregated'), + path, '_processed_data', 'load_profiles'), 'rs_load_profile_txt': os.path.join( - path, '_processed_data', '_post_installation_data', 'load_profiles', 'rs_submodel'), + path, '_processed_data', 'load_profiles', 'rs_submodel'), 'ss_load_profile_txt': os.path.join( - path, '_processed_data', '_post_installation_data', 'load_profiles', 'ss_submodel'), + path, '_processed_data', 'load_profiles', 'ss_submodel'), 'yaml_parameters': os.path.join( path, '..', 'config', 'yaml_parameters.yml'), 'yaml_parameters_constrained': os.path.join( @@ -630,23 +630,23 @@ def load_paths(path): path, '04-census_data', 'LAD_census_data.csv'), # Validation datasets - 'path_val_subnational_elec': os.path.join( + 'val_subnational_elec': os.path.join( path, '01-validation_datasets', '02_subnational_elec', 'data_2015_elec.csv'), - 'path_val_subnational_elec_residential': os.path.join( + 'val_subnational_elec_residential': os.path.join( path, '01-validation_datasets', '02_subnational_elec', 'data_2015_elec_domestic.csv'), - 'path_val_subnational_elec_non_residential': os.path.join( + 'val_subnational_elec_non_residential': os.path.join( path, '01-validation_datasets', '02_subnational_elec', 'data_2015_elec_non_domestic.csv'), - 'path_val_subnational_elec_msoa_residential': os.path.join( + 'val_subnational_elec_msoa_residential': os.path.join( path, '01-validation_datasets', '02_subnational_elec', 'MSOA_domestic_electricity_2015_cleaned.csv'), - 'path_val_subnational_elec_msoa_non_residential': os.path.join( + 'val_subnational_elec_msoa_non_residential': os.path.join( path, '01-validation_datasets', '02_subnational_elec', 'MSOA_non_dom_electricity_2015_cleaned.csv'), - 'path_val_subnational_gas': os.path.join( + 'val_subnational_gas': os.path.join( path, '01-validation_datasets', '03_subnational_gas', 'data_2015_gas.csv'), - 'path_val_subnational_gas_residential': os.path.join( + 'val_subnational_gas_residential': os.path.join( path, '01-validation_datasets', '03_subnational_gas', 'data_2015_gas_domestic.csv'), - 'path_val_subnational_gas_non_residential': os.path.join( + 'val_subnational_gas_non_residential': os.path.join( path, '01-validation_datasets', '03_subnational_gas', 'data_2015_gas_non_domestic.csv'), - 'path_val_nat_elec_data': os.path.join( + 'val_nat_elec_data': os.path.join( path, '01-validation_datasets', '01_national_elec_2015', 'elec_demand_2015.csv')} return paths diff --git a/energy_demand/result_processing/multiple_scenarios.py b/energy_demand/result_processing/multiple_scenarios.py index c693d6cc..782d4046 100644 --- a/energy_demand/result_processing/multiple_scenarios.py +++ b/energy_demand/result_processing/multiple_scenarios.py @@ -43,15 +43,7 @@ def process_result_multi_scen( "plot_radar": True, "plot_radar_seasonal": True, # Plot radar spider charts "plot_line_for_every_region_of_peak_demand": True, - "plot_lad_cross_graphs": True, - - # NEW - #"plot_weather_day_year": False, #plot for a period (e.g. day) the hourly profile of all weather plots - - # Specific figures - #"plot_figII_specific": False, # - #"plot_spatial_weather_var_peak": True # - } + "plot_lad_cross_graphs": True} # Get all folders with scenario run results (name of folder is scenario) scenarios = os.listdir(path_to_folder_with_scenarios) diff --git a/energy_demand/scripts/s_disaggregation.py b/energy_demand/scripts/s_disaggregation.py index 8c2f0849..0a1937d6 100644 --- a/energy_demand/scripts/s_disaggregation.py +++ b/energy_demand/scripts/s_disaggregation.py @@ -3,13 +3,16 @@ import logging import copy from collections import defaultdict +import numpy as np + from energy_demand.profiles import hdd_cdd from energy_demand.basic import testing_functions from energy_demand.basic import lookup_tables from energy_demand.read_write import data_loader from energy_demand.scripts import init_scripts +from energy_demand.technologies import tech_related -def disaggr_demand(data): +def disaggr_demand(data, spatial_calibration=False): """Disaggregated demand Arguments @@ -21,6 +24,9 @@ def disaggr_demand(data): -------- disagg : dict Disaggregated energy demand + spatial_calibration : bool + Criteria wheter base year data should be used to + calibrate spatial disaggregation (non-residential demand) """ disagg = {} @@ -50,6 +56,105 @@ def disaggr_demand(data): data['enduses'], data['service_building_count']) + if spatial_calibration: + '''The spatial disaggregation of non-residential demand + can be calibrated for gas and electricity based on actual + measured demand data + + Note: All other fueltypes are not skaled + ''' + validation_residential = True # Calibrate residential demands + validation_non_residential = True # Calibrate non residential demands + + # Non-residential electricity regional demands of base year for electrictiy and gas + fueltype_elec = tech_related.get_fueltype_int('electricity') + fueltype_gas = tech_related.get_fueltype_int('gas') + + if validation_non_residential: + + valid_non_resid_elec = data_loader.read_national_real_elec_data( + data['paths']['val_subnational_elec_non_residential']) + + valid_non_resid_gas= data_loader.read_national_real_elec_data( + data['paths']['val_subnational_gas_non_residential']) + + # Calculate and apply regional calibration factor + for region in data['regions']: + + # Total modeleld non_residential + service_demand_elec = 0 + service_demand_gas = 0 + for enduse_data in disagg['service'][region].values(): + for sector_data in enduse_data.values(): + service_demand_elec += np.sum(sector_data[fueltype_elec]) + service_demand_gas += np.sum(sector_data[fueltype_gas]) + + industry_demand_elec = 0 + industry_demand_gas = 0 + for enduse_data in disagg['industry'][region].values(): + for sector_data in enduse_data.values(): + industry_demand_elec += np.sum(sector_data[fueltype_elec]) + industry_demand_gas += np.sum(sector_data[fueltype_gas]) + + modelled_elec = service_demand_elec + industry_demand_elec + modelled_gas = service_demand_gas + industry_demand_gas + + # Calculate calibration factor + try: + real_elec = valid_non_resid_elec[region] + f_spatial_calibration_elec = real_elec / modelled_elec + real_gas = valid_non_resid_gas[region] + f_spatial_calibration_gas = real_gas / modelled_gas + except KeyError: + # No real data available + f_spatial_calibration_elec = 1 + f_spatial_calibration_gas = 1 + + # Apply calibration factor to spatial disaggregation + for enduse in disagg['service'][region].keys(): + for sector in disagg['service'][region][enduse]: + disagg['service'][region][enduse][sector][fueltype_elec] *= f_spatial_calibration_elec + disagg['service'][region][enduse][sector][fueltype_gas] *= f_spatial_calibration_gas + for enduse in disagg['industry'][region].keys(): + for sector in disagg['industry'][region][enduse]: + disagg['industry'][region][enduse][sector][fueltype_elec] *= f_spatial_calibration_elec + disagg['industry'][region][enduse][sector][fueltype_gas] *= f_spatial_calibration_gas + + if validation_residential: + + valid_resid_elec = data_loader.read_national_real_elec_data( + data['paths']['val_subnational_elec_residential']) + valid_resid_gas = data_loader.read_national_real_elec_data( + data['paths']['val_subnational_gas_residential']) + + # Calculate and apply regional calibration factor + for region in data['regions']: + + # Total modeleld residential + modelled_elec = 0 + modelled_gas = 0 + for enduse_data in disagg['residential'][region].values(): + modelled_elec += np.sum(enduse_data[fueltype_elec]) + modelled_gas += np.sum(enduse_data[fueltype_gas]) + + # Calculate calibration factor + try: + real_elec = valid_resid_elec[region] + f_spatial_calibration_elec = real_elec / modelled_elec + real_gas = valid_resid_gas[region] + f_spatial_calibration_gas = real_gas / modelled_gas + except KeyError: + # No real data available + f_spatial_calibration_elec = 1 + f_spatial_calibration_gas = 1 + + # Apply calibration factor to spatial disaggregation + for enduse in disagg['residential'][region].keys(): + disagg['residential'][region][enduse][fueltype_elec] *= f_spatial_calibration_elec + disagg['residential'][region][enduse][fueltype_gas] *= f_spatial_calibration_gas + else: + pass + # Sum demand across all sectors for every region disagg['ss_fuel_disagg_sum_all_sectors'] = init_scripts.sum_across_sectors_all_regs( disagg['service']) @@ -493,7 +598,7 @@ def is_disaggregate( tot_pop = 0 tot_pop_hdd = 0 for region in regions: - tot_pop_hdd +=pop_for_disagg[assumptions.base_yr][region] * is_hdd_individ_region[region] + tot_pop_hdd += pop_for_disagg[assumptions.base_yr][region] * is_hdd_individ_region[region] tot_pop += pop_for_disagg[assumptions.base_yr][region] if not census_disagg: diff --git a/energy_demand/scripts/s_post_installation.py b/energy_demand/scripts/s_post_installation.py index 93560863..875b72b8 100644 --- a/energy_demand/scripts/s_post_installation.py +++ b/energy_demand/scripts/s_post_installation.py @@ -70,8 +70,7 @@ def post_install_setup(args): data['local_paths']['path_post_installation_data'], data['local_paths']['load_profiles'], data['local_paths']['rs_load_profile_txt'], - data['local_paths']['ss_load_profile_txt'], - data['local_paths']['dir_disaggregated']] + data['local_paths']['ss_load_profile_txt']] for folder in folders_to_create: basic_functions.create_folder(folder) diff --git a/energy_demand/scripts/s_write_dummy_data.py b/energy_demand/scripts/s_write_dummy_data.py index cf120450..cb0acbd4 100644 --- a/energy_demand/scripts/s_write_dummy_data.py +++ b/energy_demand/scripts/s_write_dummy_data.py @@ -98,7 +98,6 @@ def post_install_setup_minimum(args): basic_functions.create_folder(local_paths['load_profiles']) basic_functions.create_folder(local_paths['rs_load_profile_txt']) basic_functions.create_folder(local_paths['ss_load_profile_txt']) - basic_functions.create_folder(local_paths['dir_disaggregated']) # Load data base_yr = 2015 diff --git a/energy_demand/validation/lad_validation.py b/energy_demand/validation/lad_validation.py index ad93b988..f3a7c32b 100644 --- a/energy_demand/validation/lad_validation.py +++ b/energy_demand/validation/lad_validation.py @@ -133,17 +133,17 @@ def spatial_validation_lad_level( # Spatial validation # ------------------------------------------- subnational_elec = data_loader.read_national_real_elec_data( - paths['path_val_subnational_elec']) + paths['val_subnational_elec']) subnational_elec_residential = data_loader.read_national_real_elec_data( - paths['path_val_subnational_elec_residential']) + paths['val_subnational_elec_residential']) subnational_elec_non_residential = data_loader.read_national_real_elec_data( - paths['path_val_subnational_elec_non_residential']) + paths['val_subnational_elec_non_residential']) subnational_gas = data_loader.read_national_real_gas_data( - paths['path_val_subnational_gas']) + paths['val_subnational_gas']) subnational_gas_residential = data_loader.read_national_real_gas_data( - paths['path_val_subnational_gas_residential']) + paths['val_subnational_gas_residential']) subnational_gas_non_residential = data_loader.read_national_real_gas_data( - paths['path_val_subnational_gas_non_residential']) + paths['val_subnational_gas_non_residential']) logging.info("compare total II {} {}".format( sum(subnational_gas.values()), sum(subnational_gas_residential.values()))) @@ -359,11 +359,11 @@ def temporal_validation_msoa_lad( # LAD level subnational_elec_lad = data_loader.read_national_real_elec_data( - paths['path_val_subnational_elec']) + paths['val_subnational_elec']) # MSOA level subnational_elec_msoa = data_loader.read_elec_data_msoa( - paths['path_val_subnational_msoa_elec']) + paths['val_subnational_msoa_elec']) # Create fueltype secific dict fuel_elec_regs_yh = {} @@ -420,9 +420,9 @@ def spatio_temporal_val( # Spatial validation after calculations # ------------------------------------------- subnational_elec = data_loader.read_national_real_elec_data( - paths['path_val_subnational_elec']) + paths['val_subnational_elec']) subnational_gas = data_loader.read_national_real_gas_data( - paths['path_val_subnational_gas']) + paths['val_subnational_gas']) # Create fueltype secific dict fuel_elec_regs_yh = {} @@ -469,7 +469,7 @@ def spatio_temporal_val( # ------------------------------------------- # Read validation data elec_2015_indo, elec_2015_itsdo = elec_national_data.read_raw_elec_2015( - paths['path_val_nat_elec_data']) + paths['val_nat_elec_data']) f_diff_elec = np.sum(ed_fueltype_national_yh[fueltypes['electricity']]) / np.sum(elec_2015_indo) #logging.debug("... ed diff modellend and real [p] %s: ", (1 - f_diff_elec) * 100)