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

Efp #492

Merged
merged 7 commits into from
Dec 15, 2022
Merged

Efp #492

merged 7 commits into from
Dec 15, 2022

Conversation

FelicitasBeier
Copy link
Member

@FelicitasBeier FelicitasBeier commented Dec 13, 2022

🐦 Description of this PR 🐦

  • This PR flexibilizes the selection of the start year and target year of the fading in of the Environmental Flow Policy
  • Previously, it faded in "linearly" through the file f42_env_flow_policy.csv and alternative scenarios (e.g. the India country case studies used extra files to set different start and target years (f42_env_flow_policy_india.csv))
  • Now the start and target year can be set through s42_efp_startyear and s42_efp_targetyear. The policy then fades in truly linearly using a macro

🔧 Checklist for PR creator 🔧

  • Label pull request from the label list.

    • Medium risk: Uncritical changes in the model core (e.g. moderate modifications in non-default realizations)
    • Fading is now linear (before it was nearly linear), minor changes as can be seen in the results shown below
  • Self-review own code

    • No hard coded numbers and cluster/country/region names.
    • The new code doesn't contain declared but unused parameters or variables.
    • magpie4 R library has been updated accordingly and backwards compatible where necessary.
    • scenario_config.csv has been updated accordingly (important if default.cfg has been updated)
  • Document changes

    • Add changes to CHANGELOG.md
    • Where relevant, put In-code documentation comments
    • Properly address updates in interfaces in the module documentations
    • run goxygen::goxygen() and verify the modified code is properly documented
  • Perform test runs

    • Medium risk:
      • Run test runs via Rscript start.R --> "test runs"

📉 Performance changes 📈

  • Current develop branch default : 0.3666597
  • This PR's default : 0.38881999

Slightly better runtime

runtime

Some results:
Tau unchanged
EFP_tau

Area actually irrigated
EFP_AAI

Withdrawal comparing EFP off with EFP on (old and new)
EFPwithdrawal

Withdrawal with example of different start and end year compared to previous default
withdrawalNEWSCEN

🚨 Checklist for reviewer 🚨

  • PR is labeled correctly
  • Code changes look reasonable
    • No hard coded numbers and cluster/country/region names.
    • No unnecessary increase in module interfaces
    • model behavior/performance is satisfactory.
  • Changes are properly documented
    • CHANGELOG is updated correctly
    • Updates in interfaces have been properly addressed in the module documentations
    • In-code documentation looks appropriate

… to target year and then receive target value without fading in
core/macros.gms Show resolved Hide resolved
core/macros.gms Show resolved Hide resolved
@FelicitasBeier FelicitasBeier merged commit a780468 into magpiemodel:develop Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Medium risk Minor Smaller modifications
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants