Validation mif - #65
Conversation
JakobBD
left a comment
There was a problem hiding this comment.
Great stuff, and impressive!
Probably good to let Falk have a look?
bennet21
left a comment
There was a problem hiding this comment.
Thanks, Leonie, this is really cool stuff! Does fullVALIDATIONMFA now automatically run in the preprocessing?
I didn't do a full review, so my comments are mainly for improving my understanding :)
| valfile <- "validation.mif" | ||
|
|
||
| # Pottinger 2024 plastics material flows (all scenarios) ---- | ||
| calcOutput( |
There was a problem hiding this comment.
should we prepare material sections like in fullMFA? :)
There was a problem hiding this comment.
good idea, let's implement this as soon as we add validation data for steel or cement :)
| magclass (>= 6.16.1), | ||
| mrdrivers (>= 4.0.0), | ||
| mrcommonsenergy (>= 0.3.4), | ||
| mrindustry (>= 1.2.1), |
There was a problem hiding this comment.
Where do we need mrindustry now? :)
There was a problem hiding this comment.
I am using 2 sources in the validation mif for plastics that are also used in mrindustry - Stegmann2022 and IEA_Petrochem.
There was a problem hiding this comment.
Important to note that this creates a hierarchy between mrindustry and mrmfa for the first time. Not a problem per-se, but the moment you also need functions from mrmfa in mrindustry, you will need to start moving stuff to mrcommonsenergy.
See also: https://gitlab.pik-potsdam.de/rse/rsewiki/-/wikis/REMIND-mr-package-structure
I have not yet integrated it into our preprocessing, so far I have only run it locally. Good point though, I will do this in a next step once this is merged. |
fbenke-pik
left a comment
There was a problem hiding this comment.
Looks good to me, none of my comments are change requests, only FYI / remarks.
| x = out, | ||
| weight = pop, | ||
| unit = "kg/cap", | ||
| description = paste( |
There was a problem hiding this comment.
Personally, I am a big fan of glue:
description = glue::glue(
"Per-capita Global production of key thermoplastics 1980-2050 from IEA 'The Future of \\
Petrochemicals' (2018), Figure 4.2 (Reference Technology Scenario), reported \\
at the global level under the IAMC variables Production|Chemicals|Plastics \\
and Material Demand|Chemicals|Plastics.; population from UN WPP (estimates + medium)."
)
| # subset to keep only mapped variables | ||
| x <- x[, , variables_kept] | ||
| new_names <- iamc[variables_kept] | ||
| getItems(x, dim = 3.2) <- as.vector(new_names) |
There was a problem hiding this comment.
FYI, toolAggregate has been fixed to not blow up dimensions with more than one subdimension, so this should now work as well and yield identical results
map <- data.frame(
from = c("totalConsumptionMt", "primaryProductionMt", "secondaryProductionMt"),
to = c("Material Demand|Chemicals|Plastics", "Production|Chemicals|Plastics|Primary", "Production|Chemicals|Plastics|Secondary")
)
x <- toolAggregate(x, dim = 3.2, map, partrel = TRUE, verbosity = 2)
|
Just in case you haven't done this yet, please run preprocessing with this and verify that it does not crash and the mif looks good. |
Creates a validation mif for the REMIND-MFA.
New sources are added that provide projections of plastics demand & production and are integrated into the new validation mif.