You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@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 yields FALSE because argument dailyC4vars is a named vector (and not a list)
dschlaep
changed the title
estimate_PotNatVeg_composition() has several bugsestimate_PotNatVeg_composition() does not apply correction for C4 grasses as documented
Nov 10, 2022
…tion to C4 grasses
- addressing #218:
* 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.
- new tests that #218 and #219 are resolved
- current new version of `estimate_PotNatVeg_composition()` does not show #218 but fails with test for #219
@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.
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)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)) ...
The text was updated successfully, but these errors were encountered: