update mocksnakemake for testing

This commit is contained in:
lisazeyen 2020-10-20 09:34:45 +02:00
parent 4e6c323ac3
commit 2b9ac511b5

View File

@ -1736,7 +1736,7 @@ def remove_h2_network(n):
capital_cost=h2_capital_cost) capital_cost=h2_capital_cost)
#%%
if __name__ == "__main__": if __name__ == "__main__":
# Detect running outside of snakemake and mock snakemake for testing # Detect running outside of snakemake and mock snakemake for testing
if 'snakemake' not in globals(): if 'snakemake' not in globals():
@ -1746,25 +1746,42 @@ if __name__ == "__main__":
opts='', planning_horizons='2020', opts='', planning_horizons='2020',
co2_budget_name='go', co2_budget_name='go',
sector_opts='Co2L0-168H-T-H-B-I-solar3-dist1'), sector_opts='Co2L0-168H-T-H-B-I-solar3-dist1'),
input=dict(network='pypsa-eur/networks/{network}_s{simpl}_{clusters}_ec_lv{lv}_{opts}.nc', input=dict(
timezone_mappings='pypsa-eur-sec/data/timezone_mappings.csv', network='../pypsa-eur/networks/{network}_s{simpl}_{clusters}_ec_lv{lv}_{opts}.nc',
co2_budget='pypsa-eur-sec/data/co2_budget.csv', energy_totals_name='resources/energy_totals.csv',
clustered_pop_layout='pypsa-eur-sec/resources/pop_layout_{network}_s{simpl}_{clusters}.csv', co2_totals_name='resources/co2_totals.csv',
costs='technology-data/outputs/costs_{planning_horizons}.csv', transport_name='resources/transport_data.csv',
profile_offwind_ac='pypsa-eur/resources/profile_offwind-ac.nc', biomass_potentials='resources/biomass_potentials.csv',
profile_offwind_dc='pypsa-eur/resources/profile_offwind-dc.nc', timezone_mappings='data/timezone_mappings.csv',
clustermaps="pypsa-eur/resources/clustermaps_{network}_s{simpl}_{clusters}.h5", heat_profile="data/heat_load_profile_BDEW.csv",
cop_air_total='pypsa-eur-sec/resources/cop_air_total_{network}_s{simpl}_{clusters}.nc', costs="../technology-data/outputs/costs_{planning_horizons}.csv",
cop_soil_total='pypsa-eur-sec/resources/cop_soil_total_{network}_s{simpl}_{clusters}.nc', h2_cavern = "data/hydrogen_salt_cavern_potentials.csv",
solar_thermal_total='pypsa-eur-sec/resources/solar_thermal_total_{network}_s{simpl}_{clusters}.nc', co2_budget="data/co2_budget.csv",
energy_totals_name='pypsa-eur-sec/data/energy_totals.csv', profile_offwind_ac="../pypsa-eur/resources/profile_offwind-ac.nc",
heat_demand_total='pypsa-eur-sec/resources/heat_demand_total_{network}_s{simpl}_{clusters}.nc', profile_offwind_dc="../pypsa-eur/resources/profile_offwind-dc.nc",
heat_profile='pypsa-eur-sec/data/heat_load_profile_BDEW.csv', clustermaps='../pypsa-eur/resources/clustermaps_{network}_s{simpl}_{clusters}.h5',
transport_name='pypsa-eur-sec/data/transport_data.csv', clustered_pop_layout="resources/pop_layout_{network}_s{simpl}_{clusters}.csv",
temp_air_total='pypsa-eur-sec/resources/temp_air_total_{network}_s{simpl}_{clusters}.nc', simplified_pop_layout="resources/pop_layout_{network}_s{simpl}.csv",
co2_totals_name='pypsa-eur-sec/data/co2_totals.csv', industrial_demand="resources/industrial_energy_demand_{network}_s{simpl}_{clusters}.csv",
biomass_potentials='pypsa-eur-sec/data/biomass_potentials.csv', heat_demand_urban="resources/heat_demand_urban_{network}_s{simpl}_{clusters}.nc",
industrial_demand='pypsa-eur-sec/resources/industrial_demand_{network}_s{simpl}_{clusters}.csv',), heat_demand_rural="resources/heat_demand_rural_{network}_s{simpl}_{clusters}.nc",
heat_demand_total="resources/heat_demand_total_{network}_s{simpl}_{clusters}.nc",
temp_soil_total="resources/temp_soil_total_{network}_s{simpl}_{clusters}.nc",
temp_soil_rural="resources/temp_soil_rural_{network}_s{simpl}_{clusters}.nc",
temp_soil_urban="resources/temp_soil_urban_{network}_s{simpl}_{clusters}.nc",
temp_air_total="resources/temp_air_total_{network}_s{simpl}_{clusters}.nc",
temp_air_rural="resources/temp_air_rural_{network}_s{simpl}_{clusters}.nc",
temp_air_urban="resources/temp_air_urban_{network}_s{simpl}_{clusters}.nc",
cop_soil_total="resources/cop_soil_total_{network}_s{simpl}_{clusters}.nc",
cop_soil_rural="resources/cop_soil_rural_{network}_s{simpl}_{clusters}.nc",
cop_soil_urban="resources/cop_soil_urban_{network}_s{simpl}_{clusters}.nc",
cop_air_total="resources/cop_air_total_{network}_s{simpl}_{clusters}.nc",
cop_air_rural="resources/cop_air_rural_{network}_s{simpl}_{clusters}.nc",
cop_air_urban="resources/cop_air_urban_{network}_s{simpl}_{clusters}.nc",
solar_thermal_total="resources/solar_thermal_total_{network}_s{simpl}_{clusters}.nc",
solar_thermal_urban="resources/solar_thermal_urban_{network}_s{simpl}_{clusters}.nc",
solar_thermal_rural="resources/solar_thermal_rural_{network}_s{simpl}_{clusters}.nc",
),
output=['pypsa-eur-sec/results/test/prenetworks/{network}_s{simpl}_{clusters}_lv{lv}__{sector_opts}_{co2_budget_name}_{planning_horizons}.nc'] output=['pypsa-eur-sec/results/test/prenetworks/{network}_s{simpl}_{clusters}_lv{lv}__{sector_opts}_{co2_budget_name}_{planning_horizons}.nc']
) )
import yaml import yaml