Skip to content

Commit

Permalink
rm weighted_dss_slab
Browse files Browse the repository at this point in the history
  • Loading branch information
juliasloan25 committed Sep 20, 2024
1 parent 59abc31 commit f744cb7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 18 deletions.
3 changes: 2 additions & 1 deletion experiments/ClimaEarth/components/ocean/eisenman_seaice.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ function eisenman_seaice_init(
Y, Ya = state_init(params_ice, space)

ode_algo = CTS.ExplicitAlgorithm(stepper)
ode_function = CTS.ClimaODEFunction(T_exp! = ∑tendencies, dss! = weighted_dss_slab!)
ode_function =
CTS.ClimaODEFunction(T_exp! = ∑tendencies, dss! = dss!((Y, p, t) -> CC.Spaces.weighted_dss!(Y, p.dss_buffer)))

cache = (;
Ya = Ya,
Expand Down
3 changes: 2 additions & 1 deletion experiments/ClimaEarth/components/ocean/prescr_seaice.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ function ice_init(::Type{FT}; tspan, saveat, dt, space, area_fraction, thermo_pa
)

ode_algo = CTS.ExplicitAlgorithm(stepper)
ode_function = CTS.ClimaODEFunction(T_exp! = ice_rhs!, dss! = weighted_dss_slab!)
ode_function =
CTS.ClimaODEFunction(T_exp! = ice_rhs!, dss! = dss!((Y, p, t) -> CC.Spaces.weighted_dss!(Y, p.dss_buffer)))

problem = SciMLBase.ODEProblem(ode_function, Y, Float64.(tspan), (; additional_cache..., params = params))
integrator = SciMLBase.init(problem, ode_algo, dt = Float64(dt), saveat = Float64(saveat), adaptive = false)
Expand Down
5 changes: 4 additions & 1 deletion experiments/ClimaEarth/components/ocean/slab_ocean.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ function ocean_init(
)

ode_algo = CTS.ExplicitAlgorithm(stepper)
ode_function = CTS.ClimaODEFunction(T_exp! = slab_ocean_rhs!, dss! = weighted_dss_slab!)
ode_function = CTS.ClimaODEFunction(
T_exp! = slab_ocean_rhs!,
dss! = dss!((Y, p, t) -> CC.Spaces.weighted_dss!(Y, p.dss_buffer)),
)

problem = SciMLBase.ODEProblem(ode_function, Y, Float64.(tspan), cache)
integrator = SciMLBase.init(problem, ode_algo, dt = Float64(dt), saveat = Float64(saveat), adaptive = false)
Expand Down
15 changes: 0 additions & 15 deletions experiments/ClimaEarth/components/slab_utils.jl

This file was deleted.

0 comments on commit f744cb7

Please sign in to comment.