Skip to content

Commit

Permalink
Merge pull request #390 from calliope-project/feature-hot-water
Browse files Browse the repository at this point in the history
Separate hot water and space heating demand profiles
  • Loading branch information
brynpickering committed Jun 9, 2024
2 parents 82b5ed5 + 0312f6b commit 5de87bc
Show file tree
Hide file tree
Showing 6 changed files with 230 additions and 125 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

* **ADD** Spatial resolution that aligns with the regions defined by the [e-Highway 2050 project](https://cordis.europa.eu/project/id/308908/reporting) (`ehighways`) (#370).

* **ADD** fully-electrified heat demand (#284).
* **ADD** fully-electrified heat demand (#284, #343, #390, #391).

* **ADD** fully-electrified road transportation (#270, #271, #358). A parameter allows to define the share of uncontrolled (timeseries) vs controlled charging (optimised) by the solver (#338). Data for controlled charging constraints is readily available (#356), but corresponding constraints are not yet implemented (#385).

Expand Down
3 changes: 1 addition & 2 deletions config/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ data-sources:
swiss-industry-energy-balance: https://www.bfe.admin.ch/bfe/en/home/versorgung/statistik-und-geodaten/energiestatistiken/teilstatistiken.exturl.html/aHR0cHM6Ly9wdWJkYi5iZmUuYWRtaW4uY2gvZGUvcHVibGljYX/Rpb24vZG93bmxvYWQvODc4OA==.html
controlled-ev-profiles: https://zenodo.org/record/6579421/files/ramp-ev-{dataset}.csv.gz?download=1
uncontrolled-ev-profiles: https://sandbox.zenodo.org/records/45530/files/uncontrolled-charging-profiles.csv.gz?download=1 # TODO: convert into Zenodo repository
gridded-temperature-data: https://zenodo.org/records/6557643/files/temperature.nc?download=1
gridded-10m-windspeed-data: https://zenodo.org/records/6557643/files/wind10m.nc?download=1
gridded-weather-data: https://zenodo.org/records/11516744/files/{data_var}.nc
when2heat-params: https://zenodo.org/records/10965295/files/{dataset}?download=1
population: https://ec.europa.eu/eurostat/cache/GISCO/geodatafiles/JRC_GRID_2018.zip
data-pre-processing:
Expand Down
10 changes: 3 additions & 7 deletions config/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,10 @@ properties:
type: string
pattern: ^(https?|http?):\/\/.+
description: Web address of electric light-duty vehicle uncontrolled charging.
gridded-temperature-data:
gridded-weather-data:
type: string
pattern: ^(https?|http?):\/\/.+
description: "Web address of gridded temperature data. Expecting a netCDF file with the coordinates [time, site], and the variables [temperature, lat, lon]."
gridded-10m-windspeed-data:
type: string
pattern: ^(https?|http?):\/\/.+
description: "Web address of gridded 10m wind speed data. Expecting a netCDF file with the coordinates [time, site], and the variables [temperature, lat, lon]."
pattern: ^(https?|http?):\/\/.+{data_var}.*\.(nc)$
description: "Web address of gridded weather data. Expecting a netCDF file with the coordinates [time, site], the variables [{data_var}, lat, lon], and the attribute 'unit'."
when2heat-params:
type: string
pattern: ^(https?|http?):\/\/.+
Expand Down
31 changes: 12 additions & 19 deletions rules/heat.smk
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
rule download_gridded_temperature_data:
message: "Download gridded temperature data"
params: url = config["data-sources"]["gridded-temperature-data"]
output: protected("data/automatic/gridded-weather/temperature.nc")
conda: "../envs/shell.yaml"
localrule: True
shell: "curl -sSLo {output} '{params.url}'"


rule download_gridded_10m_windspeed_data:
message: "Download gridded 10m wind speed data"
params: url = config["data-sources"]["gridded-10m-windspeed-data"]
output: protected("data/automatic/gridded-weather/wind10m.nc")
rule download_gridded_weather_data:
message: "Download gridded {wildcards.data_var} data"
params: url = lambda wildcards: config["data-sources"]["gridded-weather-data"].format(data_var=wildcards.data_var)
output: protected("data/automatic/gridded-weather/{data_var}.nc")
conda: "../envs/shell.yaml"
localrule: True
shell: "curl -sSLo {output} '{params.url}'"
Expand Down Expand Up @@ -87,10 +78,11 @@ use rule create_heat_demand_timeseries as create_heat_demand_timeseries_historic
output:
"build/models/{resolution}/timeseries/demand/heat-demand-historic-electrification.csv",


rule population_per_weather_gridbox:
message: "Get {wildcards.resolution} population information per weather data gridbox"
input:
wind_speed = rules.download_gridded_10m_windspeed_data.output[0],
weather_grid = "data/automatic/gridded-weather/grid.nc",
population = rules.raw_population_unzipped.output[0],
locations = rules.units.output[0]
params:
Expand All @@ -103,14 +95,15 @@ rule population_per_weather_gridbox:

rule unscaled_heat_profiles:
message: "Generate gridded heat demand profile shapes for {wildcards.year} from weather and population data"

input:
population = rules.population_per_weather_gridbox.output[0],
wind_speed = rules.download_gridded_10m_windspeed_data.output[0],
temperature = rules.download_gridded_temperature_data.output[0],
wind_speed = "data/automatic/gridded-weather/wind10m.nc",
temperature = "data/automatic/gridded-weather/temperature.nc",
when2heat = rules.download_when2heat_params.output[0]
params:
lat_name = "lat",
lon_name = "lon",
first_year = config["scope"]["temporal"]["first-year"],
final_year = config["scope"]["temporal"]["final-year"],
conda: "../envs/default.yaml"
output: "build/data/{resolution}/gridded_hourly_unscaled_heat_demand_{year}.nc"
output: "build/data/{resolution}/hourly_unscaled_heat_demand.nc"
script: "../scripts/heat/unscaled_heat_profiles.py"
2 changes: 1 addition & 1 deletion scripts/heat/population_per_gridbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def population_on_weather_grid(
population_on_weather_grid(
path_to_population=snakemake.input.population,
path_to_locations=snakemake.input.locations,
path_to_coordinates=snakemake.input.wind_speed,
path_to_coordinates=snakemake.input.weather_grid,
lat_name=snakemake.params.lat_name,
lon_name=snakemake.params.lon_name,
out_path=snakemake.output[0],
Expand Down
Loading

0 comments on commit 5de87bc

Please sign in to comment.