DrylandEcology / rSOILWAT2

A R package for SOILWAT2
GNU General Public License v3.0
10 stars 4 forks source link

`estimate_PotNatVeg_composition()` does not apply correction for C4 grasses as documented #218

Closed dschlaep closed 1 year ago

dschlaep commented 2 years ago

@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.

Correct code seems to be if (!is.null(dailyC4vars)) ...

dschlaep commented 1 year ago

closed by #214 (v6.0.0)