only compute solar thermal profiles if technology is included

This commit is contained in:
Fabian Neumann 2022-12-28 12:48:51 +01:00
parent d37ffddd4f
commit 138d151c8b
2 changed files with 7 additions and 6 deletions

View File

@ -500,9 +500,9 @@ rule prepare_sector_network:
cop_air_total="resources/cop_air_total_elec_s{simpl}_{clusters}.nc", cop_air_total="resources/cop_air_total_elec_s{simpl}_{clusters}.nc",
cop_air_rural="resources/cop_air_rural_elec_s{simpl}_{clusters}.nc", cop_air_rural="resources/cop_air_rural_elec_s{simpl}_{clusters}.nc",
cop_air_urban="resources/cop_air_urban_elec_s{simpl}_{clusters}.nc", cop_air_urban="resources/cop_air_urban_elec_s{simpl}_{clusters}.nc",
solar_thermal_total="resources/solar_thermal_total_elec_s{simpl}_{clusters}.nc", solar_thermal_total="resources/solar_thermal_total_elec_s{simpl}_{clusters}.nc" if config["sector"]["solar_thermal"] else [],
solar_thermal_urban="resources/solar_thermal_urban_elec_s{simpl}_{clusters}.nc", solar_thermal_urban="resources/solar_thermal_urban_elec_s{simpl}_{clusters}.nc" if config["sector"]["solar_thermal"] else [],
solar_thermal_rural="resources/solar_thermal_rural_elec_s{simpl}_{clusters}.nc", solar_thermal_rural="resources/solar_thermal_rural_elec_s{simpl}_{clusters}.nc" if config["sector"]["solar_thermal"] else [],
**build_retro_cost_output, **build_retro_cost_output,
**build_biomass_transport_costs_output, **build_biomass_transport_costs_output,
**gas_infrastructure **gas_infrastructure

View File

@ -1452,9 +1452,10 @@ def add_heat(n, costs):
"ground": xr.open_dataarray(snakemake.input.cop_soil_total).to_pandas().reindex(index=n.snapshots) "ground": xr.open_dataarray(snakemake.input.cop_soil_total).to_pandas().reindex(index=n.snapshots)
} }
solar_thermal = xr.open_dataarray(snakemake.input.solar_thermal_total).to_pandas().reindex(index=n.snapshots) if options["solar_thermal"]:
# 1e3 converts from W/m^2 to MW/(1000m^2) = kW/m^2 solar_thermal = xr.open_dataarray(snakemake.input.solar_thermal_total).to_pandas().reindex(index=n.snapshots)
solar_thermal = options['solar_cf_correction'] * solar_thermal / 1e3 # 1e3 converts from W/m^2 to MW/(1000m^2) = kW/m^2
solar_thermal = options['solar_cf_correction'] * solar_thermal / 1e3
for name in heat_systems: for name in heat_systems: