Overview

MITgcm.jl provides supports the analysis of MITgcm results in Julia. It can also compile a model configuration, edit model parameters, and run model simulations from within julia.

Functionalities are documented in the coming sections, and in the Examples.

Installation Instructions

You can install the latest version of MITgcm.jl using the built-in package manager.

using Pkg
Pkg.add("MITgcm")
Tip

The ECCO-Docker image has MITgcm.jl pre-installed, as well as gfortran, MPI, and NetCDF allowing to run any MITgcm configuration. The ECCO-Binder instance (free, but small) is available to try functionalities in the cloud.

MITgcm File Formats

A common use case for MITgcm.jl is to use and analyze model output from a previous MITgcm run. As an example, the notebook from JuliaCon2021 (MITgcm_tutorial_global_oce_biogeo.jl) reads and visualize results from the standard MITgcm configuration called tutorial_global_oce_biogeo.

Note

This notebook builds and runs tutorial_global_oce_biogeo from within Julia. Alternatively, the MITgcm documentation explains how to build and run tutorials at the command line in linux.

A typical MITgcm run stores model output within the run/ folder, including the standard STDOUT text files. scan_rundir / scan_stdout provides a summary information about what's in the run/ folder. With this metadata, we are ready to read model output. The various file formats that MITgcm can generate are covered below.

Grid variables are often needed for analysis. The grid output can be read from file using either GridLoad_mdsio or GridLoad_mnc. This will return Γ.XC, Γ.YC, etc formated using MeshArrays.jl. See also GridLoad_native.

Note

The MITgcm_scan_output.jl notebook does this in bulk for all configurations in MITgcm/verification and displays the gridded model domain for each model configuration (this page).

MITgcm Configurations

In MITgcm.jl, a model configuration is represented as a MITgcm_config. This data structure allows you take advantage of the ClimateModels.jl interface for example. setup can prepare a temporary directory for the MITgcm_config to run in. Then build can compile the model, and MITgcm_launch run it.

The verification_experiments function provides a list of standard model configurations. Each one has a subfolder in joinpath(MITgcm_path[1],"verification") where MITgcm can be compiled as mitgcmuv.

Note

For more on these aspects, see Examples, Model Configurations, and ClimateModels Interface.

Interactive notebooks can be found in the Examples section (and the examples/ subfolder). They demonstrate functionalities like plotting with Makie.jl and particle tracking with IndividualDisplacements.jl.

API Reference