-
Notifications
You must be signed in to change notification settings - Fork 297
feat: add river-water and sea-water sourced heat pumps #1618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
… calculations as outputs
…to add-water-sourced-heat-pumps
for more information, see https://pre-commit.ci
…to add-water-sourced-heat-pumps
for more information, see https://pre-commit.ci
…to add-water-sourced-heat-pumps
for more information, see https://pre-commit.ci
…asets to surpress warnings
…to add-water-sourced-heat-pumps
for more information, see https://pre-commit.ci
…ure dataset with source and licensing information
for more information, see https://pre-commit.ci
…r and clarify data source requirements
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR integrates river-water and sea-water sourced heat pumps into the workflow by adding new data retrieval, processing, and visualization steps.
- Introduces retrieval and preprocessing of HERA river discharge/ambient temperature and Copernicus seawater temperature data
- Adds Snakemake rules and scripts to compute heat potentials, COP profiles, and interactive heat source maps
- Updates environment files, default/test configurations, and documentation to register the new heat sources
Reviewed Changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 7 comments.
Show a summary per file
File | Description |
---|---|
scripts/build_cop_profiles/BaseCopApproximator.py | Renamed the COP approximation method and added a cop property |
scripts/build_ambient_air_temperature_yearly_average.py | New script computing yearly average ambient air temperature rasters |
rules/retrieve.smk | Added rules to download HERA and seawater temperature datasets |
rules/postprocess.smk | Added plotting rules for heat source maps and COP profiles |
rules/build_sector.smk | Added rules for building river/sea water heat potentials |
envs/*-pinned.yaml & envs/environment.yaml | Pinned/copied copernicusmarine dependency across environments |
doc/data-bundle.rst & doc/data-retrieval.rst | Documented Copernicus data source and retrieval instructions |
doc/configtables/sector.csv | Updated limited_heat_sources schema for river water |
doc/release_notes.rst | Announced support for river-water and sea-water heat pumps |
config/*.yaml | Enabled new heat pump sources and interactive bus-balance plotting |
Snakefile | Registered new plotting and COP profile targets in the default rule |
Comments suppressed due to low confidence (2)
config/plotting.default.yaml:1315
- [nitpick] Key uses an underscore (
river_water
) whereas other heat-pump keys use spaces (e.g.air heat pump
). Consider renaming tourban central river water heat pump
for consistency.
urban central river_water heat pump: '#184861'
Snakefile:194
- Removing
default_target: True
from theall
rule may prevent Snakemake from building new targets by default. Ensure the default target remains correctly specified.
- default_target: True
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements river-water and sea-water sourced heat pumps by adding data retrieval, potential computation, and plotting support.
- Introduces retrieval rules for HERA river data and Copernicus sea-water temperatures
- Adds scripts and Snakemake rules to compute ambient air, river, and sea heat potentials
- Updates configuration and documentation to enable new heat pump sources and plotting
Reviewed Changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
scripts/build_cop_profiles/BaseCopApproximator.py | Renames COP approximation method and enforces COP ≥ 1 |
scripts/build_ambient_air_temperature_yearly_average.py | New script to compute yearly average onshore air temperatures |
rules/retrieve.smk | Adds seawater_temperature and retrieve_hera_data rules |
rules/build_sector.smk | Adds build_river_heat_potential and build_sea_heat_potential |
envs/*-pinned.yaml & envs/environment.yaml | Pins copernicusmarine dependency in all environments |
config/config.default.yaml & plotting.default.yaml | Enables new heat pump sources and interactive plotting defaults |
doc/data-bundle.rst & doc/configtables/sector.csv | Documents the new sea- and river-water data bundle and config |
doc/release_notes.rst | Notes support for river-water and sea-water heat pumps |
Comments suppressed due to low confidence (2)
config/plotting.default.yaml:1315
- [nitpick] Legend keys elsewhere use space-separated names (e.g.,
sea water heat pump
). Renameriver_water
toriver water
for consistency.
urban central river_water heat pump: '#184861'
scripts/build_cop_profiles/BaseCopApproximator.py:76
- Renaming
approximate_cop
to_approximate_cop
will break subclasses still overridingapproximate_cop
. Either update all subclass methods or retain the public abstract name and call it internally.
def _approximate_cop(self) -> Union[xr.DataArray, np.array]:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for river‐water and sea‐water sourced heat pumps by integrating new data retrieval rules, processing routines, and configuration options. Key changes include:
- New functions to process and map river discharge, ambient, and seawater temperature data.
- Updates to configuration files and plotting routines to incorporate the new heat pump source types.
- Adjustments to dependency files and release notes to document the added features.
Reviewed Changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
scripts/build_cop_profiles/BaseCopApproximator.py | Added a cop property with a cleaner API for approximating COP values. |
scripts/build_ambient_air_temperature_yearly_average.py | New script to compute yearly average ambient air temperature with geographic masking. |
rules/retrieve.smk | Introduced new rules to retrieve seawater and HERA data. |
rules/postprocess.smk | Added a rule for plotting heat source maps. |
rules/build_sector.smk | Added rules for computing river and sea water heat potentials and updated heat source temperature input handling. |
envs/, doc/, Snakefile, config/* | Updated dependencies, documentation, configuration, and workflow definitions to support the new heat pump configurations. |
Comments suppressed due to low confidence (1)
Snakefile:92
- [nitpick] Consider refactoring the repeated lambda-based expand calls into a dedicated function or rule to improve readability and reduce duplication in the Snakefile.
expand( RESULTS + "graphs/cop_profiles_s_{clusters}_{planning_horizons}.html", ... )
…rmance calculation
…in replace_names and adjust resource references
for more information, see https://pre-commit.ci
…naming conventions and output formatting
The failing CI is a little odd: |
Closes # (if applicable).
Changes proposed in this Pull Request
This PR adds potential river-water and sea-water sourced heat pumps based on the implementations by @MajaHIC, @juboerms and @felix-land:
plotting:interactive_bus_balance:bus_name_pattern
), defaults toNone
Open TODOs
Checklist
envs/environment.yaml
.config/config.default.yaml
.doc/configtables/*.csv
.doc/data_sources.rst
.doc/release_notes.rst
is added.To be tracked in separate issues
Testing
Note: I've made these test runs with sea-water heat pump investment costs set to those of air-sourced heat pumps (fixed now but the results have not been re-computed).
Test config
Results
District heat balances
Sea-water heat pumps are built extensively, river-water heat pumps only sparingly. This is expected, due to unlimited sea-water use and river-water heat pump investment costs likely being overestimated.

Example of COP plot
Example of heat source plot
(river water temperature)
