Back to home page

MITgcm

 
 

    


Warning, /doc/examples/rotating_tank/rotating_tank.rst is written in an unsupported language. File is not indexed.

view on githubraw file Latest commit da2fcf57 on 2020-01-16 02:12:14 UTC
94151a9b18 Jeff*0001 .. _sec_eg_tank:
                0002 
1c8cebb321 Jeff*0003 Rotating Tank
                0004 =============
94151a9b18 Jeff*0005 
d0f2385f28 Jean*0006   (in directory: :filelink:`verification/tutorial_rotating_tank/`)
94151a9b18 Jeff*0007 
                0008 This example configuration demonstrates using the MITgcm to simulate a
                0009 laboratory demonstration using a differentially heated rotating
                0010 annulus of water.  The simulation is configured for a laboratory scale
d67096e55c Jeff*0011 on a :math:`3^{\circ}\times1` cm cylindrical grid with 29
                0012 vertical levels of 0.5 cm each.  This is a typical laboratory setup for
94151a9b18 Jeff*0013 illustrating principles of GFD, as well as for a laboratory data
                0014 assimilation project.
                0015 
                0016 example illustration from GFD lab here
9bc4d8814d Jeff*0017 
                0018 Equations Solved
                0019 ----------------
                0020 
                0021 Discrete Numerical Configuration
                0022 --------------------------------
                0023 
d67096e55c Jeff*0024 The domain is discretized with a uniform cylindrical grid spacing in
                0025 the horizontal set to :math:`\Delta a=1` cm and :math:`\Delta \phi=3^{\circ}`, so
9bc4d8814d Jeff*0026 that there are 120 grid cells in the azimuthal direction and
d67096e55c Jeff*0027 31 grid cells in the radial, representing a tank 62 cm in
9bc4d8814d Jeff*0028 diameter.  The bathymetry file sets the depth=0 in the nine lowest
                0029 radial rows to represent the central of the annulus.  Vertically the
d67096e55c Jeff*0030 model is configured with 29 layers of uniform 0.5 cm
9bc4d8814d Jeff*0031 thickness.
                0032 
                0033 something about heat flux
                0034 
                0035 .. _sec_eg_tank_code_config:
                0036 
                0037 Code Configuration
                0038 ------------------
                0039 
                0040 The model configuration for this experiment resides under the
d0f2385f28 Jean*0041 directory :filelink:`verification/tutorial_rotating_tank/`.  The experiment files
d67096e55c Jeff*0042 
d0f2385f28 Jean*0043  - :filelink:`verification/tutorial_rotating_tank/input/data`
                0044  - :filelink:`verification/tutorial_rotating_tank/input/data.pkg`
                0045  - :filelink:`verification/tutorial_rotating_tank/input/eedata`
                0046  - ``verification/tutorial_rotating_tank/input/bathyPolR.bin``
                0047  - ``verification/tutorial_rotating_tank/input/thetaPolR.bin``
                0048  - :filelink:`verification/tutorial_rotating_tank/code/CPP_OPTIONS.h`
                0049  - :filelink:`verification/tutorial_rotating_tank/code/SIZE.h`
d67096e55c Jeff*0050 
                0051 contain the code customizations and parameter settings for this
9bc4d8814d Jeff*0052 experiments. Below we describe the customizations
                0053 to these files associated with this experiment.
                0054 
d0f2385f28 Jean*0055 File :filelink:`input/data <verification/tutorial_rotating_tank/input/data>`
da2fcf57d2 Jean*0056 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9bc4d8814d Jeff*0057 
d0f2385f28 Jean*0058 .. literalinclude:: ../../../verification/tutorial_rotating_tank/input/data
d67096e55c Jeff*0059     :linenos:
d0f2385f28 Jean*0060     :caption: verification/tutorial_rotating_tank/input/data
d67096e55c Jeff*0061 
                0062 This file specifies the main parameters
9bc4d8814d Jeff*0063 for the experiment. The parameters that are significant for this configuration
                0064 are
                0065 
d67096e55c Jeff*0066 - Lines 9-10,
9bc4d8814d Jeff*0067 
d67096e55c Jeff*0068   ::
9bc4d8814d Jeff*0069 
d67096e55c Jeff*0070       viscAh=5.0E-6,
                0071       viscAz=5.0E-6,
9bc4d8814d Jeff*0072 
d67096e55c Jeff*0073   These lines set the Laplacian friction coefficient in the horizontal
                0074   and vertical, respectively.  Note that they are several orders of
                0075   magnitude smaller than the other examples due to the small scale of
                0076   this example.
9bc4d8814d Jeff*0077 
d67096e55c Jeff*0078 - Lines 13-16,
9bc4d8814d Jeff*0079 
d67096e55c Jeff*0080   ::
9bc4d8814d Jeff*0081 
d67096e55c Jeff*0082       diffKhT=2.5E-6,
                0083       diffKzT=2.5E-6,
                0084       diffKhS=1.0E-6,
                0085       diffKzS=1.0E-6,
9bc4d8814d Jeff*0086 
d67096e55c Jeff*0087   These lines set horizontal and vertical diffusion coefficients for
                0088   temperature and salinity.  Similar to the friction coefficients, the
                0089   values are a couple of orders of magnitude less than most
                0090   configurations.
9bc4d8814d Jeff*0091 
d67096e55c Jeff*0092 - Line 17,
9bc4d8814d Jeff*0093 
d67096e55c Jeff*0094   ::
9bc4d8814d Jeff*0095 
d67096e55c Jeff*0096       f0=0.5,
9bc4d8814d Jeff*0097 
d67096e55c Jeff*0098   this line sets the Coriolis term, and represents a tank spinning at about 2.4 rpm.
9bc4d8814d Jeff*0099 
d67096e55c Jeff*0100 - Lines 24 and 25,
9bc4d8814d Jeff*0101 
d67096e55c Jeff*0102   ::
9bc4d8814d Jeff*0103 
d67096e55c Jeff*0104       rigidLid=.TRUE.,
                0105       implicitFreeSurface=.FALSE.,
9bc4d8814d Jeff*0106 
d67096e55c Jeff*0107   These lines activate  the rigid lid formulation of the surface
                0108   pressure inverter and suppress the implicit free surface form
                0109   of the pressure inverter.
9bc4d8814d Jeff*0110 
d67096e55c Jeff*0111 - Line 40,
9bc4d8814d Jeff*0112 
d67096e55c Jeff*0113   ::
9bc4d8814d Jeff*0114 
d67096e55c Jeff*0115      nIter=0,
9bc4d8814d Jeff*0116 
d67096e55c Jeff*0117   This line indicates that the experiment should start from :math:`t=0` and
                0118   implicitly suppresses searching for checkpoint files associated with
                0119   restarting an numerical integration from a previously saved state.
                0120   Instead, the file ``thetaPolR.bin`` will be loaded to initialized the
                0121   temperature fields as indicated below, and other variables will be
                0122   initialized to their defaults.
9bc4d8814d Jeff*0123 
d67096e55c Jeff*0124 - Line 43,
9bc4d8814d Jeff*0125 
d67096e55c Jeff*0126   ::
9bc4d8814d Jeff*0127 
d67096e55c Jeff*0128      deltaT=0.1,
9bc4d8814d Jeff*0129 
d67096e55c Jeff*0130   This line sets the integration timestep to 0.1 s.  This is an
                0131   unusually small value among the examples due to the small physical
                0132   scale of the experiment.  Using the ensemble Kalman filter to produce
                0133   input fields can necessitate even shorter timesteps.
9bc4d8814d Jeff*0134 
d67096e55c Jeff*0135 - Line 54,
9bc4d8814d Jeff*0136 
d67096e55c Jeff*0137   ::
9bc4d8814d Jeff*0138 
d67096e55c Jeff*0139      usingCylindricalGrid=.TRUE.,
9bc4d8814d Jeff*0140 
d67096e55c Jeff*0141   This line requests that the simulation be performed in a
                0142   cylindrical coordinate system.
9bc4d8814d Jeff*0143 
d67096e55c Jeff*0144 - Line 55,
9bc4d8814d Jeff*0145 
d67096e55c Jeff*0146   ::
9bc4d8814d Jeff*0147 
d67096e55c Jeff*0148      dXspacing=3,
9bc4d8814d Jeff*0149 
d67096e55c Jeff*0150   This line sets the azimuthal grid spacing between each
                0151   :math:`x`-coordinate line
                0152   in the discrete grid. The syntax indicates that the discrete grid
                0153   should be comprised of 120 grid lines each separated by 3\ :sup:`o`.
9bc4d8814d Jeff*0154 
d67096e55c Jeff*0155 - Line 56,
9bc4d8814d Jeff*0156 
d67096e55c Jeff*0157   ::
9bc4d8814d Jeff*0158 
d67096e55c Jeff*0159      dYspacing=0.01,
9bc4d8814d Jeff*0160 
d67096e55c Jeff*0161   This line sets the radial cylindrical grid spacing between each
                0162   :math:`a`-coordinate line in the discrete grid to 1 cm.
9bc4d8814d Jeff*0163 
d67096e55c Jeff*0164 - Line 57,
9bc4d8814d Jeff*0165 
d67096e55c Jeff*0166   ::
9bc4d8814d Jeff*0167 
d67096e55c Jeff*0168      delZ=29*0.005,
9bc4d8814d Jeff*0169 
d67096e55c Jeff*0170   This line sets the vertical grid spacing between each of 29
                0171   :math:`z`-coordinate lines in the discrete grid to 0.005 m (= 5 mm).
9bc4d8814d Jeff*0172 
d67096e55c Jeff*0173 - Line 64,
9bc4d8814d Jeff*0174 
d67096e55c Jeff*0175   ::
9bc4d8814d Jeff*0176 
d67096e55c Jeff*0177      bathyFile='bathyPolR.bin',
9bc4d8814d Jeff*0178 
d67096e55c Jeff*0179   This line specifies the name of the file from which the domain
                0180   'bathymetry' (i.e., tank depth) is read. This file is a 2-D
                0181   (:math:`a,\phi`) map of
                0182   depths. This file is assumed to contain 64-bit binary numbers
                0183   giving the depth of the model at each grid cell, ordered with the :math:`\phi`
                0184   coordinate varying fastest. The points are ordered from low coordinate
                0185   to high coordinate for both axes.  The units and orientation of the
                0186   depths in this file are the same as used in the MITgcm code. In this
                0187   experiment, a depth of 0 m indicates an area outside of the tank
                0188   and a depth of -0.145 m indicates the tank itself.
9bc4d8814d Jeff*0189 
d67096e55c Jeff*0190 - Line 63,
9bc4d8814d Jeff*0191 
d67096e55c Jeff*0192   ::
9bc4d8814d Jeff*0193 
d67096e55c Jeff*0194      hydrogThetaFile='thetaPol.bin',
9bc4d8814d Jeff*0195 
d67096e55c Jeff*0196   This line specifies the name of the file from which the initial values
                0197   of temperature
                0198   are read. This file is a 3-D
                0199   (:math:`x,y,z`) map and is enumerated and formatted in the same manner as the
                0200   bathymetry file.
9bc4d8814d Jeff*0201 
d67096e55c Jeff*0202 - Lines 65 and 66
                0203 
                0204   ::
9bc4d8814d Jeff*0205 
d67096e55c Jeff*0206      tCylIn  = 0.,
                0207      tCylOut  = 20.,
9bc4d8814d Jeff*0208 
d67096e55c Jeff*0209   These line specify the temperatures in degrees Celsius of the interior
                0210   and exterior walls of the tank -- typically taken to be icewater on
                0211   the inside and room temperature on the outside.
                0212 
d0f2385f28 Jean*0213 Other lines in the file :filelink:`verification/tutorial_rotating_tank/input/data` are
                0214 standard values that are described in :numref:`customize_model`.
d67096e55c Jeff*0215 
d0f2385f28 Jean*0216 File - :filelink:`input/data.pkg <verification/tutorial_rotating_tank/input/data.pkg>`
da2fcf57d2 Jean*0217 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9bc4d8814d Jeff*0218 
                0219 This file uses standard default values and does not contain
                0220 customizations for this experiment.
                0221 
d0f2385f28 Jean*0222 File - :filelink:`input/eedata <verification/tutorial_rotating_tank/input/eedata>`
da2fcf57d2 Jean*0223 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9bc4d8814d Jeff*0224 
                0225 This file uses standard default values and does not contain
                0226 customizations for this experiment.
                0227 
d67096e55c Jeff*0228 File ``input/thetaPolR.bin``
                0229 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9bc4d8814d Jeff*0230 
d67096e55c Jeff*0231 This file specifies a 3-D :math:`(x,y,z)`
                0232 map of initial values of :math:`\theta` in degrees Celsius.  This particular
                0233 experiment is set to random values around 20 :sup:`o`\ C to provide initial
9bc4d8814d Jeff*0234 perturbations.
                0235 
d67096e55c Jeff*0236 File ``input/bathyPolR.bin``
                0237 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9bc4d8814d Jeff*0238 
d67096e55c Jeff*0239 This file specifies a 2-D :math:`(x,y)`
9bc4d8814d Jeff*0240 map of depth values. For this experiment values are either
d67096e55c Jeff*0241 0 m  or -delZ m, corresponding respectively to outside or inside of
9bc4d8814d Jeff*0242 the tank. The file contains a raw binary stream of data that is enumerated
d67096e55c Jeff*0243 in the same way as standard MITgcm 2-D, horizontal arrays.
9bc4d8814d Jeff*0244 
d0f2385f28 Jean*0245 File :filelink:`code/SIZE.h <verification/tutorial_rotating_tank/code/SIZE.h>`
da2fcf57d2 Jean*0246 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9bc4d8814d Jeff*0247 
d0f2385f28 Jean*0248 .. literalinclude:: ../../../verification/tutorial_rotating_tank/code/SIZE.h
d67096e55c Jeff*0249     :linenos:
d0f2385f28 Jean*0250     :caption: verification/tutorial_rotating_tank/code/SIZE.h
9bc4d8814d Jeff*0251 
d67096e55c Jeff*0252 Two lines are customized in this file for the current experiment
9bc4d8814d Jeff*0253 
d67096e55c Jeff*0254 - Line 45,
9bc4d8814d Jeff*0255 
d67096e55c Jeff*0256   ::
9bc4d8814d Jeff*0257 
d67096e55c Jeff*0258       sNx=120,
9bc4d8814d Jeff*0259 
d67096e55c Jeff*0260   this line sets
                0261   the lateral domain extent in grid points for the
                0262   axis aligned with the :math:`x`-coordinate.
9bc4d8814d Jeff*0263 
d67096e55c Jeff*0264 - Line 46,
9bc4d8814d Jeff*0265 
d67096e55c Jeff*0266   ::
9bc4d8814d Jeff*0267 
d67096e55c Jeff*0268       sNy=31,
9bc4d8814d Jeff*0269 
d67096e55c Jeff*0270   this line sets
                0271   the lateral domain extent in grid points for the
                0272   axis aligned with the :math:`y`-coordinate.
9bc4d8814d Jeff*0273 
d0f2385f28 Jean*0274 File :filelink:`code/CPP_OPTIONS.h <verification/tutorial_rotating_tank/code/CPP_OPTIONS.h>`
da2fcf57d2 Jean*0275 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9bc4d8814d Jeff*0276 
                0277 This file uses standard default values and does not contain
                0278 customizations for this experiment.
                0279