diff --git a/ENDA.py b/ENDA.py index d3074a73c41ff59e35a6d711411ec845498f915a..17368f29a77fc53ab50ab1d623ee76f5088bd6c7 100644 --- a/ENDA.py +++ b/ENDA.py @@ -342,8 +342,16 @@ class cycle: xbp = x0.T-xbm x0 = (xbm+xbp*(1.+inflation_factor)).T - # Store posterior and save initial conditions for next cycle + # Store posterior 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) # Store the output