JuliaClimate Notebooks

Notebooks that show Julia packages related to climate working in concert.
View on GitHub Star

Overview

Julia notebooks (using Jupyter or Pluto) that illustrate some of the JuliaClimate packages working in concert and within the broader ecosystem.

Binder DOI

The ClimateModels.jl package provides an interface to models often used in climate science. Included notebooks can be used to run these models (e.g. in the mybinder cloud) and generate new output.

A second series of notebooks rather replays model data provided by the 2021 IPCC report (from the Intergovernmental Panel on Climate Change). For additional information about the plots, please refer to the report.

An important requirement in climate science is to derive transports using native model grid output to allow for maximum precision e.g. in closing energy budgets. This is one of the applications of MeshArrays.jl – the computation and analysis of global ocean transports derived accurately from gridded model output.

IndividualDisplacements.jl extends this approach by providing a particle tracking framework that readily operates on climate model C-grids (see MeshArrays.jl). In the examples, model output from the MITgcm are loaded using functions provided by MITgcmTools.jl.

The Data Structures section provide examples for reading and writing files (incl. NetCDF and Zarr files), as well as interpolation of variables, and other common tasks in climate and data science.

Sample Plots

Meridional Overturning Streamfunction
Meridional Overturning Streamfunction
Particle Tracking
Particle Tracking

IPCC report fig 1b
IPCC report fig 1b
IPCC report fig 2
IPCC report fig 2

IPCC report fig 3
IPCC report fig 3
IPCC report fig 5
IPCC report fig 5

Vector Potential
Vector Potential
Scalar Potential
Scalar Potential

ClimateModels.jl notebooks

ClimateModels.jl provides a uniform interface to climate models of varying complexity and completeness. Models that range from low dimensional to whole Earth System models can be run and/or analyzed via this framework.

It also supports e.g. cloud computing workflows that start from previous model output available over the internet. Common file formats are supported. Version control, using git, is included to allow for workflow documentation and reproducibility.

Examples / Running Models Examples / Replaying Outputs

IPCC, 2021: Summary for Policymakers. In: Climate Change 2021: The Physical Science Basis. Contribution of Working Group I to the Sixth Assessment Report of the Intergovernmental Panel on Climate Change [Masson-Delmotte, V., P. Zhai, A. Pirani, S. L. Connors, C. Péan, S. Berger, N. Caud, Y. Chen, L. Goldfarb, M. I. Gomis, M. Huang, K. Leitzell, E. Lonnoy, J.B.R. Matthews, T. K. Maycock, T. Waterfield, O. Yelekçi, R. Yu and B. Zhou (eds.)]. Cambridge University Press. In Press.

Examples / Ocean Transports

  • transports computes total ocean currents over latitude bands. It plots interpolated results over the Global Ocean.

  • streamfunction provides a synthetic view of ocean currents from above. It computes a horizontal streamfunction along with the other, divergent, transport component.

  • overturning computes meridional overturning circulation (the M.O.C.; also sometimes described as ocean conveyor belt).

  • particles tracks particles in the Global Ocean. It computes particle trajectories from gridded flow fields.

IndividualDisplacements.jl notebooks

IndividualDisplacements.jl computes point displacements over a gridded domain. It is geared towards the analysis of Climate, Ocean, etc models (Arakawa C-grids are natively supported) and the simulation of material transports within the Earth System (e.g. plastics or planktons in the Ocean; dusts or chemicals in the Atmosphere).

MITgcmTools.jl notebooks

MITgcmTools.jl is a set of tools for running MITgcm, analyzing its output, and/or modifying its inputs. A set of Pluto.jl notebooks, which e.g. run MITgcm interactively, can be found below or via in the docs.

Examples / Running Models Examples / Analyzing Results

Examples / Data Structures

  • interpolation illustrates how the geo-spatial interpolation method in MeshArrays.jl works and can be used to e.g. produce global maps.

  • ZarrCloud accesses climate model output hosted in the cloud, from the CMIP6 archive, using AWS.jl and Zarr.jl via ClimateModels.jl.

  • MeshArrays illustrates the main data structures defined in MeshArrays.jl, data communication between neighboring subdomains, and application to transport modeling.

  • NCTiles converts binary data into meta-data-rich NetCDF files using NCTiles.jl for (1) a simple rectangular grid; (2) a tiled domain distributed over multiple files.

Notes

  • Each .ipynb notebook in this repository should be paired with a .jl file via jupytext

  • To start an interactive version, e.g., use this mybinder.org link

  • Data downloaded into the inputs/ folder can safely be removed afterwards

  • Efficiency can be improved in various places or simply through parallelization.

  • Please use the repository issue tracker for queries, bug reports, new contributions, etc.

  • Below are additional notebooks that further illustrate specific packages.