Commit Graph

609 Commits

Author SHA1 Message Date
martavp
0f3d74ff8f
Merge branch 'PyPSA:master' into master 2021-07-05 11:44:08 +02:00
martavp
82e9a48b74 Add oil consumed in shipping as a load to EU oil bus 2021-07-05 11:29:02 +02:00
Fabian Neumann
ad3da28117 small follow-up to merge 2021-07-03 13:03:47 +02:00
Fabian Neumann
b2872cc6b0
Cherry-pick from #137 (#142)
* Update config.default.yaml

Some people find it counterintuitive that battery and H2 storage are not kept from PyPSA-Eur. An explicit mention can help here.

* Update installation.rst

We only use one config.yaml file

* Add an arrow from biomass to carbon dioxide.

This signals that we also have BECCS in the model.

Co-authored-by: martavp <martavictoriaperez@gmail.com>
2021-07-03 12:59:09 +02:00
Fabian Neumann
732046dba0 merge master 2021-07-03 12:46:09 +02:00
Fabian Neumann
81b009e062 minor code cleaning 2021-07-02 15:08:06 +02:00
Fabian Neumann
89eccd4f70 merge master 2021-07-02 15:00:19 +02:00
Fabian Neumann
fd1121af4a add rule for build_biomass_transport_costs 2021-07-02 11:07:35 +02:00
Fabian Neumann
e97c4dd3c0 merge master 2021-07-02 10:12:43 +02:00
Fabian Neumann
4ebbd294ec apply suggestions from code review 2021-07-02 09:34:24 +02:00
Fabian Neumann
fa8f7887f9
Update scripts/prepare_sector_network.py 2021-07-02 09:31:41 +02:00
Fabian Neumann
de46177e1a Merge branch 'master' of github.com:PyPSA/pypsa-eur-sec 2021-07-01 20:22:20 +02:00
Fabian Neumann
a967faf0f9 doc: release notes format 2021-07-01 20:22:08 +02:00
lisazeyen
ca685a10af
add home battery storage and inverter costs (#99)
* add home battery storage and inverter costs

* Update prepare_sector_network.py

* add release note

Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
2021-07-01 20:16:12 +02:00
Fabian Neumann
1fc1d2a17d
Revision complete (#139)
* ammonia_production: minor cleaning and move into __main__ (#106)

* biomass_potentials: code cleaning and automatic country index inferral (#107)

* Revision: build energy totals (#111)

* blacken

* energy_totals: preliminaries

* energy_totals: update build_swiss

* energy_totals: update build_eurostat

* energy_totals: update build_idees

* energy_totals: update build_energy_totals

* energy_totals: update build_eea_co2

* energy_totals: update build_eurostat_co2

* energy_totals: update build_co2_totals

* energy_totals: update build_transport_data

* energy_totals: add tqdm progressbar to idees

* energy_totals: adjust __main__ section

* energy_totals: handle inputs via Snakefile and config

* energy_totals: handle data and emissions year via config

* energy_totals: fix reading in eurostat for different years

* energy_totals: fix erroneous drop duplicates
This caused problems for waste management in HU and SI

* energy_totals: make scope selection of CO2 or GHG a config option

* Revision: build industrial production per country (#114)

* industry-ppc: format

* industry-ppc: rewrite for performance

* industry-ppc: move reference year to config

* industry-ppct: tidy up and format (#115)

* remove stale industry demand rules (#116)

* industry-epc: rewrite for performance (#117)

* Revision: industrial distribution key (#118)

* industry-distribution: first tidying

* industry-distribution: first tidying

* industry-distribution: fix syntax

* Revision: industrial energy demand per node today (#119)

* industry-epn: minor code cleaning

* industry-epn: remove accidental artifact

* industry-epn: remove accidental artifact II

* industry-ppn: code cleaning (#120)

* minor code cleaning (#121)

* Revision: industry sector ratios (#122)

* sector-ratios: basic reformatting

* sector-ratios: add new read_excel function that filters year already

* sector-ratios: rename jrc to idees

* sector-ratios: rename conv_factor to toe_to_MWh

* sector-ratios: modularise into functions

* Move overriding of component attributes to function and into data (#123)

* move overriding of component attributes to central function and store in separate folder

* fix return of helper.override_component_attrs

* prepare: fix accidental syntax error

* override_component_attrs: bugfix that aligns with pypsa components

* Revision: build population layout (#108)

* population_layouts: move inside __main__ and blacken

* population_layouts: misc code cleaning and multiprocessing

* population_layouts: fix fill_values assignment of urban fractions

* population_layouts: bugfig for UK-GB naming ambiguity

* population_layouts: sort countries alphabetically for better overview

* config: change path to atlite cutout

* Revision: build clustered population layouts (#112)

* population_layouts: move inside __main__ and blacken

* population_layouts: misc code cleaning and multiprocessing

* population_layouts: fix fill_values assignment of urban fractions

* population_layouts: bugfig for UK-GB naming ambiguity

* population_layouts: sort countries alphabetically for better overview

* cl_pop_layout: blacken

* cl_pop_layout: turn GeoDataFrame into GeoSeries + code cleaning

* cl_pop_layout: add fraction column which is repeatedly calculated downstream

* Revision: build various heating-related time series (#113)

* population_layouts: move inside __main__ and blacken

* population_layouts: misc code cleaning and multiprocessing

* population_layouts: fix fill_values assignment of urban fractions

* population_layouts: bugfig for UK-GB naming ambiguity

* population_layouts: sort countries alphabetically for better overview

* cl_pop_layout: blacken

* cl_pop_layout: turn GeoDataFrame into GeoSeries + code cleaning

* gitignore: add .vscode

* heating_profiles: update to new atlite and move into __main__

* heating_profiles: remove extra cutout

* heating_profiles: load regions with .buffer(0) and remove clean_invalid_geometries

* heating_profiles: load regions with .buffer(0) before squeeze()

* heating_profiles: account for transpose of dataarray

* heating_profiles: account for transpose of dataarray in add_exiting_baseyear

* Reduce verbosity of Snakefile (2) (#128)

* tidy Snakefile light

* Snakefile: fix indents

* Snakefile: add missing RDIR

* tidy config by removing quotes and expanding lists (#109)

* bugfix: reorder squeeze() and buffer()

* plot/summary: cosmetic changes including: (#131)

- matplotlibrc for default style and backend
- remove unused config options
- option to configure geomap colors
- option to configure geomap bounds

* solve: align with pypsa-eur using ilopf (#129)

* tidy myopic code scripts (#132)

* use mock_snakemake from pypsa-eur (#133)

* Snakefile: add benchmark files to each rule

* Snakefile: only run build_retro_cost if endogenously optimised

* Snakefile: remove old {network} wildcard constraints

* WIP: Revision: prepare_sector_network (#124)

* population_layouts: move inside __main__ and blacken

* population_layouts: misc code cleaning and multiprocessing

* population_layouts: fix fill_values assignment of urban fractions

* population_layouts: bugfig for UK-GB naming ambiguity

* population_layouts: sort countries alphabetically for better overview

* cl_pop_layout: blacken

* cl_pop_layout: turn GeoDataFrame into GeoSeries + code cleaning

* move overriding of component attributes to central function and store in separate folder

* prepare: sort imports and remove six dependency

* prepare: remove add_emission_prices

* prepare: remove unused set_line_s_max_pu
This is a function from prepare_network

* prepare: remove unused set_line_volume_limit
This is a PyPSA-Eur function from prepare_network

* prepare: tidy add_co2limit

* remove six dependency

* prepare: tidy code first batch

* prepare: extend override_component_attrs to avoid hacky madd

* prepare: remove hacky madd() for individual components

* prepare: tidy shift function

* prepare: nodes and countries from n.buses not pop_layout

* prepare: tidy loading of pop_layout

* prepare: fix prepare_costs function

* prepare: optimise loading of traffic data

* prepare: move localizer into generate_periodic profiles

* prepare: some formatting of transport data

* prepare: eliminate some code duplication

* prepare: fix remove_h2_network
- only try to remove EU H2 store if it exists
- remove readding nodal Stores because they are never removed

* prepare: move cost adjustment to own function

* prepare: fix a syntax error

* prepare: add investment_year to get() assuming global variable

* prepare: move co2_totals out of prepare_data()

* Snakefile: remove unused prepare_sector_network inputs

* prepare: move limit p/s_nom of lines/links into function

* prepare: tidy add_co2limit file handling

* Snakefile: fix tabs

* override_component_attrs: add n/a defaults

* README: Add network picture to make scope clear

* README: Fix date of preprint (was too optimistic...)

* prepare: move some more config options to config.yaml

* prepare: runtime bugfixes

* fix benchmark path

* adjust plot ylims

* add unit attribute to bus, correct cement capture efficiency

* bugfix: land usage constrained missed inplace operation

Co-authored-by: Tom Brown <tom@nworbmot.org>

* add release notes

* remove old fix_branches() function

* deps: make geopy optional, remove unused imports

* increase default BarConvTol

* get ready for upcoming PyPSA release

* re-remove ** bug

* amend release notes

Co-authored-by: Tom Brown <tom@nworbmot.org>
2021-07-01 20:09:04 +02:00
Tom Brown
96711aab39
doc: Create 0.0.x versions for old PyPSA-Eur-Sec-30(-Path)
This is for easier identification of models in the IPCC AR6 model
registration.
2021-06-27 14:42:44 +02:00
lisazeyen
e7b55d034e modify constraint for pipe retrofitting according to H2 backbone strategy 2021-06-23 14:55:21 +02:00
lisazeyen
e2d23949bb add different colors for new and retrofitted H2 pipes 2021-06-23 14:54:33 +02:00
lisazeyen
8f58218080 recalculate pipe capacity based on the pipe diameter 2021-06-23 14:53:54 +02:00
lisazeyen
01d5b50561 add switch for retroftting existing CH4 pipes to H2 pipes, modify tech colors 2021-06-21 12:39:22 +02:00
lisazeyen
97f041e82c adjust summary and plot functions 2021-06-21 12:36:40 +02:00
lisazeyen
c963d356f7 add existing methane pipe lines and option to H2 retrofitting, update to new atlite version 2021-06-21 12:36:06 +02:00
lisazeyen
447c2119a6 add constraint for retrofitting existing gas pipes to H2 pipes 2021-06-21 12:34:47 +02:00
lisazeyen
17a1153648 comment functions, remove not used input 2021-06-21 12:34:08 +02:00
lisazeyen
e4dad6429d update for atlite version 0.2.4 2021-06-21 07:59:57 +02:00
lisazeyen
c5b3551687 fix spelling mistake 2021-06-18 09:45:51 +02:00
lisazeyen
4d913c9a93 split EU gas, EU biogas and EU gas for industry into gas bus for each cluster 2021-06-18 09:45:29 +02:00
lisazeyen
dbec103593 add mock_snakemake from pypsa-eur 2021-06-18 09:41:18 +02:00
martavp
0a92d23698 Make transformation of Steel and Aluminum production depends on year
Previously, the transformation of the Steel and Aluminum production was assumed to occur overnight.
This commit enables the definition of a transformation path via the config.yaml file.
This requires adding the {planning_horizon} to the input and output file name of the following rules:
build_industrial_production_per_country_tomorrow
build_industrial_production_per_node
build_industry_energy_demand_per_node
prepare_sector_network
2021-06-17 16:13:05 +02:00
martavp
a57135b086 Split colours for H2 in Industry and H2 in shipping when plotting balances.
When plotting the balance for H2, the rename dictionary merges all the demands containing H2.
This commit disables such merging and keeps different colours for H2 in shipping and H2 in industry. This is useful when one wants to look at the H2 balance and have an overview of where the H2 is consumed in the model.
2021-06-17 15:12:10 +02:00
lisazeyen
6cde3c2b57 add mock_snakemake function to pypsa-eur-sec 2021-06-17 09:36:36 +02:00
lisazeyen
feefaa3d41 Merge branch 'master' into retrofit-gas-pipelines 2021-06-17 06:38:47 +02:00
martavp
e2354c18ac Add fictitious load to account for non-transformed shipping emissions
The share of shipping demand that is transformed is defined now for different years to be used with the myopic code.
The carbon emission from the remaining share is treated as a negative load on the atmospheric carbon dioxide bus, just like aviation and land transport emissions.
2021-06-16 17:52:42 +02:00
martavp
12257eeb3e Update .gitignore 2021-06-15 09:26:56 +02:00
martavp
228ccf611e Merge branch 'PyPSA:master' into master 2021-06-15 09:18:11 +02:00
lisazeyen
846f57fde6 add script for biomass transport costs. Converts JRC-EU-Times transport cost' 2021-06-11 14:36:56 +02:00
Tom Brown
e542efd552 README: Fix date of preprint (was too optimistic...) 2021-06-01 17:42:14 +02:00
Tom Brown
4bc5d94d42 README: Add network picture to make scope clear 2021-06-01 17:36:59 +02:00
Fabian Neumann
32365312da
retro: fix renaming u_values subsectors and btype (#127)
by not looping the .replace() across all columns of the dataframe.

Circumvents: TypeError: Cannot compare types 'ndarray(dtype=float64)' and 'str'
2021-05-25 15:51:38 +02:00
Fabian Neumann
bea8194b7b
prepare: add costs for biogas upgrading (#126)
Co-authored-by: lisazeyen <lisa.zeyen@web.de>

Co-authored-by: lisazeyen <lisa.zeyen@web.de>
2021-05-25 09:42:01 +02:00
lisazeyen
0e3d21f5a4
add EU oil bus already when adding land transport to be able to run the model without industry and avoid warning of missing bus. Add a check for scaling down total electricity demand to avoid warning of invalid value in double_scalar (#100) 2021-05-25 09:03:02 +02:00
Leon
e367f8ae11
Fix error when running without the industry sector (#96)
Fixing that the code stops with an error if running without the industry sector, e.g. only including electricity and heat. When the industry sector is not included, balances_df.index.levels[0] does not include "process emissions". Using the XOR operator "^" does then add it instead of removing it when compared to the co2_carriers list. The XOR operator does only work as intended, i.e. excluding the three emission-related strings, when these strings are already in the original list. The proposed change fixes the issue.
2021-05-24 22:11:24 +02:00
Tom Brown
1ede513990 doc: Fix badge link for doc and clarifications in release notes 2021-05-21 13:40:22 +02:00
Tom Brown
5952f7a8c7 Merge branch 'master' of github.com:PyPSA/pypsa-eur-sec 2021-05-21 12:38:28 +02:00
Tom Brown
e4848d603d PyPSA-Eur-Sec Version 0.5.0
See the release notes:

https://pypsa-eur-sec.readthedocs.io/en/latest/release_notes.html#pypsa-eur-sec-0-5-0-21st-may-2021
2021-05-21 12:37:02 +02:00
Fabian Neumann
555002a35b fixup: remove remaining instances of {network} wildcard from recent PR 2021-05-19 13:57:44 +02:00
lisazeyen
33f7f5026e Merge branch 'master' into retrofit-gas-pipelines 2021-05-12 15:20:49 +02:00
Tom Brown
c87b45a763
Merge pull request #97 from PyPSA/retro-updated
Retro updated
2021-04-30 18:13:23 +02:00
Tom Brown
8bfb1490c1
Merge branch 'master' into retro-updated 2021-04-30 18:12:20 +02:00
Tom Brown
3a5c47b2e5 doc: Link new retrofitting section from the release notes 2021-04-30 18:05:17 +02:00