Rule prepare_network¶
Workflow Diagram
See the complete workflow in the repository.
digraph snakemake_dag { graph [bgcolor=white, margin=0, size="8,5" ]; node [fontname=sans, fontsize=10, penwidth=2, shape=box, style=rounded ]; edge [color=grey, penwidth=2 ]; 0 [color="0.53 0.6 0.85", label=solve_network]; 1 [color="0.50 0.6 0.85", fillcolor=gray, label=prepare_network, style=filled]; 1 -> 0; 2 [color="0.36 0.6 0.85", label=cluster_network]; 2 -> 1; }
Script Documentation¶
Prepare PyPSA network for solving according to :ref:opts and :ref:ll, such
as.
- adding an annual limit of carbon-dioxide emissions,
- adding an exogenous price per tonne emissions of carbon-dioxide (or other kinds),
- setting an N-1 security margin factor for transmission line capacities,
- specifying an expansion limit on the cost of transmission expansion,
- specifying an expansion limit on the volume of transmission expansion, and
- reducing the temporal resolution by averaging over multiple hours
or segmenting time series into chunks of varying lengths using
tsam.
Relevant Settings¶
.. code:: yaml
links:
lines:
costs:
emission_prices:
electricity:
co2limit:
max_hours:
.. seealso::
Documentation of the configuration file config.yaml at
:ref:costs_cf, :ref:electricity_cf
Inputs¶
resources/costs.csv.: The database of cost assumptions for all included technologies for specific years from various sources; e.g. discount rate, lifetime, investment (CAPEX), fixed operation and maintenance (FOM), variable operation and maintenance (VOM), fuel costs, efficiency, carbon-dioxide intensity.networks/elec_s{simpl}_{clusters}.nc: confer :ref:cluster
Outputs¶
networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc: Complete PyPSA network that will be handed to thesolve_networkrule.
Description¶
.. tip::
The rule :mod:prepare_all_networks runs
for all scenario s in the configuration file
the rule :mod:prepare_network.
download_emission_data()
¶
emission_extractor(filename, emission_year, country_names)
¶
Extracts CO2 emission values for given country codes from the global emission file.
Parameters¶
filename : str Global emission filename emission_year : int Year of CO2 emissions country_names : numpy.ndarray Two letter country codes of analysed countries.
Returns¶
CO2 emission values of studied countries.