Oceananigans.jl

Fast and friendly fluid dynamics on CPUs and GPUs.
https://github.com/clima/oceananigans.jl

Category: Hydrosphere
Sub Category: Ocean Models

Keywords

climate climate-change data-assimilation fluid-dynamics gpu julia machine-learning ocean

Keywords from Contributors

ocean-modelling climate-model oceanography differential-equations biogeochemistry ocean-sciences sciml climate-science pde ode

Last synced: about 21 hours ago
JSON representation

Repository metadata

๐ŸŒŠ Julia software for fast, friendly, flexible, ocean-flavored fluid dynamics on CPUs and GPUs

README.md

Oceananigans is a fast, friendly, flexible software package for finite volume simulations of the nonhydrostatic
and hydrostatic Boussinesq equations on CPUs and GPUs.
It runs on GPUs (wow, fast!), though we believe Oceananigans makes the biggest waves
with its ultra-flexible user interface that makes simple simulations easy, and complex, creative simulations possible.
Oceananigans development is community-driven with contributors from academia and industry -
see jobs discussions for developer and user opportunities!
Testing infrastructure is provided by atdepth and the Climate Modeling Alliance.

Contents

Installation instructions

Oceananigans is a registered Julia package. So to install it,

  1. Download Julia (version 1.10 or later).

  2. Launch Julia and type

julia> using Pkg

julia> Pkg.add("Oceananigans")

This installs the latest version that's compatible with your current environment.
Don't forget to be careful ๐Ÿ„ and check which Oceananigans you installed:

julia> Pkg.status("Oceananigans")

Running your first model

Let's run a two-dimensional, horizontally-periodic simulation of turbulence using 128ยฒ finite volume cells for 4 non-dimensional time units:

using Oceananigans
grid = RectilinearGrid(CPU(), size=(128, 128), x=(0, 2ฯ€), y=(0, 2ฯ€), topology=(Periodic, Periodic, Flat))
model = NonhydrostaticModel(grid; advection=WENO())
ฯต(x, y) = 2rand() - 1
set!(model, u=ฯต, v=ฯต)
simulation = Simulation(model; ฮ”t=0.01, stop_time=4)
run!(simulation)

But there's more: loading CUDA.jl (via using CUDA) and changing CPU() to GPU() makes this code run on a CUDA-enabled Nvidia GPU.

Dive into the documentation for more code examples and tutorials.
Below, you'll find movies from GPU simulations along with CPU and GPU performance benchmarks.

The Oceananigans knowledge base

It's deep and includes:

Citing and otherwise spreading the word

If you use Oceananigans for your research, teaching, or fun ๐Ÿคฉ, everyone in our community will be grateful
if you credit Oceananigans by name.

The community has published a number of articles describing the development of Oceananigans,
including a recent preprint submitted to the Journal of Advances in Modeling Earth Systems that presents an overview of all the things that make Oceananigans unique:

"High-level, high-resolution ocean modeling at all scales with Oceananigans"

by Gregory L. Wagner, Simone Silvestri, Navid C. Constantinou, Ali Ramadhan, Jean-Michel Campin,
Chris Hill, Tomas Chor, Jago Strong-Wright, Xin Kai Lee, Francis Poulin, Andre Souza, Keaton J. Burns,
Siddhartha Bishnu, John Marshall, and Raffaele Ferrari

submitted to the Journal of Advances in Modeling Earth Systems, arXiv:2502.14148

Please cite this ๐Ÿ‘† overview paper if you use Oceananigans in published work.

We've also published/submitted several model development papers. Please cite these below ๐Ÿ‘‡ if you use
the features they describe! Also, if you have developed a new feature in Oceananigans and describe it in a paper, make sure to open a pull request to add it to this list:

We also maintain a list of publications using Oceananigans.jl.
If you have work using Oceananigans that you would like to have listed there, please open a pull request to add it or let us know!

Contributing

