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

Bugfix SOM, TC cost and Biodiversity Module + new Biodiversity Module realization #399

Merged
merged 61 commits into from
Jun 3, 2022

Conversation

flohump
Copy link
Contributor

@flohump flohump commented May 31, 2022

🐦 Purpose of this PR 🐦

  • Bugfix in SOM module: "PreviousCarbonDensity" (no entry in changelog needed because not yet published)
  • TAU: upper bound on TC costs deactived by default (no entry in changelog needed because not yet published)
  • new additional data 4.21: afforestation starts in 1995 in CHA
  • Bugfix in 44_biodiverstiy/bv_btc_mar21: accounting for time step length
  • New realization 44_biodiverstiy/bii_target added AND set as new default in default.cfg

🔧 Checklist for PR creator 🔧

  • Low risk : Simple bugfixes (missing files, updated documentation, typos) or Start/output scripts
  • Medium risk : New realization / Changes to existing realization / Other changes which don't modify default.cfg
  • High risk : New input files (if cfg$input is changed in default.cfg) / Modification to core model (eg. changes in equations, calculations, introduction of new sets etc.) / Other changes in default.cfg
  • Providing additional information based on PR label
  • Low risk : No new model run needed.
  • Medium risk : Default run based on the current version of the fork from which PR is made
  • High risk
    • Default run from the current develop branch: 22LandConsvBetaRun3_default_rest1_all_marginal
    • Default run based on the current version of the fork from which PR is made: PR399_SSP2-Ref
    • Run with BII increase based on the current version of the fork from which PR is made: PR399_SSP2-Ref_BII

Emissions_CO2_Land_Land_use_Change-51
Productivity_Landuse_Intensity_Indicator_Tau-57
Resources_Land_Cover_Cropland-68

Biodiversity_BII-3

  • 📉 Performance loss/gain from current default behavior 📈

    • Current develop branch default : 0.72 h
    • This PR's default : 0.42 h
  • Added changes to CHANGELOG.md

  • Compilation check (model starts without compilation errors - use gams main.gms action=c in model folder for testing).

  • No hard coded numbers and cluster/country/region names.

  • The new code doesn't contain declared but unused parameters or variables.

  • Where relevant, In-code comments added including documentation comments.

  • Made sure that documentation created with goxygen is okay (use goxygen::goxygen() for testing).

  • Changes to magpie4 R library for post processing of model output (ideally backward compatible).

  • Self-review of my own code.

  • For high risk runs: validation of major model indicators - Land-use, emissions, food prices, Tau. %Delete this line in case it is not a high risk run%

⚠️ Additional notes or warnings ⚠️

NA

🚨 Checklist for RSE reviewer 🚨

  • PR is labeled correctly.
  • CHANGELOG is updated correctly
  • No hard coded numbers and cluster/country/region names.
  • No unnecessary increase in module interfaces
  • All required updates in interfaces (if any) have been properly adressed in the module contracts
  • In-code comments and documentation comments are satisfactory.
  • model behavior/performance is satisfactory.
  • Requested changes (if any) were applied correctly

🚨 Checklist for MAgPIE reviewer 🚨

  • PR is labeled correctly.
  • CHANGELOG is updated correctly
  • No hard coded numbers and cluster/country/region names.
  • Changes to the model are scientifically sound
  • In-code comments and documentation comments are satisfactory.
  • model behavior/performance is satisfactory.
  • Requested changes (if any) were applied correctly

@flohump flohump added enhancement New feature or request Minor Smaller modifications High risk Higher risk bugfix labels May 31, 2022
@flohump flohump changed the title Bugfix SOM, TC and BII + new BII realization Bugfix SOM, TC cost and Biodiversity Module + new Biodiversity Module realization May 31, 2022
@flohump flohump marked this pull request as ready for review May 31, 2022 13:36
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, just one part of code where I had the feeling that it is not yet mentioned in the CHANGELOG (see my separate comment)

Copy link
Contributor

@pvjeetze pvjeetze left a comment

Choose a reason for hiding this comment

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

I absolutely like these new additions to the biodiversity module! Many thanks! I have only minor suggestions that you'll find directly in the code.

config/default.cfg Outdated Show resolved Hide resolved
modules/44_biodiversity/bii_target/realization.gms Outdated Show resolved Hide resolved
Copy link
Contributor

@pvjeetze pvjeetze 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 to me, just found a couple of typos that I changed directly

config/default.cfg Outdated Show resolved Hide resolved
config/default.cfg Outdated Show resolved Hide resolved
modules/44_biodiversity/bii_target/presolve.gms Outdated Show resolved Hide resolved
flohump and others added 5 commits June 3, 2022 13:48
Co-authored-by: pvjeetze <50408549+pvjeetze@users.noreply.github.com>
Co-authored-by: pvjeetze <50408549+pvjeetze@users.noreply.github.com>
Co-authored-by: pvjeetze <50408549+pvjeetze@users.noreply.github.com>
@flohump flohump merged commit 3e814e3 into magpiemodel:develop Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix enhancement New feature or request High risk Higher risk Minor Smaller modifications
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants