4. MITgcm Tutorial Example Experiments

The full MITgcm distribution comes with a set of pre-configured numerical experiments. Some of these example experiments are tests of individual parts of the model code, but many are fully fledged numerical simulations. Full tutorials exist for a few of the examples, and are documented in sections Section 4.1 - Section 4.14. The other examples follow the same general structure as the tutorial examples, see below. All example experiments are located in subdirectories under the directory verification. A list of additional experiments (i.e, not documented as full tutorials), with brief description, is provided in Section 4.15 and Section 4.16.

Each example experiment directory has the following subdirectories:

  • code: contains code specific to the example. At a minimum, this directory includes the following files:

    • code/packages.conf: declares the list of packages or package groups to be used. If not included, the default set of packages is located in pkg/pkg_groups. Package groups are simply convenient collections of commonly used packages which are defined in pkg/pkg_groups (see Using MITgcm Packages). Some packages may require other packages or may require their absence (that is, they are incompatible) and these package dependencies are listed in pkg/pkg_depend.

    • code/SIZE.h: declares the size of underlying computational grid. This file is compiled instead of the MITgcm repository version model/inc/SIZE.h.

    • The code/ directory may include other files and subroutines specific to the experiment, i.e., containing changes from the standard repository version. For example, some experiments contains CPP header options files to enable or disable some parts of the code at compile time; the most common ones would be model/inc/CPP_OPTIONS.h for core model options and «PKG»_OPTIONS.h for individual packages.

  • input: contains the input data files required to run the example. At a minimum, the input directory contains the following files:

    • input/data: this file, written as a namelist, specifies the main parameters for the experiment.

    • input/data.pkg: contains parameters relative to the packages used in the experiment.

    • input/eedata: this file contains “execution environment” data. This consists of a specification of the number of threads to use in \(x\) and \(y\). For multi-threaded execution,these will be set to numbers greater than 1.

    • Forcing and topography file(s), as well as files describing the initial state of the experiment and any other supporting data. Required support files vary from experiment to experiment, depending on the setup.

  • results: this directory contains the output file output.txt produced by the simulation example. This file is useful for comparison with your own output when you run the experiment.

  • build: this directory is initially empty and should be used to compile the model and generate the executable.

  • run: this directory is initially empty and should be used to run the executable. From the (empty) run directory, link files from input using the command ln -s ../input/* ., then execute the file ../input/prepare_run if it exists. If you are running one of the experiment variations, i.e., using input.«OTHER», first link files from input.«OTHER» (running ../input.«OTHER»/prepare_run if it exists) and next link files from input (and run ../input/prepare_run). Following this procedure, file links from input.«OTHER» will NOT be overwritten by identically named files in input.

The tutorial experiments are as follows:

In directory tutorial_barotropic_gyre: Single layer ocean gyre (barotropic with free-surface), using a Cartesian grid. If you are new to MITgcm, start here, as no prior experience with MITgcm is assumed. Introduces building and running the model, with description of model output files and simple methods to load and plot model output.

In directory tutorial_baroclinic_gyre: Ocean double-gyre using spherical coordinates (i.e., latitude-longitude coordinates) with 15 vertical layers. Second introductory tutorial, assumes you have read through Barotropic Ocean Gyre. Introduces using NetCDF for model output, and how to use the diagnostics package to customize output and its writing frequency.

In directory tutorial_reentrant channel: Reentrant channel in the Southern Ocean with idealized topography, 49 vertical layers. Tutorial compares solution using coarse horizontal resolution, with and without GM parameterization (pkg/gmredi), versus a high-resolution, eddy-permitting configuration. Third and final introductory tutorial, assumes reader is familiar with MITgcm basics described in tutorials Barotropic Ocean Gyre and Baroclinic Ocean Gyre. Also introduces pkg/layers and pkg/rbcs.

In directory tutorial_advection_in_gyre: Short tutorial comparing the results using different advection schemes in a single-layer, ocean double-gyre. Demonstrates the importance of carefully selecting an advection scheme for a specific setup.

In directory tutorial_global_oce_latlon: Coarse resolution (4ox4o) global ocean simulation, using a spherical ocean grid with 15 vertical layers. Monthly climatological forcing of of wind stress, heat and freshwater fluxes is employed, with surface restoring of temperature and salinity. Simulates the large-scale ocean circulation.

In directory tutorial_global_oce_in_p: Global ocean simulation with a similar configuration as Global Ocean Simulation except pressure is used as the vertical coordinate instead of the traditional height coordinate (exploiting MITgcm’s height–pressure coordinate coding isomorphism). In this configuration the model does NOT make the Boussinesq approximation.

In directory tutorial_held_suarez_cs: Simulates (dry) 3-D atmosphere dynamics using Held and Suarez forcing on a (global) cubed sphere grid. The vertical coordinate is a rescaled pressure coordinate (\(p^*\)) with 20 levels; orography is flat. Radiation effects are represented by Newtonian cooling.

In directory tutorial_deep_convection: Non-uniformly surface-forced ocean deep convection in a doubly periodic box. This tutorial showcases MITgcm’s non-hydrostatic capability in a spatially small domain (3 km x 3 km x 1 km deep), exploring the temporal and spatial characteristics of convection plumes as they might exist during a period of oceanic deep convection.

In directory tutorial_plume_on_slope: Non-hydrostatic simulation of a non-rotating gravity plume descending down a continental slope, forced by surface cooling. Model domain is 2-D with open boundaries conditions used in a the deep-water end of the domain.

In directory tutorial_global_oce_biogeo: Global ocean simulation (similar to tutorial Global Ocean Simulation except using 2.8ox2.8o resolution) which includes a dissolved inorganic carbon biogeochemistry model. The biogeochemical model considers the coupled cycles of carbon, oxygen, phosphorus and alkalinity, which are included as passive tracers. A simplified parameterization of biological production is also included.

In directory tutorial_global_oce_optim: This tutorial illustrates the optimization capacity of the MITgcm, running the adjoint of a global ocean simulation (model setup similar to Global Ocean Simulation). This adjoint run optimizes a time-independent surface heat flux (i.e., the control variable) which brings the model climatology closest to observed climatology, using a cost function based on gridpoint error in temperature. TAF and OpenAD adjoint setups.

In directory tutorial_tracer_adjsens: A second experiment demonstrating MITgcm’s adjoint capabilities, here examining the sensitivity of surface outgassing of a passive tracer as a function of tracer injection site location within the ocean interior. The global (4ox4o) ocean setup from tutorial Global Ocean Simulation is again used for this tutorial. TAF and OpenAD adjoint setups.

In directory tutorial_cfc_offline: This tutorial contains an experiment which uses MITgcm in offline mode (i.e., with prescribed ocean dynamics terms, from a prior forward integration of MITgcm), simulating the penetration of CFCs into the ocean interior during the last century. The model domain is global with 2.8ox2.8o resolution.

In directory tutorial_rotating_tank: Laboratory rotating tank simulation, using a cylindrical coordinate system at laboratory scale of 46 cm diameter and 14.5 cm deep. This is a typical laboratory setup for illustrating principles of geophysical fluid mechanics. An annulus of fluid is heated differentially on the interior and exterior walls of the tank.

4.15. Additional Example Experiments: Forward Model Setups

For many experiments, additional information is provided in a README file located in the respective experiment’s subdirectory.

  1. 1D_ocean_ice_column - Oceanic column with seaice on top.

  2. adjustment.128x64x1 - Barotropic adjustment problem on latitude-longitude grid with 128x64 grid points (2.8o resolution).

  3. adjustment.cs-32x32x1 - Barotropic adjustment problem on cube sphere grid with 32x32 points per face (roughly 2.8o resolution) with a rectangular island at the equator. Note that “blank tiles” are used in the MPI test (data.exch2.mpi). Also contains a non-linear free-surface, atmospheric like, barotropic adjustment version (input.nlfs).

  4. advect_cs - 2-D passive advection test on cube sphere grid (32x32 grid points per face, roughly 2.8o resolution).

  5. advect_xy - 2-D (horizontal plane) passive advection test on Cartesian grid. Also contains an additional setup using Adams-Bashforth 3 (input.ab3_c4).

  6. advect_xz - 2-D (vertical plane) passive advection test on Cartesian grid. Also contains an additional setup using non-linear free-surface with divergent barotropic flow and implicit vertical advection (input.nlfs), and a setup using piecewise quartic (“mono” and “weno” limiter) advection schemes (input.pqm).

  7. aim.5l_cs - 5-level intermediate atmospheric physics, global configuration on cube sphere grid (32x32 grid points per face, roughly 2.8o resolution). Also contains an additional setup with a slab-ocean and thermodynamic sea ice (input.thSI).

  8. aim.5l_Equatorial_Channel - 5-level intermediate atmospheric physics, 3-D equatorial channel configuration.

  9. aim.5l_LatLon - 5-level intermediate atmospheric physics, global configuration, on latitude-longitude grid with 128x64x5 grid points (2.8o resolution).

  10. cfc_example - Global ocean with online computation and advection of CFC11 and CFC12.

  11. cheapAML_box - Example using cheap atmospheric mixed layer (cheapaml) package.

  12. cpl_aim+ocn - Coupled ocean-atmosphere realistic configuration on cubed-sphere cs32 horizontal grid, using intermediate atmospheric physics (pkg/aim_v23) thermodynamic seaice (pkg/thsice) and land packages. Also contains an additional setup with seaice dynamics (input_cpl.icedyn, input_atm.icedyn, input_ocn.icedyn).

  13. deep_anelastic - Convection simulation on a giant planet: relaxes both the Boussinesq approximation (anelastic) and the thin atmosphere approximation (deep atmosphere).

  14. dome - Idealized 3-D test of a density-driven bottom current (Denmark Overflow Mixing and Entrainment experiment).

  15. exp2 - Old version of the global ocean experiment (no GM, no partial-cells). Also contains an additional setup with rigid lid (input.rigidLid).

  16. exp4 - Flow over a Gaussian bump in open-water or channel with open boundaries. Also contains an additional setup using non-linear free-surface (input.nlfs), and a setup using Stevens (1990) [Ste90] boundary conditions (input.stevens).

  17. fizhi-cs-32x32x40 - Global atmospheric simulation with realistic topography, 40 vertical levels, a cubed sphere grid and the full atmospheric physics package.

  18. fizhi-cs-aqualev20 - Global atmospheric simulation on an aqua planet with full atmospheric physics. Run is perpetual March with an analytical SST distribution. This is the configuration used for the APE (Aqua Planet Experiment) participation experiment.

  19. fizhi-gridalt-hs - Global atmospheric simulation Held-Suarez (1994) [HS94] forcing, with the physical forcing and the dynamical forcing running on different vertical grids.

  20. flt_example - Example using float package.

  21. front_relax - Relaxation of an 2-D (\(y-z\)) ocean thermal front (test of Gent and McWilliams scheme). Also contains additional setups:

    • using the identical setup except with pressure as the vertical coordinate instead of height (input.in_p)

    • using the boundary-value problem method (Ferrari et al. 2010 [FGNV10]) (input.bvp)

    • with mixed-layer eddy parameterization (Ferrari and McWilliams 2008 [FMCD08]) (input.mxl)

    • with dry-cell at the top and a sloping bottom (input.top).

  22. global_ocean.90x40x15 - Global ocean simulation at 4ox4o resolution. Similar to tutorial_global_oce_latlon, but using \(z^*\) coordinates with quasi-non-hydrostatic and non-hydrostatic metric terms. This experiment illustrates the use of sbo package. Note that “blank tiles” are used in the MPI test (data.exch2.mpi). Also contains additional setups:

  23. global_ocean.cs32x15 - Global ocean experiment on the cubed sphere grid. Also contains additional setups:

  24. global_ocean_ebm - Global ocean experiment on a lat-lon grid coupled to a zonally averaged atmospheric energy balance model. Similar to global_ocean.90x40x15 experiment.

  25. global_oce_biogeo_bling - Global ocean biogeochemistry simulation, based on Biogeochemistry Simulation but using package bling instead of the DIC package.

  26. global_with_exf - Global ocean experiment (at 4ox4o) on a lat-lon grid using the exf package with exf interpolation. Similar to tutorial_global_oce_latlon experiment. Also contains a secondary setup with yearly exf fields (input.yearly).

  27. halfpipe_streamice - Example using package streamice.

  28. hs94.128x64x5 - 3-D atmosphere dynamics on lat-lon grid, using Held and Suarez (1994) [HS94] forcing.

  29. hs94.1x64x5 - Zonal averaged atmosphere dynamics using Held and Suarez (1994) [HS94] forcing.

  30. hs94.cs-32x32x5 - 3-D atmosphere dynamics using Held and Suarez (1994) [HS94] forcing on the cubed sphere, similar to tutorial_held_suarez_cs experiment but using linear free-surface and only 5 levels. Also contains an additional setup with implicit internal gravity waves treatment and Adams-Bashforth 3 (input.impIGW).

  31. ideal_2D_oce - Idealized 2-D global ocean simulation on an aqua planet.

  32. internal_wave - Ocean internal wave forced by open boundary conditions. Also contains an additional setup using pkg/kl10 (see Section 8.4.5, Klymak and Legg 2010 [KL10]) (input.kl10).

  33. inverted_barometer - Simple test of atmospheric pressure loading with radially symmetric Bessel-function geometry in a quadratic domain.

  34. isomip - ISOMIP-like setup (Ice Shelf Ocean Model Intercomparison Project experiment 0) including ice-shelf cavities (pkg/shelfice). Also contains additional setups:

    • with “htd” (Hellmer’s thermodynamics, Hellmer 1989 [HO89]) (input.htd).

    • using package icefront (input.icefront)

    • using package OBCS enabled to balance surface mass (freshwater and ice shelf mass flux) input through open boundaries (input.obcs).

  35. lab_sea - Regional (2ox2o) Labrador Sea simulation on a lat-lon grid using pkg/seaice. Also contains additional setups:

  36. matrix_example - Test of experimental method to accelerate convergence towards equilibrium.

  37. MLAdjust - Simple tests of different viscosity formulations in a zonally reentrant, flat-bottom channel. Contains additional setups; see verification/MLAdjust/README for a listing of different viscosity settings in these experiments:

  38. natl_box - Eastern subtropical North Atlantic with KPP scheme. Contains additional setup with added tracers (pkg/ptracers) using the package longstep to speed up integration time (input.longstep).

  39. offline_exf_seaice - Sea ice on top of oceanic surface layer in an idealized channel. Forcing is computed by bulk-formulae (pkg/exf) with temperature relaxation to prescribed SST (i.e., no momentum timestepping in ocean, so ocean is “offline”, not to be confused with pkg/offline). Also contains additional setups:

  40. seaice_itd - Seaice example using ice thickness distribution (ITD); otherwise very similar to offline_exf_seaice. Also contains additional setups; see verification/seaice_itd/README for details of these setups:

  41. seaice_obcs - Similar to lab_sea (input.salt_plume) experiment with only a fraction of the domain and open boundary conditions derived from lab_sea experiment. Also contains additional setups:

  42. shelfice_2d_remesh - Simple experiment to test (pkg/shelfice) vertical remeshing code in 2-D idealized-geometry setup.

  43. short_surf_wave - Short surface wave adjustment (non-hydrostatic) in homogeneous 2-D vertical section (\(x-z\)).

  44. so_box_biogeo - Open boundary Southern Ocean box around Drake Passage, using same model parameters and forcing as experiment tutorial_global_oce_biogeo from which initial conditions and open boundary conditions have been extracted. Also contains additional setups:

    • using the SolveSAPHE algorithm (Munhoven 2013 [Mun13]) to determine oceanic pH (input.saphe)

    • using the calcite-saturation code (with 3-D pH and silica input file) with the original pH solver (input.caSat0)

    • using the calcite-saturation code with the Munhoven “FAST” solver (input.caSat3)

  45. solid-body.cs-32x32x1 - Solid body rotation test for cube sphere grid.

  46. tutorial_deep_convection - Experiment as described in Section 4.8, also contains an additional setup using the Smagorinisky (1963) [Sma63] viscosity scheme (input.smag3d).

  47. tutorial_plume_on_slope - Experiment as described in Section 4.9, also contains an additional setup using the logarithmic law of the wall to compute the bottom drag coefficient (input.roughBot).

  48. vermix - Simple test in a small domain (3 columns) for ocean vertical mixing schemes. The standard setup (input) uses the KPP scheme Large et al. (1994) [LMD94]. Also contains additional setups:

4.16. Additional Example Experiments: Adjoint Model Setups

Unless stated otherwise, the physical setup of the adjoint run is identical to the forward run, see description above. TAF adjoint setups require building with directory code_ad with input directory input_ad, whereas OpenAD requires directories code_oad and input_oad respectively.

  1. 1D_ocean_ice_column - Based on standard forward experiment, TAF adjoint setup, uses package ecco.

  2. bottom_ctrl_5x5 - TAF adjoint test using the bottom topography as the control parameter, uses package ecco and “not self-adjoint” version of cg2d: cg2d_nsa.F. Also contains an additional TAF adjoint setup that uses default cg2d.F with a hand-written full (manual) adjoint routine cg2d_mad.F (input_ad.facg2d)

  3. global_ocean.90x40x15 - Based on standard forward experiment, TAF and OpenAD adjoint setups. Also contains additional TAF adjoint setups:

  4. global_ocean.cs32x15 - Based on standard forward experiment, TAF adjoint setup. Also contains additional TAF adjoint setups:

  5. global_ocean_ebm - Based on standard forward experiment, TAF adjoint setup.

  6. global_oce_biogeo_bling - Based on standard forward experiment, TAF adjoint setup, uses package ecco.

  7. global_oce_latlon - Simple adjoint experiment (used also to test OpenAD compiler), TAF and OpenAD adjoint setups. Also contains additional TAF and OpenAD adjoint setups:

  8. global_with_exf - Based on standard forward experiment, TAF adjoint setup.

  9. halfpipe_streamice - Based on standard forward experiment, TAF and OpenAD adjoint setups.

  10. hs94.1x64x5 - Based on standard forward experiment, TAF and OpenAD adjoint setups.

  11. isomip - Based on standard forward experiment, TAF and OpenAD adjoint setups. Also contains additional TAF adjoint setup with “htd” (Hellmer’s thermodynamics, Hellmer 1989 [HO89]) (input_ad.htd).

  12. lab_sea - Based on standard forward experiment, TAF adjoint setup, uses package ecco and divided adjoint (DIVA). Also contains additional TAF adjoint setups:

  13. obcs_ctrl - Adjoint test using open boundary conditions as control parameters, uses package ecco.

  14. offline_exf_seaice - Based on standard forward experiment, TAF adjoint setup. Also contains additional TAF adjoint setup with sea ice thermodynamics-only using pkg/thsice (input_ad.thsice).

  15. tutorial_dic_adjoffline - TAF adjoint setup of offline form of passive tracers coupled to the dissolved inorganic carbon biogeochemistry model (currently NOT documented as a tutorial experiment).

  16. tutorial_global_oce_biogeo - Based on forward experiment described in Section 4.10, TAF and OpenAD adjoint setups.

  17. tutorial_tracer_adjsens - Based on adjoint experiment described in Section 4.12, contains an additional TAF setup using Second Order Moment (SOM) advection scheme (input_ad.som81).