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..cf6eca97 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 @@ -9,8 +9,8 @@ from snakemake.remote.HTTP import RemoteProvider as HTTPRemoteProvider HTTP = HTTPRemoteProvider() -if not exists("config.yaml"): - copyfile("config.default.yaml", "config.yaml") +# if not exists("config.yaml"): +# copyfile("config.default.yaml", "config.yaml") configfile: "config.yaml" 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..ab8d54a4 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: @@ -163,7 +163,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..5d723480 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,14 @@ 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, } @@ -144,14 +144,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: An Open Optimisation Model of the European Transmission System" # 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 @@ -163,7 +163,7 @@ 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..7bb8139e 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:: @@ -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/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..835dd59c 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 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..8911309f 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..70442818 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,9 +10,16 @@ Release Notes Upcoming Release ================ -* Fix EQ constraint for the case no hydro inflow is available +* Fix EQ constraint for the case no hydro inflow is available. + +* Bugfix in the reserve constraint will increase demand related reserve requirements. + +* Configuration defaults to new ``technology-data`` version 0.5.0. + +* Updated documentation. + +* Added control for resolution of land eligibility analysis. -* Bugfix in the reserve constraint will increase demand related reserve requirements **New Features** @@ -24,6 +31,8 @@ Upcoming Release 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 configuration setting ``summary_dir`` was removed. + PyPSA-Eur 0.6.1 (20th September 2022) ===================================== 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..a3dead1f 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? @@ -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? =================================== @@ -132,8 +132,6 @@ 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:: @@ -196,57 +194,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. diff --git a/doc/wildcards.rst b/doc/wildcards.rst index 14b71c09..06ed9519 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 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 42118b7d..6becdaca 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..52c48b03 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,15 @@ Relevant Settings Inputs ------ -- ``data/bundle/shipdensity/shipdensity_global.zip``: `Global ship density from `. +- ``data/bundle/shipdensity/shipdensity_global.zip``: `Global ship density from + `_. Outputs ------- -- ``resources/europe_shipdensity_raster.nc``: Reduced version of `Global ship density from