traitecoevo / plant

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

Interpolate size distributions to specified heights and times #321

Open dfalster opened 2 years ago

dfalster commented 2 years ago

The solver returns size distributions at times and sizes determined by the adaptive solver. The user will likely want these at specific times or heights.

itowers1 commented 2 years ago

interpolate_to_times yields extremely small negative values for mostly fecundity at time=1 and in one instance area_heartwood, mass_heartwood. Truncate at zero?

itowers1 commented 2 years ago

Mortality apparently unsuccessfully interpolated for species 1 with respect to height. Mortality(step=150, height=c(1,5,10)) is NaN.

data_combined_long %>% filter(!is.na(cohort)) %>% ggplot() + geom_line(aes(height, value, group=step, colour=step)) + geom_point(data = data_combined_long %>% filter(is.na(cohort)), aes(x=height, y=value), col="red")+ facet_grid(name~species, scales="free") + theme_classic()