Package 'blackmagicc'

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-12-02 04:58:38 UTC
Source: https://github.com/pik-piam/blackmagicc

Help Index


blackmagicc

Description

Runs MAGICC-v7.5.3 on a given MAgPIE report.mif, optionally with custom REMIND reference emissions.

Usage

blackmagicc(
  dir = ".",
  remind_name = NULL,
  append = FALSE,
  save_MAGICC_io = TRUE
)

Arguments

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'

Value

a magpie object containing the MAGICC warming pathway

Author(s)

Michael Crawford

Examples

## Not run: 
    x <- blackmagicc()
  
## End(Not run)

formatInput

Description

converts MAgPIE emissions data, combining it with user-selected REMIND emissions, into the format necessary to run MAGICC7

Usage

formatInput(remindmifPath, magpiemifPath, blackmagiccDir = NULL)

Arguments

remindmifPath

file path for the reference REMIND emissions

magpiemifPath

file path for the MAgPIE emissions

blackmagiccDir

directory to save intermediate inputs used by MAGICC

Value

a composite data.frame containing the scenario's MAgPIE emissions and reference REMIND emissions

Author(s)

Michael Crawford

Examples

## Not run: 
    x <- formatInput(remindmifPath, magpiemifPath, blackmagiccDir)
  
## End(Not run)

formatOutput

Description

formats the MAGICC7 raw output files

Usage

formatOutput(rawOutput_dir, yearsToKeep)

Arguments

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).

Value

a data.frame containing all the emissions scenarios' MAGICC7 warming pathways

Author(s)

Michael Crawford

Examples

## Not run: 
    x <- formatOutput(rawOutput_dir)
  
## End(Not run)

runMAGICC

Description

runs the MAGICC7 model on a specific emissions scenario

Usage

runMAGICC(emissions_fn, base_path)

Arguments

emissions_fn

file name for the emissions (held in raw/input)

base_path

root file path (the temporary directory)

Author(s)

Michael Crawford

Examples

## Not run: 
    x <- runMAGICC(emissions_fn, base_path)
  
## End(Not run)

writeInput

Description

writes the composite emissions scenario to a temporary folder, formatted to be read by MAGICC7

Usage

writeInput(inputEmissions, rawInput_dir)

Arguments

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)

Author(s)

Michael Crawford

Examples

## Not run: 
    x <- formatInput(magpiemif_path, remindEmissions_path)
  
## End(Not run)