If you're interested in contributing to the development of Oceananigans we want your help no matter how big or small a contribution you make!
Cause we're all in this together.

If you'd like to work on a new feature, or if you're new to open source and want to crowd-source neat projects that fit your interests, you should start a discussion right away.

For more information check out our contributor's guide.

Movies

Deep convection

Watch deep convection in action

Free convection

Watch free convection in action

Winds blowing over the ocean

Watch winds blowing over the ocean

Free convection with wind stress

Watch free convection with wind stress in action

Performance benchmarks

We continuously measure the performance of Oceananigans by initializing models of various sizes with different schemes and closures and measuring the wall clock time taken per model iteration (or time step). These benchmarks are run on every commit in main and tracked on our performance dashboard.

To make full use of or fully saturate the computing power of a GPU such as an Nvidia Tesla V100 or
a Titan V, the model should have around ~10 million grid points or more.

Sometimes counter-intuitively running with Float32 is slower than Float64. This is likely due
to type mismatches causing slowdowns as floats have to be converted between 32-bit and 64-bit, an
issue that needs to be addressed meticulously. Due to other bottlenecks such as memory accesses and
GPU register pressure, Float32 models may not provide much of a speedup so the main benefit becomes
lower memory costs (by around a factor of 2).

Performance benchmark plots

Citation (CITATION.cff)

cff-version: 1.2.0
title: Oceananigans.jl
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - family-names: Oceananigans contributors
identifiers:
  - type: doi
    value: 10.5281/zenodo.4019271
repository-code: 'https://github.com/CliMA/Oceananigans.jl'
url: 'https://clima.github.io/OceananigansDocumentation/stable/'
abstract: Julia software for fast, friendly, flexible, ocean-flavored fluid dynamics on CPUs and GPUs.
license: MIT
preferred-citation:
  type: article
  authors:
  - family-names: "Ramadhan"
    given-names: "Ali"
    orcid: "https://orcid.org/0000-0003-1102-1520"
  - family-names: "Wagner"
    given-names: "Gregory LeClaire"
    orcid: "https://orcid.org/0000-0001-5317-2445"
  - family-names: "Hill"
    given-names: "Chris"
  - family-names: "Jean-Michel"
    given-names: "Campin"
  - family-names: "Churavy"
    given-names: "Valentin"
    orcid: "https://orcid.org/0000-0002-9033-165X"
  - family-names: "Souza"
    given-names: "Andre"
    orcid: "https://orcid.org/0000-0001-8025-3558"
  - family-names: "Edelman"
    given-names: "Alan"
    orcid: "https://orcid.org/0000-0001-7676-3133"
  - family-names: "Ferrari"
    given-names: "Raffaele"
    orcid: "https://orcid.org/0000-0003-1895-4294"
  - family-names: "Marshall"
    given-names: "John"
    orcid: "https://orcid.org/0000-0001-9230-3591"
  title: "Oceananigans.jl: Fast and friendly geophysical fluid dynamics on GPUs"
  journal: "Journal of Open Source Software"
  doi: "10.21105/joss.02018"
  volume: 5
  issue: 53
  start: 2018
  year: 2020

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 3 days ago

Total Commits: 12,242
Total Committers: 115
Avg Commits per committer: 106.452
Development Distribution Score (DDS): 0.712

Commits in past year: 956
Committers in past year: 54
Avg Commits per committer in past year: 17.704
Development Distribution Score (DDS) in past year: 0.828

Name Email Commits
ali-ramadhan a****n@g****m 3526
Gregory Wagner w****g@g****m 2744
Simone Silvestri s****0@g****m 2056
Navid C. Constantinou n****y 1926
tomchor t****r@g****m 681
francispoulin f****n@u****a 270
Mosรจ Giordano 7****o 172
Elise Palethorpe e****y@g****m 78
sandreza a****a@g****m 73
Xin Kai Lee x****i@m****u 56
suyashbire1 s****9@g****m 45
Jago Strong-Wright j****w@p****m 42
hennyg888 h****2@h****m 38
Victoria Whitley w****v@a****t 37
dkytezab d****e@g****m 36
github-actions[bot] 4****] 34
christophernhill c****h@m****u 29
William Moses gh@w****m 26
Benoรฎt Pasquier 4****c 24
dependabot[bot] 4****] 23
Sid s****u@g****m 20
Andreas Klocker a****r@b****g 15
Joseph Kump j****7@u****u 14
Taimoor Sohail t****l@u****u 14
Valentin Churavy v****y@g****m 14
Eliot Quon e****t@a****h 14
Jean-Michel Campin j****c@m****u 13
Josef Bisits j****s@g****m 10
CompatHelper Julia c****y@j****g 10
Simone Silvestri s****i@d****u 9
and 85 more...

Committer domains:


Issue and Pull Request metadata

Last synced: 9 days ago

Total issues: 1,849
Total pull requests: 3,502
Average time to close issues: 7 months
Average time to close pull requests: 29 days
Total issue authors: 143
Total pull request authors: 108
Average comments per issue: 4.59
Average comments per pull request: 4.19
Merged pull request: 2,597
Bot issues: 0
Bot pull requests: 125

Past year issues: 164
Past year pull requests: 739
Past year average time to close issues: about 2 months
Past year average time to close pull requests: 15 days
Past year issue authors: 33
Past year pull request authors: 48
Past year average comments per issue: 2.1
Past year average comments per pull request: 3.61
Past year merged pull request: 418
Past year bot issues: 0
Past year bot pull requests: 18

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/clima/oceananigans.jl

Top Issue Authors

  • ali-ramadhan (461)
  • glwagner (458)
  • navidcy (225)
  • tomchor (169)
  • francispoulin (76)
  • simone-silvestri (66)
  • xkykai (45)
  • dkytezab (24)
  • jagoosw (19)
  • iuryt (14)
  • liuchihl (10)
  • ewquon (10)
  • mukund-gupta (8)
  • suyashbire1 (8)
  • Sumanshekhar17 (8)

Top Pull Request Authors

  • glwagner (930)
  • navidcy (566)
  • ali-ramadhan (454)
  • simone-silvestri (442)
  • tomchor (205)
  • giordano (126)
  • github-actions[bot] (103)
  • xkykai (76)
  • francispoulin (56)
  • jagoosw (53)
  • aklocker42 (33)
  • dkytezab (33)
  • siddharthabishnu (30)
  • wsmoses (24)
  • dependabot[bot] (22)

Top Issue Labels

  • bug ๐Ÿž (259)
  • documentation ๐Ÿ“œ (186)
  • cleanup ๐Ÿงน (155)
  • user interface/experience ๐Ÿ’ป (149)
  • feature ๐ŸŒŸ (136)
  • question ๐Ÿ’ญ (135)
  • testing ๐Ÿงช (119)
  • abstractions ๐ŸŽจ (117)
  • numerics ๐Ÿงฎ (102)
  • GPU ๐Ÿ‘พ (96)
  • performance ๐Ÿ๏ธ (93)
  • output ๐Ÿ’พ (64)
  • science ๐ŸŒŠ (57)
  • package ๐Ÿ“ฆ (50)
  • grids ๐Ÿ—บ๏ธ (40)
  • help wanted ๐Ÿฆฎ (39)
  • good first issue ๐Ÿค (38)
  • distributed ๐Ÿ•ธ๏ธ (34)
  • immersed boundaries โ›ฐ๏ธ (29)
  • turbulence closures ๐ŸŽ (20)
  • boundary conditions ๐Ÿ“ (18)
  • ๐Ÿšจ high priority ๐Ÿšจ (18)
  • reactant โˆ‡ (17)
  • cubed sphere ๐ŸงŠ๐ŸŒŽ (14)
  • extensions ๐Ÿงฌ (11)
  • models ๐Ÿงซ (10)
  • duplicate ๐Ÿงฌ (9)
  • simulation ๐ŸŽฎ (7)
  • ๐Ÿšฒ bikeshedding (3)
  • benchmark performance (2)

