Skip to content

Commit 50988bf

Browse files
authored
Test high res initialization, mask off
1 parent 91823f6 commit 50988bf

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

test/runtests.jl

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,28 @@ using Test
2323
run!(simulation, period=Day(5))
2424
@test simulation.model.feedback.nars_detected == false
2525
end
26+
27+
@testset "Initialize at various resolutions" begin
28+
for trunc in (31, 42, 63, 85, 127, 170, 255, 340)
29+
spectral_grid = SpectralGrid(trunc=trunc, nlev=1)
30+
drag = JetDrag(spectral_grid, time_scale=Day(6))
31+
forcing = StochasticStirring(spectral_grid)
32+
initial_conditions = StartFromRest()
33+
34+
# with barotropic model
35+
model = BarotropicModel(;spectral_grid, initial_conditions, forcing, drag)
36+
simulation = initialize!(model)
37+
end
38+
end
39+
40+
@testset "Mask off" begin
41+
spectral_grid = SpectralGrid(trunc=31, nlev=1)
42+
drag = JetDrag(spectral_grid, time_scale=Day(6))
43+
44+
forcing = StochasticStirring(spectral_grid, mask=false)
45+
model = BarotropicModel(;spectral_grid, initial_conditions, forcing, drag)
46+
simulation = initialize!(model)
47+
48+
run!(simulation, period=Day(5))
49+
@test simulation.model.feedback.nars_detected == false
50+
end

0 commit comments

Comments
 (0)