Strip Network
The strip_network.py script is a specialized script developed for the Google-GO project within the PyPSA-Eur workflow. Its purpose is to simplify a comprehensive energy system network into an electricity-only model, focusing solely on the electricity sector by removing any non-electricity-related components. Additionally, it simplifies electricity demand from multiple sectors to a few, with the exception of transport sector EV demands, which are dependent on EV batteries.
Here's a breakdown of its main functions:
strip_network: This is the core function that prunes the PyPSA network. It removes buses and components (generators, links, lines, stores, storage units, loads) that are not associated with the specified list of electricity-related carriers. The function also makes specific adjustments for "H2 Electrolysis" and "H2 Fuel Cell" links by settingbus2to an empty string, effectively isolating them.merge_load: This function consolidates and simplifies electricity demand loads. It sums up auxiliary electricity demands (industry, agriculture, etc.) into the main electricity load per bus and removes the original auxiliary load components. Additionally, it can add exogenous electricity demand for heating and hydrogen production based on configuration settings.
The script's overall workflow involves:
- Network Stripping: Calls
strip_networkto remove all components from the network that are not directly related to electricity or the extended list of carriers. - Load Merging: If
merge_loadis enabled in the configuration, it callsmerge_loadto consolidate and simplify electricity demand and optionally add heating and hydrogen electricity demand. - Snapshot Stripping (Optional): If
snapshots_startorsnapshots_endare specified in the configuration, the script filters the network's snapshots to a defined time range. This is only used in test runs.
In essence, strip_network.py streamlines complex energy models, focusing them solely on electricity flow and related components, which is essential for saving computational resources and run multiple scenarios.