gowachin / matreex

LESSEM internal package for simulation of forest dynamic depending on climatic variables
https://gowachin.github.io/matreex/
Other
3 stars 0 forks source link

Mixture effect for biotic disturbance with coniferous. #17

Closed gowachin closed 5 months ago

gowachin commented 11 months ago

In case of biotic disturbance, the coniferous mortality must be modified according to results provided by @jasperfuchs.

I edited the package in order to match this case and this Rmd file showcase an usage.

This solution is still experimental and present with the dev version of the package.

In order to work, it require a slightly edited disturbance function as well as a specification of the species as "Coniferous". "Broadleaf" species are not affected. By default, all species are "Broadleaf" if the user does not specify anything. I can set the default to "NA" or check the value in a csv file present in the package where I set all the fitted species type.

My point of view is that it mostly depend on the user to define the correct disturb_fun and none is provided by the package.

Is the implementation correct ?

jbarrere3 commented 11 months ago

Looks good to me, the Rmd file helps a lot. On the long run, it might be better to have something that makes more sense biologically speaking than manually assigning broadleaf or conifer. For instance, would it be possible to have the type by defaut (conifer or broadleaf), and add a parameter in the defaut disturb_fun (e.g., mixture_effect = TRUE) ? Or just store the alternative disturb_fun you have in the Rmd file, rename it disturb_fun_mixture so that we can easily assign it to species objects when we want to activate the option ?

gowachin commented 11 months ago

My plan is to put this Rmd file as a Package vignette, with more text and explanations. At this point, I'll see which function to store in the package or if it's just present as documentation.

I could also create a function that takes a forest or species, return it with a modification of the type and disturbance function.

jasperfuchs commented 11 months ago

Looks good from my point of view. I checked the implementation of the mixture-effect function, it looks as we would have expected and, based on the example, seems to implement the desired effect. I also find the Rmd very helpful. Thanks for that. For us, it doesn’t matter how to switch the mixture effect on/off, but Julien's suggestions sound reasonable.

When you revise the Rmd, it might be useful to add some information about the mixture effect, maybe a reference, such as "derived based on the survival models by Brandl et al. 2020, J. For. Ecol. Manag. 458, 117652', and we should point out that the actual linear function is scaled to the data used in Julien's model, i.e. it’s not directly applicable if you use other disturbance probabilities. Let me know if you need text contributions.

gowachin commented 9 months ago

I edited the Rmd in order to have a vignette for the pkg. Feel free to review it, I'll accept text contribution if you find it usefull @jasperfuchs . This vignette have been reviewed by @jbarrere3 .

The file is here in the vignette directory (dev branch)