@@ -183,7 +183,8 @@ function compute_net_sea_ice_fluxes!(coupled_model)
183183 kernel_parameters = interface_kernel_parameters (grid)
184184
185185 sea_ice_surface_temperature = coupled_model. interfaces. atmosphere_sea_ice_interface. temperature
186-
186+ ice_concentration = sea_ice_concentration (sea_ice)
187+
187188 launch! (arch, grid, kernel_parameters,
188189 _assemble_net_sea_ice_fluxes!,
189190 top_fluxes,
@@ -193,6 +194,7 @@ function compute_net_sea_ice_fluxes!(coupled_model)
193194 atmosphere_sea_ice_fluxes,
194195 sea_ice_ocean_fluxes,
195196 freshwater_flux,
197+ ice_concentration,
196198 sea_ice_surface_temperature,
197199 downwelling_radiation,
198200 sea_ice_properties,
208210 atmosphere_sea_ice_fluxes,
209211 sea_ice_ocean_fluxes,
210212 freshwater_flux, # Where do we add this one?
213+ ice_concentration,
211214 surface_temperature,
212215 downwelling_radiation,
213216 sea_ice_properties,
220223 @inbounds begin
221224 Ts = surface_temperature[i, j, kᴺ]
222225 Ts = convert_to_kelvin (sea_ice_properties. temperature_units, Ts)
223-
226+ ℵi = ice_concentration[i, j, 1 ]
227+
224228 Qs = downwelling_radiation. Qs[i, j, 1 ]
225229 Qℓ = downwelling_radiation. Qℓ[i, j, 1 ]
226230 Qc = atmosphere_sea_ice_fluxes. sensible_heat[i, j, 1 ] # sensible or "conductive" heat flux
239243 Qu = upwelling_radiation (Ts, σ, ϵ)
240244 Qd = net_downwelling_radiation (i, j, grid, time, α, ϵ, Qs, Qℓ)
241245
242- ΣQt = Qd + Qu + Qc + Qv
246+ ΣQt = ( Qd + Qu + Qc + Qv) * ℵi # If ℵi == 0 there is no heat flux from the top!
243247 ΣQb = Qf + Qi
244248
245249 # Mask fluxes over land for convenience
0 commit comments