Closed Rasilgon closed 2 years ago
It's not entirely clear, but I believe "premature end of simulation" is referring to 1) Picea abies traces stopping at 2023 and 2) Fagus sylvatica stopping at 2034. The obvious event at the start of 2024 is Picea abies turns 42 and gets thinned. If I pass NULL for t_thinning
both species continue to 2090 as configured in t_site
.
This suggests to me this issue might be, so far as r3PG is concerned, another flavor of #73 as the age 42 thin specifies a stem mortality ratio of 113. So thinning spruce from 744.6 to 713 TPH is going to remove the stem biomass for up to 3571 average trees per hectare. It seems unlikely the stand structure is such that it's possible to thin from above this aggressively without removing all trees.
The Fagus sylvatica root, stem, and foliage management multipliers are also elevated so I suspect the reason for output stopping in 2034 is that, with Picea abies removed, a similar removal gets triggered in beech.
Assuming I'm in the right direction here, it may be helpful to log mort_manag
into the output to make this more diagnosable. I also suspect this bit of run_3PG.R
is suppressing the Picea abies traces once it goes to stems_n
= 0.
# Remove the values for dead cohort or not recruited cohort
remove_sim_arr <- array(r3PG_out[,,2,2] <= 0 | r3PG_out[,,2,1] < 0, dim=dim(r3PG_out))
@twest820 thank you for the quick identification of the issue! Indeed, I think the issue is coming from the t_thinning
and suggestion for #73 is very valuable in this aspect.
@Rasilgon the stem, root, foliage
shall indicate the ration at which those stem parts need to be thinned (usually around 1), but not the actual values of biomass (as currently present in the t_thinning
). page 10 of the original 3PG manual
Residual stocking (trees ha-1) after thinning at the nominated age, and biomass pools of each tree removed by the thinning, expressed as a fraction of the foliage, root and stem biomass of an average single tree in the stand at thinning. Fractions greater than 1 simulate thinning from above.
P.S. Sorry for low responsiveness due to personal issues, shall be more available soon
Hi @trotsiuk and @twest820 ! Thanks, yes, you are totally right. There was a bug in the code that created the thinning plan. Sorry, I should have checked better the input data. Anyway, thanks for taking the time :)
Hi all, comment from me: regardless, I would prefer keeping the simulation running and output 0, instead of stopping. This will avoid errors down the line (e.g. when using the model in a larger pipeline).
Hi Florian and all, this is related to the pull request from @JohannesOberpriller https://github.com/trotsiuk/r3PG/pull/60 . The simulation is running but output is NA instead of 0. Please see the discussion there and potentially extend it.
When testing r3PG with different initial conditions, I sometimes obtained an output like the one below. In this specific case, the simulation should have ended in 2090, but it did in 2031. In all similar situations, I assume that the simulations ends because all trees died, However, none of the mortalities show that trees died.
I would like to know if it is correct to assume that the simulation ended because all trees died. If so, it looks like a sudden death of all trees, which is very impressive. Besides, I feel that is confusing there is no mortality happening, which would indicate that all trees are dying or died. Is this the expected behaviour of the model?
If the simulation end is not related to mortality, I would appreciate if you have any other ideas about what can be causing such model behaviour. The data is here, but as I said before, it happened already with other input data.
Code