|
|
|
Next: 3.10.5 Running The Example
Up: 3.10 Baroclinic Gyre MITgcm
Previous: 3.10.3 Discrete Numerical Configuration
Contents
Subsections
3.10.4 Code Configuration
The model configuration for this experiment resides under the
directory verification/tutorial_barotropic_gyre/.
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.
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
. The entries
are ordered from surface to depth. For each depth level the initial
and reference profiles will be uniform in
and
. The values
specified here are read into the variable tRef
in the
model code, by procedure INI_PARMS
ini_theta.F
- Line 6,
viscAz=1.E-2,
this line sets the vertical Laplacian dissipation coefficient to
. 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
- Line 7,
viscAh=4.E2,
this line sets the horizontal laplacian frictional dissipation
coefficient to
. Boundary
conditions for this operator are specified later. The variable
viscAh
is read in the routine
INI_PARMS
and applied in routine
MOM_FLUXFORM.
- Line 8,
no_slip_sides=.FALSE.
this line selects a free-slip lateral boundary condition for the
horizontal laplacian friction operator e.g.
=0 along boundaries in
and
=0 along boundaries in
. The variable
no_slip_sides
is read in the routine
INI_PARMS
and the boundary condition is
evaluated in routine
mom_fluxform.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.
at
, where
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 MOM_FLUXFORM.
mom_fluxform.F
- Line 10,
diffKhT=4.E2,
this line sets the horizontal diffusion coefficient for temperature
to
. The boundary condition on this operator
is
at
all boundaries. The variable diffKhT
is read in
the routine INI_PARMS
and used in routine
CALC_GT.
calc_gt.F
- Line 11,
diffKzT=1.E-2,
this line sets the vertical diffusion coefficient for temperature to
. The boundary condition on this
operator is
= 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.
calc_diffusivity.F
- Line 13,
tAlpha=2.E-4,
This line sets the thermal expansion coefficient for the fluid to
The variable
tAlpha
is read in the routine
INI_PARMS. The routine
FIND_RHO
makes use of tAlpha.
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.
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
ini_spherical_polar_grid.F
- Line 41,
ygOrigin=0.,
This line sets the southern boundary of the modeled domain to
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
ygOrigin
is read in the
routine INI_PARMS
and is used in routine
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
in longitude. The variable
delX
is read in the routine
INI_PARMS
and is used in routine
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
in latitude. The variable
delY
is read in the routine
INI_PARMS
and is used in routine
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
, so that the total model
depth is
. 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
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 (
) 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
indicates a solid
wall and a depth of
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
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 (
) 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
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.,
ygOrigin=0.,
delX=60*1.,
delY=60*1.,
delZ=500.,500.,500.,500.,
&
&PARM05
bathyFile='topog.box',
hydrogThetaFile=,
hydrogSaltFile=,
zonalWindFile='windx.sin_y',
meridWindFile=,
&
This file uses standard default values and does not contain
customisations for this experiment.
This file uses standard default values and does not contain
customisations for this experiment.
The input/windx.sin_y file specifies a two-dimensional (
)
map of wind stress ,
, values. The units used are
(the default for MITgcm). Although
is only a function of
latitude,
, 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.
The input/topog.box file specifies a two-dimensional (
)
map of depth values. For this experiment values are either
or
, 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.
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/s_examples/baroclinic_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 )
This file uses standard default values and does not contain
customisations for this experiment.
This file uses standard default values and does not contain
customisations for this experiment.
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: 3.10.5 Running The Example
Up: 3.10 Baroclinic Gyre MITgcm
Previous: 3.10.3 Discrete Numerical Configuration
Contents
mitgcm-support@mitgcm.org
Copyright © 2006
Massachusetts Institute of Technology |
Last update 2011-01-09 |
|
|