Skip to content

Commit

Permalink
Merge pull request pik-piam#137 from fschreyer/master
Browse files Browse the repository at this point in the history
switch to UNFCCC data for the input data for LULUCF emissions country accounting
  • Loading branch information
fschreyer authored Oct 19, 2021
2 parents cb2908f + dc823d3 commit e195b68
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '15888600'
ValidationKey: '15910879'
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
- 'Warning: namespace ''.*'' is not available and has been replaced'
Expand Down
2 changes: 1 addition & 1 deletion .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "mrremind: MadRat REMIND Input Data Package",
"version": "0.84.0",
"version": "0.84.1",
"description": "<p>The mrremind packages contains data preprocessing for the REMIND model.<\/p>",
"creators": [
{
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: mrremind
Type: Package
Title: MadRat REMIND Input Data Package
Version: 0.84.0
Date: 2021-10-15
Version: 0.84.1
Date: 2021-10-19
Authors@R: c(person("Lavinia", "Baumstark", email = "[email protected]", role = c("aut","cre")),
person("Renato", "Rodrigues", role = "aut"),
person("Antoine", "Levesque", role = "aut"),
Expand Down
16 changes: 8 additions & 8 deletions R/calcEmiLULUCFCountryAcc.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
calcEmiLULUCFCountryAcc <- function(subtype){


if (subtype=="PRIMAPhist") {
if (subtype=="UNFCCC") {


# take PRIMAPhist LULUCF data for now
# note: these historical LULUCF emissions data correspond neither to UNFCCC (https://di.unfccc.int/detailed_data_by_party)
# nor to EEA (https://cdr.eionet.europa.eu/de/eu/mmr/art07_inventory/ghg_inventory/envxh8awg/index_html?&page=1)
primap <- readSource("PRIMAPhist","hist")
# read in UNFCCC CRF emissions data
unfccc <- readSource("UNFCCC")

# LULUCF CO2 emissions from PRIMAP hist database from 1990 to 2015, convert to Mt CO2/yr
out <- dimReduce(primap[,paste0("y",seq(1990,2015,1)),"co2_c"][,,"CAT5"]) / 12*44
# LULUCF CO2 emissions from UNFCCC database from, convert to Mt CO2/yr
out <- collapseNames(unfccc[,,"Total LULUCF|CO2"]) / 1000
# replace NA by 0
out[is.na(out)] <- 0

} else {
"Please define a valid subtype for this function."
Expand All @@ -30,7 +30,7 @@ calcEmiLULUCFCountryAcc <- function(subtype){
list(x=out,
weight=NULL,
unit="Mt CO2/yr",
description="Historical LULUCF CO2 emissions data following country accounting taken from PRIMAPhist database")
description="Historical LULUCF CO2 emissions data following country accounting taken from UNFCCC database")
)
}

Expand Down
2 changes: 1 addition & 1 deletion R/fullREMIND.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ fullREMIND <- function(rev=0) {
calcOutput('GAINSEmi', subtype="emission_factors", round=5, file="ef_gains.cs4r")
calcOutput('GAINSEmi', subtype="emissions_starting_values", round=5, file="f11_emiAPexsolve.cs4r")
calcOutput("EmissionFactors",subtype="emission_factors", round=5, file="f11_emiFacAP.cs4r")
calcOutput("EmiLULUCFCountryAcc",subtype="PRIMAPhist", round=5, file="p_EmiLULUCFCountryAcc.cs4r")
calcOutput("EmiLULUCFCountryAcc",subtype="UNFCCC", round=5, file="p_EmiLULUCFCountryAcc.cs4r")

#-------------- energy/technology parameters ---------------------------------------------------------
calcOutput("PotentialHydro", round=3, file="f_maxProdGradeRegiHydro.cs3r")
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MadRat REMIND Input Data Package

R package **mrremind**, version **0.84.0**
R package **mrremind**, version **0.84.1**

[![CRAN status](https://www.r-pkg.org/badges/version/mrremind)](https://cran.r-project.org/package=mrremind) [![R build status](https://github.com/pik-piam/mrremind/workflows/check/badge.svg)](https://github.com/pik-piam/mrremind/actions) [![codecov](https://codecov.io/gh/pik-piam/mrremind/branch/master/graph/badge.svg)](https://codecov.io/gh/pik-piam/mrremind) [![r-universe](https://pik-piam.r-universe.dev/badges/mrremind)](https://pik-piam.r-universe.dev/ui#builds)

Expand Down Expand Up @@ -38,7 +38,7 @@ In case of questions / problems please contact Lavinia Baumstark <lavinia@pik-po

To cite package **mrremind** in publications use:

Baumstark L, Rodrigues R, Levesque A, Oeser J, Bertram C, Mouratiadou I, Malik A, Schreyer F, Soergel B, Rottoli M, Mishra A, Dirnaichner A, Pehl M, Giannousakis A, Klein D, Strefler J, Feldhaus L, Brecha R, Rauner S, Dietrich J, Bi S, Benke F (2021). _mrremind: MadRat REMIND Input Data Package_. R package version 0.84.0.
Baumstark L, Rodrigues R, Levesque A, Oeser J, Bertram C, Mouratiadou I, Malik A, Schreyer F, Soergel B, Rottoli M, Mishra A, Dirnaichner A, Pehl M, Giannousakis A, Klein D, Strefler J, Feldhaus L, Brecha R, Rauner S, Dietrich J, Bi S, Benke F (2021). _mrremind: MadRat REMIND Input Data Package_. R package version 0.84.1.

A BibTeX entry for LaTeX users is

Expand All @@ -47,7 +47,7 @@ A BibTeX entry for LaTeX users is
title = {mrremind: MadRat REMIND Input Data Package},
author = {Lavinia Baumstark and Renato Rodrigues and Antoine Levesque and Julian Oeser and Christoph Bertram and Ioanna Mouratiadou and Aman Malik and Felix Schreyer and Bjoern Soergel and Marianna Rottoli and Abhijeet Mishra and Alois Dirnaichner and Michaja Pehl and Anastasis Giannousakis and David Klein and Jessica Strefler and Lukas Feldhaus and Regina Brecha and Sebastian Rauner and Jan Philipp Dietrich and Stephen Bi and Falk Benke},
year = {2021},
note = {R package version 0.84.0},
note = {R package version 0.84.1},
}
```

0 comments on commit e195b68

Please sign in to comment.