Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskawczynski committed Jul 17, 2023
1 parent 455c96f commit 7d18e7e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
4 changes: 3 additions & 1 deletion examples/hybrid/sphere/balanced_flow_rhoe.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Test
import ClimaTimeSteppers as CTS
using ClimaCorePlots, Plots
using ClimaCore.DataLayouts

Expand All @@ -15,7 +16,8 @@ t_end = FT(60 * 60)
dt = FT(5)
dt_save_to_sol = FT(50)
dt_save_to_disk = FT(0) # 0 means don't save to disk
ode_algorithm = OrdinaryDiffEq.SSPRK33
ode_algorithm = CTS.SSP33ShuOsher
jacobian_flags = (; ∂ᶜ𝔼ₜ∂ᶠ𝕄_mode = :exact, ∂ᶠ𝕄ₜ∂ᶜρ_mode = :exact)

additional_cache(ᶜlocal_geometry, ᶠlocal_geometry, dt) = merge(
hyperdiffusion_cache(ᶜlocal_geometry, ᶠlocal_geometry; κ₄ = FT(2e17)),
Expand Down
15 changes: 10 additions & 5 deletions examples/sphere/shallow_water_cuda.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ using ClimaComms
using DocStringExtensions
using LinearAlgebra
using ClimaTimeSteppers, DiffEqBase
import OrdinaryDiffEq as ODE
import ClimaTimeSteppers as CTS
using DiffEqCallbacks
using NVTX

Expand Down Expand Up @@ -564,12 +566,15 @@ function shallow_water_driver_cuda(ARGS, ::Type{FT}) where {FT}
end
return nothing
end

prob =
ODEProblem(ClimaODEFunction(; T_exp! = rhs!), Y, (0.0, T), parameters)
integrator = DiffEqBase.init(
prob = ODE.ODEProblem(
CTS.ClimaODEFunction(; T_exp! = rhs!),
Y,
(FT(0), T),
parameters,
)
integrator = ODE.init(
prob,
ExplicitAlgorithm(SSP33ShuOsher()),
CTS.ExplicitAlgorithm(CTS.SSP33ShuOsher()),
dt = dt,
saveat = [],
progress = true,
Expand Down

0 comments on commit 7d18e7e

Please sign in to comment.