| Title: | MadRat REMIND Input Data Package |
|---|---|
| Description: | The mrremind packages contains data preprocessing for the REMIND model. |
| Authors: | Lavinia Baumstark [aut, cre], Renato Rodrigues [aut], Antoine Levesque [aut], Julian Oeser [aut], Christoph Bertram [aut], Ioanna Mouratiadou [aut], Aman Malik [aut], Felix Schreyer [aut], Bjoern Soergel [aut], Marianna Rottoli [aut], Abhijeet Mishra [aut], Alois Dirnaichner [aut], Michaja Pehl [aut], Anastasis Giannousakis [aut], David Klein [aut], Jessica Strefler [aut], Lukas Feldhaus [aut], Regina Brecha [aut], Sebastian Rauner [aut], Jan Philipp Dietrich [aut], Stephen Bi [aut], Falk Benke [aut], Pascal Weigmann [aut], Oliver Richters [aut], Robin Hasse [aut], Sophie Fuchs [aut], Rahel Mandaroux [aut], Johannes Koch [aut], Gabriel Abrahao [aut], Tabea Dorndorf [aut] |
| Maintainer: | Lavinia Baumstark <[email protected]> |
| License: | LGPL-3 | file LICENSE |
| Version: | 0.270.1 |
| Built: | 2026-06-05 20:05:54 UTC |
| Source: | https://github.com/pik-piam/mrremind |
The mrremind packages contains data preprocessing for the REMIND model.
Maintainer: Lavinia Baumstark [email protected]
Authors:
Renato Rodrigues
Antoine Levesque
Julian Oeser
Christoph Bertram
Ioanna Mouratiadou
Aman Malik
Felix Schreyer
Bjoern Soergel
Marianna Rottoli
Abhijeet Mishra
Alois Dirnaichner
Michaja Pehl
Anastasis Giannousakis
David Klein
Jessica Strefler
Lukas Feldhaus
Regina Brecha
Sebastian Rauner
Jan Philipp Dietrich
Stephen Bi
Falk Benke
Pascal Weigmann
Oliver Richters
Robin Hasse
Sophie Fuchs
Rahel Mandaroux
Johannes Koch
Gabriel Abrahao
Tabea Dorndorf
Useful links:
Calculate REMIND final energy variables from historical AGEB values
calcAGEB(subtype = "balances")calcAGEB(subtype = "balances")
subtype |
data subtype. Either "balances" ("Auswertungstabellen zur Energiebilanz Deutschland") or "electricity" ("Bruttostromerzeugung in Deutschland nach Energieträgern") |
Falk Benke
Calculate air pollutant emissions for a reference year at different sectoral aggregation levels based on CEDS2025 and GAINS2025 data.
calcAirPollBaseyearEmi( baseyear = 2020, CEDS.5yearmean = TRUE, data_source = "CEDS2025", outsectors = "GAINS" )calcAirPollBaseyearEmi( baseyear = 2020, CEDS.5yearmean = TRUE, data_source = "CEDS2025", outsectors = "GAINS" )
baseyear |
base year for which emissions are calculated |
CEDS.5yearmean |
computes 5-year average around base year for CEDS2025 ("TRUE"/"FALSE") |
data_source |
"CEDS2025" or "GAINS2025" |
outsectors |
total ("TOT"), 62 CEDS sectors ("CEDS"), 16 intermediary sectors used to link CEDS and GAINS ("INT"), 35 GAINS sectors ("GAINS"), 13 CMIP7 Harmonization sectors ("CMIP7") |
magclass object
Gabriel Abrahao, Laurin Koehler-Schindler
Provide price path data
calcBiocharBounds()calcBiocharBounds()
Tabea Dorndorf
Provides back-of-envelope upper limits of biochar application on cropland.
Estimates upper limits as either cumulative stock capacity (t) over a compliance window, or as annual flow ceiling (t/yr) for cropland soils, using physical cropland area, adoption shares, and application-rate limits per area.
calcBiocharLimitCropland( dataBCLimit = "CRCF_draft_2025", adoptShare = 1, refYear = "y2020", annualLimit = TRUE )calcBiocharLimitCropland( dataBCLimit = "CRCF_draft_2025", adoptShare = 1, refYear = "y2020", annualLimit = TRUE )
dataBCLimit |
Character scalar selecting the application-rate limit source. Options: "CRCF_draft_2025": cumulative application limit of 50 t/ha over any 10-year period. "Conservative": annual application rate of 1 t/ha/yr (illustrative, non-regulatory) |
adoptShare |
Adoption share of cropland treated with biochar. |
refYear |
Character scalar selecting the reference year (e.g. "y2015"). |
annualLimit |
Logical. If TRUE: compute annual flow ceiling (t/yr). If FALSE: compute cumulative stock capacity (t) for compliance window. Note: If data source contains an annual rate, the compliance window is interpreted as 1 year (only annual limits make semantic sense here). |
List of magpie objects with results on country level, weight on country level, unit and description.
Isabelle Weindl
## Not run: calcOutput("BiocharLimitCropland", dataBCLimit = "CRCF_draft_2025", adoptShare = 1, refYear = "y2020", annualLimit = TRUE) ## End(Not run)## Not run: calcOutput("BiocharLimitCropland", dataBCLimit = "CRCF_draft_2025", adoptShare = 1, refYear = "y2020", annualLimit = TRUE) ## End(Not run)
read biomass supply curves from Magpie emulator
calcBiomassPrices()calcBiomassPrices()
Magpie object with two parameters determining linear biomass supply curve
Calculate REMIND variables from historical BP values
calcBP()calcBP()
Falk Benke
provides historical capacity values in TW
calcCapacity(subtype)calcCapacity(subtype)
subtype |
data subtype. Either "capacityByTech" or "capacityByPE" |
magpie object of capacity data
Renato Rodrigues, Stephen Bi, Fabrice Lécuyer
## Not run: calcOutput("Capacity", subtype = "capacityByTech") ## End(Not run)## Not run: calcOutput("Capacity", subtype = "capacityByTech") ## End(Not run)
This function gathers project pipeline data for different technologies to generate REMIND input data for setting historical and near-term bounds. The output is technology capacity in three different categories: "operational": installed capacity that is operational in the respective year "construction": capacity that is currently under construction but expected to be completed in the respective year "planned": capacity that is planned to be completed by this year but not yet under construction. The exact definition of this category (e.g. whether only projects with FID are included)may vary by technology and is documented in calcProjectPipelines. Moreover, the function provides project pipeline data for the historical mif file.
calcCapacityBounds(subtype)calcCapacityBounds(subtype)
subtype |
either |
Felix Schreyer
provides capacity factor values
calcCapacityFactor()calcCapacityFactor()
magpie object of the capacity factor data
Renato Rodrigues, Stephen Bi
## Not run: calcOutput("CapacityFactor") ## End(Not run)## Not run: calcOutput("CapacityFactor") ## End(Not run)
provides capacity factor values
calcCapacityFactorHist()calcCapacityFactorHist()
magpie object of the capacity factor data
Renato Rodrigues, Stephen Bi, Fabrice Lécuyer
## Not run: calcOutput("CapacityFactor") ## End(Not run)## Not run: calcOutput("CapacityFactor") ## End(Not run)
use historical nuclear electricity generation capacity and calculate near-term estimates based on current nuclear power project status per country.
calcCapacityNuclear()calcCapacityNuclear()
Robert Pietzcker, Christoph Bertram, Aman Malik, Pascal Weigmann
Compute macroeconomic capital stock based on capital intensities from PWT and GDP scenarios from mrdrivers. The PWT capital intensities are used up until 2010. After that, the capital intensities converge towards that of Japan in 2010, at speeds that vary across scenarios. The final capital stocks are the product of the capital intensities and the gdp scenarios from mrdrivers.
calcCapital(scenario)calcCapital(scenario)
scenario |
GDP and pop scenarios. Passed to |
magpie object with the requested output data either on country or on regional level depending on the choice of argument "aggregate" or a list of information if supplementary is set to TRUE.
See the vignette vignette("scenarios", "mrdrivers") for information on the GDP scenarios.
readPWT() for information on the PWT version used.
The capacity targets (GW) at regional level are produced from different databases
UNFCCC_NDC database, an update of the Rogelj 2017 paper (see readme in inputdata)
REN21 Global Renewables
New Climate NPI policy database
calcCapTarget(sources)calcCapTarget(sources)
sources |
either "NewClimate" or "UNFCCC_NDC+REN21+CHN_NUC" |
Aman Malik, Oliver Richters, Rahel Mandaroux, Léa Hayez, Falk Benke
Calculate CCS capacity from IEA CCUS data
calcCCScapacity(subtype)calcCCScapacity(subtype)
subtype |
either |
Anne Merfort, Falk Benke
Provides REMIND data for PE tradecosts (energy losses on import).
calcCostsTrade()calcCostsTrade()
REMIND data forPE tradecosts (energy losses on import) and corresonding weights (1) as a list of two MAgPIE objects
Lavinia Baumstark
## Not run: calcOutput("CostsTrade") ## End(Not run)## Not run: calcOutput("CostsTrade") ## End(Not run)
Provides REMIND data for PE trade cost (energy losses on import, export and use).
calcCostsTradePeFinancial()calcCostsTradePeFinancial()
Regina Brecha, Lavinia Baumstark
## Not run: calcOutput("CostsTradePeFinancial") ## End(Not run)## Not run: calcOutput("CostsTradePeFinancial") ## End(Not run)
Calculate costs of transport of enhanced weathering
calcCostsWeathering()calcCostsWeathering()
transport costs of spreading rock on the fields
## Not run: calcOutput("CostsWeathering") ## End(Not run)## Not run: calcOutput("CostsWeathering") ## End(Not run)
Disaggregated investment cost data is aggregated and technologies renamed to REMIND names
calcDiffInvestCosts()calcDiffInvestCosts()
REMIND does not have a classification of coal power plants e.g., sub-critical. Therefore, countries are given coal plant costs assuming what type of coal plants are expected to develop there. For other technologies, certain assumptions are taken to change to REMIND convention.
Magpie object with aggregated but differentiated investment costs for some technologies.
Aman Malik
calcEDGAR7Fgases
calcEDGAR7Fgases()calcEDGAR7Fgases()
Gabriel Abrahao
Prepare EDGETransport inputs
calcEDGETransport(subtype)calcEDGETransport(subtype)
subtype |
REMIND/iterative EDGE-T input data subtypes |
REMIND/iterative EDGE-T input data for all scenario combinations
Johanna Hoppe
Calculate historical GHG Emissions from European Environment Agency
calcEEAGHGEmissions()calcEEAGHGEmissions()
Falk Benke, Renato Rodrigues
Calculate EEA emission projections from the two projections sources provided by European Environment Agency
calcEEAGHGProjections()calcEEAGHGProjections()
Falk Benke, Renato Rodrigues
Calculate distribution of total EEZ size
calcEEZdistribution()calcEEZdistribution()
Tabea Dorndorf
prepare the yearly Ember electricity data set To use only a part of the Ember data, call calcOutput("Ember", subtype = "...") and convert to TW if you want to use capacities as input data to REMIND.
calcEmber(subtype = "all")calcEmber(subtype = "all")
subtype |
data subtype. Either "capacity", "generation" or "all" |
Pascal Weigmann
EmiCO2LandUse calculate co2 emissions from land use change
calcEmiCO2LandUse()calcEmiCO2LandUse()
magpie object
Julian Oeser
## Not run: a <- calcOutput(type="EmiCO2LandUse")## Not run: a <- calcOutput(type="EmiCO2LandUse")
Fugitive methane emissions from fossil fuel extraction
calcEmiFossilFuelExtr(source)calcEmiFossilFuelExtr(source)
source |
either "EDGAR" or "CEDS2025" (after REMIND ScenarioMIP release) |
REMIND uses historical data on fugitive methane emissions from fossil fuel extraction for coal, oil and gas to derive emission factors. The data is available from two sources: EDGAR (for base year 2005) and CEDS2025 (2020).
Magpie object with CH4 emissions from fossil fuel extraction for coal, oil and gas in 2005, in Mt CH4
Gabriel Abrahao
historical LULUCF CO2 emissions following country accounting
calcEmiLULUCFCountryAcc()calcEmiLULUCFCountryAcc()
Magpie object with historical LULUCF emissions
Felix Schreyer, Falk Benke
Provides REMIND data for baseline emissions for maccs for 1990.
calcEmiMac1990()calcEmiMac1990()
REMIND data for baseline emissions for maccs for 1990 and corresonding weights (NULL) as a list of two MAgPIE objects
Lavinia Baumstark
## Not run: calcOutput("EmiMac1990") ## End(Not run)## Not run: calcOutput("EmiMac1990") ## End(Not run)
provides European 2030 emission targets in relation to 1990 and 2005 emissions
calcEmiReference()calcEmiReference()
2030 emission reductions tragets for 40%, 55% and 64% reductions in relation to 2005 values
Falk Benke and Renato Rodrigues
## Not run: calcOutput("EmiReference") ## End(Not run)## Not run: calcOutput("EmiReference") ## End(Not run)
calcEmissions
calcEmissions(datasource = "CEDS16")calcEmissions(datasource = "CEDS16")
datasource |
"CEDS2REMIND", "CEDS2025", "EDGAR6", "EDGARghg", "CDIAC", "ClimateTrace" |
magpie object with historical emissions
Steve Smith, Pascal Weigmann
Calculates historical emissions needed for estimating emission factors in extra emissions reporting
calcEmissions4ReportExtra(sectors = "CEDS")calcEmissions4ReportExtra(sectors = "CEDS")
sectors |
"CEDS" or "IAMC" to select the sectoral aggregation of the output |
list of magclass with CEDS CH4 and N2O emissionsdata for CEDS sectors for 2020, in Mt N or Mt CH4 per year
Gabriel Abrahao
This function calculates the emissions targets for the NDC scenarios applied in the REMIND module 45_carbonprice realization NDC. It contains the following steps: The parameters calculated in 3.) and 4.) are further used in the NDC realization to calculate the region-wide NDC emissions targets in terms of total GHG emissions excl. bunkers and excl. LULUCF sectors.
calcEmiTarget(sources, subtype, scenario)calcEmiTarget(sources, subtype, scenario)
sources |
database source, either 'UNFCCC_NDC' or 'NewClimate' |
subtype |
must be one of
|
scenario |
GDP and pop scenarios. Passed to |
Aman Malik, Christoph Bertram, Oliver Richters, Rahel Mandaroux, Falk Benke
Uses historical emissions from 1990-2022. CO2 (excl LU), CH4, N2O (so far no F-Gas historic time series) When available, UNFCCC data is used, otherwise CEDS data.
calcEmiTargetReference()calcEmiTargetReference()
Rahel Mandaroux, Falk Benke
calcEmiTarget(), convertUNFCCC_NDC()
Calculate REMIND variables from European Energy Datasheets
calcEuropeanEnergyDatasheets(subtype)calcEuropeanEnergyDatasheets(subtype)
subtype |
data subtype. Either "EU28" (data from June 20 including GBR) or "EU27" (latest data from August 23 without GBR) |
A magpie object.
Falk Benke
Calculate REMIND emission variables from historical Eurostat (env_air_gge) values
calcEurostatEmissions()calcEurostatEmissions()
Falk Benke
prepare data for exogenuous FE and ES demand pathways that do not come from EDGE models but from other sources and/or scenario literature. REMIND can be fixed to those demand pathways if the switch cm_exogDem_scen is activated.
calcExogDemScen()calcExogDemScen()
A magpie object.
Felix Schreyer
Calculate expert guesses
calcExpertGuess(subtype)calcExpertGuess(subtype)
subtype |
must be one of 'biocharPrices' 'ccsBounds' 'deltacapoffset' 'gridFactor' 'subConvergenceRollback' 'tradeConstraints' 'taxConvergence' 'taxConvergenceRollback', 'tradecost' |
Falk Benke
Calculates FE historical from IEA energy balances
calcFE(ieaVersion = "default")calcFE(ieaVersion = "default")
ieaVersion |
Release version of IEA data, either 'default' (vetted and used in REMIND) or 'latest'. |
Lavinia Baumstark, Aman Malik
Returns the EDGE-Buildings data as REMIND variables
calcFeDemandBuildings(subtype, scenario)calcFeDemandBuildings(subtype, scenario)
subtype |
either "FE", or "UE" |
scenario |
A string (or vector of strings) designating the scenario(s) to be returned. |
Robin Hasse
Project the IEA flow ONONSPEC into the future. As we have no idea, where this
energy demand comes from, we use a very generic methos to project it into the
future: We assume an asymptotic model. It starts from the level
at the end of data (EOD) with EOD slope
and approaches the fraction of
this slope within . Both and
are determined through a linear regression of the
last time steps with IEA data.
with the decay rate is differentiated by scenarios thus approaching a low,
med and high long-term level. To assure that scenarios don't differ at
the end of history (EOH), time steps between EOD and EOH are projected with
med value of .
calcFeDemandONONSPEC(scenario, eoh)calcFeDemandONONSPEC(scenario, eoh)
scenario |
character vector of remind demand scenarios |
eoh |
numeric, end of history: last time step without scenario differentiation |
Each scenario has a differentiated . For
, the high (low) scenario assumes a longer
(shorter) time span and for vice versa to reach
a higher (lower) long-term value. We want to make sure that until the end of
history (EOH), all scenarios are still identical. So we take the med
parameterisation until EOH. Afterwards, we adjust the model such that we
start with EOH level and slope and still reach the target slope
until
:
with the decay rate
list with MagPIE object
Robin Hasse
Reads in the data of the source IIASA_subs_taxes, by country. and calculate taxes at the final energy delivery level to the end-use sectors (industry, buildings and transport). Regional aggregation is done via the respective energy quantities as weights.
calcFETaxes(subtype = "taxes")calcFETaxes(subtype = "taxes")
subtype |
choose between tax rates ("taxes") or subsidies rate ("subsidies") output |
MAgPIE object
Christoph Bertram and Renato Rodrigues
readIIASA_subs_taxes, convertIIASA_subs_taxes
## Not run: calcOutput("FETaxes") ## End(Not run)## Not run: calcOutput("FETaxes") ## End(Not run)
generate F-Gases based on IMAGE data
calcFGas(subtype = "IMAGE2025", interp = "interpolate2025", interpyear = 2030)calcFGas(subtype = "IMAGE2025", interp = "interpolate2025", interpyear = 2030)
subtype |
"IMAGElegacy" will use the old IMAGE data, "IMAGE2025" will use the new IMAGE2025 data. |
interp |
"interpolate2025" will intepolate from EDGAR historical data from 2025 to interpyear. To account for the very old IMAGE scenarios in IMAGElegacy, this used to be 2050 but is now flexible. Any other interp value will ignore this step. |
interpyear |
The year to interpolate to, default is 2030. interpyear is only used if interp is set to "interpolate2025". |
magpie object with F-gases information
Lavinia Baumstark, Gabriel Abrahao
## Not run: x <- calcOutput("FGas") ## End(Not run)## Not run: x <- calcOutput("FGas") ## End(Not run)
Residential, commercial and total floor space from EDGE-B. Set
calcFloorspace(scenario, onlyTotal = FALSE)calcFloorspace(scenario, onlyTotal = FALSE)
scenario |
A string (or vector of strings) designating the scenario(s) to be returned. |
onlyTotal |
boolean, only give total instead of sub-sectoral floor space |
MAgPIE object with buildings floor space
Antoine Levesque, Robin Hasse
provides coefficients for fossil fuels (oil, gas and coal) and uranium extraction cost equations.
calcFossilExtraction(subtype = "FossilExtraction")calcFossilExtraction(subtype = "FossilExtraction")
subtype |
Either 'FossilExtraction' or 'UraniumExtraction' |
magpie object of the coefficients for fossil fuels and uranium extraction cost equations
Renato Rodrigues, Felix Schreyer
## Not run: calcOutput(type = "FossilExtraction", subtype = "FossilExtraction") ## End(Not run)## Not run: calcOutput(type = "FossilExtraction", subtype = "FossilExtraction") ## End(Not run)
This function is meant to be used to clean-up, fill gaps and smoothen the GAINS data to obtain consistent timeseries of emission factors from 2005 to 2100. The actual generation REMIND-specific files happens in calcGAINS2025forREMIND.
calcGAINS2025( weight_source = "CEDS2025", outsectors = "GAINS2025", outunit = "Tg/TWa" )calcGAINS2025( weight_source = "CEDS2025", outsectors = "GAINS2025", outunit = "Tg/TWa" )
weight_source |
Source of air pollutant reference emissions in 2020 that is used to derive the weights ("CEDS2025" or "GAINS2025") |
outsectors |
Output sectoral aggregation ("GAINS2025" or "REMIND") |
outunit |
Output unit for emission factors ("kt/PJ" or "Tg/TWa") |
Emission factor timeseries for all scenarios from 2005 to 2100: magclass object with dimensions region, year, and ssp.scenario.sectorGAINS.species
Gabriel Abrahao, Laurin Koehler-Schindler
Extracts oil, gas and coal data from the GEA 2012 into a scenario- and time-dependent grade structure
calcGEA2012(subtype, datatype)calcGEA2012(subtype, datatype)
subtype |
oil, coal, gas, or bounds |
datatype |
extraseed, exportbound, or decoffset for bounds subtype |
MAgPIE object containing regionally aggregated GEA 2012 data
Stephen Bi
## Not run: a <- calcOutput("GEA2012") ## End(Not run)## Not run: a <- calcOutput("GEA2012") ## End(Not run)
Calculate near-term expectations of capacities for use in fullVALIDATION.R
calcGlobalEnergyMonitor()calcGlobalEnergyMonitor()
Falk Benke
Calculate historical landuse emissions
calcHistoricalLUEmissions()calcHistoricalLUEmissions()
David Klein, Falk Benke
Calculate Final Energy for the buildings sector from Heat Roadmap Europe scenarios
calcHRE()calcHRE()
A magpie object.
Pascal Weigmann
Calculates PE|Coal, PE|Oil, PE|Gas, and FE as direct sums of relevant
products for TES (PEs) or TFC (FE), minus (negative) bunkers. Used for
benchmarking in the historical.mif and for the IIASA Scenario Compass
Initiative vetting.
calcIEA_EB_directSum()calcIEA_EB_directSum()
Calculate REMIND emission variables from IEA ETP values
calcIEA_ETP()calcIEA_ETP()
Falk Benke
Calculate REMIND variables from IEA Global EV Outlook data
calcIEA_EVOutlook()calcIEA_EVOutlook()
Falk Benke
Calculate REMIND variables from IEA World Energy Outlook data.
calcIeaWorldEnergyOutlook()calcIeaWorldEnergyOutlook()
Falk Benke
Calculate REMIND investment variables from IEA World Energy Investment Outlook (2024)
calcInvestmentHistorical()calcInvestmentHistorical()
Nicolas Bauer, Falk Benke
Computes IEA-based model data for different "subtypes" by use of raw IEA "Energy Balances" data and a mapping that corresponds to the structure of "products" and "flows" of IEA.
calcIO( subtype = c("input", "output", "trade"), ieaVersion = "default", corrected = FALSE )calcIO( subtype = c("input", "output", "trade"), ieaVersion = "default", corrected = FALSE )
subtype |
Data subtype. See default argument for possible values. |
ieaVersion |
Release version of IEA data, either 'default' (vetted and used in REMIND) or 'latest'. |
corrected |
boolean indicating whether corrections should be applied to the data after mapping |
Mapping structure example: IEA product ANTCOAL used for IEA flow TPATFUEL, contributes via REMIND technology coaltr for generating sesofos from pecoal (REMIND names)
IEA data as MAgPIE object aggregated to country level
Anastasis Giannousakis
## Not run: a <- calcOutput("IO", subtype = "output") ## End(Not run)## Not run: a <- calcOutput("IO", subtype = "output") ## End(Not run)
A wrapper around calcIO used to generate REMIND input data, created to apply corrective steps in a cache-conscious manner by avoiding additional subtypes in calcIO.
calcIoRemind(subtype)calcIoRemind(subtype)
subtype |
either "input", "output" or "trade" |
Falk Benke
Calculate REMIND variables from historical IRENA capacities.
calcIRENA()calcIRENA()
Falk Benke
Calculate selected REMIND energy and emission variables from historical JRC IDEES values
calcJRC_IDEES(subtype)calcJRC_IDEES(subtype)
subtype |
one of
|
A magpie object.
Falk Benke
write KLW damage parameters (from Kotz et al. 2024) into input data they are country-specific and should not be aggregated to the regional level at all
calcKLWdamage(subtype)calcKLWdamage(subtype)
subtype |
"beta1", "beta2", "maxGMT" |
MAgPIE object of damage parameters for KLW damage function on country level and for 1000 boostrapping samples
Franziska Piontek
Calculate baseline emissions trajectories for transport, adipic acid and nitric acid production
calcMACCbaseN2O(source = "PBL_2007")calcMACCbaseN2O(source = "PBL_2007")
source |
either "PBL_2007" or "PBL_2022" If source is PBL_2007, the source of the ultimately the baseline scenario of Lucas et al 2007 (http://linkinghub.elsevier.com/retrieve/pii/S1462901106001316) If source is PBL_2022, the source of the ultimately the baseline scenario of Harmsen et al. 2023 (https://doi.org/10.1038/s41467-023-38577-4) |
list of magclass with REMIND input data for different sectors for timesteps 2000-2100, in Mt N per year
Lavinia Baumstark, Gabriel Abrhahao
Rrange of possible abatement between maximum and minimum emission level in a year
calcMACCsCO2()calcMACCsCO2()
MAgPIE object
David Klein
## Not run: calcOutput("MACCsCO2") ## End(Not run)## Not run: calcOutput("MACCsCO2") ## End(Not run)
Compute macroeconomic capital investments based on investments shares from the PWT and GDP scenarios from mrdrivers. The final investments are the product of the two.
calcMacroInvestments()calcMacroInvestments()
magpie object with the requested output data either on country or on regional level depending on the choice of argument "aggregate" or a list of information if supplementary is set to TRUE.
See the vignette vignette("scenarios", "mrdrivers") for information on the GDP scenarios.
readPWT() for information on the PWT version used.
This is used in remind2 reporting as input data to calculate additional capacity and secondary energy variables.
calcOtherFossilInElectricity()calcOtherFossilInElectricity()
The projection focuses on a tight mitigation scenario and assumes that all fossil emissions from waste burning / other fossil processes can be reduced to 0 by 2050. Should be replaced in the future by actual modeling of waste / other fossil plants, or at least connected to RCP scenario assumptions.
Robert Pietzcker, Falk Benke
Computes Primary Energy variables from IEA Energy Balances
calcPE(ieaVersion = "default")calcPE(ieaVersion = "default")
ieaVersion |
Release version of IEA data, either 'default' (vetted and used in REMIND) or 'latest'. |
Reads in the data of the source IIASA_subs_taxes, by country. and calculate taxes at primary energy level. Regional aggregation is done via the respective energy quantities as weights.
calcPETaxes(subtype = "subsidies")calcPETaxes(subtype = "subsidies")
subtype |
subsidies rate ("subsidies") output |
MAgPIE object
Christoph Bertram and Renato Rodrigues
readIIASA_subs_taxes,
convertIIASA_subs_taxes
## Not run: calcOutput("PETaxes") ## End(Not run)## Not run: calcOutput("PETaxes") ## End(Not run)
calculates projections for the end of life fate of plastic waste in particular, calculates the share that is incinerated
calcPlasticsEoL()calcPlasticsEoL()
Falk Benke, Simón Moreno Leiva
Provides geological storage potential
calcPotentialGeologicalStorage()calcPotentialGeologicalStorage()
geological storage potential data MAgPIE object
David Klein
## Not run: calcOutput("PotentialGeologicalStorage") ## End(Not run)## Not run: calcOutput("PotentialGeologicalStorage") ## End(Not run)
Provides geothermal potential data
calcPotentialGeothermal()calcPotentialGeothermal()
geothermal potential data MAgPIE object
Renato Rodrigues
## Not run: calcOutput("PotentialGeothermal") ## End(Not run)## Not run: calcOutput("PotentialGeothermal") ## End(Not run)
Provides hydro potential data
calcPotentialHydro()calcPotentialHydro()
hydro potential data and corresponding weights as a list of two MAgPIE objects
Lavinia Baumstark
## Not run: calcOutput("PotentialHydro") ## End(Not run)## Not run: calcOutput("PotentialHydro") ## End(Not run)
Provides weathering potential data
calcPotentialWeathering()calcPotentialWeathering()
weathering potential data and corresonding weights as a list of two MAgPIE objects
Lavinia Baumstark
## Not run: calcOutput("PotentialWeathering") ## End(Not run)## Not run: calcOutput("PotentialWeathering") ## End(Not run)
Provides wind offshore potential data
calcPotentialWindOff()calcPotentialWindOff()
wind offshore potential data and corresonding weights as a list of two MAgPIE objects
Chen Chris Gong
## Not run: calcOutput("PotentialWindOff") ## End(Not run)## Not run: calcOutput("PotentialWindOff") ## End(Not run)
Provides wind onshore potential data
calcPotentialWindOn()calcPotentialWindOn()
wind onshore potential data and corresonding weights as a list of two MAgPIE objects
Lavinia Baumstark
## Not run: calcOutput("PotentialWindOn") ## End(Not run)## Not run: calcOutput("PotentialWindOn") ## End(Not run)
Calculate the expected near-term deployment of technologies based on projects that are currently either being built or in a planning stage. For some technologies multiple sources are available. Output object currently needs to contain years 2020, 2025 and 2030.
calcProjectPipelines(subtype)calcProjectPipelines(subtype)
subtype |
choose technology |
Discussions on sources and assumptions: https://github.com/pik-piam/mrremind/discussions
Pascal Weigmann
calcRatioPPP2MER returns conversion factors from the World Bank's WDI to convert monetary values (in constant units
with base year equal to the year argument) from PPP to MER. So for example from 'constant 2017 Int$PPP' to
'constant 2017 US$MER'.
calcRatioPPP2MER( year = as.numeric(mrdrivers::toolGetUnitDollar(returnOnlyBase = TRUE)) )calcRatioPPP2MER( year = as.numeric(mrdrivers::toolGetUnitDollar(returnOnlyBase = TRUE)) )
year |
An integer specifying the base year of conversion factor. Defaults to the base year of
|
Missing conversion factors are set to 1 and regional aggregation is weighed by GDP from WDI-MI-James.
magpie object with the requested output data either on country or on regional level depending on the choice of argument "aggregate" or a list of information if supplementary is set to TRUE.
## Not run: calcOutput("RatioPPP2MER") ## End(Not run)## Not run: calcOutput("RatioPPP2MER") ## End(Not run)
prepare secondary production data (e.g. electricity generation) to use in historical constraints in the model
calcSeProduction()calcSeProduction()
A magpie object.
Renato Rodrigues
calcSolar calculate Area, Capacity and Energy for photovoltaics (PV) and contentrated solar power (CSP)
calcSolar()calcSolar()
magpie object
Julian Oeser, modified by Renato Rodrigues
## Not run: a <- calcOutput(type = "Solar") ## End(Not run)## Not run: a <- calcOutput(type = "Solar") ## End(Not run)
provides capacity factor values
calcStorageFactor()calcStorageFactor()
magpie object of the capacity factor data
Lavinia Baumstark, Robert Pietzcker
## Not run: calcOutput("StorageFactor") ## End(Not run)## Not run: calcOutput("StorageFactor") ## End(Not run)
write TC damage parameters into input data they are country-specific and should not be aggregated to the regional level at all
calcTCdamage(subtype)calcTCdamage(subtype)
subtype |
"const", "tasK" |
MAgPIE object of damage parameters for country level tropical cyclone damage function
Franziska Piontek
To calculate the regional Theil-T index (= correction to welfare function for a lognormal income distribution) we do the following: (1) convert country-level Gini coefficients to Theil (2) calculate contribution to Theil-T index that includes both between-countries and within-country inequality (see e.g. https://en.wikipedia.org/wiki/Theil_index). The latter can then be aggregated with calcOutput().
calcTheil(scenario)calcTheil(scenario)
scenario |
A string (or vector of strings) designating the scenario(s) to be returned. Passed as is to the scenario argument of mrdrivers::calcGDP. |
The projections are SSP specific and use SSP GINI projections. For non-SSP scenarios, the projections are equal to the SSP2 projection.
The aggregation depends on the region mapping. It is implemented such that the regionmapping specified in getConfig()$regionmapping is used. The result of calcOutput('Theil', aggregate = FALSE), is NOT the country Theil-T, but the unweighted contribution from a given country to the regional value.
magpie objects of unweighted contribution to Theil, weights (= country shares of regional GDP)
Computes Trade variables based on latest IEA data available
calcTrade()calcTrade()
a magclass object
Calculate REMIND final energy variables from historical UBA values
calcUBA()calcUBA()
Falk Benke
Calculate REMIND emission variables from historical UNFCCC values
calcUNFCCC()calcUNFCCC()
A magpie object.
Falk Benke, Pascal Weigmann
This function calculates REMIND input data on water consumption coefficients per electricity technology, using as initial information the Macknick (2011) data per electricity technology. The source data provide most required information but some assumptions on missing data are also made.
calcWaterConsCoef()calcWaterConsCoef()
MAgPIE object on water consumption coefficients per electricity technology
Ioanna Mouratiadou
readMacknickIntensities,
calcWaterWithCoef
## Not run: calcOutput("WaterConsCoef") ## End(Not run)## Not run: calcOutput("WaterConsCoef") ## End(Not run)
This function calculates REMIND input data on water withdrawal coefficients per electricity technology, using as initial information the Macknick (2011) data per electricity technology. The source data provide most required information but some assumptions on missing data are also made.
calcWaterWithCoef()calcWaterWithCoef()
MAgPIE object on water withdrawal coefficients per elecricity technology
Ioanna Mouratiadou
readMacknickIntensities,
calcWaterConsCoef
## Not run: calcOutput("WaterWithCoeff") ## End(Not run)## Not run: calcOutput("WaterWithCoeff") ## End(Not run)
Convert AGEB data
convertAGEB(x)convertAGEB(x)
x |
a magpie object |
Falk Benke
convert Ariadne database data
convertAriadneDB(x)convertAriadneDB(x)
x |
A |
A magpie object.
Felix Schreyer
Converts BGR oil, gas, coal and uranium reserves data
convertBGR(x, subtype)convertBGR(x, subtype)
x |
MAgPIE object to be converted |
subtype |
data subtype. Either "oil", "gas", "coal" or "uranium". |
A MAgPIE object containing BGR (Federal Institute for Geosciences and Natural Resources) country reserves disaggregated data of oil, gas, coal and uranium.
Renato Rodrigues
## Not run: a <- convertBGR(x, subtype = "oil") ## End(Not run)## Not run: a <- convertBGR(x, subtype = "oil") ## End(Not run)
Provide Biochar price path data
convertBiocharDeploymentData(x)convertBiocharDeploymentData(x)
x |
a magpie object |
Tabea Dorndorf
Disaggregates and cleans BP data.
convertBP(x, subtype)convertBP(x, subtype)
x |
MAgPIE object to be converted |
subtype |
Either "Emission", "Capacity", "Generation", "Production", "Consumption", "Trade Oil", "Trade Gas", "Trade Coal" or "Price" |
A magpie object.
Aman Malik, Falk Benke
Convert ClimateTrace data
convertClimateTrace(x)convertClimateTrace(x)
x |
A |
A magpie object.
Pascal Weigmann
Convert Davies (2013) data on on shares of cooling types using mapping from GCAM regions to ISO country level.
convertDaviesCooling(x)convertDaviesCooling(x)
x |
MAgPIE object containing DaviesCooling data region resolution |
MAgPIE object of the Davies (2013) data disaggregated to country level
Lavinia Baumstark, Ioanna Mouratiadou
## Not run: a <- convertDaviesCooling(x)## Not run: a <- convertDaviesCooling(x)
Converts Dylan's Australian gas cost to magpie
convertDylanAusGasCost(x)convertDylanAusGasCost(x)
x |
MAgPIE object to be converted |
magpie object of the CEMO data
Felix Schreyer
convertEDGAR7Fgases
convertEDGAR7Fgases(x)convertEDGAR7Fgases(x)
x |
magpie object to be converted |
Gabriel Abrahao
Convert EDGE Buildings data to data on ISO country level.
convertEdgeBuildings(x, subtype, subset)convertEdgeBuildings(x, subtype, subset)
x |
MAgPIE object containing EDGE values at ISO country resolution |
subtype |
either FE or Floorspace |
subset |
A string (or vector of strings) designating the scenario(s) to be returned. |
EDGE data as MAgPIE object aggregated to country level
Antoine Levesque, Robin Hasse
Convert EDGEtransport
convertEDGETransport(x, subtype)convertEDGETransport(x, subtype)
x |
MAgPIE object containing EDGE-T values in 21 region resolution |
subtype |
REMIND/iterative EDGE-T input data subtypes |
REMIND/iterative EDGE-T input data as MAgPIE object disaggregated to ISO level
Johanna Hoppe
Convert Ember data
convertEmber(x)convertEmber(x)
x |
A |
A magpie object.
Pascal Weigmann
Convert European Energy Datasheets
convertEuropeanEnergyDatasheets(x, subtype)convertEuropeanEnergyDatasheets(x, subtype)
x |
European Energy Datasheets magpie object derived from readEuropeanEnergyDatasheets function |
subtype |
data subtype. Either "EU28" (data from June 20 including GBR) or "EU27" (latest data from August 23 without GBR) |
converted European Energy Datasheets magpie object
Renato Rodrigues and Atreya Shankar
European Energy Datasheets public database https://energy.ec.europa.eu/data-and-analysis/eu-energy-statistical-pocketbook-and-country-datasheets_en
## Not run: test <- readSource("EuropeanEnergyDatasheets", subtype = "EU27", convert = TRUE) ## End(Not run)## Not run: test <- readSource("EuropeanEnergyDatasheets", subtype = "EU27", convert = TRUE) ## End(Not run)
Converts EU Effort Sharing targets and historical emissions
convertEurostat_EffortSharing(x, subtype)convertEurostat_EffortSharing(x, subtype)
x |
MAgPIE object to be converted |
subtype |
data subtype. Either "target" or "emissions" |
A MAgPIE object containing the EU Effort Sharing targets (%) or Effort Sharing historical emissions (MtCO2)
Renato Rodrigues
## Not run: a <- convertEurostat_EffortSharing(x,subtype="target")## Not run: a <- convertEurostat_EffortSharing(x,subtype="target")
Converts data from expert guess
convertExpertGuess(x, subtype)convertExpertGuess(x, subtype)
x |
unconverted magpie object from read-script |
subtype |
Type of data that should be read. One of
|
Falk Benke
Converts oil, gas and coal data from the Global Energy Assessment 2012 to country-level aggregation
convertGEA2012(x, subtype)convertGEA2012(x, subtype)
x |
MAgPIE object to be disaggregated |
subtype |
Type of fossil fuel (oil, coal or gas) |
MAgPIE object containing country-level disaggregation of GEA 2012 data
Stephen Bi
## Not run: a <- readSource("GEA2012") ## End(Not run)## Not run: a <- readSource("GEA2012") ## End(Not run)
Convert GGDC 10-Sector Database - https://www.rug.nl/ggdc/structuralchange/previous-sector-database/10-sector-2014
convertGGDC10(x)convertGGDC10(x)
x |
MAgPIE object to be converted |
A MAgPIE object containing GGDC disaggregated data
Renato Rodrigues
## Not run: a <- convertGGDC10(x) ## End(Not run)## Not run: a <- convertGGDC10(x) ## End(Not run)
Convert geological storage potential
convertGidden2025_geological_storage_potential(x)convertGidden2025_geological_storage_potential(x)
x |
MAgPIE object to be converted |
A magpie object with geological storage potential
David Klein
Convert Global CCS Institute Project Database
convertGlobalCCSinstitute(x, subtype = "08-09-2017")convertGlobalCCSinstitute(x, subtype = "08-09-2017")
x |
A |
subtype |
Project Database version to read, one of
- |
A magpie object.
Convert Global Energy Monitor data
convertGlobalEnergyMonitor(x)convertGlobalEnergyMonitor(x)
x |
A magclass object returned from readGlobalEnergyMonitor(). |
Rahel Mandaroux, Falk Benke
Convert HRE data
convertHRE(x)convertHRE(x)
x |
A magpie object.
Pascal Weigmann
Data on currently operating and under-construction nuclear power plants, reactors planned and proposed, electricity generation from nuclear
convertIAEA(x)convertIAEA(x)
x |
MAgPIE object to be converted |
Christoph Bertram
convert IAEA Power Reactor Information System
convertIAEA_PRIS(x)convertIAEA_PRIS(x)
x |
a magclass object returned from |
Pascal Weigmann
Convert IEA CCUS data
convertIEA_CCUS(x)convertIEA_CCUS(x)
x |
A magclass object returned from readIEA_CCUS(). |
A magclass object.
Anne Merfort, Falk Benke
Convert IEA ETP projections
convertIEA_ETP(x, subtype)convertIEA_ETP(x, subtype)
x |
IEA ETP projection magpie object derived from readIEA_ETP function |
subtype |
data subtype. Either "industry", "buildings", "summary", or "transport" |
Falk Benke, Robin Hasse
Convert IEA EV Outlook
convertIEA_EVOutlook(x)convertIEA_EVOutlook(x)
x |
a magclass object returned from |
Falk Benke
convert IEA Hydro Special Market Report
convertIEA_HSMR(x)convertIEA_HSMR(x)
x |
a magclass object returned from |
Pascal Weigmann
maps to iso countries
convertIEA_PVPS(x)convertIEA_PVPS(x)
x |
MAgPIE object to be converted |
Magpie object with IEA PVPS investment cost per country
Felix Schreyer
Reads the distributed solar pv capacity from IEA Renewables report (2019).
convertIEA_REN(x)convertIEA_REN(x)
x |
input magpie object |
Capacity in GW. Distributed solar, defined in the IEA Renewables (2019), includes rooftop residential (0-10 kW, grid-connected), rooftop and ground-mounted commercial and industrial (10-1000kW, grid-connected), and off-grid (8W - 100 kW)
magpie object with country-wise distributed solar pv capacity
Aman Malik
Converts IEA World Energy Outlook data
convertIEA_WEO(x, subtype)convertIEA_WEO(x, subtype)
x |
MAgPIE object to be converted |
subtype |
data subtype. Either "Capacity" or "Invest_Costs" |
Renato Rodrigues and Aman Malik
Convert IEA World Energy Outlook Data from 2023
convertIEA_WorldEnergyOutlook(x)convertIEA_WorldEnergyOutlook(x)
x |
magclass object to be converted |
Falk Benke
Convert IIASA subsidy and taxes data on ISO country level (removes countries not part of 249 oficial ISO countries and fills missing with zeros).
convertIIASA_subs_taxes(x, subtype)convertIIASA_subs_taxes(x, subtype)
x |
MAgPIE object containing IIASA subsidies and taxes data in country resolution |
subtype |
Type of country level data as compiled by IIASA that should be read in. Available types are:
|
IIASA_subs_taxes data as MAgPIE object aggregated to country level
## Not run: a <- convertIIASA_subs_taxes(x) ## End(Not run)## Not run: a <- convertIIASA_subs_taxes(x) ## End(Not run)
convert IIASA Land Use Emissions
convertIIASALanduse(x, subtype)convertIIASALanduse(x, subtype)
x |
a magpie object |
subtype |
one of "historical", "forecast2030", "forecast2035" |
Falk Benke
Disaggregates IMAGE 2025 F-gas emissions data, using EDGAR HFC emissions in 2005 as weights
convertIMAGE2025(x)convertIMAGE2025(x)
x |
magpie object |
magpie object
Gabriel Abrahao
Converts IRENA Regional data
convertIRENA(x, subtype)convertIRENA(x, subtype)
x |
MAgPIE object to be converted |
subtype |
data subtype. Either "Capacity" or "Generation" |
A MAgPIE object containing IRENA country disaggregated data with historical electricity renewable capacities (MW) or generation levels (GWh)
Renato Rodrigues, Pascal Weigmann
## Not run: a <- convertIRENA(x, subtype = "Capacity") ## End(Not run)## Not run: a <- convertIRENA(x, subtype = "Capacity") ## End(Not run)
convert KLW damage fills in countries for which no damage parameters are provided, setting parameters to zero
convertKLWdamage(x)convertKLWdamage(x)
x |
is MAgPIE object containing the damage parameters from KLW |
MAgPIE object containing values for all 249 ISO countries
Franziska Piontek
Convert Exclusive Economic Zone (EEZ) size data
convertMarineRegionsOrg(x)convertMarineRegionsOrg(x)
x |
MAgPIE object to be converted |
Tabea Dorndorf
Converts conditional and unconditional capacity and production targets into total capacity (GW) in target year. For countries and years without targets, 2020 values from IRENA and BP are used to fill the gaps.
convertNewClimate(x, subtype, subset)convertNewClimate(x, subtype, subset)
x |
a magclass object to be converted |
subtype |
Capacity_YYYY_cond or Capacity_YYYY_uncond for Capacity Targets, Emissions_YYYY_cond or Emissions_YYYY_uncond for Emissions targets, with YYYY NPI version year |
subset |
String, designating the GDP scenarios to use. Only used for emission targets. |
Emissions targets on absolute level for total GHG emissions without bunkers and land-use change emissions are calculated from country-specific target formulation and land-use change emissions data
Rahel Mandaroux, Léa Hayez, Falk Benke
Convert NREL data on ISO country level.
convertNREL(x)convertNREL(x)
x |
MAgPIE object containing NREL data country-region resolution |
NRELWirsenius data as MAgPIE object aggregated to country level
Lavinia Baumstark
## Not run: a <- convertNREL(x, subtype = "onshore") ## End(Not run)## Not run: a <- convertNREL(x, subtype = "onshore") ## End(Not run)
Converts Openmod capacities data
convertOpenmod(x)convertOpenmod(x)
x |
MAgPIE object to be converted |
A MAgPIE object containing openmod EU country disaggregated data with 2010 and 2015 electricity capacities (GW)
Renato Rodrigues
## Not run: a <- convertOpenmod(x) ## End(Not run)## Not run: a <- convertOpenmod(x) ## End(Not run)
Disaggregates PBL emission factors from the 26 IMAGE regions to ISO3 country level. As these are emission factors, weights are constant, assuming all countries in a region emit the same amount of each gas per unit of activity.
convertPBL_EFsBaseline(x)convertPBL_EFsBaseline(x)
x |
a magpie object |
A magpie object.
Converts REMIND 11 Regi data
convertREMIND_11Regi(x, subtype)convertREMIND_11Regi(x, subtype)
x |
MAgPIE object to be converted |
subtype |
Name of the source, e.g. "fossilExtractionCoeff", "uraniumExtractionCoeff" |
unknown
This code aggregates and homogenises different types of renewable energy targets into total installed capacity targets (in GW).
convertREN21(x, subtype)convertREN21(x, subtype)
x |
MAgPIE object to be converted |
subtype |
Only "Capacity" as of now |
Policy database accessible in "inputdata/sources/REN21/README"
Magpie object with Total Installed Capacity targets. The target years differ depending upon the database.
Aman Malik
Converts data on enhanced weathering
convertStrefler(x, subtype)convertStrefler(x, subtype)
x |
unconverted magpie object from read-script |
subtype |
data subtype. Either "weathering_graderegi", or "weathering_costs" |
magpie object with a completed dataset
Convert TCdamage fills in countries not affected by tropical cyclones (TC), setting parameters to zero
convertTCdamageKrichene(x)convertTCdamageKrichene(x)
x |
is MAgPIE object containing the damage parameters for the TC-prone countries |
MAgPIE object containing values for all 249 ISO countries
Franziska Piontek
Convert UBA data
convertUBA(x)convertUBA(x)
x |
a magpie object |
Falk Benke
Convert UNFCCC data
convertUNFCCC(x)convertUNFCCC(x)
x |
A |
A magpie object.
Falk Benke
Converts conditional and unconditional capacity and production targets into total capacity (GW) in target year. For countries and years without targets, 2015 values from IRENA and BP are used to fill the gaps.
convertUNFCCC_NDC(x, subtype, subset = NULL)convertUNFCCC_NDC(x, subtype, subset = NULL)
x |
a magclass object to be converted |
subtype |
Capacity_YYYY_cond or Capacity_YYYY_uncond for Capacity Targets, Emissions_YYYY_cond or Emissions_YYYY_uncond for Emissions targets, with YYYY NDC version year |
subset |
String, designating the GDP scenarios to use. Only used for emission targets. |
NDC Emissions targets on absolute level for total GHG emissions without bunkers and land-use change emissions are calculated from country-specific target formulation and land-use change emissions data
Aman Malik, Christoph Bertram, Oliver Richters, Sophie Fuchs, Rahel Mandaroux, Falk Benke
Convert WGBU data on ISO country level.
convertWGBU(x)convertWGBU(x)
x |
MAgPIE object containing WGBU data country-region resolution |
WGBU data as MAgPIE object aggregated to country level
Lavinia Baumstark
## Not run: a <- convertWGBU(x) ## End(Not run)## Not run: a <- convertWGBU(x) ## End(Not run)
Function that produces the complete regional data set required for the REMIND model.
fullREMIND()fullREMIND()
Lavinia Baumstark
readSource, getCalculations, calcOutput
## Not run: fullREMIND() ## End(Not run)## Not run: fullREMIND() ## End(Not run)
assemble near-term thresholds from project pipelines and potentially other data sources and export them to a file
fullTHRESHOLDS(type = "config")fullTHRESHOLDS(type = "config")
type |
choose either "config" to export thresholds as used in the validationConfig or "full" to export all pipeline data |
Pascal Weigmann
Function that generates the historical regional dataset against which the REMIND model results can be compared.
fullVALIDATIONREMIND(rev = 0)fullVALIDATIONREMIND(rev = 0)
rev |
Unused parameter, but required by |
David Klein, Falk Benke
readSource, getCalculations, calcOutput
## Not run: fullVALIDATIONREMIND() ## End(Not run)## Not run: fullVALIDATIONREMIND() ## End(Not run)
Read AGEB
readAGEB(subtype = "balances")readAGEB(subtype = "balances")
subtype |
data subtype. Either "balances" ("Auswertungstabellen zur Energiebilanz Deutschland") or "electricity" ("Bruttostromerzeugung in Deutschland nach Energietraegern") |
Falk Benke
Read GWP (or other metrics) from the AR6 WGIII Table SM7 per GHG species
readAR6GWP(subtype = "GWP100")readAR6GWP(subtype = "GWP100")
subtype |
data subtype. Currently just "GWP100", but other metrics are also available in the input data |
A data.frame with two columns, "Gas", with the common name of the GHG species, and "GWP", with the selected GWP
Gabriel Abrahao
This reads in FORECAST industry production data for Germany used in the Ariadne scenarios
readAriadneDB()readAriadneDB()
A magpie object.
Felix Schreyer
Read-in BGR csv files as magclass object
readBGR(subtype)readBGR(subtype)
subtype |
data subtype. Either "oil", "gas", "coal" or "uranium". |
magpie object of the BGR (Federal Institute for Geosciences and Natural Resources) data of reserves of oil, gas, coal and uranium per country.
Renato Rodrigues
## Not run: a <- readSource(type = "BGR", subtype = "oil") ## End(Not run)## Not run: a <- readSource(type = "BGR", subtype = "oil") ## End(Not run)
Source: Assumption for REMIND based on data collected in Dorndorf et al (submitted)
readBiocharDeploymentData()readBiocharDeploymentData()
Tabea Dorndorf
BP Capacity and Generation Data
readBP(subtype)readBP(subtype)
subtype |
Either "Emission", Capacity", "Generation", "Production", "Consumption", "Trade Oil", "Trade Gas", "Trade Coal" or "Price" |
A magpie object.
Aman Malik, Falk Benke
Read Employment factors and cumulative jobs for RE techs (for India)
readCEEW(subtype)readCEEW(subtype)
subtype |
data subtype. Either "Employment factors" or "Employment" |
Reports published by CEEW et al. See README.txt in the source folder for more information.
Aman Malik
## Not run: a <- readSource("CEEW",convert=F,subtype="Employment") ## End(Not run)## Not run: a <- readSource("CEEW",convert=F,subtype="Employment") ## End(Not run)
Read in Climate Trace csv files as magclass object for CO2, CH4 and N2O emissions by subsector and country.
readClimateTrace()readClimateTrace()
magpie object of the ClimateTrace data with historical emissions
Pascal Weigmann
## Not run: a <- readSource(type = "ClimateTrace") ## End(Not run)## Not run: a <- readSource(type = "ClimateTrace") ## End(Not run)
Read in Davies (2013) data on shares of cooling types per electricity technology and GCAM region
readDaviesCooling(subtype)readDaviesCooling(subtype)
subtype |
Type of Davies data that should be read. Available types are:
|
MAgPIE object of the Davies (2013) data
Lavinia Baumstark, Ioanna Mouratiadou
## Not run: a <- readSource(type = "DaviesCooling") ## End(Not run)## Not run: a <- readSource(type = "DaviesCooling") ## End(Not run)
read-in power Australian gas extraction cost curve based on Dylan's data Australian contact: Dylan McConnell, dylan.mcconnell(at)unimelb.edu.au
readDylanAusGasCost()readDylanAusGasCost()
magpie object of the cemo database data
Felix Schreyer
Read EDGAR7 emissions data for F-gases per species, in kt of each gas
readEDGAR7Fgases()readEDGAR7Fgases()
A magpie object with F-gases emissions per gas species and per country
Gabriel Abrahao
Load an EDGE Buildings file as magclass object.
readEdgeBuildings(subtype = c("FE", "Floorspace"), subset)readEdgeBuildings(subtype = c("FE", "Floorspace"), subset)
subtype |
One of the possible subtypes, see default argument. |
subset |
A string (or vector of strings) designating the scenario(s) to be returned (needed in 'convertEdgeBuildings'). |
magclass object
Antoine Levesque, Robin Hasse
Run EDGE-Transport Standalone in all used scenario combinations to supply input data to REMIND and the iterative EDGE-T script
readEDGETransport(subtype)readEDGETransport(subtype)
subtype |
REMIND/iterative EDGE-T input data subtypes |
magpie object of EDGEtransport iterative inputs
Johanna Hoppe, Alex K. Hagen
## Not run: a <- readSource(type = "EDGETransport") ## End(Not run)## Not run: a <- readSource(type = "EDGETransport") ## End(Not run)
Read Ember Yearly Electricity Data
readEmber()readEmber()
A magpie object.
Pascal Weigmann
https://ember-climate.org/data-catalogue/yearly-electricity-data/
Read European Energy Datasheets .xlsx file as magpie object.
readEuropeanEnergyDatasheets(subtype)readEuropeanEnergyDatasheets(subtype)
subtype |
data subtype. Either "EU28" (data from June 20 including GBR) or "EU27" (latest data from August 23 without GBR) |
magpie object of European Energy Datasheets
Renato Rodrigues, Atreya Shankar, Falk Benke
European Energy Datasheets public database https://energy.ec.europa.eu/data-and-analysis/eu-energy-statistical-pocketbook-and-country-datasheets_en
## Not run: test <- readSource("EuropeanEnergyDatasheet", subtype = "EU27", convert = FALSE) ## End(Not run)## Not run: test <- readSource("EuropeanEnergyDatasheet", subtype = "EU27", convert = FALSE) ## End(Not run)
Read-in EU Effort Sharing targets and historical emissions csv files as magclass object
readEurostat_EffortSharing(subtype)readEurostat_EffortSharing(subtype)
subtype |
data subtype. Either "target" or "emissions" |
magpie object of the EU Effort Sharing targets (%) or Effort Sharing historical historical emissions (MtCO2)
Renato Rodrigues
## Not run: a <- readSource(type = "Eurostat_EffortSharing", subtype = "target") ## End(Not run)## Not run: a <- readSource(type = "Eurostat_EffortSharing", subtype = "target") ## End(Not run)
Read-in data that are based on expert guess
readExpertGuess(subtype)readExpertGuess(subtype)
subtype |
Type of data that should be read. One of
|
magpie object of the data
Lavinia Baumstark, Falk Benke
## Not run: a <- readSource(type = "ExpertGuess", subtype = "ies") ## End(Not run)## Not run: a <- readSource(type = "ExpertGuess", subtype = "ies") ## End(Not run)
There's no associated convert function, as the disaggregation takes a combination of subtypes, and it is easier to carry out most calculations at the GAINS regional level first and then disaggregate the results
readGAINS2025final(subtype)readGAINS2025final(subtype)
subtype |
"emifacs", "emissions", "activities" |
Activity levels, emissions or emission factors at the level of 25 GAINS regions, 35 GAINS sectors and 7 species: magclass object with dimensions region, year, and ssp.scenario.sectorGAINS.species
Gabriel Abrahao, Laurin Koehler-Schindler
Historical data of operating, under-construction, planned and announced Coal Plants by country (in MW) from the Global Energy Monitor's Global Coal Plant Tracker, and extrapolations for 2025 capacity scenarios
readGCPT(subtype)readGCPT(subtype)
subtype |
Options are status, historical, future, lifespans, comp_rates and emissions |
Stephen Bi
Read in datafiles comprising fossil fuel data from the Global Energy Assessment 2012
readGEA2012(subtype)readGEA2012(subtype)
subtype |
Type of fossil fuel and type of data (oil, coal, or gas + costs, qtys, or dec) |
MAgPIE object of the GEA data
Stephen Bi
## Not run: a <- readSource("GEA2012", "coal") ## End(Not run)## Not run: a <- readSource("GEA2012", "coal") ## End(Not run)
Read GGDC 10-Sector Database - https://www.rug.nl/ggdc/structuralchange/previous-sector-database/10-sector-2014
readGGDC10()readGGDC10()
Renato Rodrigues
## Not run: a <- readSource("GGDC10",convert=F) ## End(Not run)## Not run: a <- readSource("GGDC10",convert=F) ## End(Not run)
Read geological storage potential
readGidden2025_geological_storage_potential()readGidden2025_geological_storage_potential()
A magpie object with geological storage potential. Off = offshore; On = onshore; potTech = technical potential without any exclusion layers applied; potLim = applying all exclusion layers described in Table S1 (e.g. protected areas, population centers, max and min depth, etc.)
David Klein
Read Gini coefficients for SSP scenarios from Rao et al., Futures, 2018. Data has been provided by the authors, but will be made publicly available as well. This contains data for 184 countries and from 2011 onwards.
readGini() convertGini(x)readGini() convertGini(x)
x |
MAgPIE object returned from readGini |
Copied from the documentation provided by the authors: This sheet contains the original Gini projections for 43 countries from the underlying empirical model (See reference to RSP 2016 in the main paper) and the extrapolations to all countries using the methodology described in the article. The country codes are the World Bank codes.
magpie object of the Gini data
Bjoern Soergel
## Not run: a <- readSource(type="Gini") ## End(Not run)## Not run: a <- readSource(type="Gini") ## End(Not run)
Read Global CCS Institute Project Database
readGlobalCCSinstitute(subtype = "08-09-2017")readGlobalCCSinstitute(subtype = "08-09-2017")
subtype |
Project Database version to read, one of
- |
a magpie object
read GEM data for all available technologies and relevant statuses
readGlobalEnergyMonitor()readGlobalEnergyMonitor()
Rahel Mandaroux, Falk Benke, Pascal Weigmann
Read Heat Roadmap Europe data
readHRE()readHRE()
A magpie object.
Pascal Weigmann
https://heatroadmap.eu/roadmaps/
Data on currently operating and under-construction nuclear power plants, reactors planned and proposed, electricity generation from nuclear
readIAEA()readIAEA()
Christoph Bertram, Pascal Weigmann
read Nuclear capacities and near-term outlook from data scraped from https://pris.iaea.org/PRIS/CountryStatistics/CountryStatisticsLandingPage.aspx
readIAEA_PRIS()readIAEA_PRIS()
Pascal Weigmann
Reads in capacities from projects in IEA CCUS database
readIEA_CCUS(subtype)readIEA_CCUS(subtype)
subtype |
either |
Anne Merfort, Falk Benke
Read IEA ETP projections
readIEA_ETP(subtype)readIEA_ETP(subtype)
subtype |
data subtype. Either "industry", "buildings", "summary", or "transport" |
Falk Benke
Read IEA EV Outlook
readIEA_EVOutlook()readIEA_EVOutlook()
Falk Benke
read Hydro capacities and near-term outlook from data scraped from https://www.iea.org/data-and-statistics/data-tools/hydropower-data-explorer
readIEA_HSMR()readIEA_HSMR()
Pascal Weigmann
reads excel sheet with PV investment cost data
readIEA_PVPS()readIEA_PVPS()
magpie object with PV investment cost data
Felix Schreyer
Reads the distributed solar pv capacity from IEA Renewables report (2019).
readIEA_REN()readIEA_REN()
Capacity in GW. Distributed solar, defined in the IEA Renewables (2019), includes rooftop residential (0-10 kW, grid-connected), tooftop and ground-mounted commercial and industrial (10-1000kW, grid-connected), and off-grid (8W - 100 kW)
Aman Malik
Read 2015-2024 investments statistical data in energy sector (electricity, oil, gas) IEA World Energy Investment Outlook (2024) (https://www.iea.org/data-and-statistics/data-product/world-energy-investment-2024-datafile)
readIEA_WEIO()readIEA_WEIO()
Nicolas Bauer, Falk Benke
Read-in IEA WEO 2016 data for investment costs of different technologies, and WEO 2017 data for historical electricity capacities (GW)
readIEA_WEO(subtype)readIEA_WEO(subtype)
subtype |
data subtype. Either "Capacity" or "Invest_Costs" |
Renato Rodrigues, Aman Malik, and Jerome Hilaire
Read in IEA World Energy Outlook Data from 2023
readIEA_WorldEnergyOutlook()readIEA_WorldEnergyOutlook()
Falk Benke
Read-in country level data on final energy taxes and subsidies as provided from IIASA from .csv file as magclass object
readIIASA_subs_taxes(subtype)readIIASA_subs_taxes(subtype)
subtype |
Type of country level data as compiled by IIASA that should be read in. Available types are:
|
magpie object of the IIASA_subs_taxes data
Christoph Bertram
## Not run: a <- readSource(type = "IIASA_subs_taxes", "tax_rate") ## End(Not run)## Not run: a <- readSource(type = "IIASA_subs_taxes", "tax_rate") ## End(Not run)
read IIASA Land Use Emissions
readIIASALanduse(subtype)readIIASALanduse(subtype)
subtype |
one of "historical", "forecast2030", "forecast2035" |
Falk Benke
Read F-gases emissions data from several IMAGE scenarios, obtained in 2025
readIMAGE2025()readIMAGE2025()
magpie object with several F-gas emission variables for several IMAGE scenarios
Gabriel Abrahao
Read-in an IRENA xlsx file as magclass object
readIRENA(subtype)readIRENA(subtype)
subtype |
data subtype. Either "Capacity" or "Generation" |
magpie object of the IRENA data with historical electricity renewable capacities (MW) or generation levels (GWh)
Renato Rodrigues, Pascal Weigmann
## Not run: a <- readSource(type = "IRENA", subtype = "Capacity") ## End(Not run)## Not run: a <- readSource(type = "IRENA", subtype = "Capacity") ## End(Not run)
Reads country-specific damage coefficients for the damage function presented in Kotz et al. (2024). Data has been provided by the authors. This contains data for all countries and for 1000 boostrapping realizations per country, capturing uncertainty from climate and empirical modeling. Subtypes are the temperature and temperature^2 coefficients and the maximum temperature per country for which the function is defined.
readKLWdamage(subtype)readKLWdamage(subtype)
subtype |
data subtype. Either "beta1", "beta2" or "maxGMT" |
KLW damage coefficients
Franziska Piontek
Read in Macknick (2011) data on water consumption and withdrawal coefficients per electricity technology
readMacknickIntensities(subtype)readMacknickIntensities(subtype)
subtype |
Type of Macknick data that should be read. Available types are:
|
MAgPIE object of the Macknick (2011) data
Ioanna Mouratiadou
## Not run: a <- readSource(type = "MacknickIntensities", convert = FALSE) ## End(Not run)## Not run: a <- readSource(type = "MacknickIntensities", convert = FALSE) ## End(Not run)
Source: Flanders Marine Institute (2023). Maritime Boundaries Geodatabase: Maritime Boundaries and Exclusive Economic' Zones (200NM), version 12. Available online at https://www.marineregions.org/. https://doi.org/10.14284/632
readMarineRegionsOrg()readMarineRegionsOrg()
Tabea Dorndorf
Reads excel sheet with NPi (National Policies Implemented) data on different policy targets (capacity, production, emissions) with different variations. NPI targets only include targets that are based on implemented policy instruments.
readNewClimate(subtype, subset)readNewClimate(subtype, subset)
subtype |
Capacity_YYYY_cond or Capacity_YYYY_uncond for Capacity Targets, Emissions_YYYY_cond or Emissions_YYYY_uncond for Emissions targets, RenShareTargets for renewable energy share targets, with YYYY NDC version year, determines the database version to be read in |
subset |
A string (or vector of strings) designating the scenario(s) to be returned (only used in convert). |
Rahel Mandaroux, Léa Hayez, Falk Benke
Read-in NREL xlsx file as magclass object
readNREL(subtype)readNREL(subtype)
subtype |
type either "onshore" or "offshore" |
magpie object of NREL
Lavinia Baumstark
## Not run: a <- readSource(type = "NREL", subtype = "onshore") ## End(Not run)## Not run: a <- readSource(type = "NREL", subtype = "onshore") ## End(Not run)
Read-in risk premium
readOECD() convertOECD(x)readOECD() convertOECD(x)
x |
MAgPIE object returned from readOECD |
The read-in data, usually a magpie object. If supplementary is TRUE a list including the data and metadata is returned instead. The temporal and data dimensionality should match the source data. The spatial dimension should either match the source data or, if the convert argument is set to TRUE, should be on ISO code country level.
## Not run: readSource("OECD") ## End(Not run)## Not run: readSource("OECD") ## End(Not run)
Read-in an modified openmod capacities data file as magclass object
readOpenmod()readOpenmod()
magpie object of the LIMES team updated Openmod data on capacities (GW)
## Not run: a <- readSource(type = "Openmod") ## End(Not run)## Not run: a <- readSource(type = "Openmod") ## End(Not run)
Read emission factors from a PBL IMAGE baseline (no mitigation) scenario for a specific sector and gas species (CH4 or N2O)
readPBL_EFsBaseline(subtype)readPBL_EFsBaseline(subtype)
subtype |
gas and subsector combination string. One of: c("CH4_entf", "CH4_gasp", "CH4_landf", "CH4_manu", "CH4_oilp", "CH4_rice", "CH4_sewa", "N2O_adip", "N2O_fert", "N2O_manu", "N2O_nitr", "N2O_sewa", "N2O tran") |
A magpie object.
Read-in PWT data (version 8.0) as magclass object
readPWT() convertPWT(x)readPWT() convertPWT(x)
x |
MAgPIE object returned by readPWT |
The read-in data, usually a magpie object. If supplementary is TRUE a list including the data and metadata is returned instead. The temporal and data dimensionality should match the source data. The spatial dimension should either match the source data or, if the convert argument is set to TRUE, should be on ISO code country level.
## Not run: readSource("PWT") ## End(Not run)## Not run: readSource("PWT") ## End(Not run)
Read REMIND 11 Regi data
readREMIND_11Regi(subtype)readREMIND_11Regi(subtype)
subtype |
Name of the source, e.g. "fossilExtractionCoeff", "uraniumExtractionCoeff" |
unknown
Reads excel sheet with data on proposed policies, on Renewable energy capacity targets (which are broken down into Total Installed Capacity (TIC-Absolute), Additional Installed Capacity (AC-Absolute), and Production Absolute targets) or regional technology costs
readREN21(subtype)readREN21(subtype)
subtype |
Capacity Generation Emissions Share |
Country name is ISO coded. Capacity/Additional Capacity targets are in GW. Generation/Production targets are in GWh.
magpie object with Total Installed Capacity targets in GW for different target years
Aman Malik, Lavinia Baumstark
Get data on enhanced weathering
readStrefler(subtype)readStrefler(subtype)
subtype |
type of data, one of "weathering_graderegi", "weathering_costs" |
magpie object of region dependent data
## Not run: a <- readSource(type="Strefler", subtype="weathering_graderegi") ## End(Not run)## Not run: a <- readSource(type="Strefler", subtype="weathering_graderegi") ## End(Not run)
Reads country-specific damage coefficients for tropical cyclones from Krichene et al. (in prep.). Data has been provided by the authors, but will be made publicly available as well. This contains data for 41 countries (those exposed to tropical cyclones), and two coefficients (constant and linear temperature)
readTCdamageKrichene(subtype)readTCdamageKrichene(subtype)
subtype |
data subtype. Either "const" or "tasK" |
TC damage coefficients
Franziska Piontek
Reads excel sheet with NDC (Nationally Determined Contributions) data on different policy targets (capacity, production, emissions) with different variations.
readUNFCCC_NDC(subtype, subset)readUNFCCC_NDC(subtype, subset)
subtype |
Capacity_YYYY_cond or Capacity_YYYY_uncond for Capacity Targets, Emissions_YYYY_cond or Emissions_YYYY_uncond for Emissions targets, with YYYY NDC version year, determines the database version to be read in |
subset |
A string (or vector of strings) designating the scenario(s) to be returned (only used in convert). |
Aman Malik, Christoph Bertram, Oliver Richters, Sophie Fuchs, Rahel Mandaroux, Falk Benke
Read-in an WGBU xlsx file as magclass object
readWGBU()readWGBU()
magpie object of WGBU
Lavinia Baumstark
## Not run: a <- readSource(type = "WGBU") ## End(Not run)## Not run: a <- readSource(type = "WGBU") ## End(Not run)
Wrapper around magclass::add_dimension supporting more than one value for the new dimension. For each value, the input magclass object is copied, extended by the new dimension and appended to the output.
toolAddDimensions(x, dimVals, dimName, dimCode)toolAddDimensions(x, dimVals, dimName, dimCode)
x |
a magclass object |
dimVals |
list of values for the new dimension to be added |
dimName |
name of the new dimension |
dimCode |
dimension number of the new dimension (e.g. 3.1) |
the extended magclass object
Aggregate regional data, but if regional aggregations exist, discard the automatically aggregated values and replace them with source data.
toolAggregateCustomRegs( x, agg, rel, to = NULL, removeAllAgg = TRUE, regs = "GLO" )toolAggregateCustomRegs( x, agg, rel, to = NULL, removeAllAgg = TRUE, regs = "GLO" )
x |
a magclass object in country resolution |
agg |
magclass object supplying explicit regional aggregates |
rel |
aggregation mapping for |
to |
aggregation target for |
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 |
magclass object
Falk Benke, Pascal Weigmann
Aggregate values to n-year averages to suppress volatility
toolAggregateTimeSteps(x, nYears = 5)toolAggregateTimeSteps(x, nYears = 5)
x |
a magclass object |
nYears |
time steps to be used for averaging, defaults to 5 |
magclass object with averages
Robin Hasse
toolBiomassSupplyAggregate The function aggregates biomass supply curves to regionmapping different from H12. It only works if all regions are subregions of H12 regions. The offset parameter (a) is taken from the H12 region. The slope parameter (b) is multiplied by a weight. The weight is the inverse of the share of agricultural area of the subregion in the H12 region.
toolBiomassSupplyAggregate( x, rel = NULL, weight = calcOutput("FAOLand", aggregate = FALSE)[, , "6610", pmatch = TRUE][, "y2010", ] )toolBiomassSupplyAggregate( x, rel = NULL, weight = calcOutput("FAOLand", aggregate = FALSE)[, , "6610", pmatch = TRUE][, "y2010", ] )
x |
magclass object that should be aggregated |
rel |
relation matrix containing a region mapping. |
weight |
aggregation weight |
return: returns region aggregated biomass supply curve data
Felix Schreyer
Calculate energy projections on country-level based on EDGE models outputs per country. These energy projections are used in the input data preparation for aggregating country-specific data to REMIND regions. They are a country-level proxy of the final energy demand trajectories on the level of REMIND regions provided by the EDGE models.
toolCalcEnergyProj(subtype, subset, scenario, years = seq(2020, 2050, 5))toolCalcEnergyProj(subtype, subset, scenario, years = seq(2020, 2050, 5))
subtype |
"FE" (Total final energy consumption), "SE|Electricity" (SE electricity generation) |
subset |
GDP scenario to use |
scenario |
set of GDP scenarios to use for calcFeDemandBuildings and calcFeDemandIndustry calculation (trigger standard cache in this function) |
years |
target years for projection |
Felix Schreyer
Calculate absolute emission targets depending on country-specific emissions target formulations. So far, the function mainly used to calculate NDC emissions targets.
toolCalcGhgTarget(x, subtype, subset)toolCalcGhgTarget(x, subtype, subset)
x |
a magclass object with targets read in from NDC or NPI database |
subtype |
Emissions_YYYY_cond or Emissions_YYYY_uncond |
subset |
String, designating the GDP scenarios to use |
Rahel Mandaroux, Felix Schreyer, Falk Benke
convertUNFCCC_NDC(), convertNewClimate()
Estimates the function that represents the sum of cubic function inverses (sum in the x-axis)
toolCubicFunctionAggregate( x, rel = NULL, xLowerBound = 0, xUpperBound = 100, returnMagpie = TRUE, returnCoeff = TRUE, returnChart = FALSE, returnSample = FALSE, numberOfSamples = 1000, unirootLowerBound = -10, unirootUpperBound = 1e+100, colourPallete = FALSE, label = list(x = "x", y = "y", legend = "legend"), steepCurve = list() )toolCubicFunctionAggregate( x, rel = NULL, xLowerBound = 0, xUpperBound = 100, returnMagpie = TRUE, returnCoeff = TRUE, returnChart = FALSE, returnSample = FALSE, numberOfSamples = 1000, unirootLowerBound = -10, unirootUpperBound = 1e+100, colourPallete = FALSE, label = list(x = "x", y = "y", legend = "legend"), steepCurve = list() )
x |
magclass object that should be aggregated or data frame with coefficients as columns. |
rel |
relation matrix containing a region mapping. A mapping object should contain 2 columns in which each element of x is mapped to the category it should belong to after (dis-)aggregation |
xLowerBound |
numeric. Lower bound for x sampling (default=0). |
xUpperBound |
numeric. Upper bound for x sampling (default=100). |
returnMagpie |
boolean. if true, the function will return a single data table with all the countries in MagPie format. returnChart and returnSample are set to FALSE automatically if this option is active (default=TRUE). |
returnCoeff |
boolean. Return estimated coefficients (default=TRUE). |
returnChart |
boolean. Return chart (default=FALSE). |
returnSample |
boolean. Return samples used on estimation (default=FALSE). |
numberOfSamples |
numeric. NUmber of y-axis samples used on estimation (default=1e3). |
unirootLowerBound |
numeric. Lower bound to search for inverse solution in the initial bounds (default = -10). |
unirootUpperBound |
numeric. Upper bound to search for inverse solution in the initial bounds (default = 1e100). |
colourPallete |
vector. colour pallete to use on chart (default=FALSE). |
label |
list. List of chart labels (default=list(x = "x", y = "y", legend = "legend")). |
steepCurve |
list. List with coefficients for a very "vertical" function for the case with all countries with upper bound zero in an specific region aggregation (default= empty list, list()). |
Use case: aggregate country cubic cost functions to a single function that represents the entire region.
input: coefficients of the n-th country level cubic cost function.
Description of the problem: the aggregation of functions that represent unit costs, or prices in the y-axis, and quantities in the x-axis require operations with the inverse of the original functions. As complex functions present analytically challenging inverse function derivations, we adopt a sampling method to derive the function that corresponds to the sum of cubic function inverses.
Further extensions: the R function can be extended to support more complex curve estimations (beyonf third degree), whenever the mathematical function have a well defined inverse function in the selected boundaries.
return: returns a list of magpie objects containing the coefficients for the aggregate function. If returnMagpie is FALSE, returns a list containing the coefficients for the aggregate function (returnCoeff=TRUE), charts (returnChart=FALSE) and/or samples used in the estimation (returnSample=FALSE).
Renato Rodrigues
# Example # data EUR <- setNames(data.frame(30, 50, 0.123432, 2), c("c1", "c2", "c3", "c4")) NEU <- setNames(data.frame(30, 50, 1.650330, 2), c("c1", "c2", "c3", "c4")) df <- rbind(EUR, NEU) row.names(df) <- c("EUR", "NEU") # maxExtraction (upper limit for function estimation) maxExtraction <- 23 # output output <- toolCubicFunctionAggregate(df, xUpperBound = maxExtraction, returnMagpie = FALSE, returnChart = TRUE, returnSample = TRUE, label = list(x = "Cumulated Extraction", y = "Cost", legend = "Region Fuel Functions") ) output$coeff output$chart# Example # data EUR <- setNames(data.frame(30, 50, 0.123432, 2), c("c1", "c2", "c3", "c4")) NEU <- setNames(data.frame(30, 50, 1.650330, 2), c("c1", "c2", "c3", "c4")) df <- rbind(EUR, NEU) row.names(df) <- c("EUR", "NEU") # maxExtraction (upper limit for function estimation) maxExtraction <- 23 # output output <- toolCubicFunctionAggregate(df, xUpperBound = maxExtraction, returnMagpie = FALSE, returnChart = TRUE, returnSample = TRUE, label = list(x = "Cumulated Extraction", y = "Cost", legend = "Region Fuel Functions") ) output$coeff output$chart
Estimates cubic function inverses based on a weight factor that sum up to the original cubic function (sum in the x-axis)
toolCubicFunctionDisaggregate( x, weight, rel = NULL, xLowerBound = 0, xUpperBound = 100, returnMagpie = TRUE, returnCoeff = TRUE, returnChart = FALSE, returnSample = FALSE, numberOfSamples = 1000, unirootLowerBound = -10, unirootUpperBound = 1e+100, colourPallete = FALSE, label = list(x = "x", y = "y", legend = "legend") )toolCubicFunctionDisaggregate( x, weight, rel = NULL, xLowerBound = 0, xUpperBound = 100, returnMagpie = TRUE, returnCoeff = TRUE, returnChart = FALSE, returnSample = FALSE, numberOfSamples = 1000, unirootLowerBound = -10, unirootUpperBound = 1e+100, colourPallete = FALSE, label = list(x = "x", y = "y", legend = "legend") )
x |
magclass object that should be aggregated or data frame with coefficients as columns. |
weight |
magclass object containing weights which should be considered for a weighted aggregation. The provided weight should only contain positive values, but does not need to be normalized (any positive number>=0 is allowed). |
rel |
relation matrix containing a region mapping. A mapping object should contain 2 columns in which each element of x is mapped to the category it should belong to after (dis-)aggregation |
xLowerBound |
numeric. Lower bound for x sampling (default=0). |
xUpperBound |
numeric. Upper bound for x sampling (default=100). |
returnMagpie |
boolean. if true, the function will return a single data table with all the countries in MagPie format. returnChart and returnSample are set to FALSE automatically if this option is active (default=TRUE). |
returnCoeff |
boolean. Return estimated coefficients (default=TRUE). |
returnChart |
boolean. Return chart (default=FALSE). |
returnSample |
boolean. Return samples used on estimation (default=FALSE). |
numberOfSamples |
numeric. NUmber of y-axis samples used on estimation (default=1e3). |
unirootLowerBound |
numeric. Lower bound to search for inverse solution in the initial bounds (default = -10). |
unirootUpperBound |
numeric. Upper bound to search for inverse solution in the initial bounds (default = 1e100). |
colourPallete |
vector. colour pallete to use on chart (default=FALSE). |
label |
list. List of chart labels (default=list(x = "x", y = "y", legend = "legend")). |
Use case: disaggregate a single region cubic cost function to multiple country cubic functions weighted by a contribution factor. The sum of the countries function output is equal to the original regional function.
input: coefficients of the n-th country level cubic cost function.
Description of the problem: the disaggregation of functions that represent unit costs (or prices) in the y-axis and quantities in the x-axis require operations with the inverse of the original functions. As complex functions present analytically challenging inverse function derivations, we adopt a sampling method to derive the function that corresponds to the sum of cubic function inverses.
Further extensions: the R function can be extended to support more complex curve estimations (beyond third degree), whenever the mathematical function have a well defined inverse function in the selected boundaries.
return: returns a list of magpie objects containing the coefficients for the aggregate function. If returnMagpie is FALSE, returns a list containing the coefficients for the aggregate function (returnCoeff=TRUE), charts (returnChart=FALSE) and/or samples used in the estimation (returnSample=FALSE).
Renato Rodrigues
# Example # LAM coefficients df <- setNames(data.frame(30, 50, 0.34369, 2), c("c1", "c2", "c3", "c4")) row.names(df) <- "LAM" # weight weight <- setNames(c(21, 0, 579, 3, 228), c("ARG", "BOL", "BRA", "CHL", "COL")) # maxExtraction (upper limit for function estimation) maxExtraction <- 100 # output output <- toolCubicFunctionDisaggregate(df, weight, xUpperBound = maxExtraction, returnMagpie = FALSE, returnChart = TRUE, returnSample = TRUE, label = list(x = "Cumulated Extraction", y = "Cost", legend = "Region Fuel Functions") ) #' output$chart output$coeff output$chart# Example # LAM coefficients df <- setNames(data.frame(30, 50, 0.34369, 2), c("c1", "c2", "c3", "c4")) row.names(df) <- "LAM" # weight weight <- setNames(c(21, 0, 579, 3, 228), c("ARG", "BOL", "BRA", "CHL", "COL")) # maxExtraction (upper limit for function estimation) maxExtraction <- 100 # output output <- toolCubicFunctionDisaggregate(df, weight, xUpperBound = maxExtraction, returnMagpie = FALSE, returnChart = TRUE, returnSample = TRUE, label = list(x = "Cumulated Extraction", y = "Cost", legend = "Region Fuel Functions") ) #' output$chart output$coeff output$chart
Sets values for 6 EU countries not belonging to EU 28 but EU 34 to zero if they are NA. Used to avoid EUR region yielding NA because of these countries.
toolFillEU34Countries(x)toolFillEU34Countries(x)
x |
magpie object with 249 ISO country codes in the spatial dimension |
Falk Benke
Does not do anything for slices where all timesteps are NA
toolFillYearsWithClosest(inx)toolFillYearsWithClosest(inx)
inx |
a magclass object with NAs |
the magclass object with some of those NAs filled
Returns the year associated with a given ieaVersion
toolGetIEAYear(ieaVersion)toolGetIEAYear(ieaVersion)
ieaVersion |
Release version of IEA data, either 'default' (vetted and used in REMIND) or 'latest'. |
Falk Benke
Helper to validate data read in from UNFCCC NDC and New Climate databases and apply some pre-processing
toolProcessClimateTargetDatabase(input, database, subtype)toolProcessClimateTargetDatabase(input, database, subtype)
input |
data frame representing the data from climate target database |
database |
database to be read in, used for logging info |
subtype |
database version to be read in, used for logging info |
readUNFCCC_NDC(), readNewClimate()
Aggregate Solar data into regions
toolSolarFunctionAggregate( x, rel = NULL, weight = calcOutput("FE", aggregate = FALSE)[, "y2015", "FE|Electricity (EJ/yr)"] )toolSolarFunctionAggregate( x, rel = NULL, weight = calcOutput("FE", aggregate = FALSE)[, "y2015", "FE|Electricity (EJ/yr)"] )
x |
magclass object that should be aggregated |
rel |
relation matrix containing a region mapping. A mapping object should contain 2 columns in which each element of x is mapped to the category it should belong to after (dis-)aggregation |
weight |
aggregation weight (should be FE|Electricity (EJ/yr) in 2015) |
return: returns region aggregated solar data
Felix Schreyer, Renato Rodrigues, Julian Oeser