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.4.2.9001 |
Built: | 2024-11-19 09:26:25 UTC |
Source: | https://github.com/pik-piam/mrindustry |
Combines cement production data from readvanRuijven2016()
and
readUSGS(cement)
into a single data set, using USGS data from
2005 on.
calcCement()
calcCement()
A list with a magpie
object x
with
country-level cement production in tonnes, weight
, unit
, description
,
and min
fields.
Michaja Pehl
Calculate Clinker-to-Cement Ratio
calcClinker_to_cement_ratio()
calcClinker_to_cement_ratio()
A list with a magpie
object x
, weight
,
unit
, and description
.
Michaja Pehl
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
calcEmissionFactorsFeedstocks()
calcEmissionFactorsFeedstocks()
A list with a magpie
object x
, weight
,
unit
, description
.
Falk Benke, Renato Rodrigues, Simón Moreno Leiva
Calculates FE demand in industry as REMIND variables
calcFeDemandIndustry(use_ODYM_RECC = FALSE, last_empirical_year = 2020)
calcFeDemandIndustry(use_ODYM_RECC = FALSE, last_empirical_year = 2020)
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. |
Michaja Pehl
Calculate Limits on Industry CCS Capacities
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 )
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 )
a1 , a2
|
Annual growth factors of CCS capacity limits, for the first ten
years and thereafter, default to |
installation_minimum |
Minimum emission capacity (in MtCO~2~/year)
capacities are rounded up to. Defaults to |
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 |
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).
A list with a magpie
object x
, weight
,
unit
, description
, and min
.
Michaja Pehl
Industry Energy Efficiency Capital
calcIndustry_EEK(kap)
calcIndustry_EEK(kap)
kap |
General internal capital stock, as calculated internally by 'calcCapital()'. |
A list with a ['magpie'][magclass::magclass] object 'x', 'weight', 'unit', and 'description' fields.
Return readindustry_subsectors_specific('industry_specific_FE_limits')
in a
format usable as a REMIND input.
calcindustry_specific_FE_limits()
calcindustry_specific_FE_limits()
A magpie
object.
Michaja Pehl
Final energy demand for feedstocks (non-energy use)
calcnonEnergyIndFE()
calcnonEnergyIndFE()
A magpie
object.
Renato Rodrigues
Functions for calculating industry activity trajectories.
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 )
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 )
subtype |
One of
|
match.steel.historic.values |
Should steel production trajectories match historic values? |
match.steel.estimates |
Should steel production trajectories match
exogenous estimates?
|
save.plots |
|
China_Production |
A data frame with columns |
A list with a magpie
object x
, weight
,
unit
, description
, min
, and max
.
Michaja Pehl
Calculate Steel Stock from Mueller steel stock per capita and WDI population
calcSteelStock()
calcSteelStock()
A magpie
object.
Falk Benke
Convert ADVANCE WP2 Data
convertADVANCE_WP2(x, subtype)
convertADVANCE_WP2(x, subtype)
x |
A |
subtype |
One of
|
A magpie
object.
Michaja Pehl
readSource()
, readADVANCE_WP2()
Convert Mueller data
convertMueller(x, subtype)
convertMueller(x, subtype)
x |
A |
subtype |
One of:
|
A magpie
object.
Falk Benke
Converts data from Stegmann2022
convertStegmann2022(x)
convertStegmann2022(x)
x |
unconverted magpie object from read-script |
magpie object with a completed dataset.
Read ADVANCE WP2 Data
readADVANCE_WP2(subtype)
readADVANCE_WP2(subtype)
subtype |
One of
|
A magpie
object.
Michaja Pehl
readSource()
, convertADVANCE_WP2()
Change factors of specific FE and material demand for the
industry/subsector
realisation of REMIND.
readindustry_subsectors_specific(subtype = NULL) calcindustry_subsectors_specific( subtype = NULL, scenarios = NULL, regions = NULL, direct = NULL )
readindustry_subsectors_specific(subtype = NULL) calcindustry_subsectors_specific( subtype = NULL, scenarios = NULL, regions = NULL, direct = NULL )
subtype |
One of
|
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
|
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 occure 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.)
A magpie
object.
Michaja Pehl
Read data from Müller et al. 2013 (http://dx.doi.org/10.1021/es402618m).
readMueller(subtype)
readMueller(subtype)
subtype |
One of:
|
A magpie
object.
Michaja Pehl
Read Final energy demand for feedstocks (non-energy use)
readnonEnergyDemand()
readnonEnergyDemand()
magpie object of region dependent data
Renato Rodrigues
## Not run: a <- readSource(type = "nonEnergyDemand") ## End(Not run)
## Not run: a <- readSource(type = "nonEnergyDemand") ## End(Not run)
Read ODYM_RECC data from the SHAPE Project
readODYM_RECC(subtype, smooth = TRUE) calcODYM_RECC(subtype, smooth = TRUE)
readODYM_RECC(subtype, smooth = TRUE) calcODYM_RECC(subtype, smooth = TRUE)
subtype |
One of
|
smooth |
Smooth REMIND_industry_trends (default) or not. |
A magpie
object.
Michaja Pehl
Read data from Pauliuk et al. 2013 (https://dx.doi.org/10.1016/j.resconrec.2012.11.008).
readPauliuk(subtype = "lifetime")
readPauliuk(subtype = "lifetime")
subtype |
One of:
|
A magpie
object.
Michaja Pehl
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
readStegmann2022()
readStegmann2022()
magpie object of the data
Falk Benke, Simón Moreno
## Not run: a <- readSource(type = "Stegmann2022") ## End(Not run)
## Not run: a <- readSource(type = "Stegmann2022") ## End(Not run)
Read and convert data from United Nations Industrial Organisation.
readUNIDO(subtype = "INDSTAT2") convertUNIDO(x, subtype = "INDSTAT2") calcUNIDO(subtype = "INDSTAT2")
readUNIDO(subtype = "INDSTAT2") convertUNIDO(x, subtype = "INDSTAT2") calcUNIDO(subtype = "INDSTAT2")
subtype |
one of
- |
x |
result from |
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.
Michaja Pehl
Read U.S. Geological Survey data
readUSGS(subtype = "cement") convertUSGS(x, subtype = "cement")
readUSGS(subtype = "cement") convertUSGS(x, subtype = "cement")
subtype |
One of
|
x |
Data returned by |
A magpie
object.
Michaja Pehl
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.
readvanRuijven2016()
readvanRuijven2016()
A magpie
object.
Michaja Pehl
Read combined data of World Steel Association statistical yearbooks (https://www.worldsteel.org/steel-by-topic/statistics/steel-statistical-yearbook.html).
readworldsteel(subtype = "detailed")
readworldsteel(subtype = "detailed")
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 |
A ['magpie'][magclass::magclass] object.
Michaja Pehl
['readSource()']
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.
tool_expand_tibble(d, scenarios, regions, structure.columns = NULL)
tool_expand_tibble(d, scenarios, regions, structure.columns = NULL)
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'. |
A 'tibble'.
## 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)
## 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 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.
tool_fix_IEA_data_for_Industry_subsectors(data, ieamatch, threshold = 0.01)
tool_fix_IEA_data_for_Industry_subsectors(data, ieamatch, threshold = 0.01)
data |
MAgPIE object containing the IEA Energy Balances data |
ieamatch |
mapping of IEA product/flow combinations to REMIND
|
threshold |
minimum share each industry subsector uses of each product. Defaults to 1 %. |
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
.
a MAgPIE object
Michaja Pehl