You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I have worked a bit on the random walk behaviour and the engines to generate random numbers in opendrift doesn't satisfy numpy recommendations anymore.
I am suggesting to create a self.rng=np.random.default_rng(seed=12345) The Seed sequence number could also be modified by a config parameter.
This is as simple as elements.Dx= rng.normal(0,1,nb_timesteps) elements.Dy= rng.normal(0,1,nb_timesteps) elements.Dz= rng.uniform(-1,1,nb_timesteps_vert_mixing)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I have worked a bit on the random walk behaviour and the engines to generate random numbers in opendrift doesn't satisfy numpy recommendations anymore.
I am suggesting to create a
self.rng=np.random.default_rng(seed=12345)
The Seed sequence number could also be modified by a config parameter.This is as simple as
elements.Dx= rng.normal(0,1,nb_timesteps)
elements.Dy= rng.normal(0,1,nb_timesteps)
elements.Dz= rng.uniform(-1,1,nb_timesteps_vert_mixing)
Beta Was this translation helpful? Give feedback.
All reactions