Repository: pypsa-meets-earth/pypsa-earth
Pull request #1374: Include Sector-coupled tutorial
Author: login: GbotemiB
Created: 2025-03-12T18:28:00Z | Merged: 2025-04-09T12:19:48Z

# Closes #1107 (if applicable).

## Changes proposed in this Pull Request
- Create sector couple tutorial

## Checklist

- [x] I consent to the release of this PR's code under the AGPLv3 license and non-code contributions under CC0-1.0 and CC-BY-4.0.
- [x] I tested my contribution locally and it seems to work fine.
- [x] Code and workflow changes are sufficiently documented.
- [ ] Newly introduced dependencies are added to `envs/environment.yaml` and `doc/requirements.txt`.
- [x] Changes in configuration options are added in all of `config.default.yaml` and `config.tutorial.yaml`.
- [x] Add a test config or line additions to `test/` (note tests are changing the config.tutorial.yaml)
- [x] Changes in configuration options are also documented in `doc/configtables/*.csv` and line references are adjusted in `doc/configuration.rst` and `doc/tutorial.rst`.
- [x] A note for the release notes `doc/release_notes.rst` is amended in the format of previous release notes, including reference to the requested PR.


Linked issue #1107: Add a tutorial elecricity and sector-coupled
<!-- Please do not post usage questions here. Ask them on the Q&A at the discussion tab on GitHub: https://github.com/pypsa-meets-earth/pypsa-earth/discussions/categories/q-a -->

## Describe the feature you'd like to see

Similar to PyPSA-Eur, we should have an elec-only and sector-coupled tutorial in the documentation to give a head start to users on how to use elec-only and sector-coupled modelling
Linked issue comments: user: login: GbotemiB
created_at: 2024-09-24T09:36:57Z
body: Hi @davide-f, I am very interested in this.
author_association: MEMBER
user: login: ekatef
created_at: 2024-09-24T10:07:52Z
body: Hey @davide-f, hey @GbotemiB! A great idea and happy to support!
author_association: MEMBER
user: login: GbotemiB
created_at: 2024-09-26T18:59:49Z
body: Hi @davide-f @ekatef, 

Regarding the tutorial, I think having a dedicated folder for the tutorial in the config folder would be best. We can have the config file for the electricity and the sector-coupled in the folder. 

Another suggestion will be to move the default config to the config folder. We can have all the configs there.
author_association: MEMBER
user: login: GbotemiB
created_at: 2024-09-26T19:05:08Z
body: In addition, the current tutorial config doesn't allow the option to have scenario naming, which is very important to keep the files detached from each other.
author_association: MEMBER
user: login: ekatef
created_at: 2024-09-26T21:39:56Z
body: @GbotemiB agree that the configuration files definitely requires some re-structuring. 

Not sure it's a good idea to mix this task with creating the cross-sectoral tutorial, but it may be worth to keep in mind that some further improvement will be needed. Agree that `configs` folder may be a good place to keep the configuration files. Could it be a good idea to create there two sub-folder to keep configs for the tutorial and full-scale runs, respectively?
author_association: MEMBER
user: login: GbotemiB
created_at: 2024-09-26T21:54:07Z
body: > @GbotemiB agree that the configuration files definitely requires some re-structuring.
> 
> Not sure it's a good idea to mix this task with creating the cross-sectoral tutorial, but it may be worth to keep in mind that some further improvement will be needed. Agree that `configs` folder may be a good place to keep the configuration files. Could it be a good idea to create there two sub-folder to keep configs for the tutorial and full-scale runs, respectively?

Maybe not separate folders, we could just have a tutorial sub-folder and leave the rest as it is.

I also agree to not mix this with the cross-sectoral tutorial, but the tutorial config for the cross-sectoral tutorial will be needed.
author_association: MEMBER
user: login: ekatef
created_at: 2024-09-26T22:05:34Z
body: > > @GbotemiB agree that the configuration files definitely requires some re-structuring.
> > Not sure it's a good idea to mix this task with creating the cross-sectoral tutorial, but it may be worth to keep in mind that some further improvement will be needed. Agree that `configs` folder may be a good place to keep the configuration files. Could it be a good idea to create there two sub-folder to keep configs for the tutorial and full-scale runs, respectively?
> 
> Maybe not separate folders, we could just have a tutorial sub-folder and leave the rest as it is.
> 
> I also agree to not mix this with the cross-sectoral tutorial, but the tutorial config for the cross-sectoral tutorial will be needed.

Agree, creating a sub-folder for tutorial configs sounds like a good idea and is linked with the task to create a cross-sectoral tutorial. I'd go ahead with that, unless @davide-f @hazemakhalek have any concerns on such design
author_association: MEMBER

Diff:
diff --git a/config.tutorial.yaml b/config.tutorial.yaml
index 0a44f1e02..b6a301182 100644
--- a/config.tutorial.yaml
+++ b/config.tutorial.yaml
@@ -10,6 +10,7 @@ countries: ["NG", "BJ"]
 
 enable:
   retrieve_databundle: true
+  retrieve_databundle_sector: true
   build_natura_raster: true
   progress_bar: false
 
diff --git a/doc/data_workflow.rst b/doc/data_workflow.rst
index a84f859b8..c5ee0ba8b 100644
--- a/doc/data_workflow.rst
+++ b/doc/data_workflow.rst
@@ -8,7 +8,7 @@
 Data used by the model
 ##########################################
 
-To properly model any region of the Earth, PyPSA-Earth downloads and fetches different data that are explained in detail in this section. Here we'll look into architecture of the data workflow while practical hand-ons are given in the :ref:`Tutorial <tutorial>` section.
+To properly model any region of the Earth, PyPSA-Earth downloads and fetches different data that are explained in detail in this section. Here we'll look into architecture of the data workflow while practical hand-ons are given in the :ref:`Tutorial <model_customization>` section.
 
 Two major parts of the energy modeling workflow are preparing of power grid layout and climate inputs. Apart from that, PyPSA-Earth is relying of a number of environmental, economical and technological datasets.
 
diff --git a/doc/index.rst b/doc/index.rst
index 947920e8b..8b24a8f31 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -102,7 +102,8 @@ Documentation
 * :doc:`installation`
 * :doc:`docker_containers`
 * :doc:`tutorial_electricity`
-* :doc:`tutorial`
+* :doc:`tutorial_sector`
+* :doc:`model_customization`
 * :doc:`data_workflow`
 * :doc:`notebooks`
 
@@ -115,7 +116,8 @@ Documentation
    installation
    docker_containers
    tutorial_electricity
-   tutorial
+   tutorial_sector
+   model_customization
    data_workflow
    notebooks
 
diff --git a/doc/tutorial.rst b/doc/model_customization.rst
similarity index 96%
rename from doc/tutorial.rst
rename to doc/model_customization.rst
index 8400509af..3acc27780 100644
--- a/doc/tutorial.rst
+++ b/doc/model_customization.rst
@@ -2,7 +2,7 @@
 ..
 .. SPDX-License-Identifier: CC-BY-4.0
 
-.. _tutorial:
+.. _model_customization:
 
 
 ##########################################
diff --git a/doc/release_notes.rst b/doc/release_notes.rst
index 7ffb4742e..cba58f061 100644
--- a/doc/release_notes.rst
+++ b/doc/release_notes.rst
@@ -13,6 +13,8 @@ This part of documentation collects descriptive release notes to capture the mai
 
 **New Features and Major Changes**
 
+* Add a new page for sector-coupled tutorial `PR #1374 <https://github.com/pypsa-meets-earth/pypsa-earth/pull/1374>`__
+
 * Add an option to redefine countries into subregions which can be activated at various stages of the workflow. The subregions can be defined either by the GADM_ID or a custom map. Currently, it is only used in the ``simplify_network`` rule `PR #1300 <https://github.com/pypsa-meets-earth/pypsa-earth/pull/1300>`__
 
 * Drop duplication of retrieve_data and COST_DIR, add params and update technology-data version `PR #1249 <https://github.com/pypsa-meets-earth/pypsa-earth/pull/1249>`__
diff --git a/doc/tutorial_electricity.rst b/doc/tutorial_electricity.rst
index f4f0f7c9d..7ed473bb1 100644
--- a/doc/tutorial_electricity.rst
+++ b/doc/tutorial_electricity.rst
@@ -38,8 +38,10 @@ The model can be adapted to include any selected country. But this tutorial is l
 
     countries: ["NG", "BJ"]
 
-It's recommended to set ``retrieve_databundle: true`` when building the model for the first time to download all needed common data files.
-When the first run is completed and all the necessary data are extracted, it may be a good idea to set ``retrieve_databundle: false`` to avoid data loss.
+.. note::
+
+    It's recommended to set ``retrieve_databundle: true`` when building the model for the first time to download all needed common data files.
+    When the first run is completed and all the necessary data are extracted, it may be a good idea to set ``retrieve_databundle: false`` to avoid data loss.
 
 .. code:: yaml
 
@@ -291,4 +293,4 @@ It is also possible to make manual clean-up removing folders "resources", "netwo
   To use the model in and outside Africa, you should also read
   `How to create a model for you region of interest with PyPSA-Earth? <https://github.com/pypsa-meets-earth/pypsa-earth/discussions/505>`_
 
-:ref:`tutorial` section elaborates on building and running a full PyPSA-Earth model.
+:ref:`model_customization` section elaborates on building and running a full PyPSA-Earth model.
diff --git a/doc/tutorial_sector.rst b/doc/tutorial_sector.rst
new file mode 100644
index 000000000..0a004050e
--- /dev/null
+++ b/doc/tutorial_sector.rst
@@ -0,0 +1,662 @@
+.. SPDX-FileCopyrightText:  PyPSA-Earth and PyPSA-Eur Authors
+..
+.. SPDX-License-Identifier: CC-BY-4.0
+
+.. _tutorial_sector:
+
+##########################################
+Tutorial: Sector-Coupled
+##########################################
+
+.. note::
+
+    If you have not yet installed PyPSA-Earth, please refer to the :ref:`installation` section.
+
+In this tutorial, we will show you how to run the sector-coupled model. The sector-coupled model
+is a model that considers the energy system as a whole, including the electricity, heat, transport,
+and industry sectors. The model has been insipred and partially based on the PyPSA-Eur model, which is a model of the European
+energy system. The sector-coupled model is a global model that can be used to model any region
+of the Earth. This section explains how to run and analyze the tutorial model.
+
+
+The sector-coupling code can be run as an overnight/greenfield scenario or myopic scenario.
+The overnight scenario is a long-term scenario that runs for a year, while the myopic scenario
+is a short-term scenario that runs for a day.
+
+
+Overnight Scenarios
+=============================================
+
+Configuration
+---------------------------------------------
+
+All the configuration for a sector-coupled run are present in the ``config.default.yaml`` file.
+In particular, the default value for foresight parameter is set to ``overnight``. For the purpose
+of this tutorial, ``test/config.sector.yaml`` will be used in addition to ``config.default.yaml``
+to run the sector-coupled model. That allows to enable using a lightweight tutorial datakit
+enabled with tutorial: true.
+
+.. code:: yaml
+
+    foresight: overnight
+
+Documentation for all options is currently being updated in :ref:`config`.
+
+Scenarios can be defined like for electricity-only studies, but with additional wildcard options.
+
+.. note::
+
+    It is important to set the following flags ``retrieve_databundle`` and ``retrieve_databundle_sector``
+    to ``false`` after the first run to prevent unnecessary re-downloads, as the files only need to be downloaded once.
+
+.. code:: yaml
+
+    enable:
+      retrieve_databundle: true
+      retrieve_databundle_sector: true
+
+.. code:: yaml
+
+    scenario:
+      simpl: [""]
+      ll: ["copt"]
+      clusters: [10]
+      opts: [Co2L-3h]
+      planning_horizons: # investment years for myopic and perfect; or costs year for overnight
+      - 2030
+      sopts:
+      - "144h"
+      demand:
+      - "AB"
+
+For allowed wildcard values, refer to :ref:`wildcards`.
+
+Execution
+---------------------------------------------
+To run the tutorial for the sector-coupled model, you need to activate the pypsa-earth environment.
+You need to have installed PyPSA-Earth using the instructions provided in the :ref:`installation` section.
+Make sure to be in the PyPSA-Earth root directory and run the following command:
+
+.. note::
+
+    It is good practice to perform a dry-run using the option -n, before you commit to a run:
+
+    .. code:: bash
+
+        .../pypsa-earth (pypsa-earth) $ snakemake solve_sector_networks -j2 --configfile test/config.sector.yaml -n
+
+
+.. code:: bash
+
+    .../pypsa-earth (pypsa-earth) $ conda activate pypsa-earth
+    .../pypsa-earth (pypsa-earth) $ snakemake solve_sector_networks -j2 --configfile test/config.sector.yaml
+
+This covers the retrieval of additional raw data from online resources and preprocessing data about
+the transport, industry, and heating sectors as well as additional rules about geological storage
+and sequestration potentials, gas infrastructure, and biomass potentials. The workflow extracts
+all the data needed to run a model for any country of the world.
+
+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];
+        edge[penwidth=2, color=grey];
+        0[label = "solve_sector_networks", color = "0.50 0.6 0.85", style="rounded"];
+        1[label = "solve_sector_network", color = "0.25 0.6 0.85", style="rounded"];
+        2[label = "add_export", color = "0.08 0.6 0.85", style="rounded"];
+        3[label = "prepare_ports", color = "0.06 0.6 0.85", style="rounded"];
+        4[label = "retrieve_cost_data\nyear: 2030", color = "0.05 0.6 0.85", style="rounded"];
+        5[label = "build_ship_profile\nh2export: 10", color = "0.34 0.6 0.85", style="rounded"];
+        6[label = "prepare_sector_network", color = "0.28 0.6 0.85", style="rounded"];
+        7[label = "override_respot\ndiscountrate: 0.071\nsopts: 144h", color = "0.20 0.6 0.85", style="rounded"];
+        8[label = "prepare_network\nll: copt\nopts: Co2L-4H", color = "0.53 0.6 0.85", style="rounded"];
+        9[label = "add_extra_components", color = "0.24 0.6 0.85", style="rounded"];
+        10[label = "cluster_network\nclusters: 6", color = "0.35 0.6 0.85", style="rounded"];
+        11[label = "simplify_network\nsimpl: ", color = "0.44 0.6 0.85", style="rounded"];
+        12[label = "add_electricity", color = "0.49 0.6 0.85", style="rounded"];
+        13[label = "build_renewable_profiles\ntechnology: onwind", color = "0.52 0.6 0.85", style="rounded"];
+        14[label = "build_natura_raster", color = "0.41 0.6 0.85", style="rounded"];
+        15[label = "retrieve_databundle_light", color = "0.23 0.6 0.85", style="rounded,dashed"];
+        16[label = "build_shapes", color = "0.65 0.6 0.85", style="rounded"];
+        17[label = "build_powerplants", color = "0.12 0.6 0.85", style="rounded"];
+        18[label = "base_network", color = "0.02 0.6 0.85", style="rounded"];
+        19[label = "build_osm_network", color = "0.04 0.6 0.85", style="rounded"];
+        20[label = "clean_osm_data", color = "0.14 0.6 0.85", style="rounded"];
+        21[label = "download_osm_data", color = "0.40 0.6 0.85", style="rounded"];
+        22[label = "build_bus_regions", color = "0.66 0.6 0.85", style="rounded"];
+        23[label = "build_renewable_profiles\ntechnology: offwind-ac", color = "0.52 0.6 0.85", style="rounded"];
+        24[label = "build_renewable_profiles\ntechnology: offwind-dc", color = "0.52 0.6 0.85", style="rounded"];
+        25[label = "build_renewable_profiles\ntechnology: solar", color = "0.52 0.6 0.85", style="rounded"];
+        26[label = "build_renewable_profiles\ntechnology: hydro", color = "0.52 0.6 0.85", style="rounded"];
+        27[label = "build_demand_profiles", color = "0.39 0.6 0.85", style="rounded"];
+        28[label = "prepare_energy_totals\ndemand: AB\nplanning_horizons: 2030", color = "0.29 0.6 0.85", style="rounded"];
+        29[label = "build_base_energy_totals", color = "0.10 0.6 0.85", style="rounded"];
+        30[label = "prepare_heat_data", color = "0.26 0.6 0.85", style="rounded"];
+        31[label = "build_clustered_population_layouts", color = "0.17 0.6 0.85", style="rounded"];
+        32[label = "build_population_layouts\nplanning_horizons: 2030", color = "0.11 0.6 0.85", style="rounded"];
+        33[label = "prepare_urban_percent", color = "0.13 0.6 0.85", style="rounded"];
+        34[label = "build_temperature_profiles", color = "0.60 0.6 0.85", style="rounded"];
+        35[label = "build_cop_profiles", color = "0.47 0.6 0.85", style="rounded"];
+        36[label = "build_solar_thermal_profiles", color = "0.36 0.6 0.85", style="rounded"];
+        37[label = "build_heat_demand", color = "0.38 0.6 0.85", style="rounded"];
+        38[label = "prepare_transport_data", color = "0.46 0.6 0.85", style="rounded"];
+        39[label = "prepare_transport_data_input", color = "0.31 0.6 0.85", style="rounded"];
+        40[label = "build_industry_demand", color = "0.62 0.6 0.85", style="rounded"];
+        41[label = "build_industrial_distribution_key", color = "0.19 0.6 0.85", style="rounded"];
+        42[label = "build_industrial_database", color = "0.01 0.6 0.85", style="rounded,dashed"];
+        43[label = "build_base_industry_totals\ndemand: AB\nplanning_horizons: 2030", color = "0.16 0.6 0.85", style="rounded"];
+        44[label = "prepare_airports", color = "0.33 0.6 0.85", style="rounded"];
+        45[label = "prepare_gas_network", color = "0.00 0.6 0.85", style="rounded"];
+        46[label = "copy_config", color = "0.48 0.6 0.85", style="rounded"];
+        1 -> 0
+        2 -> 1
+        4 -> 1
+        46 -> 1
+        3 -> 2
+        4 -> 2
+        5 -> 2
+        6 -> 2
+        10 -> 2
+        7 -> 6
+        4 -> 6
+        30 -> 6
+        38 -> 6
+        31 -> 6
+        40 -> 6
+        28 -> 6
+        44 -> 6
+        3 -> 6
+        10 -> 6
+        45 -> 6
+        8 -> 7
+        28 -> 7
+        9 -> 8
+        4 -> 8
+        10 -> 9
+        4 -> 9
+        11 -> 10
+        16 -> 10
+        4 -> 10
+        12 -> 11
+        4 -> 11
+        22 -> 11
+        16 -> 11
+        13 -> 12
+        23 -> 12
+        24 -> 12
+        25 -> 12
+        26 -> 12
+        18 -> 12
+        4 -> 12
+        17 -> 12
+        16 -> 12
+        27 -> 12
+        14 -> 13
+        15 -> 13
+        16 -> 13
+        17 -> 13
+        22 -> 13
+        15 -> 14
+        15 -> 16
+        18 -> 17
+        20 -> 17
+        16 -> 17
+        19 -> 18
+        16 -> 18
+        20 -> 19
+        16 -> 19
+        21 -> 20
+        16 -> 20
+        16 -> 22
+        18 -> 22
+        14 -> 23
+        15 -> 23
+        16 -> 23
+        17 -> 23
+        22 -> 23
+        14 -> 24
+        15 -> 24
+        16 -> 24
+        17 -> 24
+        22 -> 24
+        14 -> 25
+        15 -> 25
+        16 -> 25
+        17 -> 25
+        22 -> 25
+        14 -> 26
+        15 -> 26
+        16 -> 26
+        17 -> 26
+        22 -> 26
+        18 -> 27
+        22 -> 27
+        15 -> 27
+        16 -> 27
+        29 -> 28
+        10 -> 30
+        28 -> 30
+        31 -> 30
+        34 -> 30
+        35 -> 30
+        36 -> 30
+        37 -> 30
+        32 -> 31
+        10 -> 31
+        15 -> 31
+        16 -> 32
+        33 -> 32
+        15 -> 32
+        32 -> 34
+        10 -> 34
+        15 -> 34
+        34 -> 35
+        32 -> 36
+        10 -> 36
+        15 -> 36
+        32 -> 37
+        10 -> 37
+        15 -> 37
+        10 -> 38
+        28 -> 38
+        39 -> 38
+        31 -> 38
+        34 -> 38
+        41 -> 40
+        43 -> 40
+        42 -> 40
+        4 -> 40
+        10 -> 41
+        31 -> 41
+        42 -> 41
+        29 -> 43
+        10 -> 45
+    }
+
+
+In the terminal, this will show up as a list of jobs to be run:
+
+.. code:: console
+
+    Building DAG of jobs...
+    Job stats:
+    job                                   count
+    ----------------------------------  -------
+    add_electricity                           1
+    add_export                                1
+    add_extra_components                      1
+    base_network                              1
+    build_base_energy_totals                  1
+    build_base_industry_totals                1
+    build_bus_regions                         1
+    build_clustered_population_layouts        1
+    build_cop_profiles                        1
+    build_demand_profiles                     1
+    build_heat_demand                         1
+    build_industrial_distribution_key         1
+    build_industry_demand                     1
+    build_natura_raster                       1
+    build_osm_network                         1
+    build_population_layouts                  1
+    build_powerplants                         1
+    build_renewable_profiles                  5
+    build_shapes                              1
+    build_ship_profile                        1
+    build_solar_thermal_profiles              1
+    build_temperature_profiles                1
+    clean_osm_data                            1
+    cluster_network                           1
+    copy_config                               1
+    download_osm_data                         1
+    override_respot                           1
+    prepare_airports                          1
+    prepare_energy_totals                     1
+    prepare_gas_network                       1
+    prepare_heat_data                         1
+    prepare_network                           1
+    prepare_ports                             1
+    prepare_sector_network                    1
+    prepare_transport_data                    1
+    prepare_transport_data_input              1
+    prepare_urban_percent                     1
+    retrieve_cost_data                        1
+    retrieve_databundle_light                 1
+    simplify_network                          1
+    solve_sector_network                      1
+    solve_sector_networks                     1
+    total                                    46
+
+
+
+
+Myopic Foresight Scenarios
+=============================================
+
+
+Configuration
+---------------------------------------------
+
+The configuration to run the tutorial for the myopic foresight scenario is present
+in the ``test/config.test_myopic.yaml`` file.
+
+.. code:: yaml
+
+    foresight: myopic
+
+.. note::
+
+    It is important to set the following flags ``retrieve_databundle`` and ``retrieve_databundle_sector``
+    to ``false`` after the first run to prevent unnecessary re-downloads, as the files only need to be downloaded once.
+
+.. code:: yaml
+
+    enable:
+      retrieve_databundle: true
+      retrieve_databundle_sector: true
+
+Scenarios can be defined like for electricity-only studies, but with additional
+wildcard options. For the myopic foresight mode, the ``{planning_horizons}`` wildcard
+defines the sequence of investment horizons.
+
+.. note::
+
+    The myopic optimisation is only possible on the sector-coupled model
+
+.. code:: yaml
+
+    scenario:
+      simpl: [""]
+      clusters: [4]
+      planning_horizons: [2030] # investment years for myopcondaic and perfect; or costs year for overnight
+      ll: ["c1"]
+      opts: ["Co2L-24H"]
+      sopts: ["144h"]
+      demand: ["DF"]
+
+For allowed wildcard values, refer to :ref:`wildcards`.
+Documentation for all options will be added successively to :ref:`config`.
+
+Execution
+---------------------------------------------
+To run the tutorial for the sector-coupled model with myopic foresight, you need to activate the
+pypsa-earth environment. You need to have installed PyPSA-Earth using the instructions provided in the
+:ref:`installation` section. Make sure to be in the PyPSA-Earth root directory and run the following command
+
+.. note::
+
+    It is good practice to perform a dry-run using the option -n, before you commit to a run:
+
+    .. code:: bash
+
+        .../pypsa-earth (pypsa-earth) $ snakemake solve_sector_networks -j2 --configfile test/config.myopic.yaml -n
+
+.. code:: bash
+
+    .../pypsa-earth (pypsa-earth) $ conda activate pypsa-earth
+    .../pypsa-earth (pypsa-earth) $ snakemake solve_sector_networks -j2 --configfile test/config.myopic.yaml
+
+which will result in additional jobs snakemake wants to run, which translates to the following
+workflow diagram which nicely outlines how the sequential pathway optimisation with myopic
+foresight is implemented in the workflow:
+
+.. 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];
+        edge[penwidth=2, color=grey];
+        0[label = "solve_all_networks_myopic", color = "0.24 0.6 0.85", style="rounded"];
+        1[label = "solve_network_myopic", color = "0.04 0.6 0.85", style="rounded"];
+        2[label = "add_existing_baseyear", color = "0.57 0.6 0.85", style="rounded"];
+        3[label = "add_export", color = "0.43 0.6 0.85", style="rounded"];
+        4[label = "prepare_ports", color = "0.22 0.6 0.85", style="rounded"];
+        5[label = "retrieve_cost_data\nyear: 2030", color = "0.59 0.6 0.85", style="rounded"];
+        6[label = "build_ship_profile\nh2export: 120", color = "0.14 0.6 0.85", style="rounded"];
+        7[label = "prepare_sector_network", color = "0.19 0.6 0.85", style="rounded"];
+        8[label = "override_respot\ndiscountrate: 0.071\nsopts: 24H", color = "0.34 0.6 0.85", style="rounded"];
+        9[label = "prepare_network\nll: c1\nopts: Co2L", color = "0.63 0.6 0.85", style="rounded"];
+        10[label = "add_extra_components", color = "0.55 0.6 0.85", style="rounded"];
+        11[label = "cluster_network\nclusters: 4", color = "0.36 0.6 0.85", style="rounded"];
+        12[label = "simplify_network\nsimpl: ", color = "0.28 0.6 0.85", style="rounded"];
+        13[label = "add_electricity", color = "0.23 0.6 0.85", style="rounded"];
+        14[label = "build_renewable_profiles\ntechnology: onwind", color = "0.58 0.6 0.85", style="rounded"];
+        15[label = "build_natura_raster", color = "0.62 0.6 0.85", style="rounded"];
+        16[label = "retrieve_databundle_light", color = "0.10 0.6 0.85", style="rounded"];
+        17[label = "build_shapes", color = "0.37 0.6 0.85", style="rounded"];
+        18[label = "build_powerplants", color = "0.06 0.6 0.85", style="rounded"];
+        19[label = "base_network", color = "0.30 0.6 0.85", style="rounded"];
+        20[label = "build_osm_network", color = "0.25 0.6 0.85", style="rounded"];
+        21[label = "clean_osm_data", color = "0.31 0.6 0.85", style="rounded"];
+        22[label = "download_osm_data", color = "0.12 0.6 0.85", style="rounded"];
+        23[label = "build_bus_regions", color = "0.18 0.6 0.85", style="rounded"];
+        24[label = "build_renewable_profiles\ntechnology: offwind-ac", color = "0.58 0.6 0.85", style="rounded"];
+        25[label = "build_renewable_profiles\ntechnology: offwind-dc", color = "0.58 0.6 0.85", style="rounded"];
+        26[label = "build_renewable_profiles\ntechnology: solar", color = "0.58 0.6 0.85", style="rounded"];
+        27[label = "build_renewable_profiles\ntechnology: hydro", color = "0.58 0.6 0.85", style="rounded"];
+        28[label = "build_demand_profiles", color = "0.65 0.6 0.85", style="rounded"];
+        29[label = "prepare_energy_totals\ndemand: DF\nplanning_horizons: 2030", color = "0.35 0.6 0.85", style="rounded"];
+        30[label = "build_base_energy_totals", color = "0.51 0.6 0.85", style="rounded"];
+        31[label = "prepare_heat_data", color = "0.48 0.6 0.85", style="rounded"];
+        32[label = "build_clustered_population_layouts", color = "0.40 0.6 0.85", style="rounded"];
+        33[label = "build_population_layouts\nplanning_horizons: 2030", color = "0.60 0.6 0.85", style="rounded"];
+        34[label = "prepare_urban_percent", color = "0.29 0.6 0.85", style="rounded"];
+        35[label = "build_temperature_profiles", color = "0.52 0.6 0.85", style="rounded"];
+        36[label = "build_cop_profiles", color = "0.01 0.6 0.85", style="rounded"];
+        37[label = "build_solar_thermal_profiles", color = "0.27 0.6 0.85", style="rounded"];
+        38[label = "build_heat_demand", color = "0.07 0.6 0.85", style="rounded"];
+        39[label = "prepare_transport_data", color = "0.61 0.6 0.85", style="rounded"];
+        40[label = "prepare_transport_data_input", color = "0.13 0.6 0.85", style="rounded"];
+        41[label = "build_industry_demand", color = "0.20 0.6 0.85", style="rounded"];
+        42[label = "build_industrial_distribution_key", color = "0.00 0.6 0.85", style="rounded"];
+        43[label = "build_industrial_database", color = "0.41 0.6 0.85", style="rounded"];
+        44[label = "build_base_industry_totals\ndemand: DF\nplanning_horizons: 2030", color = "0.45 0.6 0.85", style="rounded"];
+        45[label = "prepare_airports", color = "0.26 0.6 0.85", style="rounded"];
+        46[label = "prepare_gas_network", color = "0.66 0.6 0.85", style="rounded"];
+        47[label = "build_existing_heating_distribution", color = "0.21 0.6 0.85", style="rounded"];
+        48[label = "copy_config", color = "0.56 0.6 0.85", style="rounded"];
+        1 -> 0
+        2 -> 1
+        5 -> 1
+        48 -> 1
+        3 -> 2
+        18 -> 2
+        12 -> 2
+        11 -> 2
+        32 -> 2
+        5 -> 2
+        36 -> 2
+        47 -> 2
+        4 -> 3
+        5 -> 3
+        6 -> 3
+        7 -> 3
+        11 -> 3
+        8 -> 7
+        5 -> 7
+        31 -> 7
+        39 -> 7
+        32 -> 7
+        41 -> 7
+        29 -> 7
+        45 -> 7
+        4 -> 7
+        11 -> 7
+        46 -> 7
+        9 -> 8
+        29 -> 8
+        10 -> 9
+        5 -> 9
+        11 -> 10
+        5 -> 10
+        12 -> 11
+        17 -> 11
+        5 -> 11
+        13 -> 12
+        5 -> 12
+        23 -> 12
+        17 -> 12
+        14 -> 13
+        24 -> 13
+        25 -> 13
+        26 -> 13
+        27 -> 13
+        19 -> 13
+        5 -> 13
+        18 -> 13
+        17 -> 13
+        28 -> 13
+        15 -> 14
+        16 -> 14
+        17 -> 14
+        18 -> 14
+        23 -> 14
+        16 -> 15
+        16 -> 17
+        19 -> 18
+        21 -> 18
+        17 -> 18
+        20 -> 19
+        17 -> 19
+        21 -> 20
+        17 -> 20
+        22 -> 21
+        17 -> 21
+        17 -> 23
+        19 -> 23
+        15 -> 24
+        16 -> 24
+        17 -> 24
+        18 -> 24
+        23 -> 24
+        15 -> 25
+        16 -> 25
+        17 -> 25
+        18 -> 25
+        23 -> 25
+        15 -> 26
+        16 -> 26
+        17 -> 26
+        18 -> 26
+        23 -> 26
+        15 -> 27
+        16 -> 27
+        17 -> 27
+        18 -> 27
+        23 -> 27
+        19 -> 28
+        23 -> 28
+        16 -> 28
+        17 -> 28
+        30 -> 29
+        11 -> 31
+        29 -> 31
+        32 -> 31
+        35 -> 31
+        36 -> 31
+        37 -> 31
+        38 -> 31
+        33 -> 32
+        11 -> 32
+        16 -> 32
+        17 -> 33
+        34 -> 33
+        16 -> 33
+        33 -> 35
+        11 -> 35
+        16 -> 35
+        35 -> 36
+        33 -> 37
+        11 -> 37
+        16 -> 37
+        33 -> 38
+        11 -> 38
+        16 -> 38
+        11 -> 39
+        29 -> 39
+        40 -> 39
+        32 -> 39
+        35 -> 39
+        42 -> 41
+        44 -> 41
+        43 -> 41
+        5 -> 41
+        11 -> 42
+        32 -> 42
+        43 -> 42
+        30 -> 44
+        11 -> 46
+        32 -> 47
+        31 -> 47
+    }
+
+
+In the terminal, this will show up as a list of jobs to be run:
+
+.. code:: console
+
+    Building DAG of jobs...
+    Job stats:
+    job                                    count
+    -----------------------------------  -------
+    add_electricity                            1
+    add_existing_baseyear                      1
+    add_export                                 1
+    add_extra_components                       1
+    base_network                               1
+    build_base_energy_totals                   1
+    build_base_industry_totals                 1
+    build_bus_regions                          1
+    build_clustered_population_layouts         1
+    build_cop_profiles                         1
+    build_demand_profiles                      1
+    build_existing_heating_distribution        1
+    build_heat_demand                          1
+    build_industrial_database                  1
+    build_industrial_distribution_key          1
+    build_industry_demand                      1
+    build_natura_raster                        1
+    build_osm_network                          1
+    build_population_layouts                   1
+    build_powerplants                          1
+    build_renewable_profiles                   5
+    build_shapes                               1
+    build_ship_profile                         1
+    build_solar_thermal_profiles               1
+    build_temperature_profiles                 1
+    clean_osm_data                             1
+    cluster_network                            1
+    copy_config                                1
+    download_osm_data                          1
+    override_respot                            1
+    prepare_airports                           1
+    prepare_energy_totals                      1
+    prepare_gas_network                        1
+    prepare_heat_data                          1
+    prepare_network                            1
+    prepare_ports                              1
+    prepare_sector_network                     1
+    prepare_transport_data                     1
+    prepare_transport_data_input               1
+    prepare_urban_percent                      1
+    retrieve_cost_data                         1
+    retrieve_databundle_light                  1
+    simplify_network                           1
+    solve_all_networks_myopic                  1
+    solve_network_myopic                       1
+    total                                     49
+
+
+
+
+Scaling-Up
+=============================================
+If you now feel confident and want to tackle runs with larger temporal, technological and
+spatial scopes, you can adjust the configuration file to your needs. You can also check
+the :ref:`model_customization` for more information on how to customize the model.
diff --git a/scripts/retrieve_databundle_light.py b/scripts/retrieve_databundle_light.py
index 297599d4a..fa92dc274 100644
--- a/scripts/retrieve_databundle_light.py
+++ b/scripts/retrieve_databundle_light.py
@@ -16,7 +16,7 @@
 and extracts it in the ``data``, ``resources`` and ``cutouts`` sub-directory.
 Bundle data are then deleted once downloaded and unzipped.
 
-The :ref:`tutorial` uses a smaller `data bundle <https://zenodo.org/record/3517921/files/pypsa-eur-tutorial-data-bundle.tar.xz>`_
+The :ref:`tutorial_electricity` uses a smaller `data bundle <https://zenodo.org/record/3517921/files/pypsa-eur-tutorial-data-bundle.tar.xz>`_
 than required for the full model (around 500 MB)
 
 The required bundles are downloaded automatically according to the list names, in agreement to
diff --git a/test/config.myopic.yaml b/test/config.myopic.yaml
index 5ebacf98f..2a147ddd4 100644
--- a/test/config.myopic.yaml
+++ b/test/config.myopic.yaml
@@ -9,6 +9,10 @@ tutorial: true
 results_dir: results/
 summary_dir: results/
 
+enable:
+  retrieve_databundle: true
+  retrieve_databundle_sector: true
+
 run:
   name: "test_myopic" # use this to keep track of runs with different settings
   name_subworkflow: "tutorial"  # scenario name of the pypsa-earth subworkflow
@@ -19,20 +23,13 @@ foresight: myopic
 disable_subworkflow: true
 
 scenario:
-  simpl:
-  - ""
-  clusters: # number of nodes
-  - 4
-  planning_horizons: # investment years for myopic and perfect; or costs year for overnight
-  - 2030
-  ll:
-  - "c1"
-  opts:
-  - "Co2L-24H"
-  sopts:
-  - "144h"
-  demand:
-  - "DF"
+  simpl: [""]
+  clusters: [4]
+  planning_horizons: [2030] # investment years for myopcondaic and perfect; or costs year for overnight
+  ll: ["c1"]
+  opts: ["Co2L-24H"]
+  sopts: ["144h"]
+  demand: ["DF"]
 
 cluster_options:
   alternative_clustering: false
diff --git a/test/config.sector.yaml b/test/config.sector.yaml
index 71daf0c62..4cd6127c9 100644
--- a/test/config.sector.yaml
+++ b/test/config.sector.yaml
@@ -5,15 +5,25 @@
 version: 0.6.0
 tutorial: true
 
+enable:
+  retrieve_databundle: true
+  retrieve_databundle_sector: true
+
 run:
   name: sector
   shared_cutouts: true
 
 scenario:
-  clusters: # number of nodes
-  - 4
-  ll:
-  - "c1"
+  simpl: [""]
+  ll: ["copt"]
+  clusters: [4]
+  opts: [Co2L-24h]
+  planning_horizons: # investment years for myopic and perfect; or costs year for overnight
+  - 2030
+  sopts:
+  - "144h"
+  demand:
+  - "AB"
 
 countries: ["NG", "BJ"]
 
@@ -50,4 +60,4 @@ snapshots:
 
 solving:
   solver:
-    name: gurobi
+    name: glpk


Reviews:
user: login: ekatef
body: Fantastic @GbotemiB!! Thank you so much for tackling this part. I think it would be a big step forward in the model usability to document the sector-coupled capabilities. Have added some comments on the implementation.

My major concern relates to the explanations of using `tutorial` and the both retrieval flags. They trigger data (re-)download which may be quite time-consuming while it's still very easy to do a mistake here. Indeed, that means that we must to improve the model design in future but for now it's crucial to make sure that this part is documented as clear and as detailed as possible. Could you please look into this here and also in `Electricity` tutorial?

Generally, it feels like we are doing great progress with the documentation. Many thanks for leading this work!
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-13T22:27:48Z
user: login: GbotemiB
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-19T13:58:55Z
user: login: GbotemiB
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-19T14:10:55Z
user: login: GbotemiB
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-19T14:13:06Z
user: login: GbotemiB
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-19T14:16:03Z
user: login: GbotemiB
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-19T14:16:44Z
user: login: GbotemiB
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-19T14:21:46Z
user: login: GbotemiB
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-19T14:26:45Z
user: login: GbotemiB
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-19T16:13:17Z
user: login: GbotemiB
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-19T16:13:36Z
user: login: ekatef
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-01T21:21:42Z
user: login: ekatef
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-01T21:52:22Z
user: login: ekatef
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-01T21:56:40Z
user: login: ekatef
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-01T21:58:35Z
user: login: ekatef
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-01T22:01:48Z
user: login: ekatef
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-01T22:02:55Z
user: login: ekatef
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-01T22:03:25Z
user: login: ekatef
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-01T22:03:52Z
user: login: ekatef
body: @GbotemiB many thanks for the great work! I think the PR is basically ready to go.


Have added a couple of suggestions trying to make the text more clear. Could you please have a look? If you think it's worth to add some slight revisions feel free to do so. Otherwise, happy to merge also as-is 🙂 
state: APPROVED
author_association: MEMBER
submitted_at: 2025-04-01T22:07:46Z

Review comments:
diff_hunk: @@ -2,7 +2,7 @@
 ..
 .. SPDX-License-Identifier: CC-BY-4.0
 
-.. _tutorial:
+.. _model_customization:
path: doc/model_customization.rst
user: login: ekatef
body: Have there been any specific reasons to exclude the customisation part?
created_at: 2025-03-13T21:52:07Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,637 @@
+.. SPDX-FileCopyrightText:  PyPSA-Earth and PyPSA-Eur Authors
+..
+.. SPDX-License-Identifier: CC-BY-4.0
+
+.. _tutorial_sector:
+
+##########################################
+Tutorial: Sector-Coupled
+##########################################
+
+.. note::
+    If you have not yet installed PyPSA-Earth, please refer to the :ref:`installation` section.
+
+In this tutorial, we will show you how to run the sector-coupled model. The sector-coupled model
+is a model that considers the energy system as a whole, including the electricity, heat, transport,
+and industry sectors. The model is based on the PyPSA-Eur model, which is a model of the European
+energy system. The sector-coupled model is a global model that can be used to model any region
path: doc/tutorial_sector.rst
user: login: ekatef
body: I'd say the the model has been inspired and partially based on PyPSA-Eur but for now the link is much more flexible 😄 May we revise this part to highlight that the model is intended to be used for any region of the world?
created_at: 2025-03-13T21:56:21Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,637 @@
+.. SPDX-FileCopyrightText:  PyPSA-Earth and PyPSA-Eur Authors
+..
+.. SPDX-License-Identifier: CC-BY-4.0
+
+.. _tutorial_sector:
+
+##########################################
+Tutorial: Sector-Coupled
+##########################################
+
+.. note::
+    If you have not yet installed PyPSA-Earth, please refer to the :ref:`installation` section.
+
+In this tutorial, we will show you how to run the sector-coupled model. The sector-coupled model
+is a model that considers the energy system as a whole, including the electricity, heat, transport,
+and industry sectors. The model is based on the PyPSA-Eur model, which is a model of the European
+energy system. The sector-coupled model is a global model that can be used to model any region
+of the Earth. This section explains how to run and analyze the tutorial model.
+
+
+The sector-coupling code can be run as an overnight / greenfield scenario or myopic scenario.
+The overnight scenario is a long-term scenario that runs for a year, while the myopic scenario
+is a short-term scenario that runs for a day.
+
+
+Overnight Scenarios
+=============================================
+
+Configuration
+---------------------------------------------
+
+The configuration for sector-coupled is present in the  ``config.default.yaml`` file.
+This foresight parameter is set to overnight by default.
path: doc/tutorial_sector.rst
user: login: ekatef
body: Do I get properly that we are running a full configuration, the one with `tutorial: false`?
created_at: 2025-03-13T21:57:31Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,637 @@
+.. SPDX-FileCopyrightText:  PyPSA-Earth and PyPSA-Eur Authors
+..
+.. SPDX-License-Identifier: CC-BY-4.0
+
+.. _tutorial_sector:
+
+##########################################
+Tutorial: Sector-Coupled
+##########################################
+
+.. note::
+    If you have not yet installed PyPSA-Earth, please refer to the :ref:`installation` section.
+
+In this tutorial, we will show you how to run the sector-coupled model. The sector-coupled model
+is a model that considers the energy system as a whole, including the electricity, heat, transport,
+and industry sectors. The model is based on the PyPSA-Eur model, which is a model of the European
+energy system. The sector-coupled model is a global model that can be used to model any region
+of the Earth. This section explains how to run and analyze the tutorial model.
+
+
+The sector-coupling code can be run as an overnight / greenfield scenario or myopic scenario.
+The overnight scenario is a long-term scenario that runs for a year, while the myopic scenario
+is a short-term scenario that runs for a day.
+
+
+Overnight Scenarios
+=============================================
+
+Configuration
+---------------------------------------------
+
+The configuration for sector-coupled is present in the  ``config.default.yaml`` file.
+This foresight parameter is set to overnight by default.
+
+.. code:: yaml
+
+    foresight: overnight
+
+Documentation for all options will be added successively to :ref:`config`.
path: doc/tutorial_sector.rst
user: login: ekatef
body: Not sure I get this point properly. Do you mean that development is in progress for the docs related to the configuration file?
created_at: 2025-03-13T21:59:03Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,637 @@
+.. SPDX-FileCopyrightText:  PyPSA-Earth and PyPSA-Eur Authors
+..
+.. SPDX-License-Identifier: CC-BY-4.0
+
+.. _tutorial_sector:
+
+##########################################
+Tutorial: Sector-Coupled
+##########################################
+
+.. note::
+    If you have not yet installed PyPSA-Earth, please refer to the :ref:`installation` section.
+
+In this tutorial, we will show you how to run the sector-coupled model. The sector-coupled model
+is a model that considers the energy system as a whole, including the electricity, heat, transport,
+and industry sectors. The model is based on the PyPSA-Eur model, which is a model of the European
+energy system. The sector-coupled model is a global model that can be used to model any region
+of the Earth. This section explains how to run and analyze the tutorial model.
+
+
+The sector-coupling code can be run as an overnight / greenfield scenario or myopic scenario.
+The overnight scenario is a long-term scenario that runs for a year, while the myopic scenario
+is a short-term scenario that runs for a day.
+
+
+Overnight Scenarios
+=============================================
+
+Configuration
+---------------------------------------------
+
+The configuration for sector-coupled is present in the  ``config.default.yaml`` file.
+This foresight parameter is set to overnight by default.
+
+.. code:: yaml
+
+    foresight: overnight
+
+Documentation for all options will be added successively to :ref:`config`.
+
+Scenarios can be defined like for electricity-only studies, but with additional wildcard options.
path: doc/tutorial_sector.rst
user: login: ekatef
body: May it be also a good idea to mention the retrieval flags, `retrieve_databundle` and `retrieve_databundle_sector`?  Having them on if not intended can be quite detrimental, unfortunately [saying from the experience]. So, I'd suggest to make sure that we have this part highlighted in the documentation as clear as possible
created_at: 2025-03-13T22:03:27Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,637 @@
+.. SPDX-FileCopyrightText:  PyPSA-Earth and PyPSA-Eur Authors
+..
+.. SPDX-License-Identifier: CC-BY-4.0
+
+.. _tutorial_sector:
+
+##########################################
+Tutorial: Sector-Coupled
+##########################################
+
+.. note::
+    If you have not yet installed PyPSA-Earth, please refer to the :ref:`installation` section.
+
+In this tutorial, we will show you how to run the sector-coupled model. The sector-coupled model
+is a model that considers the energy system as a whole, including the electricity, heat, transport,
+and industry sectors. The model is based on the PyPSA-Eur model, which is a model of the European
+energy system. The sector-coupled model is a global model that can be used to model any region
+of the Earth. This section explains how to run and analyze the tutorial model.
+
+
+The sector-coupling code can be run as an overnight / greenfield scenario or myopic scenario.
+The overnight scenario is a long-term scenario that runs for a year, while the myopic scenario
+is a short-term scenario that runs for a day.
+
+
+Overnight Scenarios
+=============================================
+
+Configuration
+---------------------------------------------
+
+The configuration for sector-coupled is present in the  ``config.default.yaml`` file.
+This foresight parameter is set to overnight by default.
+
+.. code:: yaml
+
+    foresight: overnight
+
+Documentation for all options will be added successively to :ref:`config`.
+
+Scenarios can be defined like for electricity-only studies, but with additional wildcard options.
+
+.. code:: yaml
+
+    scenario:
+    simpl: [""]
+    ll: ["copt"]
+    clusters: [10]
+    opts: [Co2L-3h]
+    planning_horizons: # investment years for myopic and perfect; or costs year for overnight
+    - 2030
+    sopts:
+    - "144h"
+    demand:
+    - "AB"
+
+For allowed wildcard values, refer to :ref:`wildcards`.
+
+Execution
+---------------------------------------------
+To run the tutorial for the sector-coupled model, you need to activate the pypsa-earth environment.
+You need to have installed PyPSA-Earth using the instructions provided in the :ref:`installation` section.
+Make sure to be in the PyPSA-Earth root directory and run the following command:
+
+.. note::
+
+    It is good practice to perform a dry-run using the option -n, before you commit to a run:
+
+    .. code:: bash
+
+        .../pypsa-earth (pypsa-earth) $ snakemake solve_sector_networks -j8 --configfile config.tutorial.yaml -n
path: doc/tutorial_sector.rst
user: login: ekatef
body: Just to be sure, is `-j8` failure-safe? Will it work properly also for the machines with a lower number of cores?
created_at: 2025-03-13T22:04:55Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,637 @@
+.. SPDX-FileCopyrightText:  PyPSA-Earth and PyPSA-Eur Authors
+..
+.. SPDX-License-Identifier: CC-BY-4.0
+
+.. _tutorial_sector:
+
+##########################################
+Tutorial: Sector-Coupled
+##########################################
+
+.. note::
+    If you have not yet installed PyPSA-Earth, please refer to the :ref:`installation` section.
+
+In this tutorial, we will show you how to run the sector-coupled model. The sector-coupled model
+is a model that considers the energy system as a whole, including the electricity, heat, transport,
+and industry sectors. The model is based on the PyPSA-Eur model, which is a model of the European
+energy system. The sector-coupled model is a global model that can be used to model any region
+of the Earth. This section explains how to run and analyze the tutorial model.
+
+
+The sector-coupling code can be run as an overnight / greenfield scenario or myopic scenario.
+The overnight scenario is a long-term scenario that runs for a year, while the myopic scenario
+is a short-term scenario that runs for a day.
+
+
+Overnight Scenarios
+=============================================
+
+Configuration
+---------------------------------------------
+
+The configuration for sector-coupled is present in the  ``config.default.yaml`` file.
+This foresight parameter is set to overnight by default.
+
+.. code:: yaml
+
+    foresight: overnight
+
+Documentation for all options will be added successively to :ref:`config`.
+
+Scenarios can be defined like for electricity-only studies, but with additional wildcard options.
+
+.. code:: yaml
+
+    scenario:
+    simpl: [""]
+    ll: ["copt"]
+    clusters: [10]
+    opts: [Co2L-3h]
+    planning_horizons: # investment years for myopic and perfect; or costs year for overnight
+    - 2030
+    sopts:
+    - "144h"
+    demand:
+    - "AB"
+
+For allowed wildcard values, refer to :ref:`wildcards`.
+
+Execution
+---------------------------------------------
+To run the tutorial for the sector-coupled model, you need to activate the pypsa-earth environment.
+You need to have installed PyPSA-Earth using the instructions provided in the :ref:`installation` section.
+Make sure to be in the PyPSA-Earth root directory and run the following command:
+
+.. note::
+
+    It is good practice to perform a dry-run using the option -n, before you commit to a run:
+
+    .. code:: bash
+
+        .../pypsa-earth (pypsa-earth) $ snakemake solve_sector_networks -j8 --configfile config.tutorial.yaml -n
+
+
+.. code:: bash
+
+    .../pypsa-earth (pypsa-earth) $ conda activate pypsa-earth
+    .../pypsa-earth (pypsa-earth) $ snakemake solve_sector_networks -j8 --configfile config.tutorial.yaml
+
+This covers the retrieval of additional raw data from online resources and preprocessing data about
+the transport, industry, and heating sectors as well as additional rules about geological storage
path: doc/tutorial_sector.rst
user: login: ekatef
body: I love this explanation part! Remembering the previous support discussions, I feel that it could be probably beneficial to add a comment that the workflow is extracting all the data needed to run a model for any country of the world. What do you think?
created_at: 2025-03-13T22:07:59Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,637 @@
+.. SPDX-FileCopyrightText:  PyPSA-Earth and PyPSA-Eur Authors
+..
+.. SPDX-License-Identifier: CC-BY-4.0
+
+.. _tutorial_sector:
+
+##########################################
+Tutorial: Sector-Coupled
+##########################################
+
+.. note::
+    If you have not yet installed PyPSA-Earth, please refer to the :ref:`installation` section.
+
+In this tutorial, we will show you how to run the sector-coupled model. The sector-coupled model
+is a model that considers the energy system as a whole, including the electricity, heat, transport,
+and industry sectors. The model is based on the PyPSA-Eur model, which is a model of the European
+energy system. The sector-coupled model is a global model that can be used to model any region
+of the Earth. This section explains how to run and analyze the tutorial model.
+
+
+The sector-coupling code can be run as an overnight / greenfield scenario or myopic scenario.
+The overnight scenario is a long-term scenario that runs for a year, while the myopic scenario
+is a short-term scenario that runs for a day.
+
+
+Overnight Scenarios
+=============================================
+
+Configuration
+---------------------------------------------
+
+The configuration for sector-coupled is present in the  ``config.default.yaml`` file.
+This foresight parameter is set to overnight by default.
+
+.. code:: yaml
+
+    foresight: overnight
+
+Documentation for all options will be added successively to :ref:`config`.
+
+Scenarios can be defined like for electricity-only studies, but with additional wildcard options.
+
+.. code:: yaml
+
+    scenario:
+    simpl: [""]
+    ll: ["copt"]
+    clusters: [10]
+    opts: [Co2L-3h]
+    planning_horizons: # investment years for myopic and perfect; or costs year for overnight
+    - 2030
+    sopts:
+    - "144h"
+    demand:
+    - "AB"
+
+For allowed wildcard values, refer to :ref:`wildcards`.
+
+Execution
+---------------------------------------------
+To run the tutorial for the sector-coupled model, you need to activate the pypsa-earth environment.
+You need to have installed PyPSA-Earth using the instructions provided in the :ref:`installation` section.
+Make sure to be in the PyPSA-Earth root directory and run the following command:
+
+.. note::
+
+    It is good practice to perform a dry-run using the option -n, before you commit to a run:
+
+    .. code:: bash
+
+        .../pypsa-earth (pypsa-earth) $ snakemake solve_sector_networks -j8 --configfile config.tutorial.yaml -n
+
+
+.. code:: bash
+
+    .../pypsa-earth (pypsa-earth) $ conda activate pypsa-earth
+    .../pypsa-earth (pypsa-earth) $ snakemake solve_sector_networks -j8 --configfile config.tutorial.yaml
+
+This covers the retrieval of additional raw data from online resources and preprocessing data about
+the transport, industry, and heating sectors as well as additional rules about geological storage
+and sequestration potentials, gas infrastructure, and biomass potentials.
+This triggers a workflow of multiple preceding jobs that depend on each rule's inputs and outputs:
+
+.. graphviz::
+    :class: full-width
+    :align: center
path: doc/tutorial_sector.rst
user: login: ekatef
body: Great that you have implemented generation of the graph instead of using a static picture!
created_at: 2025-03-13T22:14:40Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,637 @@
+.. SPDX-FileCopyrightText:  PyPSA-Earth and PyPSA-Eur Authors
+..
+.. SPDX-License-Identifier: CC-BY-4.0
+
+.. _tutorial_sector:
+
+##########################################
+Tutorial: Sector-Coupled
+##########################################
+
+.. note::
+    If you have not yet installed PyPSA-Earth, please refer to the :ref:`installation` section.
+
+In this tutorial, we will show you how to run the sector-coupled model. The sector-coupled model
+is a model that considers the energy system as a whole, including the electricity, heat, transport,
+and industry sectors. The model is based on the PyPSA-Eur model, which is a model of the European
+energy system. The sector-coupled model is a global model that can be used to model any region
+of the Earth. This section explains how to run and analyze the tutorial model.
+
+
+The sector-coupling code can be run as an overnight / greenfield scenario or myopic scenario.
+The overnight scenario is a long-term scenario that runs for a year, while the myopic scenario
+is a short-term scenario that runs for a day.
+
+
+Overnight Scenarios
+=============================================
+
+Configuration
+---------------------------------------------
+
+The configuration for sector-coupled is present in the  ``config.default.yaml`` file.
+This foresight parameter is set to overnight by default.
+
+.. code:: yaml
+
+    foresight: overnight
+
+Documentation for all options will be added successively to :ref:`config`.
+
+Scenarios can be defined like for electricity-only studies, but with additional wildcard options.
+
+.. code:: yaml
+
+    scenario:
+    simpl: [""]
+    ll: ["copt"]
+    clusters: [10]
+    opts: [Co2L-3h]
+    planning_horizons: # investment years for myopic and perfect; or costs year for overnight
+    - 2030
+    sopts:
+    - "144h"
+    demand:
+    - "AB"
+
+For allowed wildcard values, refer to :ref:`wildcards`.
+
+Execution
+---------------------------------------------
+To run the tutorial for the sector-coupled model, you need to activate the pypsa-earth environment.
+You need to have installed PyPSA-Earth using the instructions provided in the :ref:`installation` section.
+Make sure to be in the PyPSA-Earth root directory and run the following command:
+
+.. note::
+
+    It is good practice to perform a dry-run using the option -n, before you commit to a run:
+
+    .. code:: bash
+
+        .../pypsa-earth (pypsa-earth) $ snakemake solve_sector_networks -j8 --configfile config.tutorial.yaml -n
+
+
+.. code:: bash
+
+    .../pypsa-earth (pypsa-earth) $ conda activate pypsa-earth
+    .../pypsa-earth (pypsa-earth) $ snakemake solve_sector_networks -j8 --configfile config.tutorial.yaml
+
+This covers the retrieval of additional raw data from online resources and preprocessing data about
+the transport, industry, and heating sectors as well as additional rules about geological storage
+and sequestration potentials, gas infrastructure, and biomass potentials.
+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];
+        edge[penwidth=2, color=grey];
+        0[label = "solve_sector_networks", color = "0.50 0.6 0.85", style="rounded"];
+        1[label = "solve_sector_network", color = "0.25 0.6 0.85", style="rounded"];
+        2[label = "add_export", color = "0.08 0.6 0.85", style="rounded"];
+        3[label = "prepare_ports", color = "0.06 0.6 0.85", style="rounded"];
+        4[label = "retrieve_cost_data\nyear: 2030", color = "0.05 0.6 0.85", style="rounded"];
+        5[label = "build_ship_profile\nh2export: 10", color = "0.34 0.6 0.85", style="rounded"];
+        6[label = "prepare_sector_network", color = "0.28 0.6 0.85", style="rounded"];
+        7[label = "override_respot\ndiscountrate: 0.071\nsopts: 144h", color = "0.20 0.6 0.85", style="rounded"];
+        8[label = "prepare_network\nll: copt\nopts: Co2L-4H", color = "0.53 0.6 0.85", style="rounded"];
+        9[label = "add_extra_components", color = "0.24 0.6 0.85", style="rounded"];
+        10[label = "cluster_network\nclusters: 6", color = "0.35 0.6 0.85", style="rounded"];
+        11[label = "simplify_network\nsimpl: ", color = "0.44 0.6 0.85", style="rounded"];
+        12[label = "add_electricity", color = "0.49 0.6 0.85", style="rounded"];
+        13[label = "build_renewable_profiles\ntechnology: onwind", color = "0.52 0.6 0.85", style="rounded"];
+        14[label = "build_natura_raster", color = "0.41 0.6 0.85", style="rounded"];
+        15[label = "retrieve_databundle_light", color = "0.23 0.6 0.85", style="rounded,dashed"];
+        16[label = "build_shapes", color = "0.65 0.6 0.85", style="rounded"];
+        17[label = "build_powerplants", color = "0.12 0.6 0.85", style="rounded"];
+        18[label = "base_network", color = "0.02 0.6 0.85", style="rounded"];
+        19[label = "build_osm_network", color = "0.04 0.6 0.85", style="rounded"];
+        20[label = "clean_osm_data", color = "0.14 0.6 0.85", style="rounded"];
+        21[label = "download_osm_data", color = "0.40 0.6 0.85", style="rounded"];
+        22[label = "build_bus_regions", color = "0.66 0.6 0.85", style="rounded"];
+        23[label = "build_renewable_profiles\ntechnology: offwind-ac", color = "0.52 0.6 0.85", style="rounded"];
+        24[label = "build_renewable_profiles\ntechnology: offwind-dc", color = "0.52 0.6 0.85", style="rounded"];
+        25[label = "build_renewable_profiles\ntechnology: solar", color = "0.52 0.6 0.85", style="rounded"];
+        26[label = "build_renewable_profiles\ntechnology: hydro", color = "0.52 0.6 0.85", style="rounded"];
+        27[label = "build_demand_profiles", color = "0.39 0.6 0.85", style="rounded"];
+        28[label = "prepare_energy_totals\ndemand: AB\nplanning_horizons: 2030", color = "0.29 0.6 0.85", style="rounded"];
+        29[label = "build_base_energy_totals", color = "0.10 0.6 0.85", style="rounded"];
+        30[label = "prepare_heat_data", color = "0.26 0.6 0.85", style="rounded"];
+        31[label = "build_clustered_population_layouts", color = "0.17 0.6 0.85", style="rounded"];
+        32[label = "build_population_layouts\nplanning_horizons: 2030", color = "0.11 0.6 0.85", style="rounded"];
+        33[label = "prepare_urban_percent", color = "0.13 0.6 0.85", style="rounded"];
+        34[label = "build_temperature_profiles", color = "0.60 0.6 0.85", style="rounded"];
+        35[label = "build_cop_profiles", color = "0.47 0.6 0.85", style="rounded"];
+        36[label = "build_solar_thermal_profiles", color = "0.36 0.6 0.85", style="rounded"];
+        37[label = "build_heat_demand", color = "0.38 0.6 0.85", style="rounded"];
+        38[label = "prepare_transport_data", color = "0.46 0.6 0.85", style="rounded"];
+        39[label = "prepare_transport_data_input", color = "0.31 0.6 0.85", style="rounded"];
+        40[label = "build_industry_demand", color = "0.62 0.6 0.85", style="rounded"];
+        41[label = "build_industrial_distribution_key", color = "0.19 0.6 0.85", style="rounded"];
+        42[label = "build_industrial_database", color = "0.01 0.6 0.85", style="rounded,dashed"];
+        43[label = "build_base_industry_totals\ndemand: AB\nplanning_horizons: 2030", color = "0.16 0.6 0.85", style="rounded"];
+        44[label = "prepare_airports", color = "0.33 0.6 0.85", style="rounded"];
+        45[label = "prepare_gas_network", color = "0.00 0.6 0.85", style="rounded"];
+        46[label = "copy_config", color = "0.48 0.6 0.85", style="rounded"];
+        1 -> 0
+        2 -> 1
+        4 -> 1
+        46 -> 1
+        3 -> 2
+        4 -> 2
+        5 -> 2
+        6 -> 2
+        10 -> 2
+        7 -> 6
+        4 -> 6
+        30 -> 6
+        38 -> 6
+        31 -> 6
+        40 -> 6
+        28 -> 6
+        44 -> 6
+        3 -> 6
+        10 -> 6
+        45 -> 6
+        8 -> 7
+        28 -> 7
+        9 -> 8
+        4 -> 8
+        10 -> 9
+        4 -> 9
+        11 -> 10
+        16 -> 10
+        4 -> 10
+        12 -> 11
+        4 -> 11
+        22 -> 11
+        16 -> 11
+        13 -> 12
+        23 -> 12
+        24 -> 12
+        25 -> 12
+        26 -> 12
+        18 -> 12
+        4 -> 12
+        17 -> 12
+        16 -> 12
+        27 -> 12
+        14 -> 13
+        15 -> 13
+        16 -> 13
+        17 -> 13
+        22 -> 13
+        15 -> 14
+        15 -> 16
+        18 -> 17
+        20 -> 17
+        16 -> 17
+        19 -> 18
+        16 -> 18
+        20 -> 19
+        16 -> 19
+        21 -> 20
+        16 -> 20
+        16 -> 22
+        18 -> 22
+        14 -> 23
+        15 -> 23
+        16 -> 23
+        17 -> 23
+        22 -> 23
+        14 -> 24
+        15 -> 24
+        16 -> 24
+        17 -> 24
+        22 -> 24
+        14 -> 25
+        15 -> 25
+        16 -> 25
+        17 -> 25
+        22 -> 25
+        14 -> 26
+        15 -> 26
+        16 -> 26
+        17 -> 26
+        22 -> 26
+        18 -> 27
+        22 -> 27
+        15 -> 27
+        16 -> 27
+        29 -> 28
+        10 -> 30
+        28 -> 30
+        31 -> 30
+        34 -> 30
+        35 -> 30
+        36 -> 30
+        37 -> 30
+        32 -> 31
+        10 -> 31
+        15 -> 31
+        16 -> 32
+        33 -> 32
+        15 -> 32
+        32 -> 34
+        10 -> 34
+        15 -> 34
+        34 -> 35
+        32 -> 36
+        10 -> 36
+        15 -> 36
+        32 -> 37
+        10 -> 37
+        15 -> 37
+        10 -> 38
+        28 -> 38
+        39 -> 38
+        31 -> 38
+        34 -> 38
+        41 -> 40
+        43 -> 40
+        42 -> 40
+        4 -> 40
+        10 -> 41
+        31 -> 41
+        42 -> 41
+        29 -> 43
+        10 -> 45
+    }
+
+
+In the terminal, this will show up as a list of jobs to be run:
+
+.. code:: console
+
+    Building DAG of jobs...
+    Job stats:
+    job                                   count
+    ----------------------------------  -------
+    add_electricity                           1
+    add_export                                1
+    add_extra_components                      1
+    base_network                              1
+    build_base_energy_totals                  1
+    build_base_industry_totals                1
+    build_bus_regions                         1
+    build_clustered_population_layouts        1
+    build_cop_profiles                        1
+    build_demand_profiles                     1
+    build_heat_demand                         1
+    build_industrial_distribution_key         1
+    build_industry_demand                     1
+    build_natura_raster                       1
+    build_osm_network                         1
+    build_population_layouts                  1
+    build_powerplants                         1
+    build_renewable_profiles                  5
+    build_shapes                              1
+    build_ship_profile                        1
+    build_solar_thermal_profiles              1
+    build_temperature_profiles                1
+    clean_osm_data                            1
+    cluster_network                           1
+    copy_config                               1
+    download_osm_data                         1
+    override_respot                           1
+    prepare_airports                          1
+    prepare_energy_totals                     1
+    prepare_gas_network                       1
+    prepare_heat_data                         1
+    prepare_network                           1
+    prepare_ports                             1
+    prepare_sector_network                    1
+    prepare_transport_data                    1
+    prepare_transport_data_input              1
+    prepare_urban_percent                     1
+    retrieve_cost_data                        1
+    retrieve_databundle_light                 1
+    simplify_network                          1
+    solve_sector_network                      1
+    solve_sector_networks                     1
+    total                                    46
+
+
+
+
+Myopic Foresight Scenarios
+=============================================
+
+
+Configuration
+---------------------------------------------
+
+The configuration to run the tutorial for the myopic foresight scenario is present
+in the ``test/config.test_myopic.yaml`` file.
path: doc/tutorial_sector.rst
user: login: ekatef
body: I wonder if it could make sense to add a short explanation on what is a myopic optimisation and probably a reference to some relevant published work? Could be probably relevant for people who are familiar with basic concepts but not yet confident

@davide-f may you have any suggestions on that? 🙏🏽 
created_at: 2025-03-13T22:18:30Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,637 @@
+.. SPDX-FileCopyrightText:  PyPSA-Earth and PyPSA-Eur Authors
+..
+.. SPDX-License-Identifier: CC-BY-4.0
+
+.. _tutorial_sector:
+
+##########################################
+Tutorial: Sector-Coupled
+##########################################
+
+.. note::
+    If you have not yet installed PyPSA-Earth, please refer to the :ref:`installation` section.
+
+In this tutorial, we will show you how to run the sector-coupled model. The sector-coupled model
+is a model that considers the energy system as a whole, including the electricity, heat, transport,
+and industry sectors. The model is based on the PyPSA-Eur model, which is a model of the European
+energy system. The sector-coupled model is a global model that can be used to model any region
+of the Earth. This section explains how to run and analyze the tutorial model.
+
+
+The sector-coupling code can be run as an overnight / greenfield scenario or myopic scenario.
+The overnight scenario is a long-term scenario that runs for a year, while the myopic scenario
+is a short-term scenario that runs for a day.
+
+
+Overnight Scenarios
+=============================================
+
+Configuration
+---------------------------------------------
+
+The configuration for sector-coupled is present in the  ``config.default.yaml`` file.
+This foresight parameter is set to overnight by default.
+
+.. code:: yaml
+
+    foresight: overnight
+
+Documentation for all options will be added successively to :ref:`config`.
+
+Scenarios can be defined like for electricity-only studies, but with additional wildcard options.
+
+.. code:: yaml
+
+    scenario:
+    simpl: [""]
+    ll: ["copt"]
+    clusters: [10]
+    opts: [Co2L-3h]
+    planning_horizons: # investment years for myopic and perfect; or costs year for overnight
+    - 2030
+    sopts:
+    - "144h"
+    demand:
+    - "AB"
+
+For allowed wildcard values, refer to :ref:`wildcards`.
+
+Execution
+---------------------------------------------
+To run the tutorial for the sector-coupled model, you need to activate the pypsa-earth environment.
+You need to have installed PyPSA-Earth using the instructions provided in the :ref:`installation` section.
+Make sure to be in the PyPSA-Earth root directory and run the following command:
+
+.. note::
+
+    It is good practice to perform a dry-run using the option -n, before you commit to a run:
+
+    .. code:: bash
+
+        .../pypsa-earth (pypsa-earth) $ snakemake solve_sector_networks -j8 --configfile config.tutorial.yaml -n
+
+
+.. code:: bash
+
+    .../pypsa-earth (pypsa-earth) $ conda activate pypsa-earth
+    .../pypsa-earth (pypsa-earth) $ snakemake solve_sector_networks -j8 --configfile config.tutorial.yaml
+
+This covers the retrieval of additional raw data from online resources and preprocessing data about
+the transport, industry, and heating sectors as well as additional rules about geological storage
+and sequestration potentials, gas infrastructure, and biomass potentials.
+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];
+        edge[penwidth=2, color=grey];
+        0[label = "solve_sector_networks", color = "0.50 0.6 0.85", style="rounded"];
+        1[label = "solve_sector_network", color = "0.25 0.6 0.85", style="rounded"];
+        2[label = "add_export", color = "0.08 0.6 0.85", style="rounded"];
+        3[label = "prepare_ports", color = "0.06 0.6 0.85", style="rounded"];
+        4[label = "retrieve_cost_data\nyear: 2030", color = "0.05 0.6 0.85", style="rounded"];
+        5[label = "build_ship_profile\nh2export: 10", color = "0.34 0.6 0.85", style="rounded"];
+        6[label = "prepare_sector_network", color = "0.28 0.6 0.85", style="rounded"];
+        7[label = "override_respot\ndiscountrate: 0.071\nsopts: 144h", color = "0.20 0.6 0.85", style="rounded"];
+        8[label = "prepare_network\nll: copt\nopts: Co2L-4H", color = "0.53 0.6 0.85", style="rounded"];
+        9[label = "add_extra_components", color = "0.24 0.6 0.85", style="rounded"];
+        10[label = "cluster_network\nclusters: 6", color = "0.35 0.6 0.85", style="rounded"];
+        11[label = "simplify_network\nsimpl: ", color = "0.44 0.6 0.85", style="rounded"];
+        12[label = "add_electricity", color = "0.49 0.6 0.85", style="rounded"];
+        13[label = "build_renewable_profiles\ntechnology: onwind", color = "0.52 0.6 0.85", style="rounded"];
+        14[label = "build_natura_raster", color = "0.41 0.6 0.85", style="rounded"];
+        15[label = "retrieve_databundle_light", color = "0.23 0.6 0.85", style="rounded,dashed"];
+        16[label = "build_shapes", color = "0.65 0.6 0.85", style="rounded"];
+        17[label = "build_powerplants", color = "0.12 0.6 0.85", style="rounded"];
+        18[label = "base_network", color = "0.02 0.6 0.85", style="rounded"];
+        19[label = "build_osm_network", color = "0.04 0.6 0.85", style="rounded"];
+        20[label = "clean_osm_data", color = "0.14 0.6 0.85", style="rounded"];
+        21[label = "download_osm_data", color = "0.40 0.6 0.85", style="rounded"];
+        22[label = "build_bus_regions", color = "0.66 0.6 0.85", style="rounded"];
+        23[label = "build_renewable_profiles\ntechnology: offwind-ac", color = "0.52 0.6 0.85", style="rounded"];
+        24[label = "build_renewable_profiles\ntechnology: offwind-dc", color = "0.52 0.6 0.85", style="rounded"];
+        25[label = "build_renewable_profiles\ntechnology: solar", color = "0.52 0.6 0.85", style="rounded"];
+        26[label = "build_renewable_profiles\ntechnology: hydro", color = "0.52 0.6 0.85", style="rounded"];
+        27[label = "build_demand_profiles", color = "0.39 0.6 0.85", style="rounded"];
+        28[label = "prepare_energy_totals\ndemand: AB\nplanning_horizons: 2030", color = "0.29 0.6 0.85", style="rounded"];
+        29[label = "build_base_energy_totals", color = "0.10 0.6 0.85", style="rounded"];
+        30[label = "prepare_heat_data", color = "0.26 0.6 0.85", style="rounded"];
+        31[label = "build_clustered_population_layouts", color = "0.17 0.6 0.85", style="rounded"];
+        32[label = "build_population_layouts\nplanning_horizons: 2030", color = "0.11 0.6 0.85", style="rounded"];
+        33[label = "prepare_urban_percent", color = "0.13 0.6 0.85", style="rounded"];
+        34[label = "build_temperature_profiles", color = "0.60 0.6 0.85", style="rounded"];
+        35[label = "build_cop_profiles", color = "0.47 0.6 0.85", style="rounded"];
+        36[label = "build_solar_thermal_profiles", color = "0.36 0.6 0.85", style="rounded"];
+        37[label = "build_heat_demand", color = "0.38 0.6 0.85", style="rounded"];
+        38[label = "prepare_transport_data", color = "0.46 0.6 0.85", style="rounded"];
+        39[label = "prepare_transport_data_input", color = "0.31 0.6 0.85", style="rounded"];
+        40[label = "build_industry_demand", color = "0.62 0.6 0.85", style="rounded"];
+        41[label = "build_industrial_distribution_key", color = "0.19 0.6 0.85", style="rounded"];
+        42[label = "build_industrial_database", color = "0.01 0.6 0.85", style="rounded,dashed"];
+        43[label = "build_base_industry_totals\ndemand: AB\nplanning_horizons: 2030", color = "0.16 0.6 0.85", style="rounded"];
+        44[label = "prepare_airports", color = "0.33 0.6 0.85", style="rounded"];
+        45[label = "prepare_gas_network", color = "0.00 0.6 0.85", style="rounded"];
+        46[label = "copy_config", color = "0.48 0.6 0.85", style="rounded"];
+        1 -> 0
+        2 -> 1
+        4 -> 1
+        46 -> 1
+        3 -> 2
+        4 -> 2
+        5 -> 2
+        6 -> 2
+        10 -> 2
+        7 -> 6
+        4 -> 6
+        30 -> 6
+        38 -> 6
+        31 -> 6
+        40 -> 6
+        28 -> 6
+        44 -> 6
+        3 -> 6
+        10 -> 6
+        45 -> 6
+        8 -> 7
+        28 -> 7
+        9 -> 8
+        4 -> 8
+        10 -> 9
+        4 -> 9
+        11 -> 10
+        16 -> 10
+        4 -> 10
+        12 -> 11
+        4 -> 11
+        22 -> 11
+        16 -> 11
+        13 -> 12
+        23 -> 12
+        24 -> 12
+        25 -> 12
+        26 -> 12
+        18 -> 12
+        4 -> 12
+        17 -> 12
+        16 -> 12
+        27 -> 12
+        14 -> 13
+        15 -> 13
+        16 -> 13
+        17 -> 13
+        22 -> 13
+        15 -> 14
+        15 -> 16
+        18 -> 17
+        20 -> 17
+        16 -> 17
+        19 -> 18
+        16 -> 18
+        20 -> 19
+        16 -> 19
+        21 -> 20
+        16 -> 20
+        16 -> 22
+        18 -> 22
+        14 -> 23
+        15 -> 23
+        16 -> 23
+        17 -> 23
+        22 -> 23
+        14 -> 24
+        15 -> 24
+        16 -> 24
+        17 -> 24
+        22 -> 24
+        14 -> 25
+        15 -> 25
+        16 -> 25
+        17 -> 25
+        22 -> 25
+        14 -> 26
+        15 -> 26
+        16 -> 26
+        17 -> 26
+        22 -> 26
+        18 -> 27
+        22 -> 27
+        15 -> 27
+        16 -> 27
+        29 -> 28
+        10 -> 30
+        28 -> 30
+        31 -> 30
+        34 -> 30
+        35 -> 30
+        36 -> 30
+        37 -> 30
+        32 -> 31
+        10 -> 31
+        15 -> 31
+        16 -> 32
+        33 -> 32
+        15 -> 32
+        32 -> 34
+        10 -> 34
+        15 -> 34
+        34 -> 35
+        32 -> 36
+        10 -> 36
+        15 -> 36
+        32 -> 37
+        10 -> 37
+        15 -> 37
+        10 -> 38
+        28 -> 38
+        39 -> 38
+        31 -> 38
+        34 -> 38
+        41 -> 40
+        43 -> 40
+        42 -> 40
+        4 -> 40
+        10 -> 41
+        31 -> 41
+        42 -> 41
+        29 -> 43
+        10 -> 45
+    }
+
+
+In the terminal, this will show up as a list of jobs to be run:
+
+.. code:: console
+
+    Building DAG of jobs...
+    Job stats:
+    job                                   count
+    ----------------------------------  -------
+    add_electricity                           1
+    add_export                                1
+    add_extra_components                      1
+    base_network                              1
+    build_base_energy_totals                  1
+    build_base_industry_totals                1
+    build_bus_regions                         1
+    build_clustered_population_layouts        1
+    build_cop_profiles                        1
+    build_demand_profiles                     1
+    build_heat_demand                         1
+    build_industrial_distribution_key         1
+    build_industry_demand                     1
+    build_natura_raster                       1
+    build_osm_network                         1
+    build_population_layouts                  1
+    build_powerplants                         1
+    build_renewable_profiles                  5
+    build_shapes                              1
+    build_ship_profile                        1
+    build_solar_thermal_profiles              1
+    build_temperature_profiles                1
+    clean_osm_data                            1
+    cluster_network                           1
+    copy_config                               1
+    download_osm_data                         1
+    override_respot                           1
+    prepare_airports                          1
+    prepare_energy_totals                     1
+    prepare_gas_network                       1
+    prepare_heat_data                         1
+    prepare_network                           1
+    prepare_ports                             1
+    prepare_sector_network                    1
+    prepare_transport_data                    1
+    prepare_transport_data_input              1
+    prepare_urban_percent                     1
+    retrieve_cost_data                        1
+    retrieve_databundle_light                 1
+    simplify_network                          1
+    solve_sector_network                      1
+    solve_sector_networks                     1
+    total                                    46
+
+
+
+
+Myopic Foresight Scenarios
+=============================================
+
+
+Configuration
+---------------------------------------------
+
+The configuration to run the tutorial for the myopic foresight scenario is present
+in the ``test/config.test_myopic.yaml`` file.
+
+.. code:: yaml
+
+    foresight: myopic
+
+Scenarios can be defined like for electricity-only studies, but with additional
+wildcard options. For the myopic foresight mode, the ``{planning_horizons}`` wildcard
+defines the sequence of investment horizons.
path: doc/tutorial_sector.rst
user: login: ekatef
body: If I understand properly, the current implementation allows to run the myopic optimisation only for the sectoral model. If that's a correct understanding, can we add a comment on that also to the tutorial?
created_at: 2025-03-13T22:20:48Z
author_association: MEMBER
diff_hunk: @@ -2,7 +2,7 @@
 ..
 .. SPDX-License-Identifier: CC-BY-4.0
 
-.. _tutorial:
+.. _model_customization:
path: doc/model_customization.rst
user: login: GbotemiB
body: Actually, the customization is still present. I only had to rename the file as it looks misleading to use `tutorial` as the name of the file.
created_at: 2025-03-19T13:58:54Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,637 @@
+.. SPDX-FileCopyrightText:  PyPSA-Earth and PyPSA-Eur Authors
+..
+.. SPDX-License-Identifier: CC-BY-4.0
+
+.. _tutorial_sector:
+
+##########################################
+Tutorial: Sector-Coupled
+##########################################
+
+.. note::
+    If you have not yet installed PyPSA-Earth, please refer to the :ref:`installation` section.
+
+In this tutorial, we will show you how to run the sector-coupled model. The sector-coupled model
+is a model that considers the energy system as a whole, including the electricity, heat, transport,
+and industry sectors. The model is based on the PyPSA-Eur model, which is a model of the European
+energy system. The sector-coupled model is a global model that can be used to model any region
path: doc/tutorial_sector.rst
user: login: GbotemiB
body: Just to be clear, are you saying the sector-model cant be used to model any region of the world?
created_at: 2025-03-19T14:10:54Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,637 @@
+.. SPDX-FileCopyrightText:  PyPSA-Earth and PyPSA-Eur Authors
+..
+.. SPDX-License-Identifier: CC-BY-4.0
+
+.. _tutorial_sector:
+
+##########################################
+Tutorial: Sector-Coupled
+##########################################
+
+.. note::
+    If you have not yet installed PyPSA-Earth, please refer to the :ref:`installation` section.
+
+In this tutorial, we will show you how to run the sector-coupled model. The sector-coupled model
+is a model that considers the energy system as a whole, including the electricity, heat, transport,
+and industry sectors. The model is based on the PyPSA-Eur model, which is a model of the European
+energy system. The sector-coupled model is a global model that can be used to model any region
+of the Earth. This section explains how to run and analyze the tutorial model.
+
+
+The sector-coupling code can be run as an overnight / greenfield scenario or myopic scenario.
+The overnight scenario is a long-term scenario that runs for a year, while the myopic scenario
+is a short-term scenario that runs for a day.
+
+
+Overnight Scenarios
+=============================================
+
+Configuration
+---------------------------------------------
+
+The configuration for sector-coupled is present in the  ``config.default.yaml`` file.
+This foresight parameter is set to overnight by default.
path: doc/tutorial_sector.rst
user: login: GbotemiB
body: For the sector part, the tutorial config will be ontop of the default config which is where tutorial is set to True. The `config.default.yaml` contains sector config that why it is being mentioned.
created_at: 2025-03-19T14:13:06Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,637 @@
+.. SPDX-FileCopyrightText:  PyPSA-Earth and PyPSA-Eur Authors
+..
+.. SPDX-License-Identifier: CC-BY-4.0
+
+.. _tutorial_sector:
+
+##########################################
+Tutorial: Sector-Coupled
+##########################################
+
+.. note::
+    If you have not yet installed PyPSA-Earth, please refer to the :ref:`installation` section.
+
+In this tutorial, we will show you how to run the sector-coupled model. The sector-coupled model
+is a model that considers the energy system as a whole, including the electricity, heat, transport,
+and industry sectors. The model is based on the PyPSA-Eur model, which is a model of the European
+energy system. The sector-coupled model is a global model that can be used to model any region
+of the Earth. This section explains how to run and analyze the tutorial model.
+
+
+The sector-coupling code can be run as an overnight / greenfield scenario or myopic scenario.
+The overnight scenario is a long-term scenario that runs for a year, while the myopic scenario
+is a short-term scenario that runs for a day.
+
+
+Overnight Scenarios
+=============================================
+
+Configuration
+---------------------------------------------
+
+The configuration for sector-coupled is present in the  ``config.default.yaml`` file.
+This foresight parameter is set to overnight by default.
+
+.. code:: yaml
+
+    foresight: overnight
+
+Documentation for all options will be added successively to :ref:`config`.
path: doc/tutorial_sector.rst
user: login: GbotemiB
body: The reason for constructing this way, is to account for ongoing development from team members in contributing to the configuration docs and also accounts for future changes.

At the moments, efforts are being made as regards to the config file.
created_at: 2025-03-19T14:16:03Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,637 @@
+.. SPDX-FileCopyrightText:  PyPSA-Earth and PyPSA-Eur Authors
+..
+.. SPDX-License-Identifier: CC-BY-4.0
+
+.. _tutorial_sector:
+
+##########################################
+Tutorial: Sector-Coupled
+##########################################
+
+.. note::
+    If you have not yet installed PyPSA-Earth, please refer to the :ref:`installation` section.
+
+In this tutorial, we will show you how to run the sector-coupled model. The sector-coupled model
+is a model that considers the energy system as a whole, including the electricity, heat, transport,
+and industry sectors. The model is based on the PyPSA-Eur model, which is a model of the European
+energy system. The sector-coupled model is a global model that can be used to model any region
+of the Earth. This section explains how to run and analyze the tutorial model.
+
+
+The sector-coupling code can be run as an overnight / greenfield scenario or myopic scenario.
+The overnight scenario is a long-term scenario that runs for a year, while the myopic scenario
+is a short-term scenario that runs for a day.
+
+
+Overnight Scenarios
+=============================================
+
+Configuration
+---------------------------------------------
+
+The configuration for sector-coupled is present in the  ``config.default.yaml`` file.
+This foresight parameter is set to overnight by default.
+
+.. code:: yaml
+
+    foresight: overnight
+
+Documentation for all options will be added successively to :ref:`config`.
+
+Scenarios can be defined like for electricity-only studies, but with additional wildcard options.
path: doc/tutorial_sector.rst
user: login: GbotemiB
body: Thanks for noting this. I will point it out.
created_at: 2025-03-19T14:16:44Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,637 @@
+.. SPDX-FileCopyrightText:  PyPSA-Earth and PyPSA-Eur Authors
+..
+.. SPDX-License-Identifier: CC-BY-4.0
+
+.. _tutorial_sector:
+
+##########################################
+Tutorial: Sector-Coupled
+##########################################
+
+.. note::
+    If you have not yet installed PyPSA-Earth, please refer to the :ref:`installation` section.
+
+In this tutorial, we will show you how to run the sector-coupled model. The sector-coupled model
+is a model that considers the energy system as a whole, including the electricity, heat, transport,
+and industry sectors. The model is based on the PyPSA-Eur model, which is a model of the European
+energy system. The sector-coupled model is a global model that can be used to model any region
+of the Earth. This section explains how to run and analyze the tutorial model.
+
+
+The sector-coupling code can be run as an overnight / greenfield scenario or myopic scenario.
+The overnight scenario is a long-term scenario that runs for a year, while the myopic scenario
+is a short-term scenario that runs for a day.
+
+
+Overnight Scenarios
+=============================================
+
+Configuration
+---------------------------------------------
+
+The configuration for sector-coupled is present in the  ``config.default.yaml`` file.
+This foresight parameter is set to overnight by default.
+
+.. code:: yaml
+
+    foresight: overnight
+
+Documentation for all options will be added successively to :ref:`config`.
+
+Scenarios can be defined like for electricity-only studies, but with additional wildcard options.
+
+.. code:: yaml
+
+    scenario:
+    simpl: [""]
+    ll: ["copt"]
+    clusters: [10]
+    opts: [Co2L-3h]
+    planning_horizons: # investment years for myopic and perfect; or costs year for overnight
+    - 2030
+    sopts:
+    - "144h"
+    demand:
+    - "AB"
+
+For allowed wildcard values, refer to :ref:`wildcards`.
+
+Execution
+---------------------------------------------
+To run the tutorial for the sector-coupled model, you need to activate the pypsa-earth environment.
+You need to have installed PyPSA-Earth using the instructions provided in the :ref:`installation` section.
+Make sure to be in the PyPSA-Earth root directory and run the following command:
+
+.. note::
+
+    It is good practice to perform a dry-run using the option -n, before you commit to a run:
+
+    .. code:: bash
+
+        .../pypsa-earth (pypsa-earth) $ snakemake solve_sector_networks -j8 --configfile config.tutorial.yaml -n
path: doc/tutorial_sector.rst
user: login: GbotemiB
body: I think it best to reduce it to cores of 2 as it is in other part of the documentation
created_at: 2025-03-19T14:21:46Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,637 @@
+.. SPDX-FileCopyrightText:  PyPSA-Earth and PyPSA-Eur Authors
+..
+.. SPDX-License-Identifier: CC-BY-4.0
+
+.. _tutorial_sector:
+
+##########################################
+Tutorial: Sector-Coupled
+##########################################
+
+.. note::
+    If you have not yet installed PyPSA-Earth, please refer to the :ref:`installation` section.
+
+In this tutorial, we will show you how to run the sector-coupled model. The sector-coupled model
+is a model that considers the energy system as a whole, including the electricity, heat, transport,
+and industry sectors. The model is based on the PyPSA-Eur model, which is a model of the European
+energy system. The sector-coupled model is a global model that can be used to model any region
+of the Earth. This section explains how to run and analyze the tutorial model.
+
+
+The sector-coupling code can be run as an overnight / greenfield scenario or myopic scenario.
+The overnight scenario is a long-term scenario that runs for a year, while the myopic scenario
+is a short-term scenario that runs for a day.
+
+
+Overnight Scenarios
+=============================================
+
+Configuration
+---------------------------------------------
+
+The configuration for sector-coupled is present in the  ``config.default.yaml`` file.
+This foresight parameter is set to overnight by default.
+
+.. code:: yaml
+
+    foresight: overnight
+
+Documentation for all options will be added successively to :ref:`config`.
+
+Scenarios can be defined like for electricity-only studies, but with additional wildcard options.
+
+.. code:: yaml
+
+    scenario:
+    simpl: [""]
+    ll: ["copt"]
+    clusters: [10]
+    opts: [Co2L-3h]
+    planning_horizons: # investment years for myopic and perfect; or costs year for overnight
+    - 2030
+    sopts:
+    - "144h"
+    demand:
+    - "AB"
+
+For allowed wildcard values, refer to :ref:`wildcards`.
+
+Execution
+---------------------------------------------
+To run the tutorial for the sector-coupled model, you need to activate the pypsa-earth environment.
+You need to have installed PyPSA-Earth using the instructions provided in the :ref:`installation` section.
+Make sure to be in the PyPSA-Earth root directory and run the following command:
+
+.. note::
+
+    It is good practice to perform a dry-run using the option -n, before you commit to a run:
+
+    .. code:: bash
+
+        .../pypsa-earth (pypsa-earth) $ snakemake solve_sector_networks -j8 --configfile config.tutorial.yaml -n
+
+
+.. code:: bash
+
+    .../pypsa-earth (pypsa-earth) $ conda activate pypsa-earth
+    .../pypsa-earth (pypsa-earth) $ snakemake solve_sector_networks -j8 --configfile config.tutorial.yaml
+
+This covers the retrieval of additional raw data from online resources and preprocessing data about
+the transport, industry, and heating sectors as well as additional rules about geological storage
+and sequestration potentials, gas infrastructure, and biomass potentials.
+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];
+        edge[penwidth=2, color=grey];
+        0[label = "solve_sector_networks", color = "0.50 0.6 0.85", style="rounded"];
+        1[label = "solve_sector_network", color = "0.25 0.6 0.85", style="rounded"];
+        2[label = "add_export", color = "0.08 0.6 0.85", style="rounded"];
+        3[label = "prepare_ports", color = "0.06 0.6 0.85", style="rounded"];
+        4[label = "retrieve_cost_data\nyear: 2030", color = "0.05 0.6 0.85", style="rounded"];
+        5[label = "build_ship_profile\nh2export: 10", color = "0.34 0.6 0.85", style="rounded"];
+        6[label = "prepare_sector_network", color = "0.28 0.6 0.85", style="rounded"];
+        7[label = "override_respot\ndiscountrate: 0.071\nsopts: 144h", color = "0.20 0.6 0.85", style="rounded"];
+        8[label = "prepare_network\nll: copt\nopts: Co2L-4H", color = "0.53 0.6 0.85", style="rounded"];
+        9[label = "add_extra_components", color = "0.24 0.6 0.85", style="rounded"];
+        10[label = "cluster_network\nclusters: 6", color = "0.35 0.6 0.85", style="rounded"];
+        11[label = "simplify_network\nsimpl: ", color = "0.44 0.6 0.85", style="rounded"];
+        12[label = "add_electricity", color = "0.49 0.6 0.85", style="rounded"];
+        13[label = "build_renewable_profiles\ntechnology: onwind", color = "0.52 0.6 0.85", style="rounded"];
+        14[label = "build_natura_raster", color = "0.41 0.6 0.85", style="rounded"];
+        15[label = "retrieve_databundle_light", color = "0.23 0.6 0.85", style="rounded,dashed"];
+        16[label = "build_shapes", color = "0.65 0.6 0.85", style="rounded"];
+        17[label = "build_powerplants", color = "0.12 0.6 0.85", style="rounded"];
+        18[label = "base_network", color = "0.02 0.6 0.85", style="rounded"];
+        19[label = "build_osm_network", color = "0.04 0.6 0.85", style="rounded"];
+        20[label = "clean_osm_data", color = "0.14 0.6 0.85", style="rounded"];
+        21[label = "download_osm_data", color = "0.40 0.6 0.85", style="rounded"];
+        22[label = "build_bus_regions", color = "0.66 0.6 0.85", style="rounded"];
+        23[label = "build_renewable_profiles\ntechnology: offwind-ac", color = "0.52 0.6 0.85", style="rounded"];
+        24[label = "build_renewable_profiles\ntechnology: offwind-dc", color = "0.52 0.6 0.85", style="rounded"];
+        25[label = "build_renewable_profiles\ntechnology: solar", color = "0.52 0.6 0.85", style="rounded"];
+        26[label = "build_renewable_profiles\ntechnology: hydro", color = "0.52 0.6 0.85", style="rounded"];
+        27[label = "build_demand_profiles", color = "0.39 0.6 0.85", style="rounded"];
+        28[label = "prepare_energy_totals\ndemand: AB\nplanning_horizons: 2030", color = "0.29 0.6 0.85", style="rounded"];
+        29[label = "build_base_energy_totals", color = "0.10 0.6 0.85", style="rounded"];
+        30[label = "prepare_heat_data", color = "0.26 0.6 0.85", style="rounded"];
+        31[label = "build_clustered_population_layouts", color = "0.17 0.6 0.85", style="rounded"];
+        32[label = "build_population_layouts\nplanning_horizons: 2030", color = "0.11 0.6 0.85", style="rounded"];
+        33[label = "prepare_urban_percent", color = "0.13 0.6 0.85", style="rounded"];
+        34[label = "build_temperature_profiles", color = "0.60 0.6 0.85", style="rounded"];
+        35[label = "build_cop_profiles", color = "0.47 0.6 0.85", style="rounded"];
+        36[label = "build_solar_thermal_profiles", color = "0.36 0.6 0.85", style="rounded"];
+        37[label = "build_heat_demand", color = "0.38 0.6 0.85", style="rounded"];
+        38[label = "prepare_transport_data", color = "0.46 0.6 0.85", style="rounded"];
+        39[label = "prepare_transport_data_input", color = "0.31 0.6 0.85", style="rounded"];
+        40[label = "build_industry_demand", color = "0.62 0.6 0.85", style="rounded"];
+        41[label = "build_industrial_distribution_key", color = "0.19 0.6 0.85", style="rounded"];
+        42[label = "build_industrial_database", color = "0.01 0.6 0.85", style="rounded,dashed"];
+        43[label = "build_base_industry_totals\ndemand: AB\nplanning_horizons: 2030", color = "0.16 0.6 0.85", style="rounded"];
+        44[label = "prepare_airports", color = "0.33 0.6 0.85", style="rounded"];
+        45[label = "prepare_gas_network", color = "0.00 0.6 0.85", style="rounded"];
+        46[label = "copy_config", color = "0.48 0.6 0.85", style="rounded"];
+        1 -> 0
+        2 -> 1
+        4 -> 1
+        46 -> 1
+        3 -> 2
+        4 -> 2
+        5 -> 2
+        6 -> 2
+        10 -> 2
+        7 -> 6
+        4 -> 6
+        30 -> 6
+        38 -> 6
+        31 -> 6
+        40 -> 6
+        28 -> 6
+        44 -> 6
+        3 -> 6
+        10 -> 6
+        45 -> 6
+        8 -> 7
+        28 -> 7
+        9 -> 8
+        4 -> 8
+        10 -> 9
+        4 -> 9
+        11 -> 10
+        16 -> 10
+        4 -> 10
+        12 -> 11
+        4 -> 11
+        22 -> 11
+        16 -> 11
+        13 -> 12
+        23 -> 12
+        24 -> 12
+        25 -> 12
+        26 -> 12
+        18 -> 12
+        4 -> 12
+        17 -> 12
+        16 -> 12
+        27 -> 12
+        14 -> 13
+        15 -> 13
+        16 -> 13
+        17 -> 13
+        22 -> 13
+        15 -> 14
+        15 -> 16
+        18 -> 17
+        20 -> 17
+        16 -> 17
+        19 -> 18
+        16 -> 18
+        20 -> 19
+        16 -> 19
+        21 -> 20
+        16 -> 20
+        16 -> 22
+        18 -> 22
+        14 -> 23
+        15 -> 23
+        16 -> 23
+        17 -> 23
+        22 -> 23
+        14 -> 24
+        15 -> 24
+        16 -> 24
+        17 -> 24
+        22 -> 24
+        14 -> 25
+        15 -> 25
+        16 -> 25
+        17 -> 25
+        22 -> 25
+        14 -> 26
+        15 -> 26
+        16 -> 26
+        17 -> 26
+        22 -> 26
+        18 -> 27
+        22 -> 27
+        15 -> 27
+        16 -> 27
+        29 -> 28
+        10 -> 30
+        28 -> 30
+        31 -> 30
+        34 -> 30
+        35 -> 30
+        36 -> 30
+        37 -> 30
+        32 -> 31
+        10 -> 31
+        15 -> 31
+        16 -> 32
+        33 -> 32
+        15 -> 32
+        32 -> 34
+        10 -> 34
+        15 -> 34
+        34 -> 35
+        32 -> 36
+        10 -> 36
+        15 -> 36
+        32 -> 37
+        10 -> 37
+        15 -> 37
+        10 -> 38
+        28 -> 38
+        39 -> 38
+        31 -> 38
+        34 -> 38
+        41 -> 40
+        43 -> 40
+        42 -> 40
+        4 -> 40
+        10 -> 41
+        31 -> 41
+        42 -> 41
+        29 -> 43
+        10 -> 45
+    }
+
+
+In the terminal, this will show up as a list of jobs to be run:
+
+.. code:: console
+
+    Building DAG of jobs...
+    Job stats:
+    job                                   count
+    ----------------------------------  -------
+    add_electricity                           1
+    add_export                                1
+    add_extra_components                      1
+    base_network                              1
+    build_base_energy_totals                  1
+    build_base_industry_totals                1
+    build_bus_regions                         1
+    build_clustered_population_layouts        1
+    build_cop_profiles                        1
+    build_demand_profiles                     1
+    build_heat_demand                         1
+    build_industrial_distribution_key         1
+    build_industry_demand                     1
+    build_natura_raster                       1
+    build_osm_network                         1
+    build_population_layouts                  1
+    build_powerplants                         1
+    build_renewable_profiles                  5
+    build_shapes                              1
+    build_ship_profile                        1
+    build_solar_thermal_profiles              1
+    build_temperature_profiles                1
+    clean_osm_data                            1
+    cluster_network                           1
+    copy_config                               1
+    download_osm_data                         1
+    override_respot                           1
+    prepare_airports                          1
+    prepare_energy_totals                     1
+    prepare_gas_network                       1
+    prepare_heat_data                         1
+    prepare_network                           1
+    prepare_ports                             1
+    prepare_sector_network                    1
+    prepare_transport_data                    1
+    prepare_transport_data_input              1
+    prepare_urban_percent                     1
+    retrieve_cost_data                        1
+    retrieve_databundle_light                 1
+    simplify_network                          1
+    solve_sector_network                      1
+    solve_sector_networks                     1
+    total                                    46
+
+
+
+
+Myopic Foresight Scenarios
+=============================================
+
+
+Configuration
+---------------------------------------------
+
+The configuration to run the tutorial for the myopic foresight scenario is present
+in the ``test/config.test_myopic.yaml`` file.
path: doc/tutorial_sector.rst
user: login: GbotemiB
body: I also agree. I actually dont have much knowledge about myopic.
created_at: 2025-03-19T14:26:45Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,637 @@
+.. SPDX-FileCopyrightText:  PyPSA-Earth and PyPSA-Eur Authors
+..
+.. SPDX-License-Identifier: CC-BY-4.0
+
+.. _tutorial_sector:
+
+##########################################
+Tutorial: Sector-Coupled
+##########################################
+
+.. note::
+    If you have not yet installed PyPSA-Earth, please refer to the :ref:`installation` section.
+
+In this tutorial, we will show you how to run the sector-coupled model. The sector-coupled model
+is a model that considers the energy system as a whole, including the electricity, heat, transport,
+and industry sectors. The model is based on the PyPSA-Eur model, which is a model of the European
+energy system. The sector-coupled model is a global model that can be used to model any region
+of the Earth. This section explains how to run and analyze the tutorial model.
+
+
+The sector-coupling code can be run as an overnight / greenfield scenario or myopic scenario.
+The overnight scenario is a long-term scenario that runs for a year, while the myopic scenario
+is a short-term scenario that runs for a day.
+
+
+Overnight Scenarios
+=============================================
+
+Configuration
+---------------------------------------------
+
+The configuration for sector-coupled is present in the  ``config.default.yaml`` file.
+This foresight parameter is set to overnight by default.
+
+.. code:: yaml
+
+    foresight: overnight
+
+Documentation for all options will be added successively to :ref:`config`.
+
+Scenarios can be defined like for electricity-only studies, but with additional wildcard options.
+
+.. code:: yaml
+
+    scenario:
+    simpl: [""]
+    ll: ["copt"]
+    clusters: [10]
+    opts: [Co2L-3h]
+    planning_horizons: # investment years for myopic and perfect; or costs year for overnight
+    - 2030
+    sopts:
+    - "144h"
+    demand:
+    - "AB"
+
+For allowed wildcard values, refer to :ref:`wildcards`.
+
+Execution
+---------------------------------------------
+To run the tutorial for the sector-coupled model, you need to activate the pypsa-earth environment.
+You need to have installed PyPSA-Earth using the instructions provided in the :ref:`installation` section.
+Make sure to be in the PyPSA-Earth root directory and run the following command:
+
+.. note::
+
+    It is good practice to perform a dry-run using the option -n, before you commit to a run:
+
+    .. code:: bash
+
+        .../pypsa-earth (pypsa-earth) $ snakemake solve_sector_networks -j8 --configfile config.tutorial.yaml -n
+
+
+.. code:: bash
+
+    .../pypsa-earth (pypsa-earth) $ conda activate pypsa-earth
+    .../pypsa-earth (pypsa-earth) $ snakemake solve_sector_networks -j8 --configfile config.tutorial.yaml
+
+This covers the retrieval of additional raw data from online resources and preprocessing data about
+the transport, industry, and heating sectors as well as additional rules about geological storage
+and sequestration potentials, gas infrastructure, and biomass potentials.
+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];
+        edge[penwidth=2, color=grey];
+        0[label = "solve_sector_networks", color = "0.50 0.6 0.85", style="rounded"];
+        1[label = "solve_sector_network", color = "0.25 0.6 0.85", style="rounded"];
+        2[label = "add_export", color = "0.08 0.6 0.85", style="rounded"];
+        3[label = "prepare_ports", color = "0.06 0.6 0.85", style="rounded"];
+        4[label = "retrieve_cost_data\nyear: 2030", color = "0.05 0.6 0.85", style="rounded"];
+        5[label = "build_ship_profile\nh2export: 10", color = "0.34 0.6 0.85", style="rounded"];
+        6[label = "prepare_sector_network", color = "0.28 0.6 0.85", style="rounded"];
+        7[label = "override_respot\ndiscountrate: 0.071\nsopts: 144h", color = "0.20 0.6 0.85", style="rounded"];
+        8[label = "prepare_network\nll: copt\nopts: Co2L-4H", color = "0.53 0.6 0.85", style="rounded"];
+        9[label = "add_extra_components", color = "0.24 0.6 0.85", style="rounded"];
+        10[label = "cluster_network\nclusters: 6", color = "0.35 0.6 0.85", style="rounded"];
+        11[label = "simplify_network\nsimpl: ", color = "0.44 0.6 0.85", style="rounded"];
+        12[label = "add_electricity", color = "0.49 0.6 0.85", style="rounded"];
+        13[label = "build_renewable_profiles\ntechnology: onwind", color = "0.52 0.6 0.85", style="rounded"];
+        14[label = "build_natura_raster", color = "0.41 0.6 0.85", style="rounded"];
+        15[label = "retrieve_databundle_light", color = "0.23 0.6 0.85", style="rounded,dashed"];
+        16[label = "build_shapes", color = "0.65 0.6 0.85", style="rounded"];
+        17[label = "build_powerplants", color = "0.12 0.6 0.85", style="rounded"];
+        18[label = "base_network", color = "0.02 0.6 0.85", style="rounded"];
+        19[label = "build_osm_network", color = "0.04 0.6 0.85", style="rounded"];
+        20[label = "clean_osm_data", color = "0.14 0.6 0.85", style="rounded"];
+        21[label = "download_osm_data", color = "0.40 0.6 0.85", style="rounded"];
+        22[label = "build_bus_regions", color = "0.66 0.6 0.85", style="rounded"];
+        23[label = "build_renewable_profiles\ntechnology: offwind-ac", color = "0.52 0.6 0.85", style="rounded"];
+        24[label = "build_renewable_profiles\ntechnology: offwind-dc", color = "0.52 0.6 0.85", style="rounded"];
+        25[label = "build_renewable_profiles\ntechnology: solar", color = "0.52 0.6 0.85", style="rounded"];
+        26[label = "build_renewable_profiles\ntechnology: hydro", color = "0.52 0.6 0.85", style="rounded"];
+        27[label = "build_demand_profiles", color = "0.39 0.6 0.85", style="rounded"];
+        28[label = "prepare_energy_totals\ndemand: AB\nplanning_horizons: 2030", color = "0.29 0.6 0.85", style="rounded"];
+        29[label = "build_base_energy_totals", color = "0.10 0.6 0.85", style="rounded"];
+        30[label = "prepare_heat_data", color = "0.26 0.6 0.85", style="rounded"];
+        31[label = "build_clustered_population_layouts", color = "0.17 0.6 0.85", style="rounded"];
+        32[label = "build_population_layouts\nplanning_horizons: 2030", color = "0.11 0.6 0.85", style="rounded"];
+        33[label = "prepare_urban_percent", color = "0.13 0.6 0.85", style="rounded"];
+        34[label = "build_temperature_profiles", color = "0.60 0.6 0.85", style="rounded"];
+        35[label = "build_cop_profiles", color = "0.47 0.6 0.85", style="rounded"];
+        36[label = "build_solar_thermal_profiles", color = "0.36 0.6 0.85", style="rounded"];
+        37[label = "build_heat_demand", color = "0.38 0.6 0.85", style="rounded"];
+        38[label = "prepare_transport_data", color = "0.46 0.6 0.85", style="rounded"];
+        39[label = "prepare_transport_data_input", color = "0.31 0.6 0.85", style="rounded"];
+        40[label = "build_industry_demand", color = "0.62 0.6 0.85", style="rounded"];
+        41[label = "build_industrial_distribution_key", color = "0.19 0.6 0.85", style="rounded"];
+        42[label = "build_industrial_database", color = "0.01 0.6 0.85", style="rounded,dashed"];
+        43[label = "build_base_industry_totals\ndemand: AB\nplanning_horizons: 2030", color = "0.16 0.6 0.85", style="rounded"];
+        44[label = "prepare_airports", color = "0.33 0.6 0.85", style="rounded"];
+        45[label = "prepare_gas_network", color = "0.00 0.6 0.85", style="rounded"];
+        46[label = "copy_config", color = "0.48 0.6 0.85", style="rounded"];
+        1 -> 0
+        2 -> 1
+        4 -> 1
+        46 -> 1
+        3 -> 2
+        4 -> 2
+        5 -> 2
+        6 -> 2
+        10 -> 2
+        7 -> 6
+        4 -> 6
+        30 -> 6
+        38 -> 6
+        31 -> 6
+        40 -> 6
+        28 -> 6
+        44 -> 6
+        3 -> 6
+        10 -> 6
+        45 -> 6
+        8 -> 7
+        28 -> 7
+        9 -> 8
+        4 -> 8
+        10 -> 9
+        4 -> 9
+        11 -> 10
+        16 -> 10
+        4 -> 10
+        12 -> 11
+        4 -> 11
+        22 -> 11
+        16 -> 11
+        13 -> 12
+        23 -> 12
+        24 -> 12
+        25 -> 12
+        26 -> 12
+        18 -> 12
+        4 -> 12
+        17 -> 12
+        16 -> 12
+        27 -> 12
+        14 -> 13
+        15 -> 13
+        16 -> 13
+        17 -> 13
+        22 -> 13
+        15 -> 14
+        15 -> 16
+        18 -> 17
+        20 -> 17
+        16 -> 17
+        19 -> 18
+        16 -> 18
+        20 -> 19
+        16 -> 19
+        21 -> 20
+        16 -> 20
+        16 -> 22
+        18 -> 22
+        14 -> 23
+        15 -> 23
+        16 -> 23
+        17 -> 23
+        22 -> 23
+        14 -> 24
+        15 -> 24
+        16 -> 24
+        17 -> 24
+        22 -> 24
+        14 -> 25
+        15 -> 25
+        16 -> 25
+        17 -> 25
+        22 -> 25
+        14 -> 26
+        15 -> 26
+        16 -> 26
+        17 -> 26
+        22 -> 26
+        18 -> 27
+        22 -> 27
+        15 -> 27
+        16 -> 27
+        29 -> 28
+        10 -> 30
+        28 -> 30
+        31 -> 30
+        34 -> 30
+        35 -> 30
+        36 -> 30
+        37 -> 30
+        32 -> 31
+        10 -> 31
+        15 -> 31
+        16 -> 32
+        33 -> 32
+        15 -> 32
+        32 -> 34
+        10 -> 34
+        15 -> 34
+        34 -> 35
+        32 -> 36
+        10 -> 36
+        15 -> 36
+        32 -> 37
+        10 -> 37
+        15 -> 37
+        10 -> 38
+        28 -> 38
+        39 -> 38
+        31 -> 38
+        34 -> 38
+        41 -> 40
+        43 -> 40
+        42 -> 40
+        4 -> 40
+        10 -> 41
+        31 -> 41
+        42 -> 41
+        29 -> 43
+        10 -> 45
+    }
+
+
+In the terminal, this will show up as a list of jobs to be run:
+
+.. code:: console
+
+    Building DAG of jobs...
+    Job stats:
+    job                                   count
+    ----------------------------------  -------
+    add_electricity                           1
+    add_export                                1
+    add_extra_components                      1
+    base_network                              1
+    build_base_energy_totals                  1
+    build_base_industry_totals                1
+    build_bus_regions                         1
+    build_clustered_population_layouts        1
+    build_cop_profiles                        1
+    build_demand_profiles                     1
+    build_heat_demand                         1
+    build_industrial_distribution_key         1
+    build_industry_demand                     1
+    build_natura_raster                       1
+    build_osm_network                         1
+    build_population_layouts                  1
+    build_powerplants                         1
+    build_renewable_profiles                  5
+    build_shapes                              1
+    build_ship_profile                        1
+    build_solar_thermal_profiles              1
+    build_temperature_profiles                1
+    clean_osm_data                            1
+    cluster_network                           1
+    copy_config                               1
+    download_osm_data                         1
+    override_respot                           1
+    prepare_airports                          1
+    prepare_energy_totals                     1
+    prepare_gas_network                       1
+    prepare_heat_data                         1
+    prepare_network                           1
+    prepare_ports                             1
+    prepare_sector_network                    1
+    prepare_transport_data                    1
+    prepare_transport_data_input              1
+    prepare_urban_percent                     1
+    retrieve_cost_data                        1
+    retrieve_databundle_light                 1
+    simplify_network                          1
+    solve_sector_network                      1
+    solve_sector_networks                     1
+    total                                    46
+
+
+
+
+Myopic Foresight Scenarios
+=============================================
+
+
+Configuration
+---------------------------------------------
+
+The configuration to run the tutorial for the myopic foresight scenario is present
+in the ``test/config.test_myopic.yaml`` file.
+
+.. code:: yaml
+
+    foresight: myopic
+
+Scenarios can be defined like for electricity-only studies, but with additional
+wildcard options. For the myopic foresight mode, the ``{planning_horizons}`` wildcard
+defines the sequence of investment horizons.
path: doc/tutorial_sector.rst
user: login: GbotemiB
body: I have added a comment about it. Thanks
created_at: 2025-03-19T16:13:17Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,637 @@
+.. SPDX-FileCopyrightText:  PyPSA-Earth and PyPSA-Eur Authors
+..
+.. SPDX-License-Identifier: CC-BY-4.0
+
+.. _tutorial_sector:
+
+##########################################
+Tutorial: Sector-Coupled
+##########################################
+
+.. note::
+    If you have not yet installed PyPSA-Earth, please refer to the :ref:`installation` section.
+
+In this tutorial, we will show you how to run the sector-coupled model. The sector-coupled model
+is a model that considers the energy system as a whole, including the electricity, heat, transport,
+and industry sectors. The model is based on the PyPSA-Eur model, which is a model of the European
+energy system. The sector-coupled model is a global model that can be used to model any region
+of the Earth. This section explains how to run and analyze the tutorial model.
+
+
+The sector-coupling code can be run as an overnight / greenfield scenario or myopic scenario.
+The overnight scenario is a long-term scenario that runs for a year, while the myopic scenario
+is a short-term scenario that runs for a day.
+
+
+Overnight Scenarios
+=============================================
+
+Configuration
+---------------------------------------------
+
+The configuration for sector-coupled is present in the  ``config.default.yaml`` file.
+This foresight parameter is set to overnight by default.
+
+.. code:: yaml
+
+    foresight: overnight
+
+Documentation for all options will be added successively to :ref:`config`.
+
+Scenarios can be defined like for electricity-only studies, but with additional wildcard options.
+
+.. code:: yaml
+
+    scenario:
+    simpl: [""]
+    ll: ["copt"]
+    clusters: [10]
+    opts: [Co2L-3h]
+    planning_horizons: # investment years for myopic and perfect; or costs year for overnight
+    - 2030
+    sopts:
+    - "144h"
+    demand:
+    - "AB"
+
+For allowed wildcard values, refer to :ref:`wildcards`.
+
+Execution
+---------------------------------------------
+To run the tutorial for the sector-coupled model, you need to activate the pypsa-earth environment.
+You need to have installed PyPSA-Earth using the instructions provided in the :ref:`installation` section.
+Make sure to be in the PyPSA-Earth root directory and run the following command:
+
+.. note::
+
+    It is good practice to perform a dry-run using the option -n, before you commit to a run:
+
+    .. code:: bash
+
+        .../pypsa-earth (pypsa-earth) $ snakemake solve_sector_networks -j8 --configfile config.tutorial.yaml -n
+
+
+.. code:: bash
+
+    .../pypsa-earth (pypsa-earth) $ conda activate pypsa-earth
+    .../pypsa-earth (pypsa-earth) $ snakemake solve_sector_networks -j8 --configfile config.tutorial.yaml
+
+This covers the retrieval of additional raw data from online resources and preprocessing data about
+the transport, industry, and heating sectors as well as additional rules about geological storage
path: doc/tutorial_sector.rst
user: login: GbotemiB
body: I have added more text here.
created_at: 2025-03-19T16:13:36Z
author_association: MEMBER
diff_hunk: @@ -2,7 +2,7 @@
 ..
 .. SPDX-License-Identifier: CC-BY-4.0
 
-.. _tutorial:
+.. _model_customization:
path: doc/model_customization.rst
user: login: ekatef
body: Ahh, sorry! I see, thanks for the explanation 😄 
created_at: 2025-04-01T21:21:42Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,637 @@
+.. SPDX-FileCopyrightText:  PyPSA-Earth and PyPSA-Eur Authors
+..
+.. SPDX-License-Identifier: CC-BY-4.0
+
+.. _tutorial_sector:
+
+##########################################
+Tutorial: Sector-Coupled
+##########################################
+
+.. note::
+    If you have not yet installed PyPSA-Earth, please refer to the :ref:`installation` section.
+
+In this tutorial, we will show you how to run the sector-coupled model. The sector-coupled model
+is a model that considers the energy system as a whole, including the electricity, heat, transport,
+and industry sectors. The model is based on the PyPSA-Eur model, which is a model of the European
+energy system. The sector-coupled model is a global model that can be used to model any region
+of the Earth. This section explains how to run and analyze the tutorial model.
+
+
+The sector-coupling code can be run as an overnight / greenfield scenario or myopic scenario.
+The overnight scenario is a long-term scenario that runs for a year, while the myopic scenario
+is a short-term scenario that runs for a day.
+
+
+Overnight Scenarios
+=============================================
+
+Configuration
+---------------------------------------------
+
+The configuration for sector-coupled is present in the  ``config.default.yaml`` file.
+This foresight parameter is set to overnight by default.
path: doc/tutorial_sector.rst
user: login: ekatef
body: Many thanks for the explanation! Absolutely agree with the technical concept and feel the adjustments you have done have added the needed details. I wonder if we can add a bit more polishing. For example:

All the configuration for a sector-coupled run are present in the config.default.yaml file. In particular, the default value for foresight parameter is set to `overnight`. For the purpose of this tutorial, test/config.sector.yaml will be used in addition to `config.default.yaml` to run the sector-coupled model. That allows to enable using a lightweight tutorial datakit enabled with `tutorial: true`.

Feel free to revise it as you feel like, obviously 🙂 I just feel that the concepts are quite advanced and we may need to give a bit more details to make it clear.
created_at: 2025-04-01T21:52:22Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,637 @@
+.. SPDX-FileCopyrightText:  PyPSA-Earth and PyPSA-Eur Authors
+..
+.. SPDX-License-Identifier: CC-BY-4.0
+
+.. _tutorial_sector:
+
+##########################################
+Tutorial: Sector-Coupled
+##########################################
+
+.. note::
+    If you have not yet installed PyPSA-Earth, please refer to the :ref:`installation` section.
+
+In this tutorial, we will show you how to run the sector-coupled model. The sector-coupled model
+is a model that considers the energy system as a whole, including the electricity, heat, transport,
+and industry sectors. The model is based on the PyPSA-Eur model, which is a model of the European
+energy system. The sector-coupled model is a global model that can be used to model any region
+of the Earth. This section explains how to run and analyze the tutorial model.
+
+
+The sector-coupling code can be run as an overnight / greenfield scenario or myopic scenario.
+The overnight scenario is a long-term scenario that runs for a year, while the myopic scenario
+is a short-term scenario that runs for a day.
+
+
+Overnight Scenarios
+=============================================
+
+Configuration
+---------------------------------------------
+
+The configuration for sector-coupled is present in the  ``config.default.yaml`` file.
+This foresight parameter is set to overnight by default.
+
+.. code:: yaml
+
+    foresight: overnight
+
+Documentation for all options will be added successively to :ref:`config`.
path: doc/tutorial_sector.rst
user: login: ekatef
body: Great that you account for that! I wonder if it may be a good idea to revise a bit this fragment to make it clear that we mean work ongoing rather than some automated way to update the config. It may be just my not-so-brilliant English, but keeping things simple never harms!

As a suggestion: `Documentation for all options will be added successively to :ref:`config` -> Documentation for all options is currently being updated in :ref:`config`
created_at: 2025-04-01T21:56:40Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,637 @@
+.. SPDX-FileCopyrightText:  PyPSA-Earth and PyPSA-Eur Authors
+..
+.. SPDX-License-Identifier: CC-BY-4.0
+
+.. _tutorial_sector:
+
+##########################################
+Tutorial: Sector-Coupled
+##########################################
+
+.. note::
+    If you have not yet installed PyPSA-Earth, please refer to the :ref:`installation` section.
+
+In this tutorial, we will show you how to run the sector-coupled model. The sector-coupled model
+is a model that considers the energy system as a whole, including the electricity, heat, transport,
+and industry sectors. The model is based on the PyPSA-Eur model, which is a model of the European
+energy system. The sector-coupled model is a global model that can be used to model any region
+of the Earth. This section explains how to run and analyze the tutorial model.
+
+
+The sector-coupling code can be run as an overnight / greenfield scenario or myopic scenario.
+The overnight scenario is a long-term scenario that runs for a year, while the myopic scenario
+is a short-term scenario that runs for a day.
+
+
+Overnight Scenarios
+=============================================
+
+Configuration
+---------------------------------------------
+
+The configuration for sector-coupled is present in the  ``config.default.yaml`` file.
+This foresight parameter is set to overnight by default.
+
+.. code:: yaml
+
+    foresight: overnight
+
+Documentation for all options will be added successively to :ref:`config`.
+
+Scenarios can be defined like for electricity-only studies, but with additional wildcard options.
path: doc/tutorial_sector.rst
user: login: ekatef
body: Perfect, thank you!
created_at: 2025-04-01T21:58:35Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,637 @@
+.. SPDX-FileCopyrightText:  PyPSA-Earth and PyPSA-Eur Authors
+..
+.. SPDX-License-Identifier: CC-BY-4.0
+
+.. _tutorial_sector:
+
+##########################################
+Tutorial: Sector-Coupled
+##########################################
+
+.. note::
+    If you have not yet installed PyPSA-Earth, please refer to the :ref:`installation` section.
+
+In this tutorial, we will show you how to run the sector-coupled model. The sector-coupled model
+is a model that considers the energy system as a whole, including the electricity, heat, transport,
+and industry sectors. The model is based on the PyPSA-Eur model, which is a model of the European
+energy system. The sector-coupled model is a global model that can be used to model any region
+of the Earth. This section explains how to run and analyze the tutorial model.
+
+
+The sector-coupling code can be run as an overnight / greenfield scenario or myopic scenario.
+The overnight scenario is a long-term scenario that runs for a year, while the myopic scenario
+is a short-term scenario that runs for a day.
+
+
+Overnight Scenarios
+=============================================
+
+Configuration
+---------------------------------------------
+
+The configuration for sector-coupled is present in the  ``config.default.yaml`` file.
+This foresight parameter is set to overnight by default.
+
+.. code:: yaml
+
+    foresight: overnight
+
+Documentation for all options will be added successively to :ref:`config`.
+
+Scenarios can be defined like for electricity-only studies, but with additional wildcard options.
+
+.. code:: yaml
+
+    scenario:
+    simpl: [""]
+    ll: ["copt"]
+    clusters: [10]
+    opts: [Co2L-3h]
+    planning_horizons: # investment years for myopic and perfect; or costs year for overnight
+    - 2030
+    sopts:
+    - "144h"
+    demand:
+    - "AB"
+
+For allowed wildcard values, refer to :ref:`wildcards`.
+
+Execution
+---------------------------------------------
+To run the tutorial for the sector-coupled model, you need to activate the pypsa-earth environment.
+You need to have installed PyPSA-Earth using the instructions provided in the :ref:`installation` section.
+Make sure to be in the PyPSA-Earth root directory and run the following command:
+
+.. note::
+
+    It is good practice to perform a dry-run using the option -n, before you commit to a run:
+
+    .. code:: bash
+
+        .../pypsa-earth (pypsa-earth) $ snakemake solve_sector_networks -j8 --configfile config.tutorial.yaml -n
+
+
+.. code:: bash
+
+    .../pypsa-earth (pypsa-earth) $ conda activate pypsa-earth
+    .../pypsa-earth (pypsa-earth) $ snakemake solve_sector_networks -j8 --configfile config.tutorial.yaml
+
+This covers the retrieval of additional raw data from online resources and preprocessing data about
+the transport, industry, and heating sectors as well as additional rules about geological storage
+and sequestration potentials, gas infrastructure, and biomass potentials.
+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];
+        edge[penwidth=2, color=grey];
+        0[label = "solve_sector_networks", color = "0.50 0.6 0.85", style="rounded"];
+        1[label = "solve_sector_network", color = "0.25 0.6 0.85", style="rounded"];
+        2[label = "add_export", color = "0.08 0.6 0.85", style="rounded"];
+        3[label = "prepare_ports", color = "0.06 0.6 0.85", style="rounded"];
+        4[label = "retrieve_cost_data\nyear: 2030", color = "0.05 0.6 0.85", style="rounded"];
+        5[label = "build_ship_profile\nh2export: 10", color = "0.34 0.6 0.85", style="rounded"];
+        6[label = "prepare_sector_network", color = "0.28 0.6 0.85", style="rounded"];
+        7[label = "override_respot\ndiscountrate: 0.071\nsopts: 144h", color = "0.20 0.6 0.85", style="rounded"];
+        8[label = "prepare_network\nll: copt\nopts: Co2L-4H", color = "0.53 0.6 0.85", style="rounded"];
+        9[label = "add_extra_components", color = "0.24 0.6 0.85", style="rounded"];
+        10[label = "cluster_network\nclusters: 6", color = "0.35 0.6 0.85", style="rounded"];
+        11[label = "simplify_network\nsimpl: ", color = "0.44 0.6 0.85", style="rounded"];
+        12[label = "add_electricity", color = "0.49 0.6 0.85", style="rounded"];
+        13[label = "build_renewable_profiles\ntechnology: onwind", color = "0.52 0.6 0.85", style="rounded"];
+        14[label = "build_natura_raster", color = "0.41 0.6 0.85", style="rounded"];
+        15[label = "retrieve_databundle_light", color = "0.23 0.6 0.85", style="rounded,dashed"];
+        16[label = "build_shapes", color = "0.65 0.6 0.85", style="rounded"];
+        17[label = "build_powerplants", color = "0.12 0.6 0.85", style="rounded"];
+        18[label = "base_network", color = "0.02 0.6 0.85", style="rounded"];
+        19[label = "build_osm_network", color = "0.04 0.6 0.85", style="rounded"];
+        20[label = "clean_osm_data", color = "0.14 0.6 0.85", style="rounded"];
+        21[label = "download_osm_data", color = "0.40 0.6 0.85", style="rounded"];
+        22[label = "build_bus_regions", color = "0.66 0.6 0.85", style="rounded"];
+        23[label = "build_renewable_profiles\ntechnology: offwind-ac", color = "0.52 0.6 0.85", style="rounded"];
+        24[label = "build_renewable_profiles\ntechnology: offwind-dc", color = "0.52 0.6 0.85", style="rounded"];
+        25[label = "build_renewable_profiles\ntechnology: solar", color = "0.52 0.6 0.85", style="rounded"];
+        26[label = "build_renewable_profiles\ntechnology: hydro", color = "0.52 0.6 0.85", style="rounded"];
+        27[label = "build_demand_profiles", color = "0.39 0.6 0.85", style="rounded"];
+        28[label = "prepare_energy_totals\ndemand: AB\nplanning_horizons: 2030", color = "0.29 0.6 0.85", style="rounded"];
+        29[label = "build_base_energy_totals", color = "0.10 0.6 0.85", style="rounded"];
+        30[label = "prepare_heat_data", color = "0.26 0.6 0.85", style="rounded"];
+        31[label = "build_clustered_population_layouts", color = "0.17 0.6 0.85", style="rounded"];
+        32[label = "build_population_layouts\nplanning_horizons: 2030", color = "0.11 0.6 0.85", style="rounded"];
+        33[label = "prepare_urban_percent", color = "0.13 0.6 0.85", style="rounded"];
+        34[label = "build_temperature_profiles", color = "0.60 0.6 0.85", style="rounded"];
+        35[label = "build_cop_profiles", color = "0.47 0.6 0.85", style="rounded"];
+        36[label = "build_solar_thermal_profiles", color = "0.36 0.6 0.85", style="rounded"];
+        37[label = "build_heat_demand", color = "0.38 0.6 0.85", style="rounded"];
+        38[label = "prepare_transport_data", color = "0.46 0.6 0.85", style="rounded"];
+        39[label = "prepare_transport_data_input", color = "0.31 0.6 0.85", style="rounded"];
+        40[label = "build_industry_demand", color = "0.62 0.6 0.85", style="rounded"];
+        41[label = "build_industrial_distribution_key", color = "0.19 0.6 0.85", style="rounded"];
+        42[label = "build_industrial_database", color = "0.01 0.6 0.85", style="rounded,dashed"];
+        43[label = "build_base_industry_totals\ndemand: AB\nplanning_horizons: 2030", color = "0.16 0.6 0.85", style="rounded"];
+        44[label = "prepare_airports", color = "0.33 0.6 0.85", style="rounded"];
+        45[label = "prepare_gas_network", color = "0.00 0.6 0.85", style="rounded"];
+        46[label = "copy_config", color = "0.48 0.6 0.85", style="rounded"];
+        1 -> 0
+        2 -> 1
+        4 -> 1
+        46 -> 1
+        3 -> 2
+        4 -> 2
+        5 -> 2
+        6 -> 2
+        10 -> 2
+        7 -> 6
+        4 -> 6
+        30 -> 6
+        38 -> 6
+        31 -> 6
+        40 -> 6
+        28 -> 6
+        44 -> 6
+        3 -> 6
+        10 -> 6
+        45 -> 6
+        8 -> 7
+        28 -> 7
+        9 -> 8
+        4 -> 8
+        10 -> 9
+        4 -> 9
+        11 -> 10
+        16 -> 10
+        4 -> 10
+        12 -> 11
+        4 -> 11
+        22 -> 11
+        16 -> 11
+        13 -> 12
+        23 -> 12
+        24 -> 12
+        25 -> 12
+        26 -> 12
+        18 -> 12
+        4 -> 12
+        17 -> 12
+        16 -> 12
+        27 -> 12
+        14 -> 13
+        15 -> 13
+        16 -> 13
+        17 -> 13
+        22 -> 13
+        15 -> 14
+        15 -> 16
+        18 -> 17
+        20 -> 17
+        16 -> 17
+        19 -> 18
+        16 -> 18
+        20 -> 19
+        16 -> 19
+        21 -> 20
+        16 -> 20
+        16 -> 22
+        18 -> 22
+        14 -> 23
+        15 -> 23
+        16 -> 23
+        17 -> 23
+        22 -> 23
+        14 -> 24
+        15 -> 24
+        16 -> 24
+        17 -> 24
+        22 -> 24
+        14 -> 25
+        15 -> 25
+        16 -> 25
+        17 -> 25
+        22 -> 25
+        14 -> 26
+        15 -> 26
+        16 -> 26
+        17 -> 26
+        22 -> 26
+        18 -> 27
+        22 -> 27
+        15 -> 27
+        16 -> 27
+        29 -> 28
+        10 -> 30
+        28 -> 30
+        31 -> 30
+        34 -> 30
+        35 -> 30
+        36 -> 30
+        37 -> 30
+        32 -> 31
+        10 -> 31
+        15 -> 31
+        16 -> 32
+        33 -> 32
+        15 -> 32
+        32 -> 34
+        10 -> 34
+        15 -> 34
+        34 -> 35
+        32 -> 36
+        10 -> 36
+        15 -> 36
+        32 -> 37
+        10 -> 37
+        15 -> 37
+        10 -> 38
+        28 -> 38
+        39 -> 38
+        31 -> 38
+        34 -> 38
+        41 -> 40
+        43 -> 40
+        42 -> 40
+        4 -> 40
+        10 -> 41
+        31 -> 41
+        42 -> 41
+        29 -> 43
+        10 -> 45
+    }
+
+
+In the terminal, this will show up as a list of jobs to be run:
+
+.. code:: console
+
+    Building DAG of jobs...
+    Job stats:
+    job                                   count
+    ----------------------------------  -------
+    add_electricity                           1
+    add_export                                1
+    add_extra_components                      1
+    base_network                              1
+    build_base_energy_totals                  1
+    build_base_industry_totals                1
+    build_bus_regions                         1
+    build_clustered_population_layouts        1
+    build_cop_profiles                        1
+    build_demand_profiles                     1
+    build_heat_demand                         1
+    build_industrial_distribution_key         1
+    build_industry_demand                     1
+    build_natura_raster                       1
+    build_osm_network                         1
+    build_population_layouts                  1
+    build_powerplants                         1
+    build_renewable_profiles                  5
+    build_shapes                              1
+    build_ship_profile                        1
+    build_solar_thermal_profiles              1
+    build_temperature_profiles                1
+    clean_osm_data                            1
+    cluster_network                           1
+    copy_config                               1
+    download_osm_data                         1
+    override_respot                           1
+    prepare_airports                          1
+    prepare_energy_totals                     1
+    prepare_gas_network                       1
+    prepare_heat_data                         1
+    prepare_network                           1
+    prepare_ports                             1
+    prepare_sector_network                    1
+    prepare_transport_data                    1
+    prepare_transport_data_input              1
+    prepare_urban_percent                     1
+    retrieve_cost_data                        1
+    retrieve_databundle_light                 1
+    simplify_network                          1
+    solve_sector_network                      1
+    solve_sector_networks                     1
+    total                                    46
+
+
+
+
+Myopic Foresight Scenarios
+=============================================
+
+
+Configuration
+---------------------------------------------
+
+The configuration to run the tutorial for the myopic foresight scenario is present
+in the ``test/config.test_myopic.yaml`` file.
path: doc/tutorial_sector.rst
user: login: ekatef
body: Let's probably leave it-is for now 🙂 That is quite advanced stuff, and I think we can leave it for further developments!
created_at: 2025-04-01T22:01:48Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,637 @@
+.. SPDX-FileCopyrightText:  PyPSA-Earth and PyPSA-Eur Authors
+..
+.. SPDX-License-Identifier: CC-BY-4.0
+
+.. _tutorial_sector:
+
+##########################################
+Tutorial: Sector-Coupled
+##########################################
+
+.. note::
+    If you have not yet installed PyPSA-Earth, please refer to the :ref:`installation` section.
+
+In this tutorial, we will show you how to run the sector-coupled model. The sector-coupled model
+is a model that considers the energy system as a whole, including the electricity, heat, transport,
+and industry sectors. The model is based on the PyPSA-Eur model, which is a model of the European
+energy system. The sector-coupled model is a global model that can be used to model any region
path: doc/tutorial_sector.rst
user: login: ekatef
body: Yeah, exactly! Thank you for the revisions
created_at: 2025-04-01T22:02:55Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,637 @@
+.. SPDX-FileCopyrightText:  PyPSA-Earth and PyPSA-Eur Authors
+..
+.. SPDX-License-Identifier: CC-BY-4.0
+
+.. _tutorial_sector:
+
+##########################################
+Tutorial: Sector-Coupled
+##########################################
+
+.. note::
+    If you have not yet installed PyPSA-Earth, please refer to the :ref:`installation` section.
+
+In this tutorial, we will show you how to run the sector-coupled model. The sector-coupled model
+is a model that considers the energy system as a whole, including the electricity, heat, transport,
+and industry sectors. The model is based on the PyPSA-Eur model, which is a model of the European
+energy system. The sector-coupled model is a global model that can be used to model any region
+of the Earth. This section explains how to run and analyze the tutorial model.
+
+
+The sector-coupling code can be run as an overnight / greenfield scenario or myopic scenario.
+The overnight scenario is a long-term scenario that runs for a year, while the myopic scenario
+is a short-term scenario that runs for a day.
+
+
+Overnight Scenarios
+=============================================
+
+Configuration
+---------------------------------------------
+
+The configuration for sector-coupled is present in the  ``config.default.yaml`` file.
+This foresight parameter is set to overnight by default.
+
+.. code:: yaml
+
+    foresight: overnight
+
+Documentation for all options will be added successively to :ref:`config`.
+
+Scenarios can be defined like for electricity-only studies, but with additional wildcard options.
+
+.. code:: yaml
+
+    scenario:
+    simpl: [""]
+    ll: ["copt"]
+    clusters: [10]
+    opts: [Co2L-3h]
+    planning_horizons: # investment years for myopic and perfect; or costs year for overnight
+    - 2030
+    sopts:
+    - "144h"
+    demand:
+    - "AB"
+
+For allowed wildcard values, refer to :ref:`wildcards`.
+
+Execution
+---------------------------------------------
+To run the tutorial for the sector-coupled model, you need to activate the pypsa-earth environment.
+You need to have installed PyPSA-Earth using the instructions provided in the :ref:`installation` section.
+Make sure to be in the PyPSA-Earth root directory and run the following command:
+
+.. note::
+
+    It is good practice to perform a dry-run using the option -n, before you commit to a run:
+
+    .. code:: bash
+
+        .../pypsa-earth (pypsa-earth) $ snakemake solve_sector_networks -j8 --configfile config.tutorial.yaml -n
path: doc/tutorial_sector.rst
user: login: ekatef
body: Great, thank you!
created_at: 2025-04-01T22:03:25Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,637 @@
+.. SPDX-FileCopyrightText:  PyPSA-Earth and PyPSA-Eur Authors
+..
+.. SPDX-License-Identifier: CC-BY-4.0
+
+.. _tutorial_sector:
+
+##########################################
+Tutorial: Sector-Coupled
+##########################################
+
+.. note::
+    If you have not yet installed PyPSA-Earth, please refer to the :ref:`installation` section.
+
+In this tutorial, we will show you how to run the sector-coupled model. The sector-coupled model
+is a model that considers the energy system as a whole, including the electricity, heat, transport,
+and industry sectors. The model is based on the PyPSA-Eur model, which is a model of the European
+energy system. The sector-coupled model is a global model that can be used to model any region
+of the Earth. This section explains how to run and analyze the tutorial model.
+
+
+The sector-coupling code can be run as an overnight / greenfield scenario or myopic scenario.
+The overnight scenario is a long-term scenario that runs for a year, while the myopic scenario
+is a short-term scenario that runs for a day.
+
+
+Overnight Scenarios
+=============================================
+
+Configuration
+---------------------------------------------
+
+The configuration for sector-coupled is present in the  ``config.default.yaml`` file.
+This foresight parameter is set to overnight by default.
+
+.. code:: yaml
+
+    foresight: overnight
+
+Documentation for all options will be added successively to :ref:`config`.
+
+Scenarios can be defined like for electricity-only studies, but with additional wildcard options.
+
+.. code:: yaml
+
+    scenario:
+    simpl: [""]
+    ll: ["copt"]
+    clusters: [10]
+    opts: [Co2L-3h]
+    planning_horizons: # investment years for myopic and perfect; or costs year for overnight
+    - 2030
+    sopts:
+    - "144h"
+    demand:
+    - "AB"
+
+For allowed wildcard values, refer to :ref:`wildcards`.
+
+Execution
+---------------------------------------------
+To run the tutorial for the sector-coupled model, you need to activate the pypsa-earth environment.
+You need to have installed PyPSA-Earth using the instructions provided in the :ref:`installation` section.
+Make sure to be in the PyPSA-Earth root directory and run the following command:
+
+.. note::
+
+    It is good practice to perform a dry-run using the option -n, before you commit to a run:
+
+    .. code:: bash
+
+        .../pypsa-earth (pypsa-earth) $ snakemake solve_sector_networks -j8 --configfile config.tutorial.yaml -n
+
+
+.. code:: bash
+
+    .../pypsa-earth (pypsa-earth) $ conda activate pypsa-earth
+    .../pypsa-earth (pypsa-earth) $ snakemake solve_sector_networks -j8 --configfile config.tutorial.yaml
+
+This covers the retrieval of additional raw data from online resources and preprocessing data about
+the transport, industry, and heating sectors as well as additional rules about geological storage
+and sequestration potentials, gas infrastructure, and biomass potentials.
+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];
+        edge[penwidth=2, color=grey];
+        0[label = "solve_sector_networks", color = "0.50 0.6 0.85", style="rounded"];
+        1[label = "solve_sector_network", color = "0.25 0.6 0.85", style="rounded"];
+        2[label = "add_export", color = "0.08 0.6 0.85", style="rounded"];
+        3[label = "prepare_ports", color = "0.06 0.6 0.85", style="rounded"];
+        4[label = "retrieve_cost_data\nyear: 2030", color = "0.05 0.6 0.85", style="rounded"];
+        5[label = "build_ship_profile\nh2export: 10", color = "0.34 0.6 0.85", style="rounded"];
+        6[label = "prepare_sector_network", color = "0.28 0.6 0.85", style="rounded"];
+        7[label = "override_respot\ndiscountrate: 0.071\nsopts: 144h", color = "0.20 0.6 0.85", style="rounded"];
+        8[label = "prepare_network\nll: copt\nopts: Co2L-4H", color = "0.53 0.6 0.85", style="rounded"];
+        9[label = "add_extra_components", color = "0.24 0.6 0.85", style="rounded"];
+        10[label = "cluster_network\nclusters: 6", color = "0.35 0.6 0.85", style="rounded"];
+        11[label = "simplify_network\nsimpl: ", color = "0.44 0.6 0.85", style="rounded"];
+        12[label = "add_electricity", color = "0.49 0.6 0.85", style="rounded"];
+        13[label = "build_renewable_profiles\ntechnology: onwind", color = "0.52 0.6 0.85", style="rounded"];
+        14[label = "build_natura_raster", color = "0.41 0.6 0.85", style="rounded"];
+        15[label = "retrieve_databundle_light", color = "0.23 0.6 0.85", style="rounded,dashed"];
+        16[label = "build_shapes", color = "0.65 0.6 0.85", style="rounded"];
+        17[label = "build_powerplants", color = "0.12 0.6 0.85", style="rounded"];
+        18[label = "base_network", color = "0.02 0.6 0.85", style="rounded"];
+        19[label = "build_osm_network", color = "0.04 0.6 0.85", style="rounded"];
+        20[label = "clean_osm_data", color = "0.14 0.6 0.85", style="rounded"];
+        21[label = "download_osm_data", color = "0.40 0.6 0.85", style="rounded"];
+        22[label = "build_bus_regions", color = "0.66 0.6 0.85", style="rounded"];
+        23[label = "build_renewable_profiles\ntechnology: offwind-ac", color = "0.52 0.6 0.85", style="rounded"];
+        24[label = "build_renewable_profiles\ntechnology: offwind-dc", color = "0.52 0.6 0.85", style="rounded"];
+        25[label = "build_renewable_profiles\ntechnology: solar", color = "0.52 0.6 0.85", style="rounded"];
+        26[label = "build_renewable_profiles\ntechnology: hydro", color = "0.52 0.6 0.85", style="rounded"];
+        27[label = "build_demand_profiles", color = "0.39 0.6 0.85", style="rounded"];
+        28[label = "prepare_energy_totals\ndemand: AB\nplanning_horizons: 2030", color = "0.29 0.6 0.85", style="rounded"];
+        29[label = "build_base_energy_totals", color = "0.10 0.6 0.85", style="rounded"];
+        30[label = "prepare_heat_data", color = "0.26 0.6 0.85", style="rounded"];
+        31[label = "build_clustered_population_layouts", color = "0.17 0.6 0.85", style="rounded"];
+        32[label = "build_population_layouts\nplanning_horizons: 2030", color = "0.11 0.6 0.85", style="rounded"];
+        33[label = "prepare_urban_percent", color = "0.13 0.6 0.85", style="rounded"];
+        34[label = "build_temperature_profiles", color = "0.60 0.6 0.85", style="rounded"];
+        35[label = "build_cop_profiles", color = "0.47 0.6 0.85", style="rounded"];
+        36[label = "build_solar_thermal_profiles", color = "0.36 0.6 0.85", style="rounded"];
+        37[label = "build_heat_demand", color = "0.38 0.6 0.85", style="rounded"];
+        38[label = "prepare_transport_data", color = "0.46 0.6 0.85", style="rounded"];
+        39[label = "prepare_transport_data_input", color = "0.31 0.6 0.85", style="rounded"];
+        40[label = "build_industry_demand", color = "0.62 0.6 0.85", style="rounded"];
+        41[label = "build_industrial_distribution_key", color = "0.19 0.6 0.85", style="rounded"];
+        42[label = "build_industrial_database", color = "0.01 0.6 0.85", style="rounded,dashed"];
+        43[label = "build_base_industry_totals\ndemand: AB\nplanning_horizons: 2030", color = "0.16 0.6 0.85", style="rounded"];
+        44[label = "prepare_airports", color = "0.33 0.6 0.85", style="rounded"];
+        45[label = "prepare_gas_network", color = "0.00 0.6 0.85", style="rounded"];
+        46[label = "copy_config", color = "0.48 0.6 0.85", style="rounded"];
+        1 -> 0
+        2 -> 1
+        4 -> 1
+        46 -> 1
+        3 -> 2
+        4 -> 2
+        5 -> 2
+        6 -> 2
+        10 -> 2
+        7 -> 6
+        4 -> 6
+        30 -> 6
+        38 -> 6
+        31 -> 6
+        40 -> 6
+        28 -> 6
+        44 -> 6
+        3 -> 6
+        10 -> 6
+        45 -> 6
+        8 -> 7
+        28 -> 7
+        9 -> 8
+        4 -> 8
+        10 -> 9
+        4 -> 9
+        11 -> 10
+        16 -> 10
+        4 -> 10
+        12 -> 11
+        4 -> 11
+        22 -> 11
+        16 -> 11
+        13 -> 12
+        23 -> 12
+        24 -> 12
+        25 -> 12
+        26 -> 12
+        18 -> 12
+        4 -> 12
+        17 -> 12
+        16 -> 12
+        27 -> 12
+        14 -> 13
+        15 -> 13
+        16 -> 13
+        17 -> 13
+        22 -> 13
+        15 -> 14
+        15 -> 16
+        18 -> 17
+        20 -> 17
+        16 -> 17
+        19 -> 18
+        16 -> 18
+        20 -> 19
+        16 -> 19
+        21 -> 20
+        16 -> 20
+        16 -> 22
+        18 -> 22
+        14 -> 23
+        15 -> 23
+        16 -> 23
+        17 -> 23
+        22 -> 23
+        14 -> 24
+        15 -> 24
+        16 -> 24
+        17 -> 24
+        22 -> 24
+        14 -> 25
+        15 -> 25
+        16 -> 25
+        17 -> 25
+        22 -> 25
+        14 -> 26
+        15 -> 26
+        16 -> 26
+        17 -> 26
+        22 -> 26
+        18 -> 27
+        22 -> 27
+        15 -> 27
+        16 -> 27
+        29 -> 28
+        10 -> 30
+        28 -> 30
+        31 -> 30
+        34 -> 30
+        35 -> 30
+        36 -> 30
+        37 -> 30
+        32 -> 31
+        10 -> 31
+        15 -> 31
+        16 -> 32
+        33 -> 32
+        15 -> 32
+        32 -> 34
+        10 -> 34
+        15 -> 34
+        34 -> 35
+        32 -> 36
+        10 -> 36
+        15 -> 36
+        32 -> 37
+        10 -> 37
+        15 -> 37
+        10 -> 38
+        28 -> 38
+        39 -> 38
+        31 -> 38
+        34 -> 38
+        41 -> 40
+        43 -> 40
+        42 -> 40
+        4 -> 40
+        10 -> 41
+        31 -> 41
+        42 -> 41
+        29 -> 43
+        10 -> 45
+    }
+
+
+In the terminal, this will show up as a list of jobs to be run:
+
+.. code:: console
+
+    Building DAG of jobs...
+    Job stats:
+    job                                   count
+    ----------------------------------  -------
+    add_electricity                           1
+    add_export                                1
+    add_extra_components                      1
+    base_network                              1
+    build_base_energy_totals                  1
+    build_base_industry_totals                1
+    build_bus_regions                         1
+    build_clustered_population_layouts        1
+    build_cop_profiles                        1
+    build_demand_profiles                     1
+    build_heat_demand                         1
+    build_industrial_distribution_key         1
+    build_industry_demand                     1
+    build_natura_raster                       1
+    build_osm_network                         1
+    build_population_layouts                  1
+    build_powerplants                         1
+    build_renewable_profiles                  5
+    build_shapes                              1
+    build_ship_profile                        1
+    build_solar_thermal_profiles              1
+    build_temperature_profiles                1
+    clean_osm_data                            1
+    cluster_network                           1
+    copy_config                               1
+    download_osm_data                         1
+    override_respot                           1
+    prepare_airports                          1
+    prepare_energy_totals                     1
+    prepare_gas_network                       1
+    prepare_heat_data                         1
+    prepare_network                           1
+    prepare_ports                             1
+    prepare_sector_network                    1
+    prepare_transport_data                    1
+    prepare_transport_data_input              1
+    prepare_urban_percent                     1
+    retrieve_cost_data                        1
+    retrieve_databundle_light                 1
+    simplify_network                          1
+    solve_sector_network                      1
+    solve_sector_networks                     1
+    total                                    46
+
+
+
+
+Myopic Foresight Scenarios
+=============================================
+
+
+Configuration
+---------------------------------------------
+
+The configuration to run the tutorial for the myopic foresight scenario is present
+in the ``test/config.test_myopic.yaml`` file.
+
+.. code:: yaml
+
+    foresight: myopic
+
+Scenarios can be defined like for electricity-only studies, but with additional
+wildcard options. For the myopic foresight mode, the ``{planning_horizons}`` wildcard
+defines the sequence of investment horizons.
path: doc/tutorial_sector.rst
user: login: ekatef
body: Super :)
created_at: 2025-04-01T22:03:52Z
author_association: MEMBER

PR comments:
user: login: GbotemiB
created_at: 2025-03-12T19:05:05Z
body: A review on the introduction for the sector-coupled tutorial will be appreciated.
author_association: MEMBER
user: login: GbotemiB
created_at: 2025-03-19T16:12:41Z
body: Thank you for the review @ekatef. I have completed revision based on the comments. I think it is ready for another round of review.
author_association: MEMBER
user: login: GbotemiB
created_at: 2025-04-06T22:44:46Z
body: For the release notes, I am not sure where it should fit in, whether it is a minor change or a major change.
author_association: MEMBER
user: login: ekatef
created_at: 2025-04-07T22:39:52Z
body: > For the release notes, I am not sure where it should fit in, whether it is a minor change or a major change.

Oh, true! We definitely need a release note. Thanks for remembering that!
I think it's a major improvement for sure, given the impact and the amount of efforts you put into it.
author_association: MEMBER
user: login: ekatef
created_at: 2025-04-09T12:21:16Z
body: Perfect @GbotemiB! Merged 😄 
A great step forward in making the sector-coupled functionality fully accessible 🎉 
Thank you so much for the great contribution!
author_association: MEMBER