Home Contact Us Site Map  
 
       
    next up previous contents
Next: 3.9.5 Running The Example Up: 3.9 Baroclinic Gyre MITgcm Previous: 3.9.3 Discrete Numerical Configuration   Contents

Subsections


3.9.4 Code Configuration

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

  • input/data
  • input/data.pkg
  • input/eedata,
  • input/windx.sin_y,
  • input/topog.box,
  • code/CPP_EEOPTIONS.h
  • code/CPP_OPTIONS.h,
  • code/SIZE.h.
contain the code customisations and parameter settings for this experiment. Below we describe the customisations to these files associated with this experiment.


3.9.4.1 File input/data

This file, reproduced completely below, specifies the main parameters for the experiment. The parameters that are significant for this configuration are

  • Line 4,
     tRef=20.,10.,8.,6.,
    
    this line sets the initial and reference values of potential temperature at each model level in units of $ ^{\circ }$C. The entries are ordered from surface to depth. For each depth level the initial and reference profiles will be uniform in $ x$ and $ y$. The values specified here are read into the variable tRef in the model code, by procedure INI_PARMS

    \fbox{
\begin{minipage}{5.0in}
{\it S/R INI\_THETA}({\it ini\_theta.F})
\end{minipage}} ini_theta.F

  • Line 6,
     viscAz=1.E-2,
    
    this line sets the vertical Laplacian dissipation coefficient to $ 1
\times 10^{-2} {\rm m^{2}s^{-1}}$. Boundary conditions for this operator are specified later. The variable viscAz is read in the routine ini_parms.F and is copied into model general vertical coordinate variable viscAr At each time step, the viscous term contribution to the momentum equations is calculated in routine CALC_DIFFUSIVITY

    \fbox{
\begin{minipage}{5.0in}
{\it S/R CALC\_DIFFUSIVITY}({\it calc\_diffusivity.F})
\end{minipage}}

  • Line 7,
    viscAh=4.E2,
    
    this line sets the horizontal laplacian frictional dissipation coefficient to $ 1
\times 10^{-2} {\rm m^{2}s^{-1}}$. Boundary conditions for this operator are specified later. The variable viscAh is read in the routine INI_PARMS and applied in routines CALC_MOM_RHS and CALC_GW.

    \fbox{
\begin{minipage}{5.0in}
{\it S/R CALC\_MOM\_RHS}({\it calc\_mom\_rhs.F})
\end{minipage}} \fbox{
\begin{minipage}{5.0in}
{\it S/R CALC\_GW}({\it calc\_gw.F})
\end{minipage}}

  • Line 8,
    no_slip_sides=.FALSE.
    
    this line selects a free-slip lateral boundary condition for the horizontal laplacian friction operator e.g. $ \frac{\partial
u}{\partial y}$=0 along boundaries in $ y$ and $ \frac{\partial
v}{\partial x}$=0 along boundaries in $ x$. The variable no_slip_sides is read in the routine INI_PARMS and the boundary condition is evaluated in routine

    \fbox{
\begin{minipage}{5.0in}
{\it S/R CALC\_MOM\_RHS}({\it calc\_mom\_rhs.F})
\end{minipage}} calc_mom_rhs.F

  • Lines 9,
    no_slip_bottom=.TRUE.
    
    this line selects a no-slip boundary condition for bottom boundary condition in the vertical laplacian friction operator e.g. $ u=v=0$ at $ z=-H$, where $ H$ is the local depth of the domain. The variable no_slip_bottom is read in the routine INI_PARMS and is applied in the routine CALC_MOM_RHS.

    \fbox{
\begin{minipage}{5.0in}
{\it S/R CALC\_MOM\_RHS}({\it calc\_mom\_rhs.F})
\end{minipage}} calc_mom_rhs.F

  • Line 10,
    diffKhT=4.E2,
    
    this line sets the horizontal diffusion coefficient for temperature to $ 400\,{\rm m^{2}s^{-1}}$. The boundary condition on this operator is $ \frac{\partial}{\partial x}=\frac{\partial}{\partial y}=0$ at all boundaries. The variable diffKhT is read in the routine INI_PARMS and used in routine CALC_GT.

    \fbox{ \begin{minipage}{5.0in}
{\it S/R CALC\_GT}({\it calc\_gt.F})
\end{minipage} } calc_gt.F

  • Line 11,
    diffKzT=1.E-2,
    
    this line sets the vertical diffusion coefficient for temperature to $ 10^{-2}\,{\rm m^{2}s^{-1}}$. The boundary condition on this operator is $ \frac{\partial}{\partial z}$ = 0 on all boundaries. The variable diffKzT is read in the routine INI_PARMS. It is copied into model general vertical coordinate variable diffKrT which is used in routine CALC_DIFFUSIVITY.

    \fbox{
\begin{minipage}{5.0in}
{\it S/R CALC\_DIFFUSIVITY}({\it calc\_diffusivity.F})
\end{minipage}} calc_diffusivity.F

  • Line 13,
    tAlpha=2.E-4,
    
    This line sets the thermal expansion coefficient for the fluid to $ 2
\times 10^{-4}\,{\rm degrees}^{-1}$ The variable tAlpha is read in the routine INI_PARMS. The routine FIND_RHO makes use of tAlpha.

    \fbox{
\begin{minipage}{5.0in}
{\it S/R FIND\_RHO}({\it find\_rho.F})
\end{minipage} } find_rho.F

  • Line 18,
    eosType='LINEAR'
    
    This line selects the linear form of the equation of state. The variable eosType is read in the routine INI_PARMS. The values of eosType sets which formula in routine FIND_RHO is used to calculate density.

    \fbox{
\begin{minipage}{5.0in}
{\it S/R FIND\_RHO}({\it find\_rho.F})
\end{minipage} } find_rho.F

  • Line 40,
    usingSphericalPolarGrid=.TRUE.,
    
    This line requests that the simulation be performed in a spherical polar coordinate system. It affects the interpretation of grid input parameters, for example delX and delY and causes the grid generation routines to initialize an internal grid based on spherical polar geometry. The variable usingSphericalPolarGrid is read in the routine INI_PARMS. When set to .TRUE. the settings of delX and delY are taken to be in degrees. These values are used in the routine

    \fbox{
\begin{minipage}{5.0in}
{\it S/R INI\_SPEHRICAL\_POLAR\_GRID}({\it ini\_spherical\_polar\_grid.F})
\end{minipage} } ini_spherical_polar_grid.F

  • Line 41,
    phiMin=0.,
    
    This line sets the southern boundary of the modeled domain to $ 0^{\circ }$ latitude. This value affects both the generation of the locally orthogonal grid that the model uses internally and affects the initialization of the coriolis force. Note - it is not required to set a longitude boundary, since the absolute longitude does not alter the kernel equation discretisation. The variable phiMin is read in the routine INI_PARMS and is used in routine

    \fbox{
\begin{minipage}{5.0in}
{\it S/R INI\_SPEHRICAL\_POLAR\_GRID}({\it ini\_spherical\_polar\_grid.F})
\end{minipage} } ini_spherical_polar_grid.F

  • Line 42,
    delX=60*1.,
    
    This line sets the horizontal grid spacing between each y-coordinate line in the discrete grid to $ 1^{\circ}$ in longitude. The variable delX is read in the routine INI_PARMS and is used in routine

    \fbox{
\begin{minipage}{5.0in}
{\it S/R INI\_SPEHRICAL\_POLAR\_GRID}({\it ini\_spherical\_polar\_grid.F})
\end{minipage} } ini_spherical_polar_grid.F

  • Line 43,
    delY=60*1.,
    
    This line sets the horizontal grid spacing between each y-coordinate line in the discrete grid to $ 1^{\circ}$ in latitude. The variable delY is read in the routine INI_PARMS and is used in routine

    \fbox{
\begin{minipage}{5.0in}
{\it S/R INI\_SPEHRICAL\_POLAR\_GRID}({\it ini\_spherical\_polar\_grid.F})
\end{minipage} } ini_spherical_polar_grid.F

  • Line 44,
    delZ=500.,500.,500.,500.,
    
    This line sets the vertical grid spacing between each z-coordinate line in the discrete grid to $ 500\,{\rm m}$, so that the total model depth is $ 2\,{\rm km}$. The variable delZ is read in the routine INI_PARMS. It is copied into the internal model coordinate variable delR which is used in routine

    \fbox{
\begin{minipage}{5.0in}
{\it S/R INI\_VERTICAL\_GRID}({\it ini\_vertical\_grid.F})
\end{minipage} } ini_vertical_grid.F

  • Line 47,
    bathyFile='topog.box'
    
    This line specifies the name of the file from which the domain bathymetry is read. This file is a two-dimensional ($ x,y$) 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 x 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 $ 0m$ indicates a solid wall and a depth of $ -2000m$ indicates open ocean. The matlab program input/gendata.m shows an example of how to generate a bathymetry file. The variable bathyFile is read in the routine INI_PARMS. The bathymetry file is read in the routine

    \fbox{
\begin{minipage}{5.0in}
{\it S/R INI\_DEPTHS}({\it ini\_depths.F})
\end{minipage} } ini_depths.F

  • Line 50,
    zonalWindFile='windx.sin_y'
    
    This line specifies the name of the file from which the x-direction (zonal) surface wind stress is read. This file is also a two-dimensional ($ x,y$) map and is enumerated and formatted in the same manner as the bathymetry file. The matlab program input/gendata.m includes example code to generate a valid zonalWindFile file. The variable zonalWindFile is read in the routine INI_PARMS. The wind-stress file is read in the routine

    \fbox{
\begin{minipage}{5.0in}
{\it S/R EXTERNAL\_FIELDS\_LOAD}({\it external\_fields\_load.F})
\end{minipage} } external_fields_load.F

other lines in the file input/data are standard values.

# Model parameters
# Continuous equation parameters
 &PARM01
 tRef=20.,10.,8.,6.,
 sRef=10.,10.,10.,10.,
 viscAz=1.E-2,
 viscAh=4.E2,
 no_slip_sides=.FALSE.,
 no_slip_bottom=.TRUE.,
 diffKhT=4.E2,
 diffKzT=1.E-2,
 beta=1.E-11,
 tAlpha=2.E-4,
 sBeta =0.,
 gravity=9.81,
 rigidLid=.FALSE.,
 implicitFreeSurface=.TRUE.,
 eosType='LINEAR',
 readBinaryPrec=64,
 &
# Elliptic solver parameters
 &PARM02
 cg2dMaxIters=1000,
 cg2dTargetResidual=1.E-13,
 &
# Time stepping parameters
 &PARM03
 startTime=0.,
 endTime=12000., 
 deltaTmom=1200.0,
 deltaTtracer=1200.0,
 abEps=0.1,
 pChkptFreq=17000.0,
 chkptFreq=0.0,
 dumpFreq=2592000.0,
 &
# Gridding parameters
 &PARM04
 usingCartesianGrid=.FALSE.,
 usingSphericalPolarGrid=.TRUE.,
 phiMin=0.,
 delX=60*1.,
 delY=60*1.,
 delZ=500.,500.,500.,500.,
 &
 &PARM05
 bathyFile='topog.box',
 hydrogThetaFile=,
 hydrogSaltFile=,
 zonalWindFile='windx.sin_y',
 meridWindFile=,
 &


3.9.4.2 File input/data.pkg

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


3.9.4.3 File input/eedata

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


3.9.4.4 File input/windx.sin_y

The input/windx.sin_y file specifies a two-dimensional ($ x,y$) map of wind stress ,$ \tau_{x}$, values. The units used are $ Nm^{-2}$ (the default for MITgcm). Although $ \tau_{x}$ is only a function of latitude, $ y$, in this experiment this file must still define a complete two-dimensional map in order to be compatible with the standard code for loading forcing fields in MITgcm (routine EXTERNAL_FIELDS_LOAD. The included matlab program input/gendata.m gives a complete code for creating the input/windx.sin_y file.


3.9.4.5 File input/topog.box

The input/topog.box file specifies a two-dimensional ($ x,y$) map of depth values. For this experiment values are either $ 0~{\rm m}$ or $ -2000\,{\rm m}$, corresponding respectively to a wall or to deep ocean. The file contains a raw binary stream of data that is enumerated in the same way as standard MITgcm two-dimensional, horizontal arrays. The included matlab program input/gendata.m gives a complete code for creating the input/topog.box file.


3.9.4.6 File code/SIZE.h

Two lines are customized in this file for the current experiment

  • Line 39,
     sNx=60,
    
    this line sets the lateral domain extent in grid points for the axis aligned with the x-coordinate.

  • Line 40,
     sNy=60,
    
    this line sets the lateral domain extent in grid points for the axis aligned with the y-coordinate.

  • Line 49,
     Nr=4,
    
    this line sets the vertical domain extent in grid points.

C $Header: /u/gcmpack/manual/part3/case_studies/fourlayer_gyre/code/SIZE.h,v 1.2 2001/09/27 00:58:17 cnh Exp $
C $Name:  $
C
C     /==========================================================\
C     | SIZE.h Declare size of underlying computational grid.    |
C     |==========================================================|
C     | The design here support a three-dimensional model grid   |
C     | with indices I,J and K. The three-dimensional domain     |
C     | is comprised of nPx*nSx blocks of size sNx along one axis|
C     | nPy*nSy blocks of size sNy along another axis and one    |
C     | block of size Nz along the final axis.                   |
C     | Blocks have overlap regions of size OLx and OLy along the|
C     | dimensions that are subdivided.                          |
C     \==========================================================/
C     Voodoo numbers controlling data layout.
C     sNx - No. X points in sub-grid.
C     sNy - No. Y points in sub-grid.
C     OLx - Overlap extent in X.
C     OLy - Overlat extent in Y.
C     nSx - No. sub-grids in X.
C     nSy - No. sub-grids in Y.
C     nPx - No. of processes to use in X.
C     nPy - No. of processes to use in Y.
C     Nx  - No. points in X for the total domain.
C     Ny  - No. points in Y for the total domain.
C     Nr  - No. points in Z for full process domain.
      INTEGER sNx
      INTEGER sNy
      INTEGER OLx
      INTEGER OLy
      INTEGER nSx
      INTEGER nSy
      INTEGER nPx
      INTEGER nPy
      INTEGER Nx
      INTEGER Ny
      INTEGER Nr
      PARAMETER (
     &           sNx =  30,
     &           sNy =  30,
     &           OLx =   3,
     &           OLy =   3,
     &           nSx =   2,
     &           nSy =   2,
     &           nPx =   1,
     &           nPy =   1,
     &           Nx  = sNx*nSx*nPx,
     &           Ny  = sNy*nSy*nPy,
     &           Nr  =   4)

C     MAX_OLX  - Set to the maximum overlap region size of any array
C     MAX_OLY    that will be exchanged. Controls the sizing of exch
C                routine buufers.
      INTEGER MAX_OLX
      INTEGER MAX_OLY
      PARAMETER ( MAX_OLX = OLx,
     &            MAX_OLY = OLy )


3.9.4.7 File code/CPP_OPTIONS.h

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


3.9.4.8 File code/CPP_EEOPTIONS.h

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


3.9.4.9 Other Files

Other files relevant to this experiment are

  • model/src/ini_cori.F. This file initializes the model coriolis variables fCorU and fCorV.
  • model/src/ini_spherical_polar_grid.F This file initializes the model grid discretisation variables dxF, dyF, dxG, dyG, dxC, dyC.
  • model/src/ini_parms.F.


next up previous contents
Next: 3.9.5 Running The Example Up: 3.9 Baroclinic Gyre MITgcm Previous: 3.9.3 Discrete Numerical Configuration   Contents
mitgcm-support@dev.mitgcm.org
Copyright © 2002 Massachusetts Institute of Technology