magpie icon indicating copy to clipboard operation
magpie copied to clipboard

revision forestry implementation

Open flohump opened this issue 9 months ago • 0 comments

:bird: Description of this PR :bird:

I revised the forestry implementation in 32_forestry follows:

  • renamed from dynamic_feb21 to dynamic_may24
  • no calibration of timber yields / carbon stocks
  • equal distribution of plantation area to age-classes based on rotation length
  • Poulter AC distribution in secdforest
  • plantations harvest is enforced once rotation age has been reached
  • all harvested plantations will go to establishment at cell level, unless future demand is smaller than current demand. This is some kind of sticky forestry to avoid strong jumps in patterns.
  • additional plantation establishment is based on future demand (current was used so far) and a global increasing share for the contribution of plantations to fulfilling wood demand. Here, the model has a high degree of freedom to go into cells with high yields.
  • I added discounted future production costs (PV) for the establishment decision to the costs (but it has almost no effect)
  • The following regional calibration factors are no longer used: growing stock, regional average yield, plantation contribution. These come from the pre-processing but some are hard-coded for the H12 regions (in particular plantation contribution), i.e. they will not work for other regional setups.
  • I added a lower bound of 50 USD/ton on trade margins in all regions to avoid unrealistic exports, especially from EUR. This avoids a decline of growing stocks due to excessive exports.
  • I also found and fixed some bugs, e.g. related to the future demand calculation

With this setup the model is feasible. Production from heaven is fixed to zero. No missing land for establishment. There is some additional trade for feasibility for MEA, and for EUR after 2050.

  • The equal distribution of age-classes at the beginning together with the replanting assumption makes sure that in each time step wood can be harvested.
  • At global and regional level, plantation establishment is broadly comparable to the current version.
  • Harvest yields are of course much lower.
  • The same holds true for harvest and regrowth emissions of plantations.

changed

  • 32_forestry revision and simplification of forestry implementation, renamed realization from dynamic_feb21 to dynamic_may24
  • default.cfg ForestryEndo as default setting

removed

  • 14_yields removed interface pm_timber_yield_initial, no longer needed
  • 21_trade removed interface pm_selfsuff_ext, no longer needed

:wrench: Checklist for PR creator :wrench:

  • [x] Label pull request from the label list.

    • Low risk: Simple bugfixes (missing files, updated documentation, typos) or changes in start or output scripts
    • Medium risk: Uncritical changes in the model core (e.g. moderate modifications in non-default realizations)
    • High risk: Critical changes in model core or default settings (e.g. changing a model default or adjusting a core mechanic in the model)
  • [x] 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)
  • [x] 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
  • [x] Perform test runs

    • Low risk:
      • Run a compilation check via Rscript start.R --> "compilation check"
    • Medium risk:
      • Run test runs via Rscript start.R --> "test runs"
      • Check logs for errors/warnings
    • 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,...)

:chart_with_downwards_trend: Performance changes :chart_with_upwards_trend:

  • Current develop branch default : ** mins
  • This PR's default : ** mins

:rotating_light: Checklist for reviewer :rotating_light:

  • 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)

flohump avatar May 10 '24 13:05 flohump