Commit Graph

27 Commits

Author SHA1 Message Date
lisazeyen
03fca360ff style improvement 2022-03-21 09:14:15 +01:00
lisazeyen
08cef37e7e improve code style 2022-03-18 10:22:00 +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
Fabian Neumann
ad7dd1aa3f correct max gas pipeline loading 2021-11-28 12:11:04 +01:00
Fabian Neumann
7863c269bd plot_network: gas network show max used capacity 2021-11-24 10:53:54 +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
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
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
89eccd4f70 merge master 2021-07-02 15:00:19 +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
e2d23949bb add different colors for new and retrofitted H2 pipes 2021-06-23 14:54:33 +02:00
lisazeyen
97f041e82c adjust summary and plot functions 2021-06-21 12:36:40 +02:00
Fabian Neumann
3e3001455a
address FutureWarning regarding set operations on pd.Index (#103) 2021-04-29 17:11:10 +02:00
Tom Brown
65944e20ca plot_network: Fix bugs in plotting of today's network 2020-10-28 18:47:28 +01:00
Tom Brown
beefb57c25 Fix plotting of maps and balances; move log/benchmark to results/ 2020-08-21 12:15:01 +02:00
Tom Brown
f9952b9aad Fixed for PyPSA-Eur 0.1.0, PyPSA 0.17.0 and plotting
This commit now work with PyPSA-Eur 0.1.0 (tested with commit
bb3477 from 14th April 2020).

Changes to line/link_widths/colors for plotting networks in PyPSA
0.17.0.

Other corrections to plotting code so it works with this version.

Include oil boilers in colors in config.yaml.
2020-04-29 18:23:18 +02:00
Tom Brown
478832f484 Merge branch 'master' of github.com:nworbmot/pypsa-eur-sec 2020-04-29 09:53:11 +02:00
lisazeyen
a239f7efbf make the script running with pandas 1.0, colors for some network plots, add option to plot the current transmission system in the cost_network plot 2020-03-25 17:14:28 +01:00
Tom Brown
0df8fc50cf Summaries and plotting: Fix groupby with two bys for pandas 1.0.x 2020-03-25 16:42:38 +01:00
Tom Brown
d4c6521aaf For H2 network plotting, introduce dummy MultiIndex to get area
Otherwise the area is not consistent with the legend (I'll open a
PyPSA issue).
2020-01-31 19:20:46 +01:00
Tom Brown
e0cf7e0860 Fix transmission map for nomopyomo outputs; plot also H2 network
Use s_nom_min for the reference point for the transmission
reinforcement not s_nom, since s_nom is now overwritten for LV > 1.0
(the old pyomo code kept the s_nom variable fixed in the pyomo model
rather than via pypsa setting s_nom_extendable = False, like the
nomopyomo code now does).

The legend scale of the H2 network electrolyzers is wrong. I don't yet
understand why. Possibly the cost scale in the other map is also wrong.
2020-01-21 19:44:36 +01:00
Tom Brown
80642ae9af Fix post-processing to read nomopyomo nc; fix MultiIndex issue
With new pandas:

pd.Index([])|pd.MultiIndex(...)

returns a pd.Index, not a pd.MultiIndex, so just reversed:

pd.MultiIndex(...)|pd.Index([])

This returns a pd.MultiIndex.
2019-12-06 16:56:33 +01:00
Tom Brown
77bef57c60 Automatic plotting of network maps with costs per node 2019-05-13 17:09:26 +02:00