Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

estimate_PotNatVeg_composition() produces negative cover values #219

Closed
dschlaep opened this issue Nov 10, 2022 · 1 comment
Closed

estimate_PotNatVeg_composition() produces negative cover values #219

dschlaep opened this issue Nov 10, 2022 · 1 comment

Comments

@dschlaep
Copy link
Member

@N1ckP3rsl3y identified that it incorrectly returns negative cover values if fixed cover inputs that include "SumGrasses_Fraction" sum up > 1.
* Correct code so that it includes a fixed SumGrasses_Fraction in the check that fixed input cover adds up to <= 1
* For instance:

clim2 <- calc_SiteClimate(weatherList = rSOILWAT2::weatherData, do_C4vars = TRUE)

estimate_PotNatVeg_composition(
  MAP_mm = 10 * clim2[["MAP_cm"]],
  MAT_C = clim2[["MAT_C"]],
  mean_monthly_ppt_mm = 10 * clim2[["meanMonthlyPPTcm"]],
  mean_monthly_Temp_C = clim2[["meanMonthlyTempC"]],
  dailyC4vars = clim2[["dailyC4vars"]],
  fix_shrubs = TRUE,
  Shrubs_Fraction = 0.5,
  fix_sumgrasses = TRUE,
  SumGrasses_Fraction = 0.7
)

with output (note negative forb cover!)

$Rel_Abundance_L0
     Succulents           Forbs      Grasses_C3 
            0.0            -0.2             0.7 
     Grasses_C4 Grasses_Annuals          Shrubs 
            0.0             0.0             0.5 
          Trees      BareGround 
            0.0             0.0 
@dschlaep dschlaep added the bug label Nov 10, 2022
dschlaep added a commit that referenced this issue Nov 10, 2022
…SumGrasses_Fraction" leads to fixed > 1

- addressing #219:  include a fixed SumGrasses_Fraction in the check that fixed input cover adds up to <= 1
dschlaep added a commit that referenced this issue Nov 10, 2022
- 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
dschlaep added a commit that referenced this issue Nov 15, 2022
- include fixes for #218 and #219 in comparison
- provide example output before/after #218 and #219
@dschlaep
Copy link
Member Author

dschlaep commented Jun 9, 2023

closed by #214 (v6.0.0)

@dschlaep dschlaep closed this as completed Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants