pik-piam / edgeTransport

A detailed transport sector model.
5 stars 16 forks source link

Bugfix histTimesteps & ICEban trucks, busses #270

Closed johannah-pik closed 3 months ago

johannah-pik commented 3 months ago

This PR includes a bugfix to remove differences in historical timesteps (<= 2020) between scenarios. The reason was the normalization of preferences, which was done only for scenarios, where mitigation factors were applied (mix2 upwards). Preference factors in 2015 were interpolated and thus changed. Furthermore, I found a bug in the ICEban application. The hard-coded implementation refers to values in 2015 which are historical timesteps and not available in this part of the code. To solve all the above-mentioned problems the steps were separated and now applied in the correct order: -Bind historical timesteps and future scenario specific timesteps -Interpolate -Apply ICE ban -Normalize

-> Output of Mix1 was compared to Mix4ICEban and showed no differences in historical timesteps. -> Test fo NAs were included to prevent bug that occured in ICE ban application -> Test to compare output of different scenarios and prevent changes in hist time steps will be integrated in advanced PR test routine of edgeTransport (integration of tests that require complete model runs in testthat not preferable as storing of large files like fulldata.gdx in the package would be necessary)

Before and after compScens are available here: /p/projects/edget/PRchangeLog/20240812_PR270_BugfixHistTImestepsAndICEbanBusTruck Bug in ICEban application for trucks and busses had only minor impact