diff --git a/Project.toml b/Project.toml index bea8d895..cb84195f 100644 --- a/Project.toml +++ b/Project.toml @@ -14,7 +14,7 @@ SeawaterPolynomials = "d496a93d-167e-4197-9f49-d3af4ff8fe40" [compat] Adapt = "3, 4" KernelAbstractions = "0.9" -Oceananigans = "0.95.3 - 0.99" +Oceananigans = "0.95.14 - 0.99" SeawaterPolynomials = "0.3.4" RootSolvers = "0.3, 0.4" Roots = "2" diff --git a/src/EnthalpyMethodSeaIceModel.jl b/src/EnthalpyMethodSeaIceModel.jl index da79b792..97e87564 100644 --- a/src/EnthalpyMethodSeaIceModel.jl +++ b/src/EnthalpyMethodSeaIceModel.jl @@ -21,14 +21,16 @@ import Oceananigans.Fields: set! import Oceananigans.TimeSteppers: time_step!, update_state! import Oceananigans.Simulations: reset! -mutable struct EnthalpyMethodSeaIceModel{Grid, +mutable struct EnthalpyMethodSeaIceModel{Arch, + Grid, Tim, Clk, Clo, State, Cp, Fu, - Tend} <: AbstractModel{Nothing} + Tend} <: AbstractModel{Nothing, Arch} + architecture :: Arch grid :: Grid timestepper :: Tim # unused placeholder for now clock :: Clk @@ -79,15 +81,16 @@ function EnthalpyMethodSeaIceModel(; grid, tendencies = (; H=CenterField(grid)) clock = Clock{eltype(grid)}(time = 0) - return EnthalpyMethodSeaIceModel(grid, - nothing, - clock, - closure, - state, - ice_heat_capacity, - water_heat_capacity, - fusion_enthalpy, - tendencies) + return EnthalpyMethodSeaIceModel(architecture, + grid, + nothing, + clock, + closure, + state, + ice_heat_capacity, + water_heat_capacity, + fusion_enthalpy, + tendencies) end function set!(model::ETSIM; T=nothing, H=nothing) diff --git a/src/sea_ice_model.jl b/src/sea_ice_model.jl index 9f99f3c9..7080047a 100644 --- a/src/sea_ice_model.jl +++ b/src/sea_ice_model.jl @@ -7,7 +7,8 @@ using Oceananigans.BoundaryConditions: regularize_field_boundary_conditions using Oceananigans.Forcings: model_forcing using ClimaSeaIce.SeaIceThermodynamics.HeatBoundaryConditions: flux_summary -struct SeaIceModel{GR, TD, D, TS, CL, U, T, IT, IC, ID, CT, STF, A, F} <: AbstractModel{TS} +struct SeaIceModel{A, GR, TD, D, TS, CL, U, T, IT, IC, ID, CT, STF, ADV, F} <: AbstractModel{TS, A} + architecture :: A grid :: GR clock :: CL forcing :: F @@ -26,7 +27,7 @@ struct SeaIceModel{GR, TD, D, TS, CL, U, T, IT, IC, ID, CT, STF, A, F} <: Abstra external_heat_fluxes :: STF # Numerics timestepper :: TS - advection :: A + advection :: ADV end function SeaIceModel(grid; @@ -113,7 +114,8 @@ function SeaIceModel(grid; external_heat_fluxes = (top = top_heat_flux, bottom = bottom_heat_flux) - return SeaIceModel(grid, + return SeaIceModel(architecture(grid), + grid, clock, forcing, velocities,