Skip to content

Commit c1cc8f5

Browse files
authored
Increase timestep for the one-degree global simulation (#585)
* increase timesteps a bit * Update one_degree_simulation.jl
1 parent b4e7d54 commit c1cc8f5

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

examples/one_degree_simulation.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ grid = ImmersedBoundaryGrid(underlying_grid, GridFittedBottom(bottom_height);
5151
# parameterization. We also include some explicit horizontal diffusivity.
5252

5353
eddy_closure = Oceananigans.TurbulenceClosures.IsopycnalSkewSymmetricDiffusivity(κ_skew=2e3, κ_symmetric=2e3)
54-
horizontal_viscosity = HorizontalScalarDiffusivity=4000)
5554
vertical_mixing = Oceananigans.TurbulenceClosures.CATKEVerticalDiffusivity(minimum_tke=1e-6)
55+
horizontal_viscosity = HorizontalScalarDiffusivity=4000)
5656

5757
# ### Ocean simulation
5858
# Now we bring everything together to construct the ocean simulation.
@@ -78,7 +78,7 @@ seaice = sea_ice_simulation(grid, ocean; advection=tracer_advection)
7878

7979
# ### Initial condition
8080

81-
# We initialize the ocean and sea ice model with data from the ECCO state estimate.
81+
# We initialize the ocean and sea ice models with data from the ECCO state estimate.
8282

8383
date = DateTime(1993, 1, 1)
8484
dataset = ECCO4Monthly()
@@ -92,9 +92,9 @@ set!(seaice.model, h=ecco_sea_ice_thickness, ℵ=ecco_sea_ice_concentration)
9292

9393
# ### Atmospheric forcing
9494

95-
# We force the simulation with an JRA55-do atmospheric reanalysis.
95+
# We force the simulation with a JRA55-do atmospheric reanalysis.
9696
radiation = Radiation(arch)
97-
atmosphere = JRA55PrescribedAtmosphere(arch; backend=JRA55NetCDFBackend(20))
97+
atmosphere = JRA55PrescribedAtmosphere(arch; backend=JRA55NetCDFBackend(80))
9898

9999
# ### Coupled simulation
100100

@@ -106,7 +106,7 @@ atmosphere = JRA55PrescribedAtmosphere(arch; backend=JRA55NetCDFBackend(20))
106106
# flow fields.
107107

108108
coupled_model = OceanSeaIceModel(ocean, seaice; atmosphere, radiation)
109-
simulation = Simulation(coupled_model; Δt=5minutes, stop_time=20days)
109+
simulation = Simulation(coupled_model; Δt=8minutes, stop_time=20days)
110110

111111
# ### A progress messenger
112112
#
@@ -126,7 +126,7 @@ function progress(sim)
126126
step_time = 1e-9 * (time_ns() - wall_time[])
127127

128128
msg1 = @sprintf("time: %s, iter: %d", prettytime(sim), iteration(sim))
129-
msg2 = @sprintf(", max|uo|: (%.1e, %.1e, %.1e) m s⁻¹, ", umax...)
129+
msg2 = @sprintf(", max|uo|: (%.1e, %.1e, %.1e) m s⁻¹", umax...)
130130
msg3 = @sprintf(", extrema(To): (%.1f, %.1f) ᵒC, mean(To(z=0)): %.1f ᵒC", Tmin, Tmax, Tavg)
131131
msg4 = @sprintf(", max(e): %.2f m² s⁻²", emax)
132132
msg5 = @sprintf(", wall time: %s \n", prettytime(step_time))
@@ -144,15 +144,15 @@ add_callback!(simulation, progress, IterationInterval(1000))
144144
# ### Output
145145
#
146146
# We are almost there! We need to save some output. Below we choose to save _only surface_
147-
# fields using the `indices` keyword argument. We save all velocity and tracer components.
147+
# fields using the `indices` keyword argument. We save all the velocity and tracer components.
148148
# Note, that besides temperature and salinity, the CATKE vertical mixing parameterization
149149
# also uses a prognostic turbulent kinetic energy, `e`, to diagnose the vertical mixing length.
150150

151151
ocean_outputs = merge(ocean.model.tracers, ocean.model.velocities)
152152
seaice_outputs = merge((h = seaice.model.ice_thickness,
153153
= seaice.model.ice_concentration,
154154
T = seaice.model.ice_thermodynamics.top_surface_temperature),
155-
seaice.model.velocities)
155+
seaice.model.velocities)
156156

157157
ocean.output_writers[:surface] = JLD2Writer(ocean.model, ocean_outputs;
158158
schedule = TimeInterval(5days),
@@ -174,7 +174,7 @@ seaice.output_writers[:surface] = JLD2Writer(ocean.model, seaice_outputs;
174174

175175
run!(simulation)
176176

177-
simulation.Δt = 20minutes
177+
simulation.Δt = 30minutes
178178
simulation.stop_time = 365days
179179
run!(simulation)
180180

@@ -257,7 +257,7 @@ end
257257
# Finally, we plot a snapshot of the surface speed, temperature, and the turbulent
258258
# eddy kinetic energy from the CATKE vertical mixing parameterization as well as the
259259
# sea ice speed and the effective sea ice thickness.
260-
fig = Figure(size=(1200, 900))
260+
fig = Figure(size=(1200, 1000))
261261

262262
title = @lift string("Global 1ᵒ ocean simulation after ", prettytime(times[$n] - times[1]))
263263

0 commit comments

Comments
 (0)