Back to home page

darwin3

 
 

    


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

view on githubraw file Latest commit 0bad585a on 2022-02-16 18:55:09 UTC
1c8cebb321 Jeff*0001 .. _sec_held_suarez_cs:
                0002 
                0003 Held-Suarez Atmosphere
                0004 ======================
d67096e55c Jeff*0005 
                0006 (in directory: :filelink:`verification/tutorial_held_suarez_cs/`)
                0007 
                0008 This example illustrates the use of the MITgcm as an atmospheric GCM,
                0009 using simple Held and Suarez (1994) :cite:`held-suar:94` forcing to simulate
                0010 atmospheric dynamics on global scale. The set-up uses the rescaled
                0011 pressure coordinate (:math:`p^*`) of Adcroft and Campin (2004) :cite:`adcroft:04a` in
                0012 the vertical direction, with 20 equally-spaced levels, and the conformal
                0013 cube-sphere grid (C32) described in Adcroft et al. (2004) :cite:`adcroft:04b`.
                0014 
                0015 Overview
                0016 --------
                0017 
                0018 This example demonstrates using the MITgcm to simulate the planetary
                0019 atmospheric circulation, with flat orography and simplified forcing. In
                0020 particular, only dry air processes are considered and radiation effects
                0021 are represented by a simple Newtonian cooling, Thus, this example does
                0022 not rely on any particular atmospheric physics package. This kind of
                0023 simplified atmospheric simulation has been widely used in GFD-type
                0024 experiments and in intercomparison projects of AGCM dynamical cores
                0025 (Held and Suarez 1994 :cite:`held-suar:94`).
                0026 
                0027 The horizontal grid is obtain from the projection of a uniform gridded
                0028 cube to the sphere. Each of the 6 faces has the same resolution, with
                0029 32 :math:`\times` 32 grid points. The equator coincides with a grid
                0030 line and crosses through the middle in 4 of the 6 faces, leaving 2 faces
                0031 for the northern and southern polar regions. This curvilinear grid
                0032 requires the use of the 2\ :sup:`nd` generation exchange topology (:filelink:`pkg/exch2`)
                0033 to connect tile and face edges, but without any limitation on the number
                0034 of processors.
                0035 
                0036 The use of the :math:`p^*` coordinate with 20 equally spaced levels
                0037 (20 :math:`\times` 50 mb, from :math:`p^*=1000` mb to
                0038 :math:`0` at the top of the atmosphere) follows the choice of
                0039 Held and Suarez (1994) :cite:`held-suar:94`. Note that without topography, the
                0040 :math:`p^*` coordinate and the normalized pressure coordinate
                0041 (:math:`\sigma_p`) coincide exactly. Both viscosity and diffusivity are
                0042 set to zero here, but an 8\ :sup:`th` order Shapiro (1970) :cite:`shapiro:70`
                0043 filter is applied to both momentum and potential temperature, to remove
                0044 selectively grid scale noise. Apart from the horizontal grid, this
                0045 experiment is made very similar to the grid-point model case used in
                0046 the Held and Suarez (1994) :cite:`held-suar:94` study.
                0047 
                0048 At this resolution, the configuration can be integrated forward for
                0049 many years on a single processor desktop computer.
                0050 
                0051 Forcing
                0052 -------
                0053 
                0054 The model is forced by relaxation to a radiative equilibrium temperature
                0055 from Held and Suarez (1994) :cite:`held-suar:94`. A linear frictional drag
                0056 (Rayleigh damping) is applied in the lower part of the atmosphere and
                0057 accounts for surface friction and momentum dissipation in the boundary
                0058 layer. Altogether, this yields the following forcing from
                0059 Held and Suarez (1994) :cite:`held-suar:94` that is applied to the fluid:
                0060 
                0061 .. math::
0bad585a21 Navi*0062    \vec{\boldsymbol{\cal F}_\mathbf{v}} = -k_\mathbf{v}(p)\vec{\mathbf{v}}_h
d67096e55c Jeff*0063    :label: eg-hs-global_forcing_fv
                0064 
                0065 .. math::
                0066    {\cal F}_{\theta} = -k_{\theta}(\varphi,p)[\theta-\theta_{eq}(\varphi,p)]
                0067   :label: eg-hs-global_forcing_ft
                0068 
0bad585a21 Navi*0069 where :math:`\vec{\boldsymbol{\cal F}_\mathbf{v}}`, :math:`{\cal F}_{\theta}`, are
d67096e55c Jeff*0070 the forcing terms in the zonal and meridional momentum and in the
                0071 potential temperature equations, respectively. The term
                0072 :math:`k_\mathbf{v}` in :eq:`eg-hs-global_forcing_fv`
                0073 applies a Rayleigh damping that is active within the planetary boundary
                0074 layer. It is defined so as to decay as pressure decreases according to
                0075 
                0076 .. math::
                0077 
                0078    \begin{aligned}
                0079    \label{eq:eg-hs-define_kv}
0bad585a21 Navi*0080    k_\mathbf{v} & = k_{f}~\max[0,~(p^*/P^{0}_{s}-\sigma_{b})/(1-\sigma_{b})]
d67096e55c Jeff*0081    \\
0bad585a21 Navi*0082    \sigma_{b} & = 0.7 ~~{\rm and}~~
d67096e55c Jeff*0083    k_{f}  =  1/86400 ~{\rm s}^{-1}\end{aligned}
                0084 
                0085 where :math:`p^*` is the pressure level of the cell center and
                0086 :math:`P^{0}_{s}` is the pressure at the base of the atmospheric column,
                0087 which is constant and uniform here (:math:`= 10^5 {\rm Pa}`), in the
                0088 absence of topography.
                0089 
                0090 The equilibrium temperature :math:`\theta_{eq}` and relaxation time
                0091 scale :math:`k_{\theta}` are set to:
                0092 
                0093 .. math::
                0094    \theta_{eq}(\varphi,p^*)  = \max \{ 200 (P^{0}_{s}/p^*)^\kappa,
                0095    \nonumber \hspace{2mm} 315 - \Delta T_y~\sin^2(\varphi)
                0096      - \Delta \theta_z \cos^2(\varphi) \log(p^*/P^{0}_s) \}
                0097    :label: eg-hs-define_Teq
                0098 
                0099 .. math::
                0100    k_{\theta}(\varphi,p^*) =
                0101    k_a + (k_s -k_a)~\cos^4(\varphi)~\max \{ 0,\nonumber \hspace{2mm} (p^*/P^{0}_{s}-\sigma_{b})/(1-\sigma_{b}) \}
                0102    :label: eg-hs-define_kT
                0103 
                0104 with:
                0105 
                0106 .. math::
                0107 
                0108    \begin{aligned}
                0109     \Delta T_y = 60 \text{ K, }  k_a &= 1/(40 \cdot 86400) ~{\rm s}^{-1}\\
                0110    \Delta \theta_z = 10 \text{ K, }  k_s &= 1/(4 \cdot 86400) ~{\rm s}^{-1}\end{aligned}
                0111 
                0112 Initial conditions correspond to a resting state with horizontally
                0113 uniform stratified fluid. The initial temperature profile is simply the
                0114 horizontal average of the radiative equilibrium temperature.
                0115 
                0116 Set-up description
                0117 ------------------
                0118 
                0119 The model is configured in hydrostatic form, using non-Boussinesq
                0120 :math:`p^*` coordinate. The vertical resolution is uniform,
                0121 :math:`\Delta p^* = 50 \times 10^2` Pa, with 20 levels, from
                0122 :math:`p^*=10^5` Pa to :math:`0` at the top. The domain is discretized
                0123 using the C32 cube-sphere grid (see Adcroft et al. 2004 :cite:`adcroft:04b`) that covers
                0124 the whole sphere with a relatively uniform grid spacing. The resolution
                0125 at the equator or along the Greenwich meridian is similar to a
                0126 128 :math:`\times` 64 equally spaced longitude-latitude grid, but
                0127 requires 25% less grid points. Grid spacing and grid-point
                0128 location are not computed by the model, but instead read from files.
                0129 
                0130 The vector-invariant form of the momentum equation (see :numref:`vec_invar_mom_eqs`)
                0131 is used so that no explicit metrics are necessary.
                0132 
                0133 Applying the vector-invariant discretization to the atmospheric
                0134 equations :eq:`atmos-prime`, and adding the forcing terms
                0135 :eq:`eg-hs-global_forcing\_fv`, :eq:`eg-hs-global_forcing_ft` on the
                0136 right-hand-side, leads to the set of equations that are solved in this
                0137 configuration:
                0138 
                0139 .. math::
                0140    \frac{\partial \vec{\mathbf{v}}_h}{\partial t}
