2. Computations

This following recipes allow users to visualize CBIOMES-global (alpha version) (Section 2.1), reproduce it using the ocean model (Section 2.2), post-process native grid output (Section 2.3), and experiment with the ocean model (Section 2.4).

2.1. Visualization

Each Netcdf file generated via Convert to Netcdf recipes satisfies the so-called CF conventions. This is the case of all Netcdf files found in the CBIOMES-global (alpha version) monthly climatology folder, which can thus readily be ingested and visualized using software such as Panoply and many others. Furthermore, each nctiles collection generated via Convert to Netcdf recipes can be ingested by gcmfaces which provides several methods to visualize native grid output.

To be Continued ...

2.2. Model Run

The following recipe will Compile And Run the ocean model as needed to reproduce CBIOMES-global (alpha version). Documentation of the model configuration is provided in [FCH+15] (global grid + physics) and in the Section 1.1 climatology folder (biochemistry + ecology).

Prerequisites

The following recipe assumes that Code, Setup, And Input have been installed as shown in Recommended Directory Organization (see Section 1.3). Running the model further requires a computer cluster equipped with gcc and gfortran, or alternative compilers, and MPI libraries for parallel computing (see MITgcm documentation). Netcdf libraries are also useful but not required.

Compile And Run

#1) go to model setup directory
cd MITgcm/mysetups/CBIOMES/

#2) compile model in build/
bash tools/shell/compile_model.sh

#3) prepare run/ directory
bash tools/shell/prep_rundir.sh

#4) run model on 360 cores
cd run
mpiexec -np 360 ./mitgcmuv

Note

Two modifications of this workflow can be needed depending on the computing environment. First, on most computer clusters, mpiexec (or mpirun) is called via a queuing system rather than directly from the command line as shown here. Second, compile_model.sh uses an linux_amd64_ifort+mpi_ice_nas option file that suits the ifort compiler on the pleiades computer. Option files that may better suit other compilers and computers can be found in the MITgcm/tools/build_options/ subdirectory.

2.3. Processing

The following recipes have been used to post-process model output on its native grid – the so-called LLC90 grid [FCH+15]. Covered topics include plotting, interpolating, and formatting.

Prerequisites

Plot And Analyze

The following recipe reads in native grid output in binary format (generated directly by MITgcm) or in tiled Netcdf format (created from MITgcm output via Convert to Netcdf). It decpicts various variables and compile all of the generated plots in the so-called solution booklet.

To be continued...

Interpolate Output

The following Matlab recipe reads in binary, native grid, output from MITgcm and interpolates it to a regular \(1/2\times1/2^\circ\) longitude-latitude grid. The CBIOMES-global (alpha version) interpolated climatology was created by feeding the results of this recipe to the Convert to Netcdf recipe.

p = genpath([pwd '/tools/matlab/']); addpath(p);
process2interp_driver([pwd '/run/']);
!mv run/diags/diags_interp_tmp run/diags_interp

Convert to Netcdf

The first recipe below takes the result of Interpolate Output and converts it into Netcdf files.

p = genpath([pwd '/tools/matlab/']); addpath(p);
interp2nctiles_driver([pwd '/run/']);
!mv run/diags_interp/nctiles_tmp run/diags_interp_netcdf

The next recipe below instead reads in native grid, binary output as generated by MITgcm directly and converts it to a tiled Netcdf format known as nctiles [FCH+15].

p = genpath([pwd '/tools/matlab/']); addpath(p);
process2nctiles_driver([pwd '/run/']);
!mv run/diags/nctiles_tmp run/diags_nctiles

Note

The above recipes generally extract variable names, descriptions, units, etc. directly from the available_diagnostics.log file generated by MITgcm with two potential exceptions: 1) in interpolated cases, vector fields should be converted to eastward / northward components, and variable names modified accordingly; 2) in all cases, passive tracer variables can be associated with more explicit names based on PTRACERS_names defined in data.ptracers.

2.4. Experiments

This section outlines methods that allow users to modify and experiment with model settings – this is often useful to better understand and improve upon existing solutions.

To be continued...