diff --git a/.gitattributes b/.gitattributes index 9e85b38b..3f5e771d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: CC0-1.0 diff --git a/.gitignore b/.gitignore index 80f91408..6c3e4d42 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: CC0-1.0 diff --git a/.readthedocs.yml b/.readthedocs.yml index 4290ae6f..4b7e3476 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,11 +1,11 @@ -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: CC0-1.0 version: 2 python: - version: 3.8 + version: "3.10" install: - requirements: doc/requirements.txt system_packages: true diff --git a/.reuse/dep5 b/.reuse/dep5 index 8ddff0f7..bc0936ba 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -12,7 +12,7 @@ Copyright: 2019 Fabian Neumann (TUB, KIT) License: CC-BY-4.0 Files: data/* -Copyright: 2017-2022 The PyPSA-Eur Authors +Copyright: 2017-2023 The PyPSA-Eur Authors License: CC-BY-4.0 Files: .github/* @@ -20,9 +20,9 @@ Copyright: 2019 The PyPSA-Eur Authors License: CC0-1.0 Files: matplotlibrc -Copyright: : 2017-2022 The PyPSA-Eur Authors +Copyright: : 2017-2023 The PyPSA-Eur Authors License: CC0-1.0 Files: borg-it -Copyright: : 2017-2022 The PyPSA-Eur Authors +Copyright: : 2017-2023 The PyPSA-Eur Authors License: CC0-1.0 diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt index ef8a01cb..87f6d959 100644 --- a/LICENSES/MIT.txt +++ b/LICENSES/MIT.txt @@ -1,6 +1,6 @@ MIT License -Copyright 2017-2022 The PyPSA-Eur Authors +Copyright 2017-2023 The PyPSA-Eur Authors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/README.md b/README.md index aae9ac8e..589365ee 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ diff --git a/Snakefile b/Snakefile index f4f37049..0ebfe89d 100644 --- a/Snakefile +++ b/Snakefile @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT diff --git a/config.default.yaml b/config.default.yaml index b06c06b7..f01474b2 100755 --- a/config.default.yaml +++ b/config.default.yaml @@ -1,8 +1,8 @@ -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: CC0-1.0 -version: 0.6.1 +version: 0.7.0 tutorial: false logging: @@ -233,7 +233,7 @@ load: costs: year: 2030 - version: v0.4.0 + version: v0.5.0 rooftop_share: 0.14 # based on the potentials, assuming (0.1 kW/m2 and 10 m2/person) fill_values: FOM: 0 @@ -288,7 +288,7 @@ solving: min_iterations: 4 max_iterations: 6 clip_p_max_pu: 0.01 - skip_iterations: false + skip_iterations: true track_iterations: false #nhours: 10 solver: diff --git a/config.tutorial.yaml b/config.tutorial.yaml index dc5347aa..e73b372f 100755 --- a/config.tutorial.yaml +++ b/config.tutorial.yaml @@ -1,8 +1,8 @@ -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: CC0-1.0 -version: 0.6.1 +version: 0.7.0 tutorial: true logging: @@ -50,9 +50,29 @@ electricity: battery: 6 H2: 168 - powerplants_filter: false # use pandas query strings here, e.g. Country not in ['Germany'] - custom_powerplants: false # use pandas query strings here, e.g. Country in ['Germany'] - conventional_carriers: [coal, CCGT] # [nuclear, oil, OCGT, CCGT, coal, lignite, geothermal, biomass] + # use pandas query strings here, e.g. Country not in ['Germany'] + powerplants_filter: (DateOut >= 2022 or DateOut != DateOut) + # use pandas query strings here, e.g. Country in ['Germany'] + custom_powerplants: false + + conventional_carriers: [nuclear, oil, OCGT, CCGT, coal, lignite, geothermal, biomass] + renewable_carriers: [solar, onwind, offwind-ac, offwind-dc, hydro] + + estimate_renewable_capacities: + enable: true + # Add capacities from OPSD data + from_opsd: true + # Renewable capacities are based on existing capacities reported by IRENA + year: 2020 + # Artificially limit maximum capacities to factor * (IRENA capacities), + # i.e. 110% of 's capacities => expansion_limit: 1.1 + # false: Use estimated renewable potentials determine by the workflow + expansion_limit: false + technology_mapping: + # Wind is the Fueltype in powerplantmatching, onwind, offwind-{ac,dc} the carrier in PyPSA-Eur + Offshore: [offwind-ac, offwind-dc] + Onshore: [onwind] + PV: [solar] atlite: nprocesses: 4 @@ -163,7 +183,7 @@ load: costs: year: 2030 - version: v0.4.0 + version: v0.5.0 rooftop_share: 0.14 fill_values: FOM: 0 diff --git a/doc/Makefile b/doc/Makefile index d9bd3d5d..a2ae2428 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT diff --git a/doc/_static/theme_overrides.css b/doc/_static/theme_overrides.css deleted file mode 100644 index e7e21151..00000000 --- a/doc/_static/theme_overrides.css +++ /dev/null @@ -1,74 +0,0 @@ -/* SPDX-FileCopyrightText: 2017-2022 The PyPSA-Eur Authors - SPDX-License-Identifier: MIT -*/ - -.wy-side-nav-search { - background-color: #eeeeee; -} - -.wy-side-nav-search .wy-dropdown>a, -.wy-side-nav-search>a { - color: rgb(34, 97, 156) -} - -.wy-side-nav-search>div.version { - color: rgb(34, 97, 156) -} - -.wy-menu-vertical header, -.wy-menu-vertical p.caption, -.rst-versions a { - color: #999999; -} - -.wy-menu-vertical a.reference:hover, -.wy-menu-vertical a.reference.internal:hover { - background: #dddddd; - color: #fff; -} - -.wy-nav-side { - background: #efefef; -} - -.wy-menu-vertical a.reference { - color: #000; -} - -.rst-versions .rst-current-version, -.wy-nav-top, -.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a:hover { - background: #002221; -} - -.wy-nav-content .highlight { - background: #ffffff; -} - -.rst-content code.literal, -.rst-content tt.literal { - color: rgb(34, 97, 156) -} - -.wy-nav-content a.reference { - color: rgb(34, 97, 156); -} - - -/* override table width restrictions */ - -@media screen and (min-width: 767px) { - .wy-table-responsive table td { - /* !important prevents the common CSS stylesheets from overriding - this as on RTD they are loaded after this stylesheet */ - white-space: normal !important; - background: rgb(250, 250, 250) !important; - } - .wy-table-responsive { - max-width: 100%; - overflow: visible !important; - } - .wy-nav-content { - max-width: 910px !important; - } -} diff --git a/doc/cloudcomputing.rst b/doc/cloudcomputing.rst deleted file mode 100644 index 6df8b2b3..00000000 --- a/doc/cloudcomputing.rst +++ /dev/null @@ -1,130 +0,0 @@ -.. - SPDX-FileCopyrightText: 2020 Maximilian Parzen and Emmanuel Paez - - SPDX-License-Identifier: CC-BY-4.0 - - -.. _cloudcomputing: - -########################### -Cloud Computing -########################### - -Google Cloud Platform (GCP) -=========================== - -.. note:: - This set of instructions is partially Windows specific. - We are happy to take pull requests explaining where the procedures deviate from the descriptions below for other operating systems. - Likewise, tutorials for other cloud computing solutions are also highly welcome. - -The Google Cloud Platform (GCP) is a cloud computing service you can use to run PyPSA-Eur calculations, especially if - -- you do not have immediate access to high-performance computating facilities, -- you have problems with the Windows operating system and want a quick run on a linux-based system, -- you want to model whole of Europe in sufficient spatial and temporal resolution, -- you need quick results (trial version includes 32 vCPU cores and up to 800 GB of memory). - -With the Google Cloud Platform you set up a virtual machine in the cloud which can store and operate data. -Like on your local computer, you have to install all software and solvers, and create paths on the virtual machine to set up the required environment. -The 300$ free trial budget is offered which equals roughly 10-20 simulations with 180 nodes at hourly basis. -The following steps are required: - -- `Google Cloud Platform registration `_, to receive 300$ free budget. -- `Creating an Virtual Machine (VM) instance `_, which is practically a virtual computer with Linux as OS. -- `Installation of Cloud SDK `_, to create a communication channel between your computer and the cloud virtual machine (VM). -- `Installation of WinSCP (Windows) `_ (or alternative), to handle or transfer files between the VM and you local computer. - -Step 1 - Google Cloud Platform registration -------------------------------------------- - -First, register at the `Google Cloud Platform `_ (GCP). -Ann active bank account is required, which will not be charged unless you exceed the trial budget. - -Step 2 - Create your Virtual Machine instance ---------------------------------------------- - -With the following steps we create a Virtual Machine (VM) on Google Cloud. - -- Click on the `GCP Dashboard `_. -- Click on the "COMPUTE" header, on the "Compute Engine" and then on the "VM instance". -- Click on create. -- Click on new VM instance. - -Now a window with the machine details will open. You have to configure the following things: - -- Name: Set a name for your VM. Cannot be changed after creation. -- Region: You can keep the default us-central1 (Iowa), since it is a cheap computational region. Sometimes your machine is limited in a specific region. Just pick another region in that case. -- Machine configuration: The machine configuration sets how powerful your VM is. - You can start with a 1 vCPU and 3.75 GB memory, N1 series machine as every operating second cost money. - You can edit your machine configuration later. So use a cheap machine type configuration to transfer data and - only when everything is ready and tested, your expensive machine type, for instance a custom 8 vCPU with 160 GB memory. - Solvers do not parallelise well, so we recommend not to choose more than 8 vCPU. - Check ``snakemake -n -j 1 solve_all_networks`` as a dry run to see how much memory is required. - The memory requirements will vary depending on the spatial and temporal resoulution of your optimisation. - Example: for an hourly, 181 node full European network, set 8 vCPU and 150 GB memory since the dry-run calculated a 135 GB memory requirement.) -- Boot disk: As default, your VM is created with 10 GB. Depending on how much you want to handle on one VM you should increase the disk size. - We recommend a disk size of 100 GB for a safe start (cost roughly 8$ per month), the disk can be resized at any later stage with an additional disk. -- Click on create and celebrate your first VM on GCP. - -Step 3 - Installation of Cloud SDK ----------------------------------- - -- Download Google Cloud SDK `SDK `_. Check that you are logged in in your Google account. The link should lead you to the Windows installation of Google Cloud SDK. -- Follow the "Quickstart for Windows - Before you begin" steps. -- After the successful installation and initialization, close the Google Cloud SDK reopen it again. Type the following command into the "Google Cloud SDK Shell": - - .. code:: bash - - gcloud compute ssh -- -L 8888:localhost:8888 - -- This command above will open a PuTTy command window that is connected to your Virtual Machine. Time to celebrate if it works! -- Now install all necessary tools. As little help, the first steps: - .. code:: bash - - sudo apt-get update - sudo apt-get install bzip2 libxml2-dev - sudo apt-get install wget - wget https://repo.anaconda.com/archive/Anaconda3-2020.07-Linux-x86_64.sh - ls (to see what anaconda file to bash) - bash Anaconda3-2020.07-Linux-x86_64.sh - source ~/.bashrc - -- Close and reopen the PuTTy file (-> open Google Cloud SDK -> initialize again with the command above to open the PuTTY command window). Now ``conda`` can be listed with ``conda list``. - Noq you can follow the standard installation instructions to finalize your machine (don't forget the solvers - for bigger simulations use commercial solvers such as Gurobi). - -Step 4 - Installation of WinSCP -------------------------------- - -For smooth data exchange between the VM and your local computer you may use WinSCP on Windows. -Make sure that your instance is operating for the next steps. - -- Download `WinSCP `_ and follow the default installation steps. -- Open WinSCP after the installation. A login window will open. -- Keep SFTP as file protocol. -- As host name insert the External IP of your VM (click in your internet browser on your GCP VM instance to see the external IP) -- Set the User name in WinSCP to the name you see in your PuTTy window (check step 3 - for instance [username]@[VM-name]:~$) -- Click on the advanced setting. SSH -> Authentication. -- Option 1. Click on the Tools button and "Install Public Key into Server..". Somewhere in your folder structure must be a public key. I found it with the following folder syntax on my local windows computer -> :\Users\...\.ssh (there should be a PKK file). -- Option 2. Click on the Tools button and "Generate new key pair...". Save the private key at a folder you remember and add it to the "private key file" field in WinSCP. Upload the public key to the metadeta of your instance. -- Click ok and save. Then click Login. If successful WinSCP will open on the left side your local computer folder structure and on the right side the folder structure of your VM. (If you followed Option 2 and its not initially working. Stop your instance, refresh the website, reopen the WinSCP field. Afterwards your your Login should be successful) - -If you had struggle with the above steps, you could also try `this video `_. - -.. note:: - Double check the External IP of your VM before you try to login with WinSCP. It's often a cause for an error. - -Step 5 - Extra. Copying your instance with all its data and paths included --------------------------------------------------------------------------- - -Especially if you think about operating several instance for quicker simulations, you can create a so called `"image" `_ of the virtual machine. -The "image" includes all the data and software set-ups from your VM. Afterwards you can create a VM from an image and avoid all the installation steps above. - -Important points when to solve networks in PyPSA ------------------------------------------------- - -If you use the GCP with the default PyPSA-Eur settings, your budget will be used up very quickly. The following tips should help you to make the most of your budget: - -- Always test using low resolution networks; i.e. a single country at 5 nodes and 24h resolution for 2 month of weather data. -- Adjust your solver in the ``config.yaml`` file. Set ``solving: skip_iterations: true``. - This will lead to a single solver iteration which is often precise enough. diff --git a/doc/conf.py b/doc/conf.py index 0cfb1f9a..89aa5b57 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -67,7 +67,7 @@ master_doc = "index" # General information about the project. project = "PyPSA-Eur" -copyright = "2017-2022 Jonas Hoersch (KIT, FIAS), Fabian Hofmann (TUB, FIAS), David Schlachtberger (FIAS), Tom Brown (TUB, KIT, FIAS); 2019-2022 Fabian Neumann (TUB, KIT)" +copyright = "2017-2023 Jonas Hoersch (KIT, FIAS), Fabian Hofmann (TUB, FIAS), David Schlachtberger (FIAS), Tom Brown (TUB, KIT, FIAS); 2019-2023 Fabian Neumann (TUB, KIT)" author = "Jonas Hoersch (KIT, FIAS), Fabian Hofmann (TUB, FIAS), David Schlachtberger (FIAS), Tom Brown (TUB, KIT, FIAS), Fabian Neumann (TUB, KIT)" # The version info for the project you're documenting, acts as replacement for @@ -84,7 +84,7 @@ release = "0.6.1" # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = "en" # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: @@ -128,14 +128,15 @@ todo_include_todos = True # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = "sphinx_rtd_theme" +html_theme = "sphinx_book_theme" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. html_theme_options = { - "display_version": True, - "sticky_navigation": True, + "repository_url": "https://github.com/pypsa/pypsa-eur", + "use_repository_button": True, + "show_navbar_depth": 2, } @@ -144,14 +145,14 @@ html_theme_options = { # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". -# html_title = None +html_title = "PyPSA-Eur" # A shorter title for the navigation bar. Default is the same as html_title. # html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. -# html_logo = None +html_logo = "img/pypsa-logo.png" # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 @@ -159,11 +160,11 @@ html_theme_options = { # html_favicon = None # These folders are copied to the documentation's HTML output -html_static_path = ["_static"] +# html_static_path = ["_static"] # These paths are either relative to html_static_path # or fully qualified paths (eg. https://...) -html_css_files = ["theme_overrides.css"] +# html_css_files = ["theme_overrides.css"] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied diff --git a/doc/configtables/atlite.csv b/doc/configtables/atlite.csv index 7bb56040..f0220b36 100644 --- a/doc/configtables/atlite.csv +++ b/doc/configtables/atlite.csv @@ -1,9 +1,12 @@ ,Unit,Values,Description nprocesses,--,int,"Number of parallel processes in cutout preparation" +show_progress,bool,true/false,"Whether progressbar for atlite conversion processes should be shown. False saves time." cutouts,,, -- {name},--,"Convention is to name cutouts like ``--`` (e.g. ``europe-2013-era5``).","Name of the cutout netcdf file. The user may specify multiple cutouts under configuration ``atlite: cutouts:``. Reference is used in configuration ``renewable: {technology}: cutout:``. The cutout ``base`` may be used to automatically calculate temporal and spatial bounds of the network." -- -- module,--,"Subset of {'era5','sarah'}","Source of the reanalysis weather dataset (e.g. `ERA5 `_ or `SARAH-2 `_)" -- -- x,°,"Float interval within [-180, 180]","Range of longitudes to download weather data for. If not defined, it defaults to the spatial bounds of all bus shapes." -- -- y,°,"Float interval within [-90, 90]","Range of latitudes to download weather data for. If not defined, it defaults to the spatial bounds of all bus shapes." +-- -- dx,°,"Larger than 0.25","Grid resolution for longitude" +-- -- dy,°,"Larger than 0.25","Grid resolution for latitude" -- -- time,,"Time interval within ['1979', '2018'] (with valid pandas date time strings)","Time span to download weather data for. If not defined, it defaults to the time interval spanned by the snapshots." -- -- features,,"String or list of strings with valid cutout features ('inlfux', 'wind').","When freshly building a cutout, retrieve data only for those features. If not defined, it defaults to all available features." diff --git a/doc/configtables/clustering.csv b/doc/configtables/clustering.csv index bcab264a..f13d8cbd 100644 --- a/doc/configtables/clustering.csv +++ b/doc/configtables/clustering.csv @@ -4,6 +4,8 @@ simplify_network,,, -- algorithm,str,"One of {‘kmeans’, ‘hac’, ‘modularity‘}", -- feature,str,"Str in the format ‘carrier1+carrier2+...+carrierN-X’, where CarrierI can be from {‘solar’, ‘onwind’, ‘offwind’, ‘ror’} and X is one of {‘cap’, ‘time’}.", -- exclude_carriers,list,"List of Str like [ 'solar', 'onwind'] or empy list []","List of carriers which will not be aggregated. If empty, all carriers will be aggregated." +-- remove stubs,bool,"true/false","Controls whether radial parts of the network should be recursively aggregated. Defaults to true." +-- remove_stubs_across_borders,bool,"true/false","Controls whether radial parts of the network should be recursively aggregated across borders. Defaults to true." cluster_network,,, -- algorithm,str,"One of {‘kmeans’, ‘hac’}", -- feature,str,"Str in the format ‘carrier1+carrier2+...+carrierN-X’, where CarrierI can be from {‘solar’, ‘onwind’, ‘offwind’, ‘ror’} and X is one of {‘cap’, ‘time’}.", diff --git a/doc/configtables/costs.csv b/doc/configtables/costs.csv index c0870ddd..9797d77e 100644 --- a/doc/configtables/costs.csv +++ b/doc/configtables/costs.csv @@ -1,6 +1,6 @@ ,Unit,Values,Description year,--,"YYYY; e.g. '2030'","Year for which to retrieve cost assumptions of ``resources/costs.csv``." -version,--,"vX.X.X; e.g. 'v0.1.0'","Version of ``technology-data`` repository to use." +version,--,"vX.X.X; e.g. 'v0.5.0'","Version of ``technology-data`` repository to use." rooftop_share,--,float,"Share of rooftop PV when calculating capital cost of solar (joint rooftop and utility-scale PV)." fill_values,--,float,"Default values if not specified for a technology in ``resources/costs.csv``." capital_cost,EUR/MW,"Keys should be in the 'technology' column of ``resources/costs.csv``. Values can be any float.","For the given technologies, assumptions about their capital investment costs are set to the corresponding value. Optional; overwrites cost assumptions from ``resources/costs.csv``." diff --git a/doc/configtables/load.csv b/doc/configtables/load.csv index d6cfa686..6e98f881 100644 --- a/doc/configtables/load.csv +++ b/doc/configtables/load.csv @@ -1,5 +1,4 @@ ,Unit,Values,Description -url,--,string,"Link to open power system data time series data." power_statistics,bool,"{true, false}",Whether to load the electricity consumption data of the ENTSOE power statistics (only for files from 2019 and before) or from the ENTSOE transparency data (only has load data from 2015 onwards). interpolate_limit,hours,integer,"Maximum gap size (consecutive nans) which interpolated linearly." time_shift_for_large_gaps,string,string,"Periods which are used for copying time-slices in order to fill large gaps of nans. Have to be valid ``pandas`` period strings." diff --git a/doc/configtables/offwind-ac.csv b/doc/configtables/offwind-ac.csv index d478011d..6b756799 100644 --- a/doc/configtables/offwind-ac.csv +++ b/doc/configtables/offwind-ac.csv @@ -4,10 +4,13 @@ resource,,, -- method,--,"Must be 'wind'","A superordinate technology type." -- turbine,--,"One of turbine types included in `atlite `_","Specifies the turbine type and its characteristic power curve." capacity_per_sqkm,:math:`MW/km^2`,float,"Allowable density of wind turbine placement." +correction_factor,--,float,"Correction factor for capacity factor time series." +excluder_resolution,m,float,"Resolution on which to perform geographical elibility analysis." corine,--,"Any *realistic* subset of the `CORINE Land Cover code list `_","Specifies areas according to CORINE Land Cover codes which are generally eligible for AC-connected offshore wind turbine placement." natura,bool,"{true, false}","Switch to exclude `Natura 2000 `_ natural protection areas. Area is excluded if ``true``." ship_threshold,--,float,"Ship density threshold from which areas are excluded." max_depth,m,float,"Maximum sea water depth at which wind turbines can be build. Maritime areas with deeper waters are excluded in the process of calculating the AC-connected offshore wind potential." min_shore_distance,m,float,"Minimum distance to the shore below which wind turbines cannot be build. Such areas close to the shore are excluded in the process of calculating the AC-connected offshore wind potential." +max_shore_distance,m,float,"Maximum distance to the shore above which wind turbines cannot be build. Such areas close to the shore are excluded in the process of calculating the AC-connected offshore wind potential." potential,--,"One of {'simple', 'conservative'}","Method to compute the maximal installable potential for a node; confer :ref:`renewableprofiles`" clip_p_max_pu,p.u.,float,"To avoid too small values in the renewables` per-unit availability time series values below this threshold are set to zero." diff --git a/doc/configtables/offwind-dc.csv b/doc/configtables/offwind-dc.csv index 67bda165..1f72228a 100644 --- a/doc/configtables/offwind-dc.csv +++ b/doc/configtables/offwind-dc.csv @@ -4,10 +4,13 @@ resource,,, -- method,--,"Must be 'wind'","A superordinate technology type." -- turbine,--,"One of turbine types included in `atlite `__","Specifies the turbine type and its characteristic power curve." capacity_per_sqkm,:math:`MW/km^2`,float,"Allowable density of wind turbine placement." +correction_factor,--,float,"Correction factor for capacity factor time series." +excluder_resolution,m,float,"Resolution on which to perform geographical elibility analysis." corine,--,"Any *realistic* subset of the `CORINE Land Cover code list `_","Specifies areas according to CORINE Land Cover codes which are generally eligible for AC-connected offshore wind turbine placement." natura,bool,"{true, false}","Switch to exclude `Natura 2000 `_ natural protection areas. Area is excluded if ``true``." ship_threshold,--,float,"Ship density threshold from which areas are excluded." max_depth,m,float,"Maximum sea water depth at which wind turbines can be build. Maritime areas with deeper waters are excluded in the process of calculating the AC-connected offshore wind potential." -min_shore_distance,m,float,"Minimum distance to the shore below which wind turbines cannot be build. Such areas close to the shore are excluded in the process of calculating the AC-connected offshore wind potential." +min_shore_distance,m,float,"Minimum distance to the shore below which wind turbines cannot be build." +max_shore_distance,m,float,"Maximum distance to the shore above which wind turbines cannot be build." potential,--,"One of {'simple', 'conservative'}","Method to compute the maximal installable potential for a node; confer :ref:`renewableprofiles`" clip_p_max_pu,p.u.,float,"To avoid too small values in the renewables` per-unit availability time series values below this threshold are set to zero." diff --git a/doc/configtables/onwind.csv b/doc/configtables/onwind.csv index c5f9da20..ba9482e5 100644 --- a/doc/configtables/onwind.csv +++ b/doc/configtables/onwind.csv @@ -11,3 +11,5 @@ corine,,, natura,bool,"{true, false}","Switch to exclude `Natura 2000 `_ natural protection areas. Area is excluded if ``true``." potential,--,"One of {'simple', 'conservative'}","Method to compute the maximal installable potential for a node; confer :ref:`renewableprofiles`" clip_p_max_pu,p.u.,float,"To avoid too small values in the renewables` per-unit availability time series values below this threshold are set to zero." +correction_factor,--,float,"Correction factor for capacity factor time series." +excluder_resolution,m,float,"Resolution on which to perform geographical elibility analysis." diff --git a/doc/configtables/solar.csv b/doc/configtables/solar.csv index 9aa24268..803445d5 100644 --- a/doc/configtables/solar.csv +++ b/doc/configtables/solar.csv @@ -12,3 +12,4 @@ corine,--,"Any subset of the `CORINE Land Cover code list `_ natural protection areas. Area is excluded if ``true``." potential,--,"One of {'simple', 'conservative'}","Method to compute the maximal installable potential for a node; confer :ref:`renewableprofiles`" clip_p_max_pu,p.u.,float,"To avoid too small values in the renewables` per-unit availability time series values below this threshold are set to zero." +excluder_resolution,m,float,"Resolution on which to perform geographical elibility analysis." diff --git a/doc/configtables/solving-options.csv b/doc/configtables/solving-options.csv index f77eec24..e5bbc5f3 100644 --- a/doc/configtables/solving-options.csv +++ b/doc/configtables/solving-options.csv @@ -6,5 +6,5 @@ min_iterations,--,int,"Minimum number of solving iterations in between which res max_iterations,--,int,"Maximum number of solving iterations in between which resistance and reactence (``x/r``) are updated for branches according to ``s_nom_opt`` of the previous run." nhours,--,int,"Specifies the :math:`n` first snapshots to take into account. Must be less than the total number of snapshots. Rather recommended only for debugging." clip_p_max_pu,p.u.,float,"To avoid too small values in the renewables` per-unit availability time series values below this threshold are set to zero." -skip_iterations,bool,"{'true','false'}","Skip iterating, do not update impedances of branches." +skip_iterations,bool,"{'true','false'}","Skip iterating, do not update impedances of branches. Defaults to true." track_iterations,bool,"{'true','false'}","Flag whether to store the intermediate branch capacities and objective function values are recorded for each iteration in ``network.lines['s_nom_opt_X']`` (where ``X`` labels the iteration)" diff --git a/doc/configtables/toplevel.csv b/doc/configtables/toplevel.csv index b7f39d05..bc28b0f6 100644 --- a/doc/configtables/toplevel.csv +++ b/doc/configtables/toplevel.csv @@ -1,15 +1,18 @@ ,Unit,Values,Description -version,--,0.x.x,"Version of PyPSA-Eur" +version,--,0.x.x,"Version of PyPSA-Eur. Descriptive only." tutorial,bool,"{true, false}","Switch to retrieve the tutorial data set instead of the full data set." logging,,, -- level,--,"Any of {'INFO', 'WARNING', 'ERROR'}","Restrict console outputs to all infos, warning or errors only" -- format,--,"","Custom format for log messages. See `LogRecord `_ attributes." -summary_dir,--,"e.g. 'results'","Directory into which results are written." +run,,, +-- name,--,"any string","Specify a name for your run. Results will be stored under this name." +-- shared_cutouts,bool,"{true, false}","Switch to select whether cutouts should be shared across runs." countries,--,"Subset of {'AL', 'AT', 'BA', 'BE', 'BG', 'CH', 'CZ', 'DE', 'DK', 'EE', 'ES', 'FI', 'FR', 'GB', 'GR', 'HR', 'HU', 'IE', 'IT', 'LT', 'LU', 'LV', 'ME', 'MK', 'NL', 'NO', 'PL', 'PT', 'RO', 'RS', 'SE', 'SI', 'SK'}","European countries defined by their `Two-letter country codes (ISO 3166-1) `_ which should be included in the energy system model." focus_weights,--,"Keys should be two-digit country codes (e.g. DE) and values should range between 0 and 1","Ratio of total clusters for particular countries. the remaining weight is distributed according to mean load. An example: ``focus_weights: 'DE': 0.6 'FR': 0.2``." enable,,, -- prepare_links_p_nom,bool,"{true, false}","Switch to retrieve current HVDC projects from `Wikipedia `_" -- retrieve_databundle,bool,"{true, false}","Switch to retrieve databundle from zenodo via the rule :mod:`retrieve_databundle` or whether to keep a custom databundle located in the corresponding folder." +-- retrieve_cost_data,bool,"{true, false}","Switch to retrieve technology cost data from `technology-data repository `_." -- build_cutout,bool,"{true, false}","Switch to enable the building of cutouts via the rule :mod:`build_cutout`." -- retrieve_cutout,bool,"{true, false}","Switch to enable the retrieval of cutouts from zenodo with :mod:`retrieve_cutout`." -- build_natura_raster,bool,"{true, false}","Switch to enable the creation of the raster ``natura.tiff`` via the rule :mod:`build_natura_raster`." diff --git a/doc/configuration.rst b/doc/configuration.rst index 4fdb3719..76debebf 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 @@ -18,7 +18,7 @@ Top-level configuration .. literalinclude:: ../config.default.yaml :language: yaml - :lines: 5-12,20,31-38 + :lines: 5-11,23,30-38 .. csv-table:: @@ -52,7 +52,7 @@ facilitate running multiple scenarios through a single command .. code:: bash - snakemake -j 1 solve_all_networks + snakemake -call solve_all_networks For each wildcard, a **list of values** is provided. The rule ``solve_all_networks`` will trigger the rules for creating ``results/networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc`` for **all combinations** of the provided wildcard values as defined by Python's `itertools.product(...) `_ function that snakemake's `expand(...) function `_ uses. @@ -192,7 +192,7 @@ Define and specify the ``atlite.Cutout`` used for calculating renewable potentia .. _lines_cf: ``conventional`` -============= +================ Define additional generator attribute for conventional carrier types. If a scalar value is given it is applied to all generators. However if a string starting with "data/" is given, the value is interpreted as a path to a csv file with country specific values. Then, the values are read in and applied to all generators of the given carrier in the given country. Note that the value(s) overwrite the existing values in the corresponding section of the ``generators`` dataframe. @@ -252,7 +252,8 @@ Define additional generator attribute for conventional carrier types. If a scala .. literalinclude:: ../config.default.yaml :language: yaml - :lines: 212-217 + :start-at: load: + :end-before: costs: .. csv-table:: :header-rows: 1 diff --git a/doc/contributing.rst b/doc/contributing.rst index 57959124..409201a7 100644 --- a/doc/contributing.rst +++ b/doc/contributing.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 @@ -7,9 +7,9 @@ Contributing ####################### -We happily welcome anyone interested in contributing to this project, -be it with new ideas, suggestions, by filing bug reports or contributing code -to our `GitHub repository `_. +We welcome anyone interested in contributing to this project, be it with new +ideas, suggestions, by filing bug reports or contributing code to our `GitHub +repository `_. * If you already have some code changes, you can submit them directly as a `pull request `_. * If you are wondering where we would greatly appreciate your efforts, check out the ``help wanted`` tag in the `issues list `_ and initiate a discussion there. diff --git a/doc/costs.rst b/doc/costs.rst index 10b91e06..2e8e49a0 100644 --- a/doc/costs.rst +++ b/doc/costs.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 @@ -9,9 +9,7 @@ Cost Assumptions The database of cost assumptions is retrieved from the repository `PyPSA/technology-data `_ and then -saved to ``resources/costs.csv``. Cost assumptions of previous PyPSA-Eur -versions can be restored by setting in the ``Snakefile``: -``COSTS="data/costs.csv"``. +saved to ``resources/costs.csv``. The ``config.yaml`` provides options to choose a reference year (``costs: year:``) and use a specific version of the repository ``costs: version:``. diff --git a/doc/img/pypsa-logo.png b/doc/img/pypsa-logo.png new file mode 100755 index 00000000..fe663fe0 Binary files /dev/null and b/doc/img/pypsa-logo.png differ diff --git a/doc/img/workflow.png b/doc/img/workflow.png index ea4e0ef5..86090270 100644 Binary files a/doc/img/workflow.png and b/doc/img/workflow.png differ diff --git a/doc/index.rst b/doc/index.rst index a5d6092d..d660f8ab 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 @@ -116,7 +116,6 @@ Documentation * :doc:`release_notes` * :doc:`limitations` * :doc:`contributing` -* :doc:`cloudcomputing` .. toctree:: :hidden: @@ -126,7 +125,6 @@ Documentation release_notes limitations contributing - cloudcomputing Warnings ======== @@ -150,8 +148,10 @@ in addition to reading this documentation. - Documentation of `PyPSA `__, the package for simulating and optimising modern power systems which PyPSA-Eur uses under the hood. -- Course on `Energy System Modelling `_, - Karlsruhe Institute of Technology (KIT), `Dr. Tom Brown `_ +- Course on `Energy Systems `_, + Technical University of Berlin (TUB), `Prof. Dr. Tom Brown `_ +- Course on `Data Science for Energy System Modelling `_, + Technical University of Berlin (TUB), `Dr. Fabian Neumann `_ Citing PyPSA-Eur ================ diff --git a/doc/installation.rst b/doc/installation.rst index da1497e6..257e41bb 100644 --- a/doc/installation.rst +++ b/doc/installation.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 @@ -103,8 +103,12 @@ It might be the case that you can only retrieve solutions by using a commercial conda activate pypsa-eur conda install -c conda-forge ipopt glpk -.. warning:: - On Windows, new versions of ``ipopt`` have caused problems. Consider downgrading to version 3.11.1. + or + + .. code:: bash + + conda activate pypsa-eur + pip install highspy .. _defaultconfig: @@ -123,11 +127,3 @@ Before first use, create a ``config.yaml`` by copying the example. Users are advised to regularly check their own ``config.yaml`` against changes in the ``config.default.yaml`` when pulling a new version from the remote repository. - -.. Using PyPSA-Eur with Docker Images -.. ================================== - -.. If docker. Optional. -.. To run on cloud computing. -.. Gurobi license - floating token server - license must not be tied to a particular machine -.. Provide ``Dockerfile``. diff --git a/doc/introduction.rst b/doc/introduction.rst index 8e64b682..c0ab441a 100644 --- a/doc/introduction.rst +++ b/doc/introduction.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 @@ -28,17 +28,18 @@ For instance an invocation to .. code:: bash - .../pypsa-eur % snakemake -j 1 networks/elec_s_128.nc + .../pypsa-eur % snakemake -call results/networks/elec_s_128_ec_lvopt_Co2L-3H.nc follows this dependency graph: .. image:: img/workflow.png + :class: full-width The **blocks** represent the individual rules which are required to create the file ``networks/elec_s_128.nc``. The **arrows** indicate the outputs from preceding rules which a particular rule takes as input data. .. note:: The dependency graph shown above was generated using - ``snakemake --dag networks/elec_s_128.nc | dot -Tpng > workflow.png`` + ``snakemake --dag results/networks/elec_s_128_ec_lvopt_Co2L-3H.nc -F | sed -n "/digraph/,/}/p" | dot -Tpng -o workflow.png`` For the use of ``snakemake``, it makes sense to familiarize oneself quickly with its `basic tutorial `_ and then read carefully through the section `Executing Snakemake `_, noting the arguments ``-j``, ``-n``, ``-r``, but also ``--dag``, ``-R`` and ``-t``. diff --git a/doc/limitations.rst b/doc/limitations.rst index 99c22aed..eb05cddb 100644 --- a/doc/limitations.rst +++ b/doc/limitations.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 diff --git a/doc/make.bat b/doc/make.bat index 2d7118ab..3037f934 100644 --- a/doc/make.bat +++ b/doc/make.bat @@ -1,4 +1,4 @@ -REM SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors +REM SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors REM SPDX-License-Identifier: MIT @ECHO OFF diff --git a/doc/plotting.rst b/doc/plotting.rst index e31cb68f..f3ca8036 100644 --- a/doc/plotting.rst +++ b/doc/plotting.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 diff --git a/doc/preparation.rst b/doc/preparation.rst index 74e53b05..b15080e5 100644 --- a/doc/preparation.rst +++ b/doc/preparation.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 @@ -28,6 +28,7 @@ Then the process continues by calculating conventional power plant capacities, p - :mod:`build_powerplants` for today's thermal power plant capacities using `powerplantmatching `_ allocating these to the closest substation for each powerplant, - :mod:`build_natura_raster` for rasterising NATURA2000 natural protection areas, +- :mod:`build_ship_raster` for building shipping traffic density, - :mod:`build_renewable_profiles` for the hourly capacity factors and installation potentials constrained by land-use in each substation's Voronoi cell for PV, onshore and offshore wind, and - :mod:`build_hydro_profile` for the hourly per-unit hydro power availability time series. @@ -42,6 +43,7 @@ together into a detailed PyPSA network stored in ``networks/elec.nc``. preparation/build_load_data preparation/build_cutout preparation/build_natura_raster + preparation/build_ship_raster preparation/prepare_links_p_nom preparation/base_network preparation/build_bus_regions diff --git a/doc/preparation/add_electricity.rst b/doc/preparation/add_electricity.rst index cec1228c..6c42206b 100644 --- a/doc/preparation/add_electricity.rst +++ b/doc/preparation/add_electricity.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 diff --git a/doc/preparation/base_network.rst b/doc/preparation/base_network.rst index 85e19707..fd3afac3 100644 --- a/doc/preparation/base_network.rst +++ b/doc/preparation/base_network.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 diff --git a/doc/preparation/build_bus_regions.rst b/doc/preparation/build_bus_regions.rst index 7bb761e8..70f2924f 100644 --- a/doc/preparation/build_bus_regions.rst +++ b/doc/preparation/build_bus_regions.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 diff --git a/doc/preparation/build_cutout.rst b/doc/preparation/build_cutout.rst index 2e6cb4a3..0dc71d3a 100644 --- a/doc/preparation/build_cutout.rst +++ b/doc/preparation/build_cutout.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 diff --git a/doc/preparation/build_hydro_profile.rst b/doc/preparation/build_hydro_profile.rst index b940c39f..0217dbda 100644 --- a/doc/preparation/build_hydro_profile.rst +++ b/doc/preparation/build_hydro_profile.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 diff --git a/doc/preparation/build_load_data.rst b/doc/preparation/build_load_data.rst index 3a42410e..723d71ac 100644 --- a/doc/preparation/build_load_data.rst +++ b/doc/preparation/build_load_data.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2020-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2020-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 diff --git a/doc/preparation/build_natura_raster.rst b/doc/preparation/build_natura_raster.rst index b60be2f4..e5744843 100644 --- a/doc/preparation/build_natura_raster.rst +++ b/doc/preparation/build_natura_raster.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 diff --git a/doc/preparation/build_powerplants.rst b/doc/preparation/build_powerplants.rst index e3d5dcef..625d7d9b 100644 --- a/doc/preparation/build_powerplants.rst +++ b/doc/preparation/build_powerplants.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 diff --git a/doc/preparation/build_renewable_profiles.rst b/doc/preparation/build_renewable_profiles.rst index 82ac1312..1d8a7e0b 100644 --- a/doc/preparation/build_renewable_profiles.rst +++ b/doc/preparation/build_renewable_profiles.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 diff --git a/doc/preparation/build_shapes.rst b/doc/preparation/build_shapes.rst index fc142879..ecbf2685 100644 --- a/doc/preparation/build_shapes.rst +++ b/doc/preparation/build_shapes.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 diff --git a/doc/preparation/build_ship_raster.rst b/doc/preparation/build_ship_raster.rst new file mode 100644 index 00000000..5a38195e --- /dev/null +++ b/doc/preparation/build_ship_raster.rst @@ -0,0 +1,12 @@ +.. + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors + + SPDX-License-Identifier: CC-BY-4.0 + +.. _ship: + +Rule ``build_ship_raster`` +=============================== + + +.. automodule:: build_ship_raster diff --git a/doc/preparation/prepare_links_p_nom.rst b/doc/preparation/prepare_links_p_nom.rst index 78e7324d..37690939 100644 --- a/doc/preparation/prepare_links_p_nom.rst +++ b/doc/preparation/prepare_links_p_nom.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 diff --git a/doc/preparation/retrieve.rst b/doc/preparation/retrieve.rst index a10c96fa..7c0db92a 100644 --- a/doc/preparation/retrieve.rst +++ b/doc/preparation/retrieve.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 @@ -77,3 +77,55 @@ This rule, as a substitute for :mod:`build_natura_raster`, downloads an already .. seealso:: For details see :mod:`build_natura_raster`. + + +Rule ``retrieve_load_data`` +--------------------------- + +This rule downloads hourly electric load data for each country from the `OPSD platform `_. + +**Relevant Settings** + +None. + +**Outputs** + +- ``data/load_raw.csv`` + + +Rule ``retrieve_cost_data`` +--------------------------- + +This rule downloads techno-economic assumptions from the `technology-data repository `_. + +**Relevant Settings** + +.. code:: yaml + + enable: + retrieve_cost_data: + + costs: + year: + version: + +.. seealso:: + Documentation of the configuration file ``config.yaml`` at + :ref:`costs_cf` + +**Outputs** + +- ``resources/costs.csv`` + +Rule ``retrieve_ship_raster`` +----------------------------- + +This rule downloads data on global shipping traffic density from the `World Bank Data Catalogue `_. + +**Relevant Settings** + +None. + +**Outputs** + +- ``data/shipdensity_global.zip`` diff --git a/doc/release_notes.rst b/doc/release_notes.rst index adcbfb58..f5048ad0 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 @@ -10,19 +10,80 @@ Release Notes Upcoming Release ================ -* Fix EQ constraint for the case no hydro inflow is available +* new features + + +PyPSA-Eur 0.7.0 (16th February 2023) +==================================== -* Bugfix in the reserve constraint will increase demand related reserve requirements **New Features** -* Carriers of generators can now be excluded from aggregation in clustering network and simplify network. +* Carriers of generators can now be excluded from aggregation in clustering + network and simplify network (see ``exclude_carriers``). + +* Added control for removing stubs in :mod:`simplify_network` with options + ``remove_stubs`` and ``remove_stubs_across_countries``. + +* Add control for showing a progressbar in ``atlite`` processes + (``show_progress``). Disabling the progressbar saves a lot of time. + +* Added control for resolution of land eligibility analysis (see + ``excluder_resolution``). + **Breaking Changes** -* The config entry ``snapshots["closed"]`` was renamed to ``snapshots["inclusive"]`` to address the upstream deprecation with ``pandas=1.4``. - The previous setting ``None`` is no longer supported and replaced by ``both``, see the `pandas documentation `_. - Minimum ``pandas`` version now required is `>= 1.4`. +* The config entry ``snapshots: closed:`` was renamed to ``snapshots: + inclusive:`` to address the upstream deprecation with ``pandas=1.4``. The + previous setting ``None`` is no longer supported and replaced by ``both``, see + the `pandas documentation + `_. + Minimum version is now ``pandas>=1.4``. + +* The configuration setting ``summary_dir`` was removed. + + +**Changes** + +* Configuration defaults to new ``technology-data`` version 0.5.0. + +* Fixed CRS warnings when projection of datasets was not specified. + +* Cleaned shape unary unions. + +* Increased resource requirements for some rules. + +* Updated documentation. + +* The documentation now uses the ``sphinx_book_theme``. + + +**Bugs and Compatibility** + + +* Bugfix: Corrected extent of natural protection areas in :mod:`build_natura_raster`. + +* Bugfix: Use correct load variables for formulating reserve constraints. + +* Bugfix: Use all available energy-to-power ratios for hydropower plants. + +* Bugfix: The most recent processing of the ``entsoegridkit`` extract required + further manual corrections. Also, the connection points of TYNDP links were + corrected. + +* Bugfix: Handle absence of hydropower inflow in ``EQ`` constraint. + +* Compatibility with ``pyomo>=6.4.3`` in :mod:`cluster_network`. + +* Upgrade to ``shapely>=2``. + +* Updated version of CI cache action to version 3. +* +* Updated dependency constraints in ``environment.yaml``. + +* Address various deprecation warnings. + PyPSA-Eur 0.6.1 (20th September 2022) @@ -75,27 +136,20 @@ PyPSA-Eur 0.5.0 (27th July 2022) **New Features** * New network topology extracted from the ENTSO-E interactive map. - * Added existing renewable capacities for all countries based on IRENA statistics (IRENASTAT) using new ``powerplantmatching`` version: - * The corresponding ``config`` entries changed, cf. ``config.default.yaml``: - * old: ``estimate_renewable_capacities_from_capacity_stats`` - * new: ``estimate_renewable_capacities`` - * The estimation is endabled by setting the subkey ``enable`` to ``True``. - * Configuration of reference year for capacities can be configured (default: - ``2020``) - * The list of renewables provided by the OPSD database can be used as a basis, - using the tag ``from_opsd: True``. This adds the renewables from the - database and fills up the missing capacities with the heuristic - distribution. - * Uniform expansion limit of renewable build-up based on existing capacities - can be configured using ``expansion_limit`` option (default: ``false``; - limited to determined renewable potentials) - * Distribution of country-level capacities proportional to maximum annual - energy yield for each bus region - * The config key ``renewable_capacities_from_OPSD`` is deprecated and was moved - under the section, ``estimate_renewable_capacities``. To enable it, set - ``from_opsd`` to ``True``. +* The corresponding ``config`` entries changed from ``estimate_renewable_capacities_from_capacity_stats`` to ``estimate_renewable_capacities``. +* The estimation is endabled by setting the subkey ``enable`` to ``True``. +* Configuration of reference year for capacities can be configured (default: ``2020``) +* The list of renewables provided by the OPSD database can be used as a basis, using the tag ``from_opsd: True``. This adds the renewables from the database and fills up the missing capacities with the heuristic distribution. +* Uniform expansion limit of renewable build-up based on existing capacities + can be configured using ``expansion_limit`` option (default: ``false``; + limited to determined renewable potentials) +* Distribution of country-level capacities proportional to maximum annual + energy yield for each bus region +* The config key ``renewable_capacities_from_OPSD`` is deprecated and was moved + under the section, ``estimate_renewable_capacities``. To enable it, set + ``from_opsd`` to ``True``. * Add operational reserve margin constraint analogous to `GenX implementation `_. Can be activated @@ -557,7 +611,7 @@ Release Process * Update ``envs/environment.fixed.yaml`` via ``conda env export -n pypsa-eur -f envs/environment.fixed.yaml --no-builds`` - from an up-to-date `pypsa-eur` environment. + from an up-to-date ``pypsa-eur`` environment. * Update version number in ``doc/conf.py``, ``CITATION.cff`` and ``*config.*.yaml``. @@ -568,7 +622,7 @@ Release Process * Upload code to `zenodo code repository `_ with `MIT license `_. -* Create pre-built networks for ``config.default.yaml`` by running ``snakemake -j 1 extra_components_all_networks``. +* Create pre-built networks for ``config.default.yaml`` by running ``snakemake -call extra_components_all_networks``. * Upload pre-built networks to `zenodo data repository `_ with `CC BY 4.0 `_ license. diff --git a/doc/requirements.txt b/doc/requirements.txt index e048b4af..9aaaa05d 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,15 +1,15 @@ -# SPDX-FileCopyrightText: : 2019-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2019-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: CC0-1.0 sphinx -sphinx_rtd_theme +sphinx_book_theme pypsa vresutils>=0.3.1 -powerplantmatching>=0.4.8 -atlite>=0.2.2 -dask<=2021.3.1 +powerplantmatching>=0.5.5 +atlite>=0.2.9 +dask # cartopy scikit-learn diff --git a/doc/simplification.rst b/doc/simplification.rst index 3ac12d4f..aa6d2b0d 100644 --- a/doc/simplification.rst +++ b/doc/simplification.rst @@ -1,7 +1,7 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 diff --git a/doc/simplification/add_extra_components.rst b/doc/simplification/add_extra_components.rst index 8ca30574..bf817afd 100644 --- a/doc/simplification/add_extra_components.rst +++ b/doc/simplification/add_extra_components.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 diff --git a/doc/simplification/cluster_network.rst b/doc/simplification/cluster_network.rst index 80c9068d..5d5c041c 100644 --- a/doc/simplification/cluster_network.rst +++ b/doc/simplification/cluster_network.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 diff --git a/doc/simplification/prepare_network.rst b/doc/simplification/prepare_network.rst index 037f8190..0668e972 100644 --- a/doc/simplification/prepare_network.rst +++ b/doc/simplification/prepare_network.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 diff --git a/doc/simplification/simplify_network.rst b/doc/simplification/simplify_network.rst index 9bbd66c6..452e5fe1 100644 --- a/doc/simplification/simplify_network.rst +++ b/doc/simplification/simplify_network.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 diff --git a/doc/solving.rst b/doc/solving.rst index 55707d79..6f215904 100644 --- a/doc/solving.rst +++ b/doc/solving.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 diff --git a/doc/solving/solve_network.rst b/doc/solving/solve_network.rst index 4fe18368..afbc7634 100644 --- a/doc/solving/solve_network.rst +++ b/doc/solving/solve_network.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 diff --git a/doc/solving/solve_operations_network.rst b/doc/solving/solve_operations_network.rst index d51fd5ab..67cb51ec 100644 --- a/doc/solving/solve_operations_network.rst +++ b/doc/solving/solve_operations_network.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 diff --git a/doc/tutorial.rst b/doc/tutorial.rst index 297c2c10..507102db 100644 --- a/doc/tutorial.rst +++ b/doc/tutorial.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 @@ -37,7 +37,7 @@ To run the tutorial, use this as your configuration file ``config.yaml``. This configuration is set to download a reduced data set via the rules :mod:`retrieve_databundle`, :mod:`retrieve_natura_raster`, :mod:`retrieve_cutout` totalling at less than 250 MB. -The full set of data dependencies would consume 5.3 GB. +The full set of data dependencies would take 5.3 GB. For more information on the data dependencies of PyPSA-Eur, continue reading :ref:`data`. How to customise PyPSA-Eur? @@ -62,7 +62,7 @@ It is also possible to allow less or more carbon-dioxide emissions. Here, we lim .. literalinclude:: ../config.tutorial.yaml :language: yaml :start-at: electricity: - :end-before: exentable_carriers: + :end-before: extendable_carriers: PyPSA-Eur also includes a database of existing conventional powerplants. We can select which types of powerplants we like to be included: @@ -107,8 +107,8 @@ on the commercial solvers Gurobi or CPLEX (for which free academic licenses are Alternatively, choose another installed solver in the ``config.yaml`` at ``solving: solver:``. -Note, that we only note major changes to the provided default configuration that is comprehensibly documented in :ref:`config`. -There are many more configuration options beyond what is adapted for the tutorial! +Note, that we only focus on changes relative to the default configuration. +There are many more configuration options, which are documented at :ref:`config`. How to use the ``snakemake`` rules? =================================== @@ -124,7 +124,7 @@ clustered down to 6 buses and every 24 hours aggregated to one snapshot. The com .. code:: bash - .../pypsa-eur % snakemake -j 1 results/networks/elec_s_6_ec_lcopt_Co2L-24H.nc + .../pypsa-eur % snakemake -call results/networks/elec_s_6_ec_lcopt_Co2L-24H.nc orders ``snakemake`` to run the script ``solve_network`` that produces the solved network and stores it in ``.../pypsa-eur/results/networks`` with the name ``elec_s_6_ec_lcopt_Co2L-24H.nc``: @@ -132,61 +132,99 @@ orders ``snakemake`` to run the script ``solve_network`` that produces the solve :start-at: rule solve_network: :end-before: rule solve_operations_network: -.. until https://github.com/snakemake/snakemake/issues/46 closed - This triggers a workflow of multiple preceding jobs that depend on each rule's inputs and outputs: .. graphviz:: + :class: full-width :align: center digraph snakemake_dag { graph[bgcolor=white, margin=0]; - node[shape=box, style=rounded, fontname=sans, fontsize=10, penwidth=2]; + node[shape=box, style=rounded, fontname=sans, fontsize=10, penwidth=2]; edge[penwidth=2, color=grey]; - 0[label = "solve_network", color = "0.10 0.6 0.85", style="rounded"]; - 1[label = "prepare_network\nll: copt\nopts: Co2L-24H", color = "0.13 0.6 0.85", style="rounded"]; - 2[label = "cluster_network\nclusters: 6", color = "0.51 0.6 0.85", style="rounded"]; - 3[label = "simplify_network\nnetwork: elec\nsimpl: ", color = "0.00 0.6 0.85", style="rounded"]; - 4[label = "add_electricity", color = "0.60 0.6 0.85", style="rounded"]; - 5[label = "build_bus_regions", color = "0.19 0.6 0.85", style="rounded"]; - 6[label = "base_network", color = "0.38 0.6 0.85", style="rounded"]; - 7[label = "build_shapes", color = "0.03 0.6 0.85", style="rounded"]; - 8[label = "build_renewable_profiles\ntechnology: onwind", color = "0.48 0.6 0.85", style="rounded"]; - 9[label = "build_renewable_profiles\ntechnology: offwind-ac", color = "0.48 0.6 0.85", style="rounded"]; - 10[label = "build_renewable_profiles\ntechnology: offwind-dc", color = "0.48 0.6 0.85", style="rounded"]; - 11[label = "build_renewable_profiles\ntechnology: solar", color = "0.48 0.6 0.85", style="rounded"]; - 12[label = "build_cutout\ncutout: europe-2013-era5", color = "0.35 0.6 0.85", style="rounded,dashed"]; + 0[label = "solve_network", color = "0.21 0.6 0.85", style="rounded"]; + 1[label = "prepare_network\nll: copt\nopts: Co2L-24H", color = "0.02 0.6 0.85", style="rounded"]; + 2[label = "add_extra_components", color = "0.37 0.6 0.85", style="rounded"]; + 3[label = "cluster_network\nclusters: 6", color = "0.39 0.6 0.85", style="rounded"]; + 4[label = "simplify_network\nsimpl: ", color = "0.11 0.6 0.85", style="rounded"]; + 5[label = "add_electricity", color = "0.23 0.6 0.85", style="rounded"]; + 6[label = "build_renewable_profiles\ntechnology: onwind", color = "0.57 0.6 0.85", style="rounded"]; + 7[label = "base_network", color = "0.09 0.6 0.85", style="rounded"]; + 8[label = "build_shapes", color = "0.41 0.6 0.85", style="rounded"]; + 9[label = "retrieve_databundle", color = "0.28 0.6 0.85", style="rounded"]; + 10[label = "retrieve_natura_raster", color = "0.62 0.6 0.85", style="rounded"]; + 11[label = "build_bus_regions", color = "0.53 0.6 0.85", style="rounded"]; + 12[label = "retrieve_cutout\ncutout: europe-2013-era5", color = "0.05 0.6 0.85", style="rounded,dashed"]; + 13[label = "build_renewable_profiles\ntechnology: offwind-ac", color = "0.57 0.6 0.85", style="rounded"]; + 14[label = "build_ship_raster", color = "0.64 0.6 0.85", style="rounded"]; + 15[label = "retrieve_ship_raster", color = "0.07 0.6 0.85", style="rounded,dashed"]; + 16[label = "retrieve_cutout\ncutout: europe-2013-sarah", color = "0.05 0.6 0.85", style="rounded,dashed"]; + 17[label = "build_renewable_profiles\ntechnology: offwind-dc", color = "0.57 0.6 0.85", style="rounded"]; + 18[label = "build_renewable_profiles\ntechnology: solar", color = "0.57 0.6 0.85", style="rounded"]; + 19[label = "build_hydro_profile", color = "0.44 0.6 0.85", style="rounded"]; + 20[label = "retrieve_cost_data", color = "0.30 0.6 0.85", style="rounded"]; + 21[label = "build_powerplants", color = "0.16 0.6 0.85", style="rounded"]; + 22[label = "build_load_data", color = "0.00 0.6 0.85", style="rounded"]; + 23[label = "retrieve_load_data", color = "0.34 0.6 0.85", style="rounded,dashed"]; 1 -> 0 2 -> 1 + 20 -> 1 3 -> 2 + 20 -> 2 4 -> 3 - 5 -> 3 - 6 -> 4 + 20 -> 3 5 -> 4 - 7 -> 4 - 8 -> 4 - 9 -> 4 - 10 -> 4 + 20 -> 4 11 -> 4 - 7 -> 5 6 -> 5 + 13 -> 5 + 17 -> 5 + 18 -> 5 + 19 -> 5 + 7 -> 5 + 20 -> 5 + 11 -> 5 + 21 -> 5 + 9 -> 5 + 22 -> 5 + 8 -> 5 7 -> 6 - 6 -> 8 - 7 -> 8 - 5 -> 8 - 12 -> 8 - 6 -> 9 - 7 -> 9 - 5 -> 9 - 12 -> 9 - 6 -> 10 - 7 -> 10 - 5 -> 10 - 12 -> 10 - 6 -> 11 + 9 -> 6 + 10 -> 6 + 8 -> 6 + 11 -> 6 + 12 -> 6 + 8 -> 7 + 9 -> 8 + 8 -> 11 7 -> 11 - 5 -> 11 - 12 -> 11 + 7 -> 13 + 9 -> 13 + 10 -> 13 + 14 -> 13 + 8 -> 13 + 11 -> 13 + 12 -> 13 + 15 -> 14 + 12 -> 14 + 16 -> 14 + 7 -> 17 + 9 -> 17 + 10 -> 17 + 14 -> 17 + 8 -> 17 + 11 -> 17 + 12 -> 17 + 7 -> 18 + 9 -> 18 + 10 -> 18 + 8 -> 18 + 11 -> 18 + 16 -> 18 + 8 -> 19 + 12 -> 19 + 7 -> 21 + 23 -> 22 } | @@ -196,57 +234,47 @@ In the terminal, this will show up as a list of jobs to be run: .. code:: bash Building DAG of jobs... - Using shell: /bin/bash - Provided cores: 1 - Rules claiming more threads will be scaled down. - Unlimited resources: mem - Job counts: - count jobs - 1 add_electricity - 1 base_network - 1 build_bus_regions - 4 build_renewable_profiles - 1 build_shapes - 1 cluster_network - 1 prepare_network - 1 simplify_network - 1 solve_network - 12 + Job stats: + job count min threads max threads + ------------------------ ------- ------------- ------------- + add_electricity 1 1 1 + add_extra_components 1 1 1 + base_network 1 1 1 + build_bus_regions 1 1 1 + build_hydro_profile 1 1 1 + build_load_data 1 1 1 + build_powerplants 1 1 1 + build_renewable_profiles 4 1 1 + build_shapes 1 1 1 + build_ship_raster 1 1 1 + cluster_network 1 1 1 + prepare_network 1 1 1 + retrieve_cost_data 1 1 1 + retrieve_databundle 1 1 1 + retrieve_natura_raster 1 1 1 + simplify_network 1 1 1 + solve_network 1 1 1 + total 20 1 1 + ``snakemake`` then runs these jobs in the correct order. -A job (here ``simplify_network``) will display its attributes and normally some logs in the terminal: +A job (here ``simplify_network``) will display its attributes and normally some logs below this block: .. code:: bash - [] + [Mon Jan 1 00:00:00 2023] rule simplify_network: input: networks/elec.nc, resources/costs.csv, resources/regions_onshore.geojson, resources/regions_offshore.geojson - output: networks/elec_s.nc, resources/regions_onshore_elec_s.geojson, resources/regions_offshore_elec_s.geojson, resources/clustermaps_elec_s.h5 - jobid: 3 + output: networks/elec_s.nc, resources/regions_onshore_elec_s.geojson, resources/regions_offshore_elec_s.geojson, resources/busmap_elec_s.csv, resources/connection_costs_s.csv + log: logs/simplify_network/elec_s.log + jobid: 4 benchmark: benchmarks/simplify_network/elec_s - wildcards: network=elec, simpl= - resources: mem=4000 + reason: Missing output files: resources/busmap_elec_s.csv, resources/regions_onshore_elec_s.geojson, networks/elec_s.nc, resources/regions_offshore_elec_s.geojson; Input files updated by another job: resources/regions_offshore.geojson, resources/regions_onshore.geojson, resources/costs.csv, networks/elec.nc + wildcards: simpl= + resources: tmpdir=/tmp, mem_mb=4000, mem_mib=3815 - INFO:pypsa.io:Imported network elec.nc has buses, carriers, generators, lines, links, loads, storage_units, transformers - INFO:__main__:Mapping all network lines onto a single 380kV layer - INFO:__main__:Simplifying connected link components - INFO:__main__:Removing stubs - INFO:__main__:Displacing offwind-ac generator(s) and adding connection costs to capital_costs: 20128 Eur/MW/a for `5718 offwind-ac` - INFO:__main__:Displacing offwind-dc generator(s) and adding connection costs to capital_costs: 14994 Eur/MW/a for `5718 offwind-dc`, 26939 Eur/MW/a for `5724 offwind-dc`, 29621 Eur/MW/a for `5725 offwind-dc` - INFO:pypsa.io:Exported network elec_s.nc has lines, carriers, links, storage_units, loads, buses, generators - [] - Finished job 3. - 9 of 12 steps (75%) done - -Once the whole worktree is finished, it should show state so in the terminal: - -.. code:: bash - - Finished job 0. - 12 of 12 steps (100%) done - Complete log: /home/XXXX/pypsa-eur/.snakemake/log/20XX-XX-XXTXX.snakemake.log - snakemake results/networks/elec_s_6_ec_lcopt_Co2L-24H.nc 519,84s user 34,26s system 242% cpu 3:48,83 total +Once the whole worktree is finished, it should state so in the terminal. You will notice that many intermediate stages are saved, namely the outputs of each individual ``snakemake`` rule. @@ -254,15 +282,15 @@ You can produce any output file occurring in the ``Snakefile`` by running .. code:: bash - .../pypsa-eur % snakemake -j 1 + .../pypsa-eur % snakemake -call For example, you can explore the evolution of the PyPSA networks by running -#. ``.../pypsa-eur % snakemake -j 1 networks/base.nc`` -#. ``.../pypsa-eur % snakemake -j 1 networks/elec.nc`` -#. ``.../pypsa-eur % snakemake -j 1 networks/elec_s.nc`` -#. ``.../pypsa-eur % snakemake -j 1 networks/elec_s_6.nc`` -#. ``.../pypsa-eur % snakemake -j 1 networks/elec_s_6_ec_lcopt_Co2L-24H.nc`` +#. ``.../pypsa-eur % snakemake -call networks/base.nc`` +#. ``.../pypsa-eur % snakemake -call networks/elec.nc`` +#. ``.../pypsa-eur % snakemake -call networks/elec_s.nc`` +#. ``.../pypsa-eur % snakemake -call networks/elec_s_6.nc`` +#. ``.../pypsa-eur % snakemake -call networks/elec_s_6_ec_lcopt_Co2L-24H.nc`` There's a special rule: If you simply run diff --git a/doc/wildcards.rst b/doc/wildcards.rst index 14b71c09..c506a541 100644 --- a/doc/wildcards.rst +++ b/doc/wildcards.rst @@ -1,5 +1,5 @@ .. - SPDX-FileCopyrightText: 2019-2022 The PyPSA-Eur Authors + SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors SPDX-License-Identifier: CC-BY-4.0 @@ -107,7 +107,7 @@ in Germany (in the solution for Europe) use: .. code:: bash - snakemake -j 1 results/summaries/elec_s_all_lall_Co2L-3H_DE + snakemake -call results/summaries/elec_s_all_lall_Co2L-3H_DE .. _cutout_wc: diff --git a/envs/environment.fixed.yaml b/envs/environment.fixed.yaml index 1c7aeaad..f1f1958e 100644 --- a/envs/environment.fixed.yaml +++ b/envs/environment.fixed.yaml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: CC0-1.0 diff --git a/envs/environment.yaml b/envs/environment.yaml index 4bdaf48c..3e366074 100644 --- a/envs/environment.yaml +++ b/envs/environment.yaml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT @@ -24,7 +24,7 @@ dependencies: - yaml - pytables - lxml -- powerplantmatching>=0.5.4 +- powerplantmatching>=0.5.5 - numpy<1.24 - pandas>=1.4 - geopandas>=0.11.0 diff --git a/scripts/_helpers.py b/scripts/_helpers.py index 127e42a8..5032cdf9 100644 --- a/scripts/_helpers.py +++ b/scripts/_helpers.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT diff --git a/scripts/add_electricity.py b/scripts/add_electricity.py index 7407dafa..88ea2ada 100755 --- a/scripts/add_electricity.py +++ b/scripts/add_electricity.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT diff --git a/scripts/add_extra_components.py b/scripts/add_extra_components.py index ba784096..b507148d 100644 --- a/scripts/add_extra_components.py +++ b/scripts/add_extra_components.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT diff --git a/scripts/base_network.py b/scripts/base_network.py index 565d4907..609b2818 100644 --- a/scripts/base_network.py +++ b/scripts/base_network.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT diff --git a/scripts/build_bus_regions.py b/scripts/build_bus_regions.py index ef4cc396..47bc9d4d 100644 --- a/scripts/build_bus_regions.py +++ b/scripts/build_bus_regions.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT diff --git a/scripts/build_cutout.py b/scripts/build_cutout.py index 0d852b5b..9df4e6de 100644 --- a/scripts/build_cutout.py +++ b/scripts/build_cutout.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT diff --git a/scripts/build_hydro_profile.py b/scripts/build_hydro_profile.py index 0e3f877f..3e36a1b9 100644 --- a/scripts/build_hydro_profile.py +++ b/scripts/build_hydro_profile.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT diff --git a/scripts/build_natura_raster.py b/scripts/build_natura_raster.py index 33e4cf99..8a20e859 100644 --- a/scripts/build_natura_raster.py +++ b/scripts/build_natura_raster.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT diff --git a/scripts/build_powerplants.py b/scripts/build_powerplants.py index f65b4966..4158349e 100755 --- a/scripts/build_powerplants.py +++ b/scripts/build_powerplants.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT diff --git a/scripts/build_renewable_profiles.py b/scripts/build_renewable_profiles.py index 22b76814..c8a0fc42 100644 --- a/scripts/build_renewable_profiles.py +++ b/scripts/build_renewable_profiles.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT diff --git a/scripts/build_shapes.py b/scripts/build_shapes.py index 29fa6052..3daed847 100644 --- a/scripts/build_shapes.py +++ b/scripts/build_shapes.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT diff --git a/scripts/build_ship_raster.py b/scripts/build_ship_raster.py index 0ae134fd..d290e616 100644 --- a/scripts/build_ship_raster.py +++ b/scripts/build_ship_raster.py @@ -4,11 +4,11 @@ # SPDX-License-Identifier: MIT """ -Transforms the global ship density data from -https://datacatalog.worldbank.org/search/dataset/0037580/Global-Shipping- -Traffic-Density to the size of the considered cutout. The global ship density -raster is later used for the exclusion when calculating the offshore -potentials. +Transforms the global ship density data from the `World Bank Data Catalogue. + +`_ +to the size of the considered cutout. The global ship density raster is later +used for the exclusion when calculating the offshore potentials. Relevant Settings ----------------- @@ -26,12 +26,17 @@ Relevant Settings Inputs ------ -- ``data/bundle/shipdensity/shipdensity_global.zip``: `Global ship density from `. +- ``data/bundle/shipdensity/shipdensity_global.zip``: Global shipping traffic + density from `World Bank Data Catalogue + `_. Outputs ------- -- ``resources/europe_shipdensity_raster.nc``: Reduced version of `Global ship density from `_ to reduce + computation time. Description ----------- diff --git a/scripts/cluster_network.py b/scripts/cluster_network.py index 6a1d58ec..0f01ec8c 100644 --- a/scripts/cluster_network.py +++ b/scripts/cluster_network.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT diff --git a/scripts/make_summary.py b/scripts/make_summary.py index 815f7aec..841421dc 100644 --- a/scripts/make_summary.py +++ b/scripts/make_summary.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT diff --git a/scripts/plot_network.py b/scripts/plot_network.py index ff4d34cc..31440736 100755 --- a/scripts/plot_network.py +++ b/scripts/plot_network.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT diff --git a/scripts/plot_p_nom_max.py b/scripts/plot_p_nom_max.py index 4577401d..7b6cd7b3 100644 --- a/scripts/plot_p_nom_max.py +++ b/scripts/plot_p_nom_max.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT diff --git a/scripts/plot_summary.py b/scripts/plot_summary.py index c05db561..78552c16 100644 --- a/scripts/plot_summary.py +++ b/scripts/plot_summary.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT diff --git a/scripts/prepare_links_p_nom.py b/scripts/prepare_links_p_nom.py index 55da75eb..7c63f3a4 100644 --- a/scripts/prepare_links_p_nom.py +++ b/scripts/prepare_links_p_nom.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT diff --git a/scripts/prepare_network.py b/scripts/prepare_network.py index 645f8c34..37754343 100755 --- a/scripts/prepare_network.py +++ b/scripts/prepare_network.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT diff --git a/scripts/retrieve_databundle.py b/scripts/retrieve_databundle.py index f16a196c..6ae09a10 100644 --- a/scripts/retrieve_databundle.py +++ b/scripts/retrieve_databundle.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright 2019-2022 Fabian Hofmann (TUB, FIAS) -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT diff --git a/scripts/simplify_network.py b/scripts/simplify_network.py index a4216450..ded6e9e7 100644 --- a/scripts/simplify_network.py +++ b/scripts/simplify_network.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT diff --git a/scripts/solve_network.py b/scripts/solve_network.py index 8a964593..4804a23c 100755 --- a/scripts/solve_network.py +++ b/scripts/solve_network.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT diff --git a/scripts/solve_operations_network.py b/scripts/solve_operations_network.py index 76918b5a..e58a6716 100644 --- a/scripts/solve_operations_network.py +++ b/scripts/solve_operations_network.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT diff --git a/test/config.test1.yaml b/test/config.test1.yaml index 253446ef..399d2265 100755 --- a/test/config.test1.yaml +++ b/test/config.test1.yaml @@ -1,8 +1,8 @@ -# SPDX-FileCopyrightText: : 2017-2022 The PyPSA-Eur Authors +# SPDX-FileCopyrightText: : 2017-2023 The PyPSA-Eur Authors # # SPDX-License-Identifier: CC0-1.0 -version: 0.6.1 +version: 0.7.0 tutorial: true logging: level: INFO @@ -48,9 +48,30 @@ electricity: battery: 6 H2: 168 - powerplants_filter: false # use pandas query strings here, e.g. Country not in ['Germany'] - custom_powerplants: false # use pandas query strings here, e.g. Country in ['Germany'] - conventional_carriers: [coal, CCGT] # [nuclear, oil, OCGT, CCGT, coal, lignite, geothermal, biomass] + # use pandas query strings here, e.g. Country not in ['Germany'] + powerplants_filter: (DateOut >= 2022 or DateOut != DateOut) + # use pandas query strings here, e.g. Country in ['Germany'] + custom_powerplants: false + + conventional_carriers: [nuclear, oil, OCGT, CCGT, coal, lignite, geothermal, biomass] + renewable_carriers: [solar, onwind, offwind-ac, offwind-dc, hydro] + + estimate_renewable_capacities: + enable: true + # Add capacities from OPSD data + from_opsd: true + # Renewable capacities are based on existing capacities reported by IRENA + year: 2020 + # Artificially limit maximum capacities to factor * (IRENA capacities), + # i.e. 110% of 's capacities => expansion_limit: 1.1 + # false: Use estimated renewable potentials determine by the workflow + expansion_limit: false + technology_mapping: + # Wind is the Fueltype in powerplantmatching, onwind, offwind-{ac,dc} the carrier in PyPSA-Eur + Offshore: [offwind-ac, offwind-dc] + Onshore: [onwind] + PV: [solar] + atlite: nprocesses: 4 @@ -160,7 +181,7 @@ load: costs: year: 2030 - version: v0.4.0 + version: v0.5.0 rooftop_share: 0.14 fill_values: FOM: 0