From 8b2c5161aae8fe266a523b6987368778f4c10a16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= <765740+giordano@users.noreply.github.com> Date: Sat, 8 Feb 2025 15:48:07 +0000 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Gregory L. Wagner --- Project.toml | 1 + oceananigans-dynamical-core/super_simple_simulation.jl | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Project.toml b/Project.toml index bdf5201..5dea779 100644 --- a/Project.toml +++ b/Project.toml @@ -4,5 +4,6 @@ CFTime = "179af706-886a-5703-950a-314cd64e0468" ClimaOcean = "0376089a-ecfe-4b0e-a64f-9c555d74d754" Oceananigans = "9e8cae18-63c1-5223-a75c-80ca9d6e9a09" OrthogonalSphericalShellGrids = "c2be9673-fb75-4747-82dc-aa2bb9f4aed0" +Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Reactant = "3c362404-f566-11ee-1572-e11a4b42c853" Reactant_jll = "0192cb87-2b54-54ad-80e0-3be72ad8a3c0" diff --git a/oceananigans-dynamical-core/super_simple_simulation.jl b/oceananigans-dynamical-core/super_simple_simulation.jl index f5eb0b6..2d11ae2 100644 --- a/oceananigans-dynamical-core/super_simple_simulation.jl +++ b/oceananigans-dynamical-core/super_simple_simulation.jl @@ -2,6 +2,7 @@ using Oceananigans using Reactant using Libdl using Reactant_jll +using Random Reactant.Ops.DEBUG_MODE[] = true # ENV["JULIA_DEBUG"] = "Reactant_jll" @@ -23,8 +24,10 @@ r_model = HydrostaticFreeSurfaceModel(; grid=r_grid, momentum_advection=WENO()) @assert model.free_surface isa SplitExplicitFreeSurface @assert r_model.free_surface isa SplitExplicitFreeSurface +Random.seed!(123) uᵢ(x, y, z) = randn() set!(model, u=uᵢ, v=uᵢ) +Random.seed!(123) set!(r_model, u=uᵢ, v=uᵢ) # What we normally do: