@@ -31,6 +31,9 @@ function one_degree_near_global_simulation(architecture = GPU();
31
31
initial_conditions = datadep " near_global_one_degree/initial_conditions_month_01_360_150_48.jld2" ,
32
32
bathymetry_path = datadep " near_global_one_degree/bathymetry_lat_lon_360_150.jld2" ,
33
33
surface_boundary_conditions_path = datadep " near_global_one_degree/surface_boundary_conditions_12_months_360_150.jld2" ,
34
+ biogeochemistry = NoBiogeochemistry,
35
+ biogeochemistry_kwargs = (),
36
+ progress_callback = false ,
34
37
)
35
38
36
39
size == (360 , 150 , 48 ) || throw (ArgumentError (" Only size = (360, 150, 48) is supported." ))
@@ -104,7 +107,7 @@ function one_degree_near_global_simulation(architecture = GPU();
104
107
105
108
vitd = VerticallyImplicitTimeDiscretization ()
106
109
107
- horizontal_κ = (T = 0 , S = 0 , e = horizontal_tke_diffusivity)
110
+ horizontal_κ = merge ( NamedTuple {tracers} ([ 0 for tracer in tracers]), (e = horizontal_tke_diffusivity, ) )
108
111
horizontal_diffusivity = HorizontalScalarDiffusivity (ν= horizontal_viscosity, κ= horizontal_κ)
109
112
vertical_viscosity = VerticalScalarDiffusivity (vitd, ν= νz, κ= background_vertical_diffusivity)
110
113
@@ -186,7 +189,7 @@ function one_degree_near_global_simulation(architecture = GPU();
186
189
187
190
equation_of_state = TEOS10EquationOfState (; reference_density)
188
191
buoyancy = SeawaterBuoyancy (; equation_of_state)
189
- coriolis = HydrostaticSphericalCoriolis (scheme = ActiveCellEnstrophyConservingScheme () )
192
+ coriolis = HydrostaticSphericalCoriolis ()
190
193
free_surface = ImplicitFreeSurface ()
191
194
192
195
@info " Building a model..." ; start= time_ns ()
@@ -195,7 +198,8 @@ function one_degree_near_global_simulation(architecture = GPU();
195
198
momentum_advection = VectorInvariant (),
196
199
tracer_advection = WENO (underlying_grid),
197
200
closure = closures,
198
- boundary_conditions = (u= u_bcs, v= v_bcs, T= T_bcs, S= S_bcs))
201
+ boundary_conditions = (u= u_bcs, v= v_bcs, T= T_bcs, S= S_bcs),
202
+ biogeochemistry = biogeochemistry (; grid, biogeochemistry_kwargs... ))
199
203
200
204
@info " ... built $model ."
201
205
@info " Model building time: " * prettytime (1e-9 * (time_ns () - start))
@@ -237,7 +241,7 @@ function one_degree_near_global_simulation(architecture = GPU();
237
241
return nothing
238
242
end
239
243
240
- simulation. callbacks[:progress ] = Callback (progress, IterationInterval (10 ))
244
+ progress_callback && ( simulation. callbacks[:progress ] = Callback (progress, IterationInterval (10 ) ))
241
245
242
246
return simulation
243
247
end
0 commit comments