Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt reportEmiAirPol.R to use renamed air pollution variables after MAGICC6 removal #682

Merged
merged 9 commits into from
Dec 18, 2024

Conversation

tonnrueter
Copy link
Contributor

@tonnrueter tonnrueter commented Dec 17, 2024

Note: Draft PR since buildLibrary has not been run yet

Change log:

  • During removal of MAGICC6 from REMIND, variables related to module 11_aerosols/exoGAINS no longer act as an interface to the REMIND core and were renamed to from pm_X to p11_X. This affects p11_emiAPexo, p11_emiAPexoGlob, p11_emiAPexsolve
    • Variables p11_emiFacAP, pm_emiExog, p11_emiAPexoAgricult were also renamed in REMIND, but do not occur in reporting
  • Removed unused conversion factors pm_conv_TWa_EJ & conv_MtSO2_to_MtS
  • Replace getRegions with getItems(..., dim = 1)
  • Revised magclass imports
  • Some re-formatting to get rid of linter warnings

@tonnrueter tonnrueter self-assigned this Dec 17, 2024

######### internal function ###########
generateReportingEmiAirPol <- function(pollutant,i_emiAPexsolve=pm_emiAPexsolve,i_emiAPexo=pm_emiAPexo){
generateReportingEmiAirPol <- function(pollutant, i_emiAPexsolve = p11_emiAPexsolve, i_emiAPexo = p11_emiAPexo) {
Copy link
Contributor Author

@tonnrueter tonnrueter Dec 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced pm_X here..

pm_emiAPexsolve <- readGDX(gdx, name=c("pm_emiAPexsolve"), field="l", format="first_found")[,ttot,]
pm_emiAPexo <- readGDX(gdx, name=c("pm_emiAPexo"), field="l", format="first_found")[,ttot,airpollutants]
pm_emiAPexoGlob <- readGDX(gdx, name=c("pm_emiAPexoGlob"), field="l", format="first_found")[,ttot,airpollutants]
p11_emiAPexsolve <- readGDX(
Copy link
Contributor Author

@tonnrueter tonnrueter Dec 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.. and added p11_X variables to name vector here

@merfort merfort marked this pull request as ready for review December 17, 2024 15:37
Copy link
Contributor

@merfort merfort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks a lot for fixing this so quickly, Tonn!

@tonnrueter tonnrueter merged commit 6fe85c5 into pik-piam:master Dec 18, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants