@@ -30,15 +30,15 @@ Nx = 360 # longitudinal direction
3030Ny = 180 # meridional direction
3131Nz = 60
3232
33- r_faces = ClimaOcean . ExponentialCoordinate (Nz, - 6000 )
34- z_faces = MutableVerticalDiscretization (r_faces )
33+ z_faces = ExponentialCoordinate (Nz, - 6000 , 0 )
34+ # z_faces = MutableVerticalDiscretization(z_faces )
3535
3636grid = TripolarGrid (arch;
3737 size = (Nx, Ny, Nz),
3838 z = z_faces,
3939 halo = (7 , 7 , 7 ))
4040
41- bottom_height = regrid_bathymetry (grid; minimum_depth= 15 , major_basins= 1 , interpolation_passes= 15 )
41+ bottom_height = regrid_bathymetry (grid; minimum_depth= 15 , major_basins= 1 , interpolation_passes= 75 )
4242grid = ImmersedBoundaryGrid (grid, GridFittedBottom (bottom_height); active_cells_map= true )
4343
4444# ####
@@ -51,34 +51,44 @@ using Oceananigans.TurbulenceClosures.TKEBasedVerticalDiffusivities: CATKEVertic
5151momentum_advection = WENOVectorInvariant (order= 5 )
5252tracer_advection = WENO (order= 5 )
5353
54- free_surface = SplitExplicitFreeSurface (grid; cfl= 0.7 , fixed_Δt= 20 minutes )
54+ free_surface = SplitExplicitFreeSurface (grid; cfl= 0.8 , fixed_Δt= 45 minutes )
5555
56- mixing_length = CATKEMixingLength (Cᵇ= 0.01 )
57- turbulent_kinetic_energy_equation = CATKEEquation (Cᵂϵ= 1.0 )
56+ eddy_closure = Oceananigans. TurbulenceClosures. IsopycnalSkewSymmetricDiffusivity (κ_skew= 1e3 , κ_symmetric= 1e3 )
57+ catke_closure = ClimaOcean. OceanSimulations. default_ocean_closure () # RiBasedVerticalDiffusivity() #
58+ closure = (catke_closure, VerticalScalarDiffusivity (κ= 1e-5 , ν= 1e-4 ), eddy_closure)
5859
59- catke_closure = CATKEVerticalDiffusivity (; mixing_length, turbulent_kinetic_energy_equation)
60- closure = (catke_closure, VerticalScalarDiffusivity (κ= 1e-5 , ν= 1e-5 ))
60+ dataset = EN4Monthly ()
61+ date = DateTime (1958 , 1 , 1 )
62+ @inline mask (x, y, z, t) = z ≥ z_surf - 1
63+ Smetadata = Metadata (:salinity ; dataset)
64+
65+ FS = DatasetRestoring (Smetadata, grid; rate = 1 / 18 days, mask, time_indices_in_memory = 10 )
6166
6267ocean = ocean_simulation (grid; Δt= 1 minutes,
6368 momentum_advection,
6469 tracer_advection,
70+ timestepper = :SplitRungeKutta3 ,
6571 free_surface,
72+ forcing = (; S = FS),
6673 closure)
6774
68- dataset = ECCO4Monthly ()
75+ dataset = EN4Monthly ()
76+ date = DateTime (1958 , 1 , 1 )
77+
78+ set! (ocean. model, T= Metadatum (:temperature ; dataset, date),
79+ S= Metadatum (:salinity ; dataset, date))
6980
70- set! (ocean. model, T= Metadatum (:temperature ; dataset),
71- S= Metadatum (:salinity ; dataset))
81+ @info ocean. model. clock
7282
7383# ####
7484# #### A Prognostic Sea-ice model
7585# ####
7686
7787# Default sea-ice dynamics and salinity coupling are included in the defaults
78- sea_ice = sea_ice_simulation (grid; advection= WENO (order= 7 ))
88+ sea_ice = sea_ice_simulation (grid, ocean ; advection= WENO (order= 7 ))
7989
80- set! (sea_ice. model, h= Metadatum (:sea_ice_thickness ; dataset),
81- ℵ= Metadatum (:sea_ice_concentration ; dataset))
90+ set! (sea_ice. model, h= Metadatum (:sea_ice_thickness ; dataset= ECCO4Monthly () ),
91+ ℵ= Metadatum (:sea_ice_concentration ; dataset= ECCO4Monthly () ))
8292
8393# ####
8494# #### A Prescribed Atmosphere model
@@ -94,21 +104,20 @@ radiation = Radiation()
94104# ####
95105# #### An ocean-sea ice coupled model
96106# ####
97-
107+
98108omip = OceanSeaIceModel (ocean, sea_ice; atmosphere, radiation)
99- omip = Simulation (omip, Δt= 30 , stop_time= 60 days)
109+ omip = Simulation (omip, Δt= 30 minutes , stop_time= 60 days)
100110
101111# Figure out the outputs....
102-
103112checkpointer_address (:: SeaIceModel ) = " SeaIceModel"
104113
105114ocean. output_writers[:checkpointer ] = Checkpointer (ocean. model,
106- schedule = IterationInterval (10000 ),
115+ schedule = IterationInterval (1000 ),
107116 prefix = " ocean_checkpoint_onedegree" ,
108117 overwrite_existing = true )
109118
110119sea_ice. output_writers[:checkpointer ] = Checkpointer (sea_ice. model,
111- schedule = IterationInterval (10000 ),
120+ schedule = IterationInterval (1000 ),
112121 prefix = " sea_ice_checkpoint_onedegree" ,
113122 overwrite_existing = true )
114123
@@ -143,11 +152,11 @@ function progress(sim)
143152end
144153
145154# And add it as a callback to the simulation.
146- add_callback! (omip, progress, IterationInterval (50 ))
155+ add_callback! (omip, progress, IterationInterval (1 ))
147156
148157run! (omip)
149158
150- omip. Δt = 15 minutes
159+ omip. Δt = 40 minutes
151160omip. stop_time = 58 * 365 days
152161
153162run! (omip)
0 commit comments