Commit Graph

400 Commits

Author SHA1 Message Date
Fabian Neumann
f83fd9cf1e remove duplicate retrieve_cost_data 2023-03-06 15:18:30 +01:00
Fabian Neumann
7334913e11 add input file handling of pypsa-eur-sec rules using cutout 2023-03-06 15:07:09 +01:00
Fabian Neumann
43f226b2a3 split solve network rules, take summary scripts from Sec 2023-03-06 12:10:23 +01:00
Fabian Neumann
97bbafdd70 Merge remote-tracking branch 'pypsa-eur-sec/master' into merge-pypsa-eur-sec 2023-03-06 11:54:08 +01:00
Fabian Neumann
67d878d1d7 allow disabling max_depth through config overwrite 2023-02-22 19:28:07 +01:00
Fabian Neumann
35b8425b3b cherry-pick from #282
Co-authored-by: Fabian Hofmann <hofmann@fias.uni-frankfurt.de>
2023-02-16 18:42:19 +01:00
Fabian Neumann
ece64a73c1 gas_input: use HTTP remote, rename conversion factors, fix undesired rule removal 2023-02-16 18:27:57 +01:00
Fabian Neumann
963e7cdbcf Merge branch 'master' into update-lng-ports 2023-02-16 17:56:05 +01:00
Fabian Neumann
ccde2e7f93 make sequestration options configurable 2023-02-16 17:21:58 +01:00
virio-andreyana
3dede28aae merging script in retrieve_gas_input_location with build_gas_input_location 2023-02-16 11:57:33 +01:00
Fabian Neumann
93d462831d uncomment shutil 2023-02-16 11:51:39 +01:00
Fabian Neumann
9c1182fe96 prepare release 0.7 2023-02-16 11:50:55 +01:00
Fabian Neumann
6b8e69cf81 Merge branch 'master' into carbon-management 2023-02-15 20:21:12 +01:00
Fabian Neumann
a870b603f4 automatically retrieve technology-data, no git clone 2023-01-28 08:15:43 +01:00
Fabian Neumann
9411cad98b add sequestration potential data link 2023-01-24 18:47:34 +01:00
Fabian Neumann
71e2a4943c carbon management 2023-01-24 18:44:39 +01:00
Fabian Neumann
433514b168 add a collection rule plot_all_networks 2023-01-07 13:23:12 +01:00
Fabian Neumann
6f901f4c50 restore compatibility with latest master version 2022-12-28 15:43:43 +01:00
Fabian Neumann
cac724fee0 merge master 2022-12-28 13:55:36 +01:00
Fabian Neumann
138d151c8b only compute solar thermal profiles if technology is included 2022-12-28 12:48:51 +01:00
Fabian Neumann
d37ffddd4f build_solar_thermal_profiles: parallelize 2022-12-28 12:21:46 +01:00
Fabian Neumann
494d3010eb build_heat_demand: parallelize 2022-12-28 12:21:00 +01:00
Fabian Neumann
097d054f06 build_temperatur_profiles: parallelize 2022-12-28 12:20:34 +01:00
Fabian Neumann
69a33e3698 increase resource requirements of some rules 2022-12-27 12:16:02 +01:00
Fabian Neumann
99343b1221
Merge pull request #277 from PyPSA/int-ports
distribute international shipping by port trade volumes
2022-12-27 10:57:01 +01:00
virio-andreyana
d37cd49f7d add script for retrieving lng terminals 2022-12-14 12:26:16 +01:00
virio-andreyana
01f48a50e7 Replacing the IGGIELNG_LNG data with Europe-Gas-Tracker 2022-12-14 12:26:16 +01:00
Fabian Neumann
e846cea2b7
Merge pull request #279 from PyPSA/fix/subworkflow-paths
Fix relative imports from subworkflow PyPSA-EUR
2022-11-17 15:55:17 +01:00
Fabian Hofmann
e1e18a50e7
Fix input listing in Snakefile 2022-11-16 12:18:58 +01:00
Fabian Neumann
d35d3c3c21
Merge pull request #197 from PyPSA/cp-env
Snakefile: export conda environment
2022-11-15 14:49:52 +01:00
euronion
ae8f601f0a Fix relative imports from subworkflow PyPSA-EUR 2022-11-14 09:38:09 +01:00
Fabian Neumann
84618b3ee1 distribute international shipping by port trade volumes 2022-11-13 13:43:05 +01:00
pre-commit-ci[bot]
92080b1cd2 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-09-19 10:06:40 +00:00
Fabian Hofmann
5833556ea1
Merge branch 'master' into misc/precommit-ci-2 2022-09-19 12:06:23 +02:00
Fabian Neumann
e024ba68c9 build_hydro: fix cutout input 2022-09-17 10:29:35 +02:00
pre-commit-ci[bot]
5d1ef8a640 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-09-16 13:04:06 +00:00
Fabian Hofmann
affa1c2b88
Merge branch 'master' into misc/precommit-ci-2 2022-09-16 14:38:49 +02:00
Fabian
1536cc2787 codespell: fix typos
Snakefile: fix unformattable parst
pre-commit: fix codespell ignore
2022-09-16 14:36:43 +02:00
Fabian
b694337541 scenario management: use "shared_cutouts" instead of "dedicated_cutouts" 2022-09-13 14:54:58 +02:00
Fabian Hofmann
0339ed71ac
Update Snakefile
Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
2022-09-13 09:47:11 +02:00
Fabian Hofmann
1185983f8f
Update Snakefile
Co-authored-by: Philipp Glaum <95913147+p-glaum@users.noreply.github.com>
2022-09-08 20:32:22 +02:00
Fabian
71ba743e46 enable scneario management for different configs 2022-09-08 10:28:07 +02:00
Ebbe Kyhl Gøtske ekg@mpe.au.dk
e34bd9b7fb Change costs year in snakefile and config file 2022-08-31 13:07:43 +02:00
Ebbe Kyhl Gøtske ekg@mpe.au.dk
98dd2db622 specify memory resources 2022-08-11 10:10:35 +02:00
Fabian Neumann
ca183ba89e add zenodo dataset for download 2022-08-02 15:56:47 +02:00
lisazeyen
f683a93f08 adjust plot_summary to work with myopic, remove update config 2022-08-01 16:04:14 +02:00
lisazeyen
f10628930e move snakemake dependencies out for co2limit cb option to work 2022-08-01 15:21:11 +02:00
Philipp Glaum
ba7a5363e7 update Fabians review comments 2022-07-29 14:56:39 +02:00
Philipp Glaum
4db62fa0c6 place holder in snakefile for path to ship_raster 2022-07-29 11:52:33 +02:00
Philipp Glaum
6d070a19e0 initial ship raster implementation 2022-07-28 10:38:24 +02:00
Fabian Neumann
8fc0c57ed6 update copyright years 2022-07-26 15:05:59 +02:00
Fabian Hofmann
3ba7e2ab90
Merge branch 'master' into technology-data 2022-07-21 15:36:12 +02:00
Fabian Neumann
b3dac6d3c4 subworkflow flags amend 2022-07-20 15:53:57 +02:00
Fabian Neumann
10243398e7 do not use subworkflow flags for pure data#
causes problems when config retrieve_databundle is disabled
2022-07-20 15:47:47 +02:00
Fabian Neumann
3986856282 merge master 2022-07-01 10:13:33 +02:00
Fabian Neumann
a8171ec9f3 color adaptations, new features 2022-06-28 18:03:29 +02:00
Fabian
67ac464b6a add_electricity: use conventional_inputs from snakemake.input for attach_conventional_generators 2022-06-28 16:33:46 +02:00
Fabian Hofmann
e175d1aa0e
Merge branch 'eu-energy-security' into eu-energy-security-conventional-attrs 2022-06-28 13:22:39 +02:00
Fabian
522f218eed Snakefile: rename attrs to attr in add_electricity input function 2022-06-28 13:15:37 +02:00
Fabian Hofmann
917f41ef21
Update Snakefile
Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
2022-06-28 13:11:08 +02:00
Fabian
9d997fbd79 generalize conventional attr handling through config 2022-06-28 10:14:26 +02:00
Fabian Neumann
74f8ca1c7f
Merge branch 'master' into eu-energy-security 2022-06-28 08:09:39 +02:00
Fabian Neumann
51de606aab
Revert "remove build/retrieve natura raster, directly use shapefile" 2022-06-27 19:00:41 +02:00
Fabian
b56d1f6f4d conventional config section: update to more general attribute assignment scheme 2022-06-27 17:35:19 +02:00
Fabian Neumann
fa43038564 remove params from input as they are not exposed to input 2022-06-27 10:35:39 +02:00
Fabian Neumann
9c6c6d243f
Adaptations to match current PyPSA-Eur version 2022-06-27 10:21:08 +02:00
Fabian Neumann
5ca231824e
Merge branch 'master' into eu-energy-security 2022-06-27 08:58:37 +02:00
Fabian Neumann
520f7e440e
Merge branch 'master' into technology-data 2022-06-25 11:05:41 +02:00
Fabian
eb59e68f35 Snakefile: remove RDIR selection 2022-06-09 20:24:28 +02:00
Fabian Neumann
d4fd472762
Merge branch 'master' into transport 2022-04-12 14:48:57 +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
f0d0edcf54 Snakefile: add powerplants to results-dir 2022-04-08 13:21:29 +02:00
Fabian Neumann
f474f8bce4 finetuning of results dir 2022-04-07 22:07:18 +02:00
Fabian Neumann
64424ed208 add results dir to simplify multiple configs (like PyPSA-Eur-Sec) 2022-04-07 21:13:48 +02:00
Fabian Neumann
7a52b6bc45 resolve cherry merge conflict 1 2022-04-05 16:22:31 +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
7fee2944d8
Merge branch 'master' into rm-raster-natura 2022-03-28 12:07:33 +02:00
Fabian Neumann
832cc8e5e8 Windows compatibility through request string 2022-03-28 10:56:52 +02:00
Fabian Neumann
35f8b54a46 switch to Belgium for CI and tutorial 2022-03-24 15:51:36 +01:00
Fabian Neumann
855a176c51
Merge branch 'master' into rm-raster-natura 2022-03-24 14:40:14 +01:00
Fabian Neumann
f90bb92e1a automatically download NATURA2000 gpkg and use it 2022-03-24 13:37:21 +01:00
euronion
e2e98120b1 Update Snakefile 2022-03-21 10:01:34 +01:00
euronion
30cb861ca2 Update Snakefile 2022-03-21 09:37:50 +01:00
Fabian Neumann
31f9864daf omit NATURA from testing and tutorial due to file size# 2022-03-20 21:01:07 +01:00
Fabian Neumann
5a7c0d7967 remove build/retrieve natura raster, directly use shapefile 2022-03-20 10:03:17 +01:00
euronion
da72f5487d Update Snakefile 2022-03-18 14:29:50 +01:00
euronion
65e35135e1 Update Snakefile 2022-03-18 11:13:58 +01:00
Fabian
49ec143b0a Snakefile: fix memory function for clusters == 'all' 2022-03-02 14:22:16 +01:00
Fabian Neumann
3eec027db6
no more 'mv' command in Snakefile for Windows (#316) 2022-02-22 19:34:47 +01:00
Fabian Neumann
090b4908a4 Snakefile: use standard resource mem_mb rather than mem 2022-01-27 21:04:50 +01:00
Fabian Neumann
e1aae5a98e minor adjustment to memory requirements of add_electricity, cluster_network 2022-01-13 15:36:13 +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
63724279a4 Snakefile: export conda environment 2021-11-24 16:01:58 +01:00
Fabian Neumann
5be6c24fe7 solve_network: take threads from solver setting 2021-11-24 10:33:46 +01:00
Koen van Greevenbroek
04e62fd52e Create config file from default if not found
Similarly to pypsa-eur, the config file is not found, we create it as
a copy of `config.default.yaml`. This also makes it easier to include
pypsa-eur-sec as a subworkflow in a snakemake workflow.
2021-11-22 15:00:42 +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
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
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
57c0dd29d1 disentangle gas input nodes by lng, prod, entry with mmc/d# 2021-11-09 14:52:08 +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
2e6e9c6802
Merge branch 'master' into agriculture-energy-co2 2021-10-02 10:51:28 +02:00
Fabian Neumann
90079248a3
Merge branch 'master' into dh-share 2021-09-30 14:48:26 +02:00
lisazeyen
8322350fee move calculation of district heating share to build_energy_totals 2021-09-29 14:36:56 +02:00
Fabian Neumann
8ecc54fbe6
Merge branch 'master' into dh-share 2021-09-28 17:29:29 +02:00
lisazeyen
dadfa8691b update mocksnakemake for testing 2021-09-28 16:36:40 +02:00
Fabian Neumann
8996e09dc2
Merge branch 'master' into mit-license 2021-09-20 09:28:32 +02:00
Koen van Greevenbroek
6485b98973 Mark datasets from Zenodo as static
When retrieving a remote file over HTTP, Snakemake uses the
"last-modified" property in HTTP header as a proxy for `mtime` of the
remote file. If this time is more recent than the `mtime` of the
output of the retrieve rule, the rule is triggered and the remote file
is retrieved again (since it was apparently updated).

However, Zenodo periodically updates the "last-modified" property of
records retrieved over HTTP even if those records have not been
updated. This causes Snakemake to false assume that the records have
to downloaded again.

By setting `static=True` for datasets we know don't actually change,
we avoid this problem.
2021-09-15 11:44:49 +02:00
Fabian Neumann
2e02af8b4b change license 2021-09-14 16:37:41 +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
8e3ef7f86b remove unused sector wildcard constraints 2021-08-16 16:29:05 +02:00
Fabian Neumann
ad23a648c4
Merge branch 'master' into enspreso-biomass 2021-08-10 10:43:52 +02:00
Fabian Neumann
bab51b0f54 fix read-in of pypsa-eur data 2021-08-10 10:28:22 +02:00
Fabian Neumann
7ca4f04611 biomass_transport: reduce output files 2021-08-09 17:53:14 +02:00
Fabian Neumann
6711d721b9 biomass_transport: fix cost calculation and get from remote 2021-08-09 16:30:38 +02:00
Fabian Neumann
d428c1b77d fix syntax and auto-retrieve biomass transport cost 2021-08-09 14:43:51 +02:00
Fabian Neumann
0da8f8f80e
Merge branch 'master' into biomass-transport 2021-08-06 15:58:23 +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
ba9be74265 make build_biomass_transport_costs fully optional 2021-08-04 15:05:37 +02:00
Fabian Neumann
2563d1277a spatially-explicit biomass potentials from ENSPRESO (NUTS2) 2021-07-11 17:52:32 +02:00
lisazeyen
2e336e5e70 add missing wildcards for benchmarks, add new input data for district heating share 2021-07-08 14:41:13 +02:00
Fabian Neumann
732046dba0 merge master 2021-07-03 12:46:09 +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
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
lisazeyen
17a1153648 comment functions, remove not used input 2021-06-21 12:34:08 +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
lisazeyen
feefaa3d41 Merge branch 'master' into retrofit-gas-pipelines 2021-06-17 06:38:47 +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
42a78262d8 Merge branch 'master' into technology-data 2021-05-10 16:05:48 +02:00
Tom Brown
8bfb1490c1
Merge branch 'master' into retro-updated 2021-04-30 18:12:20 +02:00
Fabian Neumann
a156d44f28
remove unused {network} wildcard (#104) 2021-04-29 16:52:35 +02:00
FabianHofmann
b8a7685931
Atlite availability (#224)
* adjust buil_cutout.py and Snakefile

* try adjusting build_renewable_profiles, currently crashing due to weird pyproj error

* build_renewable_profiles: -remove printing gid

* build_renewable_profiles: use dask for paralellization, use dense functions

* build_renewable_profiles:
	- revise imports
	- add logging for long calculation
	- revise explaining comment
	- revise distance calculation

* build profiles: adjust to cutout.grid

* * fix area to square km
* rename potmatrix -> capacity_potential
* rename available to availibility

* config.default update cutout params
build_renewable_potentials: major refactoring and simplification
hydro_profiles: update code

* build profiles: fix weight output dimensions

* build profiles: fix typo, fix selection of buses

* build profiles: reinsert paths variable

* follow up

* build profiles: move to dask calculation only

* CI: set build cutout to true (add CDSAPI)

* build profiles: use pyproj, test with gleas and geokit upstream

* environment.yaml fix atlite version

* build profiles: use dask 'processes' for more than 25 regions

* build profiles: specify dask scheduler according to number of regions

* backpedal a bit, only allow scheduler='processes'

* follow up, code style and fixup

* build profiles: add logger info for underwater fraction calc

* config adjust cutout parameters
Snakefile fixup

* config.default.yaml: adjust resolution

* config: use one cutout in total
build_cutout: automatic detetection of geographical boundaries

* env: add python>=3.8 requirement
build_cutout: fixup for region bound

* config: allow base cutout

* folllow up, fix up

* follow up II

* clean up

* clean up II

* build profiles: move back to multiprocessing due to performance issues

* small code style corrections

* move in pool context

* swqitch to ratsterio

* switch to rasterio for availibility calculation

* tiny fixup

* * build continental raster for offshore distance calculation
* adjust Snakefile to new script build_raster

* rename continental raster to onshore raster
add projected_mask function (not yet tested)
add docstrings, modularize

* Snakefile: remove build_onhore_raster rule, build mask directly from geometry instead
build_natura_raster: adjust code, add function for exporting
build_profiles:
	* add buffer to shore distance to init_globals function
	* update docstrings
	* improve handling of nodata grid codes
	* add geometry mask if natura raster not activated
	(the 255 value is an 'eligible' value for the corine data base,
	do this for excluding data outside the shape)

* build_profiles: adjust docstrings

* update environment

* build profiles: fixup reproject woth padding

* follow up, small fixups

* fix resampling method

checkpoint: reproduces solar profile in tut data

* reintegrate plot map
code style

* config: rename cutout into "base"

* build profiles: adjust to new atlite code

* natura raster: small fixup

* build natura raster: compress tiff file

* config: adjust cutout names

* build profiles: cover case if no or partial overlap between natura raster and cutout

* config-tutorial: adjust cutout params

* buid-profifiles: fixup in gebco filter

* follow up

* update config files

* build profiles: select layoutmatrix != 0

* build profiles: speed up average_distance and underwaterfraction

* build profiles: fix typo

* update release notes
build_cutout: only build needed features

* update envs

* config: add temperature to sarah features

* temporary fix for atlite v0.2.1 and new xarray version release

* env: remove xarray specification

* * remove rule build_country_flh
* build profiles: remove sneaked in line

* doc: update configuration.rst (section atlite) and corresponding csv table

* release notes: fix quotes

* build profiles: use 3035 for area calculation

* Update envs/environment.docs.yaml

* Update scripts/build_cutout.py

* Update doc/release_notes.rst

Co-authored-by: euronion <42553970+euronion@users.noreply.github.com>

* Update doc/configuration.rst

Co-authored-by: euronion <42553970+euronion@users.noreply.github.com>

* Update scripts/build_cutout.py

Co-authored-by: euronion <42553970+euronion@users.noreply.github.com>

* update release notes

* release notes: add deprecation of 'keep_all_available_areas'
build profiles: remove warning for 'keep_all_available_areas'

* build cutout: rearrage code, set buffer correctly

* Rename tutorial cutout to remove name clash with real cutout.

* Update release_notes.rst: Rename tutorial cutout.

* retrieve: update cutouts and downloads (alternative) (#237)

* retrieve: update cutouts and downloads

* retrieve: remove unnecessary import

* use snakemake remote file functionality

* Snakefile: update zenodo link

* update natura remote link (closes #234)

* env: update atlite version to 0.2.2

* env: fix dask version due to memory issues

* test: retrieve cutout instead of build

* test: use tutorial cutout for CI

Co-authored-by: euronion <42553970+euronion@users.noreply.github.com>
Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
2021-04-27 17:58:31 +02:00
Fabian Neumann
e8897cdb4c http remote to retrieve technology-data 2021-04-27 14:54:54 +02:00
Fabian Neumann
4ec06f54bc merge master 2021-04-27 14:47:15 +02:00
lisazeyen
04244ac8ce Snakefile: add rule for building current gas network 2021-04-15 14:20:39 +02:00
lisazeyen
36685bd016 update retro script to include ventilation, thermal bridges and heat gains. Add necessary input files in the Snakefile, remove no longer needed file 2021-02-24 16:51:58 +01:00
martavp
0eb69365eb Update Snakefile
Allow white space in sector_opts, e.g. to investigate sensitivity to cost of 'H2 Electrolysis'
2021-01-14 10:21:11 +01:00
martavp
0d64cf5b35 Allow decimals in sector_opts 2021-01-12 10:58:51 +01:00
martavp
4a681749d7 Add function build_carbon_budget()
For the myopic method, based on the carbon budget indicated in the config file (sector_opts), a CO2 limit is calculated for every planning_horizon following an exponential or beta decay.  A file with CO2 limit in every planning_horizon and a plot showing historical and planned CO2 emissions
are saved in the results
2021-01-12 10:57:29 +01:00
Fabian Neumann
08674a6cda
Release v0.3 (#213)
* release_notes: order for release

* doc: fix smaller typos and tidy up

* config: bump version

* doc: fix line references

* doc: bump confpy version

* envs: update fixed versions yaml

* Snakefile: simplify all_elec to all
2020-12-05 17:54:50 +01:00