Package 'mrindustry'

Title: input data generation for the REMIND industry module
Description: The mrindustry packages contains data preprocessing for the REMIND model.
Authors: Falk Benke [aut, cre], Jakob Dürrwächter [aut], Renato Rodrigues [aut], Simón Moreno-Leiva [aut], Lavinia Baumstark [aut], Michaja Pehl [aut]
Maintainer: Falk Benke <[email protected]>
License: LGPL-3
Version: 0.8.0
Built: 2024-12-03 11:22:19 UTC
Source: https://github.com/pik-piam/mrindustry

Help Index


Calculate Historic Cement Production

Description

Combines cement production data from readvanRuijven2016() and readUSGS(cement) into a single data set, using USGS data from 2005 on.

Usage

calcCement()

Value

A list with a magpie object x with country-level cement production in tonnes, weight, unit, description, and min fields.

Author(s)

Michaja Pehl

See Also

calcOutput


Calculate Cement Share in NONMET FE Use

Description

Estimated shares of cement in NONMET final energy use based on OECD and Non-OECD figures from IEA 2017 Energy Technology Perspectives. Shares are weighted by GDP for aggregation and converge towards global values by 2100.

Usage

calcCementShare()

Value

A list with a magpie object x, weight, unit, description, min, and max.

Author(s)

Michaja Pehl

See Also

calcOutput()


Calculate Chemical Feedstock share projections

Description

Calculates the share of CHEMICAL in CHEMICAL = NECHEM and converges it towards the maximum value of either OECD or non-OECD countries by 2050.

Usage

calcChemicalFeedstocksShare()

Value

A list with a magpie object x, weight, unit, description, min, and max.

Author(s)

Michaja Pehl

See Also

calcOutput()


Calculate Clinker-to-Cement Ratio

Description

Calculate Clinker-to-Cement Ratio

Usage

calcClinker_to_cement_ratio()

Value

A list with a magpie object x, weight, unit, and description.

Author(s)

Michaja Pehl

See Also

calcOutput(), readADVANCE_WP2(), convertADVANCE_WP2()


Calculate emission factors for feedstocks in the chemicals industry using emissions from UNFCCC and energy demands from IEA Energy Balances

Description

Calculate emission factors for feedstocks in the chemicals industry using emissions from UNFCCC and energy demands from IEA Energy Balances

Usage

calcEmissionFactorsFeedstocks()

Value

A list with a magpie object x, weight, unit, description.

Author(s)

Falk Benke, Renato Rodrigues, Simón Moreno Leiva

See Also

calcOutput()


Calculates FE demand in industry as REMIND variables

Description

Calculates FE demand in industry as REMIND variables

Usage

calcFeDemandIndustry(use_ODYM_RECC = FALSE, last_empirical_year = 2020)

Arguments

use_ODYM_RECC

per-capita pathways for SDP_xx scenarios? (Defaults to FALSE.)

last_empirical_year

Last year for which empirical data is available. Defaults to 2020.

Author(s)

Michaja Pehl


Calculate Limits on Industry CCS Capacities

Description

Calculate Limits on Industry CCS Capacities

Usage

calcIndustry_CCS_limits(
  a1 = 0.3,
  a2 = 0.15,
  installation_minimum = 1,
  stage_weight = c(Operational = 1, `In construction` = 1, `Advanced development` = 0.5,
    `Early development` = 0.2),
  facility_subsector = c(Cement = "cement", Chemical = "chemicals",
    `Hydrogen / Ammonia / Fertiliser` = "chemicals", Ethan = "chemicals",
    `Iron and Steel Production` = "steel"),
  region_mapping = NULL
)

Arguments

a1, a2

Annual growth factors of CCS capacity limits, for the first ten years and thereafter, default to 0.7 and 0.2 (70 % and 20 %, respectively).

installation_minimum

Minimum emission capacity (in MtCO~2~/year) capacities are rounded up to. Defaults to 0.5 (500 ktCO~2~/year).

stage_weight

A named vector of weight factors for different lifecycle stages. See Details.

facility_subsector

A named vector mapping the "Facility Industry" of CCS projects to REMIND industry subsectors. See Details.

region_mapping

A data frame with columns iso3c and region detailing the regional resolution on which data should be extrapolated. If NULL (the default), extrapolation is done at the country level.

Details

The limits on industry CCS capacities are calculated from data of the Global Status of CCS 2023 report (through mrremind::readGlobalCCSinstitute(). CCS projects are

  • filtered for valid (i.e. not "Under Evaluation") data for "Operation date" and "CO~2~ capture capacity"

  • assigned to REMIND industry subsectors according to facility_subsector, which defaults to

    Facility Industry subsector
    Cement cement
    Chemical chemicals
    Hydrogen / Ammonia / Fertiliser chemicals
    Ethan chemicals
    Iron and Steel Production steel
  • weighted by lifecycle stage according to stage_weight, which defaults to

    Lifecycle stage weight
    Operational 100 %
    In construction 100 %
    Advanced development 50 %
    Early development 20 %

The resulting project capacities constitute the limits on industry subsector CCS capacity for 2025. The limit on CCS capacities for regions (or countries if region_mapping is NULL) is set to a value of total 2025 subsector CCS capacity, times the regions share in subsector activity (e.g. cement production) of the SSP2EU scenario

  • in 2030 if the region as some CCS capacity in 2025 in a different industry subsector, or

  • in 2035 if the region has no industry CCS capacity in 2030 at all.

CCS capacities are increased by the annual growth factor a1 for the ten first years, and by the annual growth factor a2 afterwards (defaulting to 70 % and 20 %, respectively).

Value

A list with a magpie object x, weight, unit, description, and min.

Author(s)

Michaja Pehl


Industry Energy Efficiency Capital

Description

Industry Energy Efficiency Capital

Usage

calcIndustry_EEK(kap)

Arguments

kap

General internal capital stock, as calculated internally by 'calcCapital()'.

Value

A list with a ['magpie'][magclass::magclass] object 'x', 'weight', 'unit', and 'description' fields.


Calculate Maximum Secondary Steel Production Share

Description

Reads ExpertGuess/industry_max_secondary_steel_share and expands to all 'scenarios'/'regions' using default data. See ['tool_expand_tibble()'] for details.

Usage

calcindustry_max_secondary_steel_share(scenarios = NULL, regions = NULL)

Arguments

scenarios

A character vector of scenarios to expand data to.

regions

A character vector of regions to expand data to.

Value

A list with a ['magpie'][magclass::magclass] object 'x'.


Thermodynamic Limits for Industry Specific FE Demand

Description

Return readindustry_subsectors_specific('industry_specific_FE_limits') in a format usable as a REMIND input.

Usage

calcindustry_specific_FE_limits()

Value

A magpie object.

Author(s)

Michaja Pehl


Final energy demand for feedstocks (non-energy use)

Description

Final energy demand for feedstocks (non-energy use)

Usage

calcnonEnergyIndFE()

Value

A magpie object.

Author(s)

Renato Rodrigues

See Also

calcOutput().


Share of Industry Subsectors in FE Use

Description

Calculates industry subsector shares in final energy carrier use for the fixed_shares realisation of the industry module.

Usage

calcShareIndFE()

Details

For the region mapping regionmapping_21_EU11.csv, these are based on IEA data from calcOutput(type = 'FEdemand'), for all other region mappings on vintage data which is ultimately based on Enerdata data.

Value

A magpie object.

Note

There is a discrepancy between the shares calculated from these two sources, that will affect REMIND emission reporting.

Author(s)

Lavinia Baumstark

Michaja Pehl

See Also

calcOutput().


EDGE-Industry

Description

Functions for calculating industry activity trajectories.

Usage

calcSteel_Projections(
  subtype = "production",
  match.steel.historic.values = TRUE,
  match.steel.estimates = "none",
  save.plots = NULL,
  China_Production = NULL
)

calcIndustry_Value_Added(
  subtype = "physical",
  match.steel.historic.values = TRUE,
  match.steel.estimates = "none",
  save.plots = NULL,
  China_Production = NULL
)

Arguments

subtype

One of

  • production Returns trajectories of primary and secondary steel production (calcSteel_Projections()).

  • secondary.steel.max.share Returns the maximum share of secondary steel in total steel production (calcSteel_Projections()).

  • physical Returns physical production trajectories for cement (calcIndustry_Value_Added()).

  • economic Returns value added trajectories for all subsectors (calcIndustry_Value_Added()).

match.steel.historic.values

Should steel production trajectories match historic values?

match.steel.estimates

Should steel production trajectories match exogenous estimates? NULL or one of

  • IEA_ETP IEA 2017 Energy Transition Pathways steel production totals for OECD and Non-OECD countries from the Reference Technologies Scenario until 2060, and original growth rates after that.

save.plots

NULL (default) if no plots are saved, or the path to save directories to.

China_Production

A data frame with columns period and total.production prescribing total production for China to have, disregarding results from the stock saturation model.

Value

A list with a magpie object x, weight, unit, description, min, and max.

Author(s)

Michaja Pehl

See Also

calcOutput()


Calculate Steel Stock from Mueller steel stock per capita and WDI population

Description

Calculate Steel Stock from Mueller steel stock per capita and WDI population

Usage

calcSteelStock()

Value

A magpie object.

Author(s)

Falk Benke


Convert ADVANCE WP2 Data

Description

Convert ADVANCE WP2 Data

Usage

convertADVANCE_WP2(x, subtype)

Arguments

x

A magpie object returned by readADVANCE_WP2().

subtype

One of

  • clinker-to-cement-ratio for the clinker-to-cement ratios from figure 21 of Edelenbosch, O. Enhancing the representation of energy demand developments in IAM models - A Modeling Guide for the Cement Industry (2015) zotero://select/items/JP8X2QFK, which is extended from H12 regions to country level.

Value

A magpie object.

Author(s)

Michaja Pehl

See Also

readSource(), readADVANCE_WP2()


Convert Mueller data

Description

Convert Mueller data

Usage

convertMueller(x, subtype)

Arguments

x

A magpie object returned from readMueller().

subtype

One of:

  • countries: read table mapping country names use by Müller et al. 2013 to ISO 3166-1 alpha-3 codes.

  • stocks: read low/medium/high estimates of per-capita steel stocks from Müller et al. 2013 SI2

Value

A magpie object.

Author(s)

Falk Benke


convertStegmann2022

Description

Converts data from Stegmann2022

Usage

convertStegmann2022(x)

Arguments

x

unconverted magpie object from read-script

Value

magpie object with a completed dataset.


Read ADVANCE WP2 Data

Description

Read ADVANCE WP2 Data

Usage

readADVANCE_WP2(subtype)

Arguments

subtype

One of

  • clinker-to-cement-ratio for the clinker-to-cement ratios from figure 21 of Edelenbosch, O. Enhancing the representation of energy demand developments in IAM models - A Modeling Guide for the Cement Industry (2015) zotero://select/items/JP8X2QFK

Value

A magpie object.

Author(s)

Michaja Pehl

See Also

readSource(), convertADVANCE_WP2()


industry/subsector change factors

Description

Change factors of specific FE and material demand for the industry/subsector realisation of REMIND.

Usage

readindustry_subsectors_specific(subtype = NULL)

calcindustry_subsectors_specific(
  subtype = NULL,
  scenarios = NULL,
  regions = NULL,
  direct = NULL
)

Arguments

subtype

One of

  • FE for specific final energy demand change factors

  • material_alpha for alpha factors and convergence time of specific material demand decreases relative to the SSP2EU scenario

  • material_relative for scaling factors of specific material demand relative to baseline scenarios

  • material_relative_change for scaling factors of specific material demand change relative to baseline scenarios

scenarios

A vector of scenarios for which factors are to be returned.

regions

A vector of regions for which factors are to be returned.

direct

A data frame as returned by readindustry_subsectors_specific() to load debugging/developing data directly instead of from file.

Details

Factors are read from the files specific_FE.csv, specific_material_alpha.csv, specific_material_relative.csv, and specific_material_relative_change.csv, respectively. NA is used to mark defaults for the scenario and region columns, and specified values will overwrite these defaults.

So

  • ⁠NA,NA,cement,1⁠ will be extended to all scenarios and regions

  • ⁠scen1,NA,cement,2⁠ will overwrite this default for all regions in scen1

  • ⁠NA,regi1,cement,3⁠ will overwrite this again for all scenarios (including scen1) for regi1

  • ⁠scen1,regi1,cement,4⁠ will lastly overwrite the value for the scen1, regi1 combination

Replacements occur in this fixed order (NA/NA, scenario/NA, NA/region, scenario/region).

Lastly, output is filtered for scenarios and regions.

For debugging and development, instead of modifying the .csv files in ⁠sources/industry_subsectors_specific/⁠ and interfering with production runs, modify the calling code (e.g. calcFEdemand.R) to use direct data (entered verbatim or loaded from somewhere else.)

Value

A magpie object.

Author(s)

Michaja Pehl


Read Müller et al. 2013 data.

Description

Read data from Müller et al. 2013 (http://dx.doi.org/10.1021/es402618m).

Usage

readMueller(subtype)

Arguments

subtype

One of:

  • countries: read table mapping country names use by Müller et al. 2013 to ISO 3166-1 alpha-3 codes.

  • stocks: read low/medium/high estimates of per-capita steel stocks from Müller et al. 2013 SI2

Value

A magpie object.

Author(s)

Michaja Pehl

See Also

readSource()


Read Final energy demand for feedstocks (non-energy use)

Description

Read Final energy demand for feedstocks (non-energy use)

Usage

readnonEnergyDemand()

Value

magpie object of region dependent data

Author(s)

Renato Rodrigues

See Also

readSource

Examples

## Not run: 
a <- readSource(type = "nonEnergyDemand")

## End(Not run)

Read ODYM_RECC data from the SHAPE Project

Description

Read ODYM_RECC data from the SHAPE Project

Usage

readODYM_RECC(subtype, smooth = TRUE)

calcODYM_RECC(subtype, smooth = TRUE)

Arguments

subtype

One of

  • 'REMIND_industry_trends': Trends in per-capita production of industry subsectors cement, chemicals, steel_primary, steel_secondary, and otherInd. Trends for chemicals and otherInd are averages of the other three trends, which are provided by NTNU.

smooth

Smooth REMIND_industry_trends (default) or not.

Value

A magpie object.

Author(s)

Michaja Pehl


Read Pauliuk et al. 2013 data

Description

Read data from Pauliuk et al. 2013 (https://dx.doi.org/10.1016/j.resconrec.2012.11.008).

Usage

readPauliuk(subtype = "lifetime")

Arguments

subtype

One of:

  • lifetime: Read estimated lifetime of overall steel stocks (approach b) in years.

Value

A magpie object.

Author(s)

Michaja Pehl

See Also

readSource()


Read PlasticsEoL

Description

Read-in data for the End-of-Life fate of plastics from 1.Stegmann, P., Daioglou, V., Londo, M., van Vuuren, D. P. & Junginger, M. Plastic futures and their CO2 emissions. Nature 612, 272–276 (2022). https://www.nature.com/articles/s41586-022-05422-5 Link to SI: https://static-content.springer.com/esm/art%3A10.1038%2Fs41586-022-05422-5/MediaObjects/41586_2022_5422_MOESM1_ESM.xlsx #nolint

Usage

readStegmann2022()

Value

magpie object of the data

Author(s)

Falk Benke, Simón Moreno

See Also

readSource

Examples

## Not run: 
a <- readSource(type = "Stegmann2022")

## End(Not run)

UNIDO data

Description

Read and convert data from United Nations Industrial Organisation.

Usage

readUNIDO(subtype = "INDSTAT2")

convertUNIDO(x, subtype = "INDSTAT2")

calcUNIDO(subtype = "INDSTAT2")

Arguments

subtype

one of - INDSTAT2: read INDSTAT2 data

x

result from readUNIDO() as passed to convertUNIDO()

Value

A magpie object.

readUNIDO returns raw INDSTAT2 data. convertUNIDO converts to iso3c country codes, selects industry subsectors value added data according to this table

subsector ISIC ctable utable
manufacturing D 20 17–20
cement 20 20 17–20
chemicals 24 20 17–20
steel 27 20 17–20

and filters data that is either unreasonable or would unduly bias regional regressions according to this table

subsector iso3c years
manufacturing BIH 1990–91
manufacturing CHN 1963–97
manufacturing HKG 1963–2015
manufacturing IRQ 1994–98
manufacturing MAC 1963–2015
manufacturing MDV 1963–2015
cement BDI 1980–2010
cement CIV 1990–93
cement HKG 1973–79
cement IRQ 1992–97
cement NAM 2007–10
cement RUS 1970–90
chemicals CIV 1989
chemicals HKG 1973–79, 2008–15
chemicals MAC 1978–79
chemicals NER 1999–2002
steel BGD 2011
steel CHE 1995–96
steel CHL 2008
steel HKG 1973–79
steel HRV 2012
steel IRL 1980
steel LKA 2006
steel MAR 1989–2004
steel MKD 1996
steel PAK 1981–82
steel TUN 2003–06

calcUNIDO() calculates otherInd subsector values as the difference between manufacturing and cement, chemicals, and steel values and is intended to be called through calcOutput(), which will aggregate regions.

Author(s)

Michaja Pehl

See Also

readSource(), calcOutput()


Read U.S. Geological Survey data

Description

Read U.S. Geological Survey data

Usage

readUSGS(subtype = "cement")

convertUSGS(x, subtype = "cement")

Arguments

subtype

One of

x

Data returned by readUSGS().

Value

A magpie object.

Author(s)

Michaja Pehl


Read van Ruijven et al. (2016) data.

Description

Read data from van Ruijven et al. 2016, (http://dx.doi.org/10.1016/j.resconrec.2016.04.016, https://www.zotero.org/groups/52011/rd3/items/itemKey/6QMNBEHQ), obtained through personal communication (e-mail to Michaja Pehl). Units are tonnes per year.

Usage

readvanRuijven2016()

Value

A magpie object.

Author(s)

Michaja Pehl

See Also

readSource()


Read World Steel Statistical Yearbook Data

Description

Read combined data of World Steel Association statistical yearbooks (https://www.worldsteel.org/steel-by-topic/statistics/steel-statistical-yearbook.html).

Usage

readworldsteel(subtype = "detailed")

Arguments

subtype

One of - 'detailed' returning data for the worksheets - 'Pig Iron Production' - 'DRI Production' - 'Total Production of Crude Steel' - 'Production in Oxygen-Blown Converters' - 'Production in Open Hearth Furnaces' - 'Production in Electric Arc Furnaces' - 'Apparent Steel Use (Crude Steel Equivalent)' from 1991 on or - 'long' returning total production data from 1967 on

Value

A ['magpie'][magclass::magclass] object.

Author(s)

Michaja Pehl

See Also

['readSource()']


Expand tibble across scenarios and regions with default values

Description

The data.frame 'd' is expanded in such a manner that all rows with 'NA' in either the 'scenario' or 'region' columns are extended to repeat for all scenarios and regions listed in 'scenarios' and 'regions'. Rows with specified scenarios and/or regions will overwrite extended ones. Regions are expanded before scenarios.

Usage

tool_expand_tibble(d, scenarios, regions, structure.columns = NULL)

Arguments

d

A data.frame with columns 'scenario' and 'region'.

scenarios

A character vector of scenario names.

regions

A character vector of region names.

structure.columns

A character vector of column names to be carried along. Ignored if not a column in 'd'.

Value

A 'tibble'.

Examples

## Not run: 
tribble(
  ~scenario,   ~region,   ~value,
  NA,          NA,        0,
  NA,          'CHA',     1,
  'SSP1',      NA,        2,
  'SSP2EU',    'DEU',     3) %>%
  tool_expand_tibble(scenarios = c('SSP1', 'SSP2EU', 'SSP5'),
                     regions = c('CHA', 'DEU', 'USA')) %>%
  pivot_wider(names_from = 'region')

tribble(
  ~scenario,   ~region,   ~name,   ~value,
  NA,          NA,        'A',     0,
  NA,          'CHA',     'B',     1,
  'SSP1',      NA,        'A',     2,
  'SSP2EU',    'DEU',     'B',     3) %>%
  tool_expand_tibble(scenarios = c('SSP1', 'SSP2EU', 'SSP5'),
                     regions = c('CHA', 'DEU', 'USA'),
                     structure.columns = 'name')

## End(Not run)

Apply corrections to IEA data needed for Industry subsectors

Description

Apply corrections to IEA data to cope with fragmentary time series and replace outputs from blast furnaces and coke ovens, that are inputs into industry subsectors, by their respective inputs. The corrections done by this function are rather rudimentary and crude. This gets smoothed away in regional aggregation. But do not use the resulting country-level data without additional scrutiny.

Usage

tool_fix_IEA_data_for_Industry_subsectors(data, ieamatch, threshold = 0.01)

Arguments

data

MAgPIE object containing the IEA Energy Balances data

ieamatch

mapping of IEA product/flow combinations to REMIND sety/fety/te combinations as used in mrremind::calcIO()

threshold

minimum share each industry subsector uses of each product. Defaults to 1 %.

Details

Use regional or global averages if IEA industry data lists energy use only as "non-specified". Outputs from blast furnaces (BLFURGS, OGASES) and coke ovens (OVENCOKE, COKEOVGS, COALTAR, NONCRUDE), that are inputs into industry subsectors. Used internally in mrremind::calcIO() for subtype output_Industry_subsectors.

Value

a MAgPIE object

Author(s)

Michaja Pehl