Top Pull Request Labels

  • documentation ๐Ÿ“œ (313)
  • testing ๐Ÿงช (167)
  • bug ๐Ÿž (165)
  • cleanup ๐Ÿงน (157)
  • package ๐Ÿ“ฆ (123)
  • numerics ๐Ÿงฎ (118)
  • user interface/experience ๐Ÿ’ป (97)
  • feature ๐ŸŒŸ (93)
  • benchmark performance (92)
  • GPU ๐Ÿ‘พ (92)
  • output ๐Ÿ’พ (78)
  • performance ๐Ÿ๏ธ (78)
  • extensions ๐Ÿงฌ (75)
  • distributed ๐Ÿ•ธ๏ธ (59)
  • grids ๐Ÿ—บ๏ธ (59)
  • ๐Ÿšจ DO NOT MERGE ๐Ÿšจ (58)
  • turbulence closures ๐ŸŽ (56)
  • science ๐ŸŒŠ (52)
  • abstractions ๐ŸŽจ (35)
  • cubed sphere ๐ŸงŠ๐ŸŒŽ (35)
  • immersed boundaries โ›ฐ๏ธ (32)
  • dependencies (26)
  • boundary conditions ๐Ÿ“ (25)
  • Launch Distributed Buildkite (21)
  • reactant โˆ‡ (19)
  • julia (16)
  • qualified method extensions (12)
  • breaking change :broken_heart: (8)
  • validation scripts ๐Ÿ’…๐Ÿผ (7)
  • simulation ๐ŸŽฎ (6)

Package metadata

proxy.golang.org: github.com/CliMA/Oceananigans.jl

proxy.golang.org: github.com/clima/oceananigans.jl

juliahub.com: Oceananigans

๐ŸŒŠ Julia software for fast, friendly, flexible, ocean-flavored fluid dynamics on CPUs and GPUs

  • Homepage: https://clima.github.io/OceananigansDocumentation/stable
  • Documentation: https://docs.juliahub.com/General/Oceananigans/stable/
  • Licenses: MIT
  • Latest release: 0.106.0 (published 9 months ago)
  • Last Synced: 2026-03-23T10:19:23.718750Z (8 months ago)
  • Versions: 373
  • Dependent Packages: 9
  • Dependent Repositories: 0
  • Downloads: 13,317 Last month
  • Rankings:
    • Stargazers count: 0.386%
    • Forks count: 0.421%
    • Average: 5.957%
    • Dependent repos count: 6.056%
    • Dependent packages count: 16.965%

Dependencies

.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite
Dockerfile docker
  • julia 1.9.3 build
.github/workflows/ci.yml actions
  • actions/checkout 9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 composite
  • actions/checkout v7 composite
  • actions/upload-artifact 043fb46d1a93c77aae656e7c1c64a875d1fc6a0a composite
  • codecov/codecov-action v7 composite
  • codecov/codecov-action fb8b3582c8e4def4969c97caa2f19720cb33a72f composite
  • julia-actions/cache e97f6fc1a6e21c82253c85e269be7340376aa425 composite
  • julia-actions/cache v3 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-processcoverage v1 composite
  • julia-actions/julia-processcoverage 03114f09f119417c3242a9fb6e0b722676aedf38 composite
  • julia-actions/julia-runtest v1 composite
  • julia-actions/setup-julia v3 composite
  • julia-actions/setup-julia 4a12c5f801ca5ef0458bba44687563ef276522dd composite
