Skip to content

Commit a67a2c8

Browse files
committed
change Oceananigans model closures
1 parent 85413fa commit a67a2c8

File tree

2 files changed

+23
-5
lines changed

2 files changed

+23
-5
lines changed

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ ClimaCoupler.jl Release Notes
66

77
### ClimaCoupler features
88

9+
#### Change some closures used in the Oceananigans model PR[#1524](https://github.com/CliMA/ClimaCoupler.jl/pull/1524)
10+
Per ocean team recommendation, we changed some closures to be non-default.
11+
912
#### Change the behavior of `detect_restart_file` PR[#1515](https://github.com/CliMA/ClimaCoupler.jl/pull/1515)
1013
Users now only need to specify `restart_dir` and `restart_t` to restart a simulation from a specific file, and do
1114
not need to set `detect_restart_file` to true. `detect_restart_file` is used for detecting restart file automatically.

experiments/ClimaEarth/components/ocean/oceananigans.jl

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,24 @@ function OceananigansSimulation(
108108
end
109109

110110
# Create ocean simulation
111-
ocean = CO.ocean_simulation(grid; forcing)
111+
free_surface = OC.SplitExplicitFreeSurface(grid; substeps = 70)
112+
momentum_advection = OC.WENOVectorInvariant(order = 5)
113+
tracer_advection = OC.WENO(order = 5)
114+
eddy_closure = OC.TurbulenceClosures.IsopycnalSkewSymmetricDiffusivity(
115+
κ_skew = 1e3,
116+
κ_symmetric = 1e3,
117+
)
118+
vertical_mixing = CO.OceanSimulations.default_ocean_closure()
119+
horizontal_viscosity = OC.HorizontalScalarBiharmonicDiffusivity= 1e11)
120+
121+
ocean = CO.ocean_simulation(
122+
grid;
123+
forcing,
124+
momentum_advection,
125+
tracer_advection,
126+
free_surface,
127+
closure = (eddy_closure, horizontal_viscosity, vertical_mixing),
128+
)
112129

113130
# Set initial condition to EN4 state estimate at start_date
114131
OC.set!(ocean.model, T = en4_temperature[1], S = en4_salinity[1])
@@ -147,8 +164,6 @@ function OceananigansSimulation(
147164

148165
# Before version 0.96.22, the NetCDFWriter was broken on GPU
149166
if arch isa OC.CPU || pkgversion(OC) >= v"0.96.22"
150-
# TODO: Add more diagnostics, make them dependent on simulation duration, take
151-
# monthly averages
152167
# Save all tracers and velocities to a NetCDF file at daily frequency
153168
outputs = merge(ocean.model.tracers, ocean.model.velocities)
154169
netcdf_writer = OC.NetCDFWriter(
@@ -286,9 +301,9 @@ Interfacer.get_field(sim::OceananigansSimulation, ::Val{:roughness_momentum}) =
286301
Interfacer.get_field(sim::OceananigansSimulation, ::Val{:beta}) = Float32(1)
287302
Interfacer.get_field(sim::OceananigansSimulation, ::Val{:emissivity}) = Float32(0.97)
288303
Interfacer.get_field(sim::OceananigansSimulation, ::Val{:surface_direct_albedo}) =
289-
Float32(0.06)
304+
Float32(0.011)
290305
Interfacer.get_field(sim::OceananigansSimulation, ::Val{:surface_diffuse_albedo}) =
291-
Float32(0.06)
306+
Float32(0.069)
292307

293308
# NOTE: This is 3D, but it will be remapped to 2D
294309
Interfacer.get_field(sim::OceananigansSimulation, ::Val{:surface_temperature}) =

0 commit comments

Comments
 (0)