Skip to content

Commit

Permalink
try out correct settings
Browse files Browse the repository at this point in the history
  • Loading branch information
simone-silvestri authored Jan 19, 2025
1 parent 3ec643c commit 63c8f97
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ SeawaterPolynomials = "d496a93d-167e-4197-9f49-d3af4ff8fe40"
CairoMakie = "0.10.12, 0.11, 0.12"
DataDeps = "0.7"
Documenter = "1"
Oceananigans = "0.95.5 - 0.99"
Oceananigans = "0.95.7 - 0.99"
OrthogonalSphericalShellGrids = "0.2.1"
SeawaterPolynomials = "0.3.5"
34 changes: 23 additions & 11 deletions examples/one_degree_simulation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ closure = (eddy_closure, vertical_mixing)
##### Restoring
#####

restoring_rate = 1 / 2days
restoring_rate = 1 / 10days
z_below_surface = z_faces[end-1]

mask = LinearlyTaperedPolarMask(southern=(-80, -70), northern=(70, 90), z=(z_below_surface, 0))
Expand All @@ -71,19 +71,31 @@ forcing = (T=FT, S=FS)
##### Ocean simulation
#####

# No numerical-only closure
momentum_advection = WENOVectorInvariant(vorticity_order=5)
tracer_advection = WENO()
momentum_advection = WENOVectorInvariant(vorticity_order=3)
tracer_advection = Centered()

using Oceananigans.TurbulenceClosures: IsopycnalSkewSymmetricDiffusivity,
ExplicitTimeDiscretization,
DiffusiveFormulation

using Oceananigans.TurbulenceClosures.TKEBasedVerticalDiffusivities: CATKEVerticalDiffusivity

numerical_closure = HorizontalScalarDiffusivity=5e3)
eddy_closure = IsopycnalSkewSymmetricDiffusivity(κ_skew=1e3, κ_symmetric=1e3, skew_flux_formulation=DiffusiveFormulation())
vertical_mixing = CATKEVerticalDiffusivity()

closure = (eddy_closure, numerical_closure, vertical_mixing)

# Spacings still don't work correctly?
free_surface = SplitExplicitFreeSurface(grid; substeps=30)

# Should we add a side drag since this is at a coarser resolution?
ocean = ocean_simulation(grid; momentum_advection, tracer_advection, free_surface,
closure, forcing)

set!(ocean.model, T=ECCOMetadata(:temperature; dates=first(dates)),
S=ECCOMetadata(:salinity; dates=first(dates)))
ocean = ocean_simulation(grid;
momentum_advection,
tracer_advection,
closure,
forcing,
free_surface)

#####
##### Atmospheric forcing
Expand All @@ -97,7 +109,7 @@ atmosphere = JRA55PrescribedAtmosphere(arch; backend=JRA55NetCDFBackend(20))
#####

coupled_model = OceanSeaIceModel(ocean; atmosphere, radiation)
simulation = Simulation(coupled_model; Δt=1minutes, stop_time=30days)
simulation = Simulation(coupled_model; Δt=5minutes, stop_time=10days)

#####
##### Run it!
Expand Down Expand Up @@ -139,7 +151,7 @@ ocean.output_writers[:surface] = JLD2OutputWriter(ocean.model, outputs;

run!(simulation)

simulation.Δt = 25minutes
simulation.Δt = 30minutes
simulation.stop_time = 720days

run!(simulation)
Expand Down

0 comments on commit 63c8f97

Please sign in to comment.