Skip to content

Commit 456c59c

Browse files
Adapt to Oceananigans v0.97.0 (#574)
* Update Project.toml * Update near_global_ocean_simulation.jl * Update one_degree_simulation.jl * changes * add CUDA * bump patch release * using CUDA + record from Makie not CUDA * use Oceananigans#ss/fix-indexing-bug * some changes * Rename docs/interface_fluxes.md to docs/src/interface_fluxes.md --------- Co-authored-by: Navid C. Constantinou <[email protected]>
1 parent 0999a77 commit 456c59c

17 files changed

+19
-22
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ JLD2 = "0.4, 0.5"
5555
KernelAbstractions = "0.9"
5656
MPI = "0.20"
5757
NCDatasets = "0.12, 0.13, 0.14"
58-
Oceananigans = "0.96"
58+
Oceananigans = "0.97.1"
5959
OffsetArrays = "1.14"
6060
PrecompileTools = "1"
6161
PythonCall = "0.9"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ To illustrate how `OceanSeaIceModel` works we set up a simulation on a grid with
4444
using Oceananigans
4545
using Oceananigans.Units
4646
using Dates
47+
using CUDA
4748
import ClimaOcean
4849

4950
arch = GPU()

docs/Project.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[deps]
22
CFTime = "179af706-886a-5703-950a-314cd64e0468"
3+
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
34
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
4-
ClimaOcean = "0376089a-ecfe-4b0e-a64f-9c555d74d754"
55
DataDeps = "124859b0-ceae-595e-8997-d05f6a7a8dfe"
66
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
77
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
@@ -10,9 +10,7 @@ Oceananigans = "9e8cae18-63c1-5223-a75c-80ca9d6e9a09"
1010
SeawaterPolynomials = "d496a93d-167e-4197-9f49-d3af4ff8fe40"
1111

1212
[compat]
13-
CairoMakie = "0.10.12, 0.11, 0.12, 0.13"
14-
DataDeps = "0.7"
13+
CUDA = "5"
1514
Documenter = "1"
1615
DocumenterCitations = "1.3"
17-
Oceananigans = "0.96 - 0.99"
18-
SeawaterPolynomials = "0.3.5"
16+
Literate = "2.2"

docs/src/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ The following script implements a near-global ocean simulation initialized from
3838
using Oceananigans
3939
using Oceananigans.Units
4040
using Dates
41+
using CUDA
4142
import ClimaOcean
4243

4344
arch = GPU()
File renamed without changes.

examples/ecco_mixed_layer_depth.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ fig
7171

7272
# And record a movie
7373

74-
record(fig, "ecco_mld.mp4", 1:Nt-1, framerate=4) do nn
74+
CairoMakie.record(fig, "ecco_mld.mp4", 1:Nt-1, framerate=4) do nn
7575
@info "Drawing frame $nn of $Nt..."
7676
n[] = nn
7777
end

examples/inspect_JRA55_data.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ snapshot_interval = 3hours # JRE55 time-resolution
7272
rotation_period = 60days
7373
rotation_rate = 2π / rotation_period
7474

75-
record(fig, "JRA55_data.mp4", 1:Nt, framerate=16) do nn
75+
CairoMakie.record(fig, "JRA55_data.mp4", 1:Nt, framerate=16) do nn
7676
@info nn/Nt
7777

7878
n[] = nn

examples/mediterranean_simulation_with_ecco_restoring.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717

1818
using CairoMakie
1919
using Oceananigans
20-
using Oceananigans: architecture
20+
using Oceananigans.Units
2121
using ClimaOcean
2222
using ClimaOcean.ECCO
23-
using Oceananigans.Units
2423
using Printf
2524
using Dates
25+
using CUDA
2626

2727
# ## Grid Configuration for the Mediterranean Sea
2828
#

examples/near_global_ocean_simulation.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
# ## Initial setup with package imports
1010
#
1111
# We begin by importing the necessary Julia packages for visualization (CairoMakie),
12-
# ocean modeling (Oceananigans, ClimaOcean), and handling dates and times (CFTime, Dates).
12+
# ocean modeling (Oceananigans, ClimaOcean), handling dates and times (CFTime, Dates),
13+
# and CUDA for running on CUDA-enabled GPUs.
1314
# These packages provide the foundational tools for setting up the simulation environment,
1415
# including grid setup, physical processes modeling, and data visualization.
1516

@@ -20,6 +21,7 @@ using CairoMakie
2021
using CFTime
2122
using Dates
2223
using Printf
24+
using CUDA
2325

2426
# ### Grid configuration
2527
#
@@ -250,7 +252,7 @@ nothing #hide
250252

251253
# And now we make a movie:
252254

253-
record(fig, "near_global_ocean_surface.mp4", 1:Nt, framerate = 8) do nn
255+
CairoMakie.record(fig, "near_global_ocean_surface.mp4", 1:Nt, framerate = 8) do nn
254256
n[] = nn
255257
end
256258
nothing #hide

examples/one_degree_simulation.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# and initialized by temperature, salinity, sea ice concentration, and sea ice thickness
77
# from the ECCO state estimate.
88
#
9-
# For this example, we need Oceananigans, ClimaOcean, Dates, and
9+
# For this example, we need Oceananigans, ClimaOcean, Dates, CUDA, and
1010
# CairoMakie to visualize the simulation.
1111

1212
using ClimaOcean
@@ -15,6 +15,7 @@ using Oceananigans.Units
1515
using Dates
1616
using Printf
1717
using Statistics
18+
using CUDA
1819

1920
# ### Grid and Bathymetry
2021

@@ -292,7 +293,7 @@ nothing #hide
292293

293294
# And now a movie:
294295

295-
record(fig, "one_degree_global_ocean_surface.mp4", 1:Nt, framerate = 8) do nn
296+
CairoMakie.record(fig, "one_degree_global_ocean_surface.mp4", 1:Nt, framerate = 8) do nn
296297
n[] = nn
297298
end
298299
nothing #hide

0 commit comments

Comments
 (0)