DrylandEcology/rSOILWAT2

`estimate_PotNatVeg_composition` fails if all fixed cover sums to 1 and grass sub-components are to be estimated only

Closed this issue · 1 comments

Bug introduced with v3.17 (https://github.com/DrylandEcology/rSOILWAT2/releases/tag/v3.1.7) with the enhancement of the function estimate_PotNatVeg_composition: ability to fix total grass cover.

Function fails with error

'estimate_PotNatVeg_composition': The estimated vegetation cover values are 0, the user fixed relative abundance values sum to less than 1, and bare-ground is fixed. Thus, the function cannot compute complete land cover composition.

if all cover components are fixed (and sum to 1) except for grass components that are to be estimated to sum to the fixed SumGrasses_Fraction.

This issue still arises in a case when all fixed cover sums to 1, SumGrasses_Fraction = 0 and fixed, and grass sub-components are to be estimated.