4.14. Rotating Tank

This example configuration demonstrates using the MITgcm to simulate a laboratory demonstration using a differentially heated rotating annulus of water. The simulation is configured for a laboratory scale on a \(3^{\circ}\times1\) cm cylindrical grid with 29 vertical levels of 0.5 cm each. This is a typical laboratory setup for illustrating principles of GFD, as well as for a laboratory data assimilation project.

example illustration from GFD lab here

4.14.1. Equations Solved

4.14.2. Discrete Numerical Configuration

The domain is discretized with a uniform cylindrical grid spacing in the horizontal set to \(\Delta a=1\) cm and \(\Delta \phi=3^{\circ}\), so that there are 120 grid cells in the azimuthal direction and 31 grid cells in the radial, representing a tank 62 cm in diameter. The bathymetry file sets the depth=0 in the nine lowest radial rows to represent the central of the annulus. Vertically the model is configured with 29 layers of uniform 0.5 cm thickness.

something about heat flux

4.14.3. Code Configuration

The model configuration for this experiment resides under the directory verification/tutorial_rotating_tank/. The experiment files

contain the code customizations and parameter settings for this experiments. Below we describe the customizations to these files associated with this experiment. File input/data

Listing 4.48 verification/tutorial_rotating_tank/input/data
 1# ====================
 2# | Model parameters |
 3# ====================
 5# Continuous equation parameters
 6 &PARM01
 7 tRef=29*20.0,
 8 sRef=29*35.0,
 9 viscAh=5.0E-6,
10 viscAz=5.0E-6,
11 no_slip_sides=.FALSE.,
12 no_slip_bottom=.FALSE.,
13 diffKhT=2.5E-6,
14 diffKzT=2.5E-6,
15 diffKhS=1.0E-6,
16 diffKzS=1.0E-6,
17 f0=0.5,
18 eosType='LINEAR',
19 sBeta =0.,
20 gravity=9.81,
21 rhoConst=1000.0,
22 rhoNil=1000.0,
24 rigidLid=.TRUE.,
25 implicitFreeSurface=.FALSE.,
26 nonHydrostatic=.TRUE.,
27 readBinaryPrec=32,
28 &
30# Elliptic solver parameters
31 &PARM02
32 cg2dMaxIters=1000,
33 cg2dTargetResidual=1.E-7,
34 cg3dMaxIters=10,
35 cg3dTargetResidual=1.E-9,
36 &
38# Time stepping parameters
39 &PARM03
40 nIter0=0,
41 nTimeSteps=20,
43 deltaT=0.1,
44 abEps=0.1,
45 pChkptFreq=2.0,
47 dumpFreq=2.0,
48 monitorSelect=2,
49 monitorFreq=0.1,
50 &
52# Gridding parameters
53 &PARM04
54 usingCylindricalGrid=.TRUE.,
55 dXspacing=3.,
56 dYspacing=0.01,
57 delZ=29*0.005,
58 ygOrigin=0.07,
59 &
61# Input datasets
62 &PARM05
63 hydrogThetaFile='thetaPolR.bin',
64 bathyFile='bathyPolR.bin',
65 tCylIn  = 0.,
66 tCylOut = 20.,
67 &

This file specifies the main parameters for the experiment. The parameters that are significant for this configuration are

  • Lines 9-10,


    These lines set the Laplacian friction coefficient in the horizontal and vertical, respectively. Note that they are several orders of magnitude smaller than the other examples due to the small scale of this example.

  • Lines 13-16,


    These lines set horizontal and vertical diffusion coefficients for temperature and salinity. Similar to the friction coefficients, the values are a couple of orders of magnitude less than most configurations.

  • Line 17,


    this line sets the Coriolis term, and represents a tank spinning at about 2.4 rpm.

  • Lines 24 and 25,


    These lines activate the rigid lid formulation of the surface pressure inverter and suppress the implicit free surface form of the pressure inverter.

  • Line 40,


    This line indicates that the experiment should start from \(t=0\) and implicitly suppresses searching for checkpoint files associated with restarting an numerical integration from a previously saved state. Instead, the file thetaPolR.bin will be loaded to initialized the temperature fields as indicated below, and other variables will be initialized to their defaults.

  • Line 43,


    This line sets the integration timestep to 0.1 s. This is an unusually small value among the examples due to the small physical scale of the experiment. Using the ensemble Kalman filter to produce input fields can necessitate even shorter timesteps.

  • Line 54,


    This line requests that the simulation be performed in a cylindrical coordinate system.

  • Line 55,


    This line sets the azimuthal grid spacing between each \(x\)-coordinate line in the discrete grid. The syntax indicates that the discrete grid should be comprised of 120 grid lines each separated by 3o.

  • Line 56,


    This line sets the radial cylindrical grid spacing between each \(a\)-coordinate line in the discrete grid to 1 cm.

  • Line 57,


    This line sets the vertical grid spacing between each of 29 \(z\)-coordinate lines in the discrete grid to 0.005 m (= 5 mm).

  • Line 64,


    This line specifies the name of the file from which the domain ‘bathymetry’ (i.e., tank depth) is read. This file is a 2-D (\(a,\phi\)) map of depths. This file is assumed to contain 64-bit binary numbers giving the depth of the model at each grid cell, ordered with the \(\phi\) coordinate varying fastest. The points are ordered from low coordinate to high coordinate for both axes. The units and orientation of the depths in this file are the same as used in the MITgcm code. In this experiment, a depth of 0 m indicates an area outside of the tank and a depth of -0.145 m indicates the tank itself.

  • Line 63,


    This line specifies the name of the file from which the initial values of temperature are read. This file is a 3-D (\(x,y,z\)) map and is enumerated and formatted in the same manner as the bathymetry file.

  • Lines 65 and 66

    tCylIn  = 0.,
    tCylOut  = 20.,

    These line specify the temperatures in degrees Celsius of the interior and exterior walls of the tank – typically taken to be icewater on the inside and room temperature on the outside.

Other lines in the file verification/tutorial_rotating_tank/input/data are standard values that are described in Section 3.8. File - input/data.pkg

This file uses standard default values and does not contain customizations for this experiment. File - input/eedata

This file uses standard default values and does not contain customizations for this experiment. File input/thetaPolR.bin

This file specifies a 3-D \((x,y,z)\) map of initial values of \(\theta\) in degrees Celsius. This particular experiment is set to random values around 20 oC to provide initial perturbations. File input/bathyPolR.bin

This file specifies a 2-D \((x,y)\) map of depth values. For this experiment values are either 0 m or -delZ m, corresponding respectively to outside or inside of the tank. The file contains a raw binary stream of data that is enumerated in the same way as standard MITgcm 2-D, horizontal arrays. File code/SIZE.h

Listing 4.49 verification/tutorial_rotating_tank/code/SIZE.h
 4C    include SIZE.h
 5C    !DESCRIPTION: \bv
 6C     *==========================================================*
 7C     | SIZE.h Declare size of underlying computational grid.
 8C     *==========================================================*
 9C     | The design here supports a three-dimensional model grid
10C     | with indices I,J and K. The three-dimensional domain
11C     | is comprised of nPx*nSx blocks (or tiles) of size sNx
12C     | along the first (left-most index) axis, nPy*nSy blocks
13C     | of size sNy along the second axis and one block of size
14C     | Nr along the vertical (third) axis.
15C     | Blocks/tiles have overlap regions of size OLx and OLy
16C     | along the dimensions that are subdivided.
17C     *==========================================================*
18C     \ev
20C     Voodoo numbers controlling data layout:
21C     sNx :: Number of X points in tile.
22C     sNy :: Number of Y points in tile.
23C     OLx :: Tile overlap extent in X.
24C     OLy :: Tile overlap extent in Y.
25C     nSx :: Number of tiles per process in X.
26C     nSy :: Number of tiles per process in Y.
27C     nPx :: Number of processes to use in X.
28C     nPy :: Number of processes to use in Y.
29C     Nx  :: Number of points in X for the full domain.
30C     Ny  :: Number of points in Y for the full domain.
31C     Nr  :: Number of points in vertical direction.
33      INTEGER sNx
34      INTEGER sNy
35      INTEGER OLx
36      INTEGER OLy
37      INTEGER nSx
38      INTEGER nSy
39      INTEGER nPx
40      INTEGER nPy
41      INTEGER Nx
42      INTEGER Ny
43      INTEGER Nr
44      PARAMETER (
45     &           sNx =  30,
46     &           sNy =  23,
47     &           OLx =   3,
48     &           OLy =   3,
49     &           nSx =   4,
50     &           nSy =   1,
51     &           nPx =   1,
52     &           nPy =   1,
53     &           Nx  = sNx*nSx*nPx,
54     &           Ny  = sNy*nSy*nPy,
55     &           Nr  =  29)
57C     MAX_OLX :: Set to the maximum overlap region size of any array
58C     MAX_OLY    that will be exchanged. Controls the sizing of exch
59C                routine buffers.
62      PARAMETER ( MAX_OLX = OLx,
63     &            MAX_OLY = OLy )

Two lines are customized in this file for the current experiment

  • Line 45,


    this line sets the lateral domain extent in grid points for the axis aligned with the \(x\)-coordinate.

  • Line 46,


    this line sets the lateral domain extent in grid points for the axis aligned with the \(y\)-coordinate. File code/CPP_OPTIONS.h

This file uses standard default values and does not contain customizations for this experiment.