Commit Graph

2678 Commits

Author SHA1 Message Date
Fabian Neumann
b479973b7e doc: fix tutorial notes to account for '_ec' in filenames [skip travis]
* Adressing feedback from denyin: Private message regarding: [pypsa] MissingRuleException when using snakemake command
2020-02-02 11:07:29 +01:00
Tom Brown
ab401907b2 Merge branch 'master' of github.com:nworbmot/pypsa-eur-sec 2020-01-31 19:25:19 +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
FabianHofmann
1e9f8717ee add names to config, add color column to n.carriers 2020-01-29 17:01:57 +01:00
FabianHofmann
af985db802 adjust n.carrier column name 'nice_names' -> 'nice_name' 2020-01-29 16:08:01 +01:00
Fabian Neumann
c1ec91f5ba doc: note on open-source solver setup [skip travis] 2020-01-24 17:02:09 +01:00
lisazeyen
36a57222f7 Clip p min pu (#50)
* changes for retrofitting

* changed Snakefile to work with new pypsa-eur version, change solve_network.py to clip also n.generators_t.p_min_pu

* removed retrofitting data files
2020-01-24 15:31:17 +01:00
Fabian
7c14b16777 solve_operations_network: fix snakemake input for unprepared network 2020-01-23 18:47:18 +01:00
Jonas Hörsch
52e4a1b285 environment: Free pyproj from version constraint (fixes #119) (#120)
* environment: Free pyproj from version constraint (fixes #119)

proj was constrained to 1.9.6, since cartopy was incompatible with
recent proj versions.

* build_renewable_profiles: Import gdal and geokit after forking

GDAL sets up a shared context on module import which seems to contain a
handle to the PROJ database for coordinate reference systems. By forking
these handles seem to become invalidated or at least are not usable in parallel
anymore.

Instead importing gdal only after setting up the different processes fixes
the database disk image is malformed proj error.
2020-01-23 09:55:59 +01:00
Tom Brown
b6383b37b7
Merge pull request #46 from nworbmot/describe_biomass_categories
Describe biomass categories
2020-01-22 16:58:26 +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
17e8d114b1 Allow wave costs to be modified 2020-01-14 21:36:35 +01:00
Tom Brown
2278d67687 Add wave with default minimum costs 2020-01-11 09:11:09 +01:00
Tom Brown
9ed2cbffa8 Update code to PyPSA 0.16.1 2020-01-10 18:13:01 +01:00
Fabian Neumann
5934f4f7a1
prepare release v0.1.0 (#117) 2020-01-09 14:09:28 +01:00
Fabian Neumann
4cab8a7cf0 doc: fix typo in toplevel.csv [skip travis] 2020-01-07 10:39:58 +01:00
Tom Brown
0e5dcbbce4 Fix clash of names in creation of candidate network for H2
Sometimes Lines and Links have same name, so need MultiIndex to avoid
a clash of names.
2019-12-26 10:21:22 +00:00
Tom Brown
9a5ae01a92 Adjust code to use version 0.16.0 of PyPSA for nomopyomo framework 2019-12-26 10:19:26 +00:00
Fabian Neumann
8bd72b47f0 .github: add issue/PR templates [skip travis] 2019-12-23 14:55:30 +01:00
Fabian Neumann
b8e3682bba doc: update release notes [skip travis] 2019-12-22 18:38:01 +01:00
Tom Brown
ca15750b48 Catch process emissions from feedstock for industry demand script 2019-12-19 17:49:45 +01:00
Tom Brown
ba52bbf5d4 Merge branch 'process' 2019-12-19 14:04:04 +01:00
Tom Brown
180846945f Fix bug in ordering of MultiIndex in make_summary.py
df.loc[idx[a,b,some_list],label] does NOT preserve the ordering of
some_list, but sorts it instead. Therefore the pattern:

df.loc[idx[a,b,s.index],label] = s.values

was mismatching the index and values.
2019-12-19 11:40:17 +01:00
Tom Brown
eb2fa1b24e Adjust plotting for new CCS scheme 2019-12-19 11:39:38 +01:00
Tom Brown
c525e2a6ae Install package dependencies nomopyomo branch PyPSA and gurobipy
Inelegant - installed by hand in solve_network.py.

Should replace with environment.yaml.
2019-12-19 11:38:43 +01:00
Tom Brown
52581466b6 Account for chemical industry process emissions more carefully
Remove emissions from hydrogen production for ammonia (since H2 now
comes from electrolysis).

Allow process emissions from petrochemical production to be captured
(the carbon is not necessarily fossil, but could come from CCU).
2019-12-18 09:45:14 +01:00
Tom Brown
105aeba215 Merge branch 'nomopyomo' 2019-12-13 18:07:06 +01:00
Tom Brown
41f7f44dcf Make CCS optional for SMR and industry process emissions 2019-12-13 18:06:38 +01:00
Tom Brown
49a68bdd35 Separate CHP gas/solid biomass, with/without CCS
Also fix CHP p_nom_ratio constraint, and battery charger/discharger
constraint.
2019-12-12 15:03:51 +01:00
FabianHofmann
eaf30a9b65
Introduce mocksnakemake which acutally parses Snakefile (#107)
* rewrite mocksnakemake for parsing real Snakefile

* continue add function to scripts

* going through all scripts, setting new mocksnakemake

* fix plotting scripts

* fix build_country_flh

* fix build_country_flh II

* adjust config files

* fix make_summary for tutorial network

* create dir also for output

* incorporate suggestions

* consistent import of mocksnakemake

* consistent import of mocksnakemake II

* Update scripts/_helpers.py

Co-Authored-By: euronion <42553970+euronion@users.noreply.github.com>

* Update scripts/_helpers.py

Co-Authored-By: euronion <42553970+euronion@users.noreply.github.com>

* Update scripts/_helpers.py

Co-Authored-By: euronion <42553970+euronion@users.noreply.github.com>

* Update scripts/_helpers.py

Co-Authored-By: euronion <42553970+euronion@users.noreply.github.com>

* Update scripts/plot_network.py

Co-Authored-By: euronion <42553970+euronion@users.noreply.github.com>

* Update scripts/plot_network.py

Co-Authored-By: euronion <42553970+euronion@users.noreply.github.com>

* Update scripts/retrieve_databundle.py

Co-Authored-By: euronion <42553970+euronion@users.noreply.github.com>

* use pathlib for mocksnakemake

* rename mocksnakemake into mock_snakemake

* revert change in data

* Update scripts/_helpers.py

Co-Authored-By: euronion <42553970+euronion@users.noreply.github.com>

* remove setting logfile in mock_snakemake, use Path in configure_logging

* fix fallback path and base_dir
fix return type of make_io_accessable

* reformulate mock_snakemake

* incorporate suggestion, fix typos

* mock_snakemake: apply absolute paths again, add assertion error
*.py: make hard coded io path accessable for mock_snakemake

* retrieve_natura_raster: use snakemake.output for fn_out

* include suggestion

* Apply suggestions from code review

Co-Authored-By: Jonas Hörsch <jonas.hoersch@posteo.de>

* linting, add return ad end of file

* Update scripts/plot_p_nom_max.py

Co-Authored-By: Jonas Hörsch <jonas.hoersch@posteo.de>

* Update scripts/plot_p_nom_max.py

fixes #112

Co-Authored-By: Jonas Hörsch <jonas.hoersch@posteo.de>

* plot_p_nom_max: small correction

* config.tutorial.yaml fix snapshots end

* use techs instead of technology

* revert try out from previous commit, complete replacing

* change clusters -> clusts in plot_p_nom_max due to wildcard constraints of clusters

* change clusters -> clusts in plot_p_nom_max due to wildcard constraints of clusters II
2019-12-09 21:29:15 +01:00
Tom Brown
ec9b447949 make_summary: Account for multi-links in supply* summaries 2019-12-06 17:40:20 +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
066f1b0bb5 Fix solve_network.py to use nomopyomo for LV > 1.0 2019-12-06 16:55:28 +01:00
martavp
f6d407cc24
Add files via upload
describe biomass
2019-12-04 16:38:19 +01:00
martavp
5038faa020
Delete build_biomass_potentials.py
describe biomass
2019-12-04 16:37:50 +01:00
FabianHofmann
5143a258ac build_powerplants: Fix add_custom_powerplants
Typo and type instability.

Fixes #109.
2019-12-03 00:52:52 +01:00
Fabian Neumann
7ddc153bd2
ec: attach hydrogen pipelines (#108) 2019-12-02 12:22:30 +01:00
FabianHofmann
036d44418d
Merge pull request #105 from PyPSA/config-default
Snakefile: load default config if config.yaml does not exist
2019-11-29 09:15:13 +01:00
Fabian Neumann
f5175713af Snakefile: load default config if config.yaml does not exist 2019-11-28 16:33:33 +01:00
euronion
85c356297a Add logging to logfiles to all snakemake workflow scripts. (#102)
* Add logging to logfiles to all snakemake workflow scripts.

* Fix missing quotation marks in Snakefile.

* Apply suggestions from code review

Co-Authored-By: Fabian Neumann <fabian.neumann@outlook.de>

* Apply suggestions from code review

Co-Authored-By: Fabian Neumann <fabian.neumann@outlook.de>

* doc: fix _ec_ filenames in docs

* Allow logging message format to be specified in config.yaml.

* Add logging for Snakemake rule 'retrieve_databundle '.

* Add limited logging to STDERR only for retrieve_*.py scripts.

* Import progressbar module only on demand.

* Fix logging to file and enable concurrent printing to STDERR for most scripts.

* Add new 'logging_format' option to Travis CI test config.yaml.

* Add missing parenthesis (bug fix) and cross-os compatible paths.

* Fix typos in messages.

* Use correct log files for logging (bug fix).

* doc: fix line references

* config: logging_format in all configs

* doc: add doc for logging_format

* environment: update to powerplantmatching 0.4.3

* doc: update line references for tutorial.rst

* Change logging configuration scheme for config.yaml.

* Add helper function for doing basic logging configuration.

* Add logpath for prepare_links_p_nom rule.

* Outsource basic logging configuration for all scripts to _helper submodule.

* Update documentation for changed config.yaml structure.

Instead of 'logging_level' and 'logging_format', now 'logging' with subcategories is used.

* _helpers: Change configure_logging signature.
2019-11-28 08:22:52 +01:00
Tom Brown
51aa25aace Clarify origin of industry assumptions 2019-11-27 20:28:19 +01:00
Tom Brown
6cbd3384e4 Merge branch 'master' of github.com:nworbmot/pypsa-eur-sec 2019-11-27 18:36:01 +01:00
Tom Brown
8982147706 Convert code to use PyPSA nomopyomo branch; only works for LV=1.0
Will extend to LV > 1.0 soon.
2019-11-27 18:34:53 +01:00
Tom Brown
3fac944e5b 191108: Include a correctly-costed H2 network
Offers same topology to optimisation for H2 grid as that of HVAC and
HVDC grid.
2019-11-26 18:00:45 +01:00
FabianHofmann
7dc9bb2941
Merge pull request #104 from PyPSA/normpath
Snakefile: use normpath for solver logs
2019-11-22 16:59:26 +01:00
Fabian Neumann
efb5f064b7 Snakefile: use normpath for solver logs
* mailing list: pypsa-eur_questions related: generated data and solver conf issues, 2019/11/19, 19:13
2019-11-22 15:13:46 +01:00
Fabian Neumann
a74c15a132 trigger new travis build (skipped through squash) 2019-11-19 19:45:08 +01:00
Fabian Neumann
81d9d2ab4d
battery+H2: option for stores and links instead of storage_units (#97)
* add_electricity: stores and links instead of storageunits

* move code for attaching in add_extra_stores.py

* Update Snakefile

Co-Authored-By: Fabian Neumann <fabian.neumann@outlook.de>

* Update Snakefile

Co-Authored-By: Fabian Neumann <fabian.neumann@outlook.de>

* Update Snakefile

Co-Authored-By: Fabian Neumann <fabian.neumann@outlook.de>

* rename to add_extra_components.py

* incorporate suggestions

* Snakefile: update script name

* extra_components: import _add_missing_carriers_from_costs

* Add '_ec" infix in Snakefile

* Snakefile add infix at missing spot

* remove unintendetely inserted data.bundle, correct import in add_extra_components

* environment: fix pyyaml version

* set powerplantmatching as conda-dependency

* environment fix minimal ppm version

* environment reinsert pyyaml

* environment: carry over changes to environment.docs.yaml

* extra_components: add carriers

* update docstring

* Update scripts/add_extra_components.py

* Update scripts/add_extra_components.py

* tutorial: fix hyperlink [skip travis]

* update release notes

* update documentation

* add_electricity: merge removal of suptech
2019-11-19 19:36:28 +01:00
JanFrederickUnnewehr
6cde3e902b own databundle (#96)
* config.default.yaml

* retrieve_databundle: docs, config and defaults

* fix capitalisation of true/false
2019-11-19 15:56:44 +01:00
Fabian Neumann
9517eda1d7
add option for nuclear expansion at current locations (#98)
* add_electricity: add option for nuclear expansion at current locations

* doc: add documentation on adding nuclear options
2019-11-19 12:26:01 +01:00