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 climate-science sciml differential-equations pde fluid-dynamics-simulator dae differentialequations

Last synced: about 22 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: 1 day ago

Total Commits: 11,821
Total Committers: 98
Avg Commits per committer: 120.622
Development Distribution Score (DDS): 0.704

Commits in past year: 691
Committers in past year: 43
Avg Commits per committer in past year: 16.07
Development Distribution Score (DDS) in past year: 0.793

Name Email Commits
Ali Ramadhan a****n@g****m 3500
Gregory Wagner w****g@g****m 2687
Simone Silvestri s****0@g****m 2019
Navid Constantinou n****y@g****m 1873
Tomas Chor t****r@g****m 674
Francis J. Poulin f****n@u****a 270
Elise Palethorpe e****y@g****m 78
Andre Souza a****a@g****m 73
Mosรจ Giordano 7****o 72
suyashbire1 s****9@g****m 45
Jago Strong-Wright j****t@g****m 38
hennyg888 h****2@h****m 38
Victoria Whitley w****v@a****t 37
Xin Kai Lee x****i@m****u 34
github-actions[bot] 4****] 34
Chris Hill c****h@m****u 29
William Moses gh@w****m 26
Benoรฎt Pasquier 4****c 22
Sid s****u@g****m 20
Joseph Kump j****7@u****u 14
Valentin Churavy v****y@g****m 14
dependabot[bot] 4****] 14
dkytezab d****e@g****m 14
Jean-Michel Campin j****c@m****u 13
Taimoor Sohail t****l@u****u 11
Josef Bisits j****s@g****m 10
CompatHelper Julia c****y@j****g 10
Eliot Quon e****t@a****h 6
Gabriele Bozzola g****a@c****u 6
Alex Cavaliere a****e@s****m 5
and 68 more...

Committer domains:


Issue and Pull Request metadata

Last synced: 2 days ago

Total issues: 1,731
Total pull requests: 3,759
Average time to close issues: 7 months
Average time to close pull requests: 30 days
Total issue authors: 136
Total pull request authors: 97
Average comments per issue: 4.74
Average comments per pull request: 4.03
Merged pull request: 2,764
Bot issues: 0
Bot pull requests: 136

Past year issues: 75
Past year pull requests: 358
Past year average time to close issues: 15 days
Past year average time to close pull requests: 9 days
Past year issue authors: 26
Past year pull request authors: 33
Past year average comments per issue: 2.61
Past year average comments per pull request: 3.49
Past year merged pull request: 159
Past year bot issues: 0
Past year bot pull requests: 11

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

Top Issue Authors

  • glwagner (450)
  • ali-ramadhan (441)
  • navidcy (223)
  • tomchor (160)
  • francispoulin (73)
  • simone-silvestri (62)
  • xkykai (30)
  • jagoosw (19)
  • iuryt (14)
  • liuchihl (10)
  • mukund-gupta (8)
  • suyashbire1 (8)
  • Sumanshekhar17 (8)
  • sandreza (7)
  • taimoorsohail (7)

Top Pull Request Authors

  • glwagner (1,126)
  • navidcy (604)
  • simone-silvestri (568)
  • ali-ramadhan (449)
  • tomchor (235)
  • github-actions[bot] (120)
  • jagoosw (64)
  • francispoulin (54)
  • xkykai (50)
  • siddharthabishnu (45)
  • wsmoses (45)
  • giordano (34)
  • jlk9 (25)
  • christophernhill (16)
  • dependabot[bot] (16)

Top Issue Labels

  • bug ๐Ÿž (237)
  • documentation ๐Ÿ“œ (182)
  • cleanup ๐Ÿงน (154)
  • user interface/experience ๐Ÿ’ป (149)
  • feature ๐ŸŒŸ (136)
  • question ๐Ÿ’ญ (135)
  • abstractions ๐ŸŽจ (117)
  • testing ๐Ÿงช (110)
  • numerics ๐Ÿงฎ (99)
  • GPU ๐Ÿ‘พ (96)
  • performance ๐Ÿ๏ธ (91)
  • output ๐Ÿ’พ (59)
  • science ๐ŸŒŠ (57)
  • package ๐Ÿ“ฆ (49)
  • grids ๐Ÿ—บ๏ธ (39)
  • help wanted ๐Ÿฆฎ (39)
  • good first issue ๐Ÿค (38)
  • distributed ๐Ÿ•ธ๏ธ (31)
  • immersed boundaries โ›ฐ๏ธ (27)
  • ๐Ÿšจ high priority ๐Ÿšจ (18)
  • turbulence closures ๐ŸŽ (17)
  • boundary conditions ๐Ÿ“ (16)
  • cubed sphere ๐ŸงŠ๐ŸŒŽ (13)
  • extensions ๐Ÿงฌ (10)
  • models ๐Ÿงซ (10)
  • duplicate ๐Ÿงฌ (9)
  • simulation ๐ŸŽฎ (7)
  • reactant โˆ‡ (5)
  • ๐Ÿšฒ bikeshedding (3)
  • benchmark performance (2)

Top Pull Request Labels

  • documentation ๐Ÿ“œ (350)
  • bug ๐Ÿž (183)
  • testing ๐Ÿงช (153)
  • cleanup ๐Ÿงน (133)
  • package ๐Ÿ“ฆ (131)
  • user interface/experience ๐Ÿ’ป (119)
  • numerics ๐Ÿงฎ (116)
  • GPU ๐Ÿ‘พ (107)
  • feature ๐ŸŒŸ (101)
  • output ๐Ÿ’พ (85)
  • extensions ๐Ÿงฌ (82)
  • performance ๐Ÿ๏ธ (72)
  • grids ๐Ÿ—บ๏ธ (69)
  • turbulence closures ๐ŸŽ (61)
  • distributed ๐Ÿ•ธ๏ธ (60)
  • science ๐ŸŒŠ (54)
  • ๐Ÿšจ DO NOT MERGE ๐Ÿšจ (51)
  • cubed sphere ๐ŸงŠ๐ŸŒŽ (44)
  • benchmark performance (40)
  • immersed boundaries โ›ฐ๏ธ (35)
  • abstractions ๐ŸŽจ (32)
  • boundary conditions ๐Ÿ“ (24)
  • dependencies (17)
  • models ๐Ÿงซ (8)
  • validation scripts ๐Ÿ’…๐Ÿผ (8)
  • simulation ๐ŸŽฎ (7)
  • julia (6)
  • reactant โˆ‡ (6)
  • experimental feature ๐Ÿงช (5)
  • help wanted ๐Ÿฆฎ (5)

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 6 months ago)
  • Last Synced: 2026-03-23T10:19:23.718Z (5 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/CompatHelper.yml actions
  • julia-actions/setup-julia v1 composite
.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite
Dockerfile docker
  • julia 1.9.3 build

Score: 21.54177866701335