From 735cb17daa216ee8e57c5abacf99beeb5976e1ec Mon Sep 17 00:00:00 2001 From: Simone Silvestri Date: Thu, 5 Jun 2025 16:44:27 +0200 Subject: [PATCH 1/3] Update thermodynamic_time_step.jl --- .../thermodynamic_time_step.jl | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/SeaIceThermodynamics/thermodynamic_time_step.jl b/src/SeaIceThermodynamics/thermodynamic_time_step.jl index f286fdd..8d0cbc5 100644 --- a/src/SeaIceThermodynamics/thermodynamic_time_step.jl +++ b/src/SeaIceThermodynamics/thermodynamic_time_step.jl @@ -74,18 +74,22 @@ end ℵ⁺ = concentration_thermodynamic_step(ice_thermodynamics.concentration_evolution, ∂t_V, ℵⁿ, hⁿ, hᶜ, Δt) h⁺ = Vⁿ⁺¹ / ℵ⁺ - # Save thermodynamic tendency for possible later use - @inbounds Gⁿ[i, j, 1] = ∂t_V - # Treat pathological cases h⁺ = ifelse(ℵ⁺ ≤ 0, zero(h⁺), h⁺) ℵ⁺ = ifelse(∂t_V == 0, ℵⁿ, ℵ⁺) # No volume change h⁺ = ifelse(∂t_V == 0, hⁿ, h⁺) # No volume change ℵ⁺ = ifelse(h⁺ == 0, zero(ℵ⁺), ℵ⁺) # reset the concentration if there is no sea-ice - + # Ridging caused by the thermodynamic step - @inbounds ice_concentration[i, j, 1] = ifelse(ℵ⁺ > 1, one(ℵ⁺), ℵ⁺) - @inbounds ice_thickness[i, j, 1] = ifelse(ℵ⁺ > 1, h⁺ * ℵ⁺, h⁺) + ℵⁿ⁺¹ = ifelse(ℵ⁺ > 1, one(ℵ⁺), ℵ⁺) + hⁿ⁺¹ = ifelse(ℵ⁺ > 1, h⁺ * ℵ⁺, h⁺) + + # Update thermodynamic variables + @inbounds ice_concentration[i, j, 1] = ℵⁿ⁺¹ + @inbounds ice_thickness[i, j, 1] = hⁿ⁺¹ + + # Recompute new thermodynamic tendency, excluding pathological case,s and save for possible later use + @inbounds Gⁿ[i, j, 1] = (hⁿ⁺¹ * ℵⁿ⁺¹ - hⁿ * ℵⁿ) / Δt end # We parameterize the evolution of ice thickness and concentration @@ -102,4 +106,4 @@ end ℵ⁺ = max(zero(ℵ⁺), ℵ⁺) return ℵ⁺ -end \ No newline at end of file +end From 4dd072a8892e10e9f7e63edc54da95927febe7fa Mon Sep 17 00:00:00 2001 From: Simone Silvestri Date: Wed, 11 Jun 2025 13:22:03 +0200 Subject: [PATCH 2/3] bump --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 9e54f70..1fc5a52 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ClimaSeaIce" uuid = "6ba0ff68-24e6-4315-936c-2e99227c95a4" authors = ["Climate Modeling Alliance and contributors"] -version = "0.3.0" +version = "0.3.1" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" From 2b9d08266cfe2aa15b935b45b799fa3756f1fedf Mon Sep 17 00:00:00 2001 From: Simone Silvestri Date: Wed, 11 Jun 2025 13:23:45 +0200 Subject: [PATCH 3/3] Update src/SeaIceThermodynamics/thermodynamic_time_step.jl --- src/SeaIceThermodynamics/thermodynamic_time_step.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SeaIceThermodynamics/thermodynamic_time_step.jl b/src/SeaIceThermodynamics/thermodynamic_time_step.jl index 8d0cbc5..a453545 100644 --- a/src/SeaIceThermodynamics/thermodynamic_time_step.jl +++ b/src/SeaIceThermodynamics/thermodynamic_time_step.jl @@ -88,7 +88,7 @@ end @inbounds ice_concentration[i, j, 1] = ℵⁿ⁺¹ @inbounds ice_thickness[i, j, 1] = hⁿ⁺¹ - # Recompute new thermodynamic tendency, excluding pathological case,s and save for possible later use + # Recompute new thermodynamic tendency, excluding pathological cases and save for possible later use @inbounds Gⁿ[i, j, 1] = (hⁿ⁺¹ * ℵⁿ⁺¹ - hⁿ * ℵⁿ) / Δt end