/[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.4 by jmc, Mon Nov 23 21:08:55 2009 UTC revision 1.16 by mlosch, Wed Apr 27 08:54:55 2016 UTC
# Line 11  Alistair Adcroft, Patrick Heimbach, Sama Line 11  Alistair Adcroft, Patrick Heimbach, Sama
11  \subsubsection{Introduction  \subsubsection{Introduction
12  \label{sec:pkg:obcs:intro}}  \label{sec:pkg:obcs:intro}}
13    
14    The OBCS-package is fundamental to regional ocean modelling with the
15    MITgcm, but there are so many details to be considered in
16    regional ocean modelling that this package cannot accomodate all
17    imaginable and possible options. Therefore, for a regional simulation
18    with very particular details, it is recommended to familiarize oneself
19    not only with the compile- and runtime-options of this package, but
20    also with the code itself. In many cases it will be necessary to adapt
21    the obcs-code (in particular \code{S/R OBCS\_CALC}) to the application
22    in question; in these cases the obcs-package (together with the
23    rbcs-package, section \ref{sec:pkg:rbcs}) is a very
24    useful infrastructure for implementing special regional models.
25    
26  %----------------------------------------------------------------------  %----------------------------------------------------------------------
27    
# Line 24  at compile time Line 34  at compile time
34  \begin{itemize}  \begin{itemize}
35  %  %
36  \item  \item
37  using the \texttt{packages.conf} file by adding \texttt{obcs} to it,  using the \code{packages.conf} file by adding \code{obcs} to it,
38  %  %
39  \item  \item
40  or using \texttt{genmake2} adding  or using \code{genmake2} adding
41  \texttt{-enable=obcs} or \texttt{-disable=obcs} switches  \code{-enable=obcs} or \code{-disable=obcs} switches
42  %  %
43  \item  \item
44  \textit{Required packages and CPP options:} \\  \textit{Required packages and CPP options:} \\
# Line 37  To alternatives are available for prescr Line 47  To alternatives are available for prescr
47  which differ in the way how OB's are treated in time:  which differ in the way how OB's are treated in time:
48  A simple time-management (e.g. constant in time, or cyclic with  A simple time-management (e.g. constant in time, or cyclic with
49  fixed fequency) is provided through  fixed fequency) is provided through
50  S/R \texttt{obcs\_external\_fields\_load}.  S/R \code{obcs\_external\_fields\_load}.
51  More sophisticated ``real-time'' (i.e. calendar time) management is  More sophisticated ``real-time'' (i.e. calendar time) management is
52  available through \texttt{obcs\_prescribe\_read}.  available through \code{obcs\_prescribe\_read}.
53  The latter case requires  The latter case requires
54  packages \texttt{cal} and \texttt{exf} to be enabled.  packages \code{cal} and \code{exf} to be enabled.
55  %  %
56  \end{itemize}  \end{itemize}
57  (see also Section \ref{sect:buildingCode}).  (see also Section \ref{sec:buildingCode}).
58    
59  Parts of the OBCS code can be enabled or disabled at compile time  Parts of the OBCS code can be enabled or disabled at compile time
60  via CPP preprocessor flags. These options are set in  via CPP preprocessor flags. These options are set in
61  \texttt{OBCS\_OPTIONS.h}. Table \ref{tab:pkg:obcs:cpp} summarizes them.  \code{OBCS\_OPTIONS.h}. Table \ref{tab:pkg:obcs:cpp} summarizes them.
62    
63  \begin{table}[h!]  \begin{table}[!ht]
64  \centering  \centering
65    \label{tab:pkg:obcs:cpp}    \label{tab:pkg:obcs:cpp}
66    {\footnotesize    {\footnotesize
# Line 58  via CPP preprocessor flags. These option Line 68  via CPP preprocessor flags. These option
68        \hline        \hline
69        \textbf{CPP option}  &  \textbf{Description}  \\        \textbf{CPP option}  &  \textbf{Description}  \\
70        \hline \hline        \hline \hline
71          \texttt{ALLOW\_OBCS\_NORTH} &          \code{ALLOW\_OBCS\_NORTH} &
72            enable Northern OB \\            enable Northern OB \\
73          \texttt{ALLOW\_OBCS\_SOUTH} &          \code{ALLOW\_OBCS\_SOUTH} &
74            enable Southern OB \\            enable Southern OB \\
75          \texttt{ALLOW\_OBCS\_EAST} &          \code{ALLOW\_OBCS\_EAST} &
76            enable Eastern OB \\            enable Eastern OB \\
77          \texttt{ALLOW\_OBCS\_WEST} &          \code{ALLOW\_OBCS\_WEST} &
78            enable Western OB \\            enable Western OB \\
79        \hline        \hline
80          \texttt{ALLOW\_OBCS\_PRESCRIBE} &          \code{ALLOW\_OBCS\_PRESCRIBE} &
81            enable code for prescribing OB's \\            enable code for prescribing OB's \\
82          \texttt{ALLOW\_OBCS\_SPONGE} &          \code{ALLOW\_OBCS\_SPONGE} &
83            enable sponge layer code \\            enable sponge layer code \\
84          \texttt{ALLOW\_OBCS\_BALANCE} &          \code{ALLOW\_OBCS\_BALANCE} &
85            enable code for balancing transports through OB's \\            enable code for balancing transports through OB's \\
86          \texttt{ALLOW\_ORLANSKI} &          \code{ALLOW\_ORLANSKI} &
87            enable Orlanski radiation conditions at OB's \\            enable Orlanski radiation conditions at OB's \\
88            \code{ALLOW\_OBCS\_STEVENS} &
89              enable Stevens (1990) boundary conditions at OB's \\
90            & (currently only implemented for eastern and western \\
91            &  boundaries and NOT for ptracers) \\
92        \hline        \hline
93      \end{tabular}      \end{tabular}
94    }    }
# Line 88  via CPP preprocessor flags. These option Line 102  via CPP preprocessor flags. These option
102  \label{sec:pkg:obcs:runtime}}  \label{sec:pkg:obcs:runtime}}
103    
104  Run-time parameters are set in files  Run-time parameters are set in files
105  \texttt{data.pkg}, \texttt{data.obcs}, and \texttt{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 \texttt{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  \texttt{packages\_readparms.F}, \texttt{obcs\_readparms.F}, and  \code{packages\_readparms.F}, \code{obcs\_readparms.F}, and
110  \texttt{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:
112  (i) switching on/off the package at runtime,  (i) switching on/off the package at runtime,
113  (ii) OBCS package flags and parameters,  (ii) OBCS package flags and parameters,
114  (iii) additional timing flags in \texttt{data.exf}, if selected.  (iii) additional timing flags in \code{data.exf}, if selected.
115    
116  \paragraph{Enabling the package}  \paragraph{Enabling the package}
117  ~ \\  ~ \\
118  %  %
119  The OBCS package is switched on at runtime by setting  The OBCS package is switched on at runtime by setting
120  \texttt{useOBCS = .TRUE.} in \texttt{data.pkg}.  \code{useOBCS = .TRUE.} in \code{data.pkg}.
121    
122  \paragraph{Package flags and parameters}  \paragraph{Package flags and parameters}
123  ~ \\  ~ \\
124  %  %
125  Table \ref{tab:pkg:obcs:runtime_flags} summarizes the  Table \ref{tab:pkg:obcs:runtime_flags} summarizes the
126  runtime flags that are set in \texttt{data.obcs}, and  runtime flags that are set in \code{data.obcs}, and
127  their default values.  their default values.
128    
129  \begin{table}[h!]  \begin{table}[!ht]
130  \centering  \centering
   \label{tab:pkg:obcs:runtime_flags}  
131    {\footnotesize    {\footnotesize
132      \begin{tabular}{|l|c|l|}      \begin{tabular}{|l|c|l|}
133        \hline        \hline
134        \textbf{Flag/parameter} & \textbf{default} &  \textbf{Description}  \\        \textbf{Flag/parameter} & \textbf{default} &  \textbf{Description}  \\
135        \hline \hline        \hline \hline
136           \multicolumn{3}{|c|}{\textit{basic flags \& parameters} } \\           \multicolumn{3}{|c|}{\textit{basic flags \& parameters} (OBCS\_PARM01) } \\
137           \hline           \hline
138          OB\_Jnorth & 0 &          OB\_Jnorth & 0 &
139             Nx-vector of J-indices (w.r.t. Ny) of Northern OB             Nx-vector of J-indices (w.r.t. Ny) of Northern OB
# Line 134  their default values. Line 147  their default values.
147          OB\_Iwest & 0 &          OB\_Iwest & 0 &
148             Ny-vector of I-indices (w.r.t. Nx) of Western OB             Ny-vector of I-indices (w.r.t. Nx) of Western OB
149             at each J-position (w.r.t. Ny) \\             at each J-position (w.r.t. Ny) \\
150          useOBCSprescribe & \texttt{.FALSE.} &          useOBCSprescribe & \code{.FALSE.} &
151             ~ \\             ~ \\
152          useOBCSsponge & \texttt{.FALSE.} &          useOBCSsponge & \code{.FALSE.} &
153             ~ \\             ~ \\
154          useOBCSbalance & \texttt{.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.} &
159               turn on Orlanski boundary conditions for individual boundary\\
160            useStevensNorth/South/EastWest & \code{.FALSE.} &
161               turn on Stevens boundary conditions for individual boundary\\
162          OB\textbf{X}\textbf{y}File & ~ &          OB\textbf{X}\textbf{y}File & ~ &
163             file name of OB field \\             file name of OB field \\
164          ~ & ~ &          ~ & ~ &
# Line 147  their default values. Line 166  their default values.
166                         \textbf{E}(ast), \textbf{W}(est) \\                         \textbf{E}(ast), \textbf{W}(est) \\
167          ~ & ~ &          ~ & ~ &
168             \textbf{y}: \textbf{t}(emperature), \textbf{s}(salinity),             \textbf{y}: \textbf{t}(emperature), \textbf{s}(salinity),
169             \textbf{u}(-velocity), \textbf{v}(-velocity) \\             \textbf{u}(-velocity), \textbf{v}(-velocity), \\
170            ~ & ~ &
171               \textbf{w}(-velocity), \textbf{eta}(sea surface height)\\
172            ~ & ~ &
173               \textbf{a}(sea ice area), \textbf{h}(sea ice thickness),
174               \textbf{sn}(snow thickness), \textbf{sl}(sea ice salinity)\\
175        \hline        \hline
176        \multicolumn{3}{|c|}{\textit{Orlanski parameters} } \\        \multicolumn{3}{|c|}{\textit{Orlanski parameters} (OBCS\_PARM02) } \\
177        \hline        \hline
178          cvelTimeScale & 2000 sec &          cvelTimeScale & 2000 sec &
179             averaging period for phase speed \\             averaging period for phase speed \\
# Line 157  their default values. Line 181  their default values.
181             maximum allowable phase speed-CFL for AB-II \\             maximum allowable phase speed-CFL for AB-II \\
182          CFIX & 0.8 m/s &          CFIX & 0.8 m/s &
183             fixed boundary phase speed \\             fixed boundary phase speed \\
184          useFixedCEast & .FALSE. &          useFixedCEast & \code{.FALSE.} &
185             ~ \\             ~ \\
186          useFixedCWest & .FALSE. &          useFixedCWest & \code{.FALSE.} &
187             ~ \\             ~ \\
188        \hline        \hline
189        \multicolumn{3}{|c|}{\textit{Sponge-layer parameters} } \\        \multicolumn{3}{|c|}{\textit{Sponge-layer parameters} (OBCS\_PARM03)} \\
190        \hline        \hline
191          spongeThickness & 0 &          spongeThickness & 0 &
192             sponge layer thickness (in \# grid points) \\             sponge layer thickness (in \# grid points) \\
# Line 178  their default values. Line 202  their default values.
202          Vrelaxobcsbound & 0 sec &          Vrelaxobcsbound & 0 sec &
203             relaxation time scale at the             relaxation time scale at the
204             outermost sponge layer point of a zonal OB \\             outermost sponge layer point of a zonal OB \\
205          \hline
206          \multicolumn{3}{|c|}{\textit{Stevens parameters} (OBCS\_PARM04) } \\
207          \hline
208            T/SrelaxStevens & 0~sec & relaxation time scale for
209               temperature/salinity \\
210            useStevensPhaseVel & \code{.TRUE.} & \\
211            useStevensAdvection & \code{.TRUE.} & \\
212           \hline           \hline
213        \hline        \hline
214      \end{tabular}      \end{tabular}
215    }    }
216    \caption{~}    \caption{pkg OBCS run-time parameters}
217      \label{tab:pkg:obcs:runtime_flags}
218  \end{table}  \end{table}
219    
220    
# Line 196  There are four open boundaries (OBs), a Line 228  There are four open boundaries (OBs), a
228  Northern, Southern, Eastern, and Western.  Northern, Southern, Eastern, and Western.
229  All OB locations are specified by their absolute  All OB locations are specified by their absolute
230  meridional (Northern/Southern) or zonal (Eastern/Western) indices.  meridional (Northern/Southern) or zonal (Eastern/Western) indices.
231  Thus, for each zonal position $i=1,\ldots,Nx$ a meridional index  Thus, for each zonal position $i=1,\ldots,N_x$ a meridional index
232  $j$ specifies the Northern/Southern OB position,  $j$ specifies the Northern/Southern OB position,
233  and for each meridional position $j=1,\ldots,Ny$, a zonal index  and for each meridional position $j=1,\ldots,N_y$, a zonal index
234  $i$ specifies the Eastern/Western OB position.  $i$ specifies the Eastern/Western OB position.
235  For Northern/Southern OB this defines an $Nx$-dimensional  For Northern/Southern OB this defines an $N_x$-dimensional
236  ``row'' array $\tt OB\_Jnorth(Ny)$ / $\tt OB\_Jsouth(Ny)$,  ``row'' array $\tt OB\_Jnorth(Nx)$ / $\tt OB\_Jsouth(Nx)$,
237  and an $Ny$-dimenisonal  and an $N_y$-dimenisonal
238  ``column'' array $\tt OB\_Ieast(Nx)$ / $\tt OB\_Iwest(Nx)$  ``column'' array $\tt OB\_Ieast(Ny)$ / $\tt OB\_Iwest(Ny)$.
239  Positions determined in this way allows Northern/Southern  Positions determined in this way allows Northern/Southern
240  OBs to be at variable $j$ (or $y$) positions, and Eastern/Western  OBs to be at variable $j$ (or $y$) positions, and Eastern/Western
241  OBs at variable $i$ (or $x$) positions.  OBs at variable $i$ (or $x$) positions.
# Line 212  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 243  see obcs\_ini\_fixed.F} Line 280  see obcs\_ini\_fixed.F}
280  \paragraph{OBCS\_READPARMS:} ~ \\  \paragraph{OBCS\_READPARMS:} ~ \\
281  Set OB positions through arrays  Set OB positions through arrays
282  {\tt OB\_Jnorth(Ny), OB\_Jsouth(Ny), OB\_Ieast(Nx), OB\_Iwest(Nx)},  {\tt OB\_Jnorth(Ny), OB\_Jsouth(Ny), OB\_Ieast(Nx), OB\_Iwest(Nx)},
283  and runtime flags see Table \ref{tab:???}.  and runtime flags (see Table \ref{tab:pkg:obcs:runtime_flags}).
284    
285  \paragraph{OBCS\_CALC:} ~ \\  \paragraph{OBCS\_CALC:} ~ \\
286  %  %
# Line 267  $T,S,U,V$ values determined via Orlanski Line 304  $T,S,U,V$ values determined via Orlanski
304  \item  \item
305  prescribed time-constant or time-varying fields (see below).  prescribed time-constant or time-varying fields (see below).
306  %  %
307    \item
308    use prescribed boundary fields to compute Stevens boundary conditions.
309  \end{itemize}  \end{itemize}
310    
311    \paragraph{ORLANSKI:} ~ \\
 \paragraph{ORLANSKI} ~ \\  
312  %  %
313  Orlanski radiation conditions \citep{orl:76}  Orlanski radiation conditions \citep{orl:76}, examples can be found in
314    \code{verification/dome} and
315  \paragraph{OBCS\_PRESCRIBE\_READ} Setting OB fields and updates \\  \code{verification/tutorial\_plume\_on\_slope}
316  %  (\ref{sec:eg-gravityplume}).
317  ~  
318    \paragraph{OBCS\_PRESCRIBE\_READ:} ~ \\
319    %
320    When \code{useOBCSprescribe = .TRUE.} the model tries to read
321    temperature, salinity, u- and v-velocities from files specified in the
322    runtime parameters \code{OB[N/S/E/W][t/s/u/v]File}. These files are
323    the usual IEEE, big-endian files with dimensions of a section along an
324    open boundary:
325    \begin{itemize}
326    \item For North/South boundary files the dimensions are
327      $(N_x\times N_r\times\mbox{time levels})$, for East/West boundary
328      files the dimensions are $(N_y\times N_r\times\mbox{time levels})$.
329    \item If a non-linear free surface is used
330      (\ref{sec:nonlinear-freesurface}), additional files
331      \code{OB[N/S/E/W]etaFile} for the sea surface height $\eta$ with
332      dimension $(N_{x/y}\times\mbox{time levels})$ may be specified.
333    \item If non-hydrostatic dynamics are used
334      (\ref{sec:non-hydrostatic}), additional files
335      \code{OB[N/S/E/W]wFile} for the vertical velocity $w$ with
336      dimensions $(N_{x/y}\times N_r\times\mbox{time levels})$ can be
337      specified.
338    \item If \code{useSEAICE=.TRUE.} then additional files
339      \code{OB[N/S/E/W][a,h,sl,sn,uice,vice]} for sea ice area, thickness
340      (\code{HEFF}), seaice salinity, snow and ice velocities
341      $(N_{x/y}\times\mbox{time levels})$ can be specified.
342    \end{itemize}
343    As in \code{S/R external\_fields\_load} or the \code{exf}-package, the
344    code reads two time levels for each variable, e.g.\ \code{OBNu0} and
345    \code{OBNu1}, and interpolates linearly between these time levels to
346    obtain the value \code{OBNu} at the current model time (step). When the
347    \code{exf}-package is used, the time levels are controlled for each
348    boundary separately in the same way as the \code{exf}-fields in
349    \code{data.exf}, namelist \code{EXF\_NML\_OBCS}. The runtime flags
350    follow the above naming conventions, e.g. for the western boundary the
351    corresponding flags are \code{OBCWstartdate1/2} and
352    \code{OBCWperiod}. Sea-ice boundary values are controlled separately
353    with \code{siobWstartdate1/2} and \code{siobWperiod}.  When the
354    \code{exf}-package is not used, the time levels are controlled by the
355    runtime flags \code{externForcingPeriod} and \code{externForcingCycle}
356    in \code{data}, see \code{verification/exp4} for an example.
357    
358    \paragraph{OBCS\_CALC\_STEVENS:} ~ \\
359    (THE IMPLEMENTATION OF THESE BOUNDARY CONDITIONS IS NOT
360    COMPLETE. PASSIVE TRACERS, SEA ICE AND NON-LINEAR FREE SURFACE ARE NOT
361    SUPPORTED PROPERLY.) \\
362    The boundary conditions following \citet{stevens:90} require the
363    vertically averaged normal velocity (originally specified as a stream
364    function along the open boundary) $\bar{u}_{ob}$ and the tracer fields
365    $\chi_{ob}$ (note: passive tracers are currently not implemented and
366    the code stops when package \code{ptracers} is used together with this
367    option). Currently, the code vertically averages the normal velocity
368    as specified in \code{OB[E,W]u} or \code{OB[N,S]v}. From these
369    prescribed values the code computes the boundary values for the next
370    timestep $n+1$ as follows (as an example, we use the notation for an
371    eastern or western boundary):
372    \begin{itemize}
373    \item $u^{n+1}(y,z) = \bar{u}_{ob}(y) + (u')^{n}(y,z)$, where
374      $(u')^{n}$ is the deviation from the vertically averaged velocity at
375      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
389      value for tracer $\chi$ is restored to the prescribed values:
390      \[\chi^{n+1} =   \chi^{n} + \frac{\Delta{t}}{\tau_\chi} (\chi_{ob} -
391      \chi^{n}),\] where $\tau_\chi$ is the relaxation time
392      scale \texttt{T/SrelaxStevens}. The new $\chi^{n+1}$ is then subject
393      to the advection by $u^{n+1}$.
394    \item If $u^{n+1}$ is directed out of the model domain, the tracer
395      $\chi^{n+1}$ on the boundary at timestep $n+1$ is estimated from
396      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
405      advection can be turned off by setting the corresponding parameters
406      \texttt{useStevensPhaseVel} and \texttt{useStevensAdvection} to
407      \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\_FLOW:} ~ \\
415    %
416    When turned on (\code{ALLOW\_OBCS\_BALANCE}
417    defined in \code{OBCS\_OPTIONS.h} and \code{useOBCSbalance=.true.} in
418    \code{data.obcs/OBCS\_PARM01}), this routine balances the net flow
419    across the open boundaries. By default the net flow across the
420    boundaries is computed and all normal velocities on boundaries are
421    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  \paragraph{OBCS\_BALANCE} ~ \\  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}
453    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,
456    but this combination of flags is \emph{not} useful if you want to
457    simulate, say, a sector of the Southern Ocean with a strong ACC
458    entering through the western and leaving through the eastern boundary,
459    because the value of ``\code{-1}'' for these flags will make sure that
460    the strong inflow is removed. Clearly, gobal balancing with
461    \code{OBCS\_balanceFacE/W/N/S} $\ge0$ is the preferred method.
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 319  Diagnostics output is available via the Line 519  Diagnostics output is available via the
519  Available output fields are summarized in  Available output fields are summarized in
520  Table \ref{tab:pkg:obcs:diagnostics}.  Table \ref{tab:pkg:obcs:diagnostics}.
521    
522  \begin{table}[h!]  \begin{table}[!ht]
523  \centering  \centering
524  \label{tab:pkg:obcs:diagnostics}  \label{tab:pkg:obcs:diagnostics}
525  {\footnotesize  {\footnotesize
# Line 336  Table \ref{tab:pkg:obcs:diagnostics}. Line 536  Table \ref{tab:pkg:obcs:diagnostics}.
536  %----------------------------------------------------------------------  %----------------------------------------------------------------------
537    
538  \subsubsection{Reference experiments}  \subsubsection{Reference experiments}
539    In the directory \code{verifcation}, the following experiments use
540    \code{obcs}:
541    \begin{itemize}
542    \item \code{exp4}: box with 4 open boundaries, simulating flow over a
543      Gaussian bump based on \citet{adcroft:97}, also tests
544      Stevens-boundary conditions;
545    \item \code{dome}: based on the project ``Dynamics of Overflow Mixing
546      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}
550    \item \code{seaice\_obcs}: simple example who to use the sea-ice
551      related code, based on \code{lab\_sea};
552    \item \code{tutorial\_plume\_on\_slope}: uses Orlanski-BCs, see also
553      section~\ref{sec:eg-gravityplume}.
554    \end{itemize}
555    
556    
557    
# Line 347  Table \ref{tab:pkg:obcs:diagnostics}. Line 563  Table \ref{tab:pkg:obcs:diagnostics}.
563  \label{sec:pkg:obcs:experiments}  \label{sec:pkg:obcs:experiments}
564    
565  \begin{itemize}  \begin{itemize}
566  \item{Ocean experiment in exp4 verification directory. }  \item \code{tutorial\_plume\_on\_slope} (section~\ref{sec:eg-gravityplume})
567  \end{itemize}  \end{itemize}
568    
569    
570    %%% Local Variables:
571    %%% mode: latex
572    %%% TeX-master: "../../manual"
573    %%% End:

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.22