Skip to content

Commit

Permalink
make the timestepping 3D
Browse files Browse the repository at this point in the history
  • Loading branch information
simone-silvestri committed Jul 12, 2024
1 parent 51ded28 commit 82638fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/sea_ice_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ using Oceananigans.Fields: TracerFields
using ClimaSeaIce.SeaIceThermodynamics: external_top_heat_flux
using Oceananigans: tupleit

struct SeaIceModel{GR, CL, TS, U, T, IT, IC, TD, D, STF, SMS, A} <: AbstractModel{TS}
struct SeaIceModel{GR, TD, D, CL, TS, U, T, IT, IC, STF, SMS, A} <: AbstractModel{TS}
grid :: GR
clock :: CL
timestepper :: TS
Expand Down
8 changes: 4 additions & 4 deletions src/time_stepping.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ end
h_forcing,
model_fields)

i, j = @index(Global, NTuple)
i, j, k = @index(Global, NTuple)
h = ice_thickness

Gh = ice_thickness_tendency(i, j, 1, grid, clock,
Gh = ice_thickness_tendency(i, j, k, grid, clock,
velocities,
advection,
ice_thickness,
Expand All @@ -58,8 +58,8 @@ end
# Update ice thickness, clipping negative values

@inbounds begin
h⁺ = h[i, j, 1] + Δt * Gh
h[i, j, 1] = max(zero(grid), h⁺)
h⁺ = h[i, j, k] + Δt * Gh
h[i, j, k] = max(zero(grid), h⁺)
# Belongs in update state?
# That's certainly a simple model for ice concentration
# consolidated_ice = h[i, j, 1] >= hᶜ[i, j, 1]
Expand Down

0 comments on commit 82638fc

Please sign in to comment.