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

Inconsistent behavior of generated weather among cells in gridded mode if random seed is 0 #553

Open
dschlaep opened this issue Jul 24, 2023 · 0 comments

Comments

@dschlaep
Copy link
Member

I added a script with commit 959f4fc that tests reproducibility expectations as formulated with PR #528 (and see documentation and code comments of set_all_rngs().

I think we should clarify what the expected behavior of weather among gridcells in gridded mode if random seed is 0 should be (a seed of 0 signals non-reproducible random number sequences):

  1. Should weather be identical among cells (for a given run) in gridded mode even if random seed is 0?, or
  2. Should weather vary among cells in gridded mode if random seed is 0? [The script currently tests for this behavior.]

Either way, the current implementation fails because some gridcells produce identical weather and other gridcells produce (awkwardly [see below]) different weather with a random seed of 0.

I tested this on branch "Seed_Dispersal" (commit b995a9d; June 22, 2023) and on branch "master" (commit 04fb112; June 20, 2023).

tools/check_STEPWAT2.sh

#-----------------------------------------------------------------------
#--- * if seed == 0 (output cannot be reproduced among runs) ------
#- Set model.in: 2 100 0 (niter, nyrs, seed)

#--- ** weather is different among cells ------
[1] FALSE FALSE TRUE

or

#-----------------------------------------------------------------------
#--- * if seed == 0 (output cannot be reproduced among runs) ------
#- Set model.in: 2 100 0 (niter, nyrs, seed)

#--- ** weather is different among cells ------
[1] FALSE TRUE TRUE


*awkwardly different

Rplot
Rplot01

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant