diff --git a/workflow/scripts/osemosys_global/storage/main.py b/workflow/scripts/osemosys_global/storage/main.py index 3dbba73f..f0a27b61 100644 --- a/workflow/scripts/osemosys_global/storage/main.py +++ b/workflow/scripts/osemosys_global/storage/main.py @@ -96,11 +96,11 @@ def main( max_cap_invest_storage = max_cap_invest_base.copy() tech_set = tech_set_base.copy() storage_set = pd.DataFrame(columns=["VALUE"]) - tech_to_storage = pd.DataFrame(columns=["REGION","TECHNOLOGY","STORAGE","MODE_OF_OPERATION"]) - tech_from_storage = pd.DataFrame(columns=["REGION","TECHNOLOGY","STORAGE","MODE_OF_OPERATION"]) + tech_to_storage = pd.DataFrame(columns=["REGION","TECHNOLOGY","STORAGE","MODE_OF_OPERATION", "VALUE"]) + tech_from_storage = pd.DataFrame(columns=["REGION","TECHNOLOGY","STORAGE","MODE_OF_OPERATION", "VALUE"]) res_cap = res_cap_base.copy() - res_cap_storage = pd.DataFrame(columns=["REGION", "STORAGE", "YEAR"]) - storage_level_start = pd.DataFrame(columns=["REGION", "STORAGE"]) + res_cap_storage = pd.DataFrame(columns=["REGION", "STORAGE", "YEAR", "VALUE"]) + storage_level_start = pd.DataFrame(columns=["REGION", "STORAGE", "VALUE"]) tech_capacity_sto = None else: @@ -312,7 +312,10 @@ def main( # SET INPUT DATA - sto_techs = list(storage_parameters.keys()) + if storage_parameters: + sto_techs = list(storage_parameters.keys()) + else: + sto_techs = None build_rates = import_storage_build_rates(file_storage_build_rates) diff --git a/workflow/scripts/osemosys_global/summary/carbon_intensity.py b/workflow/scripts/osemosys_global/summary/carbon_intensity.py index e2ec7648..cb9cbf09 100644 --- a/workflow/scripts/osemosys_global/summary/carbon_intensity.py +++ b/workflow/scripts/osemosys_global/summary/carbon_intensity.py @@ -75,7 +75,10 @@ def calculate_emission_intensity( save = "results/India/results/AnnualEmissionIntensity.csv" storage = {"SDS": [], "LDS": []} - exclusions = list(storage) + if storage: + exclusions = list(storage) + else: + exclusions = [] production = pd.read_csv(production_csv, index_col=[0, 1, 2, 3, 4]) annual_emissions = pd.read_csv(annual_emissions_csv, index_col=[0, 1, 2]) diff --git a/workflow/scripts/osemosys_global/summary/gen_shares.py b/workflow/scripts/osemosys_global/summary/gen_shares.py index 6c5093f1..1b8e9a0b 100644 --- a/workflow/scripts/osemosys_global/summary/gen_shares.py +++ b/workflow/scripts/osemosys_global/summary/gen_shares.py @@ -149,7 +149,10 @@ def calc_generation_shares_country( production_by_technology_annual_csv, index_col=[0, 1, 2, 3] ) - exclusions = list(storage) + if storage: + exclusions = list(storage) + else: + exclusions = [] nodes = calc_generation_shares_node(production_by_technology_annual, exclusions) country = calc_generation_shares_country( diff --git a/workflow/scripts/osemosys_global/summary/headline.py b/workflow/scripts/osemosys_global/summary/headline.py index e5995e20..e4bb8101 100644 --- a/workflow/scripts/osemosys_global/summary/headline.py +++ b/workflow/scripts/osemosys_global/summary/headline.py @@ -126,7 +126,11 @@ def get_gen_shares( ) total_discounted_cost = pd.read_csv(total_discounted_cost_csv, index_col=[0, 1]) demand = pd.read_csv(demand_csv, index_col=[0, 1, 2, 3]) - exclusions = list(storage) + + if storage: + exclusions = list(storage) + else: + exclusions = [] dfs = []