@@ -13,6 +13,9 @@ function test_zstar_coordinate(model, Ni, Δt)
13
13
14
14
∫bᵢ = Field (Integral (bᵢ))
15
15
∫cᵢ = Field (Integral (cᵢ))
16
+ compute! (∫bᵢ)
17
+ compute! (∫cᵢ)
18
+
16
19
w = model. velocities. w
17
20
Nz = model. grid. Nz
18
21
@@ -22,6 +25,8 @@ function test_zstar_coordinate(model, Ni, Δt)
22
25
23
26
∫b = Field (Integral (model. tracers. b))
24
27
∫c = Field (Integral (model. tracers. c))
28
+ compute! (∫b)
29
+ compute! (∫c)
25
30
26
31
# Testing that:
27
32
# (1) tracers are conserved down to machine precision
197
202
end
198
203
end
199
204
end
200
-
201
- @info " Testing a ZStar and Runge Kutta 3rd order time stepping"
202
-
203
- topology = topologies[2 ]
204
- rtg = RectilinearGrid (arch; size = (10 , 10 , 20 ), x = (0 , 100 kilometers), y = (- 10 kilometers, 10 kilometers), topology, z = z_uniform)
205
- llg = LatitudeLongitudeGrid (arch; size = (10 , 10 , 20 ), latitude = (0 , 1 ), longitude = (0 , 1 ), topology, z = z_uniform)
206
- irtg = ImmersedBoundaryGrid (rtg, GridFittedBottom ((x, y) -> rand () - 10 ))
207
- illg = ImmersedBoundaryGrid (llg, GridFittedBottom ((x, y) -> rand () - 10 ))
208
-
209
- for grid in [rtg, llg, irtg, illg]
210
-
211
- split_free_surface = SplitExplicitFreeSurface (grid; cfl = 0.75 )
212
- model = HydrostaticFreeSurfaceModel (; grid,
213
- free_surface = split_free_surface,
214
- tracers = (:b , :c ),
215
- timestepper = :SplitRungeKutta3 ,
216
- buoyancy = BuoyancyTracer (),
217
- vertical_coordinate = ZStar ())
218
-
219
- bᵢ (x, y, z) = x < grid. Lx / 2 ? 0.06 : 0.01
220
-
221
- set! (model, c = (x, y, z) -> rand (), b = bᵢ)
222
-
223
- Δt = 2 minutes
224
- test_zstar_coordinate (model, 100 , Δt)
225
- end
226
205
end
227
- end
206
+ end
0 commit comments