0bad585a21 Navi*0141    +(f + \zeta)\hat{\boldsymbol{k}} \times \vec{\mathbf{v}}_h
                0142    + \nabla_{p} (\mathrm{KE})
d67096e55c Jeff*0143    + \omega \frac{\partial \vec{\mathbf{v}}_h }{\partial p}
0bad585a21 Navi*0144    + \nabla_p \Phi ^{\prime }
                0145    = -k_\mathbf{v} \vec{\mathbf{v}}_h
d67096e55c Jeff*0146    :label: eg-hs-model_equations
                0147 
                0148 .. math::
                0149    \frac{\partial \Phi ^{\prime }}{\partial p}
                0150    +\frac{\partial \Pi }{\partial p}\theta ^{\prime } =0
                0151 
                0152 .. math::
0bad585a21 Navi*0153     \nabla _{p}\cdot \vec{\mathbf{v}}_h+\frac{\partial \omega }{
d67096e55c Jeff*0154    \partial p} =0
                0155 
                0156 .. math::
                0157    \frac{\partial \theta }{\partial t}
0bad585a21 Navi*0158    +  \nabla _{p}\cdot (\theta \vec{\mathbf{v}}_h)
d67096e55c Jeff*0159    + \frac{\partial (\theta \omega)}{\partial p}
0bad585a21 Navi*0160    = -k_{\theta}[\theta-\theta_{\rm eq}]
d67096e55c Jeff*0161 
                0162 where :math:`\vec{\mathbf{v}}_h` and :math:`\omega = \frac{Dp}{Dt}` are
                0163 the horizontal velocity vector and the vertical velocity in pressure
                0164 coordinate, :math:`\zeta` is the relative vorticity and :math:`f` the
0bad585a21 Navi*0165 Coriolis parameter, :math:`\hat{\boldsymbol{k}}` is the vertical unity
                0166 vector, :math:`\mathrm{KE}` is the kinetic energy, :math:`\Phi` is the geopotential, and
d67096e55c Jeff*0167 :math:`\Pi` the Exner function
                0168 (:math:`\Pi = C_p (p/p_c)^\kappa` with :math:`p_c = 10^5` Pa). Primed variables
                0169 correspond to anomaly from the resting, uniformly
                0170 stratified state.
                0171 
                0172 As described in :numref:`discret_algorithm`, the continuity equation is integrated vertically,
                0173 to give a prognostic equation for the surface pressure :math:`p_s`:
                0174 
                0175 .. math::
                0176    \frac{\partial p_s}{\partial t} + \nabla_{h}\cdot \int_{0}^{p_s} \vec{\mathbf{v}}_h dp = 0
                0177 
                0178 The implicit free surface form of the pressure equation described in
                0179 Marshall et al. (1997) :cite:`marshall:97a` is employed to solve for :math:`p_s`;
                0180 Vertically integrating the hydrostatic balance gives the geopotential
                0181 :math:`\Phi'` and allows one to step forward the momentum equation
                0182 :eq:`eg-hs-model_equations`. The potential temperature,
                0183 :math:`\theta`, is stepped forward using the new velocity field
                0184 (see :numref:`adams-bashforth-staggered`).
                0185 
                0186 Numerical Stability Criteria
                0187 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                0188 
                0189 The numerical stability for inertial oscillations
                0190 (see Adcroft 1995 :cite:`adcroft:95`):
                0191 
                0192 .. math::
0bad585a21 Navi*0193     S_{\rm inert} = f^{2} {\Delta t}^2
d67096e55c Jeff*0194     :label: eg-hs-inertial_stability
                0195 
                0196 evaluates to :math:`4 \times10^{-3}` at the poles, for
                0197 :math:`f=2\Omega\sin(\pi / 2) = 1.45\times10^{-4}~{\rm s}^{-1}`, which
0bad585a21 Navi*0198 is well below the :math:`S_{\rm inert} < 1` upper limit for stability.
d67096e55c Jeff*0199 The advective CFL (Adcroft 1995 :cite:`adcroft:95`) for a extreme maximum
0bad585a21 Navi*0200 horizontal flow speed of :math:`| \vec{\mathbf{u}} | = 90 {\rm m/s}`  and the
d67096e55c Jeff*0201 smallest horizontal grid spacing :math:`\Delta x = 1.1\times10^5 {\rm m}`:
                0202 
                0203 .. math::
0bad585a21 Navi*0204    S_{\rm adv} = \frac{| \vec{\mathbf{u}} | \Delta t}{ \Delta x}
d67096e55c Jeff*0205    :label: eg-hs-cfl_stability
                0206 
                0207 evaluates to 0.37, which is close to the stability limit of 0.5.
                0208 The stability parameter for internal gravity waves propagating with a
                0209 maximum speed of :math:`c_{g}=100~{\rm m/s}` (Adcroft 1995 :cite:`adcroft:95`)
                0210 
                0211 .. math::
                0212    S_{c} = \frac{c_{g} \Delta t}{ \Delta x}
                0213    :label: eg-hs-gfl_stability
                0214 
                0215 evaluates to :math:`4 \times 10^{-1}`. This is close to the linear
                0216 stability limit of 0.5.
                0217 
                0218 Experiment Configuration
                0219 ------------------------
                0220 
                0221 The model configuration for this experiment resides under the directory
                0222 :filelink:`verification/tutorial_held_suarez_cs/`. The experiment files
                0223 
                0224 -  :filelink:`verification/tutorial_held_suarez_cs/input/data`
                0225 
                0226 -  :filelink:`verification/tutorial_held_suarez_cs/input/data.pkg`
                0227 
                0228 -  :filelink:`verification/tutorial_held_suarez_cs/input/data.shap`
                0229 
                0230 -  :filelink:`verification/tutorial_held_suarez_cs/input/eedata`
                0231 
                0232 -  :filelink:`verification/tutorial_held_suarez_cs/code/packages.conf`
                0233 
                0234 -  :filelink:`verification/tutorial_held_suarez_cs/code/CPP_OPTIONS.h`
                0235 
                0236 -  :filelink:`verification/tutorial_held_suarez_cs/code/SIZE.h`
                0237 
                0238 -  :filelink:`verification/tutorial_held_suarez_cs/code/DIAGNOSTICS_SIZE.h`
                0239 
                0240 -  :filelink:`verification/tutorial_held_suarez_cs/code/apply_forcing.F`,
                0241 
                0242 contain the code customizations and parameter settings for these
                0243 experiments. Below we describe the customizations to these files
                0244 associated with this experiment.
                0245 
                0246 File :filelink:`input/data <verification/tutorial_held_suarez_cs/input/data>`
                0247 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                0248 
                0249 .. literalinclude:: ../../../verification/tutorial_held_suarez_cs/input/data
                0250     :linenos:
                0251     :caption: verification/tutorial_held_suarez_cs/input/data
                0252 
                0253 This file specifies the main parameters
                0254 for the experiment. The parameters that are significant for this
                0255 configuration are:
                0256 
                0257 -  Lines 7-8,
                0258 
                0259    ::
                0260 
                0261         tRef=295.2, 295.5, 295.9, 296.3, 296.7, 297.1, 297.6, 298.1, 298.7, 299.3,
                0262              300.0, 300.7, 301.9, 304.1, 308.0, 315.1, 329.5, 362.3, 419.2, 573.8,
                0263 
                0264    set reference values for potential temperature (in kelvins) at
                0265    each model level. The entries are ordered like model level, from
                0266    surface up to the top. Density is calculated from anomalies at each
                0267    level evaluated with respect to the reference values set here.
                0268 
                0269 -  Line 10,
                0270 
                0271    ::
                0272 
                0273         no_slip_sides=.FALSE.,
                0274 
                0275    this line selects a free-slip lateral boundary condition for the
                0276    horizontal Laplacian friction operator, e.g.,
                0277    :math:`\frac{\partial u}{\partial y}`\ =0 along boundaries in
                0278    :math:`y` and :math:`\frac{\partial v}{\partial x}`\ =0 along
                0279    boundaries in :math:`x`.
                0280 
                0281 -  Line 11,
                0282 
                0283    ::
                0284 
                0285         no_slip_bottom=.FALSE.,
                0286 
                0287    this line selects a free-slip boundary condition at the top, in the
                0288    vertical Laplacian friction operator, e.g.,
                0289    :math:`\frac{\partial u}{\partial p} = \frac{\partial v}{\partial p} = 0`.
                0290 
                0291 -  Line 12,
                0292 
                0293    ::
                0294 
                0295         buoyancyRelation='ATMOSPHERIC',
                0296 
                0297    this line sets the type of fluid and the type of vertical coordinate
                0298    to use, which, in this case, is air with a pressure-like coordinate
                0299    (:math:`p` or :math:`p^*`).
                0300 
                0301 -  Line 13,
                0302 
                0303    ::
                0304 
                0305         eosType='IDEALG',
                0306 
                0307    Selects the ideal gas equation of state.
                0308 
                0309 -  Line 15,
                0310 
                0311    ::
                0312 
                0313         implicitFreeSurface=.TRUE.,
                0314 
                0315    Selects the way the barotropic equation is solved, here using the
                0316    implicit free-surface formulation.
                0317 
                0318 -  Line 16,
                0319 
                0320    ::
                0321 
                0322         exactConserv=.TRUE.,
                0323 
                0324    Explicitly calculate (again) the surface pressure changes from the
                0325    divergence of the vertically integrated horizontal flow, after the
                0326    implicit free surface solver and filters are applied.
                0327 
                0328 -  Lines 17-18,
                0329 
                0330    ::
                0331 
                0332         nonlinFreeSurf=4,
                0333         select_rStar=2,
                0334 
                0335    Select the non-linear free surface formulation, using :math:`r^*`
                0336    vertical coordinate (here :math:`p^*`). Note that, except for the
                0337    default (= 0), other values of those two parameters are only
                0338    permitted for testing/debugging purpose.
                0339 
                0340 -  Line 21,
                0341 
                0342    ::
                0343 
                0344         uniformLin_PhiSurf=.FALSE.,
                0345 
                0346    Select the linear relation between surface geopotential anomaly and
                0347    surface pressure anomaly to be evaluated from
0bad585a21 Navi*0348    :math:`\frac{\partial \Phi_s}{\partial p_s} = 1/\rho(\theta_{\rm ref})`
d67096e55c Jeff*0349    (see :numref:`nonlinear-freesurface`). Note that using the default
                0350    (``=.TRUE.``), the constant :math:`1/\rho_0` is used instead, and is not
                0351    necessarily consistent with other parts of the geopotential that
0bad585a21 Navi*0352    rely on :math:`\theta_{\rm ref}`.
d67096e55c Jeff*0353 
                0354 -  Line 23-24,
                0355 
                0356    ::
                0357 
                0358         saltStepping=.FALSE.,
                0359         momViscosity=.FALSE.,
                0360 
                0361    Do not step forward water vapor and do not compute viscous terms.
                0362    This saves computer time.
                0363 
                0364 -  Line 25,
                0365 
                0366    ::
                0367 
                0368         vectorInvariantMomentum=.TRUE.,
                0369 
                0370    Select the vector-invariant form to solve the momentum equation.
                0371 
                0372 -  Line 26,
                0373 
                0374    ::
                0375 
                0376         staggerTimeStep=.TRUE.,
                0377 
                0378    Select the staggered time-stepping (rather than synchronous time
                0379    stepping).
                0380 
                0381 -  Lines 27-28,
                0382 
                0383    ::
                0384 
                0385         readBinaryPrec=64,
                0386         writeBinaryPrec=64,
                0387 
                0388    Sets format for reading binary input datasets and writing output
                0389    fields to use 64-bit representation for floating-point numbers.
                0390 
                0391 -  Line 33,
                0392 
                0393    ::
                0394 
                0395         cg2dMaxIters=200,
                0396 
                0397    Sets maximum number of iterations the 2-D conjugate
                0398    gradient solver will use, **irrespective of convergence criteria
                0399    being met**.
                0400 
                0401 -  Line 35,
                0402 
                0403    ::
                0404 
                0405         cg2dTargetResWunit=1.E-17,
                0406 
                0407    Sets the tolerance (in units of :math:`\omega`) which the
                0408    2-D conjugate gradient solver will use to test for
                0409    convergence in equation :eq:`elliptic-backward-free-surface` to
                0410    :math:`1 \times 10^{-17}` Pa/s. Solver will iterate until tolerance
                0411    falls below this value or until the maximum number of solver
                0412    iterations is reached.
                0413 
                0414 -  Line 40,
                0415 
                0416    ::
                0417 
                0418         deltaT=450.,
                0419 
                0420    Sets the timestep :math:`\Delta t` used in the model to
                0421    450 seconds (= 1/8 hour).
                0422 
                0423 -  Line 42,
                0424 
                0425    ::
                0426 
                0427         startTime=124416000.,
                0428 
                0429    Sets the starting time, in seconds, for the model time counter. A
                0430    non-zero starting time requires the initial state read from a
                0431    pickup file. By default the pickup file is named according to the
                0432    integer number (:varlink:`nIter0`) of time steps in the :varlink:`startTime` value
                0433    (nIter0 = startTime / deltaT).
                0434 
                0435 -  Line 44,
                0436 
                0437    ::
                0438 
                0439        #nTimeSteps=69120,
                0440 
                0441    A commented out setting for the length of the simulation (in number
                0442    of timesteps) that corresponds to 1-year simulation.
                0443 
                0444 -  Lines 54-55,
                0445 
                0446    ::
                0447 
                0448         nTimeSteps=16,
                0449         monitorFreq=1.,
                0450 
                0451    Sets the length of the simulation (in number of timesteps) and the
                

** Warning **

Wide character in print at /usr/local/share/lxr/source line 1030, <$git> line 453.

0452 frequency (in seconds) for “monitor” output to 16 iterations and 1 0453 seconds respectively. This choice corresponds to a short simulation 0454 test. 0455 0456 - Line 48, 0457 0458 :: 0459 0460 pChkptFreq=31104000., 0461

** Warning **

Wide character in print at /usr/local/share/lxr/source line 1030, <$git> line 463.

0462 Sets the time interval, in seconds, between 2 consecutive “permanent”

** Warning **

Wide character in print at /usr/local/share/lxr/source line 1030, <$git> line 464.

0463 pickups (“permanent checkpoint frequency”) that are used to restart 0464 the simulation, to 1 year. 0465 0466 - Line 48, 0467 0468 :: 0469 0470 chkptFreq=2592000., 0471

** Warning **

Wide character in print at /usr/local/share/lxr/source line 1030, <$git> line 473.

0472 Sets the time interval, in seconds, between two consecutive “temporary”

** Warning **

Wide character in print at /usr/local/share/lxr/source line 1030, <$git> line 474.

0473 pickups (“checkpoint frequency”) to one month. The “temporary” pickup

** Warning **

Wide character in print at /usr/local/share/lxr/source line 1030, <$git> line 475.

0474 file name is alternatively “ckptA” and “ckptB”; these pickups (as 0475 opposed to the permanent ones) are designed to be over-written by the 0476 model as the simulation progresses. 0477 0478 - Line 50, 0479 0480 :: 0481 0482 dumpFreq=2592000., 0483 0484 Set the frequency (in seconds) for the snapshot output to 1 month. 0485 0486 - Line 51, 0487 0488 :: 0489 0490 #monitorFreq=43200., 0491 0492 A commented out line setting the frequency (in seconds) for the

** Warning **

Wide character in print at /usr/local/share/lxr/source line 1030, <$git> line 494.