validation/convergence_tests/Manifest.toml julia
validation/convergence_tests/Project.toml julia
  • CUDA *
  • Glob *
  • JLD2 *
  • LaTeXStrings *
  • Logging *
  • OffsetArrays *
  • Printf *
  • PyPlot *
  • Statistics *
  • Test *
validation/orthogonal_spherical_shell_grid/Manifest.toml julia
  • 303 dependencies
Project.toml julia
  • Adapt *
  • BFloat16s *
  • Crayons *
  • CubedSphere *
  • Dates *
  • Distances *
  • DocStringExtensions *
  • FFTW *
  • GPUArraysCore *
  • Glob *
  • InteractiveUtils *
  • JLD2 *
  • KernelAbstractions *
  • Krylov *
  • LinearAlgebra *
  • Logging *
  • MPI *
  • MuladdMacro *
  • OffsetArrays *
  • OrderedCollections *
  • Pkg *
  • Printf *
  • ReactantCore *
  • Rotations *
  • SeawaterPolynomials *
  • SparseArrays *
  • StaticArrays *
  • Statistics *
  • StructArrays *
validation/stokes_drift/Project.toml julia
  • GLMakie *
  • Oceananigans *
.github/workflows/Whitespace.yml actions
  • actions/checkout v7 composite
  • julia-actions/setup-julia v3 composite
.github/workflows/publish-benchmarks.yml actions
  • actions/checkout v7 composite
  • benchmark-action/github-action-benchmark v1 composite
.github/workflows/dependency_checks.yml actions
validation/orthogonal_spherical_shell_grid/Project.toml julia
  • GLMakie *
  • Oceananigans *
  • OrthogonalSphericalShellGrids *
  • StaticArrays *
benchmarking/Project.toml julia
  • ArgParse *
  • CUDA *
  • DataDeps *
  • Dates *
  • JLD2 *
  • JSON *
  • MPI *
  • NCDatasets *
  • Oceananigans *
  • Printf *
  • SeawaterPolynomials *
  • Statistics *
  • Zarr *
validation/stokes_drift/Manifest.toml julia
  • 316 dependencies
docs/package.json npm
  • @mdit/plugin-mathjax ^0.25.0
  • @mdit/plugin-tex ^0.23.1
  • @nolebase/vitepress-plugin-enhanced-readabilities ^2.14.0
  • markdown-it ^14.1.0
  • markdown-it-footnote ^4.0.0
  • markdown-it-mathjax3 ^4.3.2
  • vitepress ^1.6.3
  • vitepress-plugin-tabs ^0.6.0
test/Project.toml julia
  • AMDGPU *
  • Adapt *
  • Aqua *
  • CUDA *
  • CairoMakie *
  • ConservativeRegridding *
  • DataDeps *
  • Dates *
  • Distances *
  • Enzyme *
  • ExplicitImports *
  • FFTW *
  • GPUArraysCore *
  • Glob *
  • JLD2 *
  • KernelAbstractions *
  • LinearAlgebra *
  • Logging *
  • MPI *
  • MPIPreferences *
  • Metal *
  • NCCL *
  • NCDatasets *
  • Oceananigans *
  • OffsetArrays *
  • Pkg *
  • Printf *
  • Random *
  • Reactant *
  • SafeTestsets *
  • SeawaterPolynomials *
  • SparseArrays *
  • Statistics *
  • StructArrays *
  • Test *
  • TimesDates *
  • Zarr *
  • oneAPI *
docs/Project.toml julia
  • Adapt *
  • CUDA *
  • CairoMakie *
  • Documenter *
  • DocumenterCitations *
  • DocumenterVitepress *
  • InteractiveUtils *
  • JLD2 *
  • KernelAbstractions *
  • LinearAlgebra *
  • Literate *
  • MPI *
  • NCDatasets *
  • Oceananigans *
  • Pkg *
  • Polynomials *
  • Rotations *
  • SeawaterPolynomials *
  • StructArrays *
  • TimesDates *
  • Zarr *

Score: 21.785677768191178