-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix a MAgPIE run based on existing gdx files #494
Comments
I discussed with @mishkos yesterday that this functionality would be also very useful for delayed transition scenarios in the NGFS project. We have this functionality in REMIND, so it should be possible to copy that to MAgPIE. Basically, the cozy function There is some zipping and unzipping involved for restarted runs to avoid doing this multiple times. In Like that, we fix runs on older runs for all timesteps < But maybe there is a more elegant solution for that. I guess @christophbertram might provide more information. |
Isn't this much easier to implement in MAgPIE, given its recursive solution approach (compared to the intertemporal optimization in REMIND)? |
quick update here: The situation is here quite different in MAgPIE compared to REMIND. The good thing is: In contrast to REMIND we do not need this feature to run delayed action scenarios due to the iterative nature of the model. Bad thing is that the fixing solution from REMIND is also not applicable to MAgPIE. I did some more digging and revisited the GAMS manual. What GAMS provides is a Save and Restart which goes into the direction of what we would need but is not exactly the same. Hence, I wrote a mail to the GAMS developer team asking for a feature expansion in this direction. What we would need is the option to set restart points in the code, which write a save file every time they reach this point and would serve as an entry point when the model is started from such a savepoint. |
PR #512 partly adresses this issue by adding restart support to the model. It allows to interrupt and restart the model and still getting the exact same results like without interruption. |
Any progress on this issue (planned?), @tscheypidi / @pfuehrlich-pik? |
Not on my side, I'm still very busy with RESCUE/OptimESM. |
no, no plans |
In the delayed transition scenarios of NGFS that are fixing in REMIND on a reference run until 2030, some of the deviations between the reference run and the delayed transition run are quite substantial:
|
The problem:
The REMIND way to achieve consistency (except for EDGE-Transport):
|
@merfort added: Something else that might be relevant is the partial foresight that MAgPIE has regarding forestry (there is some price anticipation, right?). If I am not mistaken, here changes in the settings may also affect the historical period (or rather the period until the REMIND start year), even though all inputs from REMIND are the same. |
Thanks Olli! For RESCUE there are, unfortunately, quite some differences between the reference NPi run (
Simply overwriting all MAgPIE reporting variables in 2025 and 2030 with the one from the NPi run (which is what I do so far for the emissions reporting), leads to quite a jump between 2030 and 2035. This is particularly problematic, since for RESCUE we are also reporting the land-use data (e.g. land-cover change) and so far we use all data from one the delayed policy run (no overwriting). I guess, that overwriting land-use data on a cluster level is anyways not viable, since the jumps on this lower resolution on the cluster level will be even larger. @tscheypidi @pfuehrlich-pik what are your thoughts on that? |
For me, there are three candidates that may lead to differences between the runs
|
Thanks Leon!
|
For some applications it would be useful if MAgPIE could be fixed to the values of existing GDX files until a certain year.
Let's assume you have a run that is infeasible in 2050. Now you want to restart the run but keep the results until 2020 from the first run that was infeasible only in 2050 (based on magpie_y1995.gdx ... magpie_y2020.gdx). This makes sure that the results for 1995-2020 are identical to other model runs from the same scenario set. From 2025 onwards the model should use the gdx files from the first run for all years until 2045 as starting point (cfg$gms$s_use_gdx <- 2). This will push the solver to a slightly different trajectory from 2025 onwards and might lead to a feasible solution for 2050 and beyond.
Note 1: Re-running the model for the period 1995-2020 without gdx files (or cfg$gms$s_use_gdx <- 0) should yield the same result but of course needs much more time than just fixing all variables based on existing gdx files.
Note 2: Re-running the model for the period 1995-2020 with gdx files and cfg$gms$s_use_gdx <- 2 produces different results.
The text was updated successfully, but these errors were encountered: