@@ -15,12 +15,12 @@ import ClimaCoupler: Checkpointer, FluxCalculator, Interfacer, Utilities
1515
1616Ice concentration is prescribed, and we solve the following energy equation:
1717
18- (h * ρ * c) d T_sfc dt = (-F_turb_energy + (1 - α) * SW_d + LW_d - LW_u) + F_conductive
18+ (h * ρ * c) d T_bulk dt = (-F_turb_energy + (1 - α) * SW_d + LW_d - LW_u) + F_conductive
1919
2020 with
21- F_conductive = k_ice (T_base - T_sfc ) / (h)
21+ F_conductive = k_ice (T_base - T_bulk ) / (h)
2222
23- The surface temperature (`T_sfc `) is the prognostic variable which is being
23+ The bulk temperature (`T_bulk `) is the prognostic variable which is being
2424 modified by turbulent aerodynamic (`F_turb_energy`) and radiative (`F_turb_energy`) fluxes,
2525 as well as a conductive flux that depends on the temperature difference
2626 across the ice layer (with `T_base` being prescribed).
5050function slab_ice_space_init (:: Type{FT} , space, params) where {FT}
5151 # bulk temperatures commonly 10-20 K below freezing for sea ice 2m thick in winter,
5252 # and closer to freezing in summer and when melting.
53- Y = CC. Fields. FieldVector (T_sfc = ones (space) .* params. T_freeze .- FT (5.0 ))
53+ Y = CC. Fields. FieldVector (T_bulk = ones (space) .* params. T_freeze .- FT (5.0 ))
5454 return Y
5555end
5656
@@ -125,6 +125,7 @@ function PrescribedIceSimulation(
125125 # Overwrite ice fraction with the static land area fraction anywhere we have nonzero land area
126126 # max needed to avoid Float32 errors (see issue #271; Heisenbug on HPC)
127127 ice_fraction = @. max (min (SIC_init, FT (1 ) - land_fraction), FT (0 ))
128+ ice_fraction = ifelse .(ice_fraction .> FT (0.5 ), FT (1 ), FT (0 ))
128129
129130 params = IceSlabParameters {FT} ()
130131
@@ -178,26 +179,27 @@ Interfacer.get_field(
178179 sim:: PrescribedIceSimulation ,
179180 :: Union{Val{:surface_direct_albedo}, Val{:surface_diffuse_albedo}} ,
180181) = sim. integrator. p. params. α
181- # approximates the surface temperature of the sea ice
182- # assuming sim.integrator.u.T_sfc represents the vertically-averaged (bulk) temperature
183- # and the ice temperature varies linearly between the ice surface and the base.
184182Interfacer. get_field (sim:: PrescribedIceSimulation , :: Val{:surface_temperature} ) =
185- 2 .* sim. integrator. u. T_sfc .- sim. integrator. p. params. T_base
183+ ice_surface_temperature .( sim. integrator. u. T_bulk, sim. integrator. p. params. T_base)
186184
187185function Interfacer. get_field (sim:: PrescribedIceSimulation , :: Val{:beta} )
188186 # assume no LHF over sea ice
189187 FT = eltype (sim. integrator. u)
190188 return FT (0 )
191189end
192190
191+ # Approximates the surface temperature of the sea ice assuming
192+ # the ice temperature varies linearly between the ice surface and the base
193+ ice_surface_temperature (T_bulk, T_base) = 2 * T_bulk - T_base
194+
193195"""
194196 Interfacer.get_field(sim::PrescribedIceSimulation, ::Val{:energy})
195197
196198Extension of Interfacer.get_field to get the energy of the ocean.
197199It multiplies the the slab temperature by the heat capacity, density, and depth.
198200"""
199201Interfacer. get_field (sim:: PrescribedIceSimulation , :: Val{:energy} ) =
200- sim. integrator. p. params. ρ .* sim. integrator. p. params. c .* sim. integrator. u. T_sfc .*
202+ sim. integrator. p. params. ρ .* sim. integrator. p. params. c .* sim. integrator. u. T_bulk .*
201203 sim. integrator. p. params. h
202204
203205function Interfacer. update_field! (
@@ -268,25 +270,28 @@ function ice_rhs!(dY, Y, p, t)
268270
269271 # Update the cached area fraction with the current SIC
270272 evaluate! (p. area_fraction, p. SIC_timevaryinginput, t)
273+ @. p. area_fraction = ifelse (p. area_fraction > FT (0.5 ), FT (1 ), FT (0 ))
271274
272275 # Overwrite ice fraction with the static land area fraction anywhere we have nonzero land area
273276 # max needed to avoid Float32 errors (see issue #271; Heisenbug on HPC)
274277 @. p. area_fraction = max (min (p. area_fraction, FT (1 ) - p. land_fraction), FT (0 ))
275278
276279 # Calculate the conductive flux, and set it to zero if the area fraction is zero
277- F_conductive = @. k_ice / (h) * (T_base - Y. T_sfc ) # fluxes are defined to be positive when upward
280+ F_conductive = @. k_ice / (h) * (T_base - Y. T_bulk ) # fluxes are defined to be positive when upward
278281
279282 # TODO : get sigma from parameters
280283 σ = FT (5.67e-8 )
281284 rhs = @. (
282- - p. F_turb_energy + (1 - α) * p. SW_d + ϵ * (p. LW_d - σ * Y. T_sfc^ 4 ) + F_conductive
285+ - p. F_turb_energy +
286+ (1 - α) * p. SW_d +
287+ ϵ * (p. LW_d - σ * ice_surface_temperature (Y. T_bulk, T_base)^ 4 ) +
288+ F_conductive
283289 ) / (h * ρ * c)
284-
285290 # Zero out tendencies where there is no ice, so that ice temperature remains constant there
286291 @. rhs = ifelse (p. area_fraction ≈ 0 , zero (rhs), rhs)
287292
288293 # If tendencies lead to temperature above freezing, set temperature to freezing
289- @. dY. T_sfc = min (rhs, (T_freeze - Y. T_sfc ) / float (p. dt))
294+ @. dY. T_bulk = min (rhs, (T_freeze - Y. T_bulk ) / float (p. dt))
290295end
291296
292297"""
0 commit comments