@@ -14,7 +14,7 @@ include("../slab_utils.jl")
14
14
15
15
Ice concentration is prescribed, and we solve the following energy equation:
16
16
17
- (h * ρ * c) d T_sfc dt = -(F_turb_energy + F_radiativead ) + F_conductive
17
+ (h * ρ * c) d T_sfc dt = -(F_turb_energy + F_radiative ) + F_conductive
18
18
19
19
with
20
20
F_conductive = k_ice (T_base - T_sfc) / (h)
@@ -24,9 +24,7 @@ Ice concentration is prescribed, and we solve the following energy equation:
24
24
as well as a conductive flux that depends on the temperature difference
25
25
across the ice layer (with `T_base` being prescribed).
26
26
27
- In the current version, the sea ice has a prescribed thickness, and we assume that it is not
28
- sublimating. That contribution has been zeroed out in the atmos fluxes.
29
-
27
+ In the current version, the sea ice has a prescribed thickness.
30
28
"""
31
29
struct PrescribedIceSimulation{P, Y, D, I} <: Interfacer.SeaIceModelSimulation
32
30
params:: P
@@ -174,12 +172,11 @@ function ice_rhs!(du, u, p, _)
174
172
175
173
F_conductive = @. params. k_ice / (params. h) * (params. T_base - Y. T_sfc) # fluxes are defined to be positive when upward
176
174
rhs = @. (- F_turb_energy - F_radiative + F_conductive) / (params. h * params. ρ * params. c)
177
-
178
- # do not count tendencies that lead to temperatures above freezing, and mask out no-ice areas
175
+ # If tendencies lead to temperature above freezing, set temperature to freezing
176
+ @. rhs = min (rhs, (T_freeze - Y. T_sfc) / p. dt)
177
+ # mask out no-ice areas
179
178
area_mask = Regridder. binary_mask .(area_fraction)
180
- threshold = zero (FT)
181
- unphysical = @. Regridder. binary_mask .(T_freeze - (Y. T_sfc + FT (rhs) * FT (p. dt)), threshold) .* area_mask
182
- parent (dY. T_sfc) .= parent (rhs .* unphysical)
179
+ dY. T_sfc .= rhs .* area_mask
183
180
184
181
@. p. q_sfc = TD. q_vap_saturation_generic .(p. thermo_params, Y. T_sfc, p. ρ_sfc, TD. Ice ())
185
182
end
0 commit comments