Skip to content

Commit

Permalink
Add noBan LSC scenarios (#241)
Browse files Browse the repository at this point in the history
* CampScens: Adjustment and new lowLSC scenario

As the Mix2 scenario changed since September2023 and the LSC assumptions are relative to the reference scenario (Mix2), I changed the techScen and demScen factors to still follow the scenario protocol.

Comparison between old and new runs:

* buildLibrary

* delete '' for function call

* UpdateCampScen

To fulfill the requirements from E3M, I ajudsted the parameters in demscen and mitigation tech.csv. The result show that lsc_Strong, Weak and Low are more evenly distributed now. Especially, I ensrued, that lsc_Low is more ambitous than the previous version (E3M request).

I changed for the navigate comparison script Mix1 to Mix2 as I understood this to be the new standard comparison techScenario.

* Update NAMESPACE

The importFrom(magrittr,`%>%`) was necessary because piamInterfaces did not work with the previous version.

The compScen can be found at 20240302_PR240_UpdateCampScens_2

* buildLibrary

* Addition of LSC scenario without ban and Mix2 with ban

Note that Mix2 is the reference for the LSC scenarios and not Mix3 or Mix4.

* buildLIbrary

* ; --> ,
  • Loading branch information
jmuessel authored Feb 8, 2024
1 parent 07fe092 commit 436043d
Show file tree
Hide file tree
Showing 8 changed files with 439 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '2983307'
ValidationKey: '3003672'
AutocreateReadme: yes
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ cff-version: 1.2.0
message: If you use this software, please cite it using the metadata from this file.
type: software
title: 'edgeTransport: Prepare EDGE Transport Data for the REMIND model'
version: 1.5.1
date-released: '2024-02-04'
version: 1.5.2
date-released: '2024-02-08'
abstract: EDGE-T is a fork of the GCAM transport module https://jgcri.github.io/gcam-doc/energy.html#transportation
with a high level of detail in its representation of technological and modal options.
It is a partial equilibrium model with a nested multinomial logit structure and
Expand Down
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: edgeTransport
Title: Prepare EDGE Transport Data for the REMIND model
Version: 1.5.1
Version: 1.5.2
Authors@R: c(
person("Alois", "Dirnaichner", email = "[email protected]", role = c("aut", "cre")),
person("Marianna", "Rottoli", email = "[email protected]", role = "aut"),
Expand All @@ -13,9 +13,9 @@ License: GPL-3
URL: https://github.com/pik-piam/edgeTransport
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
VignetteBuilder: knitr
Date: 2024-02-04
Date: 2024-02-08
Config/testthat/edition: 3
Imports:
rmndt,
Expand Down
2 changes: 1 addition & 1 deletion R/incotrend.R
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ Hybrid Electric,Liquids")
## remove L2 and L3 from mitab to avoid a join on these sectors
FVtarget <- mitab[level == "FV"][, c("subsector_L2", "subsector_L3") := NULL][FVtarget, on = c("FV_vehvar", "FV_techvar", "regioncat")]

if (tech_scen %in% c("Mix3", "Mix4", "HydrHype4", "ECEMF_HighEl_ModEff", "ECEMF_HighEl_HighEff", "ECEMF_HighEl_LifestCha", "ECEMF_HighH2_ModEff", "ECEMF_HighH2_HighEff", "ECEMF_HighH2_LifestCha", "CAMP_lscWeak", "CAMP_lscStrong", "CAMP_lscLow", "NAV_ele", "NAV_all")){
if (tech_scen %in% c("Mix2_ban", "Mix3", "Mix4", "HydrHype4", "ECEMF_HighEl_ModEff", "ECEMF_HighEl_HighEff", "ECEMF_HighEl_LifestCha", "ECEMF_HighH2_ModEff", "ECEMF_HighH2_HighEff", "ECEMF_HighH2_LifestCha", "CAMP_lscWeak", "CAMP_lscStrong", "CAMP_lscLow", "NAV_ele", "NAV_all")){

FVtarget_all = FVtarget[!(technology %in% c("Liquids","NG") & subsector_L1 %in% c("trn_freight_road_tmp_subsector_L1", "Bus_tmp_subsector_L1") & region %in% c("DEU", "ECE", "ECS", "ENC", "ESC", "ESW", "EWN", "FRA", "UKI"))]

Expand Down
2 changes: 1 addition & 1 deletion R/logit.R
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ toolCalculateLogitIncost <- function(prices,
0.5*exp(1)^(weighted_sharessum[year == (t-1)]*bmodelav),
pinco_tot), by = c("region", "technology", "vehicle_type", "subsector_L1")]

if(tech_scen %in% c("PhOP", "Mix3", "Mix4", "HydrHype4", "ECEMF_HighEl_ModEff", "ECEMF_HighEl_HighEff", "ECEMF_HighEl_LifestCha", "ECEMF_HighH2_ModEff", "ECEMF_HighH2_HighEff", "ECEMF_HighH2_LifestCha", "CAMP_lscLow", "CAMP_lscWeak", "CAMP_lscStrong", "NAV_all", "NAV_ele") & t>= 2030){
if(tech_scen %in% c("Mix2_ban", "PhOP", "Mix3", "Mix4", "HydrHype4", "ECEMF_HighEl_ModEff", "ECEMF_HighEl_HighEff", "ECEMF_HighEl_LifestCha", "ECEMF_HighH2_ModEff", "ECEMF_HighH2_HighEff", "ECEMF_HighH2_LifestCha", "CAMP_lscLow", "CAMP_lscWeak", "CAMP_lscStrong", "NAV_all", "NAV_ele") & t>= 2030){
## phase-out of all light-duty vehicle ICEs
EUreg <- c("DEU", "ECE", "ECS", "ENC", "ESC", "ESW", "EWN", "FRA", "UKI", "EUR")

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Prepare EDGE Transport Data for the REMIND model

R package **edgeTransport**, version **1.5.1**
R package **edgeTransport**, version **1.5.2**

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

Expand Down Expand Up @@ -46,7 +46,7 @@ In case of questions / problems please contact Alois Dirnaichner <dirnaichner@pi

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

Dirnaichner A, Rottoli M, Hoppe J (2024). _edgeTransport: Prepare EDGE Transport Data for the REMIND model_. R package version 1.5.1, <https://github.com/pik-piam/edgeTransport>.
Dirnaichner A, Rottoli M, Hoppe J (2024). _edgeTransport: Prepare EDGE Transport Data for the REMIND model_. R package version 1.5.2, <https://github.com/pik-piam/edgeTransport>.

A BibTeX entry for LaTeX users is

Expand All @@ -55,7 +55,7 @@ A BibTeX entry for LaTeX users is
title = {edgeTransport: Prepare EDGE Transport Data for the REMIND model},
author = {Alois Dirnaichner and Marianna Rottoli and Johanna Hoppe},
year = {2024},
note = {R package version 1.5.1},
note = {R package version 1.5.2},
url = {https://github.com/pik-piam/edgeTransport},
}
```
Loading

0 comments on commit 436043d

Please sign in to comment.