Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion config/config.default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,7 @@ sector:
sabatier_waste: 200
methanolisation_waste: 200
fallback_ptx_heat_losses: 0.05
ignore_missing_geothermal_data: false
heat_sources:
urban central:
- air
Expand Down Expand Up @@ -1456,7 +1457,7 @@ data:
source: archive
version: latest
lake_data:
source: archive
source: primary
version: latest

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#overpass_api
Expand Down
6 changes: 2 additions & 4 deletions rules/build_sector.smk
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,10 @@ rule build_geothermal_heat_potential:
"heat_source_temperatures",
"geothermal",
),
ignore_missing_regions=config_provider(
ignore_missing_geothermal_data=config_provider(
"sector",
"district_heating",
"limited_heat_sources",
"geothermal",
"ignore_missing_regions",
"ignore_missing_geothermal_data",
),
heat_source_cooling=config_provider(
"sector", "district_heating", "heat_source_cooling"
Expand Down
2 changes: 1 addition & 1 deletion rules/retrieve.smk
Original file line number Diff line number Diff line change
Expand Up @@ -1702,7 +1702,7 @@ if (LAKE_DATA_DATASET := dataset_version("lake_data"))["source"] in [
output:
zip_file=f"{LAKE_DATA_DATASET['folder']}/HydroLAKES_polys_v10.gdb.zip",
lake_data=directory(
f"{LAKE_DATA_DATASET['folder']}/HydroLAKES_polys_v10.gdb"
f"{LAKE_DATA_DATASET['folder']}/HydroLAKES_polys_v10.gdb/HydroLAKES_polys_v10.gdb"
),
run:
copy2(input["zip_file"], output["zip_file"])
Expand Down
8 changes: 4 additions & 4 deletions scripts/build_geothermal_heat_potential.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ def get_heat_source_power(
supply_potentials: gpd.GeoDataFrame,
full_load_hours: float,
input_unit: str,
ignore_missing_data: bool,
output_unit: str = "MWh",
ignore_missing_regions: bool = False,
) -> pd.DataFrame:
"""
Get the heat source power from supply potentials.
Expand Down Expand Up @@ -309,7 +309,7 @@ def get_heat_source_power(

if not non_covered_regions.empty:
if all(non_covered_regions.str.contains("|".join(not_eu_27))):
if ignore_missing_regions:
if ignore_missing_data:
logger.warning(
f"The onshore regions outside EU 27 ({non_covered_regions.to_list()}) have no heat source power. Filling with zeros."
)
Expand All @@ -318,7 +318,7 @@ def get_heat_source_power(
)
else:
raise ValueError(
f"The onshore regions outside EU 27 {non_covered_regions.to_list()} have no heat source power. Set the ignore_missing_regions parameter in the config to true if you want to include these countries in your analysis despite missing geothermal data."
f"The onshore regions outside EU 27 {non_covered_regions.to_list()} have no heat source power. Set the ignore_missing_geothermal_data parameter in the config to true if you want to include these countries in your analysis despite missing geothermal data."
)
else:
raise ValueError(
Expand Down Expand Up @@ -390,7 +390,7 @@ def get_heat_source_power(
supply_potentials=geothermal_supply_potentials,
full_load_hours=FULL_LOAD_HOURS,
input_unit=input_unit,
ignore_missing_regions=snakemake.params.ignore_missing_regions,
ignore_missing_data=snakemake.params.ignore_missing_geothermal_data,
)

# Load temperature profiles for scaling
Expand Down
5 changes: 5 additions & 0 deletions scripts/lib/validation/config/sector.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ class _DistrictHeatingConfig(ConfigModel):
0.05,
description="Default heat loss fraction for PtX processes when waste heat recovery is enabled but no specific loss value is provided.",
)
ignore_missing_geothermal_data: bool = Field(
False,
description="If true, missing geothermal data for non-EU countries will be ignored. If false, an error will be raised if countries with missing data are modelled while geothermal heat is included as a heat source.",
)

heat_source_temperatures: dict[str, float] = Field(
default_factory=lambda: {
"geothermal": 65,
Expand Down