pypsa-meets-earth / pypsa-earth-sec

GNU General Public License v3.0
20 stars 18 forks source link

Investigate CO2 constraints and emissions #204

Closed energyLS closed 1 year ago

energyLS commented 1 year ago

Investigate the CO2 constraint used in PyPSA-Earth and check wether it also applies for PyPSA-Earth-Sec.

Checks wether #201 is necessary.

energyLS commented 1 year ago

EDIT: UPDATE BELOW

Emission limit (CO2 constraint) seens to work. Investigating Morocco shows: grafik The emissions with a high constraint are at a max. of approx. 90 MtCo2, the CO2 limit effectively reduces the emissions Note: The CO2base in PyPSA-Earth is set at 40 Mt, co2 sequestration is allowed.

This how it looks like in detail: grafik

energyLS commented 1 year ago

Update: Double accounted oil loads

The oil loads (e.g. industry oil, shipping oil, aviation oil, land transport oil) are accounted double: Once via the link to "co2 atmosphere" (which is constrainted by the co2 atmosphere store, which uses co2 as a carrier), and once via the spatial.oil.nodes buses, which are constrainted by either the oil generator or the oil store feeding into spatial.oil.nodes. @hazemakhalek your implementation #201 should not be affected by this issue, since you explicitly set the constraint to generators and the co2 atmosphere store and not to the carriers.

See here for details:

Why does this double constraint not happen in PyPSA-Eur?

Because they don't have oil as carrier implemented.

Possible solution

In PyPSA-Earth, we don't have the function https://github.com/PyPSA/pypsa-eur/blob/bdb5381730cbd0e9c4082fadc946156b372a2d5b/scripts/prepare_sector_network.py#L480-L494 implemented, hence not removing the "oil" carrier. Think of impementation/integration of the function?

Graph of how it should look like Generated by a temporary fix (setting n.carriers.loc["oil", "co2_emissions"] = 0) grafik

energyLS commented 1 year ago

Update: Double accounted oil loads

The oil loads (e.g. industry oil, shipping oil, aviation oil, land transport oil) are accounted double: Once via the link to "co2 atmosphere" (which is constrainted by the co2 atmosphere store, which uses co2 as a carrier), and once via the spatial.oil.nodes buses, which are constrainted by either the oil generator or the oil store feeding into spatial.oil.nodes. @hazemakhalek your implementation #201 should not be affected by this issue, since you explicitly set the constraint to generators and the co2 atmosphere store and not to the carriers.

Visualization of the code shown above: grafik