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

Default eviction correction #11

Closed kunstler closed 1 year ago

kunstler commented 1 year ago

I think it would be better to set the default eviction correction to "none". This is what was used in Arnaud's paper.

If you use any one of the other correction, you end up with an accumulation of individuals in the largest size class. It is better to assume that trees that grow over this maximum size die.

See

Picea_ipm <- make_IPM(
  species = "Picea_abies", 
  climate = climate, 
  fit = fit_Picea_abies,
  clim_lab = "optimum clim", 
  correction = "none",
  mesh = c(m = 700, L = 90, U = get_maxdbh(fit_Picea_abies) * 1.1),
  BA = 0:60, # Default values are 0:200, smaller values speed up this vignette.
  verbose = TRUE
)

Picea_sp <- species(IPM = Picea_ipm, init_pop = def_initBA(30))

Picea_sp$IPM$info

# Do simulation with no specific harvesting
Picea_for <- forest(species = list(Picea = Picea_sp))
set.seed(42) # The seed is here for initial population random functions.
Picea_sim <- sim_deter_forest(
  Picea_for, 
  tlim = 1000, 
  equil_time = 1500, equil_dist = 100, equil_diff = 1,
  SurfEch = 0.03,
  verbose = TRUE
)

# Get equilibrium size distribution
distrib_equil <- Picea_sim %>% 
  dplyr::filter(grepl("n", var), equil, size !=0) %>%
  dplyr::pull(value)

# NOTE : this distribution is given per ha and we need it for SurfEch = 0.03.
distrib_equil <- distrib_equil * 0.03
meshs <- Picea_ipm$mesh[Picea_ipm$mesh!= 0]
plot(meshs, distrib_equil, type = "b", xlab = "dbh (mm)", ylab = "density")

Picea_ipm <- make_IPM(
  species = "Picea_abies", 
  climate = climate, 
  fit = fit_Picea_abies,
  clim_lab = "optimum clim", 
  mesh = c(m = 700, L = 90, U = get_maxdbh(fit_Picea_abies) * 1.1),
  BA = 0:60, # Default values are 0:200, smaller values speed up this vignette.
  verbose = TRUE
)

Picea_sp <- species(IPM = Picea_ipm, init_pop = def_initBA(30))

# Do simulation with no specific harvesting
Picea_for <- forest(species = list(Picea = Picea_sp))
set.seed(42) # The seed is here for initial population random functions.
Picea_sim <- sim_deter_forest(
  Picea_for, 
  tlim = 1000, 
  equil_time = 1500, equil_dist = 100, equil_diff = 1,
  SurfEch = 0.03,
  verbose = TRUE
)

# Get equilibrium size distribution
distrib_equil <- Picea_sim %>% 
  dplyr::filter(grepl("n", var), equil, size !=0) %>%
  dplyr::pull(value)

# NOTE : this distribution is given per ha and we need it for SurfEch = 0.03.
distrib_equil <- distrib_equil * 0.03
lines(meshs, distrib_equil, col = "red", lty= 2)

Rplot

black points and lines are with correction "none" and red dotted line with constant.

This should also be better for @jbarrere3 simuls ... but wont probably change much

gowachin commented 1 year ago

There was 2 different settings for the correction parameter :

The cut option will set the last column of the IPM to null values (0) and "kill" all trees in the last size class.

In scripts I have, the default settings where "constant" in make_FullIPM_iClim() and "none" in Run_Sim_NonDem_NL(). However the second setting was set to "cut" in the planMetrics.R file.

May I change the second setting to "cut" by default, this looks fine below :

# Do simulation with no specific harvesting
Picea_for <- forest(species = list(Picea = Picea_sp))
set.seed(42) # The seed is here for initial population random functions.
Picea_sim <- sim_deter_forest(
    Picea_for, 
    tlim = 1000, 
    equil_time = 1500, equil_dist = 100, equil_diff = 1,
    SurfEch = 0.03,
    verbose = TRUE, 
    correction = "cut"
)

# Get equilibrium size distribution
distrib_equil <- Picea_sim %>% 
    dplyr::filter(grepl("n", var), equil, size !=0) %>%
    dplyr::pull(value)

# NOTE : this distribution is given per ha and we need it for SurfEch = 0.03.
distrib_equil <- distrib_equil * 0.03
lines(meshs, distrib_equil, col = "green", lty= 2)

image

gowachin commented 1 year ago

I'm not sure if the equilibrium is not modified with this correction settings. Having so many individual in the last size class may shift the basal area at equilibrium. Both line use "constant" correction. image

kunstler commented 1 year ago

Ok I think it is fine to put the option cut.It is normal that the ba is lower.Le 3 mars 2023 à 18:36, Maxime Jaunatre @.***> a écrit : I'm not sure if the equilibrium is not modified with this correction settings. Having so many individual in the last size class may shift the basal area at equilibrium. Both line use "constant" correction.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were assigned.Message ID: @.***>

gowachin commented 1 year ago

Previous implementations : https://github.com/kunstler/FUNDIV_sAPROPOS/issues/43 and https://github.com/kunstler/FUNDIV_sAPROPOS/issues/46

gowachin commented 1 year ago

Merged on v0.3.0