Skip to content

Commit c60a037

Browse files
committed
Scatterline for epost(t)
1 parent cbfb115 commit c60a037

File tree

2 files changed

+59
-5
lines changed

2 files changed

+59
-5
lines changed

configs/local/fno_1.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
docreatedata: true
2+
docomp: false
3+
ntrajectory: 8
4+
T: "Float32"
5+
params:
6+
D: 2
7+
lims: [0.0, 1.0]
8+
Re: 6000.0
9+
tburn: 0.5
10+
tsim: 2.0
11+
savefreq: 100
12+
ndns: 1024
13+
nles: [32]
14+
filters: ["FaceAverage()"]
15+
icfunc: "(setup, psolver, rng) -> random_field(setup, T(0); kp=20, psolver, rng)"
16+
method: "RKMethods.Wray3(; T)"
17+
bodyforce: "(dim, x, y, t) -> (dim == 1) * 5 * sinpi(8 * y)"
18+
issteadybodyforce: true
19+
processors: "(; log = timelogger(; nupdate=100))"
20+
Δt: 0.0001
21+
seeds:
22+
dns: 12345
23+
θ_start: 234
24+
prior: 345
25+
post: 456
26+
closure:
27+
name: "fno_1"
28+
type: fno
29+
channels: [2, 64, 64, 64, 2]
30+
modes: [16, 16]
31+
activation: "Lux.gelu"
32+
rng: "Xoshiro(seeds.θ_start)"
33+
priori:
34+
dotrain: true
35+
nepoch: 5000
36+
batchsize: 64
37+
opt: "OptimiserChain(Adam(T(1.0e-3)), ClipGrad(0.1))"
38+
do_plot: false
39+
plot_train: false
40+
posteriori:
41+
dotrain: true
42+
projectorders: "(ProjectOrder.Last, )"
43+
nepoch: 300
44+
opt: "OptimiserChain(Adam(T(1.0e-3)), ClipGrad(0.1))"
45+
nunroll: 5
46+
nunroll_valid: 5
47+
dt: T(1e-4)
48+
do_plot: false
49+
plot_train: false

src/plots.jl

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -623,65 +623,70 @@ function plot_epost_vs_t(error_file, closure_name, nles, ax, color, PLOT_STYLES)
623623
x = error_data.nts # use time from error data
624624

625625
# Prior
626-
lines!(
626+
scatterlines!(
627627
ax,
628628
x,
629629
vec(error_data.model_prior);
630630
label = "$closure_name prior (n = $nles)",
631631
color = color,
632632
linestyle = PLOT_STYLES[:prior].linestyle,
633633
linewidth = PLOT_STYLES[:prior].linewidth,
634+
marker = :circle,
634635
)
635636

636637
# Post
637-
lines!(
638+
scatterlines!(
638639
ax,
639640
x,
640641
vec(error_data.model_post);
641642
label = "$closure_name post (n = $nles)",
642643
color = color,
643644
linestyle = PLOT_STYLES[:post].linestyle,
644645
linewidth = PLOT_STYLES[:post].linewidth,
646+
marker = :circle,
645647
)
646648

647649
# Smagorinsky (optional)
648650
if haskey(error_data, Symbol("smag"))
649-
lines!(
651+
scatterlines!(
650652
ax,
651653
x,
652654
vec(error_data.smag);
653655
label = "$closure_name smag (n = $nles)",
654656
color = PLOT_STYLES[:smag].color,
655657
linestyle = PLOT_STYLES[:smag].linestyle,
656658
linewidth = PLOT_STYLES[:smag].linewidth,
659+
marker = :circle,
657660
)
658661
end
659662

660663
if closure_name == "INS_ref"
661664
label = "No model"
662665
if _missing_label(ax, label) # add No closure only once
663-
lines!(
666+
scatterlines!(
664667
ax,
665668
x,
666669
vec(error_data.nomodel);
667670
label = label,
668671
linestyle = PLOT_STYLES[:no_closure].linestyle,
669672
linewidth = PLOT_STYLES[:no_closure].linewidth,
670673
color = PLOT_STYLES[:no_closure].color,
674+
marker = :circle,
671675
)
672676
end
673677
end
674678

675679
label = "No model (projected dyn)"
676680
if _missing_label(ax, label) # add No closure only once
677-
lines!(
681+
scatterlines!(
678682
ax,
679683
x,
680684
vec(error_data.nomodel);
681685
label = label,
682686
linestyle = PLOT_STYLES[:no_closure_proj].linestyle,
683687
linewidth = PLOT_STYLES[:no_closure_proj].linewidth,
684688
color = PLOT_STYLES[:no_closure_proj].color,
689+
marker = :circle,
685690
)
686691
end
687692

0 commit comments

Comments
 (0)