/[MITgcm]/manual/s_phys_pkgs/text/obcs.tex
ViewVC logotype

Diff of /manual/s_phys_pkgs/text/obcs.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.7 by mlosch, Mon Feb 28 08:28:47 2011 UTC revision 1.14 by mlosch, Wed Oct 26 08:29:48 2011 UTC
# Line 12  Alistair Adcroft, Patrick Heimbach, Sama Line 12  Alistair Adcroft, Patrick Heimbach, Sama
12  \label{sec:pkg:obcs:intro}}  \label{sec:pkg:obcs:intro}}
13    
14  The OBCS-package is fundamental to regional ocean modelling with the  The OBCS-package is fundamental to regional ocean modelling with the
15  MITgcm, but because there are so many details to be considered in  MITgcm, but there are so many details to be considered in
16  regional ocean modelling that this package cannot accomodate all  regional ocean modelling that this package cannot accomodate all
17  imaginable and possible options. Therefore, for a regional simulation  imaginable and possible options. Therefore, for a regional simulation
18  with very particular details, it is recommended to familiarize oneself  with very particular details, it is recommended to familiarize oneself
# Line 105  Run-time parameters are set in files Line 105  Run-time parameters are set in files
105  \code{data.pkg}, \code{data.obcs}, and \code{data.exf}  \code{data.pkg}, \code{data.obcs}, and \code{data.exf}
106  if ``real-time'' prescription is requested  if ``real-time'' prescription is requested
107  (i.e. package \code{exf} enabled).  (i.e. package \code{exf} enabled).
108  These parameter files are read in S/R  vThese parameter files are read in S/R
109  \code{packages\_readparms.F}, \code{obcs\_readparms.F}, and  \code{packages\_readparms.F}, \code{obcs\_readparms.F}, and
110  \code{exf\_readparms.F}, respectively.  \code{exf\_readparms.F}, respectively.
111  Run-time parameters may be broken into 3 categories:  Run-time parameters may be broken into 3 categories:
# Line 153  their default values. Line 153  their default values.
153             ~ \\             ~ \\
154          useOBCSbalance & \code{.FALSE.} &          useOBCSbalance & \code{.FALSE.} &
155             ~ \\             ~ \\
156               OBCS\_balanceFacN/S/E/W & 1 & factor(s) determining the details
157               of the balaning code \\
158          useOrlanskiNorth/South/EastWest & \code{.FALSE.} &          useOrlanskiNorth/South/EastWest & \code{.FALSE.} &
159             turn on Orlanski boundary conditions for individual boundary\\             turn on Orlanski boundary conditions for individual boundary\\
160          useStevensNorth/South/EastWest & \code{.FALSE.} &          useStevensNorth/South/EastWest & \code{.FALSE.} &
# Line 242  A zero (0) element in $\tt OB\_I\ldots$, Line 244  A zero (0) element in $\tt OB\_I\ldots$,
244  means there is no corresponding OB in that column/row.  means there is no corresponding OB in that column/row.
245  For a Northern/Southern OB, the OB V point is to the South/North.  For a Northern/Southern OB, the OB V point is to the South/North.
246  For an Eastern/Western OB, the OB U point is to the West/East.  For an Eastern/Western OB, the OB U point is to the West/East.
247    For example,
248  \begin{verbatim}  \begin{tabbing}
249   For example    \code{OB\_Jnorth(3)=34} \=  means that:  \= \\
250       OB_Jnorth(3)=34  means that:    \> \code{T(3,34)} \> is a an OB point  \\
251            T( 3 ,34) is a an OB point    \> \code{U(3,34)} \> is a an OB point \\
252            U(3:4,34) is a an OB point    \> \code{V(3,34)} \> is a an OB point \\
253            V( 4 ,34) is a an OB point    \code{OB\_Jsouth(3)=1} \> means that: \\
254   while    \> \code{T(3,1)} \> is a an OB point \\
255       OB_Jsouth(3)=1  means that:    \> \code{U(3,1)} \> is a an OB point \\
256            T( 3 ,1) is a an OB point    \> \code{V(3,2)} \> is a an OB point \\
257            U(3:4,1) is a an OB point    \code{OB\_Ieast(10)=69} \>  means that:  \>  \\
258            V( 4 ,2) is a an OB point    \> \code{T(69,10)} \> is a an OB point \\
259  \end{verbatim}    \> \code{U(69,10)} \> is a an OB point \\
260      \> \code{V(69,10)} \> is a an OB point \\
261  For convenience, negative values for Jnorth/Ieast refer to    \code{OB\_Iwest(10)=1} \>  means that:  \>  \\
262      \> \code{T(1,10)} \> is a an OB point \\
263      \> \code{U(2,10)} \> is a an OB point \\
264      \> \code{V(1,10)} \> is a an OB point
265    \end{tabbing}
266    For convenience, negative values for \code{Jnorth}/\code{Ieast} refer to
267  points relative to the Northern/Eastern edges of the model  points relative to the Northern/Eastern edges of the model
268  eg. $\tt OB\_Jnorth(3)=-1$  means that the point $\tt (3,Ny)$  eg. $\tt OB\_Jnorth(3)=-1$  means that the point $\tt (3,Ny)$
269  is a northern OB.  is a northern OB.
# Line 350  in \code{data}, see \code{verification/e Line 357  in \code{data}, see \code{verification/e
357    
358  \paragraph{OBCS\_CALC\_STEVENS:} ~ \\  \paragraph{OBCS\_CALC\_STEVENS:} ~ \\
359  (THE IMPLEMENTATION OF THESE BOUNDARY CONDITIONS IS NOT COMPLETE. SO  (THE IMPLEMENTATION OF THESE BOUNDARY CONDITIONS IS NOT COMPLETE. SO
360  FAR ONLY EASTERN AND WESTERN BOUNDARIES ARE SUPPORTED.) \\  FAR ONLY EASTERN AND WESTERN BOUNDARIES ARE SUPPORTED. PASSIVE TRACERS
361    AND NON-LINEAR FREE SURFACE ARE NOT SUPPORTED.) \\
362  The boundary conditions following \citet{stevens:90} require the  The boundary conditions following \citet{stevens:90} require the
363  vertically averaged normal velocity (originally specified as a stream  vertically averaged normal velocity (originally specified as a stream
364  function along the open boundary) $\bar{u}_{ob}$ and the tracer fields  function along the open boundary) $\bar{u}_{ob}$ and the tracer fields
365  $\chi_{ob}$ (note: passive tracers are currently not implemented and  $\chi_{ob}$ (note: passive tracers are currently not implemented and
366  the code stops when package \code{ptracers} is used together with this  the code stops when package \code{ptracers} is used together with this
367  option). Currently, the code vertically averages the normal velocity  option). Currently, the code vertically averages the normal velocity
368  as specified. From these prescribed values the code computes the  as specified in \code{OB[E,W]u} or \code{OB[N,S]v}. From these
369  boundary values for the next timestep $n+1$ as follows (as an  prescribed values the code computes the boundary values for the next
370  example, we use the notation for an eastern or western boundary):  timestep $n+1$ as follows (as an example, we use the notation for an
371    eastern or western boundary):
372  \begin{itemize}  \begin{itemize}
373  \item $u^{n+1}(y,z) = \bar{u}_{ob}(y) + u'(y,z)$, where $u_{n}'$ is the  \item $u^{n+1}(y,z) = \bar{u}_{ob}(y) + (u')^{n}(y,z)$, where
374    deviation from the vertically averaged velocity one grid point    $(u')^{n}$ is the deviation from the vertically averaged velocity at
375    inward from the boundary.    timestep $n$ on the boundary. $(u')^{n}$ is computed in the previous
376      time step $n$ from the intermediate velocity $u^*$ prior to the
377      correction step (see section \ref{sec:time_stepping}, e.g.,
378      eq.\,(\ref{eq:ustar-backward-free-surface})).
379      % and~(\ref{eq:vstar-backward-free-surface})).
380      (This velocity is not
381      available at the beginning of the next time step $n+1$, when
382      S/R~OBCS\_CALC/OBCS\_CALC\_STEVENS are called, therefore it needs to
383      be saved in S/R~DYNAMICS by calling S/R~OBCS\_SAVE\_UV\_N and also
384      stored in a separate restart files
385      \verb+pickup_stevens[N/S/E/W].${iteration}.data+)
386    %  Define CPP-flag OBCS\_STEVENS\_USE\_INTERIOR\_VELOCITY to use the
387    %  velocity one grid point inward from the boundary.
388  \item If $u^{n+1}$ is directed into the model domain, the boudary  \item If $u^{n+1}$ is directed into the model domain, the boudary
389    value for tracer $\chi$ is restored to the prescribed values:    value for tracer $\chi$ is restored to the prescribed values:
390    \[\chi^{n+1} =   \chi^{n} + \frac{\Delta{t}}{\tau_\chi} (\chi_{ob} -    \[\chi^{n+1} =   \chi^{n} + \frac{\Delta{t}}{\tau_\chi} (\chi_{ob} -
391    \chi^{n}),\] where $\tau_\chi$ is the relaxation time    \chi^{n}),\] where $\tau_\chi$ is the relaxation time
392    scale \texttt{T/SrelaxStevens}.    scale \texttt{T/SrelaxStevens}. The new $\chi^{n+1}$ is then subject
393  \item If $u^{n+1}$ is directed out of the model domain, the tracer is    to the advection by $u^{n+1}$.
394    advected out of the domain with $u^{n+1}+c$, where $c$ is a phase  \item If $u^{n+1}$ is directed out of the model domain, the tracer
395    velocity estimated as    $\chi^{n+1}$ on the boundary at timestep $n+1$ is estimated from
396    $\frac{1}{2}\frac{\partial\chi}{\partial{t}}/\frac{\partial\chi}{\partial{x}}$.    advection out of the domain with $u^{n+1}+c$, where $c$ is
397      a phase velocity estimated as
398      $\frac{1}{2}\frac{\partial\chi}{\partial{t}}/\frac{\partial\chi}{\partial{x}}$. The
399      numerical scheme is (as an example for an eastern boundary):
400      \[\chi_{i_{b},j,k}^{n+1} =   \chi_{i_{b},j,k}^{n} + \Delta{t}
401      (u^{n+1}+c)_{i_{b},j,k}\frac{\chi_{i_{b},j,k}^{n}
402        - \chi_{i_{b}-1,j,k}^{n}}{\Delta{x}_{i_{b},j}^{C}}\mbox{, if }u_{i_{b},j,k}^{n+1}>0,
403      \] where $i_{b}$ is the boundary index.\\
404    For test purposes, the phase velocity contribution or the entire    For test purposes, the phase velocity contribution or the entire
405    advection can    advection can be turned off by setting the corresponding parameters
   be turned off by setting the corresponding parameters  
406    \texttt{useStevensPhaseVel} and \texttt{useStevensAdvection} to    \texttt{useStevensPhaseVel} and \texttt{useStevensAdvection} to
407    \texttt{.FALSE.}.\end{itemize} See \citet{stevens:90} for details.    \texttt{.FALSE.}.
408    \end{itemize}
409    See \citet{stevens:90} for details. With this boundary condition
410    specifying the exact net transport across the open boundary is simple,
411    so that balancing the flow with (S/R~OBCS\_BALANCE\_FLOW, see next
412    paragraph) is usually not necessary.
413    
414  \paragraph{OBCS\_BALANCE:} ~ \\  \paragraph{OBCS\_BALANCE\_FLOW:} ~ \\
415  %  %
416  This is not (yet) a separate routine in the code, but it may become  When turned on (\code{ALLOW\_OBCS\_BALANCE}
 one to make this code more transparent. The code is part of  
 \code{S/R~OBCS\_CALC}. When turned on (\code{ALLOW\_OBCS\_BALANCE}  
417  defined in \code{OBCS\_OPTIONS.h} and \code{useOBCSbalance=.true.} in  defined in \code{OBCS\_OPTIONS.h} and \code{useOBCSbalance=.true.} in
418  \code{data.obcs/OBCS\_PARM01}), the normal velocities across each of  \code{data.obcs/OBCS\_PARM01}), this routine balances the net flow
419  the four boundaries are modified separately, so that the net volume  across the open boundaries. By default the net flow across the
420  transport across \emph{each} boundary is zero. For example, for the  boundaries is computed and all normal velocities on boundaries are
421  western boundary at $i=i_{b}$, the modified velocity is:  adjusted to obtain zero net inflow.
422    
423    This behavior can be controlled with the runtime flags
424    \code{OBCS\_balanceFacN/S/E/W}. The values of these flags determine
425    how the net inflow is redistributed as small correction velocities
426    between the individual sections. A value ``\code{-1}'' balances an
427    individual boundary, values $>0$ determine the relative size of the
428    correction. For example, the values
429    \begin{tabbing}
430     \code{OBCS\_balanceFacE}\code{ = 1.,} \\
431     \code{OBCS\_balanceFacW}\code{ = -1.,} \\
432     \code{OBCS\_balanceFacN}\code{ = 2.,} \\
433     \code{OBCS\_balanceFacS}\code{ = 0.,}
434    \end{tabbing}
435    make the model
436    \begin{itemize}
437    \item correct Western \code{OBWu} by substracting a uniform velocity to
438    ensure zero net transport through the Western open boundary;
439    \item correct Eastern and Northern normal flow, with the Northern
440      velocity correction two times larger than the Eastern correction, but
441      \emph{not} the Southern normal flow, to ensure that the total inflow through
442      East, Northern, and Southern open boundary is balanced.
443    \end{itemize}
444    
445    The old method of balancing the net flow for all sections individually
446    can be recovered by setting all flags to -1. Then the normal
447    velocities across each of the four boundaries are modified separately,
448    so that the net volume transport across \emph{each} boundary is
449    zero. For example, for the western boundary at $i=i_{b}$, the modified
450    velocity is:
451  \[  \[
452  u(y,z) - \int_{\mbox{western boundary}}u\,dy\,dz \approx OBNu(j,k) - \sum_{j,k}  u(y,z) - \int_{\mbox{western boundary}}u\,dy\,dz \approx OBNu(j,k) - \sum_{j,k}
453  OBNu(j,k) h_{w}(i_{b},j,k)\Delta{y_G(i_{b},j)}\Delta{z(k)}.  OBNu(j,k) h_{w}(i_{b},j,k)\Delta{y_G(i_{b},j)}\Delta{z(k)}.
454  \]  \]
455  This also ensures a net total inflow of zero through all boundaries to  This also ensures a net total inflow of zero through all boundaries,
456  make it a useful flag to prevent infinite sea-level change within the  but this combination of flags is \emph{not} useful if you want to
457  domain, but the flag is \emph{not} useful if you want to simulate,  simulate, say, a sector of the Southern Ocean with a strong ACC
458  say, a sector of the Southern Ocean with a strong ACC entering through  entering through the western and leaving through the eastern boundary,
459  the western and leaving through the eastern boundary, because this  because the value of ``\code{-1}'' for these flags will make sure that
460  flag will make sure that the strong inflow is removed. It is  the strong inflow is removed. Clearly, gobal balancing with
461  recommended that this part of the code is adapted to the particular  \code{OBCS\_balanceFacE/W/N/S} $\ge0$ is the preferred method.
 needs of the simulation in question.  
462    
463  \paragraph{OBCS\_APPLY\_*:} ~ \\  \paragraph{OBCS\_APPLY\_*:} ~ \\
464  ~  ~
465    
466  \paragraph{OBCS\_SPONGE} Setting sponge layer characteristics \\  \paragraph{OBCS\_SPONGE:} ~ \\
467  %  %
468  ~  The sponge layer code (turned on with \code{ALLOW\_OBCS\_SPONGE} and
469    \code{useOBCSsponge}) adds a relaxation term to the right-hand-side of
470    the momentum and tracer equations. The variables are relaxed towards
471    the boundary values with a relaxation time scale that increases
472    linearly with distance from the boundary
473    \[
474    G_{\chi}^{\mbox{(sponge)}} =
475    - \frac{\chi - [( L - \delta{L} ) \chi_{BC} + \delta{L}\chi]/L}
476    {[(L-\delta{L})\tau_{b}+\delta{L}\tau_{i}]/L}
477    = - \frac{\chi - [( 1 - l ) \chi_{BC} + l\chi]}
478    {[(1-l)\tau_{b}+l\tau_{i}]}
479    \]
480    where $\chi$ is the model variable (U/V/T/S) in the interior,
481    $\chi_{BC}$ the boundary value, $L$ the thickness of the sponge layer
482    (runtime parameter \code{spongeThickness} in number of grid points),
483    $\delta{L}\in[0,L]$ ($\frac{\delta{L}}{L}=l\in[0,1]$) the distance from the boundary (also in grid points), and
484    $\tau_{b}$ (runtime parameters \code{Urelaxobcsbound} and
485    \code{Vrelaxobcsbound}) and $\tau_{i}$ (runtime parameters
486    \code{Urelaxobcsinner} and \code{Vrelaxobcsinner}) the relaxation time
487    scales on the boundary and at the interior termination of the sponge
488    layer. The parameters \code{Urelaxobcsbound/inner} set the relaxation
489    time scales for the Eastern and Western boundaries,
490    \code{Vrelaxobcsbound/inner} for the Northern and Southern boundaries.
491    
492  \paragraph{OB's with nonlinear free surface} ~ \\  \paragraph{OB's with nonlinear free surface} ~ \\
493  %  %
# Line 462  In the directory \code{verifcation}, the Line 542  In the directory \code{verifcation}, the
542  \item \code{exp4}: box with 4 open boundaries, simulating flow over a  \item \code{exp4}: box with 4 open boundaries, simulating flow over a
543    Gaussian bump based on \citet{adcroft:97}, also tests    Gaussian bump based on \citet{adcroft:97}, also tests
544    Stevens-boundary conditions;    Stevens-boundary conditions;
545  \item \code{dome}: based on ``Denmark Strait Overflow Model  \item \code{dome}: based on the project ``Dynamics of Overflow Mixing
546    Experiment'', use Orlanski-BCs;    and Entrainment''
547      (\url{http://www.rsmas.miami.edu/personal/tamay/DOME/dome.html}), uses
548      Orlanski-BCs;
549  \item \code{internal\_wave}: uses a heavily modified \code{S/R~OBCS\_CALC}  \item \code{internal\_wave}: uses a heavily modified \code{S/R~OBCS\_CALC}
550  \item \code{seaice\_obcs}: simple example who to use the sea-ice  \item \code{seaice\_obcs}: simple example who to use the sea-ice
551    related code, based on \code{lab\_sea};    related code, based on \code{lab\_sea};

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.14

  ViewVC Help
Powered by ViewVC 1.1.22