traitecoevo / plant

Trait-Driven Models of Ecology and Evolution :evergreen_tree:
https://traitecoevo.github.io/plant
53 stars 20 forks source link

k93 model failing -- need to set seed rain #287

Closed dfalster closed 3 years ago

dfalster commented 3 years ago

@kunstler reports that in v2.0.0, the k93 strategy fails to run:

library(plant)
p0 <- scm_base_parameters("K93")
p1 <- expand_parameters(trait_matrix(0.0825, "b_0"), p = p0, mutant = FALSE)
data1 <- run_scm_collect(p1)
> Error in SCM___K93__K93_Env__run_next(self) :
  Environmental interpolator has gone out of bounds, try lowering the extinction coefficient k_I

We've encountered this problem before: k_I needs to be set to a lower value. This was in the test but that i commented out https://github.com/traitecoevo/plant/blob/develop/tests/testthat/test-strategy-k93.R#L75

So we should update:

Thanks @kunstler for noticing this!

aornugent commented 3 years ago

Related #229 - I got a bit stuck on point 3 as it seems to rely on Parameters for default values. Will investigate further.