knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) options(rmarkdown.html_vignette.check_title = FALSE)
When a new region is broken out using gcambreakout
several errors can arise as a result of missing or modified data for the new region broken out or the remaining region left behind. These errors can occur at four different points in the workflow which include:
gcambreakout
: The error may occur when running gcam breakout itself. Related to availability of raw data.gcamdata
: The error may occur when regenerating package data. Related to processing the modified raw data.xmls
The output XMLs may have several NA or NAN values. These won't show up as errors but can be identified after examinging the XMLs.GCAM errors
: And finally all XMLs may be produced cleanly but GCAM may give calibration or other errors.
library(pander) mytable = data.frame( gcambreakout_errors = c('* Error in left_join_error_no_match(., L123.LC_bm2_R_Past_Y_GLU, by = c("GCAM_region_ID",: left_join_no_match: NA values in new data columns'), gcambreakout_solutions = c("* zchunk_LB120.LC_GIS_R_LTgis_Yh_GLU_breakout.R\ \n* zchunk_LB123.LC_R_MgdPastFor_Yh_GLU_breakout.R"), gcambreakout_commits = c("* [705338a09a59725c11d52bc956b1592f5cfbb298](https://github.com/JGCRI/gcambreakout/commit/705338a09a59725c11d52bc956b1592f5cfbb298)\ \n* [cd53649da041d55c28e548b60560247546bdc57b](https://github.com/JGCRI/gcambreakout/commit/cd53649da041d55c28e548b60560247546bdc57b)"), gcambreakout_regions = c("* Angola\ \n* Australia")) pander::pander(mytable, keep.line.breaks = TRUE, style = 'grid', justify = 'left', split.tables=Inf)
Discus country in general. Regional issues, sectoral resources, size in region etc.
No errors.
Error 1:
Error in left_join_error_no_match(., L123.LC_bm2_R_Past_Y_GLU, by = c("GCAM_region_ID", : left_join_no_match: NA values in new data columns
Solution 1:
zchunk_LB120.LC_GIS_R_LTgis_Yh_GLU_breakout.R
Details on fix:
zchunk_LB123.LC_R_MgdPastFor_Yh_GLU_breakout.R"
Error 1: File ‘all_fgas_emissions.xml’ - the supplysector “comm cooling” was not correctly built due to a lack of data in the IEA_EnergyBalances_2019.csv file. Specifically, the IEA_EnergyBalances_2019.csv shows zero electricity consumption in the commercial sector (‘COMMPUB’ flow in the IEA_EnergyBalances_2019.csv) of Angola in all historical years.
Solution 1:
File ‘zchunk_LA100.IEA_downscale_ctry.R’ (located at input/gcamdata/R) was modified to make sure a non-zero amount of electricity consumption exists in the commercial sector of Angola in the historical years (see section ‘UP FRONT ADJUSTMENTS (UFA)’, specifically section ‘UFA5’ in this R code, which shows the assumptions made for Angola). However, users can modify these assumptions based on specific data available for Angola.
No errors (tested using the GCAM reference scenario and after correcting all errors above).
Discus country in general. Regional issues, sectoral resources, size in region etc.
No errors.
Error 1:
Error in left_join_error_no_match(., L123.LC_bm2_R_Past_Y_GLU, by = c("GCAM_region_ID", : left_join_no_match: NA values in new data columns
Solution 1:
No errors.
No errors (tested using the GCAM reference scenario and after correcting all errors above).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.