Package 'mrcommonsenergy'

Title: Preprocessing functions for REMIND and other energy models (no landuse data)
Description: Preprocessing functions for REMIND and other energy models (buildings, transport, industry) not using landuse data.
Authors: Falk Benke [aut, cre]
Maintainer: Falk Benke <[email protected]>
License: LGPL-3
Version: 0.3.3
Built: 2026-06-27 10:35:40 UTC
Source: https://github.com/pik-piam/mrcommonsenergy

Help Index


calcIOEdgeBuildings

Description

Calculates buildings-related energy flows from the IEA energy balances. 'output_EDGE_buildings' is a key input to EDGE-Buildings providing the historic final energy demand from buildings. 'output_EDGE' does the same for buildings and industry together.

Usage

calcIOEdgeBuildings(
  subtype = c("output_EDGE", "output_EDGE_buildings"),
  ieaVersion = c("default", "latest")
)

Arguments

subtype

Data subtype. See default argument for possible values.

ieaVersion

Release version of IEA data, either 'default' (vetted and used in REMIND) or 'latest'.

Value

IEA data as MAgPIE object aggregated to country level

Author(s)

Pascal Sauer, Anastasis Giannousakis, Robin Hasse

Examples

## Not run: 
a <- calcOutput("IOEdgeBuildings", subtype = "output_EDGE_buildings")

## End(Not run)

Convert European Environment Agency (EEA) data

Description

Read-in European Environment Agency (EEA) data on ETS emissions as magclass object

Usage

convertEEA_EuropeanEnvironmentAgency(x, subtype)

Arguments

x

MAgPIE object to be converted

subtype

data subtype. Either "ETS", "historical", "projections", or "projections-detailed"

Value

magpie object of European Environment Agency (EEA) ETS emissions (GtCO2)

Author(s)

Renato Rodrigues, Robin Hasse

Examples

## Not run: 
a <- readSource(type = "EEA_EuropeanEnvironmentAgency", subtype = "ETS")

## End(Not run)

Convert EU Reference Scenario

Description

Converts EU Reference Scenario magpie object into appropriate form for the REMIND model

Usage

convertEU_ReferenceScenario(x, subtype)

Arguments

x

EU Reference Scenario magpie object derived from readEU_ReferenceScenario function

subtype

data subtype. Either "techAssump.*", "2016" or "2020"

Value

converted EU Reference Scenario magpie object

Author(s)

Renato Rodrigues, Falk Benke, Robin Hasse

Examples

## Not run: 
test <- readSource("EU_ReferenceScenario", subtype = "2020", convert = TRUE)

## End(Not run)

Read Eurostat historical emissions (env_air_gge)

Description

Read Eurostat historical emissions (env_air_gge)

Usage

convertEurostat(x, subtype)

Arguments

x

MAgPIE object to be converted

subtype

'emissions' for original Eurostat emissions split, 'MACCemi' for MACC historical emissions, or 'sectorEmi' for sector specific emissions, or 'latest' for most up-to-date data

Value

A MAgPIE object containing the Eurostat historical emissions (MtCO2)

Author(s)

Renato Rodrigues

Examples

## Not run: 
a <- convertEurostat(x, subtype = "emissions")

## End(Not run)

Convert IEA

Description

Convert IEA energy data to data on ISO country level.

Usage

convertIEA(x, subtype)

Arguments

x

MAgPIE object containing IEA values at IEA mixed country-region resolution

subtype

data subtype. Either "EnergyBalances", "EnergyBalances-latest", or "Emissions"

Value

IEA data as MAgPIE object aggregated to country level

Author(s)

Anastasis Giannousakis, Renato Rodrigues, Falk Benke


Convert JRC IDEES data

Description

Missing data for EU-28 countries is added, by distributing the difference of EU28 and the sum of country-values based on countries share in EU-28 GDP.

Usage

convertJRC_IDEES(x, subtype)

Arguments

x

a magpie object

subtype

character, subtype of readJRC_IDEES()

Value

A magpie object.

Author(s)

Michaja Pehl, Robin Hasse


Convert UNFCCC data

Description

Convert UNFCCC data

Usage

convertUNFCCC(x)

Arguments

x

A magpie object returned from readUNFCCC().

Value

A magpie object.

Author(s)

Falk Benke


Read European Environment Agency (EEA) data

Description

Read-in European Environment Agency (EEA) data on ETS emissions as magclass object

Usage

readEEA_EuropeanEnvironmentAgency(subtype)

Arguments

subtype

data subtype. Either "ETS", "ESR", "total", "sectoral", "projections", or "projections-detailed"

Value

magpie object of European Environment Agency (EEA) ETS emissions (GtCO2)

Author(s)

Renato Rodrigues, Falk Benke, Robin Hasse

Examples

## Not run: 
a <- readSource(type = "EEA_EuropeanEnvironmentAgency", subtype = "ETS")

## End(Not run)

Read EU Reference Scenario

Description

Read EU Reference Scenario .xlsx file as magpie object

Usage

readEU_ReferenceScenario(subtype)

Arguments

subtype

data subtype. Either "techAssump.*", "2016" or "2020"

Value

magpie object of EU reference scenario data by country. Units follow REMIND report conventions and conversion factor is defined in EU_ReferenceScenario2REMIND.xlsx file.

Author(s)

Renato Rodrigues, Falk Benke, Robin Hasse

Examples

## Not run: 
test <- readSource("EU_ReferenceScenario", subtype = "2020", convert = FALSE)

## End(Not run)

Read Eurostat historical emissions (env_air_gge)

Description

Read-in Eurostat historical emissions csv files as magclass object

Usage

readEurostat(subtype = "emissions")

Arguments

subtype

'emissions' for original Eurostat emissions split, 'MACCemi' for MACC historical emissions, or 'sectorEmi' for sector specific emissions, or 'latest' for most up-to-date data

Value

magpie object of Eurostat historical emissions (MtCO2)

Author(s)

Renato Rodrigues

Examples

## Not run: 
a <- readSource(type = "Eurostat", subtype = "emissions")

## End(Not run)

Read IEA

Description

Read-in an IEA csv file as magpie object

Usage

readIEA(subtype)

Arguments

subtype

data subtype. Either "EnergyBalances", "EnergyBalances-latest", or "Emissions".

  • "EnergyBalances": IEA energy balances until 2022 (2023 incomplete), data updated in Sep 2024, the current default for REMIND input data

  • "EnergyBalances-latest": IEA energy balances until 2022 (2023 incomplete), data updated in Sep 2024, currently same as default

Value

magpie object of the IEA

Author(s)

Anastasis Giannousakis, Lavinia Baumstark, Renato Rodrigues, Falk Benke

See Also

madrat::readSource()

Examples

## Not run: 
a <- readSource(type = "IEA", subtype = "EnergyBalances")

## End(Not run)

Read JRC IDEES

Description

Read the IDEES data base from JRC #nolint

Usage

readJRC_IDEES(subtype)

Arguments

subtype

one of

  • 'Emission': read worksheets from the Emission Balance files

  • 'Energy': read worksheets from the Energy Balance files

  • 'Industry': read worksheets from the Industry files

  • 'Transport': read worksheets from the Transport files

  • 'MBunkers': read worksheets from the Bunkers files

  • 'Residential': read worksheets from the Residential files

  • 'Tertiary': read worksheets from the Tertiary (Services and Agriculture) files append '_2021' to get the updated data from 2021 (only available for some sectors)

Value

A magpie object.

Author(s)

Michaja Pehl, Falk Benke, Robin Hasse


Read UNFCCC data

Description

Read UNFCCC data

Usage

readUNFCCC()

Author(s)

Falk Benke


Aggregate regions without regional aggregations such as global sum

Description

Aggregate regional data, but if regional aggregations exist, discard the automatically aggregated values and replace them with source data.

Usage

toolAggregateCustomRegs(
  x,
  agg,
  rel,
  to = NULL,
  removeAllAgg = TRUE,
  regs = "GLO"
)

Arguments

x

a magclass object in country resolution

agg

magclass object supplying explicit regional aggregates

rel

aggregation mapping for toolAggregate

to

aggregation target for toolAggregate

removeAllAgg

decide whether to exclude all aggregated data or keep those (variables/periods) that are not overwritten by data from agg object

regs

one or multiple names of aggregated regions to be removed/overwritten

Value

magclass object

Author(s)

Falk Benke, Pascal Weigmann


Returns the year associated with a given ieaVersion

Description

Returns the year associated with a given ieaVersion

Usage

toolGetIEAYear(ieaVersion)

Arguments

ieaVersion

Release version of IEA data, either 'default' (vetted and used in REMIND) or 'latest'.

Author(s)

Falk Benke


Split Biomass into modern and traditional

Description

We assume that below a given GDP/cap level, all biomass is traditional and above a higher limit, all biomass is modern with a linear transition between the limits.

Usage

toolSplitBiomass(
  x,
  gdppop,
  split = "biomass",
  into = c("biotrad", "biomod"),
  dim = 3.1,
  limits = c(12300, 18500)
)

Arguments

x

MagPIE object including biomass data

gdppop

MagPIE object with GDP/cap data

split

character, name of item to split

into

character vector of length two with the names of the split items

dim

dimension of x with the item to split

limits

numeric vector of length two with the corresponding GDP/cap limits. The default values used to be 10k and 15k USD/cap converted from 2005 to 2017 dollars.

Value

MagPIE object including split biomass data

Author(s)

Robin Hasse