74
74
ℵ⁺ = concentration_thermodynamic_step (ice_thermodynamics. concentration_evolution, ∂t_V, ℵⁿ, hⁿ, hᶜ, Δt)
75
75
h⁺ = Vⁿ⁺¹ / ℵ⁺
76
76
77
- # Save thermodynamic tendency for possible later use
78
- @inbounds Gⁿ[i, j, 1 ] = ∂t_V
79
-
80
77
# Treat pathological cases
81
78
h⁺ = ifelse (ℵ⁺ ≤ 0 , zero (h⁺), h⁺)
82
79
ℵ⁺ = ifelse (∂t_V == 0 , ℵⁿ, ℵ⁺) # No volume change
83
80
h⁺ = ifelse (∂t_V == 0 , hⁿ, h⁺) # No volume change
84
81
ℵ⁺ = ifelse (h⁺ == 0 , zero (ℵ⁺), ℵ⁺) # reset the concentration if there is no sea-ice
85
-
82
+
86
83
# Ridging caused by the thermodynamic step
87
- @inbounds ice_concentration[i, j, 1 ] = ifelse (ℵ⁺ > 1 , one (ℵ⁺), ℵ⁺)
88
- @inbounds ice_thickness[i, j, 1 ] = ifelse (ℵ⁺ > 1 , h⁺ * ℵ⁺, h⁺)
84
+ ℵⁿ⁺¹ = ifelse (ℵ⁺ > 1 , one (ℵ⁺), ℵ⁺)
85
+ hⁿ⁺¹ = ifelse (ℵ⁺ > 1 , h⁺ * ℵ⁺, h⁺)
86
+
87
+ # Update thermodynamic variables
88
+ @inbounds ice_concentration[i, j, 1 ] = ℵⁿ⁺¹
89
+ @inbounds ice_thickness[i, j, 1 ] = hⁿ⁺¹
90
+
91
+ # Recompute new thermodynamic tendency, excluding pathological cases and save for possible later use
92
+ @inbounds Gⁿ[i, j, 1 ] = (hⁿ⁺¹ * ℵⁿ⁺¹ - hⁿ * ℵⁿ) / Δt
89
93
end
90
94
91
95
# We parameterize the evolution of ice thickness and concentration
102
106
ℵ⁺ = max (zero (ℵ⁺), ℵ⁺)
103
107
104
108
return ℵ⁺
105
- end
109
+ end
0 commit comments