`estimate_PotNatVeg_composition()` does not apply correction for C4 grasses as documented
Closed this issue · 1 comments
dschlaep commented
@N1ckP3rsl3y identified that the C4 grass cover estimate does not behave according to documentation.
Documentation states that C4 grass cover is estimated from Paruelo & Lauenroth 1996; if the equation by Teeri & Stowe 1976 suggests, however, absence of any C4 species, then C4 grass cover is set to 0% as well.
The bug resulted that the Teeri & Stowe 1976 equation was not considered, i.e., the truncation to 0% C4 grass cover when no C4 species should occur was not applied. This bug potentially leads to a larger geographic area with >0% C4 grass cover than the documentation suggested.
- The current code uses
if (is.list(dailyC4vars)) ...
to check if argument "dailyC4vars" contains appropriate values for applying the Teeri & Stowe 1976 correction; however, this is incorrect as it always yieldsFALSE
because argumentdailyC4vars
is a named vector (and not a list) - Current code with bug since Oct 27, 2018 (bd70622); function was originally in
rSFSW2
but without this bug (DrylandEcology/rSFSW2@v3.1.5...v4.0.0; DrylandEcology/rSFSW2@7376a0c)
Correct code seems to be if (!is.null(dailyC4vars)) ...