Title: | MAgPIE-MAGICC Integration |
---|---|
Description: | Enables MAgPIE runs to project global surface area temperatures with MAGICC, using reference REMIND scenarios to represent emissions from the energy sector. |
Authors: | Michael Crawford [cre, aut] |
Maintainer: | Michael Crawford <[email protected]> |
License: | BSD_2_clause + file LICENSE |
Version: | 0.7.1 |
Built: | 2024-11-02 04:43:20 UTC |
Source: | https://github.com/pik-piam/blackmagicc |
Runs MAGICC-v7.5.3 on a given MAgPIE report.mif, optionally with custom REMIND reference emissions.
blackmagicc( dir = ".", remind_name = NULL, append = FALSE, save_MAGICC_io = TRUE )
blackmagicc( dir = ".", remind_name = NULL, append = FALSE, save_MAGICC_io = TRUE )
dir |
the MAgPIE scenario output directory that contains the report.mif and config.yml |
remind_name |
name of the desired reference scenario report.mif for REMIND. May or may not include the ‘.mif' extension. If NULL, blackmagicc will try to read the scenario from the MAgPIE run’s config.yml. If a custom REMIND scenario is desired, it should be placed within 'dir'. |
append |
append the global surface temperature from MAGICC onto the report.mif and report.rds? |
save_MAGICC_io |
print intermediate input, output, and settings from MAGICC into the output folder These REMIND scenarios are packaged within blackmagicc: bjoernAR6_C_RemSDP-900-MagSSP1.mif bjoernAR6_C_RemSSP1-1000-MagSDP.mif bjoernAR6_C_SDP-NPi.mif bjoernAR6_C_SDP-PkBudg1000.mif bjoernAR6_C_SSP1-Base.mif bjoernAR6_C_SSP1-NDC.mif bjoernAR6_C_SSP1-NPi.mif bjoernAR6_C_SSP1-PkBudg900.mif bjoernAR6_C_SSP2-Base.mif bjoernAR6_C_SSP2-NDC.mif bjoernAR6_C_SSP2-NPi.mif bjoernAR6_C_SSP2-PkBudg900.mif For more information about these scenarios' assumptions, see 'https://www.nature.com/articles/s41558-021-01098-3' |
a magpie object containing the MAGICC warming pathway
Michael Crawford
## Not run: x <- blackmagicc() ## End(Not run)
## Not run: x <- blackmagicc() ## End(Not run)
converts MAgPIE emissions data, combining it with user-selected REMIND emissions, into the format necessary to run MAGICC7
formatInput(remindmifPath, magpiemifPath, blackmagiccDir = NULL)
formatInput(remindmifPath, magpiemifPath, blackmagiccDir = NULL)
remindmifPath |
file path for the reference REMIND emissions |
magpiemifPath |
file path for the MAgPIE emissions |
blackmagiccDir |
directory to save intermediate inputs used by MAGICC |
a composite data.frame containing the scenario's MAgPIE emissions and reference REMIND emissions
Michael Crawford
## Not run: x <- formatInput(remindmifPath, magpiemifPath, blackmagiccDir) ## End(Not run)
## Not run: x <- formatInput(remindmifPath, magpiemifPath, blackmagiccDir) ## End(Not run)
formats the MAGICC7 raw output files
formatOutput(rawOutput_dir, yearsToKeep)
formatOutput(rawOutput_dir, yearsToKeep)
rawOutput_dir |
output directory containing the raw output from the MAGICC model |
yearsToKeep |
vector of years to keep from MAGICC (which by default reports from 1750 on a yearly basis). |
a data.frame containing all the emissions scenarios' MAGICC7 warming pathways
Michael Crawford
## Not run: x <- formatOutput(rawOutput_dir) ## End(Not run)
## Not run: x <- formatOutput(rawOutput_dir) ## End(Not run)
runs the MAGICC7 model on a specific emissions scenario
runMAGICC(emissions_fn, base_path)
runMAGICC(emissions_fn, base_path)
emissions_fn |
file name for the emissions (held in raw/input) |
base_path |
root file path (the temporary directory) |
Michael Crawford
## Not run: x <- runMAGICC(emissions_fn, base_path) ## End(Not run)
## Not run: x <- runMAGICC(emissions_fn, base_path) ## End(Not run)
writes the composite emissions scenario to a temporary folder, formatted to be read by MAGICC7
writeInput(inputEmissions, rawInput_dir)
writeInput(inputEmissions, rawInput_dir)
inputEmissions |
data.frame representing the emissions to be written to disk and used by MAGICC |
rawInput_dir |
directory in which to write the formatted .SCEN file (raw/input) |
Michael Crawford
## Not run: x <- formatInput(magpiemif_path, remindEmissions_path) ## End(Not run)
## Not run: x <- formatInput(magpiemif_path, remindEmissions_path) ## End(Not run)