Commit Graph

1203 Commits

Author SHA1 Message Date
Fabian
c68aa028ff add_electricity: fix missing config key 2022-06-10 00:36:07 +02:00
Fabian Hofmann
12bed0745d
Merge branch 'master' into eu-energy-security 2022-06-09 23:41:48 +02:00
Fabian
f45803ff10 add_electricity: fix missing backwards compat and warnings 2022-06-09 23:40:32 +02:00
Fabian
76cd0751b4 Merge branch 'eu-energy-security' of github.com:PyPSA/pypsa-eur into eu-energy-security 2022-06-09 20:36:35 +02:00
Fabian
0ec3a8638b add_electricity & config:
- refactor attachment of conventional carriers
  - refactor scaling of renewable carriers
2022-06-09 20:31:50 +02:00
zoltanmaric
1a7b439f2d Remove usages of retrieve_snakemake_keys 2022-06-08 17:32:33 +02:00
martacki
cd92d8092b plot_summary: remove deprecated retrieve_snakemake_keys function 2022-06-08 15:49:06 +02:00
Fabian Neumann
a2f39abee2
Merge branch 'master' into voronoi 2022-06-07 15:23:30 +02:00
Fabian
8b855f0478 add_elecitricity: scale only missing renewable capacities from OPSD 2022-06-07 15:17:49 +02:00
Fabian Hofmann
bdd094d796
Update scripts/build_bus_regions.py 2022-06-07 15:01:40 +02:00
Fabian Hofmann
97fbf77ff8
Update scripts/build_bus_regions.py 2022-06-07 15:01:18 +02:00
Fabian Hofmann
aa867cb704
Update scripts/build_bus_regions.py
Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
2022-06-07 15:00:57 +02:00
Fabian Neumann
d5db3b8d80
Update scripts/build_bus_regions.py
Co-authored-by: Fabian Hofmann <fab.hof@gmx.de>
2022-06-07 10:57:01 +02:00
Fabian Hofmann
619b471f72
Merge branch 'master' into eu-energy-security 2022-06-07 10:05:11 +02:00
Fabian Neumann
b025622edf fix agriculture machinery oil load with spatial.oil.nodes 2022-06-03 14:29:23 +02:00
Max Parzen
b6032fb891 fix crs bug 2022-05-28 14:48:32 +01:00
lisazeyen
dc997c6ff2
Update build_population_weighted_energy_totals.py
adjust mocksnakemake
2022-05-02 18:19:59 +02:00
Fabian Neumann
361100bfab Merge branch 'master' into transport 2022-05-02 10:28:43 +02:00
martacki
2e4c30e28e abbreviate 2022-04-29 15:18:22 +02:00
martacki
8a49697a51 bugfixes for manual load adjustments 2022-04-29 15:09:10 +02:00
martacki
ac7c94337e respect stores for supply.csv 2022-04-29 13:51:54 +02:00
martacki
d12405d848 respect stores for energy_supply.csv 2022-04-29 13:48:58 +02:00
martacki
dcac3ea6e1 respect stores in make_summary script 2022-04-28 12:59:25 +02:00
Fabian Neumann
49f1c0f629
Merge pull request #348 from PyPSA/annuity
add_electricity: remove vresutils.costdata.annuity dependency
2022-04-15 18:36:37 +02:00
Fabian Neumann
cdd56288ff fix EU bus location with new config setting 2022-04-12 16:21:09 +02:00
Fabian Neumann
c5ca8f4c20 fix: squeeze IDEES dataframe at correct location 2022-04-12 16:11:06 +02:00
Fabian Neumann
c54b4f9920 copy_config: copy actual snakemake.config 2022-04-12 15:16:05 +02:00
Fabian Neumann
d4fd472762
Merge branch 'master' into transport 2022-04-12 14:48:57 +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
408b494612 bug fix with augmentation object 2022-04-12 10:45:11 +02:00
lisazeyen
9322f90318 add minimum capacity for AC and DC lines depending on previous year 2022-04-12 10:04:27 +02:00
lisazeyen
cfdec7e56d simplify pipe retrofitting constraint 2022-04-12 10:04:27 +02:00
Fabian Neumann
a4dab4306b merge master 2022-04-11 17:10:17 +02:00
Fabian Neumann
6ed92475c9
Add basic CI for overnight and myopic (#234)
* Snakefile: add missing folders that are retrieved

* Snakefile: fix syntax error

* Add basic CI

* fix datafiles list to work with directories

* prepare: only add new gas pipes if augmentation not empty

* prepare: handle case where salt caverns dataframe is empty

* prepare: handle case where underwater faction not in link columns

* build_biomass: handle case where Balkan not in country list

* refer correct environment path

* fix Snakemake call

* make subworkflow dependency explicit again

* hashing pypsa-eur environment file does not seem to work

* change solver to glpk

* add data cache

* glpk without options

* try cbc

* alternative snakemake test workflow

* test: add exogenous pathways to config
2022-04-11 17:08:25 +02:00
Fabian Neumann
a3d6e296e8
Merge branch 'master' into eu-energy-security 2022-04-08 19:56:26 +02:00
Fabian Neumann
4712bfc893 fix nuclear EAF processing code 2022-04-08 19:55:40 +02:00
Fabian Neumann
8af21f3355 Merge remote-tracking branch 'origin/eu-energy-security' into results-dir 2022-04-08 15:46:37 +02:00
euronion
c412a61013
Add country-specific EAF restriction for NPPs. (#361)
* Add country-specific EAF restriction for NPPs.

Based on historic figures from IAEA.

* Update release_notes.rst
2022-04-08 15:41:23 +02:00
Fabian Neumann
6aefcee030 Merge branch 'eu-energy-security' into results-dir 2022-04-08 15:28:57 +02:00
Fabian
40425a7767 build powerplants: use map_country bus function for bus attachement 2022-04-08 15:25:05 +02:00
Fabian Neumann
50ca0d0ddc Merge branch 'eu-energy-security' into results-dir 2022-04-08 14:51:10 +02:00
Fabian
65790cd065 build_powerplants: remove non-assigned ppls 2022-04-08 14:34:52 +02:00
Fabian
d53487f822 build_powerplants: fix duplicated names per bus 2022-04-08 14:23:33 +02:00
Fabian Neumann
40c882f0e9 solve: allow to parse load shedding cost in config 2022-04-08 13:19:25 +02:00
Fabian Neumann
4a18d59789 Merge branch 'eu-energy-security' into results-dir 2022-04-08 12:34:11 +02:00
Fabian
e37a3f57ab adjust biomass capacities 2022-04-08 12:23:24 +02:00
Fabian Neumann
2403650be2 prepare: allow varying emission prices in opts wc: e.g. Ep80.5 2022-04-08 10:27:55 +02:00
Fabian Neumann
02c06017d3 prepare: add gas consumption limit through wildcard: CH4L 2022-04-08 10:27:23 +02:00
Fabian Neumann
bd75953674 add logging to co2limit2 2022-04-08 10:26:38 +02:00
Fabian Neumann
f9ede37a02 allow varying marginal cost of carrier in opts wc: CCGT+m2.0 2022-04-08 10:26:16 +02:00
Fabian Neumann
630fb9783f fix to operational reserve margin to work without any extendable gens 2022-04-07 17:20:56 +02:00
Fabian Neumann
84e146834c Apply suggestion from code review to add switch 2022-04-07 15:22:10 +02:00
Fabian Neumann
3678e5c523 Add operational reserve margin constraint analogous to GenX
Co-authored-by: FabianHofmann <hofmann@fias.uni-frankfurt.de>
2022-04-07 14:39:34 +02:00
Fabian Neumann
4862dcf865
Merge pull request #357 from PyPSA/hvdc-links
Hvdc links
2022-04-05 17:13:15 +02:00
Fabian Neumann
bfcc20aa13
Revert "update TYNDP links which are already built" 2022-04-05 17:10:12 +02:00
Fabian Neumann
51dffbefa3 add gas usage limit constraint 2022-04-05 16:59:51 +02:00
Fabian Neumann
9812e64e82 resolve cherry merge conflict 2 2022-04-05 16:34:02 +02:00
Fabian Neumann
7a52b6bc45 resolve cherry merge conflict 1 2022-04-05 16:22:31 +02:00
Fabian Neumann
aa6e98a563 label built TYNDP links as not under_construction 2022-04-05 16:11:02 +02:00
Fabian Neumann
eca4a017db implement TYNDP link overriding for link_id not oid 2022-04-05 16:07:30 +02:00
Fabian
1fd6a685ab powerplants: filter out powerplants with shut down date < 2021 2022-04-05 15:12:01 +02:00
Fabian
f878faac73 add_electricity: allow estimate_renewable_capacities to be commented out 2022-04-05 08:02:44 +02:00
Fabian Neumann
cb9730118b
Merge branch 'eu-energy-security' into renewable-caps 2022-04-04 19:04:44 +02:00
Fabian Neumann
ade22bf4f0 add existing wind and solar capacities based on IRENASTATS 2022-04-04 19:03:09 +02:00
Fabian
7bc9b8012c powerplants: update to ppm >= v0.5.1 2022-04-04 18:07:48 +02:00
Fabian Neumann
95d5d8f889 prepare: move build_heat_demand closer to add_heat 2022-04-03 18:55:53 +02:00
Fabian Neumann
b112da0565 prepare: separate code for transport demand and nodal energy totals 2022-04-03 18:49:35 +02:00
Fabian Neumann
a7e407944c
Merge branch 'master' into issue-301 2022-03-29 09:24:40 +02:00
Fabian Neumann
621520a7b2
Merge branch 'master' into rm-raster-natura 2022-03-29 09:18:43 +02:00
Fabian Neumann
a4132919a0
Merge branch 'master' into voronoi 2022-03-29 09:08:35 +02:00
Fabian Neumann
a05881479c build_bus_regions: move voronoi partition from vresutils to script 2022-03-28 15:17:55 +02:00
Seth
c37171b01d feedback code review (opts argument and unpacking) 2022-03-28 13:42:55 +02:00
Seth
e45c7a65ff
Apply suggestions from Martha's code review
Co-authored-by: Martha Frysztacki <martha.frysztacki@kit.edu>
2022-03-28 12:10:51 +02:00
Fabian Neumann
7fee2944d8
Merge branch 'master' into rm-raster-natura 2022-03-28 12:07:33 +02:00
Seth
3c5212826e
Merge branch 'PyPSA:master' into fix-plotnetworkrule 2022-03-28 11:54:47 +02:00
Fabian Neumann
03e6764a9d
Merge branch 'master' into issue-301 2022-03-25 13:46:46 +01:00
Fabian Neumann
c54ddab4a3 remove unused simple_hvdc_costs 2022-03-24 14:47:00 +01:00
Fabian Neumann
1a82b87587 skip iterations if no lines are expandable 2022-03-24 14:30:28 +01:00
Fabian Neumann
7f6a00cfce
Merge branch 'master' into rm-raster-natura 2022-03-24 14:19:14 +01:00
martacki
7f29c31abe .copy() shortcut 2022-03-24 13:17:01 +01:00
martacki
8cb4c17930 unify vre treatment for hac clustering for simplify_network and cluster_network 2022-03-22 16:53:05 +01:00
lisazeyen
03fca360ff style improvement 2022-03-21 09:14:15 +01:00
Fabian Neumann
7ba1f26eb8 must read NATURA shape before add_geometry 2022-03-20 20:56:38 +01:00
Fabian Neumann
5a7c0d7967 remove build/retrieve natura raster, directly use shapefile 2022-03-20 10:03:17 +01:00
Fabian Neumann
ca94709ed3 use snakemake.threads in build_renewable_profiles 2022-03-20 09:50:38 +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
08cef37e7e improve code style 2022-03-18 10:22:00 +01:00
lisazeyen
5502943301
scripts/solve_network.py: Style improvement
Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
2022-03-17 18:15:59 +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
Martha Frysztacki
69c0341145
Merge branch 'master' into introduce_hac_clustering 2022-03-17 17:40:46 +01:00
martacki
4c1c5e3a4e suggestions by coroa and fneum 2022-03-17 17:38:30 +01:00
Fabian
1f788e0d5b cluster_network: replace np.sum/np.min by pandas.Series.sum/min 2022-03-16 16:16:15 +01:00
Seth
0384b4ff83 fix the plot_network snakemake rule 2022-03-10 13:55:53 +01:00
Martha Frysztacki
3e07fdfd54
Merge branch 'master' into introduce_hac_clustering 2022-03-07 11:44:29 +01:00
martacki
3fa8f91e73 make_summary followup on snakemake dependencies removal 2022-03-04 16:29:47 +01:00
Fabian
d16f24fc07 follow up 2022-03-03 23:08:29 +01:00
Fabian
8700f63cdb solve_network: fix load shedding attributes 2022-03-03 18:13:54 +01:00
martacki
b63271f12f release_notes, old format of base_network with updated docstrings 2022-03-03 17:16:23 +01:00
Martha Frysztacki
49cd51f463
Merge branch 'master' into update-entsoe-gridextract 2022-03-03 16:38:06 +01:00
Fabian
752ff28538 cluster_network.py: allow cluster wildcard to be 'all' 2022-03-02 14:43:04 +01:00
Fabian Neumann
8dafb7bc83
fix custom clustering by checking explicitly for series (#318) 2022-02-27 08:07:11 +01:00
Fabian Neumann
c754f253bc plotting adjustments for pypsa 0.19.1 2022-02-20 16:13:11 +01:00
Fabian Neumann
4b1360c3f0 do not aggregate rooftop and solar PV in plots 2022-02-20 15:59:51 +01:00
Martha Frysztacki
6b6191734c
Merge branch 'master' into update-entsoe-gridextract 2022-02-16 21:41:28 +01:00
Koen van Greevenbroek
f7ee47238a Fix random state for kmean clustering
When the kmeans algorithm is used to cluster networks, this is not
deterministic by default. The result is that repeated runs of the
`simplify_network` and `cluster_network` rules can and usually do
produce different results that vary somewhat randomly. This makes
results less reproducible when given only a pypsa-eur configuration
file.

The fix is to supply a fixed random state to the k-means algorithm.
2022-02-10 15:57:16 +01:00
martacki
82a0338e9f treatment of outliers and small feature-bugfix 2022-02-04 20:27:18 +01:00
martacki
b5dbf4eb32 overwrite country of isolated buses 2022-02-04 17:19:23 +01:00
martacki
256ac48b47 resolve merging master bugs 2022-02-04 16:45:00 +01:00
Martha Frysztacki
25b3245923
Merge branch 'master' into introduce_hac_clustering 2022-02-04 14:35:14 +01:00
Fabian Neumann
3323f34896 bugfix: also plot h2 corridors where no retrofit 2022-02-04 12:26:58 +01:00
Fabian Neumann
835bfc0f6a bugfix: access right config variables in build renewable profiles 2022-02-01 08:51:47 +01:00
Martha Frysztacki
ff29fda618
Merge branch 'master' into update-entsoe-gridextract 2022-01-31 17:08:56 +01:00
martacki
296fb021cf join skagerrak link 2022-01-31 16:09:42 +01:00
Fabian Neumann
09f1135b51 address pandas 1.4 deprectations 2022-01-29 16:17:46 +01:00
Fabian Neumann
c8c1c3c46e revert ea96d499e7 2022-01-29 15:02:49 +01:00
Martha Frysztacki
9ae8baf71d
Merge branch 'master' into update-entsoe-gridextract 2022-01-28 15:12:36 +01:00
Fabian Neumann
b6cfcf6364 bugfix: mock_snakemake configfiles 2022-01-25 12:57:04 +01:00
Fabian Neumann
1bcbb1ed19 Merge branch 'master' of github.com:pypsa/pypsa-eur-sec 2022-01-25 12:56:08 +01:00
Fabian Neumann
4e3314acd8 bugfix: remove also retrofitted H2 network 2022-01-25 12:55:57 +01:00
martacki
6cdf3a2879 use snakemake keywords directly without extracting them beforehand 2022-01-24 19:48:26 +01:00
Martha Frysztacki
c45691d305
Merge branch 'master' into snakemake_dependencies_in_functions 2022-01-24 19:15:06 +01:00
martacki
c4be81eb5e simplify_network: remove snakemake dependencies 2022-01-24 19:13:48 +01:00
Tim Pedersen
0d7ad643bc
Resolved error whith /tmp (#224) 2022-01-24 14:34:54 +01:00
Fabian Neumann
c273eb7f2c plot_network: legends, EqualEarth projection, w/wo retrofit compatibility 2022-01-23 14:20:18 +01:00
martacki
61a4108e60 update parameter_corrections for updated entsoe gridextract 2022-01-21 17:37:18 +01:00
Qui-Rin
9f0515105b
build_load_data: Removed underscore in pattern
When using the transparency option the pattern used as a filter is created with a double underscore -> removed underscore in '_transparency'
2022-01-14 19:02:44 +01:00
martacki
dc83fd8e09 fix small bugs 2022-01-14 15:13:44 +01:00
martacki
0da77a7600 remove snakemake dependencies in plot_summary 2022-01-14 13:44:33 +01:00
martacki
f28a088ea3 arguments in function calls instead of kwarg-style 2022-01-14 11:30:15 +01:00
martacki
8cb5bd27d5 make_summary: remove snakemake dependencies 2022-01-14 11:29:01 +01:00
Martha Frysztacki
7067d924cc
Merge branch 'master' into snakemake_dependencies_in_functions 2022-01-14 11:05:54 +01:00
martacki
deac9f32e7 move snakemake keys (input, output, config, ...) to own variables 2022-01-14 11:05:15 +01:00
Fabian Neumann
72e277a007
update environment and address deprecations (#291)
* update environment and address deprecations

* check pandas<1.3

* limit snakemake due to ascii encoding error, address review comments

* remove version restriction on snakemake
2022-01-14 07:43:21 +00:00
martacki
9b7bb27da1 snakemake dependencies in base_network 2022-01-13 18:54:27 +01:00
martacki
505f093141 fix ordering of kwargs in add_co2limit 2022-01-13 18:00:22 +01:00
Fabian Hofmann
94364cbeeb
Update scripts/cluster_network.py
Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
2022-01-11 10:31:49 +01:00
Fabian
281700751a Merge branch 'snakemake_dependencies_in_functions' of github.com:PyPSA/pypsa-eur into snakemake_dependencies_in_functions 2022-01-11 10:28:11 +01:00
Fabian
ed7fd27adc build_shapes: use country_list as argument 2022-01-11 10:24:45 +01:00
Fabian
c7a443c969 build_shapes: revise changes 2022-01-11 10:23:22 +01:00
Martha Frysztacki
418ce4be28
Merge branch 'master' into snakemake_dependencies_in_functions 2022-01-11 10:03:32 +01:00
Fabian
d1334c1670 Merge branch 'snakemake_dependencies_in_functions' of github.com:PyPSA/pypsa-eur into snakemake_dependencies_in_functions 2022-01-11 10:00:55 +01:00
Fabian
39a6753ece build_powerplants: revise changes 2022-01-11 09:59:58 +01:00
Fabian
01e93545f6 add_extra_components: revise changes 2022-01-11 09:59:34 +01:00
Fabian
acd7122aad add_electricity: revert changes in add_nice_carrier_names 2022-01-11 09:58:59 +01:00
Fabian Hofmann
2c318a247e
Update scripts/prepare_network.py
Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
2022-01-11 09:55:22 +01:00
Fabian
66f2d36f0d add_electricity: revise code and make it leaner 2022-01-11 09:38:34 +01:00
lisazeyen
c40904a727 adjust h2_plot function to work with myopic, since build year is now in links.index 2022-01-07 16:59:48 +01:00
lisazeyen
9f8b54a3ce adjust pipe retrofitting constraint to work with myopic 2022-01-07 16:59:14 +01:00
lisazeyen
5b30f0ece6 avoid doubling of the existing natural gas grid 2022-01-07 16:53:37 +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
7535a0d385
update data bundle (#216) 2022-01-06 10:29:59 +01:00
Max Parzen
6249a9b558
Merge branch 'PyPSA:master' into master 2021-12-23 12:35:10 +01:00
Philipp Glaum
ed83988ed1 hot fix for snakemake bug 2021-12-15 11:02:03 +01:00
martacki
6c4ea69e95 clustering: own config for clustering settings 2021-12-10 17:53:40 +01:00
Fabian Neumann
d1762919c5
add option 'seqXXX' to sweep global co2 sequestration potentials (#208)
* add option 'seqXXX' to sweep global co2 sequestration potentials

* add release notes
2021-12-10 12:05:38 +01:00
Fabian Neumann
82096f92e8
fix for GlobalConstraints mu with "co2_sequestration_limit" (#211)
* fix for GlobalConstraints mu with co2_sequestration_limit

* add release notes
2021-12-06 11:31:48 +01:00
Fabian Neumann
90c2c909cd
fix broken prepare_sector_network when running without gas grid (#207)
Co-authored-by: lisazeyen <lisa.zeyen@web.de>

Co-authored-by: lisazeyen <lisa.zeyen@web.de>
2021-12-03 17:22:06 +01:00
Fabian Neumann
a2459881ef
allow H2 retrofitting from CH4 pipelines without endogenous CH4 grid (#204)
* allow H2 retrofitting from CH4 pipelines without endogenous CH4 grid

* add small capital cost to gas pipelines to incentivise decommissioning

* add release notes
2021-11-29 12:42:10 +01:00
Fabian Neumann
d04f6c02a7
Merge branch 'master' into retrofit-gas-pipelines 2021-11-29 09:13:51 +01:00
Fabian Neumann
263628fa22
add option to automatically download and extract sector databundle (#198) 2021-11-29 09:12:55 +01:00
Fabian Neumann
3ecb761b57
add regionalised hydrogen salt cavern storage potentials (#191)
* add regionalised hydrogen salt cavern storage potentials

* fix reading in salt-cavern potentials and typo in imports

* by default disable nearshore and offshore salt cavern potentials

Co-authored-by: lisazeyen <lisa.zeyen@web.de>
2021-11-29 09:12:07 +01:00
Fabian Neumann
ad7dd1aa3f correct max gas pipeline loading 2021-11-28 12:11:04 +01:00
Max Parzen
f1243c3e0c Fix distribute clustering with cbc/glpk/ipopt
Assume you have 10 nodes that need to be distributed between 2 countries.
What can happen with some of the open source solvers is that one country
gets assigned to 9.01 (float) nodes, and the other one to 0.99.

Now using .astype(int) would lead to a node distribution of 0 and 9, as
the `astype(int)` function round down by default (0.99 -> 0). This assigned
zero value breaks the code in case open source solvers are used.
Gurobi somehow does deal with it.
2021-11-24 14:16:24 +01:00
Fabian Neumann
bb9f437855 fix copying pypsa-eur config 2021-11-24 10:54:39 +01:00
Fabian Neumann
7863c269bd plot_network: gas network show max used capacity 2021-11-24 10:53:54 +01:00
Koen van Greevenbroek
977dbfe933 Remove non-ascii character from source file
Unfortunately Snakemake for now reads files using the default OS file
encoding, which may not be UTF-8. Therefore, it is best to be
conservative and only use ascii in source files for now.
2021-11-22 14:02:57 +01:00
martacki
299e71e2b3 introduce hierarchical agglomeratice clustering (hac) 2021-11-17 13:46:33 +01:00
Fabian Neumann
b8a037026d gas_input: rewrite to not require pygeos via sjoin_nearest() 2021-11-14 16:51:34 +01:00
Fabian Neumann
67ba2fa813 address deprecation warnings 2021-11-14 12:57:46 +01:00
Fabian Neumann
d9902ad978 gas_network: recalculate lengths after clustering 2021-11-13 17:30:54 +01:00
Fabian Neumann
8c5dacbcc8 gas_network: fix bug in haversine distance 2021-11-13 17:03:13 +01:00
Fabian Neumann
4cd964b3bd gas_network: use IGGIELGN scigrid dataset 2021-11-13 16:48:08 +01:00
Fabian Neumann
b39a852d3b correct syntax errors 2021-11-12 12:50:46 +01:00
Fabian Neumann
44ea5ef48a add local gas input capacities (p_nom) and disable p_nom_extendable 2021-11-10 18:24:13 +01:00
Fabian Neumann
12ef1302e6 add planned LNG terminals from gem.wiki and convert units to MW 2021-11-10 18:05:47 +01:00
Fabian Neumann
c0d1656091 build_load_data: separate retrieving and processing load data 2021-11-10 10:37:09 +01:00
Fabian Neumann
646c5011af
Merge branch 'master' into snakemake_dependencies_in_functions 2021-11-10 09:46:57 +01:00
Fabian Neumann
57c0dd29d1 disentangle gas input nodes by lng, prod, entry with mmc/d# 2021-11-09 14:52:08 +01:00
Fabian Neumann
9e4e97690f gas network plotting adjustments 2021-11-05 10:57:24 +01:00
Fabian Neumann
985705403e revision gas infrastructure representation 2 2021-11-04 21:48:54 +01:00
Fabian Neumann
6a00d5bfca revision gas infrastructure representation 2021-11-03 20:34:43 +01:00
Fabian Neumann
37e2e53486
Merge branch 'master' into retrofit-gas-pipelines 2021-11-02 19:03:26 +01:00
Fabian Neumann
d26dbcb7fd plot: correct h2 map legend overlap, change aggregation of techs 2021-10-23 21:16:05 +02:00
Fabian Neumann
0a9210ed44 copy pypsa-eur config.yaml into results folder 2021-10-07 14:36:34 +02:00
Fabian
23d3216d92 base_network.py: fix scipy spatial import 2021-10-05 17:30:22 +02:00
Fabian Neumann
19d128aafd bugfix: take district heating progress not potential 2021-10-04 14:28:59 +02:00
lisazeyen
017c188518 fix typo for district heating with capital D 2021-10-04 09:23:23 +02:00
Fabian Neumann
2e6e9c6802
Merge branch 'master' into agriculture-energy-co2 2021-10-02 10:51:28 +02:00
Fabian Neumann
b560d95b6a merge master 2021-10-02 10:41:56 +02:00
Fabian Neumann
4375083838 create parallel structures for land-use constraints w/wo m 2021-10-02 10:40:49 +02:00
Fabian Neumann
a60f180f61 fix logging 2021-10-02 10:23:27 +02:00
Fabian Neumann
c0adb51454 decapitalize columns in build_energy_totals 2021-10-02 10:03:40 +02:00
lisazeyen
0d999a4991
prepare_sector_network: code formatting
Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
2021-10-01 17:10:42 +02:00
Fabian Neumann
18fabd930e
Apply suggestions from code review 2021-09-30 17:46:26 +02:00
Fabian Neumann
ff6d736a89
Merge branch 'master' into myopic-low-clustering-gens 2021-09-30 14:51:45 +02:00
Fabian Neumann
90079248a3
Merge branch 'master' into dh-share 2021-09-30 14:48:26 +02:00
lisazeyen
f6bb498730 include PR review 2021-09-29 16:13:23 +02:00
Fabian Neumann
5fb169c31f
Merge branch 'master' into enspreso-biomass 2021-09-29 15:46:11 +02:00
Fabian Neumann
1e248b314d compatibility with biomass transport 2021-09-29 15:45:14 +02:00
lisazeyen
9d8827bf59 Merge remote-tracking branch 'origin/master' into dh-share 2021-09-29 15:03:45 +02:00
lisazeyen
854bd80818 rename central_fraction->district heating potential, restructure district heating share implementation 2021-09-29 14:37:36 +02:00
lisazeyen
8322350fee move calculation of district heating share to build_energy_totals 2021-09-29 14:36:56 +02:00
lisazeyen
e27ec46878 add further comments 2021-09-29 09:23:39 +02:00
lisazeyen
234a32c504 bug fix 2021-09-29 09:23:39 +02:00
Fabian Neumann
8ecc54fbe6
Merge branch 'master' into dh-share 2021-09-28 17:29:29 +02:00
lisazeyen
53eab1ead2 slice biomass potentials with the pop_layout index instead of the country if biomass transport = True 2021-09-28 17:25:04 +02:00
Fabian Neumann
fcc10aa950
Merge branch 'master' into master 2021-09-28 17:15:26 +02:00
Fabian Neumann
2f19814786 Merge branch 'nworbmot-master' 2021-09-28 17:13:30 +02:00
Fabian Neumann
9f4e1f2176 make HVC recycling ready for pathway, minor edits 2021-09-28 17:08:03 +02:00
lisazeyen
dadfa8691b update mocksnakemake for testing 2021-09-28 16:36:40 +02:00
Fabian Neumann
385779fbbf
Merge branch 'master' into biomass-transport 2021-09-28 11:33:21 +02:00
Fabian Neumann
ec04d7909a
Merge pull request #148 from PyPSA/co2-network
Add CO2 network
2021-09-28 11:29:20 +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
lisazeyen
7ed20aba7a
Update prepare_sector_network.py
add logger info if CO2 network is added
2021-09-24 15:30:43 +02:00
lisazeyen
b391aa6475
Update build_biomass_transport_costs.py
change snakemake output file format
2021-09-24 14:59:53 +02:00
Tom Brown
93d4eae1ea industry: for HVC, add mechanical and chemical recycling 2021-09-24 13:19:48 +02:00
Tom Brown
fbccd5fbc0 industry: separate HVC, methanol and chlorine from basic chemicals 2021-09-24 13:00:58 +02:00
Fabian Neumann
2e02af8b4b change license 2021-09-14 16:37:41 +02:00
martacki
dfb929f2cf remove snakemake dependencies in functions, use as kwarg instead 2021-09-14 16:34:02 +02:00
Fabian Neumann
c4d4e88ba2
Merge pull request #161 from PyPSA/fix-build_carbon_budget
fix-build_carbon_budget
2021-09-09 16:07:11 +02:00
Fabian Neumann
118f06f7e9
Merge pull request #160 from PyPSA/fix-plot-heat-time-series
Update plot_network.py
2021-09-08 09:32:28 +02:00
Martha Frysztacki
8bec0cc423
simplify: drop incorrect cols if they exist (avoid error) (#272) 2021-09-07 16:28:01 +02:00
Fabian
ea50abab6d doc: fix build warnings 2021-08-27 12:30:29 +02:00
Fabian Hofmann
b9bbefa09f
simplify_network.py fix dict getting 2021-08-27 10:34:27 +02:00
Martha Frysztacki
a6d2a0a99d
style
Co-authored-by: Fabian Hofmann <hofmann@fias.uni-frankfurt.de>
2021-08-26 16:00:08 +02:00
Martha Frysztacki
f30ca8a18a
Merge branch 'master' into simplify_to_substations 2021-08-26 15:22:02 +02:00
martavp
203a7f3df2
Add lifetime to solar-rooftop
Rooftop-solar generators are missing the lifetime attribute when they are added.

This avoids that they are saved as brownfield capacities installed in a previous timestep when running myopic optimization. 
I.e, they are not captured in the following line
5b9f64354f/scripts/add_existing_baseyear.py (L31)
2021-08-24 18:58:42 +02:00
martavp
919c9d8b8d
Update prepare_sector_network.py
update build_carbon_budget to use budget estimation from 2020 onwards
2021-08-24 18:48:20 +02:00
martavp
8d22df6482
Update plot_network.py
Some links producing heat have more than 2 ports (e.g. Fischer-Tropsch). This enables capturing them when plotting heat time series.
2021-08-24 18:38:24 +02:00
Fabian Neumann
624e5a1853 Merge branch 'master' into dh-share 2021-08-19 10:07:06 +02:00
Fabian Neumann
13251d33cc no machinery electric share, fix add to madd 2021-08-18 16:17:59 +02:00
Fabian Neumann
a9196f001b fix 2 typos 2021-08-18 14:17:21 +02:00
Fabian Neumann
3a218c826e Merge branch 'master' into agriculture-energy-co2 2021-08-18 12:56:49 +02:00
Fabian Neumann
5b9f64354f
xarray 0.19 compatibility (#158) 2021-08-18 12:17:31 +02:00
Martha Frysztacki
1c173567b5
solve_operations_network: include optimized stores to operation (#269)
* remove stores-buses from load generators

* include optimized stores to operation network

* add release notes

* Update doc/release_notes.rst

Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>

* Update doc/release_notes.rst

Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>

* Update release_notes.rst

* Update scripts/solve_network.py

Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
2021-08-18 10:38:51 +02:00
Fabian Neumann
351964b1e7 add logger.info for agriculture 2021-08-18 09:42:05 +02:00
martacki
400317d062 update plot_network and make_summary scripts to latest pypsa/-eur versions 2021-08-16 17:53:56 +02:00
Fabian Neumann
17c96edf72 agriculture: correctly convert units, fix efficiency gain, ICE aggregation for oil 2021-08-16 16:27:25 +02:00
Fabian Neumann
dd177df19f fix NL hardcode typo 2021-08-16 16:26:20 +02:00
Fabian Neumann
38352927fc Merge branch 'master' into agriculture-energy-co2 2021-08-16 14:30:15 +02:00
Fabian Neumann
0a16ca3b35 add biomass potentials docstrings 2021-08-16 14:14:05 +02:00
Fabian Neumann
ad23a648c4
Merge branch 'master' into enspreso-biomass 2021-08-10 10:43:52 +02:00
Fabian Neumann
782323bee4 handle spaces in remote files 2021-08-10 10:28:50 +02:00
Fabian Neumann
05c2332420 fix syntax error in master 2021-08-10 10:27:54 +02:00
Fabian Neumann
12f385ef3f biomass_transport: simplify read-in 2021-08-09 18:06:24 +02:00
Fabian Neumann
928d1f23ed biomass_transport: improve spatial biomass potential handling 2021-08-09 18:03:20 +02:00
Fabian Neumann
7ca4f04611 biomass_transport: reduce output files 2021-08-09 17:53:14 +02:00
Fabian Neumann
3eb404ff68 biomass_transport: correct and simplify spatial management 2021-08-09 17:51:37 +02:00
Fabian Neumann
6711d721b9 biomass_transport: fix cost calculation and get from remote 2021-08-09 16:30:38 +02:00
Fabian Neumann
0da8f8f80e
Merge branch 'master' into biomass-transport 2021-08-06 15:58:23 +02:00
Fabian Neumann
54a509f3dd
Merge branch 'master' into co2-network 2021-08-06 15:51:40 +02:00
Fabian Neumann
4cc5e49ca8
Adapt to new snapshot weightings (#259)
* for now use n.snapshot_weightings.generators

* require pypsa master; use .objective for Nyears

* implement suggestions from code review

* add release note
2021-08-06 13:43:12 +00:00
Fabian Neumann
3754643e81 add co2 sequestration potential global constraint 2021-08-06 12:46:03 +02:00
Fabian Neumann
e7c6b8c2c8
Merge branch 'master' into dh-share 2021-08-04 18:29:57 +02:00
Fabian Neumann
87596dd015
add H2 liquefaction cost to H2 shipping demand (#145)
* add H2 liquefaction cost to H2 shipping demand

* rename bus to 'H2 liquid'

* add release note

* make consideration of liquefaction costs for shipping optional

* update release notes
2021-08-04 18:28:18 +02:00
Fabian Neumann
96afff0487
Adapt to technology-data changes (#146)
* adapt to technology-data changes from https://github.com/PyPSA/technology-data/pull/35

* switch to new H2 (g) pipeline cost
2021-08-04 18:19:42 +02:00
huckebrink
2aa59a3905
exporting additional costs, and compatibility adjustments (#261)
* added export for connection_cost adjustment

* removed lambda function from multiprocessing
changed true/false_values to lists

* removed double import of functools

* moved added costs to df column

* Update scripts/simplify_network.py

Co-authored-by: Leonie Plaga <leonie.plaga@ruhr-uni-bochum.de>
Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
2021-08-04 16:19:23 +00:00
martavp
fab31e6524
Exogenous transition path for shipping, Steel, and Aluminum production (#136)
* Update .gitignore

* 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.

* 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.

* 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

* small follow-up to merge

* Add oil consumed in shipping as a load to EU oil bus

* Update scripts/prepare_sector_network.py

* add planning_horizons wildcard to benchmark paths

* fixup: double fraction_primary for steel

Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
2021-08-04 18:19:02 +02:00
Fabian Neumann
50dd4ce285 prepare: fix syntax error 2021-08-04 18:13:01 +02:00
Fabian Neumann
ba9be74265 make build_biomass_transport_costs fully optional 2021-08-04 15:05:37 +02:00
Fabian Neumann
67d40ae5d9 remove unused line 2021-08-04 14:54:00 +02:00
Fabian Neumann
f4aa345c74 apply spatial management of gas nodes 2021-08-04 14:47:13 +02:00
Fabian Neumann
e5c61c8cf0 With H2_retrofit, gas network can be removed for free, without it can be expanded for a cost 2021-08-04 11:09:31 +02:00
Fabian Neumann
e1f1d71b8d apply option for retrofitted pipe capacity per CH4 capacity in solve_network 2021-08-04 10:49:06 +02:00
Fabian Neumann
6507526d22 add retrofitting costs from technology-data 2021-08-04 10:36:16 +02:00
Fabian Neumann
006a68b3cf add option for retrofitted pipe capacity per CH4 capacity 2021-08-04 10:35:02 +02:00
Fabian Neumann
473d57a957 clean build_gas_network 2021-08-04 10:28:50 +02:00
Fabian Neumann
6a86a04743 add gas network spatial management 2021-08-04 09:48:23 +02:00
Leon
85111e2ae3
Omitting unnecessary constraints on the CHP units (#155)
* Omitting unnecessary constraints on the CHP units

All CHPs in pypsa-eur-sec are operating on the backpressure line and this set of extra constraints to ensure working in the operational space of the CHPs is hence not necessary at the moment.

* remove chp constraints function call
2021-08-04 09:20:09 +02:00
Fabian Neumann
ac3ce07d67
Merge branch 'master' into simplify_to_substations 2021-08-03 15:53:49 +02:00
lisazeyen
554b55ff3d
Update solve_network.py
fix bug in pipe retroftting constraint
2021-07-13 08:50:15 +02:00
Fabian Neumann
3f43656a92 call define_spatial 2021-07-12 12:37:37 +02:00
Fabian Neumann
d1298fa93d use spatial namespace to manage biomass transport resolution 2021-07-12 12:31:18 +02:00
Fabian Neumann
2563d1277a spatially-explicit biomass potentials from ENSPRESO (NUTS2) 2021-07-11 17:52:32 +02:00
lisazeyen
9039b130fa
bug fix to avoid same link names for DAX 2021-07-09 15:30:21 +02:00
Fabian Neumann
36fdde7887 correctly name co2 submarine pipeline! 2021-07-09 14:36:13 +02:00
lisazeyen
0127c47035
Update prepare_sector_network.py
bug fix when calculating urban central heat demand
2021-07-09 13:56:44 +02:00
Fabian Neumann
d58a7f86a4 allow copperplated carbon capture to be distributed freely to co2 stores 2021-07-09 13:22:00 +02:00
Fabian Neumann
cd99089628 account for underwater fraction 2021-07-09 13:10:43 +02:00
Fabian Neumann
2b204c45e4 run define_spatial in __main__ 2021-07-09 12:51:48 +02:00
Fabian Neumann
4f9d2f9d5f add concept for management of spatial resolutions 2021-07-09 12:50:40 +02:00
Fabian Neumann
62bba87cda add co2 network topology
Co-authored-by: lisazeyen <lisa.zeyen@web.de>
2021-07-09 10:44:29 +02:00
lisazeyen
76f36d0a1a add option to take today's district heating share 2021-07-08 14:41:34 +02:00
Fabian Neumann
a98870e159 correction for .madd() and call co2_network 2021-07-07 18:07:57 +02:00
Fabian Neumann
d976a8faf7 add CO2 network [first draft] 2021-07-07 17:58:47 +02:00
Fabian Neumann
2bd9a3993b fix typo 2021-07-06 18:36:04 +02:00
Fabian Neumann
67ee6cb86e first step towards agriculture, forestry and fishing 2021-07-06 18:32:35 +02:00
martavp
3a6a1f90ab
Sensitivity e nom max (#143)
* Update .gitignore

* include e_nom_max sensitivity

* remove change in gitignore

* Update doc/release_notes.rst

Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
2021-07-06 17:12:39 +02:00
Fabian Neumann
c3f554e442
Update scripts/prepare_sector_network.py 2021-07-06 10:54:34 +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
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
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
martacki
89631b240a correct placement of if/else 2021-07-02 10:04:22 +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
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
Fabian Neumann
d78f8b3e65
Merge branch 'master' into extendable-pnommin 2021-07-01 19:39:01 +02:00
Martha Frysztacki [frɨʂtat͡skʲ]
cf2eff4127
style
Co-authored-by: FabianHofmann <hofmann@fias.uni-frankfurt.de>
2021-06-30 21:29:08 +02:00
martacki
b10317ee3c fix p_nom_min values for extendable carriers with positive p_nom 2021-06-30 21:07:38 +02:00
Fabian Neumann
c5e59dab2f
Merge branch 'master' into simplify_to_substations 2021-06-30 10:34:44 +02:00
Fabian Neumann
5559fe43c9 Merge branch 'master' into substation_lv_bug 2021-06-30 10:33:15 +02:00
euronion
8654077519
Fix creation of renewable profiles for offshore wind. (#255)
* Update build_renewable_profiles.py

* Update release_notes.rst

* Update release_notes.rst

* Update release_notes.rst

* Update scripts/build_renewable_profiles.py

Co-authored-by: FabianHofmann <hofmann@fias.uni-frankfurt.de>

* Adjust doc string

Co-authored-by: FabianHofmann <hofmann@fias.uni-frankfurt.de>
Co-authored-by: Fabian <fab.hof@gmx.de>
2021-06-28 16:20:29 +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
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
lisazeyen
846f57fde6 add script for biomass transport costs. Converts JRC-EU-Times transport cost' 2021-06-11 14:36:56 +02:00
martacki
9825fa32b2 change layout of configuration settings 2021-06-01 12:00:55 +02:00
martacki
d6830d3c48 rename no_substations 2021-06-01 10:55:26 +02:00
Fabian Neumann
bfeb429c27
base: add escape if all TYNDP links already in network (#246) 2021-05-25 15:55:39 +02:00
Koen van Greevenbroek
e0215bc5a9
Propagate the solver log file name to the solver (#247)
* Propagate the solver log file name to the solver

Previously, the PyPSA network solving functions were not told about
the solver logfile specified in the Snakemake file.

* Pass solver_logfile on as kwargs

The `solve_network` function passes any additional arguments on to the
pypsa `network_lopf` and `ilopf` functions. Now we also pass
`solver_logfile` on as part of kwargs.
2021-05-25 15:55:23 +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
martacki
14cf5815bb clear arrangement 2021-05-25 13:02:58 +02:00
martacki
1bd3a5a806 simplify: drop inaccurate columns only if no simpl wildcard is used 2021-05-25 12:58:23 +02:00
Fabian Neumann
11af828c39
remove six dependency (#245) 2021-05-25 11:29:47 +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
Martha Frysztacki [frɨʂtat͡skʲ]
f5a0d566d9
solve_operations_network: integrate all extendable links, not only DC (#244)
* add_electricity.py Resolve FutureWarning 771 Index.__or__ operating as set operation is deprecated

* solve_operations_network: bug fix

* release notes

* Update doc/release_notes.rst

Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
2021-05-21 15:31:50 +02:00
Chiara Anselmetti
11c29ac6cc
Adding focus_weights to pre-clustering (#241)
* Add focus_weights to pre-clustering

Hey guys,
another quick fix since I noticed it wasn't implemented yet: When pre-clustering the network, the focus_weights have not yet been considered. This may distort clustering results when pre-clustering to a low resolution.

* Update release_notes.rst
2021-05-21 15:27:34 +02:00
martacki
f3f587e3f8 simplify to substations - initial draft 2021-05-21 13:54:38 +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
lisazeyen
5bfc7a49a6 adjust battery efficiency. The efficiency in the technology data is given as round trip efficiency 2021-05-10 16:55:19 +02:00
lisazeyen
42a78262d8 Merge branch 'master' into technology-data 2021-05-10 16:05:48 +02:00