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 ode oceanography sciml differential-equations numerical partial-differential-equations pde neural-ode ocean-sciences
Last synced: about 11 hours ago
JSON representation
Repository metadata
๐ Julia software for fast, friendly, flexible, ocean-flavored fluid dynamics on CPUs and GPUs
- Host: GitHub
- URL: https://github.com/clima/oceananigans.jl
- Owner: CliMA
- License: mit
- Created: 2018-10-13T14:15:44.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2025-04-21T18:51:16.000Z (5 days ago)
- Last Synced: 2025-04-21T19:46:43.362Z (5 days ago)
- Topics: climate, climate-change, data-assimilation, fluid-dynamics, gpu, julia, machine-learning, ocean
- Language: Julia
- Homepage: https://clima.github.io/OceananigansDocumentation/stable
- Size: 47.3 MB
- Stars: 1,110
- Watchers: 31
- Forks: 230
- Open Issues: 321
- Releases: 318
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Citation: CITATION.cff
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.jl is developed by the Climate Modeling Alliance and heroic external collaborators.
Contents
- Contents
- Installation instructions
- Running your first model
- The Oceananigans knowledge base
- Citing and otherwise spreading the word
- Contributing
- Movies
- Performance benchmarks
Installation instructions
Oceananigans is a registered Julia package. So to install it,
-
Download Julia (version 1.9 or later).
-
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: 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:
-
Documentation that provides
- example Oceananigans scripts,
- tutorials that describe key Oceananigans objects and functions,
- explanations of Oceananigans finite-volume-based numerical methods,
- details of the dynamical equations solved by Oceananigans models, and
- a library documenting all user-facing Oceananigans objects and functions.
-
Discussions on the Oceananigans github, covering topics like
- "Computational science", or how to science and set up numerical simulations in Oceananigans, and
- "Experimental features", which covers new and sparsely-documented features for those who like to live dangerously.
If you've got a question or something, anything! to talk about, don't hesitate to start a new discussion.
-
The Oceananigans wiki contains practical tips for getting started with Julia, accessing and using GPUs, and productive workflows when using Oceananigans.
-
The
#oceananigans
channel on the Julia Slack, which accesses "institutional knowledge" stored in the minds of the amazing Oceananigans community. -
Issues and pull requests also contain lots of information about problems we've found, solutions we're trying to implement, and dreams we're dreaming to make tomorrow better ๐.
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,
John Marshall, Raffaele Ferrarisubmitted 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:
-
Silvestri et al., "A New WENO-Based Momentum Advection Scheme for Simulations of Ocean Mesoscale Turbulence".
This paper describes the development of
WENOVectorInvariant()
advection scheme, which can be used as the
momentum_advection
scheme forHydrostaticFreeSurfaceModel
. -
Silvestri et al., "A GPU-based ocean dynamic core for routine mesoscale-resolving climate simulations".
This paper describes the optimization of the
HydrostaticFreeSurfaceModel
algorithm, including the implementation
of a newSplitExplicitFreeSurface
algorithm forDistributed
architectures for multiple GPUs. As a result of this work,
global simulations with O(10 km) grid spacing can be run on 16-20 nodes, achieving 10 simulated years per day (SYPD). -
Wagner et al., "Formulation and calibration of CATKE, a one-equation parameterization for microscale ocean mixing".
This paper describes the development of
CATKEVerticalDiffusivity()
, including how it was calibrated automatically to
a suite of 35 large eddy simulations (also run with Oceananigans). It additionally features solutions fromTKEDissipationVerticalDiffusivity
(also known as "k-epsilon"). -
Ramadhan et al., "Oceananigans.jl: Fast and friendly geophysical fluid dynamics on GPUs".
This article in the Journal of Open Source Software describes an early version of Oceananigans'
NonhydrostaticModel
.
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
Free convection
Winds blowing over the ocean
Free convection with wind stress
Performance benchmarks
We perform some performance benchmarks (see the performance benchmarks section of the documentation) by initializing models of various sizes and measuring the wall clock time taken per model iteration (or time step).
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).
Citation (CITATION.cff)
cff-version: 1.2.0 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" - family-names: "Edelman" given-names: "Adam" orcid: "https://orcid.org/0000-0002-9033-165X" - family-names: "Ferrari" given-names: "Raffaele" orcid: "https://orcid.org/0000-0003-1895-4294" - family-names: "Marshall" given-names: "John" 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
- Name: Climate Modeling Alliance
- Login: CliMA
- Email: [email protected]
- Kind: organization
- Description: An alliance of scientists, engineers and applied mathematicians, dedicated to pioneering a new, data-informed approach to climate modeling
- Website: https://clima.caltech.edu
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/43161188?v=4
- Repositories: 67
- Last ynced at: 2023-03-03T21:04:27.588Z
- Profile URL: https://github.com/CliMA
GitHub Events
Total
- Fork event: 42
- Create event: 468
- Commit comment event: 146
- Release event: 55
- Issues event: 193
- Watch event: 169
- Delete event: 588
- Member event: 7
- Issue comment event: 2290
- Push event: 3767
- Pull request review event: 1377
- Pull request review comment event: 1086
- Pull request event: 750
Last Year
- Fork event: 42
- Create event: 468
- Commit comment event: 146
- Release event: 55
- Issues event: 193
- Watch event: 169
- Delete event: 588
- Member event: 7
- Issue comment event: 2290
- Push event: 3767
- Pull request review event: 1377
- Pull request review comment event: 1086
- Pull request event: 750
Committers metadata
Last synced: 3 days ago
Total Commits: 10,950
Total Committers: 76
Avg Commits per committer: 144.079
Development Distribution Score (DDS): 0.682
Commits in past year: 454
Committers in past year: 25
Avg Commits per committer in past year: 18.16
Development Distribution Score (DDS) in past year: 0.551
Name | Commits | |
---|---|---|
ali-ramadhan | a****n@g****m | 3487 |
Gregory Wagner | w****g@g****m | 2500 |
Simone Silvestri | s****0@g****m | 1830 |
Navid C. Constantinou | n****y | 1715 |
tomchor | t****r@g****m | 606 |
francispoulin | f****n@u****a | 267 |
Elise Palethorpe | e****y@g****m | 78 |
sandreza | a****a@g****m | 73 |
suyashbire1 | s****9@g****m | 45 |
hennyg888 | h****2@h****m | 38 |
Victoria Whitley | w****v@a****t | 37 |
Jago Strong-Wright | j****w@p****m | 33 |
christophernhill | c****h@m****u | 29 |
github-actions[bot] | 4****] | 25 |
William Moses | gh@w****m | 18 |
Valentin Churavy | v****y@g****m | 13 |
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 |
Alex Cavaliere | a****e@s****m | 5 |
Avik Pal | a****l@m****u | 5 |
Gabriele Bozzola | g****a@c****u | 5 |
iury simoes-sousa | i****t@p****e | 5 |
Kamontat Chantrachirathumrong | g****b@k****t | 4 |
Alexis Montoison | 3****n | 4 |
Keaton J. Burns | k****s@g****m | 4 |
Sid | s****u@g****m | 4 |
Tim Besard | t****d@g****m | 4 |
Xin Kai Lee | 5****i | 4 |
and 46 more... |
Committer domains:
- mit.edu: 5
- uwaterloo.ca: 1
- att.net: 1
- wsmoses.com: 1
- julialang.org: 1
- dhcp-10-29-66-48.dyn.mit.edu: 1
- sharpnotions.com: 1
- caltech.edu: 1
- pm.me: 1
- kamontat.net: 1
- mail.de: 1
- pop-os.localdomain: 1
- jling.dev: 1
- utexas.edu: 1
- gmx.de: 1
- cedar5.cedar.computecanada.ca: 1
- protonmail.ch: 1
- mac-barker-5-2.mit.edu: 1
- ulg.ac.be: 1
- uci.edu: 1
- anu.edu.au: 1
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 1,684
Total pull requests: 2,667
Average time to close issues: 6 months
Average time to close pull requests: 24 days
Total issue authors: 114
Total pull request authors: 73
Average comments per issue: 5.21
Average comments per pull request: 4.28
Merged pull request: 2,094
Bot issues: 0
Bot pull requests: 99
Past year issues: 283
Past year pull requests: 711
Past year average time to close issues: 20 days
Past year average time to close pull requests: 11 days
Past year issue authors: 43
Past year pull request authors: 29
Past year average comments per issue: 5.7
Past year average comments per pull request: 3.4
Past year merged pull request: 486
Past year bot issues: 0
Past year bot pull requests: 21
Top Issue Authors
- glwagner (455)
- ali-ramadhan (447)
- navidcy (224)
- tomchor (145)
- francispoulin (72)
- simone-silvestri (63)
- jagoosw (23)
- iuryt (13)
- xkykai (10)
- Sumanshekhar17 (8)
- liuchihl (8)
- suyashbire1 (8)
- mukund-gupta (8)
- sandreza (7)
- NoraLoose (7)
Top Pull Request Authors
- glwagner (841)
- navidcy (470)
- ali-ramadhan (429)
- simone-silvestri (321)
- tomchor (157)
- github-actions[bot] (92)
- francispoulin (51)
- jagoosw (45)
- wsmoses (21)
- siddharthabishnu (19)
- christophernhill (16)
- xkykai (11)
- amontoison (11)
- jlk9 (11)
- jbisits (11)
Top Issue Labels
- bug ๐ (246)
- documentation ๐ (189)
- user interface/experience ๐ป (163)
- cleanup ๐งน (161)
- question ๐ญ (147)
- feature ๐ (139)
- abstractions ๐จ (118)
- testing ๐งช (107)
- numerics ๐งฎ (95)
- performance ๐๏ธ (94)
- GPU ๐พ (92)
- output ๐พ (66)
- science ๐ (60)
- package ๐ฆ (53)
- grids ๐บ๏ธ (41)
- good first issue ๐ค (41)
- help wanted ๐ฆฎ (39)
- distributed ๐ธ๏ธ (26)
- immersed boundaries โฐ๏ธ (21)
- ๐จ high priority ๐จ (18)
- turbulence closures ๐ (17)
- cubed sphere ๐ง๐ (14)
- boundary conditions ๐ (13)
- models ๐งซ (10)
- duplicate ๐งฌ (9)
- simulation ๐ฎ (8)
- extensions ๐งฌ (6)
- ๐ฒ bikeshedding (3)
- multithreading ๐งต (2)
- parameterizations (1)
Top Pull Request Labels
- documentation ๐ (269)
- bug ๐ (148)
- package ๐ฆ (113)
- testing ๐งช (109)
- cleanup ๐งน (106)
- numerics ๐งฎ (94)
- feature ๐ (83)
- user interface/experience ๐ป (81)
- GPU ๐พ (76)
- performance ๐๏ธ (58)
- science ๐ (51)
- grids ๐บ๏ธ (45)
- output ๐พ (42)
- ๐จ DO NOT MERGE ๐จ (42)
- turbulence closures ๐ (39)
- extensions ๐งฌ (38)
- distributed ๐ธ๏ธ (30)
- abstractions ๐จ (29)
- cubed sphere ๐ง๐ (27)
- immersed boundaries โฐ๏ธ (26)
- boundary conditions ๐ (14)
- benchmark performance (8)
- dependencies (7)
- models ๐งซ (6)
- validation scripts ๐ ๐ผ (6)
- ๐ฒ bikeshedding (4)
- biogeochemistry ๐ฆ (4)
- help wanted ๐ฆฎ (4)
- simulation ๐ฎ (4)
- experimental feature ๐งช (3)
Package metadata
- Total packages: 1
-
Total downloads:
- julia: 2,022 total
- Total dependent packages: 9
- Total dependent repositories: 0
- Total versions: 313
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.96.21 (published 26 days ago)
- Last Synced: 2025-04-25T14:39:17.905Z (1 day ago)
- Versions: 313
- Dependent Packages: 9
- Dependent Repositories: 0
- Downloads: 2,022 Total
-
Rankings:
- Stargazers count: 0.386%
- Forks count: 0.421%
- Average: 5.957%
- Dependent repos count: 6.056%
- Dependent packages count: 16.965%
Dependencies
- julia-actions/setup-julia v1 composite
- JuliaRegistries/TagBot v1 composite
- julia 1.9.3 build
Score: 19.213145681423168