remindmodel / remind

REMIND - REgional Model of INvestments and Development
Other
98 stars 128 forks source link

after rerunning REMIND reporting, MAgPIE results are missing #988

Closed orichters closed 1 year ago

orichters commented 1 year ago

After each REMIND iteration, start_coupled.R writes the MAgPIE data into the REMIND mif file. But if you rerun the REMIND reporting, you lose this information, and compareScenarios2, the export with xlsx_IIASA and every other scripts fail to find the data.

An alternative option I could imagine is for the reporting to check whether the file in cfg$pathToMagpieReport exists and always add that content directly to the .mif file. Further ideas?

dklein-pik commented 1 year ago

Good idea. If cfg$pathToMagpieReport exists, REMIND has been started using MAgPIE data from this report, so why not always append the corresponding MAgPIE report. However, the code in start_coupled.R you cited above and that currently appends the MAgPIE report to the remind report should then be removed.

merfort commented 1 year ago

Sounds like a neat solution. Moving the concatenation of reportings to the reporting procedure itself seems to be very natural.