@@ -17,19 +17,21 @@ using Oceananigans.Operators
1717using ClimaSeaIce
1818using ClimaSeaIce: SeaIceModel, SlabSeaIceThermodynamics, PhaseTransitions, ConductiveFlux
1919using ClimaSeaIce. SeaIceThermodynamics: IceWaterThermalEquilibrium
20+ using ClimaSeaIce. SeaIceDynamics: SplitExplicitSolver, SemiImplicitStress, SeaIceMomentumEquation, StressBalanceFreeDrift
21+ using ClimaSeaIce. Rheologies: IceStrength, ElastoViscoPlasticRheology
2022
2123using ClimaOcean. OceanSimulations: Default
2224
23- function sea_ice_simulation (grid;
25+ function sea_ice_simulation (grid, ocean = nothing ;
2426 Δt = 5 minutes,
25- ice_salinity = 0 , # psu
27+ ice_salinity = 4 , # psu
2628 advection = nothing , # for the moment
2729 tracers = (),
2830 ice_heat_capacity = 2100 , # J kg⁻¹ K⁻¹
2931 ice_consolidation_thickness = 0.05 , # m
3032 ice_density = 900 , # kg m⁻³
31- dynamics = nothing ,
32- bottom_heat_boundary_condition = IceWaterThermalEquilibrium () ,
33+ dynamics = sea_ice_dynamics (grid, ocean) ,
34+ bottom_heat_boundary_condition = nothing ,
3335 phase_transitions = PhaseTransitions (; ice_heat_capacity, ice_density),
3436 conductivity = 2 , # kg m s⁻³ K⁻¹
3537 internal_heat_flux = ConductiveFlux (; conductivity))
@@ -41,6 +43,16 @@ function sea_ice_simulation(grid;
4143 top_surface_temperature = Field {Center, Center, Nothing} (grid)
4244 top_heat_boundary_condition = PrescribedTemperature (top_surface_temperature)
4345
46+ if isnothing (bottom_heat_boundary_condition)
47+ if isnothing (ocean)
48+ surface_ocean_salinity = 0
49+ else
50+ kᴺ = size (grid, 3 )
51+ surface_ocean_salinity = interior (ocean. model. tracers. S, :, :, kᴺ:kᴺ )
52+ end
53+ bottom_heat_boundary_condition = IceWaterThermalEquilibrium (surface_ocean_salinity)
54+ end
55+
4456 ice_thermodynamics = SlabSeaIceThermodynamics (grid;
4557 internal_heat_flux,
4658 phase_transitions,
@@ -50,16 +62,12 @@ function sea_ice_simulation(grid;
5062 bottom_heat_flux = Field {Center, Center, Nothing} (grid)
5163 top_heat_flux = Field {Center, Center, Nothing} (grid)
5264
53- # top_momentum_stress = (u = Field{Face, Center, Nothing}(grid),
54- # v = Field{Center, Face, Nothing}(grid))
55-
5665 # Build the sea ice model
5766 sea_ice_model = SeaIceModel (grid;
5867 ice_salinity,
5968 advection,
6069 tracers,
6170 ice_consolidation_thickness,
62- # top_momentum_stress,
6371 ice_thermodynamics,
6472 dynamics,
6573 bottom_heat_flux,
@@ -73,4 +81,40 @@ function sea_ice_simulation(grid;
7381 return sea_ice
7482end
7583
76- end
84+ function sea_ice_dynamics (grid, ocean= nothing ;
85+ sea_ice_ocean_drag_coefficient = 5.5e-3 ,
86+ rheology = ElastoViscoPlasticRheology (pressure_formulation = IceStrength ()),
87+ coriolis = nothing ,
88+ free_drift = nothing ,
89+ solver = SplitExplicitSolver (120 ))
90+
91+ if isnothing (ocean)
92+ SSU = Oceananigans. Fields. ZeroField ()
93+ SSV = Oceananigans. Fields. ZeroField ()
94+ else
95+ SSU = view (ocean. model. velocities. u, :, :, grid. Nz)
96+ SSV = view (ocean. model. velocities. v, :, :, grid. Nz)
97+ if isnothing (coriolis)
98+ coriolis = ocean. model. coriolis
99+ end
100+ end
101+
102+ sea_ice_ocean_drag_coefficient = convert (eltype (grid), sea_ice_ocean_drag_coefficient)
103+
104+ τo = SemiImplicitStress (uₑ= SSU, vₑ= SSV, Cᴰ= sea_ice_ocean_drag_coefficient)
105+ τua = Field {Face, Center, Nothing} (grid)
106+ τva = Field {Center, Face, Nothing} (grid)
107+
108+ if isnothing (free_drift)
109+ free_drift = StressBalanceFreeDrift ((u= τua, v= τva), τo)
110+ end
111+
112+ return SeaIceMomentumEquation (grid;
113+ coriolis,
114+ top_momentum_stress = (u= τua, v= τva),
115+ bottom_momentum_stress = τo,
116+ rheology,
117+ solver)
118+ end
119+
120+ end
0 commit comments