Commit Graph

163 Commits

Author SHA1 Message Date
Fabian Neumann
2bee36be87 follow-up to #891: remove remaining solar+p3 references 2024-01-24 10:17:26 +01:00
Fabian Neumann
9865a97089 apply automated formatting 2024-01-22 09:29:32 +01:00
Fabian Neumann
2183e742b2 add release notes, minor code improvements 2024-01-22 09:18:26 +01:00
Tom Brown
d98ad95332 move building of distribution of existing heating to own script
This makes the distribution of existing heating to urban/rural,
residential/services and spatially more transparent.
2024-01-22 08:01:31 +01:00
Fabian
b1d21813af fix import order 2024-01-19 12:17:45 +01:00
Fabian Neumann
8316861722 Merge branch 'master' into fneum/ariadne 2024-01-04 09:54:27 +01:00
Fabian Neumann
c3bb41c900 Merge branch 'master' into multiyear 2024-01-03 15:14:27 +01:00
pre-commit-ci[bot]
e3ba0e50a7 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-12-08 09:35:15 +00:00
Thomas Gilon
1352f6c30e Fix nodal fraction with distributed generators 2023-12-08 10:32:35 +01:00
chrstphtrs
e2b2eafbc1 add geographical resolution to oil and methanol for options['co2_budget_national'] to include all necessary links in national co2 budget constraints 2023-10-24 16:46:58 +02:00
Fabian Neumann
7884392326
Merge pull request #748 from PyPSA/follow-up-637
follow-up to #637: remove duplicate code and update tsam version
2023-10-18 10:27:29 +02:00
Fabian Neumann
b8fee80919 Merge branch 'master' into multiyear 2023-10-08 11:55:11 +02:00
pre-commit-ci[bot]
f054180a62 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-10-08 09:20:59 +00:00
Sourcery AI
3c36c60bdd 'Refactored by Sourcery' 2023-10-08 09:20:36 +00:00
Fabian Neumann
679d09c170 follow-up to #637: remove duplicate code and update tsam version 2023-10-08 11:10:09 +02:00
pre-commit-ci[bot]
bdaa646ed6 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-08-30 10:05:18 +00:00
lisazeyen
9ec7442c69 merge master 2023-08-30 12:03:49 +02:00
lisazeyen
4cd492bb6f drop assets which reached end of lifetime 2023-08-28 13:52:55 +02:00
pre-commit-ci[bot]
b8dee184a9 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-08-24 09:12:07 +00:00
lisazeyen
60b1968eb0 check for missing buses 2023-08-23 13:27:40 +02:00
Fabian Neumann
e12cad2789 simplify if-else expression 2023-08-22 14:42:21 +02:00
Fabian Neumann
33305f9761 Merge branch 'feature/myopic_existing_baseyear_fix' of github.com:daniel-rdt/pypsa-eur into daniel-rdt-feature/myopic_existing_baseyear_fix 2023-08-22 14:39:50 +02:00
pre-commit-ci[bot]
7c00f9d451 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-07-28 13:14:42 +00:00
daniel.rdt
407037a799 fix in add_heating_capacities_installed_before_baseyear to account for case when there is no rural heating demand for some nodes in network 2023-07-28 15:09:13 +02:00
Fabian Neumann
ddd1840981 Merge remote-tracking branch 'origin/master' into multiyear 2023-07-26 10:23:32 +02:00
Fabian Neumann
d17430d000
Merge branch 'master' into multilinks-default 2023-07-26 08:48:21 +02:00
pre-commit-ci[bot]
74be5261fc [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-07-26 05:24:33 +00:00
Fabian Neumann
7575dd0351 handling of natural gas in add_existing_baseyear and add_electricity 2023-07-26 07:24:12 +02:00
Fabian Neumann
b110810669 no more override_component_attrs for multilinks 2023-07-13 22:31:55 +02:00
Fabian Hofmann
ab0963540f
Merge branch 'master' into complete-carrier-set 2023-06-21 09:53:19 +02:00
Fabian
1d10073514 review params implementation; reproduce objective values in CI 2023-06-15 18:52:25 +02:00
virio-andreyana
e581ca930c made params more specific 2023-05-27 15:50:37 +02:00
virio-andreyana
8208ac033b
convert param back to config for "logging" and "run", made "enable" more specific 2023-05-17 18:43:30 +02:00
virio-andreyana
1fc48d8753
using python algorithm to edit rules and script 2023-05-15 10:33:17 +02:00
Fabian
4e8bbd67b4 use sanitize_carriers to harmonize carrier adjustments 2023-05-03 13:24:57 +02:00
Fabian Neumann
6acd5da4d4 Merge branch 'multiyear-sec' into multiyear 2023-04-29 18:49:49 +02:00
virio-andreyana
72b75fd9fe
merge add_nice_carrier_names with add_missing_carrier to become add_missing_carrier_with_nice_names(n, config) 2023-04-28 03:43:20 +02:00
pre-commit-ci[bot]
74e9d56adb [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-04-25 15:26:28 +00:00
virio-andreyana
56b6718ba6
Update add_existing_baseyear.py 2023-04-25 17:04:28 +02:00
Fabian
5c8e0080c8 pre-commit: update docformatter version 2023-04-21 10:11:44 +02:00
pre-commit-ci[bot]
460bbd080f [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-04-10 22:02:35 +00:00
pre-commit-ci[bot]
ce6df71399 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-03-09 11:48:04 +00:00
Fabian Neumann
abe4df543e add minimal description of all scripts 2023-03-09 12:45:43 +01:00
Fabian Neumann
8f5775d9cc Merge branch 'merge-pypsa-eur-sec' into sec-subset-countries 2023-03-09 11:28:07 +01:00
Fabian Neumann
22846d7b1b sector-coupled: run on subset of selected countries 2023-03-09 11:04:41 +01:00
pre-commit-ci[bot]
f128cc3e3c [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-03-09 07:36:43 +00:00
Fabian Neumann
483f3e1b82 eliminate manual country code conversion, adjust mock_snakemake to ll wildcard 2023-03-09 08:36:18 +01:00
Fabian
5cf2b8174a scripts: apply linting fixes 2023-03-07 17:21:00 +01:00
Fabian Neumann
541b83b049 merge helper.py into _helpers.py 2023-03-06 19:16:37 +01:00
Fabian Neumann
3bdf3b6f5e use mock_snakemake from pypsa-eur 2023-03-06 19:09:45 +01:00
Fabian Neumann
93d9e13f52 add spdx identifiers to scripts 2023-03-06 18:49:23 +01:00
pre-commit-ci[bot]
b7c58883b7 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-03-06 16:19:25 +00:00
Fabian Neumann
76d57731ec fix all lv references to ll, pickup right location of default lifetime 2023-03-06 17:18:07 +01:00
Fabian Neumann
d27fee7e77 align cost fill values to pypsa-eur implementation 2023-03-06 14:47:46 +01:00
Fabian Neumann
b30ff67458 remove unneeded currency conversion USD to EUR 2023-03-06 14:38:04 +01:00
Fabian Neumann
ee5a0c4e73 conform to pypsa-eur logging level definition 2023-03-06 14:27:15 +01:00
pre-commit-ci[bot]
13769f90af [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-03-06 08:27:46 +00:00
Fabian Neumann
6d98edb320
Merge pull request #314 from PyPSA/loggin-replace-print
Replacing print statement with logging
2023-03-05 15:07:10 +01:00
virio-andreyana
379ed0da93 Sentence capitalized 2023-02-24 14:42:51 +01:00
virio-andreyana
d237e60b25 Replacing print statement with logging 2023-02-23 10:30:32 +01:00
lisazeyen
332936bcec adjust p_nom_max if existing larger 2023-02-22 17:44:05 +01:00
Fabian Neumann
b14d657042 minor fixes and address deprecation warnings 2023-02-16 20:13:26 +01:00
Fabian Neumann
4a2da0a5f4
Update scripts/add_existing_baseyear.py 2023-01-30 11:55:40 +01:00
Fabian Neumann
6996748d9b
Merge branch 'master' into cluster_heat_nodes 2023-01-30 11:53:00 +01:00
lisazeyen
5b256bfa5d take VOM for RES from existing 2022-11-28 16:56:42 +01:00
Fabian
df4eb85a19 fix typos 2022-11-18 09:08:07 +01:00
lisazeyen
3daff49c99
Merge pull request #256 from PyPSA/fix-bug-myopic-co2
Fix bug myopic co2
2022-08-09 21:33:31 +02:00
lisazeyen
b42e76040d small clean up 2022-08-09 21:30:45 +02:00
Irieo
1920c2bae1 temporary fix of DateIn and DateOut 2022-08-09 15:30:58 +02:00
lisazeyen
2994c91173 add bioenergy to add_existing 2022-08-08 15:28:04 +02:00
lisazeyen
58b018e624 drop powerplants which are already decommissioned 2022-08-08 13:52:41 +02:00
lisazeyen
7c3b4b6664 split grouping years for power and heat techs 2022-08-02 09:18:06 +02:00
Fabian Neumann
2857691367
Merge pull request #246 from PyPSA/meta
store config and wildcards in n.meta
2022-08-01 21:01:06 +02:00
lisazeyen
cbab86c4bc add heat buses clustering to myopic 2022-08-01 18:15:35 +02:00
lisazeyen
18f4eac351 adjust script to new grouping years 2022-08-01 15:24:07 +02:00
Fabian Neumann
cb00ba58ce add option to specify any config through sector opts with CF:<label>:...:value 2022-07-20 11:35:12 +02:00
Fabian Neumann
b96207c73e store config and wildcards in n.meta 2022-06-30 08:42:18 +02:00
Fabian Neumann
fa66c50dc1 merge master 2022-06-15 09:29:19 +02:00
Fabian Neumann
d4a82a2a41
Merge pull request #217 from PyPSA/myopic-fix
Myopic fix
2022-04-12 14:47:22 +02:00
Fabian Neumann
1625d9db75
address recent deprecations (#235)
* address recent deprecations

* address recent deprecations in pd.read_csv
2022-04-12 14:37:05 +02:00
lisazeyen
03fca360ff style improvement 2022-03-21 09:14:15 +01:00
lisazeyen
71a8bc6c96 use define spatial for all conventionals, add lifetime for H2 storage 2022-03-18 13:46:40 +01:00
lisazeyen
cfb5a797cb start to extend define_spatial for conventional carriers 2022-03-18 10:22:00 +01:00
lisazeyen
aed81940b3
add_existing_baseyear.py: Style improvement
Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
2022-03-17 18:15:14 +01:00
Fabian Neumann
df285a001e merge master 2022-02-18 11:25:38 +01:00
lisazeyen
030bf96d32 update mocksnakemake 2022-01-07 12:45:33 +01:00
lisazeyen
c9ce9190a7 adjust to spatital resolved gas nodes 2022-01-07 12:40:17 +01:00
lisazeyen
b5aa4234ef adjust capital cost of existing renewables to consider e.g. electricity grid connection costs as well 2022-01-07 12:09:02 +01:00
lisazeyen
953e1c883e adjust functions to new default lifetime np.inf instead of previous NaN 2022-01-07 11:38:25 +01:00
lisazeyen
372473d76c update mocksnakemake 2022-01-07 11:32:31 +01:00
Fabian Neumann
ff6d736a89
Merge branch 'master' into myopic-low-clustering-gens 2021-09-30 14:51:45 +02:00
lisazeyen
28264aa114
Small fixes (#167)
* update mocksnakemake for testing

* remove trailing whitespace in n.loads index

* add missing color for H2 liquification

* adjust to default lifetime 0 instead of NaN
2021-09-27 11:16:12 +02:00
Fabian Neumann
195cabba0c merge master 2021-07-06 09:55:41 +02:00
martavp
103ad49671 Enable use of lower generators clustering than network clustering 2021-07-05 12:19:43 +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
Fabian Neumann
a156d44f28
remove unused {network} wildcard (#104) 2021-04-29 16:52:35 +02:00
martavp
b7b7407756 Adapt nomenclature from "YearCommissioned" to "DataIn"
This was breaking add_existing_baseyear.py and it is now fixed. Column name for commissioning year in powerplantmatching has changed. Now "DataIn" is used as column name, also when renewable capacities per country are added to the power plants dataframe
2021-01-12 10:46:30 +01:00
Tom Brown
17bf0dfbb1 prepare_costs: use default lifetime from config.yaml
Rather than hard-coding 25 years.
2020-11-30 17:01:14 +01:00
Fabian Neumann
4fef5616e8 scripts: change mock snakemake defaults 2020-11-10 09:48:13 +01:00
eb5194
5dabdac288 add_existing_baseyear: read input file as .csv 2020-10-02 12:21:31 +02:00