0493 “monitor” output to 12 h. This frequency fits better with the longer 0494 simulation of one year. 0495 0496 - Line 60, 0497 0498 :: 0499 0500 usingCurvilinearGrid=.TRUE., 0501 0502 Set the horizontal type of grid to curvilinear grid. 0503 0504 - Line 61, 0505 0506 :: 0507 0508 horizGridFile='grid_cs32', 0509 0510 Set the root for the grid file name to ``grid_cs32``. The 0511 grid-file names are derived from the root, adding a suffix with the 0512 face number (e.g., ``.face001.bin``, ``.face002.bin`` :math:`\cdots` ) 0513 0514 - Lines 63, 0515 0516 :: 0517 0518 delR=20*50.E2, 0519 0520 This line sets the increments in pressure 0521 units to 20 equally thick levels of 0522 :math:`50 \times 10^2` Pa each. 0523 This defines the origin (interface :math:`k=1`) of the vertical 0524 pressure axis, with decreasing pressure as the level index 0525 :math:`k` increases. 0526 0527 - Line 68, 0528 0529 :: 0530 0531 #topoFile='topo.cs.bin' 0532 0533 This commented out line would set the file name of a 2-D 0534 orography file, in units of meters, to ``topo.cs.bin``. 0535 0536 Other lines in the file :filelink:`input/data <verification/tutorial_held_suarez_cs/input/data>` 0537 are standard values that are 0538 described in :numref:`chap_getting_started`.. 0539 0540 File :filelink:`input/data.pkg <verification/tutorial_held_suarez_cs/input/data.pkg>` 0541 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0542 0543 .. literalinclude:: ../../../verification/tutorial_held_suarez_cs/input/data.pkg 0544 :linenos: 0545 :caption: verification/tutorial_held_suarez_cs/input/data.pkg 0546 0547 This file specifies the additional 0548 packages that the model uses for the experiment. Note that some packages 0549 are used by default (e.g., :filelink:`pkg/generic_advdiff`) and some others are 0550 selected according to parameter in :filelink:`input/data.pkg <verification/tutorial_held_suarez_cs/input/data.pkg>` (e.g., 0551 :filelink:`pkg/mom_vecinv`). The additional packages that are used for this 0552 configuration are 0553 0554 - Line 3, 0555 0556 :: 0557 0558 useSHAP_FILT=.TRUE., 0559 0560 This line selects the Shapiro filter (Shapiro 1970 :cite:`shapiro:70`) 0561 (:filelink:`pkg/shap_filt`) to be used in this experiment. 0562 0563 - Line 4, 0564 0565 :: 0566 0567 useDiagnostics=.TRUE., 0568 0569 This line selects :filelink:`pkg/diagnostics` to be used in this 0570 experiment. 0571 0572 - Line 5, 0573 0574 :: 0575 0576 #useMNC=.TRUE., 0577 0578 This line would select :filelink:`pkg/mnc` for I/O but is commented out. 0579 0580 File :filelink:`input/data.shap <verification/tutorial_held_suarez_cs/input/data.shap>` 0581 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0582 0583 .. literalinclude:: ../../../verification/tutorial_held_suarez_cs/input/data.shap 0584 :linenos: 0585 :caption: verification/tutorial_held_suarez_cs/input/data.shap 0586 0587 This file specifies the parameters that 0588 the model uses for the Shapiro filter package 0589 (Shapiro 1970 :cite:`shapiro:70`), see :numref:`shapiro_filter`. The 0590 parameters that are significant for this configuration are: 0591 0592 - Line 5, 0593 0594 :: 0595 0596 Shap_funct=2, 0597 0598 This line selects which Shapiro filter function to use, here S2, for this 0599 experiment (see :numref:`shapiro_filter`). 0600 0601 - Lines 6-7, 0602 0603 :: 0604 0605 nShapT=0, 0606 nShapUV=4, 0607 0608 These lines select the order of the Shapiro filter for active tracers 0609 (:math:`\theta` and :math:`q`) and momentum (:math:`u,v`) 0610 respectively. In this case, no filter is applied to active tracers. 0611 Regarding the momentum, this sets the integer parameter :math:`n` to 0612 4, in the equations of :numref:`shapiro_filter`, which 0613 corresponds to a 8th order filter. 0614 0615 - Line 9, 0616 0617 :: 0618 0619 nShapUVPhys=4, 0620 0621 This line selects the order of the physical space filter (filter 0622 function S2g, see :numref:`shapiro_filter`) that applies to 0623 :math:`u,v`. The difference :varlink:`nShapUV` - :varlink:`nShapUVPhys` corresponds to 0624 the order of the computational filter (filter function S2c, see :numref:`shapiro_filter`). 0625 0626 - Lines 12-13, 0627 0628 :: 0629 0630 #Shap_Trtau=5400., 0631 #Shap_uvtau=1800., 0632 0633 These commented lines would have set the time scale of the filter (in 0634 seconds), for :math:`\theta`, :math:`q` and for :math:`u`, 0635 :math:`v` respectively, to 5400 s (90 min) and 1800 s (30 min). 0636 Without explicitly setting those timescales, the 0637 default is used, which corresponds to the model timestep. 0638 0639 File :filelink:`input/eedata <verification/tutorial_held_suarez_cs/input/eedata>` 0640 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0641 0642 .. literalinclude:: ../../../verification/tutorial_held_suarez_cs/input/eedata 0643 :linenos: 0644 :caption: verification/tutorial_held_suarez_cs/input/eedata 0645 0646 This file uses standard default values except line 6: 0647 0648 :: 0649 0650 useCubedSphereExchange=.TRUE., 0651 0652 This line selects the cubed-sphere specific exchanges to to connect 0653 tiles and faces edges. 0654 0655 File :filelink:`code/SIZE.h <verification/tutorial_held_suarez_cs/code/SIZE.h>` 0656 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0657 0658 .. literalinclude:: ../../../verification/tutorial_held_suarez_cs/code/SIZE.h 0659 :linenos: 0660 :caption: verification/tutorial_held_suarez_cs/code/SIZE.h 0661 0662 Four lines are customized in this file for the current experiment 0663 0664 - Line 45, 0665 0666 :: 0667 0668 sNx=32, 0669 0670 sets the lateral domain extent in grid points along the :math:`x`-direction, 0671 for one face. 0672 0673 - Line 46, 0674 0675 :: 0676 0677 sNy=32, 0678 0679 sets the lateral domain extent in grid points along the :math:`y`-direction, 0680 for one face. 0681 0682 - Line 49, 0683 0684 :: 0685 0686 nSx=6, 0687 0688 sets the number of tiles in the :math:`x`-direction, for the model domain 0689 decomposition. In this simple case (single processor, with one tile per 0690 face), this number corresponds to the total number of faces. 0691 0692 - Line 55, 0693 0694 :: 0695 0696 Nr=20, 0697 0698 sets the vertical domain extent in grid points. 0699 0700 File :filelink:`code/packages.conf <verification/tutorial_held_suarez_cs/code/packages.conf>` 0701 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0702 0703 .. literalinclude:: ../../../verification/tutorial_held_suarez_cs/code/packages.conf 0704 :linenos: 0705 :caption: verification/tutorial_held_suarez_cs/input/code/packages.conf 0706 0707 This file specifies the packages that are 0708 compiled and made available for this experiment. The additional packages 0709 that are used for this configuration are 0710 0711 - Line 1, 0712 0713 :: 0714 0715 gfd 0716 0717 This line selects the standard set of packages that are used by 0718 default. 0719 0720 - Line 2, 0721 0722 :: 0723 0724 shap_filt 0725 0726 This line makes the Shapiro filter package available for this 0727 experiment. 0728 0729 - Line 3, 0730 0731 :: 0732 0733 exch2 0734 0735 This line selects :filelink:`pkg/exch2` to be compiled and used in this 0736 experiment. Note that at present, no such 0737 parameter ``useEXCH2`` exists and therefore this package is 0738 always used when it is compiled. 0739 0740 - Line 4, 0741 0742 :: 0743 0744 diagnostics 0745 0746 This line selects :filelink:`pkg/diagnostics` to be compiled, and makes it 0747 available for this experiment. 0748 0749 - Line 5, 0750 0751 :: 0752 0753 mnc 0754 0755 This line selects the :filelink:`pkg/mnc` to be compiled, and makes it 0756 available for this experiment. 0757 0758 File :filelink:`code/CPP_OPTIONS.h <verification/tutorial_held_suarez_cs/code/CPP_OPTIONS.h>` 0759 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0760 0761 This file uses the standard default except for: 0762 0763 :: 0764 0765 #define NONLIN_FRSURF 0766 0767 This line enables the non-linear free-surface part of the code, 0768 which is required for the :math:`p^*` coordinate formulation. 0769 0770 Other Files 0771 ~~~~~~~~~~~~ 0772 0773 Other files relevant to this experiment are 0774 0775 - :filelink:`code/apply_forcing.F <verification/tutorial_held_suarez_cs/code/apply_forcing.F>` 0776 0777 - ``input/grid_cs32.face00[n].bin``, with :math:`n=1,2,3,4,5,6` 0778 0779 contain the code customizations and binary input files for this experiment. 0780 The file :filelink:`apply_forcing.F <verification/tutorial_held_suarez_cs/code/apply_forcing.F>` 0781 contains four subroutines that 0782 calculate the forcing terms (i.e., right-hand side terms) in the momentum 0783 equation :eq:`eg-hs-global_forcing_fv`, :varlink:`EXTERNAL_FORCING_U` 0784 and :varlink:`EXTERNAL_FORCING_V` and in the potential temperature equation 0785 :eq:`eg-hs-global_forcing_ft`, :varlink:`EXTERNAL_FORCING_T`. The 0786 water-vapor forcing subroutine (:varlink:`EXTERNAL_FORCING_S`) is left 0787 empty for this experiment. 0788 The grid-files ``input/grid_cs32.face00[n].bin``, with 0789 :math:`n=1,2,3,4,5,6`, are binary files (direct-access, big-endian 0790 64 bit reals) that contains all the cubed-sphere grid lengths, areas 0791 and grid-point positions, with one file per face. Each file contains 0792 18 2-D arrays (dimension 33 :math:`\times` 33) that correspond to the 0793 model variables: *XC YC DXF DYF RA XG YG DXV DYU RAZ DXC DYC RAW RAS 0794 DXG DYG AngleCS AngleSN* (see :filelink:`model/inc/GRID.h`)