Skip to content

BiomeE attenuate aggressive cohort fusion#327

Open
fabern wants to merge 12 commits into
masterfrom
biomee-attenuate-aggress-cohort-fusion
Open

BiomeE attenuate aggressive cohort fusion#327
fabern wants to merge 12 commits into
masterfrom
biomee-attenuate-aggress-cohort-fusion

Conversation

@fabern
Copy link
Copy Markdown
Member

@fabern fabern commented Feb 16, 2026

This branch:

  • tests if number of max cohorts leads to less aggressive fusion of cohorts for transient simulation
  • fixes bug in output on cohort level of seedC, leafC, rootC, sapwoodC, heartwoodC, and NSN (BiomeE cohort output mixes variable names #325)

@fabern fabern changed the title Biomee attenuate aggress cohort fusion Biomee attenuate aggressive cohort fusion Feb 16, 2026
@fabern fabern changed the title Biomee attenuate aggressive cohort fusion BiomeE attenuate aggressive cohort fusion Feb 16, 2026
@fabern fabern marked this pull request as draft February 16, 2026 14:37
Previously, cohorts within 20% relative DBH difference were merged. This has been reduced to 2%, with the aim to enable comparison with observed size distributions.
Thereby removing the more complicated relative threshold applied previously.
Colum order of these variables was wrong:
"NSN","seedC","leafC","rootC","sapwoodC","heartwoodC"
Caused by warning:
! `case_match()` was deprecated in dplyr 1.2.0.
i Please use `recode_values()` instead.
── Failure ('test-model-runs.R:64:3'): biomee output check (gs leuning) ────────
Expected `all.equal(...)` to be TRUE.
Differences:
`actual` is a character vector ('Mean relative difference: 0.0002914499')
`expected` is a logical vector (TRUE)
Following deprecation warnings starting with devtools 2.5.0 and following the instructions on
https://devtools.r-lib.org/reference/install-deprecated.html
@fabern fabern marked this pull request as ready for review March 16, 2026 17:11
@fabern
Copy link
Copy Markdown
Member Author

fabern commented Mar 16, 2026

This can be merged into the main branch.
The main branch contains the development version for the next release.

Note: CI issue on ubuntu-lates (oldrel-1) is unrelated to code update and we should merge regardless.

@stineb, please have a look at the changes. They are summarised in NEWS.md:

rsofun/NEWS.md

Lines 2 to 6 in adb62a5

* BiomeEP:
* Bugfix: annual, cohort-level output had mixed up column names for variables:
`NSN`,`seedC`,`leafC`,`rootC`,`sapwoodC`,`heartwoodC`
* Cohorts are now less aggressively merged. Merging criteria was simplified from
relative to absolute DBH difference. Now merging if difference <= 0.01 m.

@fabern fabern requested a review from stineb March 16, 2026 17:51
@fabern
Copy link
Copy Markdown
Member Author

fabern commented Mar 18, 2026

  • check what this now means for small DBH cohorts. Privously this was 10% relative. So now with 1cm fusion is more aggressive. While for large DBH cohorts it becaem less aggressive.

@stineb
Copy link
Copy Markdown
Collaborator

stineb commented Mar 18, 2026

To do: tests, avoid excessive merging of small cohorts (ingrowth) when growth is <1 cm/yr. Implications of relative vs absolute merging criterium for dynamics? Relative may be more robust for dealing with small cohorts (understorey growth) and under conditions of generally low growth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants