* Make code more readable; remove misleading function arguments and add necessary ones
* Update scripts/build_energy_totals.py
Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
Recently ICE vehicles were added, but the emissions were not accounted
for. Now, like aviation emissions, they are added as a negative load
to the "co2 atmosphere" bus.
The heat output from the carbon capture (CC) was being subtracted from
the CHP rather than the heat input.
Since the heat output and heat input are the same in the DEA
technology database (but at different temperatures), this bug has no
consequence, but still better to correct it.
Reasoning: we can also have fossil and biomass liquid hydrocarbons, as
well as production from the Fischer-Tropsch process, particularly for
simulations before 2050.
This substitutes the previous way of doing it. Now, to multiply the reference p_nom_max by 3, one should include in the config file 'solar+p3' (instead of the previous solarx3)
For the myopic method, based on the carbon budget indicated in the config file (sector_opts), a CO2 limit is calculated for every planning_horizon following an exponential or beta decay. A file with CO2 limit in every planning_horizon and a plot showing historical and planned CO2 emissions
are saved in the results
**This requires updating to UNFCCC_v23.csv in the data bundle**
This enables that the same function is used to read emissions in 2018, which are assumed to remain constant in 2019 and 2020 and subtracted from carbon budget (estimated from 2018 on).
I checked and 1990 emissions calculated with UNFCCC_v23 are very similar to those calculated with UNFCCC_v21 (<1% differences in all values at EU level).
Some countries show higher deviations, mainly in domestic aviation and navigation. I guess because those values started to be reported later and v23 should include more accurate values.
Running the rule solve_network in the university cluster, I was getting a "No space left on device" error. Making solve_dir=tmpdir by default avoids this error and makes it easier to identify any problem with temp files
This was breaking add_existing_baseyear.py and it is now fixed. Column name for commissioning year in powerplantmatching has changed. Now "DataIn" is used as column name, also when renewable capacities per country are added to the power plants dataframe