SkillAgentSearch skills...

Oceananigans.jl

🌊 Julia software for fast, friendly, flexible, ocean-flavored fluid dynamics on CPUs and GPUs

Install / Use

/learn @CliMA/Oceananigans.jl
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<!-- Title --> <h1 align="center"> Oceananigans.jl </h1> <!-- description --> <p align="center"> <strong>🌊 Fast and friendly ocean-flavored Julia software for simulating incompressible fluid dynamics in Cartesian and spherical shell domains on CPUs and GPUs. https://clima.github.io/OceananigansDocumentation/stable</strong> </p> <!-- Information badges --> <p align="center"> <a href="https://github.com/CliMA/Oceananigans.jl/releases"> <img alt="GitHub tag (latest SemVer pre-release)" src="https://img.shields.io/github/v/tag/CliMA/Oceananigans.jl?include_prereleases&label=latest%20version&logo=github&sort=semver&style=flat-square"> </a> <a href="https://mit-license.org"> <img alt="MIT license" src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square"> </a> <a href="https://github.com/CliMA/Oceananigans.jl/discussions"> <img alt="Ask us anything" src="https://img.shields.io/badge/Ask%20us-anything-1abc9c.svg?style=flat-square"> </a> <a href="https://github.com/SciML/ColPrac"> <img alt="ColPrac: Contributor's Guide on Collaborative Practices for Community Packages" src="https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet?style=flat-square"> </a> <a href="https://doi.org/10.21105/joss.02018"> <img alt="JOSS" src="https://joss.theoj.org/papers/10.21105/joss.02018/status.svg"> </a> </p> <!-- Documentation and downloads --> <!-- counts downloads from individual IPs excluding bots (eg, CI) --> <!-- see https://discourse.julialang.org/t/announcing-package-download-stats/69073 --> <p align="center"> <a href="https://clima.github.io/OceananigansDocumentation/stable"> <img alt="Stable documentation" src="https://img.shields.io/badge/documentation-stable%20release-blue?style=flat-square"> </a> <a href="https://clima.github.io/OceananigansDocumentation/dev"> <img alt="Development documentation" src="https://img.shields.io/badge/documentation-in%20development-orange?style=flat-square"> </a> <a href="https://juliapkgstats.com/pkg/Oceananigans"> <img alt="Downloads per month" src="https://img.shields.io/badge/dynamic/json?url=http%3A%2F%2Fjuliapkgstats.com%2Fapi%2Fv1%2Fmonthly_downloads%2FOceananigans&query=total_requests&suffix=%2Fmonth&label=Downloads&style=flat-square"> </a> <a href="https://juliapkgstats.com/pkg/Oceananigans"> <img alt="Downloads per month" src="https://img.shields.io/badge/dynamic/json?url=http%3A%2F%2Fjuliapkgstats.com%2Fapi%2Fv1%2Ftotal_downloads%2FOceananigans&query=total_requests&&label=Total%20Downloads&style=flat-square"> </a> </p> <!-- Testing and Coverage --> <p align="center"> <a href="https://github.com/JuliaTesting/Aqua.jl" > <img src="https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg?style=flat-square"/> </a> <a href="https://codecov.io/gh/CliMA/Oceananigans.jl" > <img src="https://codecov.io/gh/CliMA/Oceananigans.jl/graph/badge.svg?token=1eev6VdKD0"/> </a> </p>

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

<details><summary>bibtex</summary> <pre><code>@article{Oceananigans-overview-paper-2025, title = {{High-level, high-resolution ocean modeling at all scales with Oceananigans}}, author = {G. L. Wagner and S. Silvestri and N. C. Constantinou and A. Ramadhan and J.-M. Campin and C. Hill and T. Chor and J. Strong-Wright and X. K. Lee and F. Poulin and A. Souza and K. J. Burns and S. Bishnu and J. Marshall and R. Ferrari}, journal = {arXiv preprint}, year = {2025}, archivePrefix = {arXiv}, eprint = {2502.14148}, doi = {10.48550/arXiv.2502.14148}, notes = {submitted to the Journal of Advances in Modeling Earth Systems}, }</code></pre> </details>

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

View on GitHub
GitHub Stars1.3k
CategoryEducation
Updated1d ago
Forks273

Languages

Julia

Security Score

100/100

Audited on Mar 23, 2026

No findings