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

Incorporating agricultural residue burning emissions #268

Merged
merged 7 commits into from
Apr 28, 2021
Merged

Incorporating agricultural residue burning emissions #268

merged 7 commits into from
Apr 28, 2021

Conversation

mscrawford
Copy link
Contributor

Purpose of this PR

Incorporate the emissions calculations from agricultural residue burning (N2O, NO2). Changes to 18_residues and 51_nitrogen.

Performance loss/gain from current default behavior

newplot

~ 7% performance loss

Type of change

  • Bug fix (Change which fixes an issue).
  • New feature (Change which adds functionality).
  • Minor change (Change which does not modify core model code i.e., in /modules).
  • Major change (fix or feature that would change current model behavior).

How Has This Been Tested?

The new calculations are present in the .GDX. The following plot shows the correspondence between MAgPIE's calculations and the historical FAO data for N2O.

image

Additions or Changes to default configuration (default.cfg):

One new file was added, incorporating the emissions factors taken from the IPCC 2019 revision, f51_ef_resid_burn.cs4

Checklist:

  • Self-review of my own code.
  • Compilation check (model starts without compilation errors).
  • Added changes to CHANGELOG.md
  • No hard coded numbers and cluster/country/region names.
  • The code doesn't contain declared but unused parameters or variables.
  • In-code comments added including documentation comments.
  • Compiled and checked resulting documentation with goxygen::goxygen() for the new/updated parts.
  • Changes to magpie4 R library for post processing of model output (ideally backward compatible).

Special comments/warnings

The additions don't add anything to the optimization, but do increase the total number of calculations.

Copy link
Member

@tscheypidi tscheypidi left a comment

Choose a reason for hiding this comment

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

As you have introduced a new interface, please update the module contracts of the corresponding modules. You find the contracts as part of the goxygen documentation in the module.gms files of the corresponding modules.

The module contract should describe what the purpose of the module is, what outputs it is promising to provide and what inputs it is expecting to get in order to compute the outputs.

In addition I saw that in one off-realization you just set the value of that new interface to zero. The description of that realization should make very clear what scenario this module is representing. In your case, if no residue burning is happening, what is happening instead?

@mscrawford
Copy link
Contributor Author

I have now amended the module contracts for both 18_residues and 51_nitrogen to be more specific.

@mscrawford
Copy link
Contributor Author

I've now amended the documentation to better fit Jan's specifications.

Copy link
Member

@tscheypidi tscheypidi 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

@tscheypidi
Copy link
Member

@mscrawford what is the status here? Still needs @bodirsky to review, right? Should probably happen rather soon as PR are currently piling up

@mscrawford
Copy link
Contributor Author

mscrawford commented Apr 27, 2021 via email

Copy link
Member

@bodirsky bodirsky left a comment

Choose a reason for hiding this comment

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

all fine!

@bodirsky bodirsky merged commit 6d9decc into magpiemodel:develop Apr 28, 2021
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.

None yet

3 participants