Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add new cohorts later in simulation #42

Closed
trotsiuk opened this issue Jan 22, 2021 · 2 comments
Closed

add new cohorts later in simulation #42

trotsiuk opened this issue Jan 22, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@trotsiuk
Copy link
Owner

From @DavidForrester
I could not add new cohorts or species to a simulation. For
example, if a simulation starts in 1905 (and should end in 2017), but one
species does not occur until 1979, the simulation does not begin. I have
added a script that shows this problem occurring - the input file is
"1015001_input_regeneration.xlsx".

1015001_input_regeneration.xlsx

Examples.txt

@trotsiuk trotsiuk added the bug Something isn't working label Feb 4, 2021
@trotsiuk trotsiuk self-assigned this Feb 4, 2021
@trotsiuk
Copy link
Owner Author

trotsiuk commented Feb 5, 2021

##DONE @DavidForrester

image

@DavidForrester
Copy link
Collaborator

I reinstalled r3PG (the description file shown in RStudio says “Built: R 3.6.3; x86_64-w64-mingw32; 2021-02-03 21:44:06 UTC; windows”.

When I ran the input file
1015001_input_regeneration.xlsx

the graphs did not display. Am I doing something wrong? The script I used to run this is:

f_loc <- paste(fileLocation,"1015001_input_regeneration.xlsx", sep="")

out_3PG <- run_3PG(site = read_xlsx(f_loc, 'site'),
species = read_xlsx(f_loc, 'species'),
climate = prepare_climate(climate = read_xlsx(f_loc, 'climate'),
from = read_xlsx(f_loc, sheet = 'site')$from,
to = read_xlsx(f_loc, sheet = 'site')$to),
thinning = read_xlsx(f_loc, 'thinning'),
parameters = read_xlsx(f_loc, 'parameters'),
size_dist = read_xlsx(f_loc, 'sizeDist'),
settings = list(light_model = 2, transp_model = 2, phys_model = 2,
height_model = 2, correct_bias = 1, calculate_d13c = 0),
check_input = TRUE, df_out = TRUE)

sel_var <- c('biom_incr_stem', 'f_tmp')

out_3PG %>%
filter( variable %in% sel_var ) %>%
ggplot( aes(date, value, color = species) ) +
geom_line() +
facet_wrap(~variable, scales = 'free') +
theme_classic()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants