Skip to content
Snippets Groups Projects
Commit c7fd8e17 authored by Stefano Serafin's avatar Stefano Serafin
Browse files

added a way to simulate error growth between analyses

parent c1d16df8
No related branches found
No related tags found
No related merge requests found
...@@ -342,8 +342,16 @@ class cycle: ...@@ -342,8 +342,16 @@ class cycle:
xbp = x0.T-xbm xbp = x0.T-xbm
x0 = (xbm+xbp*(1.+inflation_factor)).T x0 = (xbm+xbp*(1.+inflation_factor)).T
# Store posterior and save initial conditions for next cycle # Store posterior
analyses[k,:,:] = x0 analyses[k,:,:] = x0
# If you want to add/simulate some error growth in the next cycle,
# perturb the state here.
if isinstance(nr,CBL):
if cbl_settings["simulate_error_growth"]:
x0[:-cbl_settings["parameter_number"],:] += np.random.normal(scale=cbl_settings["error_growth_perturbations_amplitude"],size=nens)[None,:]
# Save initial conditions for next cycle
da.update(x0) da.update(x0)
# Store the output # Store the output
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment