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

FSEC modeling script for global runs #426

Merged
merged 66 commits into from
Aug 17, 2022

Conversation

FelicitasBeier
Copy link
Member

@FelicitasBeier FelicitasBeier commented Aug 9, 2022

🐦 Purpose of this PR 🐦

  • Updated and improved script for FSEC
  • relaxed upper limit for tau for feasibility of land Sparing runs

🔧 Checklist for PR creator 🔧

  • Labeling pull request correctly from the label list: Low risk (start script and output script update) to medium risk (upper limit of tau relaxed)
  • 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
    Did not change results of default.

tau

  • 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
    • Default run based on the current version of the fork from which PR is made
  • 📉 Performance loss/gain from current default behavior 📈
    • Current develop branch default : 00:55:59 hrs
    • This PR's default : 01:01:44 hrs

runtime

  • 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.
  • In case of updated cellular input tgz file in default.cfg: scenario_config.csv has been updated accordingly (rcp1p9, rcp2p6 etc)

⚠️ Additional notes or warnings ⚠️

  • relaxed upper limit for tau

🚨 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

Copy link
Contributor

@mscrawford mscrawford left a comment

Choose a reason for hiding this comment

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

Good from my side. Does the change in Tau require a test run of the develop branch?

@FelicitasBeier
Copy link
Member Author

Good from my side. Does the change in Tau require a test run of the develop branch?

I have done a default run test now (see updated text above)

config/default.cfg Show resolved Hide resolved
@@ -16,7 +16,7 @@ else
vm_tau.lo(h, tautype) = pcm_tau(h, tautype);
);

vm_tau.up(h,tautype) = 2*pcm_tau(h,tautype);
vm_tau.up(h,tautype) = 3 * pcm_tau(h,tautype);
Copy link
Member

Choose a reason for hiding this comment

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

this is odd that this is being required to find feasible solutions. This is really far off a realistic solution

Copy link
Member Author

Choose a reason for hiding this comment

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

It's only required when we use the combination of the new pasture realization (gms$past <- "grasslands_apr22", gms$c31_past_suit_scen <- "ssp245") and a very strict land conservation and restoration scenario (cfg$gms$c22_protect_scenario <- "HalfEarth").
Maybe @mppalves @alexkoberle or @bodirsky want to add to the discussion, so that we can decide whether this change is justified for this PR or whether we need to refrain from using this combination right now?

Copy link
Member Author

Choose a reason for hiding this comment

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

The new realization differentiates managed pastures and rangelands. Tau does not apply to rangelands.
There is a strong decline of yields because of climate change impacts that leads to a high need to intensify or expand the small pasture areas. Given the strict Half Earth protection scenario, this is difficult and requires huge investments that require relaxing the upper limit for tau here.

scripts/output/rds_report.R Outdated Show resolved Hide resolved
scripts/start/extra/recalibrate_FSEC.R Show resolved Hide resolved
Copy link
Contributor

@mscrawford mscrawford left a comment

Choose a reason for hiding this comment

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

👍

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.

it should be cfg$magicc_emis_scen <- NULL not "NULL". Otherwise the PR looks ok now for me. I still don't understand why the higher upper limit for tau might be needed but also don't see a good alternative for it if you say that some runs get infeasible otherwise.

config/default.cfg Outdated Show resolved Hide resolved
@FelicitasBeier FelicitasBeier merged commit 3299b02 into magpiemodel:develop Aug 17, 2022
@FelicitasBeier FelicitasBeier deleted the FSECmodelingTest branch August 17, 2022 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants