Skip to content

Conversation

@k4rst3ns
Copy link
Member

@k4rst3ns k4rst3ns commented Sep 8, 2025

🐦 Description of this PR 🐦

The demand for residues that is used for 2nd generation bioenergy is based on old magpie runs - 1/3 of the (back-than) sustainable fraction was used and is still enforced as exogenous demand. Due to various changes (probably also or especially also in the regional setup(?)), these demands seem to be very high, causing additional crop production of sugar cane in JPN at the moment.

We flexibilized the demand by making the exogenous demand an upper bound and adding a subsidy that enforces the removal of the residues (but no additional production of residues via additional crop production).
We take the value for the subsidy for 1st generation BE, which is already used in the model as a benchmark.

Flexibilizing can bring down the sugar cane demand in JPN:

Demand_Crops_Sugar_crops_Sugar_cane - with the default being the current ill-behaving version. Demand_Crops_Sugar_crops_Sugar_cane(1) Removing the default run, it can be seen that the different subsidy levels I tested lead to slide differences at the end of the century.

Also to see how the residual removal for 2nd generation BE works the subsidy levels matter:
Demand_Bioenergy_2nd_generation_Crop_residues(3)

With subsidy at 6.5 and 10 USD17MER per GJ leading to no spiky behavior.

On the down side, costs al
Costs(6)
so react on these new subsidies:

And run time is also much longer:

runtime_PRFixRes2ndBE

current default: 0.53 h
subsidies-6.5: 0.80 h
subsidies-10: 0.72 h

... which is coming from every time step, just needing 1 min longer to solve.

🔧 Checklist for PR creator 🔧

  • 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

    • High risk:
      • Run test runs via Rscript start.R --> "test runs"
      • Check logs for errors/warnings
      • Default run from the PR target branch for comparison
      • Provide relevant comparison plots (land-use, emissions, food prices, land-use intensity,...)

📉 Performance changes 📈

  • Current develop branch default : 0.53 h
  • This PR's default : 0.80 h

🚨 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
  • content review done (at least 1)
  • RSE review done (at least 1)

@k4rst3ns k4rst3ns added help wanted Extra attention is needed High risk Higher risk bugfix labels Sep 8, 2025
@georg-schroeter georg-schroeter changed the base branch from master to develop September 8, 2025 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix help wanted Extra attention is needed High risk Higher risk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant