-
Notifications
You must be signed in to change notification settings - Fork 1
/
test_chua.jl
70 lines (60 loc) · 2 KB
/
test_chua.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
using Serialization
using Random
Random.seed!(1234)
include("models.jl")
include("integrators.jl")
include("enoc.jl")
using .Models
using .Integrators
using .enoc
M = 60
D = 3
k = 40
k_r = 30
window = 20
da = false
inflation = 1.0
osc_vars = 1:D
modes = 3:4
model = Models.chua_true
model_err = Models.chua_err
integrator = Integrators.rk4
outfreq = 1
Δt = 0.1
m = 20
cycles = 1000
record_length = 25000
ens_err_pct = 0.2
obs_err_pct = 0.1
transient = 3000
mp = 5
y0 = [-1.06095, 0.160678, 0.267729]
varimax = true
check_bounds = true
test_time = 10.0
y_fcst = true
α = 0.5
if !da
info, ssa_info = enoc.run(model=model, model_err=model_err, M=M, D=D, k=k,
k_r=k_r, modes=modes, osc_vars=osc_vars,
integrator=integrator, outfreq=outfreq, Δt=Δt,
m=m, cycles=1000, window=window,
record_length=record_length,
ens_err_pct=ens_err_pct, obs_err_pct=obs_err_pct,
transient=transient, y0=y0, mp=mp,
varimax=varimax, da=false, inflation=inflation,
check_bounds=check_bounds, y_fcst=y_fcst, α=α,
preload="chua")
mp = argmin(enoc.optimal_ens(info)[1])[1]
end
Random.seed!(1234)
info, ssa_info = enoc.run(model=model, model_err=model_err, M=M, D=D, k=k,
k_r=k_r, modes=modes, osc_vars=osc_vars,
integrator=integrator, outfreq=outfreq, Δt=Δt, m=m,
cycles=cycles, window=window,
record_length=record_length, ens_err_pct=ens_err_pct,
obs_err_pct=obs_err_pct, transient=transient, y0=y0,
mp=mp, varimax=varimax, da=da, inflation=inflation,
check_bounds=check_bounds, y_fcst=y_fcst, α=α,
preload="chua")
serialize(open(string("out_chua_", ARGS[1]), "w"), info)